@puddle-code/cli 0.2.12 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +8 -3
  2. package/dist/index.js +6 -4
  3. package/dist/public/assets/{App-DfAiKq3q.js → App-DmpTrUZ_.js} +2 -2
  4. package/dist/public/assets/{Dashboard-CSgMrIyy.js → Dashboard-B_Wl5BUW.js} +1 -1
  5. package/dist/public/assets/{EditorTabClose-D6Dp46I2.js → EditorTabClose-DgHiWUeH.js} +1 -1
  6. package/dist/public/assets/{FindWidget-BIkbrNkw.js → FindWidget-DvE5pM_m.js} +1 -1
  7. package/dist/public/assets/{LazyTerminal-C_4rCoYX.js → LazyTerminal-D_WH4lhZ.js} +2 -2
  8. package/dist/public/assets/{ModelRefcount-6ViCEZ-R.js → ModelRefcount-CrcIbyvv.js} +1 -1
  9. package/dist/public/assets/{NewProjectDialog-DmHU0eFH.js → NewProjectDialog-Cz1ogICv.js} +1 -1
  10. package/dist/public/assets/{PaneEditorBody-5o66FjJV.js → PaneEditorBody-B6bdrN7S.js} +4 -4
  11. package/dist/public/assets/PdfViewer-BHSLh8dm.js +2 -0
  12. package/dist/public/assets/{SettingsDialog-LcZ4sy2U.js → SettingsDialog-CfC9lvq9.js} +1 -1
  13. package/dist/public/assets/{Terminal-B-eGMj3C.js → Terminal-1wvLIdsn.js} +1 -1
  14. package/dist/public/assets/{Workspace-B4VAhexX.js → Workspace-BA7HLQtr.js} +4 -4
  15. package/dist/public/assets/{Workspace-DdBCUbGN.css → Workspace-HyAD9NTJ.css} +1 -1
  16. package/dist/public/assets/{abnfDiagram-VCTEODGH-BPIJ_6Xw.js → abnfDiagram-VCTEODGH-CYiBJCKB.js} +1 -1
  17. package/dist/public/assets/architecture-7GRP2DOG-lF7MgvlB.js +1 -0
  18. package/dist/public/assets/{architectureDiagram-5GKGNRK7-C3N-rgqa.js → architectureDiagram-5GKGNRK7-7dDnpr2A.js} +1 -1
  19. package/dist/public/assets/{blockDiagram-I7D4REHJ-CgWUBUrF.js → blockDiagram-I7D4REHJ-CnHBCey1.js} +1 -1
  20. package/dist/public/assets/{buffer-store-CW-AmjVB.js → buffer-store-DjjKlkBx.js} +2 -2
  21. package/dist/public/assets/{button-CX27Pdc8.js → button-C2U4JLSJ.js} +1 -1
  22. package/dist/public/assets/{c4Diagram-7LVT6UL2-BhQhjnur.js → c4Diagram-7LVT6UL2-Dh4L8JvS.js} +1 -1
  23. package/dist/public/assets/channel-QRQcomU6.js +1 -0
  24. package/dist/public/assets/{chunk-2E4U76K2-CEukLkTQ.js → chunk-2E4U76K2-DZ0SBCfs.js} +1 -1
  25. package/dist/public/assets/{chunk-4HAMMTFA-isaSrXBl.js → chunk-4HAMMTFA-DDQ7TZvS.js} +1 -1
  26. package/dist/public/assets/{chunk-75Z2AOVW-CjKKRNBO.js → chunk-75Z2AOVW-b-3efKur.js} +1 -1
  27. package/dist/public/assets/{chunk-CLGD4ZFX-Daexln-J.js → chunk-CLGD4ZFX-I3haxkb8.js} +1 -1
  28. package/dist/public/assets/{chunk-DU6HZSFF-BPZm7Aec.js → chunk-DU6HZSFF-DU6gnSTi.js} +1 -1
  29. package/dist/public/assets/{chunk-F27PBJKO-B0pTDJJ1.js → chunk-F27PBJKO-CLOxkQ_H.js} +1 -1
  30. package/dist/public/assets/{chunk-GMAD6QVW-Cj2ISoJT.js → chunk-GMAD6QVW-BgNxh1Wg.js} +1 -1
  31. package/dist/public/assets/{chunk-GVQU2GXP-B1MLdPUq.js → chunk-GVQU2GXP-CNaIDciQ.js} +1 -1
  32. package/dist/public/assets/{chunk-IMKFNOWR-fC5wMHoh.js → chunk-IMKFNOWR-B5c6xExk.js} +1 -1
  33. package/dist/public/assets/{chunk-L3NEJ4N5-BKN2lh_0.js → chunk-L3NEJ4N5-59iBItHO.js} +1 -1
  34. package/dist/public/assets/{chunk-OSK3NFVY-C1_C6p7q.js → chunk-OSK3NFVY-SdTDzoMy.js} +1 -1
  35. package/dist/public/assets/{chunk-P2QGCYS3-DChPIjch.js → chunk-P2QGCYS3-VniWvIJd.js} +1 -1
  36. package/dist/public/assets/{chunk-POPQ4Y6H-CnJnbyG8.js → chunk-POPQ4Y6H-BUjB1fDF.js} +1 -1
  37. package/dist/public/assets/{chunk-PWAF6VOD-Cait0vBS.js → chunk-PWAF6VOD--PrNfcDv.js} +1 -1
  38. package/dist/public/assets/{chunk-SHT3W25Y-fCVaJAUc.js → chunk-SHT3W25Y-iS7BNavD.js} +1 -1
  39. package/dist/public/assets/{chunk-SVP7TREG-sgjgeRKG.js → chunk-SVP7TREG-es_cu5SS.js} +1 -1
  40. package/dist/public/assets/{chunk-TICWLB2K-BetG1ZhS.js → chunk-TICWLB2K-CAQdSlKl.js} +1 -1
  41. package/dist/public/assets/{chunk-TLUHSLCS-CJQbxTzh.js → chunk-TLUHSLCS-CivtNrZW.js} +2 -2
  42. package/dist/public/assets/classDiagram-ZZMXUADV-ZU8dp57e.js +1 -0
  43. package/dist/public/assets/classDiagram-v2-VYDZK3BY-ZU8dp57e.js +1 -0
  44. package/dist/public/assets/{context-menu-CMBBLKmk.js → context-menu-C99CAwCo.js} +1 -1
  45. package/dist/public/assets/{cssMode-IW1OdmwV.js → cssMode-BYtLhrHD.js} +1 -1
  46. package/dist/public/assets/{cynefin-OW5HDTMX-flRiCKtv.js → cynefin-OW5HDTMX-CnreCTXF.js} +1 -1
  47. package/dist/public/assets/{cynefinDiagram-5FMLGOSQ-Brg4u3bj.js → cynefinDiagram-5FMLGOSQ-CBhOEGQq.js} +1 -1
  48. package/dist/public/assets/{dagre-GXQ25YYZ-C3SLKgND.js → dagre-GXQ25YYZ-CtMkNeKj.js} +1 -1
  49. package/dist/public/assets/{diagram-S7CK7UJ4-DyXUX4_O.js → diagram-S7CK7UJ4-BwGNVBES.js} +1 -1
  50. package/dist/public/assets/{diagram-UQ7AKVKN-BfX2meSB.js → diagram-UQ7AKVKN-NvnuUqC5.js} +1 -1
  51. package/dist/public/assets/{diagram-VSXAHHWV-D0gba8hn.js → diagram-VSXAHHWV-A1jhKo-L.js} +1 -1
  52. package/dist/public/assets/{diagram-VX7I27RA-Bk5DBOLt.js → diagram-VX7I27RA-Dm82GNqE.js} +1 -1
  53. package/dist/public/assets/{diagram-Z3DM3KII-BwqYVngK.js → diagram-Z3DM3KII-BfSG8tI1.js} +1 -1
  54. package/dist/public/assets/{dialog-2aSLI4Tq.js → dialog-BWYDvidH.js} +1 -1
  55. package/dist/public/assets/{disclosure-C5Bd_kvR.js → disclosure-BwmmXyDN.js} +1 -1
  56. package/dist/public/assets/{dist-BtWbkq62.js → dist-B1yD4sI3.js} +1 -1
  57. package/dist/public/assets/{dist-C0uGtrE7.js → dist-CXaqo3cO.js} +1 -1
  58. package/dist/public/assets/{ebnfDiagram-PWID7BFC-DG5fHEYY.js → ebnfDiagram-PWID7BFC-CRZBgWXo.js} +1 -1
  59. package/dist/public/assets/{erDiagram-RLTQ6QDP-BlWtW0qx.js → erDiagram-RLTQ6QDP-BGgBvFkm.js} +1 -1
  60. package/dist/public/assets/eventmodeling-NTZA5JFV-D59DFIHa.js +1 -0
  61. package/dist/public/assets/flowDiagram-HODETNUW-B5A3kSmc.js +1 -0
  62. package/dist/public/assets/{ganttDiagram-EL5Y4UJY-BkUQHWc3.js → ganttDiagram-EL5Y4UJY-BPnnrdiz.js} +1 -1
  63. package/dist/public/assets/{gitGraph-4MIJSDKK-BWzzegLX.js → gitGraph-4MIJSDKK-DwnCyNC0.js} +1 -1
  64. package/dist/public/assets/{gitGraphDiagram-WWUBYQGX-D0s0u9Me.js → gitGraphDiagram-WWUBYQGX-DPK44hHT.js} +1 -1
  65. package/dist/public/assets/{hotkeys-BKwA6yDB.js → hotkeys-B5IFr8Wj.js} +1 -1
  66. package/dist/public/assets/{htmlMode-BC4FsaY_.js → htmlMode-DUwVyVGW.js} +1 -1
  67. package/dist/public/assets/{index-CHQCnqBC.js → index-BuCcWx9p.js} +2 -2
  68. package/dist/public/assets/index-DRbjjH1k.css +2 -0
  69. package/dist/public/assets/{info-A6RAGUB7-IH7GTf4S.js → info-A6RAGUB7-BZfkzQZ9.js} +1 -1
  70. package/dist/public/assets/{infoDiagram-27XIBGKW-CVxNf4pG.js → infoDiagram-27XIBGKW-De3RP-ip.js} +1 -1
  71. package/dist/public/assets/{ishikawaDiagram-5VMMS53U-IVaFsDaO.js → ishikawaDiagram-5VMMS53U-CgKS_YTG.js} +1 -1
  72. package/dist/public/assets/{journeyDiagram-3NMN7TZE-BBEWFzTv.js → journeyDiagram-3NMN7TZE-C3O0Ecte.js} +1 -1
  73. package/dist/public/assets/{jsonMode-C0auehlj.js → jsonMode-BXRjPbsP.js} +1 -1
  74. package/dist/public/assets/{kanban-definition-UXKFOSKX-D_SCywYG.js → kanban-definition-UXKFOSKX-CZ7RgNB2.js} +1 -1
  75. package/dist/public/assets/{line-DypWKsOp.js → line-4f0hVotd.js} +1 -1
  76. package/dist/public/assets/{media-refresh-store-CRu4LARy.js → media-refresh-store-DJBTfex1.js} +1 -1
  77. package/dist/public/assets/{mermaid-parser.core-DjudYqc1.js → mermaid-parser.core-BDA8Oa7i.js} +3 -3
  78. package/dist/public/assets/{mermaid.core-DYtpuPxI.js → mermaid.core-cvYygy5u.js} +3 -3
  79. package/dist/public/assets/{mindmap-definition-YA3MSWOX-D3E0udnH.js → mindmap-definition-YA3MSWOX-CWYhHFvQ.js} +1 -1
  80. package/dist/public/assets/{notification-permission-Dw2YIMNo.js → notification-permission-BKYFvjLt.js} +1 -1
  81. package/dist/public/assets/{packet-AYTQ26CC-BvfG3Y1e.js → packet-AYTQ26CC-CB-X1biA.js} +1 -1
  82. package/dist/public/assets/{pdf-mcnWpTlq.js → pdf-ZHMExUNo.js} +1 -1
  83. package/dist/public/assets/{pegDiagram-XKGWAZYB-CaTJykwA.js → pegDiagram-XKGWAZYB-2tLrxoF1.js} +1 -1
  84. package/dist/public/assets/{pie-WAS4IAKB-Dveh6y97.js → pie-WAS4IAKB-BIcZ1M_1.js} +1 -1
  85. package/dist/public/assets/{pieDiagram-E7YTZNPT-ORH8xXwQ.js → pieDiagram-E7YTZNPT-DBO0Vc1V.js} +1 -1
  86. package/dist/public/assets/{project-abbrev-Yyhq4IQP.js → project-abbrev-D6zdXeC-.js} +1 -1
  87. package/dist/public/assets/{quadrantDiagram-AXDQQJYC-DdFjT0aX.js → quadrantDiagram-AXDQQJYC-81wtxryw.js} +1 -1
  88. package/dist/public/assets/{radar-RG4KPBEZ-CbhCH12U.js → radar-RG4KPBEZ-ChF4ZoCX.js} +1 -1
  89. package/dist/public/assets/{railroad-74A4TZTK-DkXypmnL.js → railroad-74A4TZTK-OtZozV0Q.js} +1 -1
  90. package/dist/public/assets/railroad-abnf-HS5TGJTU-BdWrV_su.js +1 -0
  91. package/dist/public/assets/railroad-ebnf-LZEXJU2U-BVjLGse_.js +1 -0
  92. package/dist/public/assets/railroad-peg-WCYAUIDC-B6r-AmeI.js +1 -0
  93. package/dist/public/assets/{railroadDiagram-O6MQD6OU-DH-SaFzu.js → railroadDiagram-O6MQD6OU-D0o8VE08.js} +1 -1
  94. package/dist/public/assets/{requirementDiagram-BXWQKSXE-haYgs9Q-.js → requirementDiagram-BXWQKSXE-3zzyqA14.js} +1 -1
  95. package/dist/public/assets/{sankeyDiagram-P5KCCOFB-wX8wd8U1.js → sankeyDiagram-P5KCCOFB-hUUgKGHN.js} +1 -1
  96. package/dist/public/assets/{scroll-restoration-C0NMkov_.js → scroll-restoration-CuOEoIlj.js} +1 -1
  97. package/dist/public/assets/{selection-actions-DGAOYptr.js → selection-actions-BAD5y0Aa.js} +1 -1
  98. package/dist/public/assets/{sequenceDiagram-WJ2MYXX4-59ksijVu.js → sequenceDiagram-WJ2MYXX4-Cwk3h-rN.js} +1 -1
  99. package/dist/public/assets/{stateDiagram-D77RDMKH-BunJS731.js → stateDiagram-D77RDMKH-BOHkHb7y.js} +1 -1
  100. package/dist/public/assets/stateDiagram-v2-MP3YSRHH-CsZg8ab0.js +1 -0
  101. package/dist/public/assets/{swimlanes-42K2YHIH-D5uHbpLH.js → swimlanes-42K2YHIH-P69oIcuJ.js} +1 -1
  102. package/dist/public/assets/swimlanesDiagram-VR7AAH4N-Dz_fGSxz.js +8 -0
  103. package/dist/public/assets/{switch-B-Im0urx.js → switch-Cw0Ot6EQ.js} +1 -1
  104. package/dist/public/assets/{timeline-definition-24CTP7MA-CuVByGqR.js → timeline-definition-24CTP7MA-DbMqQLnN.js} +1 -1
  105. package/dist/public/assets/{treeView-Q6P3EWNA-DHxF0zNv.js → treeView-Q6P3EWNA-B0EapB0i.js} +1 -1
  106. package/dist/public/assets/{treemap-WGGIJYW6-CFg5d1mh.js → treemap-WGGIJYW6-DlgZgQf2.js} +1 -1
  107. package/dist/public/assets/{tsMode-BuQo0vzE.js → tsMode-DZaSoOf6.js} +1 -1
  108. package/dist/public/assets/{use-ui-state-Hk9fQwqt.js → use-ui-state-BONthfkR.js} +1 -1
  109. package/dist/public/assets/{vennDiagram-4TSXK5OY-CtwdHTQ2.js → vennDiagram-4TSXK5OY-BympGav2.js} +1 -1
  110. package/dist/public/assets/{view-state-store-BYX2FoUu.js → view-state-store-DC0jfhBX.js} +1 -1
  111. package/dist/public/assets/{wardley-WFR3VGLG-D5WVjnK4.js → wardley-WFR3VGLG-Dbf8bnG7.js} +1 -1
  112. package/dist/public/assets/{wardleyDiagram-VM6X3IG4-D2gatdsS.js → wardleyDiagram-VM6X3IG4-BgekmxbV.js} +1 -1
  113. package/dist/public/assets/{ws-BJBexI14.js → ws-ffUcAuKj.js} +1 -1
  114. package/dist/public/assets/{xychartDiagram-S5SC5T6Z-Cv6sANRx.js → xychartDiagram-S5SC5T6Z-Ctmrmwdh.js} +1 -1
  115. package/dist/public/index.html +2 -2
  116. package/package.json +1 -1
  117. package/dist/public/assets/PdfViewer-CDlrkl8b.js +0 -2
  118. package/dist/public/assets/architecture-7GRP2DOG-Be8DTVg5.js +0 -1
  119. package/dist/public/assets/channel-DsunNb7S.js +0 -1
  120. package/dist/public/assets/classDiagram-ZZMXUADV-DUMFGmwl.js +0 -1
  121. package/dist/public/assets/classDiagram-v2-VYDZK3BY-DUMFGmwl.js +0 -1
  122. package/dist/public/assets/eventmodeling-NTZA5JFV-CurGGdyn.js +0 -1
  123. package/dist/public/assets/flowDiagram-HODETNUW-CTnIi_OX.js +0 -1
  124. package/dist/public/assets/index-DMliHgh7.css +0 -2
  125. package/dist/public/assets/railroad-abnf-HS5TGJTU-iVbgIOln.js +0 -1
  126. package/dist/public/assets/railroad-ebnf-LZEXJU2U-DPzo9l_H.js +0 -1
  127. package/dist/public/assets/railroad-peg-WCYAUIDC-AAqRdj9L.js +0 -1
  128. package/dist/public/assets/stateDiagram-v2-MP3YSRHH-a_qUh5oN.js +0 -1
  129. package/dist/public/assets/swimlanesDiagram-VR7AAH4N-C-DUVLJy.js +0 -8
@@ -1 +1 @@
1
- import{t as e,u as t}from"./mermaid-parser.core-DjudYqc1.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-BPZm7Aec.js";import"./chunk-CLGD4ZFX-Daexln-J.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-sgjgeRKG.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=t().RailroadPeg.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=n(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=n(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=n(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=n(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(h(e)))},`populateDb`),_={parser:{parse:n(t=>{o.clear(),r.debug(`[PEG Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new e(n);let i=n.value;r.debug(`[PEG Parser] Parsed rules:`,i.rules.length),g(i),r.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{_ as diagram};
1
+ import{t as e,u as t}from"./mermaid-parser.core-BDA8Oa7i.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-DU6gnSTi.js";import"./chunk-CLGD4ZFX-I3haxkb8.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-es_cu5SS.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=t().RailroadPeg.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=n(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=n(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=n(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=n(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=n(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(h(e)))},`populateDb`),_={parser:{parse:n(t=>{o.clear(),r.debug(`[PEG Parser] Starting Langium parse`);let n=c.parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new e(n);let i=n.value;r.debug(`[PEG Parser] Parsed rules:`,i.rules.length),g(i),r.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{_ as diagram};
@@ -1 +1 @@
1
- import"./chunk-FOHPRMQF-CdD2_EOh.js";import{b as e}from"./mermaid-parser.core-DjudYqc1.js";export{e as createPieServices};
1
+ import"./chunk-FOHPRMQF-CdD2_EOh.js";import{b as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createPieServices};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./mermaid-parser.core-DjudYqc1.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{H as r,K as i,U as a,a as o,c as s,f as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-BPZm7Aec.js";import{t as p}from"./ordinal-hYBb2elL.js";import{n as m}from"./path-BWPyau1x.js";import{m as h}from"./dist-D9sYb5Oa.js";import{t as g}from"./arc-BjSQqbzd.js";import{t as _}from"./array-BifhSqXX.js";import{i as v,p as y}from"./chunk-75Z2AOVW-CjKKRNBO.js";import{t as b}from"./chunk-CLGD4ZFX-Daexln-J.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";function S(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=m(0),i=m(h),a=m(0);function o(o){var s,c=(o=_(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),g=Math.min(h,Math.max(-h,i.apply(this,arguments)-m)),v,y=Math.min(Math.abs(g)/c,a.apply(this,arguments)),b=y*(g<0?-1:1),x;for(s=0;s<c;++s)(x=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(g-c*b)/d:0;s<c;++s,m=v)l=f[s],x=p[l],v=m+(x>0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:m,endAngle:v,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:m(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:m(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:m(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:m(+e),o):a},o}var T=c.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:t(()=>structuredClone(k),`getConfig`),clear:t(()=>{D=new Map,O=E.showData,o()},`clear`),setDiagramTitle:i,getDiagramTitle:u,setAccTitle:a,getAccTitle:f,setAccDescription:r,getAccDescription:l,addSection:t(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,t),n.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:t(()=>D,`getSections`),setShowData:t(e=>{O=e},`setShowData`),getShowData:t(()=>O,`getShowData`)},j=t((e,t)=>{x(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:t(async t=>{let r=await e(`pie`,t);n.debug(r),j(r,A)},`parse`)},N=t(e=>`
1
+ import{n as e}from"./mermaid-parser.core-BDA8Oa7i.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{H as r,K as i,U as a,a as o,c as s,f as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-DU6gnSTi.js";import{t as p}from"./ordinal-hYBb2elL.js";import{n as m}from"./path-BWPyau1x.js";import{m as h}from"./dist-D9sYb5Oa.js";import{t as g}from"./arc-BjSQqbzd.js";import{t as _}from"./array-BifhSqXX.js";import{i as v,p as y}from"./chunk-75Z2AOVW-b-3efKur.js";import{t as b}from"./chunk-CLGD4ZFX-I3haxkb8.js";import{t as x}from"./chunk-JWPE2WC7-DVXcaiue.js";function S(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=m(0),i=m(h),a=m(0);function o(o){var s,c=(o=_(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),g=Math.min(h,Math.max(-h,i.apply(this,arguments)-m)),v,y=Math.min(Math.abs(g)/c,a.apply(this,arguments)),b=y*(g<0?-1:1),x;for(s=0;s<c;++s)(x=p[f[s]=s]=+e(o[s],s,o))>0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(g-c*b)/d:0;s<c;++s,m=v)l=f[s],x=p[l],v=m+(x>0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:m,endAngle:v,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:m(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:m(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:m(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:m(+e),o):a},o}var T=c.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:t(()=>structuredClone(k),`getConfig`),clear:t(()=>{D=new Map,O=E.showData,o()},`clear`),setDiagramTitle:i,getDiagramTitle:u,setAccTitle:a,getAccTitle:f,setAccDescription:r,getAccDescription:l,addSection:t(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,t),n.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:t(()=>D,`getSections`),setShowData:t(e=>{O=e},`setShowData`),getShowData:t(()=>O,`getShowData`)},j=t((e,t)=>{x(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:t(async t=>{let r=await e(`pie`,t);n.debug(r),j(r,A)},`parse`)},N=t(e=>`
2
2
  .pieCircle{
3
3
  stroke: ${e.pieStrokeColor};
4
4
  stroke-width : ${e.pieStrokeWidth};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./index-CHQCnqBC.js";import{t as r}from"./createLucideIcon-DyMAgLa3.js";var i=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,a=/^[\\/]{2}/;function o(e,t){return t+e.replace(/\\/g,`/`)}var s=`popstate`;function c(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function l(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return m(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:h(t)}return _(t,n,null,e)}function u(e,t){if(e===!1||e==null)throw Error(t)}function d(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function f(){return Math.random().toString(36).substring(2,10)}function p(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function m(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g(t):t,state:n,key:t&&t.key||r||f(),mask:i}}function h({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function g(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l=`POP`,u=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function h(){l=`POP`;let e=f(),t=e==null?null:e-d;d=e,u&&u({action:l,location:b.location,delta:t})}function g(e,t){l=`PUSH`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f()+1;let s=p(r,d),h=b.createHref(r.mask||r);try{o.pushState(s,``,h)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(h)}a&&u&&u({action:l,location:b.location,delta:1})}function _(e,t){l=`REPLACE`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f();let i=p(r,d),s=b.createHref(r.mask||r);o.replaceState(i,``,s),a&&u&&u({action:l,location:b.location,delta:0})}function y(e){return v(i,e)}let b={get action(){return l},get location(){return e(i,o)},listen(e){if(u)throw Error(`A history only accepts one active listener`);return i.addEventListener(s,h),u=e,()=>{i.removeEventListener(s,h),u=null}},createHref(e){return t(i,e)},createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:g,replace:_,go(e){return o.go(e)}};return b}function v(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),u(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:h(t);return i=i.replace(/ $/,`%20`),!n&&a.test(i)&&(i=r+i),new URL(i,r)}var y=e(t(),1);function b(e,t,n=`/`){return x(e,t,n,!1)}function x(e,t,n,r,i){let a=A((typeof t==`string`?g(t):t).pathname||`/`,n);if(a==null)return null;let o=i??C(e),s=null,c=fe(a);for(let e=0;s==null&&e<o.length;++e)s=le(o[e],c,r);return s}function S(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function C(e){let t=w(e);return E(t),t}function w(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;u(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=N([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(u(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),w(e.children,t,d,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:se(l,e.index),routesMeta:d.map((e,t)=>{let[n,r]=de(e.relativePath,e.caseSensitive,t===d.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of T(e.path))a(e,t,!0,n)}),t}function T(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=T(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function E(e){e.sort((e,t)=>e.score===t.score?ce(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ee=/^:[\w-]+$/,te=/^:[\w-]+/,ne=3.5,D=3,O=2,re=1,ie=10,ae=-2,oe=e=>e===`*`;function se(e,t){let n=e.split(`/`),r=n.length;return n.some(oe)&&(r+=ae),t&&(r+=O),n.filter(e=>!oe(e)).reduce((e,t)=>e+(ee.test(t)?D:te.test(t)?ne:t===``?re:ie),r)}function ce(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function le(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ue(u,l,s.matcher,s.compiledParams):k(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:N([a,d.pathname]),pathnameBase:ye(N([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=N([a,d.pathnameBase]))}return o}function k(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=de(e.path,e.caseSensitive,e.end);return ue(e,t,n,r)}function ue(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function de(e,t=!1,n=!0){d(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function fe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return d(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function A(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function pe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g(e):e,a;return n?(n=_e(n),a=n.startsWith(`/`)?me(n.substring(1),`/`):me(n,t)):a=t,{pathname:a,search:be(r),hash:xe(i)}}function me(e,t){let n=ve(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function j(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function he(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ge(e){let t=he(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function M(e,t,n,r=!1){let i;typeof e==`string`?i=g(e):(i={...e},u(!i.pathname||!i.pathname.includes(`?`),j(`?`,`pathname`,`search`,i)),u(!i.pathname||!i.pathname.includes(`#`),j(`#`,`pathname`,`hash`,i)),u(!i.search||!i.search.includes(`#`),j(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=pe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||d)&&(c.pathname+=`/`),c}var _e=e=>e.replace(/[\\/]{2,}/g,`/`),N=e=>_e(e.join(`/`)),ve=e=>e.replace(/\/+$/,``),ye=e=>ve(e).replace(/^\/*/,`/`),be=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,xe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Se=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ce(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function we(e){return N(e.map(e=>e.route.path).filter(Boolean))||`/`}var Te=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ee(e,t){let n=e;if(typeof n!=`string`||!i.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(Te)try{let e=new URL(window.location.href),r=a.test(n)?new URL(o(n,e.protocol)):new URL(n),i=A(r.pathname,t);r.origin===e.origin&&i!=null?n=i+r.search+r.hash:s=!0}catch{d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}var De=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(De);var Oe=[`GET`,...De];new Set(Oe);var ke=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ae(e){try{return ke.includes(new URL(e).protocol)}catch{return!1}}var P=y.createContext(null);P.displayName=`DataRouter`;var F=y.createContext(null);F.displayName=`DataRouterState`;var je=y.createContext(!1);function Me(){return y.useContext(je)}var Ne=y.createContext({isTransitioning:!1});Ne.displayName=`ViewTransition`;var Pe=y.createContext(new Map);Pe.displayName=`Fetchers`;var Fe=y.createContext(null);Fe.displayName=`Await`;var I=y.createContext(null);I.displayName=`Navigation`;var L=y.createContext(null);L.displayName=`Location`;var R=y.createContext({outlet:null,matches:[],isDataRoute:!1});R.displayName=`Route`;var z=y.createContext(null);z.displayName=`RouteError`;var Ie=`REACT_ROUTER_ERROR`,Le=`REDIRECT`,Re=`ROUTE_ERROR_RESPONSE`;function ze(e){if(e.startsWith(`${Ie}:${Le}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Be(e){if(e.startsWith(`${Ie}:${Re}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Se(t.status,t.statusText,t.data)}catch{}}function Ve(e,{relative:t}={}){u(B(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=y.useContext(I),{hash:i,pathname:a,search:o}=H(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:N([n,a])),r.createHref({pathname:s,search:o,hash:i})}function B(){return y.useContext(L)!=null}function V(){return u(B(),`useLocation() may be used only in the context of a <Router> component.`),y.useContext(L).location}var He=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ue(){let{isDataRoute:e}=y.useContext(R);return e?ct():We()}function We(){u(B(),`useNavigate() may be used only in the context of a <Router> component.`);let e=y.useContext(P),{basename:t,navigator:n}=y.useContext(I),{matches:r}=y.useContext(R),{pathname:i}=V(),a=JSON.stringify(ge(r)),o=y.useRef(!1);return y.useLayoutEffect(()=>{o.current=!0}),y.useCallback((r,s={})=>{if(d(o.current,He),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=M(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:N([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Ge=y.createContext(null);function Ke(e){let t=y.useContext(R).outlet;return y.useMemo(()=>t&&y.createElement(Ge.Provider,{value:e},t),[t,e])}function qe(){let{matches:e}=y.useContext(R);return e[e.length-1]?.params??{}}function H(e,{relative:t}={}){let{matches:n}=y.useContext(R),{pathname:r}=V(),i=JSON.stringify(ge(n));return y.useMemo(()=>M(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Je(e,t){return Ye(e,t)}function Ye(e,t,n){u(B(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=y.useContext(I),{matches:i}=y.useContext(R),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=V(),l;if(t){let e=typeof t==`string`?g(t):t;u(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let d=l.pathname||`/`,f=d;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):b(e,{pathname:f}),m=tt(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:N([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:N([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&m?y.createElement(L.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},m):m}function Xe(){let e=st(),t=Ce(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return y.createElement(y.Fragment,null,y.createElement(`h2`,null,`Unexpected Application Error!`),y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?y.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ze=y.createElement(Xe,null),Qe=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=je;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Be(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:y.createElement(R.Provider,{value:this.props.routeContext},y.createElement(z.Provider,{value:e,children:this.props.component}));return this.context?y.createElement($e,{error:e},t):t}},U=new WeakMap;function $e({children:e,error:t}){let{basename:n}=y.useContext(I);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ze(t.digest);if(e){let r=U.get(t);if(r)throw r;let i=Ee(e.location,n),a=i.absoluteURL||i.to;if(Ae(a))throw Error(`Invalid redirect location`);if(Te&&!U.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw U.set(t,n),n}return y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function et({routeContext:e,match:t,children:n}){let r=y.useContext(P);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(R.Provider,{value:e},n)}function tt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:we(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Ze,o&&(s<0&&c===0?(ut(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?y.createElement(n.route.Component,null):n.route.element?n.route.element:e,y.createElement(et,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?y.createElement(Qe,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function W(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nt(e){let t=y.useContext(P);return u(t,W(e)),t}function G(e){let t=y.useContext(F);return u(t,W(e)),t}function rt(e){let t=y.useContext(R);return u(t,W(e)),t}function K(e){let t=rt(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function it(){return K(`useRouteId`)}function at(){let e=G(`useNavigation`);return y.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function ot(){let{matches:e,loaderData:t}=G(`useMatches`);return y.useMemo(()=>e.map(e=>S(e,t)),[e,t])}function st(){let e=y.useContext(z),t=G(`useRouteError`),n=K(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ct(){let{router:e}=nt(`useNavigate`),t=K(`useNavigate`),n=y.useRef(!1);return y.useLayoutEffect(()=>{n.current=!0}),y.useCallback(async(r,i={})=>{d(n.current,He),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var lt={};function ut(e,t,n){!t&&!lt[e]&&(lt[e]=!0,d(!1,n))}y.memo(dt);function dt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ye(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function ft(e){return Ke(e.context)}function pt(e){u(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function mt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){u(!B(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=y.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=g(n));let{pathname:l=`/`,search:f=``,hash:p=``,state:m=null,key:h=`default`,mask:_}=n,v=y.useMemo(()=>{let e=A(l,s);return e==null?null:{location:{pathname:e,search:f,hash:p,state:m,key:h,mask:_},navigationType:r}},[s,l,f,p,m,h,r,_]);return d(v!=null,`<Router basename="${s}"> is not able to match the URL "${l}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:y.createElement(I.Provider,{value:c},y.createElement(L.Provider,{children:t,value:v}))}function ht({children:e,location:t}){return Je(q(e),t)}y.Component;function q(e,t=[]){let n=[];return y.Children.forEach(e,(e,r)=>{if(!y.isValidElement(e))return;let i=[...t,r];if(e.type===y.Fragment){n.push.apply(n,q(e.props.children,i));return}u(e.type===pt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;u(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=q(a.children,i)),n.push(o)}),n}var J=`application/x-www-form-urlencoded`;function Y(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function gt(e){return Y(e)&&e.tagName.toLowerCase()===`button`}function _t(e){return Y(e)&&e.tagName.toLowerCase()===`form`}function vt(e){return Y(e)&&e.tagName.toLowerCase()===`input`}function yt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bt(e,t){return e.button===0&&(!t||t===`_self`)&&!yt(e)}var X=null;function xt(){if(X===null)try{new FormData(document.createElement(`form`),0),X=!1}catch{X=!0}return X}var St=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ct(e){return e!=null&&!St.has(e)?(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${J}"`),null):e}function wt(e,t){let n,r,i,a,o;if(_t(e)){let o=e.getAttribute(`action`);r=o?A(o,t):null,n=e.getAttribute(`method`)||`get`,i=Ct(e.getAttribute(`enctype`))||J,a=new FormData(e)}else if(gt(e)||vt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?A(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Ct(e.getAttribute(`formenctype`))||Ct(o.getAttribute(`enctype`))||J,a=new FormData(o,e),!xt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Y(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=J,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Tt(e,t){if(e===!1||e==null)throw Error(t)}var Et={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Dt=/[&><\u2028\u2029]/g;function Ot(e){return e.replace(Dt,e=>Et[e])}function kt(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function At(e,t){if(e.id in t)return t[e.id];try{let r=await n(()=>import(e.module),[]);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jt(e){return e!=null&&typeof e.page==`string`}function Mt(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Nt(e,t,n){return Rt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await At(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Mt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Pt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ft(e,t,{includeHydrateFallback:n}={}){return It(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function It(e){return[...new Set(e)]}function Lt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Rt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!jt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Lt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function zt(){let e=y.useContext(P);return Tt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Bt(){let e=y.useContext(F);return Tt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Z=y.createContext(void 0);Z.displayName=`FrameworkContext`;function Vt(){let e=y.useContext(Z);return Tt(e,`You must render this element inside a <HydratedRouter> element`),e}function Ht(e,t){let n=y.useContext(Z),[r,i]=y.useState(!1),[a,o]=y.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=y.useRef(null);y.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),y.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Q(s,p),onBlur:Q(c,m),onMouseEnter:Q(l,p),onMouseLeave:Q(u,m),onTouchStart:Q(d,p)}]:[a,f,{}]:[!1,f,{}]}function Q(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ut({page:e,...t}){let n=Me(),{nonce:r}=Vt(),{router:i}=zt(),a=y.useMemo(()=>b(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?y.createElement(Gt,{page:e,matches:a,...t}):y.createElement(Kt,{page:e,matches:a,...t})):null}function Wt(e){let{manifest:t,routeModules:n}=Vt(),[r,i]=y.useState([]);return y.useEffect(()=>{let r=!1;return Nt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Gt({page:e,matches:t,...n}){let r=V(),i=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=kt(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return y.createElement(y.Fragment,null,i.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Kt({page:e,matches:t,...n}){let r=V(),{manifest:i,routeModules:a}=Vt(),{loaderData:o,matches:s}=Bt(),c=y.useMemo(()=>Pt(e,t,s,i,r,`data`),[e,t,s,i,r]),l=y.useMemo(()=>Pt(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=kt(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=y.useMemo(()=>Ft(l,i),[l,i]),f=Wt(l);return y.createElement(y.Fragment,null,u.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>y.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>y.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function qt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Jt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Jt&&(window.__reactRouterVersion=`8.2.0`)}catch{}function Yt({basename:e,children:t,useTransitions:n,window:r}){let i=y.useRef(null);i.current??=l({window:r,v5Compat:!0});let a=i.current,[o,s]=y.useState({action:a.action,location:a.location}),c=y.useCallback(e=>{n===!1?s(e):y.startTransition(()=>s(e))},[n]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.createElement(mt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Xt({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=y.useState({action:n.action,location:n.location}),o=y.useCallback(e=>{r===!1?a(e):y.startTransition(()=>a(e))},[r]);return y.useLayoutEffect(()=>n.listen(o),[n,o]),y.createElement(mt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Xt.displayName=`unstable_HistoryRouter`;var Zt=y.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:a,replace:o,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=y.useContext(I),b=typeof u==`string`&&i.test(u),x=Ee(u,g);u=x.to;let S=Ve(u,{relative:r}),C=V(),w=null;if(s){let e=M(s,[],C.mask?C.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:N([g,e.pathname])),w=_.createHref(e)}let[T,E,ee]=Ht(n,m),te=an(u,{replace:o,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function ne(t){e&&e(t),t.defaultPrevented||te(t)}let D=!(x.isExternal||a),O=y.createElement(`a`,{...m,...ee,href:(D?w:void 0)||x.absoluteURL||S,onClick:D?ne:e,ref:qt(h,E),target:l,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?y.createElement(y.Fragment,null,O,y.createElement(Ut,{page:S})):O});Zt.displayName=`Link`;var Qt=y.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=H(a,{relative:c.relative}),d=V(),f=y.useContext(F),{navigator:p,basename:m}=y.useContext(I),h=f!=null&&mn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=A(v,m)||v);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return y.createElement(Zt,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Qt.displayName=`NavLink`;var $t=y.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:s=`get`,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=y.useContext(I),_=cn(),v=ln(c,{relative:u}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&i.test(c);return y.createElement(`form`,{ref:h,method:b,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute(`formmethod`)||s,c=()=>_(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?y.startTransition(()=>c()):c()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});$t.displayName=`Form`;function en({getKey:e,storageKey:t,...n}){let r=y.useContext(Z),{basename:i}=y.useContext(I),a=V(),o=ot();fn({getKey:e,storageKey:t});let s=y.useMemo(()=>{if(!r||!e)return null;let t=dn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),y.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Ot(JSON.stringify(t||un))}, ${Ot(JSON.stringify(s))})`}})}en.displayName=`ScrollRestoration`;function tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nn(e){let t=y.useContext(P);return u(t,tn(e)),t}function rn(e){let t=y.useContext(F);return u(t,tn(e)),t}function an(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Ue(),d=V(),f=H(e,{relative:o});return y.useCallback(p=>{if(bt(p,t)){p.preventDefault();let t=n===void 0?h(d)===h(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?y.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var on=0,sn=()=>`__${String(++on)}__`;function cn(){let{router:e}=nn(`useSubmit`),{basename:t}=y.useContext(I),n=it(),r=e.fetch,i=e.navigate;return y.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=wt(e,t);a.navigate===!1?await r(a.fetcherKey||sn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ln(e,{relative:t}={}){let{basename:n}=y.useContext(I),r=y.useContext(R);u(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...H(e||`.`,{relative:t})},o=V();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:N([n,a.pathname])),h(a)}var un=`react-router-scroll-positions`,$={};function dn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:A(e.pathname,n)||e.pathname},t)),i??=e.key,i}function fn({getKey:e,storageKey:t}={}){let{router:n}=nn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=rn(`useScrollRestoration`),{basename:a}=y.useContext(I),o=V(),s=ot(),c=at();y.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),pn(y.useCallback(()=>{if(c.state===`idle`){let t=dn(o,s,a,e);$[t]=window.scrollY}try{sessionStorage.setItem(t||un,JSON.stringify($))}catch(e){d(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(y.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||un);e&&($=JSON.parse(e))}catch{}},[t]),y.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($,()=>window.scrollY,e?(t,n)=>dn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),y.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{d(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function pn(e,t){let{capture:n}=t||{};y.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function mn(e,{relative:t}={}){let n=y.useContext(Ne);u(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=nn(`useViewTransitionState`),i=H(e,{relative:t});if(!n.isTransitioning)return!1;let a=A(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=A(n.nextLocation.pathname,r)||n.nextLocation.pathname;return k(i.pathname,o)!=null||k(i.pathname,a)!=null}var hn=r(`corner-left-up`,[[`path`,{d:`M14 9 9 4 4 9`,key:`1af5af`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`,key:`1blwi3`}]]),gn=r(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),_n=r(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]);function vn(e){return e.trim().slice(0,5).toUpperCase()}function yn(e){return e.abbrev??vn(e.name)}function bn(e){return e.trim().toUpperCase().slice(0,5)}export{gn as a,Zt as c,ht as d,V as f,_n as i,ft as l,qe as m,bn as n,hn as o,Ue as p,yn as r,Yt as s,vn as t,pt as u};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./index-BuCcWx9p.js";import{t as r}from"./createLucideIcon-DyMAgLa3.js";var i=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,a=/^[\\/]{2}/;function o(e,t){return t+e.replace(/\\/g,`/`)}var s=`popstate`;function c(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function l(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return m(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:h(t)}return _(t,n,null,e)}function u(e,t){if(e===!1||e==null)throw Error(t)}function d(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function f(){return Math.random().toString(36).substring(2,10)}function p(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function m(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g(t):t,state:n,key:t&&t.key||r||f(),mask:i}}function h({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function g(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l=`POP`,u=null,d=f();d??(d=0,o.replaceState({...o.state,idx:d},``));function f(){return(o.state||{idx:null}).idx}function h(){l=`POP`;let e=f(),t=e==null?null:e-d;d=e,u&&u({action:l,location:b.location,delta:t})}function g(e,t){l=`PUSH`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f()+1;let s=p(r,d),h=b.createHref(r.mask||r);try{o.pushState(s,``,h)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(h)}a&&u&&u({action:l,location:b.location,delta:1})}function _(e,t){l=`REPLACE`;let r=c(e)?e:m(b.location,e,t);n&&n(r,e),d=f();let i=p(r,d),s=b.createHref(r.mask||r);o.replaceState(i,``,s),a&&u&&u({action:l,location:b.location,delta:0})}function y(e){return v(i,e)}let b={get action(){return l},get location(){return e(i,o)},listen(e){if(u)throw Error(`A history only accepts one active listener`);return i.addEventListener(s,h),u=e,()=>{i.removeEventListener(s,h),u=null}},createHref(e){return t(i,e)},createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:g,replace:_,go(e){return o.go(e)}};return b}function v(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),u(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:h(t);return i=i.replace(/ $/,`%20`),!n&&a.test(i)&&(i=r+i),new URL(i,r)}var y=e(t(),1);function b(e,t,n=`/`){return x(e,t,n,!1)}function x(e,t,n,r,i){let a=A((typeof t==`string`?g(t):t).pathname||`/`,n);if(a==null)return null;let o=i??C(e),s=null,c=fe(a);for(let e=0;s==null&&e<o.length;++e)s=le(o[e],c,r);return s}function S(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function C(e){let t=w(e);return E(t),t}function w(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;u(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=N([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(u(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),w(e.children,t,d,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:se(l,e.index),routesMeta:d.map((e,t)=>{let[n,r]=de(e.relativePath,e.caseSensitive,t===d.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of T(e.path))a(e,t,!0,n)}),t}function T(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=T(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function E(e){e.sort((e,t)=>e.score===t.score?ce(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ee=/^:[\w-]+$/,te=/^:[\w-]+/,ne=3.5,D=3,O=2,re=1,ie=10,ae=-2,oe=e=>e===`*`;function se(e,t){let n=e.split(`/`),r=n.length;return n.some(oe)&&(r+=ae),t&&(r+=O),n.filter(e=>!oe(e)).reduce((e,t)=>e+(ee.test(t)?D:te.test(t)?ne:t===``?re:ie),r)}function ce(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function le(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?ue(u,l,s.matcher,s.compiledParams):k(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=k({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:N([a,d.pathname]),pathnameBase:ye(N([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=N([a,d.pathnameBase]))}return o}function k(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=de(e.path,e.caseSensitive,e.end);return ue(e,t,n,r)}function ue(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function de(e,t=!1,n=!0){d(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function fe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return d(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function A(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function pe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g(e):e,a;return n?(n=_e(n),a=n.startsWith(`/`)?me(n.substring(1),`/`):me(n,t)):a=t,{pathname:a,search:be(r),hash:xe(i)}}function me(e,t){let n=ve(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function j(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function he(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ge(e){let t=he(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function M(e,t,n,r=!1){let i;typeof e==`string`?i=g(e):(i={...e},u(!i.pathname||!i.pathname.includes(`?`),j(`?`,`pathname`,`search`,i)),u(!i.pathname||!i.pathname.includes(`#`),j(`#`,`pathname`,`hash`,i)),u(!i.search||!i.search.includes(`#`),j(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=pe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||d)&&(c.pathname+=`/`),c}var _e=e=>e.replace(/[\\/]{2,}/g,`/`),N=e=>_e(e.join(`/`)),ve=e=>e.replace(/\/+$/,``),ye=e=>ve(e).replace(/^\/*/,`/`),be=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,xe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Se=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ce(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function we(e){return N(e.map(e=>e.route.path).filter(Boolean))||`/`}var Te=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ee(e,t){let n=e;if(typeof n!=`string`||!i.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(Te)try{let e=new URL(window.location.href),r=a.test(n)?new URL(o(n,e.protocol)):new URL(n),i=A(r.pathname,t);r.origin===e.origin&&i!=null?n=i+r.search+r.hash:s=!0}catch{d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}var De=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(De);var Oe=[`GET`,...De];new Set(Oe);var ke=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ae(e){try{return ke.includes(new URL(e).protocol)}catch{return!1}}var P=y.createContext(null);P.displayName=`DataRouter`;var F=y.createContext(null);F.displayName=`DataRouterState`;var je=y.createContext(!1);function Me(){return y.useContext(je)}var Ne=y.createContext({isTransitioning:!1});Ne.displayName=`ViewTransition`;var Pe=y.createContext(new Map);Pe.displayName=`Fetchers`;var Fe=y.createContext(null);Fe.displayName=`Await`;var I=y.createContext(null);I.displayName=`Navigation`;var L=y.createContext(null);L.displayName=`Location`;var R=y.createContext({outlet:null,matches:[],isDataRoute:!1});R.displayName=`Route`;var z=y.createContext(null);z.displayName=`RouteError`;var Ie=`REACT_ROUTER_ERROR`,Le=`REDIRECT`,Re=`ROUTE_ERROR_RESPONSE`;function ze(e){if(e.startsWith(`${Ie}:${Le}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Be(e){if(e.startsWith(`${Ie}:${Re}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Se(t.status,t.statusText,t.data)}catch{}}function Ve(e,{relative:t}={}){u(B(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=y.useContext(I),{hash:i,pathname:a,search:o}=H(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:N([n,a])),r.createHref({pathname:s,search:o,hash:i})}function B(){return y.useContext(L)!=null}function V(){return u(B(),`useLocation() may be used only in the context of a <Router> component.`),y.useContext(L).location}var He=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ue(){let{isDataRoute:e}=y.useContext(R);return e?ct():We()}function We(){u(B(),`useNavigate() may be used only in the context of a <Router> component.`);let e=y.useContext(P),{basename:t,navigator:n}=y.useContext(I),{matches:r}=y.useContext(R),{pathname:i}=V(),a=JSON.stringify(ge(r)),o=y.useRef(!1);return y.useLayoutEffect(()=>{o.current=!0}),y.useCallback((r,s={})=>{if(d(o.current,He),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=M(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:N([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Ge=y.createContext(null);function Ke(e){let t=y.useContext(R).outlet;return y.useMemo(()=>t&&y.createElement(Ge.Provider,{value:e},t),[t,e])}function qe(){let{matches:e}=y.useContext(R);return e[e.length-1]?.params??{}}function H(e,{relative:t}={}){let{matches:n}=y.useContext(R),{pathname:r}=V(),i=JSON.stringify(ge(n));return y.useMemo(()=>M(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Je(e,t){return Ye(e,t)}function Ye(e,t,n){u(B(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=y.useContext(I),{matches:i}=y.useContext(R),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=V(),l;if(t){let e=typeof t==`string`?g(t):t;u(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let d=l.pathname||`/`,f=d;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):b(e,{pathname:f}),m=tt(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:N([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:N([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&m?y.createElement(L.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},m):m}function Xe(){let e=st(),t=Ce(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return y.createElement(y.Fragment,null,y.createElement(`h2`,null,`Unexpected Application Error!`),y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?y.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ze=y.createElement(Xe,null),Qe=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=je;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Be(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:y.createElement(R.Provider,{value:this.props.routeContext},y.createElement(z.Provider,{value:e,children:this.props.component}));return this.context?y.createElement($e,{error:e},t):t}},U=new WeakMap;function $e({children:e,error:t}){let{basename:n}=y.useContext(I);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=ze(t.digest);if(e){let r=U.get(t);if(r)throw r;let i=Ee(e.location,n),a=i.absoluteURL||i.to;if(Ae(a))throw Error(`Invalid redirect location`);if(Te&&!U.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw U.set(t,n),n}return y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function et({routeContext:e,match:t,children:n}){let r=y.useContext(P);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(R.Provider,{value:e},n)}function tt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:we(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Ze,o&&(s<0&&c===0?(ut(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?y.createElement(n.route.Component,null):n.route.element?n.route.element:e,y.createElement(et,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?y.createElement(Qe,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function W(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nt(e){let t=y.useContext(P);return u(t,W(e)),t}function G(e){let t=y.useContext(F);return u(t,W(e)),t}function rt(e){let t=y.useContext(R);return u(t,W(e)),t}function K(e){let t=rt(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function it(){return K(`useRouteId`)}function at(){let e=G(`useNavigation`);return y.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function ot(){let{matches:e,loaderData:t}=G(`useMatches`);return y.useMemo(()=>e.map(e=>S(e,t)),[e,t])}function st(){let e=y.useContext(z),t=G(`useRouteError`),n=K(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ct(){let{router:e}=nt(`useNavigate`),t=K(`useNavigate`),n=y.useRef(!1);return y.useLayoutEffect(()=>{n.current=!0}),y.useCallback(async(r,i={})=>{d(n.current,He),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var lt={};function ut(e,t,n){!t&&!lt[e]&&(lt[e]=!0,d(!1,n))}y.memo(dt);function dt({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ye(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function ft(e){return Ke(e.context)}function pt(e){u(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function mt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){u(!B(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=y.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=g(n));let{pathname:l=`/`,search:f=``,hash:p=``,state:m=null,key:h=`default`,mask:_}=n,v=y.useMemo(()=>{let e=A(l,s);return e==null?null:{location:{pathname:e,search:f,hash:p,state:m,key:h,mask:_},navigationType:r}},[s,l,f,p,m,h,r,_]);return d(v!=null,`<Router basename="${s}"> is not able to match the URL "${l}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:y.createElement(I.Provider,{value:c},y.createElement(L.Provider,{children:t,value:v}))}function ht({children:e,location:t}){return Je(q(e),t)}y.Component;function q(e,t=[]){let n=[];return y.Children.forEach(e,(e,r)=>{if(!y.isValidElement(e))return;let i=[...t,r];if(e.type===y.Fragment){n.push.apply(n,q(e.props.children,i));return}u(e.type===pt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let a=e.props;u(!a.index||!a.children,`An index route cannot have child routes.`);let o={id:a.id||i.join(`-`),caseSensitive:a.caseSensitive,element:a.element,Component:a.Component,index:a.index,path:a.path,middleware:a.middleware,loader:a.loader,action:a.action,hydrateFallbackElement:a.hydrateFallbackElement,HydrateFallback:a.HydrateFallback,errorElement:a.errorElement,ErrorBoundary:a.ErrorBoundary,shouldRevalidate:a.shouldRevalidate,handle:a.handle,lazy:a.lazy};a.children&&(o.children=q(a.children,i)),n.push(o)}),n}var J=`application/x-www-form-urlencoded`;function Y(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function gt(e){return Y(e)&&e.tagName.toLowerCase()===`button`}function _t(e){return Y(e)&&e.tagName.toLowerCase()===`form`}function vt(e){return Y(e)&&e.tagName.toLowerCase()===`input`}function yt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bt(e,t){return e.button===0&&(!t||t===`_self`)&&!yt(e)}var X=null;function xt(){if(X===null)try{new FormData(document.createElement(`form`),0),X=!1}catch{X=!0}return X}var St=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ct(e){return e!=null&&!St.has(e)?(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${J}"`),null):e}function wt(e,t){let n,r,i,a,o;if(_t(e)){let o=e.getAttribute(`action`);r=o?A(o,t):null,n=e.getAttribute(`method`)||`get`,i=Ct(e.getAttribute(`enctype`))||J,a=new FormData(e)}else if(gt(e)||vt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?A(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=Ct(e.getAttribute(`formenctype`))||Ct(o.getAttribute(`enctype`))||J,a=new FormData(o,e),!xt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Y(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=J,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function Tt(e,t){if(e===!1||e==null)throw Error(t)}var Et={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Dt=/[&><\u2028\u2029]/g;function Ot(e){return e.replace(Dt,e=>Et[e])}function kt(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname.endsWith(`/`)?n.pathname=`${n.pathname}_.${t}`:n.pathname=`${n.pathname}.${t}`,n}async function At(e,t){if(e.id in t)return t[e.id];try{let r=await n(()=>import(e.module),[]);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jt(e){return e!=null&&typeof e.page==`string`}function Mt(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Nt(e,t,n){return Rt((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await At(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Mt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Pt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ft(e,t,{includeHydrateFallback:n}={}){return It(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function It(e){return[...new Set(e)]}function Lt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Rt(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!jt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Lt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function zt(){let e=y.useContext(P);return Tt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Bt(){let e=y.useContext(F);return Tt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Z=y.createContext(void 0);Z.displayName=`FrameworkContext`;function Vt(){let e=y.useContext(Z);return Tt(e,`You must render this element inside a <HydratedRouter> element`),e}function Ht(e,t){let n=y.useContext(Z),[r,i]=y.useState(!1),[a,o]=y.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=y.useRef(null);y.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),y.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Q(s,p),onBlur:Q(c,m),onMouseEnter:Q(l,p),onMouseLeave:Q(u,m),onTouchStart:Q(d,p)}]:[a,f,{}]:[!1,f,{}]}function Q(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ut({page:e,...t}){let n=Me(),{nonce:r}=Vt(),{router:i}=zt(),a=y.useMemo(()=>b(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?y.createElement(Gt,{page:e,matches:a,...t}):y.createElement(Kt,{page:e,matches:a,...t})):null}function Wt(e){let{manifest:t,routeModules:n}=Vt(),[r,i]=y.useState([]);return y.useEffect(()=>{let r=!1;return Nt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Gt({page:e,matches:t,...n}){let r=V(),i=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=kt(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return y.createElement(y.Fragment,null,i.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Kt({page:e,matches:t,...n}){let r=V(),{manifest:i,routeModules:a}=Vt(),{loaderData:o,matches:s}=Bt(),c=y.useMemo(()=>Pt(e,t,s,i,r,`data`),[e,t,s,i,r]),l=y.useMemo(()=>Pt(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=kt(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=y.useMemo(()=>Ft(l,i),[l,i]),f=Wt(l);return y.createElement(y.Fragment,null,u.map(e=>y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>y.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>y.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function qt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Jt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Jt&&(window.__reactRouterVersion=`8.2.0`)}catch{}function Yt({basename:e,children:t,useTransitions:n,window:r}){let i=y.useRef(null);i.current??=l({window:r,v5Compat:!0});let a=i.current,[o,s]=y.useState({action:a.action,location:a.location}),c=y.useCallback(e=>{n===!1?s(e):y.startTransition(()=>s(e))},[n]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.createElement(mt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Xt({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=y.useState({action:n.action,location:n.location}),o=y.useCallback(e=>{r===!1?a(e):y.startTransition(()=>a(e))},[r]);return y.useLayoutEffect(()=>n.listen(o),[n,o]),y.createElement(mt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Xt.displayName=`unstable_HistoryRouter`;var Zt=y.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:a,replace:o,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=y.useContext(I),b=typeof u==`string`&&i.test(u),x=Ee(u,g);u=x.to;let S=Ve(u,{relative:r}),C=V(),w=null;if(s){let e=M(s,[],C.mask?C.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:N([g,e.pathname])),w=_.createHref(e)}let[T,E,ee]=Ht(n,m),te=an(u,{replace:o,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function ne(t){e&&e(t),t.defaultPrevented||te(t)}let D=!(x.isExternal||a),O=y.createElement(`a`,{...m,...ee,href:(D?w:void 0)||x.absoluteURL||S,onClick:D?ne:e,ref:qt(h,E),target:l,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?y.createElement(y.Fragment,null,O,y.createElement(Ut,{page:S})):O});Zt.displayName=`Link`;var Qt=y.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=H(a,{relative:c.relative}),d=V(),f=y.useContext(F),{navigator:p,basename:m}=y.useContext(I),h=f!=null&&mn(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=A(v,m)||v);let b=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,x=_===g||!r&&_.startsWith(g)&&_.charAt(b)===`/`,S=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),C={isActive:x,isPending:S,isTransitioning:h},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return y.createElement(Zt,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});Qt.displayName=`NavLink`;var $t=y.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:o,method:s=`get`,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=y.useContext(I),_=cn(),v=ln(c,{relative:u}),b=s.toLowerCase()===`get`?`get`:`post`,x=typeof c==`string`&&i.test(c);return y.createElement(`form`,{ref:h,method:b,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute(`formmethod`)||s,c=()=>_(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?y.startTransition(()=>c()):c()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});$t.displayName=`Form`;function en({getKey:e,storageKey:t,...n}){let r=y.useContext(Z),{basename:i}=y.useContext(I),a=V(),o=ot();fn({getKey:e,storageKey:t});let s=y.useMemo(()=>{if(!r||!e)return null;let t=dn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),y.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Ot(JSON.stringify(t||un))}, ${Ot(JSON.stringify(s))})`}})}en.displayName=`ScrollRestoration`;function tn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nn(e){let t=y.useContext(P);return u(t,tn(e)),t}function rn(e){let t=y.useContext(F);return u(t,tn(e)),t}function an(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=Ue(),d=V(),f=H(e,{relative:o});return y.useCallback(p=>{if(bt(p,t)){p.preventDefault();let t=n===void 0?h(d)===h(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?y.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}var on=0,sn=()=>`__${String(++on)}__`;function cn(){let{router:e}=nn(`useSubmit`),{basename:t}=y.useContext(I),n=it(),r=e.fetch,i=e.navigate;return y.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=wt(e,t);a.navigate===!1?await r(a.fetcherKey||sn(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function ln(e,{relative:t}={}){let{basename:n}=y.useContext(I),r=y.useContext(R);u(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...H(e||`.`,{relative:t})},o=V();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:N([n,a.pathname])),h(a)}var un=`react-router-scroll-positions`,$={};function dn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:A(e.pathname,n)||e.pathname},t)),i??=e.key,i}function fn({getKey:e,storageKey:t}={}){let{router:n}=nn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=rn(`useScrollRestoration`),{basename:a}=y.useContext(I),o=V(),s=ot(),c=at();y.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),pn(y.useCallback(()=>{if(c.state===`idle`){let t=dn(o,s,a,e);$[t]=window.scrollY}try{sessionStorage.setItem(t||un,JSON.stringify($))}catch(e){d(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(y.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||un);e&&($=JSON.parse(e))}catch{}},[t]),y.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($,()=>window.scrollY,e?(t,n)=>dn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),y.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{d(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function pn(e,t){let{capture:n}=t||{};y.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function mn(e,{relative:t}={}){let n=y.useContext(Ne);u(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=nn(`useViewTransitionState`),i=H(e,{relative:t});if(!n.isTransitioning)return!1;let a=A(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=A(n.nextLocation.pathname,r)||n.nextLocation.pathname;return k(i.pathname,o)!=null||k(i.pathname,a)!=null}var hn=r(`corner-left-up`,[[`path`,{d:`M14 9 9 4 4 9`,key:`1af5af`}],[`path`,{d:`M20 20h-7a4 4 0 0 1-4-4V4`,key:`1blwi3`}]]),gn=r(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),_n=r(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]);function vn(e){return e.trim().slice(0,5).toUpperCase()}function yn(e){return e.abbrev??vn(e.name)}function bn(e){return e.trim().toUpperCase().slice(0,5)}export{gn as a,Zt as c,ht as d,V as f,_n as i,ft as l,qe as m,bn as n,hn as o,Ue as p,yn as r,Yt as s,vn as t,pt as u};
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-_wZywoZs.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-BPZm7Aec.js";import{t as h}from"./linear-B7l8qgEw.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[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],c=[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],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:e(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:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},t(s,[2,33],{29:10}),t(c,[2,61]),t(c,[2,62]),t(c,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(s,[2,34]),{27:46,55:i,56:a,57:o},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(l,[2,45]),t(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},t(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),t(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),t(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},t(V,[2,23]),t(V,[2,1]),t(V,[2,2]),t(V,[2,3]),t(V,[2,4]),t(V,[2,5]),t(V,[2,6]),t(V,[2,7]),t(V,[2,8]),t(V,[2,9]),t(V,[2,10]),t(V,[2,11]),t(V,[2,12]),t(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},t(V,[2,24]),t(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},t(l,[2,29],{10:fe}),t(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),t(Q,[2,25]),t(Q,[2,13]),t(Q,[2,14]),t(Q,[2,15]),t(Q,[2,16]),t(Q,[2,17]),t(Q,[2,18]),t(Q,[2,19]),t(Q,[2,20]),t(Q,[2,21]),t(Q,[2,22]),t(l,[2,49],{10:fe}),t(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},t(Q,[2,26]),t(l,[2,50],{10:fe}),t(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-_wZywoZs.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-DU6HZSFF-DU6gnSTi.js";import{t as h}from"./linear-B7l8qgEw.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[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],c=[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],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:e(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:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},t(s,[2,33],{29:10}),t(c,[2,61]),t(c,[2,62]),t(c,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(s,[2,34]),{27:46,55:i,56:a,57:o},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(l,[2,45]),t(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},t(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),t(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),t(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},t(V,[2,23]),t(V,[2,1]),t(V,[2,2]),t(V,[2,3]),t(V,[2,4]),t(V,[2,5]),t(V,[2,6]),t(V,[2,7]),t(V,[2,8]),t(V,[2,9]),t(V,[2,10]),t(V,[2,11]),t(V,[2,12]),t(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},t(V,[2,24]),t(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},t(l,[2,29],{10:fe}),t(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),t(Q,[2,25]),t(Q,[2,13]),t(Q,[2,14]),t(Q,[2,15]),t(Q,[2,16]),t(Q,[2,17]),t(Q,[2,18]),t(Q,[2,19]),t(Q,[2,20]),t(Q,[2,21]),t(Q,[2,22]),t(l,[2,49],{10:fe}),t(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},t(Q,[2,26]),t(l,[2,50],{10:fe}),t(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};me.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(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:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1 +1 @@
1
- import"./chunk-FOHPRMQF-CdD2_EOh.js";import{v as e}from"./mermaid-parser.core-DjudYqc1.js";export{e as createRadarServices};
1
+ import"./chunk-FOHPRMQF-CdD2_EOh.js";import{v as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createRadarServices};
@@ -1 +1 @@
1
- import"./chunk-FOHPRMQF-CdD2_EOh.js";import{g as e}from"./mermaid-parser.core-DjudYqc1.js";export{e as createRailroadServices};
1
+ import"./chunk-FOHPRMQF-CdD2_EOh.js";import{g as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createRailroadServices};
@@ -0,0 +1 @@
1
+ import"./chunk-FOHPRMQF-CdD2_EOh.js";import{m as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createRailroadAbnfServices};
@@ -0,0 +1 @@
1
+ import"./chunk-FOHPRMQF-CdD2_EOh.js";import{f as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createRailroadEbnfServices};
@@ -0,0 +1 @@
1
+ import"./chunk-FOHPRMQF-CdD2_EOh.js";import{u as e}from"./mermaid-parser.core-BDA8Oa7i.js";export{e as createRailroadPegServices};
@@ -1 +1 @@
1
- import{g as e,t}from"./mermaid-parser.core-DjudYqc1.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-BPZm7Aec.js";import"./chunk-CLGD4ZFX-Daexln-J.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-sgjgeRKG.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=e().Railroad.parser.LangiumParser,l=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`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(u(e)))},`populateDb`),f={parser:{parse:n(e=>{o.clear(),r.debug(`[Railroad Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[Railroad Parser] Parsed rules:`,i.rules.length),d(i),r.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{f as diagram};
1
+ import{g as e,t}from"./mermaid-parser.core-BDA8Oa7i.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r}from"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-DU6gnSTi.js";import"./chunk-CLGD4ZFX-I3haxkb8.js";import{n as i,r as a,t as o}from"./chunk-SVP7TREG-es_cu5SS.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";var c=e().Railroad.parser.LangiumParser,l=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`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(u(e)))},`populateDb`),f={parser:{parse:n(e=>{o.clear(),r.debug(`[Railroad Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[Railroad Parser] Parsed rules:`,i.rules.length),d(i),r.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{f as diagram};
@@ -1,4 +1,4 @@
1
- import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-BPZm7Aec.js";import{g as f}from"./chunk-75Z2AOVW-CjKKRNBO.js";import"./chunk-PWAF6VOD-Cait0vBS.js";import"./chunk-GMAD6QVW-Cj2ISoJT.js";import"./chunk-P2QGCYS3-DChPIjch.js";import"./chunk-4HAMMTFA-isaSrXBl.js";import"./chunk-GVQU2GXP-B1MLdPUq.js";import"./chunk-OSK3NFVY-C1_C6p7q.js";import{t as p}from"./chunk-XXDRQBXY-BuE3VzE_.js";import{t as m}from"./chunk-POPQ4Y6H-CnJnbyG8.js";import"./chunk-L3NEJ4N5-BKN2lh_0.js";import{r as h,t as g}from"./chunk-TLUHSLCS-CJQbxTzh.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[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],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[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],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[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],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(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:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{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]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[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]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{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]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{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]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[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:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-DU6gnSTi.js";import{g as f}from"./chunk-75Z2AOVW-b-3efKur.js";import"./chunk-PWAF6VOD--PrNfcDv.js";import"./chunk-GMAD6QVW-BgNxh1Wg.js";import"./chunk-P2QGCYS3-VniWvIJd.js";import"./chunk-4HAMMTFA-DDQ7TZvS.js";import"./chunk-GVQU2GXP-CNaIDciQ.js";import"./chunk-OSK3NFVY-SdTDzoMy.js";import{t as p}from"./chunk-XXDRQBXY-BuE3VzE_.js";import{t as m}from"./chunk-POPQ4Y6H-BUjB1fDF.js";import"./chunk-L3NEJ4N5-59iBItHO.js";import{r as h,t as g}from"./chunk-TLUHSLCS-CivtNrZW.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[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],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[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],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[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],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(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:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{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]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[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]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{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]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{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]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[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:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(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:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-_wZywoZs.js";import{H as n,J as r,K as i,U as a,a as o,d as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-BPZm7Aec.js";import{t as p}from"./ordinal-hYBb2elL.js";function m(e){for(var t=e.length/6|0,n=Array(t),r=0;r<t;)n[r]=`#`+e.slice(r*6,++r*6);return n}var h=m(`4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab`);function g(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function _(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function v(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function y(e){return e.target.depth}function b(e){return e.depth}function x(e,t){return t-1-e.height}function S(e,t){return e.sourceLinks.length?e.depth:t-1}function C(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?_(e.sourceLinks,y)-1:0}function w(e){return function(){return e}}function T(e,t){return D(e.source,t.source)||e.index-t.index}function E(e,t){return D(e.target,t.target)||e.index-t.index}function D(e,t){return e.y0-t.y0}function O(e){return e.value}function k(e){return e.index}function A(e){return e.nodes}function j(e){return e.links}function M(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function N({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function P(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=k,c=S,l,u,d=A,f=j,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),y(e),b(e),x(e),F(e),N(e),e}m.update=function(e){return N(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:w(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:w(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:w(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:w(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=M(n,t)),typeof i!=`object`&&(i=r.target=M(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function y({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(v(t.sourceLinks,O),v(t.targetLinks,O)):t.fixedValue}function b({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function x({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function C({nodes:t}){let r=g(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function P(e){let n=_(e,e=>(r-t-(e.length-1)*o)/v(e,O));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;t<i.length;++t){let n=i[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}H(i)}}function F(e){let n=C(e);o=Math.min(a,(r-t)/(g(n,e=>e.length)-1)),P(n);for(let e=0;e<p;++e){let t=.99**e,r=Math.max(1-t,(e+1)/p);L(n,t,r),I(n,t,r)}}function I(e,t,n){for(let r=1,i=e.length;r<i;++r){let i=e[r];for(let e of i){let n=0,r=0;for(let{source:t,value:i}of e.targetLinks){let a=i*(e.layer-t.layer);n+=U(t,e)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function L(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=W(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function R(e,n){let i=e.length>>1,a=e[i];B(e,a.y0-o,i-1,n),z(e,a.y1+o,i+1,n),B(e,r,e.length-1,n),z(e,t,0,n)}function z(e,t,n,r){for(;n<e.length;++n){let i=e[n],a=(t-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function B(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function V({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(E);for(let{target:{targetLinks:t}}of e)t.sort(T)}}function H(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(E),n.sort(T)}function U(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function W(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var F=Math.PI,I=2*F,L=1e-6,R=I-L;function z(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function B(){return new z}z.prototype=B.prototype={constructor:z,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>L)if(!(Math.abs(u*s-c*l)>L)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((F-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>L&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>L||Math.abs(this._y1-l)>L)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%I+I),d>R?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>L&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=F)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function V(e){return function(){return e}}function H(e){return e[0]}function U(e){return e[1]}var W=Array.prototype.slice;function G(e){return e.source}function ee(e){return e.target}function te(e){var t=G,n=ee,r=H,i=U,a=null;function o(){var o,s=W.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=B(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:V(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:V(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function ne(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function re(){return te(ne)}function ie(e){return[e.source.x1,e.y0]}function ae(e){return[e.target.x0,e.y1]}function K(){return re().source(ie).target(ae)}var q=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,9],r=[1,10],i=[1,5,10,12],a={trace:e(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:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-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:n,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-_wZywoZs.js";import{H as n,J as r,K as i,U as a,a as o,d as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-DU6HZSFF-DU6gnSTi.js";import{t as p}from"./ordinal-hYBb2elL.js";function m(e){for(var t=e.length/6|0,n=Array(t),r=0;r<t;)n[r]=`#`+e.slice(r*6,++r*6);return n}var h=m(`4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab`);function g(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function _(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function v(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function y(e){return e.target.depth}function b(e){return e.depth}function x(e,t){return t-1-e.height}function S(e,t){return e.sourceLinks.length?e.depth:t-1}function C(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?_(e.sourceLinks,y)-1:0}function w(e){return function(){return e}}function T(e,t){return D(e.source,t.source)||e.index-t.index}function E(e,t){return D(e.target,t.target)||e.index-t.index}function D(e,t){return e.y0-t.y0}function O(e){return e.value}function k(e){return e.index}function A(e){return e.nodes}function j(e){return e.links}function M(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function N({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function P(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=k,c=S,l,u,d=A,f=j,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),y(e),b(e),x(e),F(e),N(e),e}m.update=function(e){return N(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:w(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:w(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:w(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:w(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=M(n,t)),typeof i!=`object`&&(i=r.target=M(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function y({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(v(t.sourceLinks,O),v(t.targetLinks,O)):t.fixedValue}function b({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function x({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function C({nodes:t}){let r=g(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function P(e){let n=_(e,e=>(r-t-(e.length-1)*o)/v(e,O));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;t<i.length;++t){let n=i[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}H(i)}}function F(e){let n=C(e);o=Math.min(a,(r-t)/(g(n,e=>e.length)-1)),P(n);for(let e=0;e<p;++e){let t=.99**e,r=Math.max(1-t,(e+1)/p);L(n,t,r),I(n,t,r)}}function I(e,t,n){for(let r=1,i=e.length;r<i;++r){let i=e[r];for(let e of i){let n=0,r=0;for(let{source:t,value:i}of e.targetLinks){let a=i*(e.layer-t.layer);n+=U(t,e)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function L(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=W(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function R(e,n){let i=e.length>>1,a=e[i];B(e,a.y0-o,i-1,n),z(e,a.y1+o,i+1,n),B(e,r,e.length-1,n),z(e,t,0,n)}function z(e,t,n,r){for(;n<e.length;++n){let i=e[n],a=(t-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function B(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function V({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(E);for(let{target:{targetLinks:t}}of e)t.sort(T)}}function H(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(E),n.sort(T)}function U(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function W(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var F=Math.PI,I=2*F,L=1e-6,R=I-L;function z(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function B(){return new z}z.prototype=B.prototype={constructor:z,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>L)if(!(Math.abs(u*s-c*l)>L)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((F-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>L&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>L||Math.abs(this._y1-l)>L)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%I+I),d>R?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>L&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=F)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function V(e){return function(){return e}}function H(e){return e[0]}function U(e){return e[1]}var W=Array.prototype.slice;function G(e){return e.source}function ee(e){return e.target}function te(e){var t=G,n=ee,r=H,i=U,a=null;function o(){var o,s=W.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=B(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:V(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:V(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function ne(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function re(){return te(ne)}function ie(e){return[e.source.x1,e.y0]}function ae(e){return[e.target.x0,e.y1]}function K(){return re().source(ie).target(ae)}var q=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,9],r=[1,10],i=[1,5,10,12],a={trace:e(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:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-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:n,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};a.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||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:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(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:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=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),n.length-1&&(this.yylineno-=n.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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(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:e(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:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{t as e}from"./view-state-store-BYX2FoUu.js";var t=new e;function n(e,n,r,i=()=>!0){let a=t.get(r),o=-1,s=-1,c=()=>({height:Math.max(0,e.scrollHeight-e.clientHeight),width:Math.max(0,e.scrollWidth-e.clientWidth)}),l=()=>{!i()||!e.clientHeight||!e.clientWidth||({height:o,width:s}=c(),a&&(e.scrollTop=a.height?a.top/a.height*o:0,e.scrollLeft=a.width?a.left/a.width*s:0))},u=()=>{if(!i()||!e.clientHeight||!e.clientWidth)return;let n=c();({height:o,width:s}=n),a={top:e.scrollTop,left:e.scrollLeft,...n},t.set(r,a)},d=()=>{if(!i()||!e.clientHeight||!e.clientWidth)return;let t=c();if(t.height!==o||t.width!==s){l();return}u()};l(),e.addEventListener(`scroll`,d,{passive:!0});let f=new ResizeObserver(l);f.observe(e),f.observe(n);let p=new MutationObserver(l);return p.observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-scroll-ready`]}),{capture:u,dispose:()=>{d(),e.removeEventListener(`scroll`,d),f.disconnect(),p.disconnect()}}}export{n as t};
1
+ import{t as e}from"./view-state-store-DC0jfhBX.js";var t=new e;function n(e,n,r,i=()=>!0){let a=t.get(r),o=-1,s=-1,c=()=>({height:Math.max(0,e.scrollHeight-e.clientHeight),width:Math.max(0,e.scrollWidth-e.clientWidth)}),l=()=>{!i()||!e.clientHeight||!e.clientWidth||({height:o,width:s}=c(),a&&(e.scrollTop=a.height?a.top/a.height*o:0,e.scrollLeft=a.width?a.left/a.width*s:0))},u=()=>{if(!i()||!e.clientHeight||!e.clientWidth)return;let n=c();({height:o,width:s}=n),a={top:e.scrollTop,left:e.scrollLeft,...n},t.set(r,a)},d=()=>{if(!i()||!e.clientHeight||!e.clientWidth)return;let t=c();if(t.height!==o||t.width!==s){l();return}u()};l(),e.addEventListener(`scroll`,d,{passive:!0});let f=new ResizeObserver(l);f.observe(e),f.observe(n);let p=new MutationObserver(l);return p.observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-scroll-ready`]}),{capture:u,dispose:()=>{d(),e.removeEventListener(`scroll`,d),f.disconnect(),p.disconnect()}}}export{n as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{$ as n,A as r,C as i,R as a,S as o,et as s,n as c,p as l,w as u,x as d,z as f}from"./index-CHQCnqBC.js";import{i as p,n as m}from"./dist-BtWbkq62.js";import{t as h}from"./button-CX27Pdc8.js";import{t as g}from"./x-CZCUod6A.js";import{t as _}from"./createLucideIcon-DyMAgLa3.js";import{t as v}from"./copy-CGsu8426.js";import{t as y}from"./ws-BJBexI14.js";var b=_(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),ee=_(`clipboard-paste`,[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]),te=_(`regex`,[[`path`,{d:`M17 3v10`,key:`15fgeh`}],[`path`,{d:`m12.67 5.5 8.66 5`,key:`1gpheq`}],[`path`,{d:`m12.67 10.5 8.66-5`,key:`1dkfa6`}],[`path`,{d:`M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z`,key:`swwfx4`}]]),x=_(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]);function ne(){return l.get()}var re=a.options.join(`,`),S=i.imageBytes,ie=20*1024*1024;async function ae(e,t,n){n?.throwIfAborted();let r=a.safeParse(e.type);if(!r.success)throw Error(`Choose a PNG, JPEG, GIF or WebP image.`);if(e.size===0)throw Error(`This image is empty.`);if(e.size>ie)throw Error(`Choose an image smaller than 20 MiB.`);if(!t||e.size<=S)return{blob:e,mime:r.data,resized:!1};if(r.data===`image/gif`)throw Error(`Choose a GIF no larger than 4 MiB for remote access.`);let i=await createImageBitmap(e);try{n?.throwIfAborted();let e=document.createElement(`canvas`),t=e.getContext(`2d`);if(!t)throw Error(`Could not prepare this image.`);let o=r.data===`image/jpeg`?`image/jpeg`:`image/webp`,s=Math.min(1,2048/Math.max(i.width,i.height));for(let r=0;r<8;r++){e.width=Math.max(1,Math.round(i.width*s)),e.height=Math.max(1,Math.round(i.height*s)),t.drawImage(i,0,0,e.width,e.height);for(let t of[.85,.7,.55]){let r=await new Promise(n=>e.toBlob(n,o,t));if(n?.throwIfAborted(),r&&r.size<=S)return{blob:r,mime:a.parse(r.type),resized:!0}}s*=.75}throw Error(`This image is too large to attach remotely. Choose a smaller image.`)}finally{i.close()}}var C=new WeakSet,oe=Math.floor((r.requestBytes-1024)*3/4);async function se(e,t,r,a,o,c,l){let d=e.generation,p=()=>{if(c?.throwIfAborted(),o(),e.generation!==d)throw Error(`The connection changed; the image upload was interrupted.`)};if(p(),!r.size||r.size>i.imageBytes)throw Error(`The prepared image must be no larger than 4 MiB.`);if(C.has(e))throw Error(`An image upload is already in progress.`);C.add(e);let m=crypto.randomUUID(),h=`/api/worktrees/${t}/paste-upload`,g=!1,_=!1,v=async(t,n,r)=>{p();let i=await e.request(t,n,r,c),a=await i.json();if(p(),!i.ok){let e=s.safeParse(a);throw Error(e.success?e.data.error.message:`The image upload failed.`)}return a},y=e=>v(`POST`,h,e),b=async e=>{let t=new Uint8Array(await e.arrayBuffer());return p(),btoa(Array.from(t,e=>String.fromCharCode(e)).join(``))};try{let e=n.parse(await v(`GET`,`/api/version`));if(l?.(0,r.size),!e.remote_image_uploads){if(r.size>oe)throw Error(`Update the host connector to upload images larger than 191 KiB.`);let e=await b(r),n=f.parse(await v(`POST`,`/api/worktrees/${t}/paste`,{mime:a,data:e}));return l?.(r.size,r.size),n}if(g=!0,u.parse(await y({action:`start`,upload:m,mime:a,size:r.size})).received!==0)throw Error(`Invalid image upload acknowledgement.`);for(let e=0;e<r.size;e+=i.chunkBytes){let t=r.slice(e,e+i.chunkBytes),n=await b(t),a=u.parse(await y({action:`chunk`,upload:m,offset:e,data:n}));if(a.received!==e+t.size)throw Error(`Invalid image upload acknowledgement.`);l?.(a.received,r.size)}let o=f.parse(await y({action:`finish`,upload:m}));return _=!0,o}finally{if(g&&!_&&e.generation===d)try{o(),e.request(`POST`,h,{action:`cancel`,upload:m}).catch(()=>{})}catch{}C.delete(e)}}function w(e,t,n){if(t.startsWith(`login-`)||t===`home`)return!1;let r=Array.from(e.clipboardData?.items??[]);if(r.some(e=>e.type===`text/plain`))return!1;let i=r.find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!i)return!1;let a=i.getAsFile();return a?(T(a,t,n).then(({resized:e})=>{e&&m(`Image resized for remote access`)}).catch(e=>{m.error(e instanceof Error?`Image paste failed: ${e.message}`:`Image paste failed`)}),!0):!1}async function T(e,t,n,r={}){if(t.startsWith(`login-`)||t===`home`)throw Error(`Open a project terminal to attach an image.`);let i=o(),a=i?.generation,s=()=>{if(o()!==i||i?.generation!==a||!y.isConnected())throw Error(`The terminal connection changed; the image was not inserted.`)};r.signal?.throwIfAborted(),s(),r.onProgress?.({stage:`preparing`});let{blob:c,mime:l,resized:u}=await ae(e,i!==null,r.signal);s();let d=i?await se(i,t,c,l,s,r.signal,(e,t)=>r.onProgress?.(e===t?{stage:`saving`}:{stage:`uploading`,received:e,total:t})):await(async()=>{let e=await E(c);return s(),r.signal?.throwIfAborted(),f.parse(await p(`POST`,`/api/worktrees/${t}/paste`,{mime:l,data:e}))})();return r.signal?.throwIfAborted(),s(),r.onProgress?.({stage:`inserting`}),r.insert?r.insert(`${d.path} `):i?await i.input(t,n,`${d.path} `):y.write(t,n,`${d.path} `),{resized:u}}function E(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^,]*,/,``)),r.onerror=()=>n(r.error??Error(`could not read the clipboard image`)),r.readAsDataURL(e)})}var D=/(?:^|[\s"'`([<])((?:(?:\/|\.{1,2}\/|~\/)(?:[\w.+@~-]+\/)*[\w.+@~-]+|(?:[\w.+@~-]+\/)+[\w.+@~-]*|[\w.+@~-]+\.[A-Za-z]\w{0,11}))(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,O=new Set([`.`,`,`,`;`,`:`,`)`,`]`,`'`,`"`]);function k(e){let t=[],n=new RegExp(D.source,D.flags),r;for(;r=n.exec(e);){let e=r.indices,n=r[1];if(!e?.[1]||n===void 0)continue;let i=e[1][0],a=e[1][1],o=n;for(o.startsWith(`@`)&&(o=o.slice(1),i++);o.length>0&&O.has(o[o.length-1]);)o=o.slice(0,-1),a--;if(o.length===0)continue;let s=r[2]===void 0?void 0:Number.parseInt(r[2],10),c=r[3]===void 0?void 0:Number.parseInt(r[3],10),l=c!==void 0&&e[3]?e[3][1]:s!==void 0&&e[2]?e[2][1]:a;t.push({path:o,line:s,column:c,start:i,end:l})}return t}var A=32,ce=2048;function le(e,t,n){let r=e.getLine(t);if(!r)return null;let i=e.getNullCell(),a=``,o=[];for(let s=0;s<Math.min(n,r.length);s++){if(!r.getCell(s,i)||i.getWidth()===0)continue;if(s===n-1&&i.getChars()===``){let n=e.getLine(t+1);if(n?.isWrapped&&n.getCell(0)?.getWidth()===2)continue}let c=i.getChars()||` `;a+=c;for(let e=0;e<c.length;e++)o.push({row:t,col:s})}return{text:a,cells:o,isWrapped:r.isWrapped}}function ue(e,t,n){return{...e,text:e.text.slice(t,n),cells:e.cells.slice(t,n)}}function j(e,t,n){let r=e.text.trimEnd(),i=t.text.trimStart();if(!/[\w.+@~/:-]$/.test(r)||!/^[\w.+@~:-]/.test(i)||/^(?:~\/|\.{1,2}\/)/.test(i))return!1;let a=e.cells[r.length-1];return r.endsWith(`/`)||a!==void 0&&a.col>=n-9}function M(e,t,n){if(t<0||n<1)return[];let r=Math.max(0,t-A+1),i=new Map;for(let a=r;a<t+A;a++){let t=le(e,a,n);if(!t)break;i.set(a,t)}let a=new Set,o=[];for(let e of[!0,!1])for(let s=r;s<=t;s++){if(i.get(s)?.isWrapped&&s>r)continue;let c=``,l=[];for(let r=s;r<s+A;r++){let u=i.get(r);if(!u)break;let d=i.get(r-1);if(r>s&&!u.isWrapped&&!(e&&d&&j(d,u,n)))break;let f=i.get(r+1),p=ue(u,r>s&&!u.isWrapped?u.text.length-u.text.trimStart().length:0,f?.isWrapped?u.text.length:u.text.trimEnd().length);if(c.length+p.text.length>ce)break;if(c+=p.text,l.push(...p.cells),!(r<t))for(let e of k(c)){let n=l[e.start],r=l[e.end-1];if(!n||!r||n.row>t||r.row<t)continue;let i=`${e.path}\0${e.line??``}\0${e.column??``}\0${n.row}:${n.col}-${r.row}:${r.col}`;a.has(i)||(a.add(i),o.push({candidate:e,start:n,end:r,text:c.slice(e.start,e.end)}))}}}return o.sort((e,t)=>t.text.length-e.text.length)}function N(e,t){return e.kind===`file`&&e.root!==void 0&&e.root!==t?e.root:null}var P=class{fetcher;now;positiveTtlMs;negativeTtlMs;maxEntries;maxConcurrent;entries=new Map;inflight=new Map;inUse=0;waiters=[];constructor(e){this.fetcher=e.fetcher,this.now=e.now??Date.now,this.positiveTtlMs=e.positiveTtlMs??15e3,this.negativeTtlMs=e.negativeTtlMs??5e3,this.maxEntries=e.maxEntries??500,this.maxConcurrent=e.maxConcurrent??4}resolve(e,t,n){let r=`${e}\0${t}`,i=this.entries.get(r);if(i){if(this.now()<i.expiresAt)return Promise.resolve(i.value);this.entries.delete(r)}let a=this.inflight.get(r);if(a)return a;let o=this.withSlot(()=>this.fetcher(e,t,n)).then(e=>(this.store(r,e),e)).finally(()=>{this.inflight.delete(r)});return this.inflight.set(r,o),o}store(e,t){let n=t?this.positiveTtlMs:this.negativeTtlMs;for(this.entries.set(e,{value:t,expiresAt:this.now()+n});this.entries.size>this.maxEntries;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}async withSlot(e){this.inUse>=this.maxConcurrent&&await new Promise(e=>this.waiters.push(e)),this.inUse++;try{return await e()}finally{this.inUse--,this.waiters.shift()?.()}}};async function F(e,t,n,r){let i=new URLSearchParams({path:t});return n!==void 0&&i.set(`line`,String(n)),r!==void 0&&i.set(`root`,r),p(`GET`,`/api/worktrees/${e}/resolve?${i}`)}function I(e,t,n){let r=e.kind??`file`;return{kind:r,path:e.path,...e.root===void 0?{}:{root:e.root},...e.relative_path===void 0?{}:{relativePath:e.relative_path},...r===`file`&&t!==void 0?{line:Math.max(1,t)}:{},...r===`file`&&n!==void 0?{column:n}:{}}}async function L(e,t,n){return I(await F(e,t,n?.line,n?.root),n?.line,n?.column)}async function R(e,t,n){try{return await F(e,t,n)}catch{return null}}function z(e,t,n){let r=new P({fetcher:R});return e.registerLinkProvider({provideLinks(i,a){let o=e.buffer.active,s=M(o,i-1,e.cols);if(s.length===0){a(void 0);return}Promise.all(s.map(async({candidate:e,start:i,end:a,text:o})=>{let s=await r.resolve(t,e.path,e.line);return s?{range:{start:{x:i.col+1,y:i.row+1},end:{x:a.col+1,y:a.row+1}},text:o,decorations:{underline:!0,pointerCursor:!0},activate:t=>{!t.metaKey&&!t.ctrlKey||n(I(s,e.line,e.column))}}:null})).then(e=>{let t=e.filter(e=>e!==null);a(t.length>0?t:void 0)})}})}var B=e(t(),1);function V(e,t){let n=(t&1)!=0,r=(t&2)!=0;if(H(e))return t?`\x1b[1;${1+(r?2:0)+(n?4:0)}${e.slice(-1)}`:e;if(n&&e.length===1){let t=e.toUpperCase().charCodeAt(0);t>=64&&t<=95?e=String.fromCharCode(t-64):e===` `?e=`\0`:e===`?`&&(e=``)}return r?`\x1b${e}`:e}function H(e){return e.length===3&&e.startsWith(`\x1B[`)&&`ABCD`.includes(e[2])}var U=new Map,W=new Map,G=new Map,K=new Set,q=e=>(K.add(e),()=>{K.delete(e)}),J=()=>{for(let e of K)e()},Y=(e,t)=>d(JSON.stringify([e,t]));function de(e,t){return(0,B.useSyncExternalStore)(q,()=>U.has(Y(e,t)))}function fe(e,t,n,r){let i=Y(e,t);return U.set(i,n),r&&W.set(i,r),J(),()=>{U.get(i)===n&&(U.delete(i),W.delete(i),G.delete(i),J())}}function X(e,t){W.get(Y(e,t))?.()}function pe(e,t){return(0,B.useSyncExternalStore)(q,()=>G.get(Y(e,t))??0)}function me(e,t,n){let r=Y(e,t);G.set(r,(G.get(r)??0)^n),J()}function Z(e,t,n){let r=Y(e,t),i=G.get(r)??0;return!i||n.startsWith(`\x1B`)&&!H(n)?n:(G.delete(r),J(),V(n,i))}async function he(e,t,n,r=!1){let i=U.get(Y(e,t));if(!i)throw Error(`Wait for the terminal to attach; nothing was sent`);await Q(e,t,r?`${i(n)}\r`:Z(e,t,n))}async function ge(e,t,n){let r=Y(e,t),i=U.get(r),a=o(),s=a?.generation;if(!i||!n()||!y.isConnected())throw Error(`Wait for the terminal to attach; nothing was pasted.`);let c;try{let n=navigator.clipboard.readText();X(e,t),c=await n}catch{throw Error(`Could not read the clipboard. Allow clipboard access or use your keyboard’s Paste action.`)}if(!n()||U.get(r)!==i||o()!==a||a?.generation!==s||!y.isConnected())throw Error(`The terminal changed; nothing was pasted. Try again in the active terminal.`);c&&await Q(e,t,i(c))}async function Q(e,t,n){let r=o();if(r)await r.input(e,t,n);else{if(!y.isConnected())throw Error(`Terminal is disconnected; nothing was sent`);y.write(e,t,n)}}var $=c();function _e({text:e,label:t,clear:n,paste:r}){let[i,a]=(0,B.useState)(!1);return(0,$.jsxs)(`div`,{role:`toolbar`,"aria-label":t,onPointerDown:e=>e.preventDefault(),className:`absolute right-2 top-2 z-20 flex gap-1 rounded-md bg-elevated p-1 shadow-lg`,children:[(0,$.jsxs)(h,{variant:`ghost`,size:`sm`,disabled:!e||i,onClick:async()=>{try{await navigator.clipboard.writeText(e),n()}catch{m.error(`Could not copy the selection. Try again.`)}},children:[(0,$.jsx)(v,{}),` Copy`]}),r&&(0,$.jsxs)(h,{variant:`ghost`,size:`sm`,disabled:i,onClick:async()=>{if(!i){a(!0);try{await r(),n()}catch(e){m.error(e instanceof Error?e.message:`Could not paste. Try again.`)}finally{a(!1)}}},children:[(0,$.jsx)(ee,{}),` Paste`]}),(0,$.jsx)(h,{variant:`ghost`,size:`icon`,"aria-label":`Clear selection`,disabled:i,onClick:n,children:(0,$.jsx)(g,{})})]})}export{x as _,fe as a,de as c,z as d,L as f,ne as g,re as h,ge as i,pe as l,T as m,Z as n,he as o,w as p,X as r,me as s,_e as t,N as u,te as v,b as y};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{$ as n,A as r,C as i,R as a,S as o,et as s,n as c,p as l,w as u,x as d,z as f}from"./index-BuCcWx9p.js";import{i as p,n as m}from"./dist-B1yD4sI3.js";import{t as h}from"./button-C2U4JLSJ.js";import{t as g}from"./x-CZCUod6A.js";import{t as _}from"./createLucideIcon-DyMAgLa3.js";import{t as v}from"./copy-CGsu8426.js";import{t as y}from"./ws-ffUcAuKj.js";var b=_(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),ee=_(`clipboard-paste`,[[`path`,{d:`M11 14h10`,key:`1w8e9d`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v1.344`,key:`1e62lh`}],[`path`,{d:`m17 18 4-4-4-4`,key:`z2g111`}],[`path`,{d:`M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113`,key:`bjbb7m`}],[`rect`,{x:`8`,y:`2`,width:`8`,height:`4`,rx:`1`,key:`ublpy`}]]),te=_(`regex`,[[`path`,{d:`M17 3v10`,key:`15fgeh`}],[`path`,{d:`m12.67 5.5 8.66 5`,key:`1gpheq`}],[`path`,{d:`m12.67 10.5 8.66-5`,key:`1dkfa6`}],[`path`,{d:`M9 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-2z`,key:`swwfx4`}]]),x=_(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]);function ne(){return l.get()}var re=a.options.join(`,`),S=i.imageBytes,ie=20*1024*1024;async function ae(e,t,n){n?.throwIfAborted();let r=a.safeParse(e.type);if(!r.success)throw Error(`Choose a PNG, JPEG, GIF or WebP image.`);if(e.size===0)throw Error(`This image is empty.`);if(e.size>ie)throw Error(`Choose an image smaller than 20 MiB.`);if(!t||e.size<=S)return{blob:e,mime:r.data,resized:!1};if(r.data===`image/gif`)throw Error(`Choose a GIF no larger than 4 MiB for remote access.`);let i=await createImageBitmap(e);try{n?.throwIfAborted();let e=document.createElement(`canvas`),t=e.getContext(`2d`);if(!t)throw Error(`Could not prepare this image.`);let o=r.data===`image/jpeg`?`image/jpeg`:`image/webp`,s=Math.min(1,2048/Math.max(i.width,i.height));for(let r=0;r<8;r++){e.width=Math.max(1,Math.round(i.width*s)),e.height=Math.max(1,Math.round(i.height*s)),t.drawImage(i,0,0,e.width,e.height);for(let t of[.85,.7,.55]){let r=await new Promise(n=>e.toBlob(n,o,t));if(n?.throwIfAborted(),r&&r.size<=S)return{blob:r,mime:a.parse(r.type),resized:!0}}s*=.75}throw Error(`This image is too large to attach remotely. Choose a smaller image.`)}finally{i.close()}}var C=new WeakSet,oe=Math.floor((r.requestBytes-1024)*3/4);async function se(e,t,r,a,o,c,l){let d=e.generation,p=()=>{if(c?.throwIfAborted(),o(),e.generation!==d)throw Error(`The connection changed; the image upload was interrupted.`)};if(p(),!r.size||r.size>i.imageBytes)throw Error(`The prepared image must be no larger than 4 MiB.`);if(C.has(e))throw Error(`An image upload is already in progress.`);C.add(e);let m=crypto.randomUUID(),h=`/api/worktrees/${t}/paste-upload`,g=!1,_=!1,v=async(t,n,r)=>{p();let i=await e.request(t,n,r,c),a=await i.json();if(p(),!i.ok){let e=s.safeParse(a);throw Error(e.success?e.data.error.message:`The image upload failed.`)}return a},y=e=>v(`POST`,h,e),b=async e=>{let t=new Uint8Array(await e.arrayBuffer());return p(),btoa(Array.from(t,e=>String.fromCharCode(e)).join(``))};try{let e=n.parse(await v(`GET`,`/api/version`));if(l?.(0,r.size),!e.remote_image_uploads){if(r.size>oe)throw Error(`Update the host connector to upload images larger than 191 KiB.`);let e=await b(r),n=f.parse(await v(`POST`,`/api/worktrees/${t}/paste`,{mime:a,data:e}));return l?.(r.size,r.size),n}if(g=!0,u.parse(await y({action:`start`,upload:m,mime:a,size:r.size})).received!==0)throw Error(`Invalid image upload acknowledgement.`);for(let e=0;e<r.size;e+=i.chunkBytes){let t=r.slice(e,e+i.chunkBytes),n=await b(t),a=u.parse(await y({action:`chunk`,upload:m,offset:e,data:n}));if(a.received!==e+t.size)throw Error(`Invalid image upload acknowledgement.`);l?.(a.received,r.size)}let o=f.parse(await y({action:`finish`,upload:m}));return _=!0,o}finally{if(g&&!_&&e.generation===d)try{o(),e.request(`POST`,h,{action:`cancel`,upload:m}).catch(()=>{})}catch{}C.delete(e)}}function w(e,t,n){if(t.startsWith(`login-`)||t===`home`)return!1;let r=Array.from(e.clipboardData?.items??[]);if(r.some(e=>e.type===`text/plain`))return!1;let i=r.find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!i)return!1;let a=i.getAsFile();return a?(T(a,t,n).then(({resized:e})=>{e&&m(`Image resized for remote access`)}).catch(e=>{m.error(e instanceof Error?`Image paste failed: ${e.message}`:`Image paste failed`)}),!0):!1}async function T(e,t,n,r={}){if(t.startsWith(`login-`)||t===`home`)throw Error(`Open a project terminal to attach an image.`);let i=o(),a=i?.generation,s=()=>{if(o()!==i||i?.generation!==a||!y.isConnected())throw Error(`The terminal connection changed; the image was not inserted.`)};r.signal?.throwIfAborted(),s(),r.onProgress?.({stage:`preparing`});let{blob:c,mime:l,resized:u}=await ae(e,i!==null,r.signal);s();let d=i?await se(i,t,c,l,s,r.signal,(e,t)=>r.onProgress?.(e===t?{stage:`saving`}:{stage:`uploading`,received:e,total:t})):await(async()=>{let e=await E(c);return s(),r.signal?.throwIfAborted(),f.parse(await p(`POST`,`/api/worktrees/${t}/paste`,{mime:l,data:e}))})();return r.signal?.throwIfAborted(),s(),r.onProgress?.({stage:`inserting`}),r.insert?r.insert(`${d.path} `):i?await i.input(t,n,`${d.path} `):y.write(t,n,`${d.path} `),{resized:u}}function E(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^,]*,/,``)),r.onerror=()=>n(r.error??Error(`could not read the clipboard image`)),r.readAsDataURL(e)})}var D=/(?:^|[\s"'`([<])((?:(?:\/|\.{1,2}\/|~\/)(?:[\w.+@~-]+\/)*[\w.+@~-]+|(?:[\w.+@~-]+\/)+[\w.+@~-]*|[\w.+@~-]+\.[A-Za-z]\w{0,11}))(?::(\d{1,6})(?::(\d{1,6}))?)?/dg,O=new Set([`.`,`,`,`;`,`:`,`)`,`]`,`'`,`"`]);function k(e){let t=[],n=new RegExp(D.source,D.flags),r;for(;r=n.exec(e);){let e=r.indices,n=r[1];if(!e?.[1]||n===void 0)continue;let i=e[1][0],a=e[1][1],o=n;for(o.startsWith(`@`)&&(o=o.slice(1),i++);o.length>0&&O.has(o[o.length-1]);)o=o.slice(0,-1),a--;if(o.length===0)continue;let s=r[2]===void 0?void 0:Number.parseInt(r[2],10),c=r[3]===void 0?void 0:Number.parseInt(r[3],10),l=c!==void 0&&e[3]?e[3][1]:s!==void 0&&e[2]?e[2][1]:a;t.push({path:o,line:s,column:c,start:i,end:l})}return t}var A=32,ce=2048;function le(e,t,n){let r=e.getLine(t);if(!r)return null;let i=e.getNullCell(),a=``,o=[];for(let s=0;s<Math.min(n,r.length);s++){if(!r.getCell(s,i)||i.getWidth()===0)continue;if(s===n-1&&i.getChars()===``){let n=e.getLine(t+1);if(n?.isWrapped&&n.getCell(0)?.getWidth()===2)continue}let c=i.getChars()||` `;a+=c;for(let e=0;e<c.length;e++)o.push({row:t,col:s})}return{text:a,cells:o,isWrapped:r.isWrapped}}function ue(e,t,n){return{...e,text:e.text.slice(t,n),cells:e.cells.slice(t,n)}}function j(e,t,n){let r=e.text.trimEnd(),i=t.text.trimStart();if(!/[\w.+@~/:-]$/.test(r)||!/^[\w.+@~:-]/.test(i)||/^(?:~\/|\.{1,2}\/)/.test(i))return!1;let a=e.cells[r.length-1];return r.endsWith(`/`)||a!==void 0&&a.col>=n-9}function M(e,t,n){if(t<0||n<1)return[];let r=Math.max(0,t-A+1),i=new Map;for(let a=r;a<t+A;a++){let t=le(e,a,n);if(!t)break;i.set(a,t)}let a=new Set,o=[];for(let e of[!0,!1])for(let s=r;s<=t;s++){if(i.get(s)?.isWrapped&&s>r)continue;let c=``,l=[];for(let r=s;r<s+A;r++){let u=i.get(r);if(!u)break;let d=i.get(r-1);if(r>s&&!u.isWrapped&&!(e&&d&&j(d,u,n)))break;let f=i.get(r+1),p=ue(u,r>s&&!u.isWrapped?u.text.length-u.text.trimStart().length:0,f?.isWrapped?u.text.length:u.text.trimEnd().length);if(c.length+p.text.length>ce)break;if(c+=p.text,l.push(...p.cells),!(r<t))for(let e of k(c)){let n=l[e.start],r=l[e.end-1];if(!n||!r||n.row>t||r.row<t)continue;let i=`${e.path}\0${e.line??``}\0${e.column??``}\0${n.row}:${n.col}-${r.row}:${r.col}`;a.has(i)||(a.add(i),o.push({candidate:e,start:n,end:r,text:c.slice(e.start,e.end)}))}}}return o.sort((e,t)=>t.text.length-e.text.length)}function N(e,t){return e.kind===`file`&&e.root!==void 0&&e.root!==t?e.root:null}var P=class{fetcher;now;positiveTtlMs;negativeTtlMs;maxEntries;maxConcurrent;entries=new Map;inflight=new Map;inUse=0;waiters=[];constructor(e){this.fetcher=e.fetcher,this.now=e.now??Date.now,this.positiveTtlMs=e.positiveTtlMs??15e3,this.negativeTtlMs=e.negativeTtlMs??5e3,this.maxEntries=e.maxEntries??500,this.maxConcurrent=e.maxConcurrent??4}resolve(e,t,n){let r=`${e}\0${t}`,i=this.entries.get(r);if(i){if(this.now()<i.expiresAt)return Promise.resolve(i.value);this.entries.delete(r)}let a=this.inflight.get(r);if(a)return a;let o=this.withSlot(()=>this.fetcher(e,t,n)).then(e=>(this.store(r,e),e)).finally(()=>{this.inflight.delete(r)});return this.inflight.set(r,o),o}store(e,t){let n=t?this.positiveTtlMs:this.negativeTtlMs;for(this.entries.set(e,{value:t,expiresAt:this.now()+n});this.entries.size>this.maxEntries;){let e=this.entries.keys().next().value;if(e===void 0)break;this.entries.delete(e)}}async withSlot(e){this.inUse>=this.maxConcurrent&&await new Promise(e=>this.waiters.push(e)),this.inUse++;try{return await e()}finally{this.inUse--,this.waiters.shift()?.()}}};async function F(e,t,n,r){let i=new URLSearchParams({path:t});return n!==void 0&&i.set(`line`,String(n)),r!==void 0&&i.set(`root`,r),p(`GET`,`/api/worktrees/${e}/resolve?${i}`)}function I(e,t,n){let r=e.kind??`file`;return{kind:r,path:e.path,...e.root===void 0?{}:{root:e.root},...e.relative_path===void 0?{}:{relativePath:e.relative_path},...r===`file`&&t!==void 0?{line:Math.max(1,t)}:{},...r===`file`&&n!==void 0?{column:n}:{}}}async function L(e,t,n){return I(await F(e,t,n?.line,n?.root),n?.line,n?.column)}async function R(e,t,n){try{return await F(e,t,n)}catch{return null}}function z(e,t,n){let r=new P({fetcher:R});return e.registerLinkProvider({provideLinks(i,a){let o=e.buffer.active,s=M(o,i-1,e.cols);if(s.length===0){a(void 0);return}Promise.all(s.map(async({candidate:e,start:i,end:a,text:o})=>{let s=await r.resolve(t,e.path,e.line);return s?{range:{start:{x:i.col+1,y:i.row+1},end:{x:a.col+1,y:a.row+1}},text:o,decorations:{underline:!0,pointerCursor:!0},activate:t=>{!t.metaKey&&!t.ctrlKey||n(I(s,e.line,e.column))}}:null})).then(e=>{let t=e.filter(e=>e!==null);a(t.length>0?t:void 0)})}})}var B=e(t(),1);function V(e,t){let n=(t&1)!=0,r=(t&2)!=0;if(H(e))return t?`\x1b[1;${1+(r?2:0)+(n?4:0)}${e.slice(-1)}`:e;if(n&&e.length===1){let t=e.toUpperCase().charCodeAt(0);t>=64&&t<=95?e=String.fromCharCode(t-64):e===` `?e=`\0`:e===`?`&&(e=``)}return r?`\x1b${e}`:e}function H(e){return e.length===3&&e.startsWith(`\x1B[`)&&`ABCD`.includes(e[2])}var U=new Map,W=new Map,G=new Map,K=new Set,q=e=>(K.add(e),()=>{K.delete(e)}),J=()=>{for(let e of K)e()},Y=(e,t)=>d(JSON.stringify([e,t]));function de(e,t){return(0,B.useSyncExternalStore)(q,()=>U.has(Y(e,t)))}function fe(e,t,n,r){let i=Y(e,t);return U.set(i,n),r&&W.set(i,r),J(),()=>{U.get(i)===n&&(U.delete(i),W.delete(i),G.delete(i),J())}}function X(e,t){W.get(Y(e,t))?.()}function pe(e,t){return(0,B.useSyncExternalStore)(q,()=>G.get(Y(e,t))??0)}function me(e,t,n){let r=Y(e,t);G.set(r,(G.get(r)??0)^n),J()}function Z(e,t,n){let r=Y(e,t),i=G.get(r)??0;return!i||n.startsWith(`\x1B`)&&!H(n)?n:(G.delete(r),J(),V(n,i))}async function he(e,t,n,r=!1){let i=U.get(Y(e,t));if(!i)throw Error(`Wait for the terminal to attach; nothing was sent`);await Q(e,t,r?`${i(n)}\r`:Z(e,t,n))}async function ge(e,t,n){let r=Y(e,t),i=U.get(r),a=o(),s=a?.generation;if(!i||!n()||!y.isConnected())throw Error(`Wait for the terminal to attach; nothing was pasted.`);let c;try{let n=navigator.clipboard.readText();X(e,t),c=await n}catch{throw Error(`Could not read the clipboard. Allow clipboard access or use your keyboard’s Paste action.`)}if(!n()||U.get(r)!==i||o()!==a||a?.generation!==s||!y.isConnected())throw Error(`The terminal changed; nothing was pasted. Try again in the active terminal.`);c&&await Q(e,t,i(c))}async function Q(e,t,n){let r=o();if(r)await r.input(e,t,n);else{if(!y.isConnected())throw Error(`Terminal is disconnected; nothing was sent`);y.write(e,t,n)}}var $=c();function _e({text:e,label:t,clear:n,paste:r}){let[i,a]=(0,B.useState)(!1);return(0,$.jsxs)(`div`,{role:`toolbar`,"aria-label":t,onPointerDown:e=>e.preventDefault(),className:`absolute right-2 top-2 z-20 flex gap-1 rounded-md bg-elevated p-1 shadow-lg`,children:[(0,$.jsxs)(h,{variant:`ghost`,size:`sm`,disabled:!e||i,onClick:async()=>{try{await navigator.clipboard.writeText(e),n()}catch{m.error(`Could not copy the selection. Try again.`)}},children:[(0,$.jsx)(v,{}),` Copy`]}),r&&(0,$.jsxs)(h,{variant:`ghost`,size:`sm`,disabled:i,onClick:async()=>{if(!i){a(!0);try{await r(),n()}catch(e){m.error(e instanceof Error?e.message:`Could not paste. Try again.`)}finally{a(!1)}}},children:[(0,$.jsx)(ee,{}),` Paste`]}),(0,$.jsx)(h,{variant:`ghost`,size:`icon`,"aria-label":`Clear selection`,disabled:i,onClick:n,children:(0,$.jsx)(g,{})})]})}export{x as _,fe as a,de as c,z as d,L as f,ne as g,re as h,ge as i,pe as l,T as m,Z as n,he as o,w as p,X as r,me as s,_e as t,N as u,te as v,b as y};