orc-ai 0.1.49 → 0.1.51

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 (262) hide show
  1. package/dist/index.js +519 -485
  2. package/dist/skills/orc-platform/SKILL.md +3 -1
  3. package/dist/skills/orc-platform/references/execution.md +3 -0
  4. package/dist/skills/orc-platform/references/scratchpads.md +140 -0
  5. package/dist/skills/orc-platform/references/web.md +112 -0
  6. package/dist/skills/orc-sdlc/references/planning.md +2 -0
  7. package/dist/web/assets/{Agents-C8dJX8px.js → Agents-Cuq9hQL1.js} +1 -1
  8. package/dist/web/assets/Assistant-Bold-gm-uSS1B.woff2 +0 -0
  9. package/dist/web/assets/Assistant-Medium-DrcxCXg3.woff2 +0 -0
  10. package/dist/web/assets/Assistant-Regular-DVxZuzxb.woff2 +0 -0
  11. package/dist/web/assets/Assistant-SemiBold-SCI4bEL9.woff2 +0 -0
  12. package/dist/web/assets/{Attention-BHYo8Lwr.js → Attention-Blme1iNv.js} +1 -1
  13. package/dist/web/assets/{Audit-CS_DZkbJ.js → Audit-CcdL6u56.js} +1 -1
  14. package/dist/web/assets/{ConfirmDialog-CrSa87VF.js → ConfirmDialog-UlZrlBrT.js} +1 -1
  15. package/dist/web/assets/Dashboard-u3v-obdz.js +1 -0
  16. package/dist/web/assets/{DocumentWorkspace-CNyVQTjg.js → DocumentWorkspace-B5QQ9h1l.js} +1 -1
  17. package/dist/web/assets/{EmptyState-Ctm7L70B.js → EmptyState-CLMWpYxU.js} +1 -1
  18. package/dist/web/assets/{ErrorState-BPTepwiG.js → ErrorState-_BM228mQ.js} +1 -1
  19. package/dist/web/assets/{FileEditor-Dh29_xCL.js → FileEditor-CGTsskO5.js} +1 -1
  20. package/dist/web/assets/{JobWebhooks-TvAY8p1V.js → JobWebhooks-CeHYIwjS.js} +1 -1
  21. package/dist/web/assets/{Jobs-C5ggSs2T.js → Jobs-B_HefXhI.js} +3 -3
  22. package/dist/web/assets/Knowledge-DtqZHvq9.js +28 -0
  23. package/dist/web/assets/{PackageCatalog-B1U3vfhW.js → PackageCatalog-C4JkAh_e.js} +5 -5
  24. package/dist/web/assets/{Pager-ClYYU9et.js → Pager-C4QwTsW7.js} +1 -1
  25. package/dist/web/assets/{PriorityBadge-BW-A50LE.js → PriorityBadge-q0hZXCLg.js} +1 -1
  26. package/dist/web/assets/Projects-Bqohd0oU.js +3 -0
  27. package/dist/web/assets/ResumeActions-Bihtv9n8.js +1 -0
  28. package/dist/web/assets/{Rules-DGKsAbTf.js → Rules-DbI3E-1N.js} +1 -1
  29. package/dist/web/assets/Scratchpads-CvYHDI3j.js +20 -0
  30. package/dist/web/assets/Sessions-mS5ivBxN.js +5 -0
  31. package/dist/web/assets/{Settings-yW1S2q4F.js → Settings-BcP04VXz.js} +6 -6
  32. package/dist/web/assets/{Skills-BwdXE5nT.js → Skills-Cs1JTSlV.js} +3 -3
  33. package/dist/web/assets/{SourceEditor-ft02z20v.js → SourceEditor-B66_SPOa.js} +1 -1
  34. package/dist/web/assets/{StatusBadge-C5G1fdZh.js → StatusBadge-BxSWnu8L.js} +1 -1
  35. package/dist/web/assets/TagInput-B3BLlodf.js +1 -0
  36. package/dist/web/assets/{TaskDetailSheet-fUSHPFB-.js → TaskDetailSheet-BnMsuYO6.js} +2 -2
  37. package/dist/web/assets/{Tasks-uRqvmLz7.js → Tasks-CZnulyFF.js} +5 -5
  38. package/dist/web/assets/{Terminals-W5nszLI1.js → Terminals-J-qPx71R.js} +5 -5
  39. package/dist/web/assets/{ViewHeader-DXR0ZaMO.js → ViewHeader-CG7vOMnJ.js} +1 -1
  40. package/dist/web/assets/{Webhooks-lXLoKWdt.js → Webhooks-DPpjIwP_.js} +1 -1
  41. package/dist/web/assets/abnfDiagram-VCTEODGH-qnCZr3qh.js +1 -0
  42. package/dist/web/assets/ar-SA-G6X2FPQ2-BNl3syL3.js +10 -0
  43. package/dist/web/assets/arc-DuthDAsq.js +1 -0
  44. package/dist/web/assets/architectureDiagram-5GKGNRK7-CuzhWFIn.js +36 -0
  45. package/dist/web/assets/arrow-left-DNp3aOhW.js +6 -0
  46. package/dist/web/assets/az-AZ-76LH7QW2-CSlBN4kF.js +1 -0
  47. package/dist/web/assets/bg-BG-XCXSNQG7-Dcs1AElN.js +5 -0
  48. package/dist/web/assets/{blockDiagram-I7D4REHJ-DMrufypV.js → blockDiagram-I7D4REHJ-CCIO0eI-.js} +3 -3
  49. package/dist/web/assets/bn-BD-2XOGV67Q-D9poNjDl.js +5 -0
  50. package/dist/web/assets/{c4Diagram-7LVT6UL2-BUUxjwvU.js → c4Diagram-7LVT6UL2-EDh4_U6t.js} +2 -2
  51. package/dist/web/assets/ca-ES-6MX7JW3Y-pTbaXdVe.js +8 -0
  52. package/dist/web/assets/channel-D-jHqOEf.js +1 -0
  53. package/dist/web/assets/chunk-2Q5K7J3B-Ccr7lFKH.js +1 -0
  54. package/dist/web/assets/{chunk-5VM5RSS4-B6lAVcgQ.js → chunk-5VM5RSS4-rFn8SpPH.js} +1 -1
  55. package/dist/web/assets/chunk-F27PBJKO-CDJpfkoq.js +1 -0
  56. package/dist/web/assets/{chunk-IMKFNOWR-CwyogA-y.js → chunk-IMKFNOWR-B3_FhSA0.js} +1 -1
  57. package/dist/web/assets/chunk-JWPE2WC7-sBjgi4vj.js +1 -0
  58. package/dist/web/assets/chunk-POPQ4Y6H-Dsox2izf.js +1 -0
  59. package/dist/web/assets/{chunk-SVP7TREG-CmiQdvOH.js → chunk-SVP7TREG-CzwNtBeO.js} +4 -4
  60. package/dist/web/assets/{chunk-TICWLB2K-CieIpfOy.js → chunk-TICWLB2K-C2vbibcd.js} +1 -1
  61. package/dist/web/assets/chunk-XXDRQBXY-V09kgMMs.js +1 -0
  62. package/dist/web/assets/classDiagram-ZZMXUADV-yk_1OWub.js +1 -0
  63. package/dist/web/assets/classDiagram-v2-VYDZK3BY-yk_1OWub.js +1 -0
  64. package/dist/web/assets/copy-DG3MHKpv.js +6 -0
  65. package/dist/web/assets/cose-bilkent-JH36ORCC-CJbRd_jc.js +1 -0
  66. package/dist/web/assets/cs-CZ-2BRQDIVT-DCTwXFkX.js +11 -0
  67. package/dist/web/assets/{cynefin-OW5HDTMX-vMXgcpgg.js → cynefin-OW5HDTMX-DQAC3glv.js} +1 -1
  68. package/dist/web/assets/cynefinDiagram-5FMLGOSQ-BzboBb_e.js +62 -0
  69. package/dist/web/assets/da-DK-5WZEPLOC-BAYPDSds.js +5 -0
  70. package/dist/web/assets/{dagre-GXQ25YYZ-xmoviGlr.js → dagre-GXQ25YYZ-C_-0NO8H.js} +2 -2
  71. package/dist/web/assets/de-DE-XR44H4JA-WTQ3THgd.js +8 -0
  72. package/dist/web/assets/{diagram-S7CK7UJ4-CguQzzXs.js → diagram-S7CK7UJ4-Dvi9imfs.js} +5 -5
  73. package/dist/web/assets/diagram-UQ7AKVKN-BoEKhuYx.js +41 -0
  74. package/dist/web/assets/{diagram-VSXAHHWV-cuhv3Fvj.js → diagram-VSXAHHWV-AoIN6taJ.js} +3 -3
  75. package/dist/web/assets/diagram-VX7I27RA-BIAMQMgb.js +24 -0
  76. package/dist/web/assets/diagram-Z3DM3KII-MXPt1bWW.js +24 -0
  77. package/dist/web/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
  78. package/dist/web/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
  79. package/dist/web/assets/{download-UgMvjBjR.js → download-PQ08tuAg.js} +1 -1
  80. package/dist/web/assets/ebnfDiagram-PWID7BFC-BPO0ZRsN.js +1 -0
  81. package/dist/web/assets/el-GR-BZB4AONW-C6V4uhoK.js +10 -0
  82. package/dist/web/assets/erDiagram-RLTQ6QDP-BR2u7bIU.js +99 -0
  83. package/dist/web/assets/es-ES-U4NZUMDT-D_kwVnQr.js +9 -0
  84. package/dist/web/assets/eu-ES-A7QVB2H4-Eeu5vgta.js +11 -0
  85. package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Bold.woff2 +0 -0
  86. package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Medium.woff2 +0 -0
  87. package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-Regular.woff2 +0 -0
  88. package/dist/web/assets/excalidraw/fonts/Assistant/Assistant-SemiBold.woff2 +0 -0
  89. package/dist/web/assets/excalidraw/fonts/Cascadia/CascadiaCode-Regular.woff2 +0 -0
  90. package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-279a7b317d12eb88de06167bd672b4b4.woff2 +0 -0
  91. package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-6e066e8de2ac57ea9283adb9c24d7f0c.woff2 +0 -0
  92. package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-dc6a8806fa96795d7b3be5026f989a17.woff2 +0 -0
  93. package/dist/web/assets/excalidraw/fonts/ComicShanns/ComicShanns-Regular-fcb0fc02dcbee4c9846b3e2508668039.woff2 +0 -0
  94. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2 +0 -0
  95. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2 +0 -0
  96. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2 +0 -0
  97. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-623ccf21b21ef6b3a0d87738f77eb071.woff2 +0 -0
  98. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-a88b72a24fb54c9f94e3b5fdaa7481c9.woff2 +0 -0
  99. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-b9dcf9d2e50a1eaf42fc664b50a3fd0d.woff2 +0 -0
  100. package/dist/web/assets/excalidraw/fonts/Excalifont/Excalifont-Regular-be310b9bcd4f1a43f571c46df7809174.woff2 +0 -0
  101. package/dist/web/assets/excalidraw/fonts/Liberation/LiberationSans-Regular.woff2 +0 -0
  102. package/dist/web/assets/excalidraw/fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2 +0 -0
  103. package/dist/web/assets/excalidraw/fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2 +0 -0
  104. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2 +0 -0
  105. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2 +0 -0
  106. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2 +0 -0
  107. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2 +0 -0
  108. package/dist/web/assets/excalidraw/fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2 +0 -0
  109. package/dist/web/assets/excalidraw/fonts/Virgil/Virgil-Regular.woff2 +0 -0
  110. package/dist/web/assets/fa-IR-HGAKTJCU-CKd62s_f.js +8 -0
  111. package/dist/web/assets/fi-FI-Z5N7JZ37-CXq3Xbio.js +6 -0
  112. package/dist/web/assets/file-open-002ab408-DIuFHtCF.js +1 -0
  113. package/dist/web/assets/file-open-7c801643-684qeFg4.js +1 -0
  114. package/dist/web/assets/file-save-3189631c-C1wFhQhH.js +1 -0
  115. package/dist/web/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
  116. package/dist/web/assets/{flowDiagram-HODETNUW-DueO0Ju6.js → flowDiagram-HODETNUW-DtCUIQgA.js} +5 -5
  117. package/dist/web/assets/folder-open-D0jNv68L.js +11 -0
  118. package/dist/web/assets/fr-FR-RHASNOE6-BUQsSuUv.js +9 -0
  119. package/dist/web/assets/ganttDiagram-EL5Y4UJY-DtAyQ0Yy.js +292 -0
  120. package/dist/web/assets/gitGraphDiagram-WWUBYQGX-CoXp0Ypy.js +106 -0
  121. package/dist/web/assets/gl-ES-HMX3MZ6V-DW4qfI2b.js +10 -0
  122. package/dist/web/assets/he-IL-6SHJWFNN-DaY9mSnj.js +10 -0
  123. package/dist/web/assets/hi-IN-IWLTKZ5I-D2lbPu3U.js +4 -0
  124. package/dist/web/assets/highlighted-body-KPVGNVTW-BmPHGwPQ.js +1 -0
  125. package/dist/web/assets/hu-HU-A5ZG7DT2-Bos6dFhw.js +7 -0
  126. package/dist/web/assets/id-ID-SAP4L64H-cWyYCXM5.js +10 -0
  127. package/dist/web/assets/image-blob-reduce.esm-D6s-rqMO.js +7 -0
  128. package/dist/web/assets/index-CY60J5zm.css +1 -0
  129. package/dist/web/assets/{index-C_jtMgr7.js → index-CYCjrqhG.js} +124 -114
  130. package/dist/web/assets/index-CcfSzlv5.js +19 -0
  131. package/dist/web/assets/infoDiagram-27XIBGKW-C2Ypr-zs.js +2 -0
  132. package/dist/web/assets/{ishikawaDiagram-5VMMS53U-ccIPCUs4.js → ishikawaDiagram-5VMMS53U-Bx7qtMkV.js} +5 -5
  133. package/dist/web/assets/it-IT-JPQ66NNP-CRGQFEpH.js +11 -0
  134. package/dist/web/assets/ja-JP-DBVTYXUO-BXcfLN6y.js +8 -0
  135. package/dist/web/assets/{journeyDiagram-3NMN7TZE-rRe3uTLu.js → journeyDiagram-3NMN7TZE-rsuiVeG_.js} +2 -2
  136. package/dist/web/assets/kaa-6HZHGXH3-Bk6N-pLt.js +1 -0
  137. package/dist/web/assets/kab-KAB-ZGHBKWFO-Ctb8wAYx.js +8 -0
  138. package/dist/web/assets/{kanban-definition-UXKFOSKX-tAKCWntJ.js → kanban-definition-UXKFOSKX-5ktYMmTY.js} +6 -6
  139. package/dist/web/assets/kk-KZ-P5N5QNE5-CzQX2BL1.js +1 -0
  140. package/dist/web/assets/km-KH-HSX4SM5Z-DnDRwAqY.js +11 -0
  141. package/dist/web/assets/ko-KR-MTYHY66A-C6HKdiKS.js +9 -0
  142. package/dist/web/assets/ku-TR-6OUDTVRD-evaKSJwY.js +9 -0
  143. package/dist/web/assets/layout-DSZI9hxI.js +1 -0
  144. package/dist/web/assets/linear-omhrmwGQ.js +1 -0
  145. package/dist/web/assets/{list-BL4eRkIg.js → list-UGkABbTC.js} +1 -1
  146. package/dist/web/assets/live-sessions-C19eXx17.js +6 -0
  147. package/dist/web/assets/lt-LT-XHIRWOB4-BS7h6VOT.js +3 -0
  148. package/dist/web/assets/lv-LV-5QDEKY6T-CvKj-LUX.js +7 -0
  149. package/dist/web/assets/mermaid-HWGCJPDP-B_H4rk_s.js +299 -0
  150. package/dist/web/assets/mermaid.core-Bs68JjJM.js +312 -0
  151. package/dist/web/assets/{mindmap-definition-YA3MSWOX-Cj5-j6a7.js → mindmap-definition-YA3MSWOX-DKG9LDwL.js} +4 -4
  152. package/dist/web/assets/mr-IN-CRQNXWMA-C_9ZWEOY.js +13 -0
  153. package/dist/web/assets/my-MM-5M5IBNSE-Bic5Rd4I.js +1 -0
  154. package/dist/web/assets/nb-NO-T6EIAALU-BN5D6e6X.js +10 -0
  155. package/dist/web/assets/nl-NL-IS3SIHDZ-CLmoJxpw.js +8 -0
  156. package/dist/web/assets/nn-NO-6E72VCQL-DH3pWtEG.js +8 -0
  157. package/dist/web/assets/oc-FR-POXYY2M6-DzJwOBaL.js +8 -0
  158. package/dist/web/assets/pa-IN-N4M65BXN-CxFRfqt4.js +4 -0
  159. package/dist/web/assets/pegDiagram-XKGWAZYB-D_-uCYBR.js +1 -0
  160. package/dist/web/assets/{pencil-gxvh59uO.js → pencil-_hID3D0m.js} +1 -1
  161. package/dist/web/assets/percentages-BXMCSKIN-DGBKIvAv.css +1 -0
  162. package/dist/web/assets/percentages-BXMCSKIN-DtfDKj6k.js +180 -0
  163. package/dist/web/assets/pica-sWD7KYN4.js +7 -0
  164. package/dist/web/assets/pieDiagram-E7YTZNPT-Cxcz8v2V.js +39 -0
  165. package/dist/web/assets/pl-PL-T2D74RX3-DFEd2a_2.js +9 -0
  166. package/dist/web/assets/pt-BR-5N22H2LF-d_zvXQ30.js +9 -0
  167. package/dist/web/assets/pt-PT-UZXXM6DQ-5FeuC95-.js +9 -0
  168. package/dist/web/assets/{quadrantDiagram-AXDQQJYC-DKTP6jS5.js → quadrantDiagram-AXDQQJYC-5W1D624h.js} +1 -1
  169. package/dist/web/assets/railroadDiagram-O6MQD6OU-BZhsOHVF.js +1 -0
  170. package/dist/web/assets/{requirementDiagram-BXWQKSXE-B9hH69zu.js → requirementDiagram-BXWQKSXE-BXlonflD.js} +2 -2
  171. package/dist/web/assets/ro-RO-JPDTUUEW-CAJt20_T.js +11 -0
  172. package/dist/web/assets/roundRect-0PYZxl1G.js +1 -0
  173. package/dist/web/assets/ru-RU-B4JR7IUQ-BL-2B7Np.js +9 -0
  174. package/dist/web/assets/sankeyDiagram-P5KCCOFB-BZVh-M1g.js +40 -0
  175. package/dist/web/assets/{save-CYoz3QKB.js → save-C0v-3p0L.js} +1 -1
  176. package/dist/web/assets/save-file-B_ZN6-id.js +1 -0
  177. package/dist/web/assets/scratchpad-routes-DvtErr_v.js +11 -0
  178. package/dist/web/assets/scroll-area-Bgn8q6dm.js +1 -0
  179. package/dist/web/assets/{sequenceDiagram-WJ2MYXX4-BF77J63J.js → sequenceDiagram-WJ2MYXX4-B2WHT4e0.js} +2 -2
  180. package/dist/web/assets/si-LK-N5RQ5JYF-BwL9NXm1.js +1 -0
  181. package/dist/web/assets/sizeCapture-INFHLROL-BI8hpcc0.js +1 -0
  182. package/dist/web/assets/sk-SK-C5VTKIMK-DEJmCOdH.js +6 -0
  183. package/dist/web/assets/sl-SI-NN7IZMDC-BNyfGsJr.js +6 -0
  184. package/dist/web/assets/stateDiagram-D77RDMKH-yCTyY4sx.js +1 -0
  185. package/dist/web/assets/stateDiagram-v2-MP3YSRHH-DMV9Hi6h.js +1 -0
  186. package/dist/web/assets/subset-shared.chunk-en_zPkcm.js +84 -0
  187. package/dist/web/assets/subset-worker.chunk-D4Jfgczh.js +1 -0
  188. package/dist/web/assets/sv-SE-XGPEYMSR-CcrID0kB.js +10 -0
  189. package/dist/web/assets/swimlanes-42K2YHIH-CsXemLHu.js +1 -0
  190. package/dist/web/assets/swimlanesDiagram-VR7AAH4N-wKC0jJ-D.js +8 -0
  191. package/dist/web/assets/ta-IN-2NMHFXQM-1Q6gAmCa.js +9 -0
  192. package/dist/web/assets/{table-D3N_5Wee.js → table-D-x54JQs.js} +1 -1
  193. package/dist/web/assets/tabs-Dwtb498J.js +1 -0
  194. package/dist/web/assets/th-TH-HPSO5L25-Osf6RMxs.js +2 -0
  195. package/dist/web/assets/{timeline-definition-24CTP7MA-owGoHn8z.js → timeline-definition-24CTP7MA-BcjYHSKM.js} +8 -8
  196. package/dist/web/assets/tr-TR-DEFEU3FU-olIwbQqc.js +7 -0
  197. package/dist/web/assets/{trash-2-D3Ey4I09.js → trash-2-C4wuE82r.js} +1 -1
  198. package/dist/web/assets/uk-UA-QMV73CPH-_0ICAhhw.js +6 -0
  199. package/dist/web/assets/{upload-DhVOCWST.js → upload-Cq-d5iVn.js} +1 -1
  200. package/dist/web/assets/{useDetailRoute-j9nlwack.js → useDetailRoute-DiC2IR0t.js} +1 -1
  201. package/dist/web/assets/{useJobs-Dcl-Vim3.js → useJobs-TDZx1N1l.js} +1 -1
  202. package/dist/web/assets/{useKnowledge-gIjk0_I1.js → useKnowledge-cE7nsoOf.js} +1 -1
  203. package/dist/web/assets/{useListSelection-CSQd_Hmx.js → useListSelection-tj_f-2Ad.js} +1 -1
  204. package/dist/web/assets/{useMemories-B8Zpz0Qz.js → useMemories-rjShoqd3.js} +1 -1
  205. package/dist/web/assets/useProjectScope-DaFHoG4_.js +1 -0
  206. package/dist/web/assets/{useSessions-BrdK-12R.js → useSessions-BNsSZXqv.js} +1 -1
  207. package/dist/web/assets/vennDiagram-4TSXK5OY-BIC5NL2Q.js +34 -0
  208. package/dist/web/assets/vi-VN-M7AON7JQ-CZHjInAz.js +5 -0
  209. package/dist/web/assets/{view-params-Bm1Qf6KC.js → view-params-Duc_5Bxj.js} +1 -1
  210. package/dist/web/assets/{wardleyDiagram-VM6X3IG4-D9GbTBKy.js → wardleyDiagram-VM6X3IG4-BJqqp-BL.js} +2 -2
  211. package/dist/web/assets/{xychartDiagram-S5SC5T6Z-BFqPF2Hl.js → xychartDiagram-S5SC5T6Z-CMANcsti.js} +4 -4
  212. package/dist/web/assets/zh-CN-LNUGB5OW-z21ZnHQB.js +10 -0
  213. package/dist/web/assets/zh-HK-E62DVLB3-C-RnadUL.js +1 -0
  214. package/dist/web/assets/zh-TW-RAJ6MFWO-Vua3CLAj.js +9 -0
  215. package/dist/web/index.html +2 -2
  216. package/package.json +1 -1
  217. package/dist/web/assets/Dashboard-V813oIhq.js +0 -1
  218. package/dist/web/assets/Knowledge-BpiN3iVE.js +0 -28
  219. package/dist/web/assets/Projects-DRao5Qpk.js +0 -3
  220. package/dist/web/assets/ResumeActions-DHTOr6GQ.js +0 -11
  221. package/dist/web/assets/Sessions-CWHU6sYy.js +0 -5
  222. package/dist/web/assets/abnfDiagram-VCTEODGH-K8P_VxLi.js +0 -1
  223. package/dist/web/assets/arc-BOl9BKfD.js +0 -1
  224. package/dist/web/assets/architectureDiagram-5GKGNRK7-DIZ15fO5.js +0 -36
  225. package/dist/web/assets/channel-CQFNQIhG.js +0 -1
  226. package/dist/web/assets/chunk-2Q5K7J3B-wRIxA2_q.js +0 -1
  227. package/dist/web/assets/chunk-F27PBJKO-DVuei-Pl.js +0 -1
  228. package/dist/web/assets/chunk-JWPE2WC7-zdsOarNZ.js +0 -1
  229. package/dist/web/assets/chunk-POPQ4Y6H-D3ieeKih.js +0 -1
  230. package/dist/web/assets/chunk-XXDRQBXY-BoTHwisB.js +0 -1
  231. package/dist/web/assets/classDiagram-ZZMXUADV-B5yD90Df.js +0 -1
  232. package/dist/web/assets/classDiagram-v2-VYDZK3BY-B5yD90Df.js +0 -1
  233. package/dist/web/assets/cose-bilkent-JH36ORCC-CtGsuuTW.js +0 -1
  234. package/dist/web/assets/cynefinDiagram-5FMLGOSQ-kMbm5D7e.js +0 -62
  235. package/dist/web/assets/diagram-UQ7AKVKN-CMX0u7Gf.js +0 -41
  236. package/dist/web/assets/diagram-VX7I27RA-Bp_JbX0e.js +0 -24
  237. package/dist/web/assets/diagram-Z3DM3KII-oZ6jRSCd.js +0 -24
  238. package/dist/web/assets/ebnfDiagram-PWID7BFC-DbxnEjb0.js +0 -1
  239. package/dist/web/assets/erDiagram-RLTQ6QDP-Cl5kXPho.js +0 -99
  240. package/dist/web/assets/folder-open-DojCP5NP.js +0 -16
  241. package/dist/web/assets/ganttDiagram-EL5Y4UJY-DNjT4iVH.js +0 -292
  242. package/dist/web/assets/gitGraphDiagram-WWUBYQGX-B4aUQ9gY.js +0 -106
  243. package/dist/web/assets/highlighted-body-KPVGNVTW-gt1u8RcC.js +0 -1
  244. package/dist/web/assets/index-CyjfnRiI.css +0 -1
  245. package/dist/web/assets/infoDiagram-27XIBGKW-CWcOvNAB.js +0 -2
  246. package/dist/web/assets/layout-7xCiQ5Mn.js +0 -1
  247. package/dist/web/assets/linear-WCNhc07o.js +0 -1
  248. package/dist/web/assets/mermaid-HWGCJPDP-C8QwWdo5.js +0 -609
  249. package/dist/web/assets/pegDiagram-XKGWAZYB-BYB3oVZ_.js +0 -1
  250. package/dist/web/assets/pieDiagram-E7YTZNPT-CSbpzXas.js +0 -39
  251. package/dist/web/assets/railroadDiagram-O6MQD6OU-Ct8aPeLX.js +0 -1
  252. package/dist/web/assets/refresh-cw-BQRdbjy6.js +0 -6
  253. package/dist/web/assets/sankeyDiagram-P5KCCOFB-CDqNONxU.js +0 -40
  254. package/dist/web/assets/scroll-area-CU4DGUBA.js +0 -1
  255. package/dist/web/assets/sizeCapture-INFHLROL-Dpubco_U.js +0 -1
  256. package/dist/web/assets/stateDiagram-D77RDMKH-CzslKEYw.js +0 -1
  257. package/dist/web/assets/stateDiagram-v2-MP3YSRHH-DKbNjyV-.js +0 -1
  258. package/dist/web/assets/swimlanes-42K2YHIH-bD_tUjo6.js +0 -1
  259. package/dist/web/assets/swimlanesDiagram-VR7AAH4N-0wAluWQF.js +0 -8
  260. package/dist/web/assets/tabs-CSlEXoxD.js +0 -1
  261. package/dist/web/assets/useProjectScope-Dk0mjyHf.js +0 -1
  262. package/dist/web/assets/vennDiagram-4TSXK5OY-D0_6bldW.js +0 -34
@@ -1,609 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/sizeCapture-INFHLROL-Dpubco_U.js","assets/index-C_jtMgr7.js","assets/index-CyjfnRiI.css","assets/wiki-links-Y6CQL1QZ.js","assets/dagre-GXQ25YYZ-xmoviGlr.js","assets/layout-7xCiQ5Mn.js","assets/swimlanes-42K2YHIH-bD_tUjo6.js","assets/cose-bilkent-JH36ORCC-CtGsuuTW.js","assets/cytoscape.esm-Ix0LnXOy.js","assets/c4Diagram-7LVT6UL2-BUUxjwvU.js","assets/chunk-F27PBJKO-DVuei-Pl.js","assets/flowDiagram-HODETNUW-DueO0Ju6.js","assets/chunk-5VM5RSS4-B6lAVcgQ.js","assets/chunk-XXDRQBXY-BoTHwisB.js","assets/chunk-POPQ4Y6H-D3ieeKih.js","assets/channel-CQFNQIhG.js","assets/swimlanesDiagram-VR7AAH4N-0wAluWQF.js","assets/erDiagram-RLTQ6QDP-Cl5kXPho.js","assets/gitGraphDiagram-WWUBYQGX-B4aUQ9gY.js","assets/chunk-2Q5K7J3B-wRIxA2_q.js","assets/chunk-JWPE2WC7-zdsOarNZ.js","assets/cynefin-OW5HDTMX-vMXgcpgg.js","assets/ganttDiagram-EL5Y4UJY-DNjT4iVH.js","assets/linear-WCNhc07o.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-27XIBGKW-CWcOvNAB.js","assets/pieDiagram-E7YTZNPT-CSbpzXas.js","assets/arc-BOl9BKfD.js","assets/ordinal-BENe2yWM.js","assets/quadrantDiagram-AXDQQJYC-DKTP6jS5.js","assets/xychartDiagram-S5SC5T6Z-BFqPF2Hl.js","assets/requirementDiagram-BXWQKSXE-B9hH69zu.js","assets/sequenceDiagram-WJ2MYXX4-BF77J63J.js","assets/classDiagram-ZZMXUADV-B5yD90Df.js","assets/chunk-TICWLB2K-CieIpfOy.js","assets/classDiagram-v2-VYDZK3BY-B5yD90Df.js","assets/stateDiagram-D77RDMKH-CzslKEYw.js","assets/chunk-IMKFNOWR-CwyogA-y.js","assets/stateDiagram-v2-MP3YSRHH-DKbNjyV-.js","assets/journeyDiagram-3NMN7TZE-rRe3uTLu.js","assets/timeline-definition-24CTP7MA-owGoHn8z.js","assets/mindmap-definition-YA3MSWOX-Cj5-j6a7.js","assets/kanban-definition-UXKFOSKX-tAKCWntJ.js","assets/sankeyDiagram-P5KCCOFB-CDqNONxU.js","assets/diagram-Z3DM3KII-oZ6jRSCd.js","assets/diagram-UQ7AKVKN-CMX0u7Gf.js","assets/blockDiagram-I7D4REHJ-DMrufypV.js","assets/diagram-S7CK7UJ4-CguQzzXs.js","assets/architectureDiagram-5GKGNRK7-DIZ15fO5.js","assets/diagram-VSXAHHWV-cuhv3Fvj.js","assets/ishikawaDiagram-5VMMS53U-ccIPCUs4.js","assets/vennDiagram-4TSXK5OY-D0_6bldW.js","assets/diagram-VX7I27RA-Bp_JbX0e.js","assets/wardleyDiagram-VM6X3IG4-D9GbTBKy.js","assets/cynefinDiagram-5FMLGOSQ-kMbm5D7e.js","assets/railroadDiagram-O6MQD6OU-Ct8aPeLX.js","assets/chunk-SVP7TREG-CmiQdvOH.js","assets/ebnfDiagram-PWID7BFC-DbxnEjb0.js","assets/abnfDiagram-VCTEODGH-K8P_VxLi.js","assets/pegDiagram-XKGWAZYB-BYB3oVZ_.js","assets/highlighted-body-KPVGNVTW-gt1u8RcC.js"])))=>i.map(i=>d[i]);
2
- var qI=Object.defineProperty;var WI=Object.getPrototypeOf;var jI=Reflect.get;var Ib=e=>{throw TypeError(e)};var VI=(e,t,r)=>t in e?qI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Z=(e,t,r)=>VI(e,typeof t!="symbol"?t+"":t,r),hd=(e,t,r)=>t.has(e)||Ib("Cannot "+r);var Tr=(e,t,r)=>(hd(e,t,"read from private field"),r?r.call(e):t.get(e)),Vn=(e,t,r)=>t.has(e)?Ib("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ni=(e,t,r,i)=>(hd(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r),dd=(e,t,r)=>(hd(e,t,"access private method"),r);var Bb=(e,t,r)=>jI(WI(e),r,t);import{c as GI,ci as I,bd as Il,r as Q,j as z,cm as tk,bw as Og,bO as YI,K as ek}from"./index-C_jtMgr7.js";import{r as XI,w as KI}from"./wiki-links-Y6CQL1QZ.js";/**
3
- * @license lucide-react v1.27.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */const QI=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],ZI=GI("image",QI);let qe=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function JI(e){return Ng(e)}function Ng(e){return Array.isArray(e)?tB(e):e instanceof RegExp?e:typeof e=="object"?eB(e):e}function tB(e){let t=[];for(let r=0,i=e.length;r<i;r++)t[r]=Ng(e[r]);return t}function eB(e){let t={};for(let r in e)t[r]=Ng(e[r]);return t}function rk(e,...t){return t.forEach(r=>{for(let i in r)e[i]=r[i]}),e}function ik(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?ik(e.substring(0,e.length-1)):e.substr(~t+1)}var fd=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,rc=class{static hasCaptures(e){return e===null?!1:(fd.lastIndex=0,fd.test(e))}static replaceCaptures(e,t,r){return e.replace(fd,(i,n,s,a)=>{let o=r[parseInt(n||s,10)];if(o){let l=t.substring(o.start,o.end);for(;l[0]===".";)l=l.substring(1);switch(a){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return i})}};function nk(e,t){return e<t?-1:e>t?1:0}function sk(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,i=t.length;if(r===i){for(let n=0;n<r;n++){let s=nk(e[n],t[n]);if(s!==0)return s}return 0}return r-i}function Rb(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ak(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ok=class{constructor(e){Z(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},iu=class{constructor(t,r,i){Z(this,"_cachedMatchRoot",new ok(t=>this._root.match(t)));this._colorMap=t,this._defaults=r,this._root=i}static createFromRawTheme(t,r){return this.createFromParsedTheme(nB(t),r)}static createFromParsedTheme(t,r){return aB(t,r)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const r=t.scopeName,n=this._cachedMatchRoot.get(r).find(s=>rB(t.parent,s.parentScopes));return n?new lk(n.fontStyle,n.foreground,n.background):null}},pd=class Pc{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const i of r)t=new Pc(t,i);return t}static from(...t){let r=null;for(let i=0;i<t.length;i++)r=new Pc(r,t[i]);return r}push(t){return new Pc(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let i=this;for(;i&&i!==t;)r.push(i.scopeName),i=i.parent;return i===t?r.reverse():void 0}};function rB(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let i=t[r],n=!1;if(i===">"){if(r===t.length-1)return!1;i=t[++r],n=!0}for(;e&&!iB(e.scopeName,i);){if(n)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function iB(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var lk=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function nB(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],i=0;for(let n=0,s=t.length;n<s;n++){let a=t[n];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let h=a.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),o=h.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let l=-1;if(typeof a.settings.fontStyle=="string"){l=0;let h=a.settings.fontStyle.split(" ");for(let f=0,d=h.length;f<d;f++)switch(h[f]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof a.settings.foreground=="string"&&Rb(a.settings.foreground)&&(c=a.settings.foreground);let u=null;typeof a.settings.background=="string"&&Rb(a.settings.background)&&(u=a.settings.background);for(let h=0,f=o.length;h<f;h++){let p=o[h].trim().split(" "),g=p[p.length-1],b=null;p.length>1&&(b=p.slice(0,p.length-1),b.reverse()),r[i++]=new sB(g,b,n,l,c,u)}}return r}var sB=class{constructor(e,t,r,i,n,s){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=i,this.foreground=n,this.background=s}},gr=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(gr||{});function aB(e,t){e.sort((l,c)=>{let u=nk(l.scope,c.scope);return u!==0||(u=sk(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let r=0,i="#000000",n="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(r=l.fontStyle),l.foreground!==null&&(i=l.foreground),l.background!==null&&(n=l.background)}let s=new oB(t),a=new lk(r,s.getId(i),s.getId(n)),o=new cB(new tp(0,null,-1,0,0),[]);for(let l=0,c=e.length;l<c;l++){let u=e[l];o.insert(0,u.scope,u.parentScopes,u.fontStyle,s.getId(u.foreground),s.getId(u.background))}return new iu(s,a,o)}var oB=class{constructor(e){Z(this,"_isFrozen");Z(this,"_lastColorId");Z(this,"_id2color");Z(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},lB=Object.freeze([]),tp=class ck{constructor(t,r,i,n,s){Z(this,"scopeDepth");Z(this,"parentScopes");Z(this,"fontStyle");Z(this,"foreground");Z(this,"background");this.scopeDepth=t,this.parentScopes=r||lB,this.fontStyle=i,this.foreground=n,this.background=s}clone(){return new ck(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let i=0,n=t.length;i<n;i++)r[i]=t[i].clone();return r}acceptOverwrite(t,r,i,n){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),i!==0&&(this.foreground=i),n!==0&&(this.background=n)}},cB=class ep{constructor(t,r=[],i={}){Z(this,"_rulesWithParentScopes");this._mainRule=t,this._children=i,this._rulesWithParentScopes=r}static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let i=0,n=0;for(;t.parentScopes[i]===">"&&i++,r.parentScopes[n]===">"&&n++,!(i>=t.parentScopes.length||n>=r.parentScopes.length);){const s=r.parentScopes[n].length-t.parentScopes[i].length;if(s!==0)return s;i++,n++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let i=t.indexOf("."),n,s;if(i===-1?(n=t,s=""):(n=t.substring(0,i),s=t.substring(i+1)),this._children.hasOwnProperty(n))return this._children[n].match(s)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(ep._cmpBySpecificity),r}insert(t,r,i,n,s,a){if(r===""){this._doInsertHere(t,i,n,s,a);return}let o=r.indexOf("."),l,c;o===-1?(l=r,c=""):(l=r.substring(0,o),c=r.substring(o+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new ep(this._mainRule.clone(),tp.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(t+1,c,i,n,s,a)}_doInsertHere(t,r,i,n,s){if(r===null){this._mainRule.acceptOverwrite(t,i,n,s);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let l=this._rulesWithParentScopes[a];if(sk(l.parentScopes,r)===0){l.acceptOverwrite(t,i,n,s);return}}i===-1&&(i=this._mainRule.fontStyle),n===0&&(n=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new tp(t,r,i,n,s))}},Ra=class Vr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Vr.getLanguageId(t),i=Vr.getTokenType(t),n=Vr.getFontStyle(t),s=Vr.getForeground(t),a=Vr.getBackground(t);console.log({languageId:r,tokenType:i,fontStyle:n,foreground:s,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,i,n,s,a,o){let l=Vr.getLanguageId(t),c=Vr.getTokenType(t),u=Vr.containsBalancedBrackets(t)?1:0,h=Vr.getFontStyle(t),f=Vr.getForeground(t),d=Vr.getBackground(t);return r!==0&&(l=r),i!==8&&(c=i),n!==null&&(u=n?1:0),s!==-1&&(h=s),a!==0&&(f=a),o!==0&&(d=o),(l<<0|c<<8|u<<10|h<<11|f<<15|d<<24)>>>0}};function nu(e,t){const r=[],i=uB(e);let n=i.next();for(;n!==null;){let l=0;if(n.length===2&&n.charAt(1)===":"){switch(n.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${n} in scope selector`)}n=i.next()}let c=a();if(r.push({matcher:c,priority:l}),n!==",")break;n=i.next()}return r;function s(){if(n==="-"){n=i.next();const l=s();return c=>!!l&&!l(c)}if(n==="("){n=i.next();const l=o();return n===")"&&(n=i.next()),l}if(Ob(n)){const l=[];do l.push(n),n=i.next();while(Ob(n));return c=>t(l,c)}return null}function a(){const l=[];let c=s();for(;c;)l.push(c),c=s();return u=>l.every(h=>h(u))}function o(){const l=[];let c=a();for(;c&&(l.push(c),n==="|"||n===",");){do n=i.next();while(n==="|"||n===",");c=a()}return u=>l.some(h=>h(u))}}function Ob(e){return!!e&&!!e.match(/[\w\.:]+/)}function uB(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const i=r[0];return r=t.exec(e),i}}}function uk(e){typeof e.dispose=="function"&&e.dispose()}var ul=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},hB=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},dB=class{constructor(){Z(this,"_references",[]);Z(this,"_seenReferenceKeys",new Set);Z(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},fB=class{constructor(e,t){Z(this,"seenFullScopeRequests",new Set);Z(this,"seenPartialScopeRequests",new Set);Z(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ul(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new dB;for(const r of e)pB(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof ul){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function pB(e,t,r,i){const n=r.lookup(e.scopeName);if(!n){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=r.lookup(t);e instanceof ul?Mc({baseGrammar:s,selfGrammar:n},i):rp(e.ruleName,{baseGrammar:s,selfGrammar:n,repository:n.repository},i);const a=r.injections(e.scopeName);if(a)for(const o of a)i.add(new ul(o))}function rp(e,t,r){if(t.repository&&t.repository[e]){const i=t.repository[e];su([i],t,r)}}function Mc(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&su(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&su(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function su(e,t,r){for(const i of e){if(r.visitedRule.has(i))continue;r.visitedRule.add(i);const n=i.repository?rk({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&su(i.patterns,{...t,repository:n},r);const s=i.include;if(!s)continue;const a=hk(s);switch(a.kind){case 0:Mc({...t,selfGrammar:t.baseGrammar},r);break;case 1:Mc(t,r);break;case 2:rp(a.ruleName,{...t,repository:n},r);break;case 3:case 4:const o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const l={baseGrammar:t.baseGrammar,selfGrammar:o,repository:n};a.kind===4?rp(a.ruleName,l,r):Mc(l,r)}else a.kind===4?r.add(new hB(a.scopeName,a.ruleName)):r.add(new ul(a.scopeName));break}}}var gB=class{constructor(){Z(this,"kind",0)}},mB=class{constructor(){Z(this,"kind",1)}},bB=class{constructor(e){Z(this,"kind",2);this.ruleName=e}},yB=class{constructor(e){Z(this,"kind",3);this.scopeName=e}},xB=class{constructor(e,t){Z(this,"kind",4);this.scopeName=e,this.ruleName=t}};function hk(e){if(e==="$base")return new gB;if(e==="$self")return new mB;const t=e.indexOf("#");if(t===-1)return new yB(e);if(t===0)return new bB(e.substring(1));{const r=e.substring(0,t),i=e.substring(t+1);return new xB(r,i)}}var CB=/\\(\d+)/,Nb=/\\(\d+)/g,_B=-1,dk=-2;var Bl=class{constructor(e,t,r,i){Z(this,"$location");Z(this,"id");Z(this,"_nameIsCapturing");Z(this,"_name");Z(this,"_contentNameIsCapturing");Z(this,"_contentName");this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=rc.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=rc.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${ik(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:rc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:rc.replaceCaptures(this._contentName,e,t)}},kB=class extends Bl{constructor(t,r,i,n,s){super(t,r,i,n);Z(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,r){throw new Error("Not supported!")}compile(t,r){throw new Error("Not supported!")}compileAG(t,r,i,n){throw new Error("Not supported!")}},TB=class extends Bl{constructor(t,r,i,n,s){super(t,r,i,null);Z(this,"_match");Z(this,"captures");Z(this,"_cachedCompiledPatterns");this._match=new hl(n,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,r){r.push(this._match)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,i,n){return this._getCachedCompiledPatterns(t).compileAG(t,i,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new dl,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Db=class extends Bl{constructor(t,r,i,n,s){super(t,r,i,n);Z(this,"hasMissingPatterns");Z(this,"patterns");Z(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,r){for(const i of this.patterns)t.getRule(i).collectPatterns(t,r)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,i,n){return this._getCachedCompiledPatterns(t).compileAG(t,i,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new dl,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ip=class extends Bl{constructor(t,r,i,n,s,a,o,l,c,u){super(t,r,i,n);Z(this,"_begin");Z(this,"beginCaptures");Z(this,"_end");Z(this,"endHasBackReferences");Z(this,"endCaptures");Z(this,"applyEndPatternLast");Z(this,"hasMissingPatterns");Z(this,"patterns");Z(this,"_cachedCompiledPatterns");this._begin=new hl(s,this.id),this.beginCaptures=a,this._end=new hl(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,r){return this._end.resolveBackReferences(t,r)}collectPatterns(t,r){r.push(this._begin)}compile(t,r){return this._getCachedCompiledPatterns(t,r).compile(t)}compileAG(t,r,i,n){return this._getCachedCompiledPatterns(t,r).compileAG(t,i,n)}_getCachedCompiledPatterns(t,r){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new dl;for(const i of this.patterns)t.getRule(i).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,r):this._cachedCompiledPatterns.setSource(0,r)),this._cachedCompiledPatterns}},au=class extends Bl{constructor(t,r,i,n,s,a,o,l,c){super(t,r,i,n);Z(this,"_begin");Z(this,"beginCaptures");Z(this,"whileCaptures");Z(this,"_while");Z(this,"whileHasBackReferences");Z(this,"hasMissingPatterns");Z(this,"patterns");Z(this,"_cachedCompiledPatterns");Z(this,"_cachedCompiledWhilePatterns");this._begin=new hl(s,this.id),this.beginCaptures=a,this.whileCaptures=l,this._while=new hl(o,dk),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,r){return this._while.resolveBackReferences(t,r)}collectPatterns(t,r){r.push(this._begin)}compile(t,r){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,r,i,n){return this._getCachedCompiledPatterns(t).compileAG(t,i,n)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new dl;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,r){return this._getCachedCompiledWhilePatterns(t,r).compile(t)}compileWhileAG(t,r,i,n){return this._getCachedCompiledWhilePatterns(t,r).compileAG(t,i,n)}_getCachedCompiledWhilePatterns(t,r){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new dl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,r||"￿"),this._cachedCompiledWhilePatterns}},fk=class dr{static createCaptureRule(t,r,i,n,s){return t.registerRule(a=>new kB(r,a,i,n,s))}static getCompiledRuleId(t,r,i){return t.id||r.registerRule(n=>{if(t.id=n,t.match)return new TB(t.$vscodeTextmateLocation,t.id,t.name,t.match,dr._compileCaptures(t.captures,r,i));if(typeof t.begin>"u"){t.repository&&(i=rk({},i,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new Db(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,dr._compilePatterns(s,r,i))}return t.while?new au(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,dr._compileCaptures(t.beginCaptures||t.captures,r,i),t.while,dr._compileCaptures(t.whileCaptures||t.captures,r,i),dr._compilePatterns(t.patterns,r,i)):new ip(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,dr._compileCaptures(t.beginCaptures||t.captures,r,i),t.end,dr._compileCaptures(t.endCaptures||t.captures,r,i),t.applyEndPatternLast,dr._compilePatterns(t.patterns,r,i))}),t.id}static _compileCaptures(t,r,i){let n=[];if(t){let s=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>s&&(s=o)}for(let a=0;a<=s;a++)n[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let l=0;t[a].patterns&&(l=dr.getCompiledRuleId(t[a],r,i)),n[o]=dr.createCaptureRule(r,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,l)}}return n}static _compilePatterns(t,r,i){let n=[];if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s];let l=-1;if(o.include){const c=hk(o.include);switch(c.kind){case 0:case 1:l=dr.getCompiledRuleId(i[o.include],r,i);break;case 2:let u=i[c.ruleName];u&&(l=dr.getCompiledRuleId(u,r,i));break;case 3:case 4:const h=c.scopeName,f=c.kind===4?c.ruleName:null,d=r.getExternalGrammar(h,i);if(d)if(f){let p=d.repository[f];p&&(l=dr.getCompiledRuleId(p,r,d.repository))}else l=dr.getCompiledRuleId(d.repository.$self,r,d.repository);break}}else l=dr.getCompiledRuleId(o,r,i);if(l!==-1){const c=r.getRule(l);let u=!1;if((c instanceof Db||c instanceof ip||c instanceof au)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;n.push(l)}}return{patterns:n,hasMissingPatterns:(t?t.length:0)!==n.length}}},hl=class pk{constructor(t,r){Z(this,"source");Z(this,"ruleId");Z(this,"hasAnchor");Z(this,"hasBackReferences");Z(this,"_anchorCache");if(t&&typeof t=="string"){const i=t.length;let n=0,s=[],a=!1;for(let o=0;o<i;o++)if(t.charAt(o)==="\\"&&o+1<i){const c=t.charAt(o+1);c==="z"?(s.push(t.substring(n,o)),s.push("$(?!\\n)(?<!\\n)"),n=o+2):(c==="A"||c==="G")&&(a=!0),o++}this.hasAnchor=a,n===0?this.source=t:(s.push(t.substring(n,i)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=CB.test(this.source):this.hasBackReferences=!1}clone(){return new pk(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let i=r.map(n=>t.substring(n.start,n.end));return Nb.lastIndex=0,this.source.replace(Nb,(n,s)=>ak(i[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],i=[],n=[],s,a,o,l;for(s=0,a=this.source.length;s<a;s++)o=this.source.charAt(s),t[s]=o,r[s]=o,i[s]=o,n[s]=o,o==="\\"&&s+1<a&&(l=this.source.charAt(s+1),l==="A"?(t[s+1]="￿",r[s+1]="￿",i[s+1]="A",n[s+1]="A"):l==="G"?(t[s+1]="￿",r[s+1]="G",i[s+1]="￿",n[s+1]="G"):(t[s+1]=l,r[s+1]=l,i[s+1]=l,n[s+1]=l),s++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:i.join(""),A1_G1:n.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},dl=class{constructor(){Z(this,"_items");Z(this,"_hasAnchors");Z(this,"_cached");Z(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Pb(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let i=this._items.map(n=>n.resolveAnchors(t,r));return new Pb(e,i,this._items.map(n=>n.ruleId))}},Pb=class{constructor(e,t,r){Z(this,"scanner");this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
8
- `)}findNextMatchSync(e,t,r){const i=this.scanner.findNextMatchSync(e,t,r);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},gd=class{constructor(e,t){this.languageId=e,this.tokenType=t}},sn,EB=(sn=class{constructor(t,r){Z(this,"_defaultAttributes");Z(this,"_embeddedLanguagesMatcher");Z(this,"_getBasicScopeAttributes",new ok(t=>{const r=this._scopeToLanguage(t),i=this._toStandardTokenType(t);return new gd(r,i)}));this._defaultAttributes=new gd(t,8),this._embeddedLanguagesMatcher=new wB(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?sn._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const r=t.match(sn.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},Z(sn,"_NULL_SCOPE_METADATA",new gd(0,0)),Z(sn,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),sn),wB=class{constructor(e){Z(this,"values");Z(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,i])=>ak(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Mb=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function gk(e,t,r,i,n,s,a,o){const l=t.content.length;let c=!1,u=-1;if(a){const d=SB(e,t,r,i,n,s);n=d.stack,i=d.linePos,r=d.isFirstLine,u=d.anchorPosition}const h=Date.now();for(;!c;){if(o!==0&&Date.now()-h>o)return new Mb(n,!0);f()}return new Mb(n,!1);function f(){const d=AB(e,t,r,i,n,u);if(!d){s.produce(n,l),c=!0;return}const p=d.captureIndices,g=d.matchedRuleId,b=p&&p.length>0?p[0].end>i:!1;if(g===_B){const m=n.getRule(e);s.produce(n,p[0].start),n=n.withContentNameScopesList(n.nameScopesList),Bo(e,t,r,n,s,m.endCaptures,p),s.produce(n,p[0].end);const _=n;if(n=n.parent,u=_.getAnchorPos(),!b&&_.getEnterPos()===i){n=_,s.produce(n,l),c=!0;return}}else{const m=e.getRule(g);s.produce(n,p[0].start);const _=n,k=m.getName(t.content,p),T=n.contentNameScopesList.pushAttributed(k,e);if(n=n.push(g,i,u,p[0].end===l,null,T,T),m instanceof ip){const E=m;Bo(e,t,r,n,s,E.beginCaptures,p),s.produce(n,p[0].end),u=p[0].end;const S=E.getContentName(t.content,p),B=T.pushAttributed(S,e);if(n=n.withContentNameScopesList(B),E.endHasBackReferences&&(n=n.withEndRule(E.getEndWithResolvedBackReferences(t.content,p))),!b&&_.hasSameRuleAs(n)){n=n.pop(),s.produce(n,l),c=!0;return}}else if(m instanceof au){const E=m;Bo(e,t,r,n,s,E.beginCaptures,p),s.produce(n,p[0].end),u=p[0].end;const S=E.getContentName(t.content,p),B=T.pushAttributed(S,e);if(n=n.withContentNameScopesList(B),E.whileHasBackReferences&&(n=n.withEndRule(E.getWhileWithResolvedBackReferences(t.content,p))),!b&&_.hasSameRuleAs(n)){n=n.pop(),s.produce(n,l),c=!0;return}}else if(Bo(e,t,r,n,s,m.captures,p),s.produce(n,p[0].end),n=n.pop(),!b){n=n.safePop(),s.produce(n,l),c=!0;return}}p[0].end>i&&(i=p[0].end,r=!1)}}function SB(e,t,r,i,n,s){let a=n.beginRuleCapturedEOL?0:-1;const o=[];for(let l=n;l;l=l.pop()){const c=l.getRule(e);c instanceof au&&o.push({rule:c,stack:l})}for(let l=o.pop();l;l=o.pop()){const{ruleScanner:c,findOptions:u}=IB(l.rule,e,l.stack.endRule,r,i===a),h=c.findNextMatchSync(t,i,u);if(h){if(h.ruleId!==dk){n=l.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(s.produce(l.stack,h.captureIndices[0].start),Bo(e,t,r,l.stack,s,l.rule.whileCaptures,h.captureIndices),s.produce(l.stack,h.captureIndices[0].end),a=h.captureIndices[0].end,h.captureIndices[0].end>i&&(i=h.captureIndices[0].end,r=!1))}else{n=l.stack.pop();break}}return{stack:n,linePos:i,anchorPosition:a,isFirstLine:r}}function AB(e,t,r,i,n,s){const a=vB(e,t,r,i,n,s),o=e.getInjections();if(o.length===0)return a;const l=LB(o,e,t,r,i,n,s);if(!l)return a;if(!a)return l;const c=a.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:a}function vB(e,t,r,i,n,s){const a=n.getRule(e),{ruleScanner:o,findOptions:l}=mk(a,e,n.endRule,r,i===s),c=o.findNextMatchSync(t,i,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function LB(e,t,r,i,n,s,a){let o=Number.MAX_VALUE,l=null,c,u=0;const h=s.contentNameScopesList.getScopeNames();for(let f=0,d=e.length;f<d;f++){const p=e[f];if(!p.matcher(h))continue;const g=t.getRule(p.ruleId),{ruleScanner:b,findOptions:m}=mk(g,t,null,i,n===a),_=b.findNextMatchSync(r,n,m);if(!_)continue;const k=_.captureIndices[0].start;if(!(k>=o)&&(o=k,l=_.captureIndices,c=_.ruleId,u=p.priority,o===n))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function mk(e,t,r,i,n){return{ruleScanner:e.compileAG(t,r,i,n),findOptions:0}}function IB(e,t,r,i,n){return{ruleScanner:e.compileWhileAG(t,r,i,n),findOptions:0}}function Bo(e,t,r,i,n,s,a){if(s.length===0)return;const o=t.content,l=Math.min(s.length,a.length),c=[],u=a[0].end;for(let h=0;h<l;h++){const f=s[h];if(f===null)continue;const d=a[h];if(d.length===0)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)n.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?n.produceFromScopes(c[c.length-1].scopes,d.start):n.produce(i,d.start),f.retokenizeCapturedWithRuleId){const g=f.getName(o,a),b=i.contentNameScopesList.pushAttributed(g,e),m=f.getContentName(o,a),_=b.pushAttributed(m,e),k=i.push(f.retokenizeCapturedWithRuleId,d.start,-1,!1,null,b,_),T=e.createOnigString(o.substring(0,d.end));gk(e,T,r&&d.start===0,d.start,k,n,!1,0),uk(T);continue}const p=f.getName(o,a);if(p!==null){const b=(c.length>0?c[c.length-1].scopes:i.contentNameScopesList).pushAttributed(p,e);c.push(new BB(b,d.end))}}for(;c.length>0;)n.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var BB=class{constructor(e,t){Z(this,"scopes");Z(this,"endPos");this.scopes=e,this.endPos=t}};function RB(e,t,r,i,n,s,a,o){return new NB(e,t,r,i,n,s,a,o)}function Fb(e,t,r,i,n){const s=nu(t,ou),a=fk.getCompiledRuleId(r,i,n.repository);for(const o of s)e.push({debugSelector:t,matcher:o.matcher,ruleId:a,grammar:n,priority:o.priority})}function ou(e,t){if(t.length<e.length)return!1;let r=0;return e.every(i=>{for(let n=r;n<t.length;n++)if(OB(t[n],i))return r=n+1,!0;return!1})}function OB(e,t){if(!e)return!1;if(e===t)return!0;const r=t.length;return e.length>r&&e.substr(0,r)===t&&e[r]==="."}var NB=class{constructor(e,t,r,i,n,s,a,o){Z(this,"_rootId");Z(this,"_lastRuleId");Z(this,"_ruleId2desc");Z(this,"_includedGrammars");Z(this,"_grammarRepository");Z(this,"_grammar");Z(this,"_injections");Z(this,"_basicScopeAttributesProvider");Z(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=o,this._basicScopeAttributesProvider=new EB(r,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=$b(t,null),this._injections=null,this._tokenTypeMatchers=[],n)for(const l of Object.keys(n)){const c=nu(l,ou);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:n[l]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:n=>n===this._rootScopeName?this._grammar:this.getExternalGrammar(n),injections:n=>this._grammarRepository.injections(n)},t=[],r=this._rootScopeName,i=e.lookup(r);if(i){const n=i.injections;if(n)for(let a in n)Fb(t,a,n[a],this,i);const s=this._grammarRepository.injections(r);s&&s.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const l=o.injectionSelector;l&&Fb(t,l,o,this,o)}})}return t.sort((n,s)=>n.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=$b(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const i=this._tokenize(e,t,!1,r);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,r=0){const i=this._tokenize(e,t,!0,r);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,r,i){this._rootId===-1&&(this._rootId=fk.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let n;if(!t||t===np.NULL){n=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=Ra.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let d;f?d=Vo.createRootAndLookUpScopeName(f,h,this):d=Vo.createRoot("unknown",h),t=new np(null,this._rootId,-1,-1,!1,null,d,d)}else n=!1,t.reset();e=e+`
9
- `;const s=this.createOnigString(e),a=s.content.length,o=new PB(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=gk(this,s,n,0,t,o,!0,i);return uk(s),{lineLength:a,lineTokens:o,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function $b(e,t){return e=JI(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Vo=class Ei{constructor(t,r,i){this.parent=t,this.scopePath=r,this.tokenAttributes=i}static fromExtension(t,r){let i=t,n=(t==null?void 0:t.scopePath)??null;for(const s of r)n=pd.push(n,s.scopeNames),i=new Ei(i,n,s.encodedTokenAttributes);return i}static createRoot(t,r){return new Ei(null,new pd(null,t),r)}static createRootAndLookUpScopeName(t,r,i){const n=i.getMetadataForScope(t),s=new pd(null,t),a=i.themeProvider.themeMatch(s),o=Ei.mergeAttributes(r,n,a);return new Ei(null,s,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Ei.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,i){let n=-1,s=0,a=0;return i!==null&&(n=i.fontStyle,s=i.foregroundId,a=i.backgroundId),Ra.set(t,r.languageId,r.tokenType,null,n,s,a)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return Ei._pushAttributed(this,t,r);const i=t.split(/ /g);let n=this;for(const s of i)n=Ei._pushAttributed(n,s,r);return n}static _pushAttributed(t,r,i){const n=i.getMetadataForScope(r),s=t.scopePath.push(r),a=i.themeProvider.themeMatch(s),o=Ei.mergeAttributes(t.tokenAttributes,n,a);return new Ei(t,s,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var n;const r=[];let i=this;for(;i&&i!==t;)r.push({encodedTokenAttributes:i.tokenAttributes,scopeNames:i.scopePath.getExtensionIfDefined(((n=i.parent)==null?void 0:n.scopePath)??null)}),i=i.parent;return i===t?r.reverse():void 0}},Qr,np=(Qr=class{constructor(t,r,i,n,s,a,o,l){Z(this,"_stackElementBrand");Z(this,"_enterPos");Z(this,"_anchorPos");Z(this,"depth");this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=s,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=i,this._anchorPos=n}equals(t){return t===null?!1:Qr._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?Vo.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Qr._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,i,n,s,a,o){return new Qr(this,t,r,i,n,s,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){var i,n;return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${(i=this.nameScopesList)==null?void 0:i.toString()}, ${(n=this.contentNameScopesList)==null?void 0:n.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Qr(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){var t,r,i;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((r=this.nameScopesList)==null?void 0:r.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((i=this.contentNameScopesList)==null?void 0:i.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,r){const i=Vo.fromExtension((t==null?void 0:t.nameScopesList)??null,r.nameScopesList);return new Qr(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,i,Vo.fromExtension(i,r.contentNameScopesList))}},Z(Qr,"NULL",new Qr(null,0,0,0,!1,null,null,null)),Qr),DB=class{constructor(e,t){Z(this,"balancedBracketScopes");Z(this,"unbalancedBracketScopes");Z(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):nu(r,ou).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>nu(r,ou).map(i=>i.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},PB=class{constructor(e,t,r,i){Z(this,"_emitBinaryTokens");Z(this,"_lineText");Z(this,"_tokens");Z(this,"_binaryTokens");Z(this,"_lastTokenEndIndex");Z(this,"_tokenTypeOverrides");this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var i;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=(e==null?void 0:e.tokenAttributes)??0,s=!1;if((i=this.balancedBracketSelectors)!=null&&i.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(e==null?void 0:e.getScopeNames())??[];for(const o of this._tokenTypeOverrides)o.matcher(a)&&(n=Ra.set(n,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(a))}if(s&&(n=Ra.set(n,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}const r=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let i=0,n=this._binaryTokens.length;i<n;i++)r[i]=this._binaryTokens[i];return r}},MB=class{constructor(e,t){Z(this,"_grammars",new Map);Z(this,"_rawGrammars",new Map);Z(this,"_injectionGrammars",new Map);Z(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,i,n){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,RB(e,s,t,r,i,n,this,this._onigLib))}return this._grammars.get(e)}},FB=class{constructor(t){Z(this,"_options");Z(this,"_syncRegistry");Z(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new MB(iu.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme(iu.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,i){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:i})}loadGrammarWithConfiguration(t,r,i){return this._loadGrammar(t,r,i.embeddedLanguages,i.tokenTypes,new DB(i.balancedBracketSelectors||[],i.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,i,n,s){const a=new fB(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(t,r,i,n,s)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const i=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,i)}}addGrammar(t,r=[],i=0,n=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,i,n)}_grammarForScopeName(t,r=0,i=null,n=null,s=null){return this._syncRegistry.grammarForScopeName(t,r,i,n,s)}},sp=np.NULL;const bk=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Rl=class{constructor(t,r,i){this.normal=r,this.property=t,i&&(this.space=i)}};Rl.prototype.normal={};Rl.prototype.property={};Rl.prototype.space=void 0;function yk(e,t){const r={},i={};for(const n of e)Object.assign(r,n.property),Object.assign(i,n.normal);return new Rl(r,i,t)}function fl(e){return e.toLowerCase()}class $r{constructor(t,r){this.attribute=r,this.property=t}}$r.prototype.attribute="";$r.prototype.booleanish=!1;$r.prototype.boolean=!1;$r.prototype.commaOrSpaceSeparated=!1;$r.prototype.commaSeparated=!1;$r.prototype.defined=!1;$r.prototype.mustUseProperty=!1;$r.prototype.number=!1;$r.prototype.overloadedBoolean=!1;$r.prototype.property="";$r.prototype.spaceSeparated=!1;$r.prototype.space=void 0;let $B=0;const ne=Rs(),Ue=Rs(),ap=Rs(),At=Rs(),Se=Rs(),ms=Rs(),zr=Rs();function Rs(){return 2**++$B}const op=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Ue,commaOrSpaceSeparated:zr,commaSeparated:ms,number:At,overloadedBoolean:ap,spaceSeparated:Se},Symbol.toStringTag,{value:"Module"})),md=Object.keys(op);class Dg extends $r{constructor(t,r,i,n){let s=-1;if(super(t,r),Hb(this,"space",n),typeof i=="number")for(;++s<md.length;){const a=md[s];Hb(this,md[s],(i&op[a])===op[a])}}}Dg.prototype.defined=!0;function Hb(e,t,r){r&&(e[t]=r)}function Ua(e){const t={},r={};for(const[i,n]of Object.entries(e.properties)){const s=new Dg(i,e.transform(e.attributes||{},i),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,r[fl(i)]=i,r[fl(s.attribute)]=i}return new Rl(t,r,e.space)}const xk=Ua({properties:{ariaActiveDescendant:null,ariaAtomic:Ue,ariaAutoComplete:null,ariaBusy:Ue,ariaChecked:Ue,ariaColCount:At,ariaColIndex:At,ariaColSpan:At,ariaControls:Se,ariaCurrent:null,ariaDescribedBy:Se,ariaDetails:null,ariaDisabled:Ue,ariaDropEffect:Se,ariaErrorMessage:null,ariaExpanded:Ue,ariaFlowTo:Se,ariaGrabbed:Ue,ariaHasPopup:null,ariaHidden:Ue,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Se,ariaLevel:At,ariaLive:null,ariaModal:Ue,ariaMultiLine:Ue,ariaMultiSelectable:Ue,ariaOrientation:null,ariaOwns:Se,ariaPlaceholder:null,ariaPosInSet:At,ariaPressed:Ue,ariaReadOnly:Ue,ariaRelevant:null,ariaRequired:Ue,ariaRoleDescription:Se,ariaRowCount:At,ariaRowIndex:At,ariaRowSpan:At,ariaSelected:Ue,ariaSetSize:At,ariaSort:null,ariaValueMax:At,ariaValueMin:At,ariaValueNow:At,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ck(e,t){return t in e?e[t]:t}function _k(e,t){return Ck(e,t.toLowerCase())}const HB=Ua({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ms,acceptCharset:Se,accessKey:Se,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alpha:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:Se,autoFocus:ne,autoPlay:ne,blocking:Se,capture:null,charSet:null,checked:ne,cite:null,className:Se,closedBy:null,colorSpace:null,cols:At,colSpan:At,command:null,commandFor:null,content:null,contentEditable:Ue,controls:ne,controlsList:Se,coords:At|ms,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:ap,draggable:Ue,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:Se,height:At,hidden:ap,high:At,href:null,hrefLang:null,htmlFor:Se,httpEquiv:Se,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:Se,itemRef:Se,itemScope:ne,itemType:Se,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:At,manifest:null,max:null,maxLength:At,media:null,method:null,min:null,minLength:At,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ne,optimum:At,pattern:null,ping:Se,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:Se,required:ne,reversed:ne,rows:At,rowSpan:At,sandbox:Se,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootCustomElementRegistry:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shadowRootSerializable:ne,shape:null,size:At,sizes:null,slot:null,span:At,spellCheck:Ue,src:null,srcDoc:null,srcLang:null,srcSet:null,start:At,step:null,style:null,tabIndex:At,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Ue,width:At,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Se,axis:null,background:null,bgColor:null,border:At,borderColor:null,bottomMargin:At,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:At,leftMargin:At,link:null,longDesc:null,lowSrc:null,marginHeight:At,marginWidth:At,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:At,rules:null,scheme:null,scrolling:Ue,standby:null,summary:null,text:null,topMargin:At,valueType:null,version:null,vAlign:null,vLink:null,vSpace:At,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ne,disablePictureInPicture:ne,disableRemotePlayback:ne,exportParts:ms,part:Se,prefix:null,property:null,results:At,security:null,unselectable:null},space:"html",transform:_k}),zB=Ua({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:zr,accentHeight:At,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:At,amplitude:At,arabicForm:null,ascent:At,attributeName:null,attributeType:null,azimuth:At,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:At,by:null,calcMode:null,capHeight:At,className:Se,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:At,diffuseConstant:At,direction:null,display:null,dur:null,divisor:At,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:At,enableBackground:null,end:null,event:null,exponent:At,externalResourcesRequired:null,fill:null,fillOpacity:At,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ms,g2:ms,glyphName:ms,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:At,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:At,horizOriginX:At,horizOriginY:At,id:null,ideographic:At,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:At,k:At,k1:At,k2:At,k3:At,k4:At,kernelMatrix:zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:At,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:At,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:At,overlineThickness:At,paintOrder:null,panose1:null,path:null,pathLength:At,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Se,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:At,pointsAtY:At,pointsAtZ:At,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zr,rev:zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zr,requiredFeatures:zr,requiredFonts:zr,requiredFormats:zr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:At,specularExponent:At,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:At,strikethroughThickness:At,string:null,stroke:null,strokeDashArray:zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:At,strokeOpacity:At,strokeWidth:null,style:null,surfaceScale:At,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zr,tabIndex:At,tableValues:null,target:null,targetX:At,targetY:At,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:At,underlineThickness:At,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:At,values:null,vAlphabetic:At,vMathematical:At,vectorEffect:null,vHanging:At,vIdeographic:At,version:null,vertAdvY:At,vertOriginX:At,vertOriginY:At,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:At,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ck}),kk=Ua({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Tk=Ua({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_k}),Ek=Ua({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),UB={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},qB=/[A-Z]/g,zb=/-[a-z]/g,WB=/^data[-\w.:]+$/i;function Ol(e,t){const r=fl(t);let i=t,n=$r;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&WB.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(zb,VB);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!zb.test(s)){let a=s.replace(qB,jB);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}n=Dg}return new n(i,t)}function jB(e){return"-"+e.toLowerCase()}function VB(e){return e.charAt(1).toUpperCase()}const qa=yk([xk,HB,kk,Tk,Ek],"html"),Mi=yk([xk,zB,kk,Tk,Ek],"svg"),Ub={}.hasOwnProperty;function Pg(e,t){const r=t||{};function i(n,...s){let a=i.invalid;const o=i.handlers;if(n&&Ub.call(n,e)){const l=String(n[e]);a=Ub.call(o,l)?o[l]:i.unknown}if(a)return a.call(this,n,...s)}return i.handlers=r.handlers||{},i.invalid=r.invalid,i.unknown=r.unknown,i}const GB=/["&'<>`]/g,YB=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,XB=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,KB=/[|\\{}()[\]^$+*?.]/g,qb=new WeakMap;function QB(e,t){if(e=e.replace(t.subset?ZB(t.subset):GB,i),t.subset||t.escapeOnly)return e;return e.replace(YB,r).replace(XB,i);function r(n,s,a){return t.format((n.charCodeAt(0)-55296)*1024+n.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function i(n,s,a){return t.format(n.charCodeAt(0),a.charCodeAt(s+1),t)}}function ZB(e){let t=qb.get(e);return t||(t=JB(e),qb.set(e,t)),t}function JB(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(KB,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const tR=/[\dA-Fa-f]/;function eR(e,t,r){const i="&#x"+e.toString(16).toUpperCase();return r&&t&&!tR.test(String.fromCharCode(t))?i:i+";"}const rR=/\d/;function iR(e,t,r){const i="&#"+String(e);return r&&t&&!rR.test(String.fromCharCode(t))?i:i+";"}const nR=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],bd={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},sR=["cent","copy","divide","gt","lt","not","para","times"],wk={}.hasOwnProperty,lp={};let ic;for(ic in bd)wk.call(bd,ic)&&(lp[bd[ic]]=ic);const aR=/[^\dA-Za-z]/;function oR(e,t,r,i){const n=String.fromCharCode(e);if(wk.call(lp,n)){const s=lp[n],a="&"+s;return r&&nR.includes(s)&&!sR.includes(s)&&(!i||t&&t!==61&&aR.test(String.fromCharCode(t)))?a:a+";"}return""}function lR(e,t,r){let i=eR(e,t,r.omitOptionalSemicolons),n;if((r.useNamedReferences||r.useShortestReferences)&&(n=oR(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!n)&&r.useShortestReferences){const s=iR(e,t,r.omitOptionalSemicolons);s.length<i.length&&(i=s)}return n&&(!r.useShortestReferences||n.length<i.length)?n:i}function ua(e,t){return QB(e,Object.assign({format:lR},t))}const cR=/^>|^->|<!--|-->|--!>|<!-$/g,uR=[">"],hR=["<",">"];function dR(e,t,r,i){return i.settings.bogusComments?"<?"+ua(e.value,Object.assign({},i.settings.characterReferences,{subset:uR}))+">":"<!--"+e.value.replace(cR,n)+"-->";function n(s){return ua(s,Object.assign({},i.settings.characterReferences,{subset:hR}))}}function fR(e,t,r,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"}function lu(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,n=r.indexOf(t);for(;n!==-1;)i++,n=r.indexOf(t,n+t.length);return i}function Wb(e){const t=[],r=String(e||"");let i=r.indexOf(","),n=0,s=!1;for(;!s;){i===-1&&(i=r.length,s=!0);const a=r.slice(n,i).trim();(a||!s)&&t.push(a),n=i+1,i=r.indexOf(",",n)}return t}function Mg(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}function jb(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Fg(e){return e.join(" ").trim()}const pR=/[ \t\n\f\r]/g;function rh(e){return typeof e=="object"?e.type==="text"?Vb(e.value):!1:Vb(e)}function Vb(e){return e.replace(pR,"")===""}const Qe=Ak(1),Sk=Ak(-1),gR=[];function Ak(e){return t;function t(r,i,n){const s=r?r.children:gR;let a=(i||0)+e,o=s[a];if(!n)for(;o&&rh(o);)a+=e,o=s[a];return o}}const mR={}.hasOwnProperty;function vk(e){return t;function t(r,i,n){return mR.call(e,r.tagName)&&e[r.tagName](r,i,n)}}const $g=vk({body:yR,caption:yd,colgroup:yd,dd:kR,dt:_R,head:yd,html:bR,li:CR,optgroup:TR,option:ER,p:xR,rp:Gb,rt:Gb,tbody:SR,td:Yb,tfoot:AR,th:Yb,thead:wR,tr:vR});function yd(e,t,r){const i=Qe(r,t,!0);return!i||i.type!=="comment"&&!(i.type==="text"&&rh(i.value.charAt(0)))}function bR(e,t,r){const i=Qe(r,t);return!i||i.type!=="comment"}function yR(e,t,r){const i=Qe(r,t);return!i||i.type!=="comment"}function xR(e,t,r){const i=Qe(r,t);return i?i.type==="element"&&(i.tagName==="address"||i.tagName==="article"||i.tagName==="aside"||i.tagName==="blockquote"||i.tagName==="details"||i.tagName==="div"||i.tagName==="dl"||i.tagName==="fieldset"||i.tagName==="figcaption"||i.tagName==="figure"||i.tagName==="footer"||i.tagName==="form"||i.tagName==="h1"||i.tagName==="h2"||i.tagName==="h3"||i.tagName==="h4"||i.tagName==="h5"||i.tagName==="h6"||i.tagName==="header"||i.tagName==="hgroup"||i.tagName==="hr"||i.tagName==="main"||i.tagName==="menu"||i.tagName==="nav"||i.tagName==="ol"||i.tagName==="p"||i.tagName==="pre"||i.tagName==="section"||i.tagName==="table"||i.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function CR(e,t,r){const i=Qe(r,t);return!i||i.type==="element"&&i.tagName==="li"}function _R(e,t,r){const i=Qe(r,t);return!!(i&&i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd"))}function kR(e,t,r){const i=Qe(r,t);return!i||i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd")}function Gb(e,t,r){const i=Qe(r,t);return!i||i.type==="element"&&(i.tagName==="rp"||i.tagName==="rt")}function TR(e,t,r){const i=Qe(r,t);return!i||i.type==="element"&&i.tagName==="optgroup"}function ER(e,t,r){const i=Qe(r,t);return!i||i.type==="element"&&(i.tagName==="option"||i.tagName==="optgroup")}function wR(e,t,r){const i=Qe(r,t);return!!(i&&i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot"))}function SR(e,t,r){const i=Qe(r,t);return!i||i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot")}function AR(e,t,r){return!Qe(r,t)}function vR(e,t,r){const i=Qe(r,t);return!i||i.type==="element"&&i.tagName==="tr"}function Yb(e,t,r){const i=Qe(r,t);return!i||i.type==="element"&&(i.tagName==="td"||i.tagName==="th")}const LR=vk({body:RR,colgroup:OR,head:BR,html:IR,tbody:NR});function IR(e){const t=Qe(e,-1);return!t||t.type!=="comment"}function BR(e){const t=new Set;for(const i of e.children)if(i.type==="element"&&(i.tagName==="base"||i.tagName==="title")){if(t.has(i.tagName))return!1;t.add(i.tagName)}const r=e.children[0];return!r||r.type==="element"}function RR(e){const t=Qe(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&rh(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function OR(e,t,r){const i=Sk(r,t),n=Qe(e,-1,!0);return r&&i&&i.type==="element"&&i.tagName==="colgroup"&&$g(i,r.children.indexOf(i),r)?!1:!!(n&&n.type==="element"&&n.tagName==="col")}function NR(e,t,r){const i=Sk(r,t),n=Qe(e,-1);return r&&i&&i.type==="element"&&(i.tagName==="thead"||i.tagName==="tbody")&&$g(i,r.children.indexOf(i),r)?!1:!!(n&&n.type==="element"&&n.tagName==="tr")}const nc={name:[[`
10
- \f\r &/=>`.split(""),`
11
- \f\r "&'/=>\``.split("")],[`\0
12
- \f\r "&'/<=>`.split(""),`\0
13
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
14
- \f\r &>`.split(""),`\0
15
- \f\r "&'<=>\``.split("")],[`\0
16
- \f\r "&'<=>\``.split(""),`\0
17
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function DR(e,t,r,i){const n=i.schema,s=n.space==="svg"?!1:i.settings.omitOptionalTags;let a=n.space==="svg"?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase());const o=[];let l;n.space==="html"&&e.tagName==="svg"&&(i.schema=Mi);const c=PR(i,e.properties),u=i.all(n.space==="html"&&e.tagName==="template"?e.content:e);return i.schema=n,u&&(a=!1),(c||!s||!LR(e,t,r))&&(o.push("<",e.tagName,c?" "+c:""),a&&(n.space==="svg"||i.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!i.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(u),!a&&(!s||!$g(e,t,r))&&o.push("</"+e.tagName+">"),o.join("")}function PR(e,t){const r=[];let i=-1,n;if(t){for(n in t)if(t[n]!==null&&t[n]!==void 0){const s=MR(e,n,t[n]);s&&r.push(s)}}for(;++i<r.length;){const s=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&s!=='"'&&s!=="'"&&(r[i]+=" ")}return r.join("")}function MR(e,t,r){const i=Ol(e.schema,t),n=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let a=e.quote,o;if(i.overloadedBoolean&&(r===i.attribute||r==="")?r=!0:(i.boolean||i.overloadedBoolean)&&(typeof r!="string"||r===i.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const l=ua(i.attribute,Object.assign({},e.settings.characterReferences,{subset:nc.name[n][s]}));return r===!0||(r=Array.isArray(r)?(i.commaSeparated?Mg:Fg)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?l:(e.settings.preferUnquoted&&(o=ua(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:nc.unquoted[n][s]}))),o!==r&&(e.settings.quoteSmart&&lu(r,a)>lu(r,e.alternative)&&(a=e.alternative),o=a+ua(r,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?nc.single:nc.double)[n][s],attribute:!0}))+a),l+(o&&"="+o))}const FR=["<","&"];function Lk(e,t,r,i){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:ua(e.value,Object.assign({},i.settings.characterReferences,{subset:FR}))}function $R(e,t,r,i){return i.settings.allowDangerousHtml?e.value:Lk(e,t,r,i)}function HR(e,t,r,i){return i.all(e)}const zR=Pg("type",{invalid:UR,unknown:qR,handlers:{comment:dR,doctype:fR,element:DR,raw:$R,root:HR,text:Lk}});function UR(e){throw new Error("Expected node, not `"+e+"`")}function qR(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const WR={},jR={},VR=[];function GR(e,t){const r=t||WR,i=r.quote||'"',n=i==='"'?"'":'"';if(i!=='"'&&i!=="'")throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:YR,all:XR,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||bk,characterReferences:r.characterReferences||jR,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?Mi:qa,quote:i,alternative:n}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function YR(e,t,r){return zR(e,t,r,this)}function XR(e){const t=[],r=e&&e.children||VR;let i=-1;for(;++i<r.length;)t[i]=this.one(r[i],i,e);return t.join("")}function cu(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},i=typeof e=="string"?e:e.name;for(const[n,s]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof s=="string"?r[n]=s:n===i&&Object.assign(r,s);return r}function Pn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function KR(e){return Array.isArray(e)?e:[e]}async function Ik(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Hg(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Bk(e){return e==="ansi"||Hg(e)}function zg(e){return e==="none"}function Rk(e){return zg(e)}function Ok(e,t){var i;if(!t)return e;e.properties||(e.properties={}),(i=e.properties).class||(i.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(/\s+/g);for(const n of r)n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function ih(e,t=!1){var s;if(e.length===0)return[["",0]];const r=e.split(/(\r?\n)/g);let i=0;const n=[];for(let a=0;a<r.length;a+=2){const o=t?r[a]+(r[a+1]||""):r[a];n.push([o,i]),i+=r[a].length,i+=((s=r[a+1])==null?void 0:s.length)||0}return n}function QR(e){const t=ih(e,!0).map(([n])=>n);function r(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=n,a=0;for(const o of t){if(s<o.length)break;s-=o.length,a++}return{line:a,character:s}}function i(n,s){let a=0;for(let o=0;o<n;o++)a+=t[o].length;return a+=s,a}return{lines:t,indexToPos:r,posToIndex:i}}const Ug="light-dark()",ZR=["color","background-color"];function JR(e,t){let r=0;const i=[];for(const n of t)n>r&&i.push({...e,content:e.content.slice(r,n),offset:e.offset+r}),r=n;return r<e.content.length&&i.push({...e,content:e.content.slice(r),offset:e.offset+r}),i}function tO(e,t){const r=Array.from(t instanceof Set?t:new Set(t)).sort((i,n)=>i-n);return r.length?e.map(i=>i.flatMap(n=>{const s=r.filter(a=>n.offset<a&&a<n.offset+n.content.length).map(a=>a-n.offset).sort((a,o)=>a-o);return s.length?JR(n,s):n})):e}function eO(e,t,r,i,n="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(u=>uu(e.variants[u])),o=new Set(a.flatMap(u=>Object.keys(u))),l={},c=(u,h)=>{const f=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return r+t[u]+(h==="color"?"":f)};return a.forEach((u,h)=>{for(const f of o){const d=u[f]||"inherit";if(h===0&&i&&ZR.includes(f))if(i===Ug&&a.length>1){const p=t.findIndex(_=>_==="light"),g=t.findIndex(_=>_==="dark");if(p===-1||g===-1)throw new qe('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=a[p][f]||"inherit",m=a[g][f]||"inherit";l[f]=`light-dark(${b}, ${m})`,n==="css-vars"&&(l[c(h,f)]=d)}else l[f]=d;else n==="css-vars"&&(l[c(h,f)]=d)}}),s.htmlStyle=l,s}function uu(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&gr.Italic&&(t["font-style"]="italic"),e.fontStyle&gr.Bold&&(t["font-weight"]="bold");const r=[];e.fontStyle&gr.Underline&&r.push("underline"),e.fontStyle&gr.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function cp(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}const Nk=new WeakMap;function nh(e,t){Nk.set(e,t)}function pl(e){return Nk.get(e)}class Wa{constructor(...t){Z(this,"_stacks",{});Z(this,"lang");if(t.length===2){const[r,i]=t;this.lang=i,this._stacks=r}else{const[r,i,n]=t;this.lang=i,this._stacks={[n]:r}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,r){return new Wa(Object.fromEntries(KR(r).map(i=>[i,sp])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return rO(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function rO(e){const t=[],r=new Set;function i(n){var a;if(r.has(n))return;r.add(n);const s=(a=n==null?void 0:n.nameScopesList)==null?void 0:a.scopeName;s&&t.push(s),n.parent&&i(n.parent)}return i(e),t}function iO(e,t){if(!(e instanceof Wa))throw new qe("Invalid grammar state");return e.getInternalStack(t)}function nO(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let i=function(a){if(typeof a=="number"){if(a<0||a>r.source.length)throw new qe(`Invalid decoration offset: ${a}. Code length: ${r.source.length}`);return{...n.indexToPos(a),offset:a}}else{const o=n.lines[a.line];if(o===void 0)throw new qe(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${n.lines.length}`);let l=a.character;if(l<0&&(l=o.length+l),l<0||l>o.length)throw new qe(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,character:l,offset:n.posToIndex(a.line,l)}}};const n=QR(r.source),s=(r.options.decorations||[]).map(a=>({...a,start:i(a.start),end:i(a.end)}));sO(s),e.set(r.meta,{decorations:s,converter:n,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){var a;if(!((a=this.options.decorations)!=null&&a.length))return;const n=t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return tO(r,n)},code(r){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const i=t(this),n=Array.from(r.children).filter(h=>h.type==="element"&&h.tagName==="span");if(n.length!==i.converter.lines.length)throw new qe(`Number of lines in code element (${n.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function s(h,f,d,p){const g=n[h];let b="",m=-1,_=-1;if(f===0&&(m=0),d===0&&(_=0),d===Number.POSITIVE_INFINITY&&(_=g.children.length),m===-1||_===-1)for(let T=0;T<g.children.length;T++)b+=Dk(g.children[T]),m===-1&&b.length===f&&(m=T+1),_===-1&&b.length===d&&(_=T+1);if(m===-1)throw new qe(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(_===-1)throw new qe(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const k=g.children.slice(m,_);if(!p.alwaysWrap&&k.length===g.children.length)o(g,p,"line");else if(!p.alwaysWrap&&k.length===1&&k[0].type==="element")o(k[0],p,"token");else{const T={type:"element",tagName:"span",properties:{},children:k};o(T,p,"wrapper"),g.children.splice(m,k.length,T)}}function a(h,f){n[h]=o(n[h],f,"line")}function o(h,f,d){var b;const p=f.properties||{},g=f.transform||(m=>m);return h.tagName=f.tagName||"span",h.properties={...h.properties,...p,class:h.properties.class},(b=f.properties)!=null&&b.class&&Ok(h,f.properties.class),h=g(h,d)||h,h}const l=[],c=i.decorations.sort((h,f)=>f.start.offset-h.start.offset||h.end.offset-f.end.offset);for(const h of c){const{start:f,end:d}=h;if(f.line===d.line)s(f.line,f.character,d.character,h);else if(f.line<d.line){s(f.line,f.character,Number.POSITIVE_INFINITY,h);for(let p=f.line+1;p<d.line;p++)l.unshift(()=>a(p,h));s(d.line,0,d.character,h)}}l.forEach(h=>h())}}}function sO(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new qe(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let i=t+1;i<e.length;i++){const n=e[i],s=r.start.offset<=n.start.offset&&n.start.offset<r.end.offset,a=r.start.offset<n.end.offset&&n.end.offset<=r.end.offset,o=n.start.offset<=r.start.offset&&r.start.offset<n.end.offset,l=n.start.offset<r.end.offset&&r.end.offset<=n.end.offset;if(s||a||o||l){if(s&&a||o&&l||o&&r.start.offset===r.end.offset||a&&n.start.offset===n.end.offset)continue;throw new qe(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(n.start)} intersect.`)}}}}function Dk(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Dk).join(""):""}const aO=[nO()];function hu(e){const t=oO(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...aO]}function oO(e){const t=[],r=[],i=[];for(const n of e)switch(n.enforce){case"pre":t.push(n);break;case"post":r.push(n);break;default:i.push(n)}return{pre:t,post:r,normal:i}}var os=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],xd={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function lO(e,t){const r=e.indexOf("\x1B",t);if(r!==-1&&e[r+1]==="["){const i=e.indexOf("m",r);if(i!==-1)return{sequence:e.substring(r+2,i).split(";"),startPosition:r,position:i+1}}return{position:e.length}}function Xb(e){const t=e.shift();if(t==="2"){const r=e.splice(0,3).map(i=>Number.parseInt(i));return r.length!==3||r.some(i=>Number.isNaN(i))?void 0:{type:"rgb",rgb:r}}else if(t==="5"){const r=e.shift();if(r)return{type:"table",index:Number(r)}}}function cO(e){const t=[];for(;e.length>0;){const r=e.shift();if(!r)continue;const i=Number.parseInt(r);if(!Number.isNaN(i))if(i===0)t.push({type:"resetAll"});else if(i<=9)xd[i]&&t.push({type:"setDecoration",value:xd[i]});else if(i<=29){const n=xd[i-20];n&&(t.push({type:"resetDecoration",value:n}),n==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:os[i-30]}});else if(i===38){const n=Xb(e);n&&t.push({type:"setForegroundColor",value:n})}else if(i===39)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:os[i-40]}});else if(i===48){const n=Xb(e);n&&t.push({type:"setBackgroundColor",value:n})}else i===49?t.push({type:"resetBackgroundColor"}):i===53?t.push({type:"setDecoration",value:"overline"}):i===55?t.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:os[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:os[i-100+8]}})}return t}function uO(){let e=null,t=null,r=new Set;return{parse(i){const n=[];let s=0;do{const a=lO(i,s),o=a.sequence?i.substring(s,a.startPosition):i.substring(s);if(o.length>0&&n.push({value:o,foreground:e,background:t,decorations:new Set(r)}),a.sequence){const l=cO(a.sequence);for(const c of l)c.type==="resetAll"?(e=null,t=null,r.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&r.delete(c.value);for(const c of l)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&r.add(c.value)}s=a.position}while(s<i.length);return n}}}var hO={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function dO(e=hO){function t(o){return e[o]}function r(o){return`#${o.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let i;function n(){if(i)return i;i=[];for(let c=0;c<os.length;c++)i.push(t(os[c]));let o=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)i.push(r([o[c],o[u],o[h]]));let l=8;for(let c=0;c<24;c++,l+=10)i.push(r([l,l,l]));return i}function s(o){return n()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return r(o.rgb);case"table":return s(o.index)}}return{value:a}}const fO={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function pO(e,t,r){const i=cu(e,r),n=ih(t),s=Object.fromEntries(os.map(l=>{var h;const c=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`,u=(h=e.colors)==null?void 0:h[c];return[l,u||fO[l]]})),a=dO(s),o=uO();return n.map(l=>o.parse(l[0]).map(c=>{let u,h;c.decorations.has("reverse")?(u=c.background?a.value(c.background):e.bg,h=c.foreground?a.value(c.foreground):e.fg):(u=c.foreground?a.value(c.foreground):e.fg,h=c.background?a.value(c.background):void 0),u=Pn(u,i),h=Pn(h,i),c.decorations.has("dim")&&(u=gO(u));let f=gr.None;return c.decorations.has("bold")&&(f|=gr.Bold),c.decorations.has("italic")&&(f|=gr.Italic),c.decorations.has("underline")&&(f|=gr.Underline),c.decorations.has("strikethrough")&&(f|=gr.Strikethrough),{content:c.value,offset:l[1],color:u,bgColor:h,fontStyle:f}}))}function gO(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const i=t[1];if(i.length===8){const n=Math.round(Number.parseInt(i.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${i.slice(0,6)}${n}`}else{if(i.length===6)return`#${i}80`;if(i.length===4){const n=i[0],s=i[1],a=i[2],o=i[3],l=Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0");return`#${n}${n}${s}${s}${a}${a}${l}`}else if(i.length===3){const n=i[0],s=i[1],a=i[2];return`#${n}${n}${s}${s}${a}${a}80`}}}const r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}function qg(e,t,r={}){const{theme:i=e.getLoadedThemes()[0]}=r,n=e.resolveLangAlias(r.lang||"text");if(Hg(n)||zg(i))return ih(t).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:a}=e.setTheme(i);if(n==="ansi")return pO(s,t,r);const o=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==o.name)throw new qe(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${o.name}"`);if(!r.grammarState.themes.includes(s.name))throw new qe(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return bO(t,o,s,a,r)}function mO(...e){if(e.length===2)return pl(e[1]);const[t,r,i={}]=e,{lang:n="text",theme:s=t.getLoadedThemes()[0]}=i;if(Hg(n)||zg(s))throw new qe("Plain language does not have grammar state");if(n==="ansi")throw new qe("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(s),l=t.getLanguage(n);return new Wa(Wg(r,l,a,o,i).stateStack,l.name,a.name)}function bO(e,t,r,i,n){const s=Wg(e,t,r,i,n),a=new Wa(s.stateStack,t.name,r.name);return nh(s.tokens,a),s.tokens}function Wg(e,t,r,i,n){const s=cu(r,n),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=n,l=ih(e);let c=n.grammarState?iO(n.grammarState,r.name)??sp:n.grammarContextCode!=null?Wg(n.grammarContextCode,t,r,i,{...n,grammarState:void 0,grammarContextCode:void 0}).stateStack:sp,u=[];const h=[];for(let f=0,d=l.length;f<d;f++){const[p,g]=l[f];if(p===""){u=[],h.push([]);continue}if(a>0&&p.length>=a){u=[],h.push([{content:p,offset:g,color:"",fontStyle:0}]);continue}let b,m,_;n.includeExplanation&&(b=t.tokenizeLine(p,c,o),m=b.tokens,_=0);const k=t.tokenizeLine2(p,c,o),T=k.tokens.length/2;for(let E=0;E<T;E++){const S=k.tokens[2*E],B=E+1<T?k.tokens[2*E+2]:p.length;if(S===B)continue;const L=k.tokens[2*E+1],W=Pn(i[Ra.getForeground(L)],s),O=Ra.getFontStyle(L),$={content:p.substring(S,B),offset:g+S,color:W,fontStyle:O};if(n.includeExplanation){const X=[];if(n.includeExplanation!=="scopeName")for(const H of r.settings){let M;switch(typeof H.scope){case"string":M=H.scope.split(/,/).map(N=>N.trim());break;case"object":M=H.scope;break;default:continue}X.push({settings:H,selectors:M.map(N=>N.split(/ /))})}$.explanation=[];let G=0;for(;S+G<B;){const H=m[_],M=p.substring(H.startIndex,H.endIndex);G+=M.length,$.explanation.push({content:M,scopes:n.includeExplanation==="scopeName"?yO(H.scopes):xO(X,H.scopes)}),_+=1}}u.push($)}h.push(u),u=[],c=k.ruleStack}return{tokens:h,stateStack:c}}function yO(e){return e.map(t=>({scopeName:t}))}function xO(e,t){const r=[];for(let i=0,n=t.length;i<n;i++){const s=t[i];r[i]={scopeName:s,themeMatches:_O(e,s,t.slice(0,i))}}return r}function Kb(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function CO(e,t,r){if(!Kb(e[e.length-1],t))return!1;let i=e.length-2,n=r.length-1;for(;i>=0&&n>=0;)Kb(e[i],r[n])&&(i-=1),n-=1;return i===-1}function _O(e,t,r){const i=[];for(const{selectors:n,settings:s}of e)for(const a of n)if(CO(a,t,r)){i.push(s);break}return i}function Pk(e,t,r){const i=Object.entries(r.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),n=i.map(l=>{const c=qg(e,t,{...r,theme:l.theme}),u=pl(c),h=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:c,state:u,theme:h}}),s=kO(...n.map(l=>l.tokens)),a=s[0].map((l,c)=>l.map((u,h)=>{const f={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in r&&r.includeExplanation&&(f.explanation=u.explanation),s.forEach((d,p)=>{const{content:g,explanation:b,offset:m,..._}=d[c][h];f.variants[i[p].color]=_}),f})),o=n[0].state?new Wa(Object.fromEntries(n.map(l=>{var c;return[l.theme,(c=l.state)==null?void 0:c.getInternalStack(l.theme)]})),n[0].state.lang):void 0;return o&&nh(a,o),a}function kO(...e){const t=e.map(()=>[]),r=e.length;for(let i=0;i<e[0].length;i++){const n=e.map(l=>l[i]),s=t.map(()=>[]);t.forEach((l,c)=>l.push(s[c]));const a=n.map(()=>0),o=n.map(l=>l[0]);for(;o.every(l=>l);){const l=Math.min(...o.map(c=>c.content.length));for(let c=0;c<r;c++){const u=o[c];u.content.length===l?(s[c].push(u),a[c]+=1,o[c]=n[c][a[c]]):(s[c].push({...u,content:u.content.slice(0,l)}),o[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return t}function du(e,t,r){let i,n,s,a,o,l;if("themes"in r){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=r,f=Object.entries(r.themes).filter(m=>m[1]).map(m=>({color:m[0],theme:m[1]})).sort((m,_)=>m.color===c?-1:_.color===c?1:0);if(f.length===0)throw new qe("`themes` option must not be empty");const d=Pk(e,t,r);if(l=pl(d),c&&Ug!==c&&!f.find(m=>m.color===c))throw new qe(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=f.map(m=>e.getTheme(m.theme)),g=f.map(m=>m.color);s=d.map(m=>m.map(_=>eO(_,g,u,c,h))),l&&nh(s,l);const b=f.map(m=>cu(m.theme,r));n=Qb(f,p,b,u,c,"fg",h),i=Qb(f,p,b,u,c,"bg",h),a=`shiki-themes ${p.map(m=>m.name).join(" ")}`,o=c?void 0:[n,i].join(";")}else if("theme"in r){const c=cu(r.theme,r);s=qg(e,t,r);const u=e.getTheme(r.theme);i=Pn(u.bg,c),n=Pn(u.fg,c),a=u.name,l=pl(s)}else throw new qe("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:n,bg:i,themeName:a,rootStyle:o,grammarState:l}}function Qb(e,t,r,i,n,s,a){return e.map((o,l)=>{const c=Pn(t[l][s],r[l])||"inherit",u=`${i+o.color}${s==="bg"?"-bg":""}:${c}`;if(l===0&&n){if(n===Ug&&e.length>1){const h=e.findIndex(g=>g.color==="light"),f=e.findIndex(g=>g.color==="dark");if(h===-1||f===-1)throw new qe('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=Pn(t[h][s],r[h])||"inherit",p=Pn(t[f][s],r[f])||"inherit";return`light-dark(${d}, ${p});${u}`}return c}return a==="css-vars"?u:null}).filter(o=>!!o).join(";")}function fu(e,t,r,i={meta:{},options:r,codeToHast:(n,s)=>fu(e,n,s),codeToTokens:(n,s)=>du(e,n,s)}){var p,g;let n=t;for(const b of hu(r))n=((p=b.preprocess)==null?void 0:p.call(i,n,r))||n;let{tokens:s,fg:a,bg:o,themeName:l,rootStyle:c,grammarState:u}=du(e,n,r);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:f=!1}=r;h===!0?s=EO(s):h==="never"&&(s=wO(s)),f&&(s=SO(s));const d={...i,get source(){return n}};for(const b of hu(r))s=((g=b.tokens)==null?void 0:g.call(d,s))||s;return TO(s,{...r,fg:a,bg:o,themeName:l,rootStyle:r.rootStyle===!1?!1:r.rootStyle??c},d,u)}function TO(e,t,r,i=pl(e)){var g,b,m,_;const n=hu(t),s=[],a={type:"root",children:[]},{structure:o="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(const[k,T]of Object.entries(t.meta||{}))k.startsWith("_")||(c[k]=T);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},h={type:"element",tagName:"code",properties:{},children:s};const f=[],d={...r,structure:o,addClassToHast:Ok,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return u},get code(){return h},get lines(){return f}};if(e.forEach((k,T)=>{var B,L;T&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&s.push({type:"text",value:`
18
- `}));let E={type:"element",tagName:"span",properties:{class:"line"},children:[]},S=0;for(const W of k){let O={type:"element",tagName:"span",properties:{...W.htmlAttrs},children:[{type:"text",value:W.content}]};const $=cp(W.htmlStyle||uu(W));$&&(O.properties.style=$);for(const X of n)O=((B=X==null?void 0:X.span)==null?void 0:B.call(d,O,T+1,S,E,W))||O;o==="inline"?a.children.push(O):o==="classic"&&E.children.push(O),S+=W.content.length}if(o==="classic"){for(const W of n)E=((L=W==null?void 0:W.line)==null?void 0:L.call(d,E,T+1))||E;f.push(E),s.push(E)}else o==="inline"&&f.push(E)}),o==="classic"){for(const k of n)h=((g=k==null?void 0:k.code)==null?void 0:g.call(d,h))||h;u.children.push(h);for(const k of n)u=((b=k==null?void 0:k.pre)==null?void 0:b.call(d,u))||u;a.children.push(u)}else if(o==="inline"){const k=[];let T={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const B of a.children)B.type==="element"&&B.tagName==="br"?(k.push(T),T={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(B.type==="element"||B.type==="text")&&T.children.push(B);k.push(T);let S={type:"element",tagName:"code",properties:{},children:k};for(const B of n)S=((m=B==null?void 0:B.code)==null?void 0:m.call(d,S))||S;a.children=[];for(let B=0;B<S.children.length;B++){B>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const L=S.children[B];L.type==="element"&&a.children.push(...L.children)}}let p=a;for(const k of n)p=((_=k==null?void 0:k.root)==null?void 0:_.call(d,p))||p;return i&&nh(p,i),p}function EO(e){return e.map(t=>{const r=[];let i="",n;return t.forEach((s,a)=>{const l=!(s.fontStyle&&(s.fontStyle&gr.Underline||s.fontStyle&gr.Strikethrough));l&&s.content.match(/^\s+$/)&&t[a+1]?(n===void 0&&(n=s.offset),i+=s.content):i?(l?r.push({...s,offset:n,content:i+s.content}):r.push({content:i,offset:n},s),n=void 0,i=""):r.push(s)}),r})}function wO(e){return e.map(t=>t.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const i=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!i)return r;const[,n,s,a]=i;if(!n&&!a)return r;const o=[{...r,offset:r.offset+n.length,content:s}];return n&&o.unshift({content:n,offset:r.offset}),a&&o.push({content:a,offset:r.offset+n.length+s.length}),o}))}function SO(e){return e.map(t=>{const r=[];for(const i of t){if(r.length===0){r.push({...i});continue}const n=r[r.length-1],s=cp(n.htmlStyle||uu(n)),a=cp(i.htmlStyle||uu(i)),o=n.fontStyle&&(n.fontStyle&gr.Underline||n.fontStyle&gr.Strikethrough),l=i.fontStyle&&(i.fontStyle&gr.Underline||i.fontStyle&gr.Strikethrough);!o&&!l&&s===a?n.content+=i.content:r.push({...i})}return r})}const AO=GR;function vO(e,t,r){var s;const i={meta:{},options:r,codeToHast:(a,o)=>fu(e,a,o),codeToTokens:(a,o)=>du(e,a,o)};let n=AO(fu(e,t,r,i));for(const a of hu(r))n=((s=a.postprocess)==null?void 0:s.call(i,n,r))||n;return n}const Zb={light:"#333333",dark:"#bbbbbb"},Jb={light:"#fffffe",dark:"#1e1e1e"},ty="__shiki_resolved";function jg(e){var o,l,c,u,h;if(e!=null&&e[ty])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:r,fg:i}=t;if(!r||!i){const f=t.settings?t.settings.find(d=>!d.name&&!d.scope):void 0;(o=f==null?void 0:f.settings)!=null&&o.foreground&&(i=f.settings.foreground),(l=f==null?void 0:f.settings)!=null&&l.background&&(r=f.settings.background),!i&&((c=t==null?void 0:t.colors)!=null&&c["editor.foreground"])&&(i=t.colors["editor.foreground"]),!r&&((u=t==null?void 0:t.colors)!=null&&u["editor.background"])&&(r=t.colors["editor.background"]),i||(i=t.type==="light"?Zb.light:Zb.dark),r||(r=t.type==="light"?Jb.light:Jb.dark),t.fg=i,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let n=0;const s=new Map;function a(f){var p;if(s.has(f))return s.get(f);n+=1;const d=`#${n.toString(16).padStart(8,"0").toLowerCase()}`;return(p=t.colorReplacements)!=null&&p[`#${d}`]?a(f):(s.set(f,d),d)}t.settings=t.settings.map(f=>{var b,m;const d=((b=f.settings)==null?void 0:b.foreground)&&!f.settings.foreground.startsWith("#"),p=((m=f.settings)==null?void 0:m.background)&&!f.settings.background.startsWith("#");if(!d&&!p)return f;const g={...f,settings:{...f.settings}};if(d){const _=a(f.settings.foreground);t.colorReplacements[_]=f.settings.foreground,g.settings.foreground=_}if(p){const _=a(f.settings.background);t.colorReplacements[_]=f.settings.background,g.settings.background=_}return g});for(const f of Object.keys(t.colors||{}))if((f==="editor.foreground"||f==="editor.background"||f.startsWith("terminal.ansi"))&&!((h=t.colors[f])!=null&&h.startsWith("#"))){const d=a(t.colors[f]);t.colorReplacements[d]=t.colors[f],t.colors[f]=d}return Object.defineProperty(t,ty,{enumerable:!1,writable:!1,value:!0}),t}async function Mk(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Bk(t)).map(async t=>await Ik(t).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function Fk(e){return(await Promise.all(e.map(async r=>Rk(r)?null:jg(await Ik(r))))).filter(r=>!!r)}let LO=3;function IO(e,t=3){t>LO||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let oa=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function $k(e,t){if(!t)return e;if(t[e]){const r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new oa(`Circular alias \`${Array.from(r).join(" -> ")} -> ${e}\``);r.add(e)}}return e}class BO extends FB{constructor(r,i,n,s={}){super(r);Z(this,"_resolvedThemes",new Map);Z(this,"_resolvedGrammars",new Map);Z(this,"_langMap",new Map);Z(this,"_langGraph",new Map);Z(this,"_textmateThemeCache",new WeakMap);Z(this,"_loadedThemesCache",null);Z(this,"_loadedLanguagesCache",null);this._resolver=r,this._themes=i,this._langs=n,this._alias=s,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(r){return typeof r=="string"?this._resolvedThemes.get(r):this.loadTheme(r)}loadTheme(r){const i=jg(r);return i.name&&(this._resolvedThemes.set(i.name,i),this._loadedThemesCache=null),i}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(r){let i=this._textmateThemeCache.get(r);i||(i=iu.createFromRawTheme(r),this._textmateThemeCache.set(r,i)),this._syncRegistry.setTheme(i)}getGrammar(r){return r=$k(r,this._alias),this._resolvedGrammars.get(r)}loadLanguage(r){var a,o,l,c;if(this.getGrammar(r.name))return;const i=new Set([...this._langMap.values()].filter(u=>{var h;return(h=u.embeddedLangsLazy)==null?void 0:h.includes(r.name)}));this._resolver.addLanguage(r);const n={balancedBracketSelectors:r.balancedBracketSelectors||["*"],unbalancedBracketSelectors:r.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(r.scopeName,r);const s=this.loadGrammarWithConfiguration(r.scopeName,1,n);if(s.name=r.name,this._resolvedGrammars.set(r.name,s),r.aliases&&r.aliases.forEach(u=>{this._alias[u]=r.name}),this._loadedLanguagesCache=null,i.size)for(const u of i)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(o=(a=this._syncRegistry)==null?void 0:a._injectionGrammars)==null||o.delete(u.scopeName),(c=(l=this._syncRegistry)==null?void 0:l._grammars)==null||c.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(r){for(const s of r)this.resolveEmbeddedLanguages(s);const i=Array.from(this._langGraph.entries()),n=i.filter(([s,a])=>!a);if(n.length){const s=i.filter(([a,o])=>{if(!o)return!1;const l=o.embeddedLanguages||o.embeddedLangs;return l==null?void 0:l.some(c=>n.map(([u])=>u).includes(c))}).filter(a=>!n.includes(a));throw new oa(`Missing languages ${n.map(([a])=>`\`${a}\``).join(", ")}, required by ${s.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[s,a]of i)this._resolver.addLanguage(a);for(const[s,a]of i)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(r){this._langMap.set(r.name,r),this._langGraph.set(r.name,r);const i=r.embeddedLanguages??r.embeddedLangs;if(i)for(const n of i)this._langGraph.set(n,this._langMap.get(n))}}class RO{constructor(t,r){Z(this,"_langs",new Map);Z(this,"_scopeToLang",new Map);Z(this,"_injections",new Map);Z(this,"_onigLib");this._onigLib={createOnigScanner:i=>t.createScanner(i),createOnigString:i=>t.createString(i)},r.forEach(i=>this.addLanguage(i))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(r=>{this._langs.set(r,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(t.scopeName)})}getInjections(t){const r=t.split(".");let i=[];for(let n=1;n<=r.length;n++){const s=r.slice(0,n).join(".");i=[...i,...this._injections.get(s)||[]]}return i}}let lo=0;function OO(e){lo+=1,e.warnings!==!1&&lo>=10&&lo%10===0&&console.warn(`[Shiki] ${lo} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new oa("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(jg),n=new RO(e.engine,r),s=new BO(n,i,r,e.langAlias);let a;function o(k){return $k(k,e.langAlias)}function l(k){m();const T=s.getGrammar(typeof k=="string"?k:k.name);if(!T)throw new oa(`Language \`${k}\` not found, you may need to load it first`);return T}function c(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};m();const T=s.getTheme(k);if(!T)throw new oa(`Theme \`${k}\` not found, you may need to load it first`);return T}function u(k){m();const T=c(k);a!==k&&(s.setTheme(T),a=k);const E=s.getColorMap();return{theme:T,colorMap:E}}function h(){return m(),s.getLoadedThemes()}function f(){return m(),s.getLoadedLanguages()}function d(...k){m(),s.loadLanguages(k.flat(1))}async function p(...k){return d(await Mk(k))}function g(...k){m();for(const T of k.flat(1))s.loadTheme(T)}async function b(...k){return m(),g(await Fk(k))}function m(){if(t)throw new oa("Shiki instance has been disposed")}function _(){t||(t=!0,s.dispose(),lo-=1)}return{setTheme:u,getTheme:c,getLanguage:l,getLoadedThemes:h,getLoadedLanguages:f,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:d,loadTheme:b,loadThemeSync:g,dispose:_,[Symbol.dispose]:_}}async function NO(e){e.engine||IO("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,r,i]=await Promise.all([Fk(e.themes||[]),Mk(e.langs||[]),e.engine]);return OO({...e,themes:t,langs:r,engine:i})}async function DO(e){const t=await NO(e);return{getLastGrammarState:(...r)=>mO(t,...r),codeToTokensBase:(r,i)=>qg(t,r,i),codeToTokensWithThemes:(r,i)=>Pk(t,r,i),codeToTokens:(r,i)=>du(t,r,i),codeToHast:(r,i)=>fu(t,r,i),codeToHtml:(r,i)=>vO(t,r,i),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function PO(e){const t=e.langs,r=e.themes,i=e.engine;async function n(s){function a(h){var f;if(typeof h=="string"){if(h=((f=s.langAlias)==null?void 0:f[h])||h,Bk(h))return[];const d=t[h];if(!d)throw new qe(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return d}return h}function o(h){if(Rk(h))return"none";if(typeof h=="string"){const f=r[h];if(!f)throw new qe(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}const l=(s.themes??[]).map(h=>o(h)),c=(s.langs??[]).map(h=>a(h)),u=await DO({engine:s.engine??i(),...s,themes:l,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(a))},loadTheme(...h){return u.loadTheme(...h.map(o))},getBundledLanguages(){return t},getBundledThemes(){return r}}}return n}const Vg=[{id:"abap",name:"ABAP",import:(()=>I(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>I(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>I(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>I(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>I(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>I(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>I(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>I(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>I(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>I(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>I(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>I(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>I(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>I(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>I(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>I(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>I(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>I(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>I(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>I(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>I(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>I(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>I(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>I(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>I(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>I(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>I(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>I(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>I(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>I(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>I(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>I(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>I(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>I(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>I(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>I(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>I(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>I(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>I(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>I(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>I(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>I(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>I(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>I(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>I(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>I(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>I(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>I(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>I(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>I(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>I(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>I(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>I(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>I(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>I(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>I(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>I(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>I(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>I(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>I(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>I(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>I(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>I(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>I(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>I(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>I(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>I(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>I(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>I(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>I(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>I(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>I(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>I(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>I(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>I(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>I(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>I(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>I(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>I(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>I(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>I(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>I(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>I(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>I(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>I(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>I(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>I(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>I(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>I(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>I(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>I(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>I(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>I(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>I(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>I(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>I(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>I(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>I(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>I(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>I(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>I(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>I(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>I(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>I(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>I(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>I(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>I(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>I(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>I(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>I(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>I(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>I(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>I(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>I(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>I(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>I(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>I(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>I(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>I(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>I(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>I(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>I(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>I(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>I(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>I(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>I(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>I(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>I(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>I(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>I(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>I(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>I(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>I(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>I(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>I(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>I(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>I(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>I(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>I(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>I(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>I(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>I(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>I(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>I(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>I(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>I(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>I(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>I(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>I(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>I(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>I(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>I(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>I(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>I(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>I(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>I(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>I(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>I(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>I(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>I(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>I(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>I(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>I(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>I(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>I(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>I(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>I(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>I(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>I(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>I(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>I(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>I(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>I(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>I(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>I(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>I(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>I(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>I(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>I(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>I(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>I(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>I(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>I(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>I(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>I(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>I(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>I(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>I(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>I(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>I(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>I(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>I(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>I(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>I(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>I(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>I(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>I(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>I(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>I(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>I(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>I(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>I(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>I(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>I(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>I(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>I(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>I(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>I(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>I(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>I(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>I(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>I(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>I(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>I(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>I(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>I(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>I(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>I(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>I(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>I(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>I(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>I(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>I(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>I(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>I(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>I(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>I(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>I(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>I(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>I(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>I(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>I(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>I(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>I(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>I(()=>import("./zig-VOosw3JB.js"),[]))}],MO=Object.fromEntries(Vg.map(e=>[e.id,e.import])),FO=Object.fromEntries(Vg.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(r=>[r,e.import]))||[]})),Hk={...MO,...FO},$O=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>I(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>I(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>I(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>I(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>I(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>I(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>I(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>I(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>I(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>I(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>I(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>I(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>I(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>I(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>I(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>I(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>I(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>I(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>I(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>I(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>I(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>I(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>I(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>I(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>I(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>I(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>I(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>I(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>I(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>I(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>I(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>I(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>I(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>I(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>I(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>I(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>I(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>I(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>I(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>I(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>I(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>I(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>I(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>I(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>I(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>I(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>I(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>I(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>I(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>I(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>I(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>I(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>I(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>I(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>I(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>I(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>I(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>I(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>I(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>I(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>I(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>I(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>I(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>I(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>I(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],HO=Object.fromEntries($O.map(e=>[e.id,e.import]));class Gg extends Error{constructor(t){super(t),this.name="ShikiError"}}function zO(){return 2147483648}function UO(){return typeof performance<"u"?performance.now():Date.now()}const qO=(e,t)=>e+(t-e%t)%t;async function WO(e){let t,r;const i={};function n(d){r=d,i.HEAPU8=new Uint8Array(d),i.HEAPU32=new Uint32Array(d)}function s(d,p,g){i.HEAPU8.copyWithin(d,p,p+g)}function a(d){try{return t.grow(d-r.byteLength+65535>>>16),n(t.buffer),1}catch{}}function o(d){const p=i.HEAPU8.length;d=d>>>0;const g=zO();if(d>g)return!1;for(let b=1;b<=4;b*=2){let m=p*(1+.2/b);m=Math.min(m,d+100663296);const _=Math.min(g,qO(Math.max(d,m),65536));if(a(_))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(d,p,g=1024){const b=p+g;let m=p;for(;d[m]&&!(m>=b);)++m;if(m-p>16&&d.buffer&&l)return l.decode(d.subarray(p,m));let _="";for(;p<m;){let k=d[p++];if(!(k&128)){_+=String.fromCharCode(k);continue}const T=d[p++]&63;if((k&224)===192){_+=String.fromCharCode((k&31)<<6|T);continue}const E=d[p++]&63;if((k&240)===224?k=(k&15)<<12|T<<6|E:k=(k&7)<<18|T<<12|E<<6|d[p++]&63,k<65536)_+=String.fromCharCode(k);else{const S=k-65536;_+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return _}function u(d,p){return d?c(i.HEAPU8,d,p):""}const h={emscripten_get_now:UO,emscripten_memcpy_big:s,emscripten_resize_heap:o,fd_write:()=>0};async function f(){const p=await e({env:h,wasi_snapshot_preview1:h});t=p.memory,n(t.buffer),Object.assign(i,p),i.UTF8ToString=u}return await f(),i}var jO=Object.defineProperty,VO=(e,t,r)=>t in e?jO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xe=(e,t,r)=>VO(e,typeof t!="symbol"?t+"":t,r);let Je=null;function GO(e){throw new Gg(e.UTF8ToString(e.getLastOnigError()))}class sh{constructor(t){Xe(this,"utf16Length"),Xe(this,"utf8Length"),Xe(this,"utf16Value"),Xe(this,"utf8Value"),Xe(this,"utf16OffsetToUtf8"),Xe(this,"utf8OffsetToUtf16");const r=t.length,i=sh._utf8ByteLength(t),n=i!==r,s=n?new Uint32Array(r+1):null;n&&(s[r]=i);const a=n?new Uint32Array(i+1):null;n&&(a[i]=r);const o=new Uint8Array(i);let l=0;for(let c=0;c<r;c++){const u=t.charCodeAt(c);let h=u,f=!1;if(u>=55296&&u<=56319&&c+1<r){const d=t.charCodeAt(c+1);d>=56320&&d<=57343&&(h=(u-55296<<10)+65536|d-56320,f=!0)}n&&(s[c]=l,f&&(s[c+1]=l),h<=127?a[l+0]=c:h<=2047?(a[l+0]=c,a[l+1]=c):h<=65535?(a[l+0]=c,a[l+1]=c,a[l+2]=c):(a[l+0]=c,a[l+1]=c,a[l+2]=c,a[l+3]=c)),h<=127?o[l++]=h:h<=2047?(o[l++]=192|(h&1984)>>>6,o[l++]=128|(h&63)>>>0):h<=65535?(o[l++]=224|(h&61440)>>>12,o[l++]=128|(h&4032)>>>6,o[l++]=128|(h&63)>>>0):(o[l++]=240|(h&1835008)>>>18,o[l++]=128|(h&258048)>>>12,o[l++]=128|(h&4032)>>>6,o[l++]=128|(h&63)>>>0),f&&c++}this.utf16Length=r,this.utf8Length=i,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let r=0;for(let i=0,n=t.length;i<n;i++){const s=t.charCodeAt(i);let a=s,o=!1;if(s>=55296&&s<=56319&&i+1<n){const l=t.charCodeAt(i+1);l>=56320&&l<=57343&&(a=(s-55296<<10)+65536|l-56320,o=!0)}a<=127?r+=1:a<=2047?r+=2:a<=65535?r+=3:r+=4,o&&i++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const ah=class wi{constructor(t){if(Xe(this,"id",++wi.LAST_ID),Xe(this,"_onigBinding"),Xe(this,"content"),Xe(this,"utf16Length"),Xe(this,"utf8Length"),Xe(this,"utf16OffsetToUtf8"),Xe(this,"utf8OffsetToUtf16"),Xe(this,"ptr"),!Je)throw new Gg("Must invoke loadWasm first.");this._onigBinding=Je,this.content=t;const r=new sh(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!wi._sharedPtrInUse?(wi._sharedPtr||(wi._sharedPtr=Je.omalloc(1e4)),wi._sharedPtrInUse=!0,Je.HEAPU8.set(r.utf8Value,wi._sharedPtr),this.ptr=wi._sharedPtr):this.ptr=r.createString(Je)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===wi._sharedPtr?wi._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Xe(ah,"LAST_ID",0);Xe(ah,"_sharedPtr",0);Xe(ah,"_sharedPtrInUse",!1);let zk=ah;class YO{constructor(t){if(Xe(this,"_onigBinding"),Xe(this,"_ptr"),!Je)throw new Gg("Must invoke loadWasm first.");const r=[],i=[];for(let o=0,l=t.length;o<l;o++){const c=new sh(t[o]);r[o]=c.createString(Je),i[o]=c.utf8Length}const n=Je.omalloc(4*t.length);Je.HEAPU32.set(r,n/4);const s=Je.omalloc(4*t.length);Je.HEAPU32.set(i,s/4);const a=Je.createOnigScanner(n,s,t.length);for(let o=0,l=t.length;o<l;o++)Je.ofree(r[o]);Je.ofree(s),Je.ofree(n),a===0&&GO(Je),this._onigBinding=Je,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,i){let n=0;if(typeof i=="number"&&(n=i),typeof t=="string"){t=new zk(t);const s=this._findNextMatchSync(t,r,!1,n);return t.dispose(),s}return this._findNextMatchSync(t,r,!1,n)}_findNextMatchSync(t,r,i,n){const s=this._onigBinding,a=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),n);if(a===0)return null;const o=s.HEAPU32;let l=a/4;const c=o[l++],u=o[l++],h=[];for(let f=0;f<u;f++){const d=t.convertUtf8OffsetToUtf16(o[l++]),p=t.convertUtf8OffsetToUtf16(o[l++]);h[f]={start:d,end:p,length:p-d}}return{index:c,captureIndices:h}}}function XO(e){return typeof e.instantiator=="function"}function KO(e){return typeof e.default=="function"}function QO(e){return typeof e.data<"u"}function ZO(e){return typeof Response<"u"&&e instanceof Response}function JO(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let sc;function tN(e){if(sc)return sc;async function t(){Je=await WO(async r=>{let i=e;return i=await i,typeof i=="function"&&(i=await i(r)),typeof i=="function"&&(i=await i(r)),XO(i)?i=await i.instantiator(r):KO(i)?i=await i.default(r):(QO(i)&&(i=i.data),ZO(i)?typeof WebAssembly.instantiateStreaming=="function"?i=await eN(i)(r):i=await rN(i)(r):JO(i)?i=await Cd(i)(r):i instanceof WebAssembly.Module?i=await Cd(i)(r):"default"in i&&i.default instanceof WebAssembly.Module&&(i=await Cd(i.default)(r))),"instance"in i&&(i=i.instance),"exports"in i&&(i=i.exports),i})}return sc=t(),sc}function Cd(e){return t=>WebAssembly.instantiate(e,t)}function eN(e){return t=>WebAssembly.instantiateStreaming(e,t)}function rN(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}async function iN(e){return e&&await tN(e),{createScanner(t){return new YO(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new zk(t)}}}const nN=PO({langs:Hk,themes:HO,engine:()=>iN(I(()=>import("./wasm-CG6Dc4jp.js"),[]))});function ja(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function sN(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}const Yg=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),tr=String.raw;function Va(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Uk=tr`\[\^?`,qk=`c.? | C(?:-.?)?|${tr`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${tr`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${tr`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${tr`o\{[^\}]*\}?`}|${tr`\d{1,3}`}`,Xg=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ac=new RegExp(tr`
19
- \\ (?:
20
- ${qk}
21
- | [gk]<[^>]*>?
22
- | [gk]'[^']*'?
23
- | .
24
- )
25
- | \( (?:
26
- \? (?:
27
- [:=!>({]
28
- | <[=!]
29
- | <[^>]*>
30
- | '[^']*'
31
- | ~\|?
32
- | #(?:[^)\\]|\\.?)*
33
- | [^:)]*[:)]
34
- )?
35
- | \*[^\)]*\)?
36
- )?
37
- | (?:${Xg.source})+
38
- | ${Uk}
39
- | .
40
- `.replace(/\s+/g,""),"gsu"),_d=new RegExp(tr`
41
- \\ (?:
42
- ${qk}
43
- | .
44
- )
45
- | \[:(?:\^?\p{Alpha}+|\^):\]
46
- | ${Uk}
47
- | &&
48
- | .
49
- `.replace(/\s+/g,""),"gsu");function aN(e,t={}){const r={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const i=wN(r.flags),n=[i.extended],s={captureGroup:r.rules.captureGroup,getCurrentModX(){return n.at(-1)},numOpenGroups:0,popModX(){n.pop()},pushModX(h){n.push(h)},replaceCurrentModX(h){n[n.length-1]=h},singleline:r.rules.singleline};let a=[],o;for(ac.lastIndex=0;o=ac.exec(e);){const h=oN(s,e,o[0],ac.lastIndex);h.tokens?a.push(...h.tokens):h.token&&a.push(h.token),h.lastIndex!==void 0&&(ac.lastIndex=h.lastIndex)}const l=[];let c=0;a.filter(h=>h.type==="GroupOpen").forEach(h=>{h.kind==="capturing"?h.number=++c:h.raw==="("&&l.push(h)}),c||l.forEach((h,f)=>{h.kind="capturing",h.number=f+1});const u=c||l.length;return{tokens:a.map(h=>h.type==="EscapedNumber"?AN(h,u):h).flat(),flags:i}}function oN(e,t,r,i){const[n,s]=r;if(r==="["||r==="[^"){const a=lN(t,r,i);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(n==="\\"){if("AbBGyYzZ".includes(s))return{token:ey(r,r)};if(/^\\g[<']/.test(r)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:yN(r)}}if(/^\\k[<']/.test(r)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(r))throw new Error(`Invalid group name "${r}"`);return{token:jk(r)}}if(s==="K")return{token:Vk("keep",r)};if(s==="N"||s==="R")return{token:ls("newline",r,{negate:s==="N"})};if(s==="O")return{token:ls("any",r)};if(s==="X")return{token:ls("text_segment",r)};const a=Wk(r,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(n==="("){if(s==="*")return{token:kN(r)};if(r==="(?{")throw new Error(`Unsupported callout "${r}"`);if(r.startsWith("(?#")){if(t[i]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:i+1}}if(/^\(\?[-imx]+[:)]$/.test(r))return{token:_N(r,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,r==="("&&!e.captureGroup||r==="(?:")return{token:ta("group",r)};if(r==="(?>")return{token:ta("atomic",r)};if(r==="(?="||r==="(?!"||r==="(?<="||r==="(?<!")return{token:ta(r[2]==="<"?"lookbehind":"lookahead",r,{negate:r.endsWith("!")})};if(r==="("&&e.captureGroup||r.startsWith("(?<")&&r.endsWith(">")||r.startsWith("(?'")&&r.endsWith("'"))return{token:ta("capturing",r,{...r!=="("&&{name:r.slice(3,-1)}})};if(r.startsWith("(?~")){if(r==="(?~|")throw new Error(`Unsupported absence function kind "${r}"`);return{token:ta("absence_repeater",r)}}throw r==="(?("?new Error(`Unsupported conditional "${r}"`):new Error(`Invalid or unsupported group option "${r}"`)}if(r===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:gN(r)}}if(e.getCurrentModX()){if(r==="#"){const a=t.indexOf(`
50
- `,i);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(r)){const a=/\s+/y;return a.lastIndex=i,{lastIndex:a.exec(t)?a.lastIndex:i}}}if(r===".")return{token:ls("dot",r)};if(r==="^"||r==="$"){const a=e.singleline?{"^":tr`\A`,$:tr`\Z`}[r]:r;return{token:ey(a,r)}}return r==="|"?{token:uN(r)}:Xg.test(r)?{tokens:vN(r)}:{token:an(ja(r),r)}}function lN(e,t,r){const i=[ry(t[1]==="^",t)];let n=1,s;for(_d.lastIndex=r;s=_d.exec(e);){const a=s[0];if(a[0]==="["&&a[1]!==":")n++,i.push(ry(a[1]==="^",a));else if(a==="]"){if(i.at(-1).type==="CharacterClassOpen")i.push(an(93,a));else if(n--,i.push(hN(a)),!n)break}else{const o=cN(a);Array.isArray(o)?i.push(...o):i.push(o)}}return{tokens:i,lastIndex:_d.lastIndex||e.length}}function cN(e){if(e[0]==="\\")return Wk(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Yg.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return ls("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?dN(e):e==="&&"?fN(e):an(ja(e),e)}function Wk(e,{inCharClass:t}){const r=e[1];if(r==="c"||r==="C")return CN(e);if("dDhHsSwW".includes(r))return TN(e);if(e.startsWith(tr`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return EN(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const i=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(i)),s=new TextEncoder;return[...n].map(a=>{const o=[...s.encode(a)].map(l=>`\\x${l.toString(16)}`).join("");return an(ja(a),o)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(r==="u"||r==="x")return an(SN(e),e);if(iy.has(r))return an(iy.get(r),e);if(/\d/.test(r))return pN(t,e);if(e==="\\")throw new Error(tr`Incomplete escape "\"`);if(r==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return an(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function uN(e){return{type:"Alternator",raw:e}}function ey(e,t){return{type:"Assertion",kind:e,raw:t}}function jk(e){return{type:"Backreference",raw:e}}function an(e,t){return{type:"Character",value:e,raw:t}}function hN(e){return{type:"CharacterClassClose",raw:e}}function dN(e){return{type:"CharacterClassHyphen",raw:e}}function fN(e){return{type:"CharacterClassIntersector",raw:e}}function ry(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function ls(e,t,r={}){return{type:"CharacterSet",kind:e,...r,raw:t}}function Vk(e,t,r={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Va(r.flags),raw:t}}function pN(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function gN(e){return{type:"GroupClose",raw:e}}function ta(e,t,r={}){return{type:"GroupOpen",kind:e,...r,raw:t}}function mN(e,t,r,i){return{type:"NamedCallout",kind:e,tag:t,arguments:r,raw:i}}function bN(e,t,r,i){return{type:"Quantifier",kind:e,min:t,max:r,raw:i}}function yN(e){return{type:"Subroutine",raw:e}}const xN=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),iy=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function CN(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return an(ja(t.toUpperCase())-64,e)}function _N(e,t){let{on:r,off:i}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;i??(i="");const n=(t.getCurrentModX()||r.includes("x"))&&!i.includes("x"),s=sy(r),a=sy(i),o={};if(s&&(o.enable=s),a&&(o.disable=a),e.endsWith(")"))return t.replaceCurrentModX(n),Vk("flags",e,{flags:o});if(e.endsWith(":"))return t.pushModX(n),t.numOpenGroups++,ta("group",e,{...(s||a)&&{flags:o}});throw new Error(`Unexpected flag modifier "${e}"`)}function kN(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:r,tag:i,args:n}=t.groups;if(!r)throw new Error(`Invalid named callout "${e}"`);if(i==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const s=n?n.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[a,o,l]=s,c=xN.has(r)?r.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(s.length===2&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${o}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof o=="number"||!/^(?:[<>!=]=|[<>])$/.test(o))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${r}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return mN(c,i??null,(n==null?void 0:n.split(","))??null,e)}function ny(e){let t=null,r,i;if(e[0]==="{"){const{minStr:n,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+n>a||s&&+s>a)throw new Error("Quantifier value unsupported in Oniguruma");if(r=+n,i=s===void 0?+n:s===""?1/0:+s,r>i&&(t="possessive",[r,i]=[i,r]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else r=e[0]==="+"?1:0,i=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return bN(t,r,i,e)}function TN(e){const t=e[1].toLowerCase();return ls({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function EN(e){const{p:t,neg:r,value:i}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return ls("property",e,{value:i,negate:t==="P"&&!r||t==="p"&&!!r})}function sy(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function wN(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let r=0;r<e.length;r++){const i=e[r];if(!"imxDPSWy".includes(i))throw new Error(`Invalid flag "${i}"`);if(i==="y"){if(!/^y{[gw]}/.test(e.slice(r)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[r+2]==="g"?"grapheme":"word",r+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[i]]=!0}return t}function SN(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function AN(e,t){const{raw:r,inCharClass:i}=e,n=r.slice(1);if(!i&&(n!=="0"&&n.length===1||n[0]!=="0"&&+n<=t))return[jk(r)];const s=[],a=n.match(/^[0-7]+|\d/g);for(let o=0;o<a.length;o++){const l=a[o];let c;if(o===0&&l!=="8"&&l!=="9"){if(c=parseInt(l,8),c>127)throw new Error(tr`Octal encoded byte above 177 unsupported "${r}"`)}else c=ja(l);s.push(an(c,(o===0?"\\":"")+l))}return s}function vN(e){const t=[],r=new RegExp(Xg,"gy");let i;for(;i=r.exec(e);){const n=i[0];if(n[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(n);if(s){const{min:a,max:o}=s.groups;if(+a>+o&&n.endsWith("?")){r.lastIndex--,t.push(ny(n.slice(0,-1)));continue}}}t.push(ny(n))}return t}function Gk(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const r=e.body[0];return!t||Object.keys(t).every(i=>t[i]===r[i])}function LN(e){return IN.has(e.type)}const IN=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Yk(e,t={}){const r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=aN(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),n=(f,d)=>{const p=i.tokens[s.nextIndex];switch(s.parent=f,s.nextIndex++,p.type){case"Alternator":return Cs();case"Assertion":return BN(p);case"Backreference":return RN(p,s);case"Character":return oh(p.value,{useLastValid:!!d.isCheckingRangeEnd});case"CharacterClassHyphen":return ON(p,s,d);case"CharacterClassOpen":return NN(p,s,d);case"CharacterSet":return DN(p,s);case"Directive":return zN(p.kind,{flags:p.flags});case"GroupOpen":return PN(p,s,d);case"NamedCallout":return qN(p.kind,p.tag,p.arguments);case"Quantifier":return MN(p,s);case"Subroutine":return FN(p,s);default:throw new Error(`Unexpected token type "${p.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:n},a=jN(UN(i.flags));let o=a.body[0];for(;s.nextIndex<i.tokens.length;){const f=n(o,{});f.type==="Alternative"?(a.body.push(f),o=f):o.body.push(f)}const{capturingGroups:l,hasNumberedRef:c,namedGroupsByName:u,subroutines:h}=s;if(c&&u.size&&!r.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:f}of h)if(typeof f=="number"){if(f>l.length)throw new Error("Subroutine uses a group number that's not defined");f&&(l[f-1].isSubroutined=!0)}else if(u.has(f)){if(u.get(f).length>1)throw new Error(tr`Subroutine uses a duplicate group name "\g<${f}>"`);u.get(f)[0].isSubroutined=!0}else throw new Error(tr`Subroutine uses a group name that's not defined "\g<${f}>"`);return a}function BN({kind:e}){return up(Va({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===tr`\B`||e===tr`\Y`})}function RN({raw:e},t){const r=/^\\k[<']/.test(e),i=r?e.slice(3,-1):e.slice(1),n=(s,a=!1)=>{const o=t.capturingGroups.length;let l=!1;if(s>o)if(t.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,hp(a?o+1-s:s,{orphan:l})};if(r){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(i);if(s)return n(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(i))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(i))throw new Error(`Group name not defined to the left "${e}"`);return hp(i)}return n(+i)}function ON(e,t,r){const{tokens:i,walk:n}=t,s=t.parent,a=s.body.at(-1),o=i[t.nextIndex];if(!r.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&o&&o.type!=="CharacterClassOpen"&&o.type!=="CharacterClassClose"&&o.type!=="CharacterClassIntersector"){const l=n(s,{...r,isCheckingRangeEnd:!0});if(a.type==="Character"&&l.type==="Character")return s.body.pop(),HN(a,l);throw new Error("Invalid character class range")}return oh(ja("-"))}function NN({negate:e},t,r){const{tokens:i,walk:n}=t,s=[Fc()],a=i[t.nextIndex];let o=ly(a);for(;o.type!=="CharacterClassClose";){if(o.type==="CharacterClassIntersector")s.push(Fc()),t.nextIndex++;else{const c=s.at(-1);c.body.push(n(c,r))}o=ly(i[t.nextIndex],a)}const l=Fc({negate:e});return s.length===1?l.body=s[0].body:(l.kind="intersection",l.body=s.map(c=>c.body.length===1?c.body[0]:c)),t.nextIndex++,l}function DN({kind:e,negate:t,value:r},i){const{normalizeUnknownPropertyNames:n,skipPropertyNameValidation:s,unicodePropertyMap:a}=i;if(e==="property"){const o=lh(r);if(Yg.has(o)&&!(a!=null&&a.has(o)))e="posix",r=o;else return ea(r,{negate:t,normalizeUnknownPropertyNames:n,skipPropertyNameValidation:s,unicodePropertyMap:a})}return e==="posix"?WN(r,{negate:t}):dp(e,{negate:t})}function PN(e,t,r){const{tokens:i,capturingGroups:n,namedGroupsByName:s,skipLookbehindValidation:a,walk:o}=t,l=VN(e),c=l.type==="AbsenceFunction",u=oy(l),h=u&&l.negate;if(l.type==="CapturingGroup"&&(n.push(l),l.name&&sN(s,l.name,[]).push(l)),c&&r.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=cy(i[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")l.body.push(Cs()),t.nextIndex++;else{const d=l.body.at(-1),p=o(d,{...r,isInAbsenceFunction:r.isInAbsenceFunction||c,isInLookbehind:r.isInLookbehind||u,isInNegLookbehind:r.isInNegLookbehind||h});if(d.body.push(p),(u||r.isInLookbehind)&&!a){const g="Lookbehind includes a pattern not allowed by Oniguruma";if(h||r.isInNegLookbehind){if(ay(p)||p.type==="CapturingGroup")throw new Error(g)}else if(ay(p)||oy(p)&&p.negate)throw new Error(g)}}f=cy(i[t.nextIndex])}return t.nextIndex++,l}function MN({kind:e,min:t,max:r},i){const n=i.parent,s=n.body.at(-1);if(!s||!LN(s))throw new Error("Quantifier requires a repeatable token");const a=Kk(e,t,r,s);return n.body.pop(),a}function FN({raw:e},t){const{capturingGroups:r,subroutines:i}=t;let n=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(n);if(s){const o=+s.groups.num,l=r.length;if(t.hasNumberedRef=!0,n={"":o,"+":l+o,"-":l+1-o}[s.groups.sign],n<1)throw new Error("Invalid subroutine number")}else n==="0"&&(n=0);const a=Qk(n);return i.push(a),a}function $N(e,t){return{type:"AbsenceFunction",kind:e,body:Nl(t==null?void 0:t.body)}}function Cs(e){return{type:"Alternative",body:Zk(e==null?void 0:e.body)}}function up(e,t){const r={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(r.negate=!!(t!=null&&t.negate)),r}function hp(e,t){const r=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...r&&{orphan:r}}}function Xk(e,t){const r={name:void 0,isSubroutined:!1,...t};if(r.name!==void 0&&!GN(r.name))throw new Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:Nl(t==null?void 0:t.body)}}function oh(e,t){const r={useLastValid:!1,...t};if(e>1114111){const i=e.toString(16);if(r.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${i}}"`):new Error(`Invalid code point out of range in JS "\\x{${i}}"`)}return{type:"Character",value:e}}function Fc(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Zk(e==null?void 0:e.body)}}function HN(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function dp(e,t){const r=!!(t!=null&&t.negate),i={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(i.negate=r),(e==="text_segment"||e==="newline"&&!r)&&(i.variableLength=!0),i}function zN(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Va(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function UN(e){return{type:"Flags",...e}}function ci(e){const t=e==null?void 0:e.atomic,r=e==null?void 0:e.flags;if(t&&r)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...r&&{flags:r},body:Nl(e==null?void 0:e.body)}}function ns(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Nl(e==null?void 0:e.body)}}function qN(e,t,r){return{type:"NamedCallout",kind:e,tag:t,arguments:r}}function WN(e,t){const r=!!(t!=null&&t.negate);if(!Yg.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:r}}function Kk(e,t,r,i){if(t>r)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:r,body:i}}function jN(e,t){return{type:"Regex",body:Nl(t==null?void 0:t.body),flags:e}}function Qk(e){return{type:"Subroutine",ref:e}}function ea(e,t){var n;const r={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let i=(n=r.unicodePropertyMap)==null?void 0:n.get(lh(e));if(!i){if(r.normalizeUnknownPropertyNames)i=YN(e);else if(r.unicodePropertyMap&&!r.skipPropertyNameValidation)throw new Error(tr`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:i??e,negate:r.negate}}function VN({flags:e,kind:t,name:r,negate:i,number:n}){switch(t){case"absence_repeater":return $N("repeater");case"atomic":return ci({atomic:!0});case"capturing":return Xk(n,{name:r});case"group":return ci({flags:e});case"lookahead":case"lookbehind":return ns({behind:t==="lookbehind",negate:i});default:throw new Error(`Unexpected group kind "${t}"`)}}function Nl(e){if(e===void 0)e=[Cs()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function Zk(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function ay(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function oy(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function GN(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function YN(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function lh(e){return e.replace(/[- _]+/g,"").toLowerCase()}function ly(e,t){const r=t;return Va(e,`Unclosed character class${(r==null?void 0:r.type)==="Character"&&r.value===93&&r.raw==="]"?' (started with "]")':""}`)}function cy(e){return Va(e,"Unclosed group")}function Go(e,t,r=null){function i(s,a){for(let o=0;o<s.length;o++){const l=n(s[o],a,o,s);o=Math.max(-1,o+l)}}function n(s,a=null,o=null,l=null){var m,_;let c=0,u=!1;const h={node:s,parent:a,key:o,container:l,root:e,remove(){oc(l).splice(Math.max(0,Vs(o)+c),1),c--,u=!0},removeAllNextSiblings(){return oc(l).splice(Vs(o)+1)},removeAllPrevSiblings(){const k=Vs(o)+c;return c-=k,oc(l).splice(0,Math.max(0,k))},replaceWith(k,T={}){const E=!!T.traverse;l?l[Math.max(0,Vs(o)+c)]=k:Va(a,"Can't replace root node")[o]=k,E&&n(k,a,o,l),u=!0},replaceWithMultiple(k,T={}){const E=!!T.traverse;if(oc(l).splice(Math.max(0,Vs(o)+c),1,...k),c+=k.length-1,E){let S=0;for(let B=0;B<k.length;B++)S+=n(k[B],a,Vs(o)+B+S,l)}u=!0},skip(){u=!0}},{type:f}=s,d=t["*"],p=t[f],g=typeof d=="function"?d:d==null?void 0:d.enter,b=typeof p=="function"?p:p==null?void 0:p.enter;if(g==null||g(h,r),b==null||b(h,r),!u)switch(f){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":i(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":n(s.min,s,"min"),n(s.max,s,"max");break;case"Quantifier":n(s.body,s,"body");break;case"Regex":i(s.body,s),n(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${f}"`)}return(m=p==null?void 0:p.exit)==null||m.call(p,h,r),(_=d==null?void 0:d.exit)==null||_.call(d,h,r),c}return n(e),e}function oc(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Vs(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const XN=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function KN(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function QN(e,t,r,i){return e.slice(0,t)+i+e.slice(t+r.length)}const Jr=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Kg(e,t,r,i){const n=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let a=0,o="";for(const l of e.matchAll(n)){const{0:c,groups:{$skip:u}}=l;if(!u&&(!i||i===Jr.DEFAULT==!a)){r instanceof Function?o+=r(l,{context:a?Jr.CHAR_CLASS:Jr.DEFAULT,negated:s[s.length-1]}):o+=r;continue}c[0]==="["?(a++,s.push(c[1]==="^")):c==="]"&&a&&(a--,s.pop()),o+=c}return o}function Jk(e,t,r,i){Kg(e,t,r,i)}function ZN(e,t,r=0,i){if(!new RegExp(t,"su").test(e))return null;const n=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");n.lastIndex=r;let s=0,a;for(;a=n.exec(e);){const{0:o,groups:{$skip:l}}=a;if(!l&&(!i||i===Jr.DEFAULT==!s))return a;o==="["?s++:o==="]"&&s&&s--,n.lastIndex==a.index&&n.lastIndex++}return null}function lc(e,t,r){return!!ZN(e,t,0,r)}function JN(e,t){const r=/\\?./gsu;r.lastIndex=t;let i=e.length,n=0,s=1,a;for(;a=r.exec(e);){const[o]=a;if(o==="[")n++;else if(n)o==="]"&&n--;else if(o==="(")s++;else if(o===")"&&(s--,!s)){i=a.index;break}}return e.slice(t,i)}const uy=new RegExp(String.raw`(?<noncapturingStart>${XN})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function t5(e,t){const r=(t==null?void 0:t.hiddenCaptures)??[];let i=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:r};const n="(?>",s="(?:(?=(",a=[0],o=[];let l=0,c=0,u=NaN,h;do{h=!1;let f=0,d=0,p=!1,g;for(uy.lastIndex=Number.isNaN(u)?0:u+s.length;g=uy.exec(e);){const{0:b,index:m,groups:{capturingStart:_,noncapturingStart:k}}=g;if(b==="[")f++;else if(f)b==="]"&&f--;else if(b===n&&!p)u=m,p=!0;else if(p&&k)d++;else if(_)p?d++:(l++,a.push(l+c));else if(b===")"&&p){if(!d){c++;const T=l+c;if(e=`${e.slice(0,u)}${s}${e.slice(u+n.length,m)}))<$$${T}>)${e.slice(m+1)}`,h=!0,o.push(T),KN(r,T),i.size){const E=new Map;i.forEach((S,B)=>{E.set(B>=T?B+1:B,S.map(L=>L>=T?L+1:L))}),i=E}break}d--}}}while(h);return r.push(...o),e=Kg(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:f,groups:{backrefNum:d,wrappedBackrefNum:p}})=>{if(d){const g=+d;if(g>a.length-1)throw new Error(`Backref "${f}" greater than number of captures`);return`\\${a[g]}`}return`\\${p}`},Jr.DEFAULT),{pattern:e,captureTransfers:i,hiddenCaptures:r}}const tT=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,kd=new RegExp(String.raw`
51
- \\(?: \d+
52
- | c[A-Za-z]
53
- | [gk]<[^>]+>
54
- | [pPu]\{[^\}]+\}
55
- | u[A-Fa-f\d]{4}
56
- | x[A-Fa-f\d]{2}
57
- )
58
- | \((?: \? (?: [:=!>]
59
- | <(?:[=!]|[^>]+>)
60
- | [A-Za-z\-]+:
61
- | \(DEFINE\)
62
- ))?
63
- | (?<qBase>${tT})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
64
- | \\?.
65
- `.replace(/\s+/g,""),"gsu");function e5(e){if(!new RegExp(`${tT}\\+`).test(e))return{pattern:e};const t=[];let r=null,i=null,n="",s=0,a;for(kd.lastIndex=0;a=kd.exec(e);){const{0:o,index:l,groups:{qBase:c,qMod:u,invalidQ:h}}=a;if(o==="[")s||(i=l),s++;else if(o==="]")s?s--:i=null;else if(!s)if(u==="+"&&n&&!n.startsWith("(")){if(h)throw new Error(`Invalid quantifier "${o}"`);let f=-1;if(/^\{\d+\}$/.test(c))e=QN(e,l+c.length,u,"");else{if(n===")"||n==="]"){const d=n===")"?r:i;if(d===null)throw new Error(`Invalid unmatched "${n}"`);e=`${e.slice(0,d)}(?>${e.slice(d,l)}${c})${e.slice(l+o.length)}`}else e=`${e.slice(0,l-n.length)}(?>${n}${c})${e.slice(l+o.length)}`;f+=4}kd.lastIndex+=f}else o[0]==="("?t.push(l):o===")"&&(r=t.length?t.pop():null);n=o}return{pattern:e}}const Zr=String.raw,r5=Zr`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,fp=Zr`\(\?R=(?<rDepth>[^\)]+)\)|${r5}`,ch=Zr`\(\?<(?![=!])(?<captureName>[^>]+)>`,eT=Zr`${ch}|(?<unnamed>\()(?!\?)`,Gn=new RegExp(Zr`${ch}|${fp}|\(\?|\\?.`,"gsu"),Td="Cannot use multiple overlapping recursions";function i5(e,t){const{hiddenCaptures:r,mode:i}={hiddenCaptures:[],mode:"plugin",...t};let n=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(fp,"su").test(e))return{pattern:e,captureTransfers:n,hiddenCaptures:r};if(i==="plugin"&&lc(e,Zr`\(\?\(DEFINE\)`,Jr.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],a=lc(e,Zr`\\[1-9]`,Jr.DEFAULT),o=new Map,l=[];let c=!1,u=0,h=0,f;for(Gn.lastIndex=0;f=Gn.exec(e);){const{0:d,groups:{captureName:p,rDepth:g,gRNameOrNum:b,gRDepth:m}}=f;if(d==="[")u++;else if(u)d==="]"&&u--;else if(g){if(hy(g),c)throw new Error(Td);if(a)throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const _=e.slice(0,f.index),k=e.slice(Gn.lastIndex);if(lc(k,fp,Jr.DEFAULT))throw new Error(Td);const T=+g-1;e=dy(_,k,T,!1,r,s,h),n=py(n,_,T,s.length,0,h);break}else if(b){hy(m);let _=!1;for(const X of l)if(X.name===b||X.num===+b){if(_=!0,X.hasRecursedWithin)throw new Error(Td);break}if(!_)throw new Error(Zr`Recursive \g cannot be used outside the referenced group "${i==="external"?b:Zr`\g<${b}&R=${m}>`}"`);const k=o.get(b),T=JN(e,k);if(a&&lc(T,Zr`${ch}|\((?!\?)`,Jr.DEFAULT))throw new Error(`${i==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const E=e.slice(k,f.index),S=T.slice(E.length+d.length),B=s.length,L=+m-1,W=dy(E,S,L,!0,r,s,h);n=py(n,E,L,s.length-B,B,h);const O=e.slice(0,k),$=e.slice(k+T.length);e=`${O}${W}${$}`,Gn.lastIndex+=W.length-d.length-E.length-S.length,l.forEach(X=>X.hasRecursedWithin=!0),c=!0}else if(p)h++,o.set(String(h),Gn.lastIndex),o.set(p,Gn.lastIndex),l.push({num:h,name:p});else if(d[0]==="("){const _=d==="(";_&&(h++,o.set(String(h),Gn.lastIndex)),l.push(_?{num:h}:{})}else d===")"&&l.pop()}return r.push(...s),{pattern:e,captureTransfers:n,hiddenCaptures:r}}function hy(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function dy(e,t,r,i,n,s,a){const o=new Set;i&&Jk(e+t,ch,({groups:{captureName:c}})=>{o.add(c)},Jr.DEFAULT);const l=[r,i?o:null,n,s,a];return`${e}${fy(`(?:${e}`,"forward",...l)}(?:)${fy(`${t})`,"backward",...l)}${t}`}function fy(e,t,r,i,n,s,a){const l=u=>t==="forward"?u+2:r-u+2-1;let c="";for(let u=0;u<r;u++){const h=l(u);c+=Kg(e,Zr`${eT}|\\k<(?<backref>[^>]+)>`,({0:f,groups:{captureName:d,unnamed:p,backref:g}})=>{if(g&&i&&!i.has(g))return f;const b=`_$${h}`;if(p||d){const m=a+s.length+1;return s.push(m),n5(n,m),p?f:`(?<${d}${b}>`}return Zr`\k<${g}${b}>`},Jr.DEFAULT)}return c}function n5(e,t){for(let r=0;r<e.length;r++)e[r]>=t&&e[r]++}function py(e,t,r,i,n,s){if(e.size&&i){let a=0;Jk(t,eT,()=>a++,Jr.DEFAULT);const o=s-a+n,l=new Map;return e.forEach((c,u)=>{const h=(i-a*r)/r,f=a*r,d=u>o+a?u+i:u,p=[];for(const g of c)if(g<=o)p.push(g);else if(g>o+a+h)p.push(g+i);else if(g<=o+a)for(let b=0;b<=r;b++)p.push(g+a*b);else for(let b=0;b<=r;b++)p.push(g+f+h*b);l.set(d,p)}),l}return e}var Ke=String.fromCodePoint,oe=String.raw,hi={},uh=globalThis.RegExp;hi.flagGroups=(()=>{try{new uh("(?i:)")}catch{return!1}return!0})();hi.unicodeSets=(()=>{try{new uh("[[]]","v")}catch{return!1}return!0})();hi.bugFlagVLiteralHyphenIsRange=hi.unicodeSets?(()=>{try{new uh(oe`[\d\-a]`,"v")}catch{return!0}return!1})():!1;hi.bugNestedClassIgnoresNegation=hi.unicodeSets&&new uh("[[^a]]","v").test("a");function pu(e,{enable:t,disable:r}){return{dotAll:!(r!=null&&r.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(r!=null&&r.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function gl(e,t,r){return e.has(t)||e.set(t,r),e.get(t)}function pp(e,t){return gy[e]>=gy[t]}function s5(e,t){if(e==null)throw new Error(t??"Value expected");return e}var gy={ES2025:2025,ES2024:2024,ES2018:2018},a5={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function rT(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!a5[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=hi.flagGroups?"ES2025":hi.unicodeSets?"ES2024":"ES2018"),t}var o5="[ -\r ]",l5=new Set([Ke(304),Ke(305)]),Vi=oe`[\p{L}\p{M}\p{N}\p{Pc}]`;function iT(e){if(l5.has(e))return[e];const t=new Set,r=e.toLowerCase(),i=r.toUpperCase(),n=h5.get(r),s=c5.get(r),a=u5.get(r);return[...i].length===1&&t.add(i),a&&t.add(a),n&&t.add(n),t.add(r),s&&t.add(s),[...t]}var Qg=new Map(`C Other
66
- Cc Control cntrl
67
- Cf Format
68
- Cn Unassigned
69
- Co Private_Use
70
- Cs Surrogate
71
- L Letter
72
- LC Cased_Letter
73
- Ll Lowercase_Letter
74
- Lm Modifier_Letter
75
- Lo Other_Letter
76
- Lt Titlecase_Letter
77
- Lu Uppercase_Letter
78
- M Mark Combining_Mark
79
- Mc Spacing_Mark
80
- Me Enclosing_Mark
81
- Mn Nonspacing_Mark
82
- N Number
83
- Nd Decimal_Number digit
84
- Nl Letter_Number
85
- No Other_Number
86
- P Punctuation punct
87
- Pc Connector_Punctuation
88
- Pd Dash_Punctuation
89
- Pe Close_Punctuation
90
- Pf Final_Punctuation
91
- Pi Initial_Punctuation
92
- Po Other_Punctuation
93
- Ps Open_Punctuation
94
- S Symbol
95
- Sc Currency_Symbol
96
- Sk Modifier_Symbol
97
- Sm Math_Symbol
98
- So Other_Symbol
99
- Z Separator
100
- Zl Line_Separator
101
- Zp Paragraph_Separator
102
- Zs Space_Separator
103
- ASCII
104
- ASCII_Hex_Digit AHex
105
- Alphabetic Alpha
106
- Any
107
- Assigned
108
- Bidi_Control Bidi_C
109
- Bidi_Mirrored Bidi_M
110
- Case_Ignorable CI
111
- Cased
112
- Changes_When_Casefolded CWCF
113
- Changes_When_Casemapped CWCM
114
- Changes_When_Lowercased CWL
115
- Changes_When_NFKC_Casefolded CWKCF
116
- Changes_When_Titlecased CWT
117
- Changes_When_Uppercased CWU
118
- Dash
119
- Default_Ignorable_Code_Point DI
120
- Deprecated Dep
121
- Diacritic Dia
122
- Emoji
123
- Emoji_Component EComp
124
- Emoji_Modifier EMod
125
- Emoji_Modifier_Base EBase
126
- Emoji_Presentation EPres
127
- Extended_Pictographic ExtPict
128
- Extender Ext
129
- Grapheme_Base Gr_Base
130
- Grapheme_Extend Gr_Ext
131
- Hex_Digit Hex
132
- IDS_Binary_Operator IDSB
133
- IDS_Trinary_Operator IDST
134
- ID_Continue IDC
135
- ID_Start IDS
136
- Ideographic Ideo
137
- Join_Control Join_C
138
- Logical_Order_Exception LOE
139
- Lowercase Lower
140
- Math
141
- Noncharacter_Code_Point NChar
142
- Pattern_Syntax Pat_Syn
143
- Pattern_White_Space Pat_WS
144
- Quotation_Mark QMark
145
- Radical
146
- Regional_Indicator RI
147
- Sentence_Terminal STerm
148
- Soft_Dotted SD
149
- Terminal_Punctuation Term
150
- Unified_Ideograph UIdeo
151
- Uppercase Upper
152
- Variation_Selector VS
153
- White_Space space
154
- XID_Continue XIDC
155
- XID_Start XIDS`.split(/\s/).map(e=>[lh(e),e])),c5=new Map([["s",Ke(383)],[Ke(383),"s"]]),u5=new Map([[Ke(223),Ke(7838)],[Ke(107),Ke(8490)],[Ke(229),Ke(8491)],[Ke(969),Ke(8486)]]),h5=new Map([En(453),En(456),En(459),En(498),...Ed(8072,8079),...Ed(8088,8095),...Ed(8104,8111),En(8124),En(8140),En(8188)]),d5=new Map([["alnum",oe`[\p{Alpha}\p{Nd}]`],["alpha",oe`\p{Alpha}`],["ascii",oe`\p{ASCII}`],["blank",oe`[\p{Zs}\t]`],["cntrl",oe`\p{Cc}`],["digit",oe`\p{Nd}`],["graph",oe`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",oe`\p{Lower}`],["print",oe`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",oe`[\p{P}\p{S}]`],["space",oe`\p{space}`],["upper",oe`\p{Upper}`],["word",oe`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",oe`\p{AHex}`]]);function f5(e,t){const r=[];for(let i=e;i<=t;i++)r.push(i);return r}function En(e){const t=Ke(e);return[t.toLowerCase(),t]}function Ed(e,t){return f5(e,t).map(r=>En(r))}var nT=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function p5(e,t){const r={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};sT(e);const i={accuracy:r.accuracy,asciiWordBoundaries:r.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:pp(r.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Go(e,g5,i);const n={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:n,prevFlags:null,globalFlags:n,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:i.subroutineRefMap};Go(e,m5,s);const a={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Go(e,b5,a),e._originMap=s.groupOriginByCopy,e._strategy=i.strategy,e}var g5={AbsenceFunction({node:e,parent:t,replaceWith:r}){const{body:i,kind:n}=e;if(n==="repeater"){const s=ci();s.body[0].body.push(ns({negate:!0,body:i}),ea("Any"));const a=ci();a.body[0].body.push(Kk("greedy",0,1/0,s)),r(Fe(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:r},{flagDirectivesByAlt:i}){const n=e.body.filter(s=>s.kind==="flags");for(let s=r+1;s<t.body.length;s++){const a=t.body[s];gl(i,a,[]).push(...n)}},exit({node:e},{flagDirectivesByAlt:t}){var r;if((r=t.get(e))!=null&&r.length){const i=oT(t.get(e));if(i){const n=ci({flags:i});n.body[0].body=e.body,e.body=[Fe(n,e)]}}}},Assertion({node:e,parent:t,key:r,container:i,root:n,remove:s,replaceWith:a},o){const{kind:l,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:h,supportedGNodes:f,wordIsAscii:d}=o;if(l==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(l==="line_end")a(Fe(ns({body:[Cs({body:[up("string_end")]}),Cs({body:[oh(10)]})]}),t));else if(l==="line_start")a(Fe(Gi(oe`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(l==="search_start")if(f.has(e))n.flags.sticky=!0,s();else{const p=i[r-1];if(p&&T5(p))a(Fe(ns({negate:!0}),t));else{if(h)throw new Error(oe`Uses "\G" in a way that requires a subclass`);a(wn(up("string_start"),t)),o.strategy="clip_search"}}else if(!(l==="string_end"||l==="string_start"))if(l==="string_end_newline")a(Fe(Gi(oe`(?=\n?\z)`),t));else if(l==="word_boundary"){if(!d&&!u){const p=`(?:(?<=${Vi})(?!${Vi})|(?<!${Vi})(?=${Vi}))`,g=`(?:(?<=${Vi})(?=${Vi})|(?<!${Vi})(?!${Vi}))`;a(Fe(Gi(c?g:p),t))}}else throw new Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Sd(r)&&(r=wd(r,t),e.ref=r)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:r}){let{name:i}=e;i&&!Sd(i)&&(i=wd(i,t),e.name=i),r.set(e.number,e),i&&r.set(i,e)},CharacterClassRange({node:e,parent:t,replaceWith:r}){if(t.kind==="intersection"){const i=Fc({body:[e]});r(Fe(i,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:r},{accuracy:i,minTargetEs2024:n,digitIsAscii:s,spaceIsAscii:a,wordIsAscii:o}){const{kind:l,negate:c,value:u}=e;if(s&&(l==="digit"||u==="digit")){r(wn(dp("digit",{negate:c}),t));return}if(a&&(l==="space"||u==="space")){r(Fe(Ad(Gi(o5),c),t));return}if(o&&(l==="word"||u==="word")){r(wn(dp("word",{negate:c}),t));return}if(l==="any")r(wn(ea("Any"),t));else if(l==="digit")r(wn(ea("Nd",{negate:c}),t));else if(l!=="dot")if(l==="text_segment"){if(i==="strict")throw new Error(oe`Use of "\X" requires non-strict accuracy`);const h="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",f=oe`\p{RI}{2}|${h}(?:\u200D${h})*`;r(Fe(Gi(oe`(?>\r\n|${n?oe`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(l==="hex")r(wn(ea("AHex",{negate:c}),t));else if(l==="newline")r(Fe(Gi(c?`[^
156
- ]`:`(?>\r
157
- ?|[
158
- \v\f…\u2028\u2029])`),t));else if(l==="posix")if(!n&&(u==="graph"||u==="print")){if(i==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let h={graph:"!-~",print:" -~"}[u];c&&(h=`\0-${Ke(h.codePointAt(0)-1)}${Ke(h.codePointAt(2)+1)}-􏿿`),r(Fe(Gi(`[${h}]`),t))}else r(Fe(Ad(Gi(d5.get(u)),c),t));else if(l==="property")Qg.has(lh(u))||(e.key="sc");else if(l==="space")r(wn(ea("space",{negate:c}),t));else if(l==="word")r(Fe(Ad(Gi(Vi),c),t));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:r,remove:i,replaceWith:n,removeAllPrevSiblings:s,removeAllNextSiblings:a}){const{kind:o,flags:l}=e;if(o==="flags")if(!l.enable&&!l.disable)i();else{const c=ci({flags:l});c.body[0].body=a(),n(Fe(c,t),{traverse:!0})}else if(o==="keep"){const c=r.body[0],h=r.body.length===1&&Gk(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:r;if(t.parent!==h||h.body.length>1)throw new Error(oe`Uses "\K" in a way that's unsupported`);const f=ns({behind:!0});f.body[0].body=s(),n(Fe(f,t))}else throw new Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(r=>delete e[r]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:r}=e.flags;t!=null&&t.extended&&delete t.extended,r!=null&&r.extended&&delete r.extended,t!=null&&t.dotAll&&(r!=null&&r.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(r!=null&&r.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,r&&!Object.keys(r).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:r}=e;r==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:r}){const{kind:i}=e;if(i==="fail")r(Fe(ns({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${i.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=ci();t.body[0].body.push(e.body),e.body=Fe(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const r=[];let i=!1,n=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const a=cT(s.body);a?(i=!0,Array.isArray(a)?r.push(...a):r.push(a)):n=!0}i&&!n&&r.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:r,strategy:i}){if(t==="strict"&&r&&i)throw new Error(oe`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:r}=e;typeof r=="string"&&!Sd(r)&&(r=wd(r,t),e.ref=r)}},m5={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:r}){const{orphan:i,ref:n}=e;i||r.set(e,[...t.get(n).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:r,skip:i},{groupOriginByCopy:n,groupsByName:s,multiplexCapturesToLeftByRef:a,openRefs:o,reffedNodesByReferencer:l}){const c=n.get(e);if(c&&o.has(e.number)){const h=wn(my(e.number),t);l.set(h,o.get(e.number)),r(h);return}o.set(e.number,e),a.set(e.number,[]),e.name&&gl(a,e.name,[]);const u=a.get(e.name??e.number);for(let h=0;h<u.length;h++){const f=u[h];if(c===f.node||c&&c===f.origin||e===f.origin){u.splice(h,1);break}}if(a.get(e.number).push({node:e,origin:c}),e.name&&a.get(e.name).push({node:e,origin:c}),e.name){const h=gl(s,e.name,new Map);let f=!1;if(c)f=!0;else for(const d of h.values())if(!d.hasDuplicateNameToRemove){f=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:f})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=pu(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:r},i){const{isRecursive:n,ref:s}=e;if(n){let u=t;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===s||u.number===s)););i.reffedNodesByReferencer.set(e,u);return}const a=i.subroutineRefMap.get(s),o=s===0,l=o?my(0):aT(a,i.groupOriginByCopy,null);let c=l;if(!o){const u=oT(C5(a,f=>f.type==="Group"&&!!f.flags)),h=u?pu(i.globalFlags,u):i.globalFlags;y5(h,i.currentFlags)||(c=ci({flags:_5(h)}),c.body[0].body.push(l))}r(Fe(c,t),{traverse:!o})}},b5={Backreference({node:e,parent:t,replaceWith:r},i){if(e.orphan){i.highestOrphanBackref=Math.max(i.highestOrphanBackref,e.ref);return}const s=i.reffedNodesByReferencer.get(e).filter(a=>x5(a,e));if(!s.length)r(Fe(ns({negate:!0}),t));else if(s.length>1){const a=ci({atomic:!0,body:s.reverse().map(o=>Cs({body:[hp(o.number)]}))});r(Fe(a,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const r=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let i=0;i<r;i++){const n=Xk();e.body.at(-1).body.push(n)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function sT(e){Go(e,{"*"({node:t,parent:r}){t.parent=r}})}function y5(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function x5(e,t){let r=t;do{if(r.type==="Regex")return!1;if(r.type==="Alternative")continue;if(r===e)return!1;const i=lT(r.parent);for(const n of i){if(n===r)break;if(n===e||uT(n,e))return!0}}while(r=r.parent);throw new Error("Unexpected path")}function aT(e,t,r,i){const n=Array.isArray(e)?[]:{};for(const[s,a]of Object.entries(e))s==="parent"?n.parent=Array.isArray(r)?i:r:a&&typeof a=="object"?n[s]=aT(a,t,n,r):(s==="type"&&a==="CapturingGroup"&&t.set(n,t.get(e)??e),n[s]=a);return n}function my(e){const t=Qk(e);return t.isRecursive=!0,t}function C5(e,t){const r=[];for(;e=e.parent;)(!t||t(e))&&r.push(e);return r}function wd(e,t){if(t.has(e))return t.get(e);const r=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,r),r}function oT(e){const t=["dotAll","ignoreCase"],r={enable:{},disable:{}};return e.forEach(({flags:i})=>{t.forEach(n=>{var s,a;(s=i.enable)!=null&&s[n]&&(delete r.disable[n],r.enable[n]=!0),(a=i.disable)!=null&&a[n]&&(r.disable[n]=!0)})}),Object.keys(r.enable).length||delete r.enable,Object.keys(r.disable).length||delete r.disable,r.enable||r.disable?r:null}function _5({dotAll:e,ignoreCase:t}){const r={};return(e||t)&&(r.enable={},e&&(r.enable.dotAll=!0),t&&(r.enable.ignoreCase=!0)),(!e||!t)&&(r.disable={},!e&&(r.disable.dotAll=!0),!t&&(r.disable.ignoreCase=!0)),r}function lT(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function cT(e){const t=e.find(r=>r.kind==="search_start"||E5(r,{negate:!1})||!k5(r));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const r=[];for(const i of t.body){const n=cT(i.body);if(!n)return null;Array.isArray(n)?r.push(...n):r.push(n)}return r}return null}function uT(e,t){const r=lT(e)??[];for(const i of r)if(i===t||uT(i,t))return!0;return!1}function k5({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function T5(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function E5(e,t){const r={negate:null,...t};return e.type==="LookaroundAssertion"&&(r.negate===null||e.negate===r.negate)&&e.body.length===1&&Gk(e.body[0],{type:"Assertion",kind:"search_start"})}function Sd(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Gi(e,t){const i=Yk(e,{...t,unicodePropertyMap:Qg}).body;return i.length>1||i[0].body.length>1?ci({body:i}):i[0].body[0]}function Ad(e,t){return e.negate=t,e}function wn(e,t){return e.parent=t,e}function Fe(e,t){return sT(e),e.parent=t,e}function w5(e,t){const r=rT(t),i=pp(r.target,"ES2024"),n=pp(r.target,"ES2025"),s=r.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,o=null;if(!n){const d=[e.flags.ignoreCase];Go(e,S5,{getCurrentModI:()=>d.at(-1),popModI(){d.pop()},pushModI(p){d.push(p)},setHasCasedChar(){d.at(-1)?a=!0:o=!0}})}const l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!o)};let c=e;const u={accuracy:r.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!n&&a&&o),useFlagMods:n,useFlagV:i,verbose:r.verbose};function h(d){return u.lastNode=c,c=d,s5(A5[d.type],`Unexpected node type "${d.type}"`)(d,u,h)}const f={pattern:e.body.map(h).join("|"),flags:h(e.flags),options:{...e.options}};return i||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((d,p)=>{d.hidden&&f._hiddenCaptures.push(p),d.transferTo&&gl(f._captureTransfers,d.transferTo,[]).push(p)}),f}var S5={"*":{enter({node:e},t){if(yy(e)){const r=t.getCurrentModI();t.pushModI(e.flags?pu({ignoreCase:r},e.flags).ignoreCase:r)}},exit({node:e},t){yy(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Zg(Ke(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},r){t(),hT(e,{firstOnly:!0}).length&&r.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&nT.has(e.value)&&t.setHasCasedChar()}},A5={Alternative({body:e},t,r){return e.map(r).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?oe`\B`:oe`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,r){const{body:i,name:n,number:s}=e,a={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(a.hidden=!0,s>o.number&&(a.transferTo=o.number)),t.captureMap.set(s,a),`(${n?`?<${n}>`:""}${i.map(r).join("|")})`},Character({value:e},t){const r=Ke(e),i=Gs(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(i!==r)return i;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Zg(r)){const n=iT(r);return t.inCharClass?n.join(""):n.length>1?`[${n.join("")}]`:n[0]}return r},CharacterClass(e,t,r){const{kind:i,negate:n,parent:s}=e;let{body:a}=e;if(i==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");hi.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(xy)&&(a=[oh(45),...a.filter(c=>!xy(c))]);const o=()=>`[${n?"^":""}${a.map(r).join(i==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||hi.bugNestedClassIgnoresNegation)&&!n){const u=a.filter(h=>h.type==="CharacterClass"&&h.kind==="union"&&h.negate);if(u.length){const h=ci(),f=h.body[0];return h.parent=s,f.parent=h,a=a.filter(d=>!u.includes(d)),e.body=a,a.length?(e.parent=f,f.body.push(e)):h.body.pop(),u.forEach(d=>{const p=Cs({body:[d]});d.parent=p,p.parent=h,h.body.push(p)}),r(h)}}t.inCharClass=!0;const c=o();return t.inCharClass=!1,c}const l=a[0];if(i==="union"&&!n&&l&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(hi.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&a.length===1&&l.type!=="CharacterClassRange"))return a.map(r).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){const r=e.min.value,i=e.max.value,n={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=Gs(r,n),a=Gs(i,n),o=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const l=hT(e);R5(l).forEach(u=>{o.add(Array.isArray(u)?`${Gs(u[0],n)}-${Gs(u[1],n)}`:Gs(u,n))})}return`${s}-${a}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:r,key:i},n){if(e==="dot")return n.currentFlags.dotAll?n.appliedGlobalFlags.dotAll||n.useFlagMods?".":"[^]":oe`[^\n]`;if(e==="digit")return t?oe`\D`:oe`\d`;if(e==="property"){if(n.useAppliedIgnoreCase&&n.currentFlags.ignoreCase&&nT.has(r))throw new Error(`Unicode property "${r}" can't be case-insensitive when other chars have specific case`);return`${t?oe`\P`:oe`\p`}{${i?`${i}=`:""}${r}}`}if(e==="word")return t?oe`\W`:oe`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:r,parent:i},n,s){const a=n.currentFlags;r&&(n.currentFlags=pu(a,r));const o=t.map(s).join("|"),l=!n.verbose&&t.length===1&&i.type!=="Quantifier"&&!e&&(!n.useFlagMods||!r)?o:`(?${O5(e,r,n.useFlagMods)}${o})`;return n.currentFlags=a,l},LookaroundAssertion({body:e,kind:t,negate:r},i,n){return`(?${`${t==="lookahead"?"":"<"}${r?"!":"="}`}${e.map(n).join("|")})`},Quantifier(e,t,r){return r(e.body)+N5(e)},Subroutine({isRecursive:e,ref:t},r){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const i=r.recursionLimit;return t===0?`(?R=${i})`:oe`\g<${t}&R=${i}>`}},v5=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),L5=new Set(["-","\\","]","^","["]),I5=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),by=new Map([[9,oe`\t`],[10,oe`\n`],[11,oe`\v`],[12,oe`\f`],[13,oe`\r`],[8232,oe`\u2028`],[8233,oe`\u2029`],[65279,oe`\uFEFF`]]),B5=new RegExp("^\\p{Cased}$","u");function Zg(e){return B5.test(e)}function hT(e,t){const r=!!(t!=null&&t.firstOnly),i=e.min.value,n=e.max.value,s=[];if(i<65&&(n===65535||n>=131071)||i===65536&&n>=131071)return s;for(let a=i;a<=n;a++){const o=Ke(a);if(!Zg(o))continue;const l=iT(o).filter(c=>{const u=c.codePointAt(0);return u<i||u>n});if(l.length&&(s.push(...l),r))break}return s}function Gs(e,{escDigit:t,inCharClass:r,useFlagV:i}){if(by.has(e))return by.get(e);if(e<32||e>126&&e<160||e>262143||t&&D5(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const n=r?i?I5:L5:v5,s=Ke(e);return(n.has(s)?"\\":"")+s}function R5(e){const t=e.map(n=>n.codePointAt(0)).sort((n,s)=>n-s),r=[];let i=null;for(let n=0;n<t.length;n++)t[n+1]===t[n]+1?i??(i=t[n]):i===null?r.push(t[n]):(r.push([i,t[n]]),i=null);return r}function O5(e,t,r){if(e)return">";let i="";if(t&&r){const{enable:n,disable:s}=t;i=(n!=null&&n.ignoreCase?"i":"")+(n!=null&&n.dotAll?"s":"")+(s?"-":"")+(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")}return`${i}:`}function N5({kind:e,max:t,min:r}){let i;return!r&&t===1?i="?":!r&&t===1/0?i="*":r===1&&t===1/0?i="+":r===t?i=`{${r}}`:i=`{${r},${t===1/0?"":t}}`,i+{greedy:"",lazy:"?",possessive:"+"}[e]}function yy({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function D5(e){return e>47&&e<58}function xy({type:e,value:t}){return e==="Character"&&t===45}var Bn,rn,ps,Rn,gs,Ll,gp,Fn,P5=(Fn=class extends RegExp{constructor(r,i,n){var t=(...Tct)=>(super(...Tct),Vn(this,Ll),Vn(this,Bn,new Map),Vn(this,rn,null),Vn(this,ps),Vn(this,Rn,null),Vn(this,gs,null),Z(this,"rawOptions",{}),this);const s=!!(n!=null&&n.lazyCompile);if(r instanceof RegExp){if(n)throw new Error("Cannot provide options when copying a regexp");const a=r;t(a,i),ni(this,ps,a.source),a instanceof Fn&&(ni(this,Bn,Tr(a,Bn)),ni(this,Rn,Tr(a,Rn)),ni(this,gs,Tr(a,gs)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...n};t(s?"":r,i),ni(this,ps,r),ni(this,Bn,F5(a.hiddenCaptures,a.transfers)),ni(this,gs,a.strategy),this.rawOptions=n??{}}s||ni(this,rn,this)}get source(){return Tr(this,ps)||"(?:)"}exec(r){if(!Tr(this,rn)){const{lazyCompile:s,...a}=this.rawOptions;ni(this,rn,new Fn(Tr(this,ps),this.flags,a))}const i=this.global||this.sticky,n=this.lastIndex;if(Tr(this,gs)==="clip_search"&&i&&n){this.lastIndex=0;const s=dd(this,Ll,gp).call(this,r.slice(n));return s&&(M5(s,n,r,this.hasIndices),this.lastIndex+=n),s}return dd(this,Ll,gp).call(this,r)}},Bn=new WeakMap,rn=new WeakMap,ps=new WeakMap,Rn=new WeakMap,gs=new WeakMap,Ll=new WeakSet,gp=function(r){Tr(this,rn).lastIndex=this.lastIndex;const i=Bb(Fn.prototype,this,"exec").call(Tr(this,rn),r);if(this.lastIndex=Tr(this,rn).lastIndex,!i||!Tr(this,Bn).size)return i;const n=[...i];i.length=1;let s;this.hasIndices&&(s=[...i.indices],i.indices.length=1);const a=[0];for(let o=1;o<n.length;o++){const{hidden:l,transferTo:c}=Tr(this,Bn).get(o)??{};if(l?a.push(null):(a.push(i.length),i.push(n[o]),this.hasIndices&&i.indices.push(s[o])),c&&n[o]!==void 0){const u=a[c];if(!u)throw new Error(`Invalid capture transfer to "${u}"`);if(i[u]=n[o],this.hasIndices&&(i.indices[u]=s[o]),i.groups){Tr(this,Rn)||ni(this,Rn,$5(this.source));const h=Tr(this,Rn).get(c);h&&(i.groups[h]=n[o],this.hasIndices&&(i.indices.groups[h]=s[o]))}}}return i},Fn);function M5(e,t,r,i){if(e.index+=t,e.input=r,i){const n=e.indices;for(let a=0;a<n.length;a++){const o=n[a];o&&(n[a]=[o[0]+t,o[1]+t])}const s=n.groups;s&&Object.keys(s).forEach(a=>{const o=s[a];o&&(s[a]=[o[0]+t,o[1]+t])})}}function F5(e,t){const r=new Map;for(const i of e)r.set(i,{hidden:!0});for(const[i,n]of t)for(const s of n)gl(r,s,{}).transferTo=i;return r}function $5(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map;let i=0,n=0,s;for(;s=t.exec(e);){const{0:a,groups:{capture:o,name:l}}=s;a==="["?i++:i?a==="]"&&i--:o&&(n++,l&&r.set(n,l))}return r}function H5(e,t){const r=z5(e,t);return r.options?new P5(r.pattern,r.flags,r.options):new RegExp(r.pattern,r.flags)}function z5(e,t){const r=rT(t),i=Yk(e,{flags:r.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline},skipBackrefValidation:r.rules.allowOrphanBackrefs,unicodePropertyMap:Qg}),n=p5(i,{accuracy:r.accuracy,asciiWordBoundaries:r.rules.asciiWordBoundaries,avoidSubclass:r.avoidSubclass,bestEffortTarget:r.target}),s=w5(n,r),a=i5(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),o=e5(a.pattern),l=t5(o.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),c={pattern:l.pattern,flags:`${r.hasIndices?"d":""}${r.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(r.avoidSubclass){if(r.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const u=l.hiddenCaptures.sort((p,g)=>p-g),h=Array.from(l.captureTransfers),f=n._strategy,d=c.pattern.length>=r.lazyCompileLength;(u.length||h.length||f||d)&&(c.options={...u.length&&{hiddenCaptures:u},...h.length&&{transfers:h},...f&&{strategy:f},...d&&{lazyCompile:d}})}return c}const Cy=4294967295;class U5{constructor(t,r={}){Z(this,"regexps");this.patterns=t,this.options=r;const{forgiving:i=!1,cache:n,regexConstructor:s}=r;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const o=n==null?void 0:n.get(a);if(o){if(o instanceof RegExp)return o;if(i)return null;throw o}try{const l=s(a);return n==null||n.set(a,l),l}catch(l){if(n==null||n.set(a,l),i)return null;throw l}})}findNextMatchSync(t,r,i){const n=typeof t=="string"?t:t.content,s=[];function a(o,l,c=0){return{index:o,captureIndices:l.indices.map(u=>u==null?{start:Cy,end:Cy,length:0}:{start:u[0]+c,end:u[1]+c,length:u[1]-u[0]})}}for(let o=0;o<this.regexps.length;o++){const l=this.regexps[o];if(l)try{l.lastIndex=r;const c=l.exec(n);if(!c)continue;if(c.index===r)return a(o,c,0);s.push([o,c,0])}catch(c){if(this.options.forgiving)continue;throw c}}if(s.length){const o=Math.min(...s.map(l=>l[1].index));for(const[l,c,u]of s)if(c.index===o)return a(l,c,u)}return null}}function q5(e,t){return H5(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function W5(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=r=>q5(r,{target:t.target})),{createScanner(r){return new U5(r,t)},createString(r){return{content:r}}}}var j5=W5({forgiving:!0}),V5=Object.fromEntries(Vg.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(r=>[r,e.id])})),$c=new Set(Object.keys(Hk)),_y=e=>{let t=e.trim().toLowerCase();return V5[t]||($c.has(t),t)},vd=new Map,Ld=new Map,Ys=new Map,gu=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},G5=(e,t)=>`${e}-${gu(t[0])}-${gu(t[1])}`,Y5=(e,t,r)=>{let i=e.slice(0,100),n=e.length>100?e.slice(-100):"";return`${t}:${r[0]}:${r[1]}:${e.length}:${i}:${n}`},X5=(e,t)=>{let r=G5(e,t);if(vd.has(r))return vd.get(r);let i=nN({themes:t,langs:[e],engine:j5});return vd.set(r,i),i};function K5(e={}){var t;let r=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(i){let n=_y(i);return $c.has(n)},getSupportedLanguages(){return Array.from($c)},getThemes(){return r},highlight({code:i,language:n,themes:s},a){let o=_y(n),l=[gu(s[0]),gu(s[1])],c=Y5(i,o,l);if(Ld.has(c))return Ld.get(c);a&&(Ys.has(c)||Ys.set(c,new Set),Ys.get(c).add(a));let u=$c.has(o)?o:"text";return X5(u,s).then(h=>{let f=h.getLoadedLanguages().includes(o)?o:"text",d=h.codeToTokens(i,{lang:f,themes:{light:l[0],dark:l[1]}});Ld.set(c,d);let p=Ys.get(c);if(p){for(let g of p)g(d);Ys.delete(c)}}).catch(h=>{console.error("[Streamdown Code] Failed to highlight code:",h),Ys.delete(c)}),null}}}var Q5=K5(),dT=Object.defineProperty,C=(e,t)=>dT(e,"name",{value:t,configurable:!0}),Z5=(e,t)=>{for(var r in t)dT(e,r,{get:t[r],enumerable:!0})},Hc={exports:{}},J5=Hc.exports,ky;function t6(){return ky||(ky=1,(function(e,t){(function(r,i){e.exports=i()})(J5,(function(){var r=1e3,i=6e4,n=36e5,s="millisecond",a="second",o="minute",l="hour",c="day",u="week",h="month",f="quarter",d="year",p="date",g="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var M=["th","st","nd","rd"],N=H%100;return"["+H+(M[(N-20)%10]||M[N]||M[0])+"]"}},k=function(H,M,N){var q=String(H);return!q||q.length>=M?H:""+Array(M+1-q.length).join(N)+H},T={s:k,z:function(H){var M=-H.utcOffset(),N=Math.abs(M),q=Math.floor(N/60),V=N%60;return(M<=0?"+":"-")+k(q,2,"0")+":"+k(V,2,"0")},m:function H(M,N){if(M.date()<N.date())return-H(N,M);var q=12*(N.year()-M.year())+(N.month()-M.month()),V=M.clone().add(q,h),tt=N-V<0,A=M.clone().add(q+(tt?-1:1),h);return+(-(q+(N-V)/(tt?V-A:A-V))||0)},a:function(H){return H<0?Math.ceil(H)||0:Math.floor(H)},p:function(H){return{M:h,y:d,w:u,d:c,D:p,h:l,m:o,s:a,ms:s,Q:f}[H]||String(H||"").toLowerCase().replace(/s$/,"")},u:function(H){return H===void 0}},E="en",S={};S[E]=_;var B="$isDayjsObject",L=function(H){return H instanceof X||!(!H||!H[B])},W=function H(M,N,q){var V;if(!M)return E;if(typeof M=="string"){var tt=M.toLowerCase();S[tt]&&(V=tt),N&&(S[tt]=N,V=tt);var A=M.split("-");if(!V&&A.length>1)return H(A[0])}else{var Et=M.name;S[Et]=M,V=Et}return!q&&V&&(E=V),V||!q&&E},O=function(H,M){if(L(H))return H.clone();var N=typeof M=="object"?M:{};return N.date=H,N.args=arguments,new X(N)},$=T;$.l=W,$.i=L,$.w=function(H,M){return O(H,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var X=(function(){function H(N){this.$L=W(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[B]=!0}var M=H.prototype;return M.parse=function(N){this.$d=(function(q){var V=q.date,tt=q.utc;if(V===null)return new Date(NaN);if($.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var A=V.match(b);if(A){var Et=A[2]-1||0,kt=(A[7]||"0").substring(0,3);return tt?new Date(Date.UTC(A[1],Et,A[3]||1,A[4]||0,A[5]||0,A[6]||0,kt)):new Date(A[1],Et,A[3]||1,A[4]||0,A[5]||0,A[6]||0,kt)}}return new Date(V)})(N),this.init()},M.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},M.$utils=function(){return $},M.isValid=function(){return this.$d.toString()!==g},M.isSame=function(N,q){var V=O(N);return this.startOf(q)<=V&&V<=this.endOf(q)},M.isAfter=function(N,q){return O(N)<this.startOf(q)},M.isBefore=function(N,q){return this.endOf(q)<O(N)},M.$g=function(N,q,V){return $.u(N)?this[q]:this.set(V,N)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(N,q){var V=this,tt=!!$.u(q)||q,A=$.p(N),Et=function(It,wt){var Lt=$.w(V.$u?Date.UTC(V.$y,wt,It):new Date(V.$y,wt,It),V);return tt?Lt:Lt.endOf(c)},kt=function(It,wt){return $.w(V.toDate()[It].apply(V.toDate("s"),(tt?[0,0,0,0]:[23,59,59,999]).slice(wt)),V)},P=this.$W,Rt=this.$M,Tt=this.$D,pt="set"+(this.$u?"UTC":"");switch(A){case d:return tt?Et(1,0):Et(31,11);case h:return tt?Et(1,Rt):Et(0,Rt+1);case u:var Ht=this.$locale().weekStart||0,Yt=(P<Ht?P+7:P)-Ht;return Et(tt?Tt-Yt:Tt+(6-Yt),Rt);case c:case p:return kt(pt+"Hours",0);case l:return kt(pt+"Minutes",1);case o:return kt(pt+"Seconds",2);case a:return kt(pt+"Milliseconds",3);default:return this.clone()}},M.endOf=function(N){return this.startOf(N,!1)},M.$set=function(N,q){var V,tt=$.p(N),A="set"+(this.$u?"UTC":""),Et=(V={},V[c]=A+"Date",V[p]=A+"Date",V[h]=A+"Month",V[d]=A+"FullYear",V[l]=A+"Hours",V[o]=A+"Minutes",V[a]=A+"Seconds",V[s]=A+"Milliseconds",V)[tt],kt=tt===c?this.$D+(q-this.$W):q;if(tt===h||tt===d){var P=this.clone().set(p,1);P.$d[Et](kt),P.init(),this.$d=P.set(p,Math.min(this.$D,P.daysInMonth())).$d}else Et&&this.$d[Et](kt);return this.init(),this},M.set=function(N,q){return this.clone().$set(N,q)},M.get=function(N){return this[$.p(N)]()},M.add=function(N,q){var V,tt=this;N=Number(N);var A=$.p(q),Et=function(Rt){var Tt=O(tt);return $.w(Tt.date(Tt.date()+Math.round(Rt*N)),tt)};if(A===h)return this.set(h,this.$M+N);if(A===d)return this.set(d,this.$y+N);if(A===c)return Et(1);if(A===u)return Et(7);var kt=(V={},V[o]=i,V[l]=n,V[a]=r,V)[A]||1,P=this.$d.getTime()+N*kt;return $.w(P,this)},M.subtract=function(N,q){return this.add(-1*N,q)},M.format=function(N){var q=this,V=this.$locale();if(!this.isValid())return V.invalidDate||g;var tt=N||"YYYY-MM-DDTHH:mm:ssZ",A=$.z(this),Et=this.$H,kt=this.$m,P=this.$M,Rt=V.weekdays,Tt=V.months,pt=V.meridiem,Ht=function(wt,Lt,Xt,Qt){return wt&&(wt[Lt]||wt(q,tt))||Xt[Lt].slice(0,Qt)},Yt=function(wt){return $.s(Et%12||12,wt,"0")},It=pt||function(wt,Lt,Xt){var Qt=wt<12?"AM":"PM";return Xt?Qt.toLowerCase():Qt};return tt.replace(m,(function(wt,Lt){return Lt||(function(Xt){switch(Xt){case"YY":return String(q.$y).slice(-2);case"YYYY":return $.s(q.$y,4,"0");case"M":return P+1;case"MM":return $.s(P+1,2,"0");case"MMM":return Ht(V.monthsShort,P,Tt,3);case"MMMM":return Ht(Tt,P);case"D":return q.$D;case"DD":return $.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return Ht(V.weekdaysMin,q.$W,Rt,2);case"ddd":return Ht(V.weekdaysShort,q.$W,Rt,3);case"dddd":return Rt[q.$W];case"H":return String(Et);case"HH":return $.s(Et,2,"0");case"h":return Yt(1);case"hh":return Yt(2);case"a":return It(Et,kt,!0);case"A":return It(Et,kt,!1);case"m":return String(kt);case"mm":return $.s(kt,2,"0");case"s":return String(q.$s);case"ss":return $.s(q.$s,2,"0");case"SSS":return $.s(q.$ms,3,"0");case"Z":return A}return null})(wt)||A.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(N,q,V){var tt,A=this,Et=$.p(q),kt=O(N),P=(kt.utcOffset()-this.utcOffset())*i,Rt=this-kt,Tt=function(){return $.m(A,kt)};switch(Et){case d:tt=Tt()/12;break;case h:tt=Tt();break;case f:tt=Tt()/3;break;case u:tt=(Rt-P)/6048e5;break;case c:tt=(Rt-P)/864e5;break;case l:tt=Rt/n;break;case o:tt=Rt/i;break;case a:tt=Rt/r;break;default:tt=Rt}return V?tt:$.a(tt)},M.daysInMonth=function(){return this.endOf(h).$D},M.$locale=function(){return S[this.$L]},M.locale=function(N,q){if(!N)return this.$L;var V=this.clone(),tt=W(N,q,!0);return tt&&(V.$L=tt),V},M.clone=function(){return $.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},H})(),G=X.prototype;return O.prototype=G,[["$ms",s],["$s",a],["$m",o],["$H",l],["$W",c],["$M",h],["$y",d],["$D",p]].forEach((function(H){G[H[1]]=function(M){return this.$g(M,H[0],H[1])}})),O.extend=function(H,M){return H.$i||(H(M,X,O),H.$i=!0),O},O.locale=W,O.isDayjs=L,O.unix=function(H){return O(1e3*H)},O.en=S[E],O.Ls=S,O.p={},O}))})(Hc)),Hc.exports}var e6=t6();const r6=Il(e6);var Yi={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},nt={trace:C((...e)=>{},"trace"),debug:C((...e)=>{},"debug"),info:C((...e)=>{},"info"),warn:C((...e)=>{},"warn"),error:C((...e)=>{},"error"),fatal:C((...e)=>{},"fatal")},Jg=C(function(e="fatal"){let t=Yi.fatal;typeof e=="string"?e.toLowerCase()in Yi&&(t=Yi[e]):typeof e=="number"&&(t=e),nt.trace=()=>{},nt.debug=()=>{},nt.info=()=>{},nt.warn=()=>{},nt.error=()=>{},nt.fatal=()=>{},t<=Yi.fatal&&(nt.fatal=console.error?console.error.bind(console,jr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",jr("FATAL"))),t<=Yi.error&&(nt.error=console.error?console.error.bind(console,jr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",jr("ERROR"))),t<=Yi.warn&&(nt.warn=console.warn?console.warn.bind(console,jr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",jr("WARN"))),t<=Yi.info&&(nt.info=console.info?console.info.bind(console,jr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",jr("INFO"))),t<=Yi.debug&&(nt.debug=console.debug?console.debug.bind(console,jr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",jr("DEBUG"))),t<=Yi.trace&&(nt.trace=console.debug?console.debug.bind(console,jr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",jr("TRACE")))},"setLogLevel"),jr=C(e=>`%c${r6().format("ss.SSS")} : ${e} : `,"format");const zc={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,s=2*r-n;switch(i){case"r":return zc.hue2rgb(s,n,e+1/3)*255;case"g":return zc.hue2rgb(s,n,e)*255;case"b":return zc.hue2rgb(s,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),s=Math.min(e,t,r),a=(n+s)/2;if(i==="l")return a*100;if(n===s)return 0;const o=n-s,l=a>.5?o/(2-n-s):o/(n+s);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},i6={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},n6={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},re={channel:zc,lang:i6,unit:n6},Sn={};for(let e=0;e<=255;e++)Sn[e]=re.unit.dec2hex(e);const fr={ALL:0,RGB:1,HSL:2};let s6=class{constructor(){this.type=fr.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=fr.ALL}is(t){return this.type===t}};class a6{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new s6}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=fr.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=re.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=re.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=re.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=re.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=re.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=re.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(fr.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(fr.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(fr.HSL)&&r!==void 0?r:(this._ensureHSL(),re.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(fr.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(fr.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(fr.RGB)&&r!==void 0?r:(this._ensureRGB(),re.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(fr.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(fr.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(fr.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(fr.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(fr.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(fr.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const hh=new a6({r:0,g:0,b:0,a:0},"transparent"),ha={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ha.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,s=n%4===0,a=n>4,o=a?1:17,l=a?8:4,c=s?0:-1,u=a?255:15;return hh.set({r:(i>>l*(c+3)&u)*o,g:(i>>l*(c+2)&u)*o,b:(i>>l*(c+1)&u)*o,a:s?(i&u)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Sn[Math.round(t)]}${Sn[Math.round(r)]}${Sn[Math.round(i)]}${Sn[Math.round(n*255)]}`:`#${Sn[Math.round(t)]}${Sn[Math.round(r)]}${Sn[Math.round(i)]}`}},cs={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(cs.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return re.channel.clamp.h(parseFloat(r)*.9);case"rad":return re.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return re.channel.clamp.h(parseFloat(r)*360)}}return re.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(cs.re);if(!r)return;const[,i,n,s,a,o]=r;return hh.set({h:cs._hue2deg(i),s:re.channel.clamp.s(parseFloat(n)),l:re.channel.clamp.l(parseFloat(s)),a:a?re.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${re.lang.round(t)}, ${re.lang.round(r)}%, ${re.lang.round(i)}%, ${n})`:`hsl(${re.lang.round(t)}, ${re.lang.round(r)}%, ${re.lang.round(i)}%)`}},Yo={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Yo.colors[e];if(t)return ha.parse(t)},stringify:e=>{const t=ha.stringify(e);for(const r in Yo.colors)if(Yo.colors[r]===t)return r}},Ro={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Ro.re);if(!r)return;const[,i,n,s,a,o,l,c,u]=r;return hh.set({r:re.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:re.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:re.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?re.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${re.lang.round(t)}, ${re.lang.round(r)}, ${re.lang.round(i)}, ${re.lang.round(n)})`:`rgb(${re.lang.round(t)}, ${re.lang.round(r)}, ${re.lang.round(i)})`}},Di={format:{keyword:Yo,hex:ha,rgb:Ro,rgba:Ro,hsl:cs,hsla:cs},parse:e=>{if(typeof e!="string")return e;const t=ha.parse(e)||Ro.parse(e)||cs.parse(e)||Yo.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(fr.HSL)||e.data.r===void 0?cs.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Ro.stringify(e):ha.stringify(e)},fT=(e,t)=>{const r=Di.parse(e);for(const i in t)r[i]=re.channel.clamp[i](t[i]);return Di.stringify(r)},Mn=(e,t,r=0,i=1)=>{if(typeof e!="number")return fT(e,{a:t});const n=hh.set({r:re.channel.clamp.r(e),g:re.channel.clamp.g(t),b:re.channel.clamp.b(r),a:re.channel.clamp.a(i)});return Di.stringify(n)},o6=e=>{const{r:t,g:r,b:i}=Di.parse(e),n=.2126*re.channel.toLinear(t)+.7152*re.channel.toLinear(r)+.0722*re.channel.toLinear(i);return re.lang.round(n)},l6=e=>o6(e)>=.5,mi=e=>!l6(e),pT=(e,t,r)=>{const i=Di.parse(e),n=i[t],s=re.channel.clamp[t](n+r);return n!==s&&(i[t]=s),Di.stringify(i)},at=(e,t)=>pT(e,"l",t),ot=(e,t)=>pT(e,"l",-t),w=(e,t)=>{const r=Di.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return fT(e,i)},c6=(e,t,r=50)=>{const{r:i,g:n,b:s,a}=Di.parse(e),{r:o,g:l,b:c,a:u}=Di.parse(t),h=r/100,f=h*2-1,d=a-u,g=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,b=1-g,m=i*g+o*b,_=n*g+l*b,k=s*g+c*b,T=a*h+u*(1-h);return Mn(m,_,k,T)},K=(e,t=100)=>{const r=Di.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,c6(r,e,t)};/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function Ty(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function u6(e){if(Array.isArray(e))return e}function h6(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,n,s,a,o=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(i=s.call(r)).done)&&(o.push(i.value),o.length!==t);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}function d6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
159
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function f6(e,t){return u6(e)||h6(e,t)||p6(e,t)||d6()}function p6(e,t){if(e){if(typeof e=="string")return Ty(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ty(e,t):void 0}}const gT=Object.entries,Ey=Object.setPrototypeOf,g6=Object.isFrozen,mT=Object.getPrototypeOf,bT=Object.getOwnPropertyDescriptor;let ir=Object.freeze,lr=Object.seal,ra=Object.create,yT=typeof Reflect<"u"&&Reflect,mp=yT.apply,bp=yT.construct;ir||(ir=function(t){return t});lr||(lr=function(t){return t});mp||(mp=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s<i;s++)n[s-2]=arguments[s];return t.apply(r,n)});bp||(bp=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const Xi=Ne(Array.prototype.forEach),m6=Ne(Array.prototype.lastIndexOf),wy=Ne(Array.prototype.pop),co=Ne(Array.prototype.push),b6=Ne(Array.prototype.slice),y6=Ne(Array.prototype.splice),da=Array.isArray,Id=xT(Set),Bd=Ne(Set.prototype.add),uo=Ne(Set.prototype.has),ts=Ne(String.prototype.toLowerCase),Rd=Ne(String.prototype.toString),Sy=Ne(String.prototype.match),ho=Ne(String.prototype.replace),Ay=Ne(String.prototype.indexOf),x6=Ne(String.prototype.trim),C6=Ne(Number.prototype.toString),_6=Ne(Boolean.prototype.toString),vy=typeof BigInt>"u"?null:Ne(BigInt.prototype.toString),Ly=typeof Symbol>"u"?null:Ne(Symbol.prototype.toString),Dr=Ne(Object.prototype.hasOwnProperty),fo=Ne(Object.prototype.toString),ar=Ne(RegExp.prototype.test),Ki=xT(TypeError);function Ne(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return mp(e,t,i)}}function xT(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return bp(e,r)}}function Ce(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ts;if(Ey&&Ey(e,null),!da(t))return e;let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const s=r(n);s!==n&&(g6(t)||(t[i]=s),n=s)}e[n]=!0}return e}function k6(e){for(let t=0;t<e.length;t++)Dr(e,t)||(e[t]=null);return e}function Ur(e){const t=ra(null);for(const i of gT(e)){var r=f6(i,2);const n=r[0],s=r[1];Dr(e,n)&&(da(s)?t[n]=k6(s):s&&typeof s=="object"&&s.constructor===Object?t[n]=Ur(s):t[n]=s)}return t}function T6(e){switch(typeof e){case"string":return e;case"number":return C6(e);case"boolean":return _6(e);case"bigint":return vy?vy(e):"0";case"symbol":return Ly?Ly(e):"Symbol()";case"undefined":return fo(e);case"function":case"object":{if(e===null)return fo(e);const t=e,r=Gr(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:fo(i)}return fo(e)}default:return fo(e)}}function Gr(e,t){for(;e!==null;){const i=bT(e,t);if(i){if(i.get)return Ne(i.get);if(typeof i.value=="function")return Ne(i.value)}e=mT(e)}function r(){return null}return r}function E6(e,t){for(;e!==null;){const r=bT(e,t);if(r)return r.get?Ne(r.get):null;e=mT(e)}return null}function w6(e){try{return ar(e,""),!0}catch{return!1}}const Iy=ir(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Od=ir(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Nd=ir(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),S6=ir(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Dd=ir(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),A6=ir(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),By=ir(["#text"]),Ry=ir(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Pd=ir(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Oy=ir(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),cc=ir(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),v6=lr(/{{[\w\W]*|^[\w\W]*}}/g),L6=lr(/<%[\w\W]*|^[\w\W]*%>/g),I6=lr(/\${[\w\W]*/g),B6=lr(/^data-[\-\w.\u00B7-\uFFFF]+$/),R6=lr(/^aria-[\-\w]+$/),Ny=lr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),O6=lr(/^(?:\w+script|data):/i),N6=lr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),D6=lr(/^html$/i),P6=lr(/^[a-z][.\w]*(-[.\w]+)+$/i),Md=lr(/<[/\w!]/g),Dy=lr(/<[/\w]/g),M6=lr(/<\/no(script|embed|frames)/i),Py=lr(/\/>/i),ze={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},F6=ir(Ce({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),$6=function(){return typeof window>"u"?null:window},H6=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},My=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Cn=function(t,r,i,n){return Dr(t,r)&&da(t[r])?Ce(n.base?Ur(n.base):{},t[r],n.transform):i},Fd=function(t,r,i){const n=Dr(t,r)?t[r]:void 0;return n&&typeof n=="object"?Ur(n):i()};function CT(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$6();const t=xt=>CT(xt);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==ze.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,n=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,a=e.Node,o=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,h=o.prototype,f=Gr(h,"cloneNode"),d=Gr(h,"remove"),p=Gr(h,"removeAttributeNode"),g=Gr(h,"nextSibling"),b=Gr(h,"childNodes"),m=Gr(h,"parentNode"),_=Gr(h,"shadowRoot"),k=Gr(h,"attributes"),T=a&&a.prototype?Gr(a.prototype,"nodeType"):null,E=a&&a.prototype?Gr(a.prototype,"nodeName"):null,S=a&&a.prototype?Gr(a.prototype,"ownerDocument"):null,B=function(R){return T?T(R):R.nodeType},L=function(R){return E?E(R):R.nodeName},W=E6(h,"namespaceURI"),O=function(R){return W?W(R):R.namespaceURI};if(typeof s=="function"){const xt=r.createElement("template");xt.content&&xt.content.ownerDocument&&(r=xt.content.ownerDocument)}let $,X="",G,H=!1,M=0;const N=function(){if(M>0)throw Ki('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},q=function(R){N(),M++;try{return $.createHTML(R)}finally{M--}},V=function(R){N(),M++;try{return $.createScriptURL(R)}finally{M--}},tt=function(){return H||(G=H6(u,n),H=!0),G},A=r,Et=A.implementation,kt=A.createNodeIterator,P=A.createDocumentFragment,Rt=A.getElementsByTagName,Tt=i.importNode;let pt=My();t.isSupported=typeof gT=="function"&&typeof m=="function"&&Et&&Et.createHTMLDocument!==void 0;const Ht=v6,Yt=L6,It=I6,wt=B6,Lt=R6,Xt=O6,Qt=N6,le=P6;let it=Ny,Bt=null;const De=Ce({},[...Iy,...Od,...Nd,...Dd,...By]);let ce=null;const Lr=Ce({},[...Ry,...Pd,...Oy,...cc]);let zt=Object.seal(ra(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ie=null,Ie=null;const xe=Object.seal(ra(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let nr=!0,ur=!0,ct=!1,vt=!0,y=!1,j=!0,rt=!1,ut=!1,st=null,bt=null,v=!1,J=!1,ft=!1,ht=!1,dt=!0,Ct=!1;const yt="user-content-";let Mt=!0,Nt=!1,Wt=null,jt={},ae=null;const Ee=Ce({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let no=null;const mn=Ce({},["audio","video","img","source","image","track"]);let bn=null;const fb=Ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ql="http://www.w3.org/1998/Math/MathML",Zl="http://www.w3.org/2000/svg",_i="http://www.w3.org/1999/xhtml";let zs=_i,Qh=!1,Zh=null;const TI=Ce({},[Ql,Zl,_i],Rd),pb=ir(["mi","mo","mn","ms","mtext"]);let Jh=Ce({},pb);const gb=ir(["annotation-xml"]);let td=Ce({},gb);const EI=Ce({},["title","style","font","a","script"]);let so=null;const wI=["application/xhtml+xml","text/html"],SI="text/html";let Me=null,Us=null;const AI=r.createElement("form"),mb=function(R){return R instanceof RegExp||R instanceof Function},ed=function(){let R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Us&&Us===R)return;(!R||typeof R!="object")&&(R={}),R=Ur(R),so=wI.indexOf(R.PARSER_MEDIA_TYPE)===-1?SI:R.PARSER_MEDIA_TYPE,Me=so==="application/xhtml+xml"?Rd:ts,Bt=Cn(R,"ALLOWED_TAGS",De,{transform:Me}),ce=Cn(R,"ALLOWED_ATTR",Lr,{transform:Me}),Zh=Cn(R,"ALLOWED_NAMESPACES",TI,{transform:Rd}),bn=Cn(R,"ADD_URI_SAFE_ATTR",fb,{transform:Me,base:fb}),no=Cn(R,"ADD_DATA_URI_TAGS",mn,{transform:Me,base:mn}),ae=Cn(R,"FORBID_CONTENTS",Ee,{transform:Me}),ie=Cn(R,"FORBID_TAGS",Ur({}),{transform:Me}),Ie=Cn(R,"FORBID_ATTR",Ur({}),{transform:Me}),jt=Dr(R,"USE_PROFILES")?R.USE_PROFILES&&typeof R.USE_PROFILES=="object"?Ur(R.USE_PROFILES):R.USE_PROFILES:!1,nr=R.ALLOW_ARIA_ATTR!==!1,ur=R.ALLOW_DATA_ATTR!==!1,ct=R.ALLOW_UNKNOWN_PROTOCOLS||!1,vt=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,y=R.SAFE_FOR_TEMPLATES||!1,j=R.SAFE_FOR_XML!==!1,rt=R.WHOLE_DOCUMENT||!1,J=R.RETURN_DOM||!1,ft=R.RETURN_DOM_FRAGMENT||!1,ht=R.RETURN_TRUSTED_TYPE||!1,v=R.FORCE_BODY||!1,dt=R.SANITIZE_DOM!==!1,Ct=R.SANITIZE_NAMED_PROPS||!1,Mt=R.KEEP_CONTENT!==!1,Nt=R.IN_PLACE||!1,it=w6(R.ALLOWED_URI_REGEXP)?R.ALLOWED_URI_REGEXP:Ny,zs=typeof R.NAMESPACE=="string"?R.NAMESPACE:_i,Jh=Fd(R,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ce({},pb)),td=Fd(R,"HTML_INTEGRATION_POINTS",()=>Ce({},gb));const Y=Fd(R,"CUSTOM_ELEMENT_HANDLING",()=>ra(null));if(zt=ra(null),Dr(Y,"tagNameCheck")&&mb(Y.tagNameCheck)&&(zt.tagNameCheck=Y.tagNameCheck),Dr(Y,"attributeNameCheck")&&mb(Y.attributeNameCheck)&&(zt.attributeNameCheck=Y.attributeNameCheck),Dr(Y,"allowCustomizedBuiltInElements")&&typeof Y.allowCustomizedBuiltInElements=="boolean"&&(zt.allowCustomizedBuiltInElements=Y.allowCustomizedBuiltInElements),lr(zt),y&&(ur=!1),ft&&(J=!0),jt&&(Bt=Ce({},By),ce=ra(null),jt.html===!0&&(Ce(Bt,Iy),Ce(ce,Ry)),jt.svg===!0&&(Ce(Bt,Od),Ce(ce,Pd),Ce(ce,cc)),jt.svgFilters===!0&&(Ce(Bt,Nd),Ce(ce,Pd),Ce(ce,cc)),jt.mathMl===!0&&(Ce(Bt,Dd),Ce(ce,Oy),Ce(ce,cc))),xe.tagCheck=null,xe.attributeCheck=null,Dr(R,"ADD_TAGS")&&(typeof R.ADD_TAGS=="function"?xe.tagCheck=R.ADD_TAGS:da(R.ADD_TAGS)&&(Bt===De&&(Bt=Ur(Bt)),Ce(Bt,R.ADD_TAGS,Me))),Dr(R,"ADD_ATTR")&&(typeof R.ADD_ATTR=="function"?xe.attributeCheck=R.ADD_ATTR:da(R.ADD_ATTR)&&(ce===Lr&&(ce=Ur(ce)),Ce(ce,R.ADD_ATTR,Me))),Dr(R,"ADD_FORBID_CONTENTS")&&da(R.ADD_FORBID_CONTENTS)&&(ae===Ee&&(ae=Ur(ae)),Ce(ae,R.ADD_FORBID_CONTENTS,Me)),Mt&&(Bt["#text"]=!0),rt&&Ce(Bt,["html","head","body"]),Bt.table&&(Ce(Bt,["tbody"]),delete ie.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ki('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ki('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const gt=$;$=R.TRUSTED_TYPES_POLICY;try{X=q("")}catch(mt){throw $=gt,mt}}else R.TRUSTED_TYPES_POLICY===null?($=void 0,X=""):($===void 0&&($=tt()),$&&typeof X=="string"&&(X=q("")));ir&&ir(R),Us=R},bb=Ce({},[...Od,...Nd,...S6]),yb=Ce({},[...Dd,...A6]),vI=function(R,Y,gt){return Y.namespaceURI===_i?R==="svg":Y.namespaceURI===Ql?R==="svg"&&(gt==="annotation-xml"||Jh[gt]):!!bb[R]},LI=function(R,Y,gt){return Y.namespaceURI===_i?R==="math":Y.namespaceURI===Zl?R==="math"&&td[gt]:!!yb[R]},II=function(R,Y,gt){return Y.namespaceURI===Zl&&!td[gt]||Y.namespaceURI===Ql&&!Jh[gt]?!1:!yb[R]&&(EI[R]||!bb[R])},BI=function(R){const Y=O(R),gt=ts(L(R)),mt=m(R);let Kt,ee;return mt&&B(mt)===ze.element?(Kt={namespaceURI:O(mt)},ee=ts(L(mt))):(Kt={namespaceURI:zs},ee="template"),Zh[Y]?Y===Zl?vI(gt,Kt,ee):Y===Ql?LI(gt,Kt,ee):Y===_i?II(gt,Kt,ee):!!(so==="application/xhtml+xml"&&Zh[Y]):!1},yn=function(R){co(t.removed,{element:R});try{m(R).removeChild(R)}catch{if(d(R),!m(R))throw Ki("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},xb=function(R,Y,gt){try{p(R,Y)}catch{try{R.removeAttribute(gt)}catch{}}},rd=function(R){nd(R);const Y=b(R);Y&&Xi(b6(Y),mt=>{try{d(mt)}catch{}});const gt=B(R)===ze.element?k(R):null;if(gt)for(let mt=gt.length-1;mt>=0;--mt){const Kt=gt[mt],ee=Kt&&Kt.name;typeof ee=="string"&&xb(R,Kt,ee)}},qs=function(R,Y,gt){if(!gt)try{gt=Y.getAttributeNode(R)}catch{gt=null}co(t.removed,{attribute:gt||null,from:Y});try{gt?p(Y,gt):Y.removeAttribute(R)}catch{try{Y.removeAttribute(R)}catch{}}if(R==="is")if(J||ft)try{yn(Y)}catch{}else try{Y.setAttribute(R,"")}catch{}},Cb=function(R){const Y=k(R);if(Y)for(let gt=Y.length-1;gt>=0;--gt){const mt=Y[gt],Kt=mt&&mt.name;typeof Kt!="string"||ce[Me(Kt)]||xb(R,mt,Kt)}},id=function(R,Y){let gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const mt=[R];for(;mt.length>0;){const Kt=mt.pop();if(Y(Kt)===!1)continue;if(gt&&B(Kt)===ze.element){const de=_(Kt);xn(de)&&mt.push(de)}const ee=b(Kt);if(ee)for(let de=ee.length-1;de>=0;--de)mt.push(ee[de])}},nd=function(R){id(R,Y=>{B(Y)===ze.element&&Cb(Y)})},sd=function(R){const Y=[];return id(R,gt=>{Y.push(gt)},!0),Y},RI=function(R,Y){const gt=Id();Xi(sd(R),mt=>{B(mt)===ze.element&&Bd(gt,mt)}),Xi(Y,mt=>{B(mt)===ze.element&&!uo(gt,mt)&&Cb(mt)})},_b=function(R,Y){let gt=!1;return Xi(t.removed,mt=>{mt.element&&(gt=gt||mt.element===R,nd(mt.element))}),RI(R,Y),gt},OI=8,NI=function(R,Y){const gt=Wt;let mt=null;const Kt=()=>(mt||(mt=Id(),Xi(Y,ee=>{Bd(mt,ee)})),mt);for(let ee=0;;ee++){const de=sd(R),Ve=[R];let ki=!1;if(Xi(de,kr=>{B(kr)===ze.documentFragment?co(Ve,kr):!ki&&!uo(gt,kr)&&(ki=uo(Kt(),kr))}),!ki)return;if(ee>=OI)throw Ki("the tree kept changing during in-place sanitization; refusing to return it");Xi(Ve,(kr,Ir)=>{DI(kr,Ir>0,R,Kt())})}},DI=function(R,Y,gt,mt){const Kt=ad(R);let ee;for(;ee=Kt.nextNode();)!uo(mt,ee)||uo(Wt,ee)||(Y&&ii(pt.uponSanitizeShadowNode,ee,null),ld(ee,gt),cd(ee,gt),xn(ee.content)&&oo(ee.content))},PI=function(R){Wt&&Bd(Wt,R)},kb=function(R,Y){return j?R==="patchsrc"?!0:R==="for"&&Y!=="label"&&Y!=="output":!1},MI=function(R){j&&id(R,Y=>{const gt=B(Y);if(gt===ze.processingInstruction||gt===ze.comment&&ar(Dy,Y.data)){try{d(Y)}catch{}return!1}if(gt===ze.element){const mt=Y,Kt=Me(L(Y));try{mt.hasAttribute&&mt.hasAttribute("patchsrc")&&mt.removeAttribute("patchsrc"),mt.hasAttribute&&mt.hasAttribute("for")&&kb("for",Kt)&&mt.removeAttribute("for")}catch{}}return!0})},Tb=function(R){let Y=null,gt=null;if(v)R="<remove></remove>"+R;else{const ee=Sy(R,/^[\r\n\t ]+/);gt=ee&&ee[0]}so==="application/xhtml+xml"&&zs===_i&&(R='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+R+"</body></html>");const mt=$?q(R):R;if(zs===_i)try{Y=new c().parseFromString(mt,so)}catch{}if(!Y||!Y.documentElement){Y=Et.createDocument(zs,"template",null);try{Y.documentElement.innerHTML=Qh?X:mt}catch{}}const Kt=Y.body||Y.documentElement;return R&&gt&&Kt.insertBefore(r.createTextNode(gt),Kt.childNodes[0]||null),zs===_i?Rt.call(Y,rt?"html":"body")[0]:rt?Y.documentElement:Kt},ad=function(R){const Y=S?S(R):R.ownerDocument;return kt.call(Y||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Jl=function(R){return R=ho(R,Ht," "),R=ho(R,Yt," "),R=ho(R,It," "),R},od=function(R){var Y;Eb(R);const gt=(Y=R.querySelectorAll)===null||Y===void 0?void 0:Y.call(R,"template");gt&&Xi(gt,mt=>{xn(mt.content)&&od(mt.content)})},Eb=function(R){R.normalize();const Y=S?S(R):R.ownerDocument,gt=kt.call(Y||R,R,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let mt=gt.nextNode();for(;mt;)mt.data=Jl(mt.data),mt=gt.nextNode()},tc=function(R){const Y=E?E(R):null;return typeof Y!="string"||Me(Y)!=="form"?!1:typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||R.attributes!==k(R)||typeof R.removeAttribute!="function"||typeof R.removeAttributeNode!="function"||typeof R.getAttributeNode!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function"||R.nodeType!==T(R)||R.childNodes!==b(R)},xn=function(R){if(!T||typeof R!="object"||R===null)return!1;try{return T(R)===ze.documentFragment}catch{return!1}},ao=function(R){if(!T||typeof R!="object"||R===null)return!1;try{return typeof T(R)=="number"}catch{return!1}};function ii(xt,R,Y){xt.length!==0&&Xi(xt,gt=>{gt.call(t,R,Y,Us)})}const FI=function(R,Y){return!!(j&&R.hasChildNodes()&&!ao(R.firstElementChild)&&ar(Md,R.textContent)&&ar(Md,R.innerHTML)||j&&F6[Y]&&B(R)===ze.element&&O(R)===_i&&(ao(R.firstElementChild)||typeof R.textContent=="string"&&ar(Md,R.textContent))||R.nodeType===ze.processingInstruction||j&&R.nodeType===ze.comment&&ar(Dy,R.data))},ec=function(R,Y){if(R instanceof RegExp)return ar(R,Y);if(R instanceof Function){for(var gt=arguments.length,mt=new Array(gt>2?gt-2:0),Kt=2;Kt<gt;Kt++)mt[Kt-2]=arguments[Kt];return!!R(Y,...mt)}return!1},$I=function(R,Y,gt){if(!ie[Y]&&Ab(Y)&&ec(zt.tagNameCheck,Y))return!1;if(Mt&&!ae[Y]&&!ae[ts(Y)]){const mt=m(R),Kt=b(R);if(Kt&&mt){const ee=Kt.length;for(let de=ee-1;de>=0;--de){const Ve=R===gt?f(Kt[de],!0):Kt[de];mt.insertBefore(Ve,g(R))}}}return yn(R),!0},wb=function(R,Y,gt,mt){return R.length===0?Y:Y===gt||Y===mt?Ur(Y):Y},Ws=function(R,Y){return R===Y||m(R)!==null?!1:(Nt&&nd(R),!0)},ld=function(R,Y){if(PI(R),ii(pt.beforeSanitizeElements,R,null),Ws(R,Y))return!0;if(tc(R))return yn(R),!0;const gt=Me(L(R));if(Bt=wb(pt.uponSanitizeElement,Bt,De,st),ii(pt.uponSanitizeElement,R,{tagName:gt,allowedTags:Bt}),Ws(R,Y))return!0;if(FI(R,gt))return yn(R),!0;if(ie[gt]||!(xe.tagCheck instanceof Function&&xe.tagCheck(gt))&&!Bt[gt]){const mt=$I(R,gt,Y);return mt===!1&&(ii(pt.afterSanitizeElements,R,null),Ws(R,Y))?!0:mt}if(B(R)===ze.element&&!BI(R)||(gt==="noscript"||gt==="noembed"||gt==="noframes")&&ar(M6,R.innerHTML))return yn(R),!0;if(y&&R.nodeType===ze.text){const mt=Jl(R.textContent);R.textContent!==mt&&(co(t.removed,{element:R.cloneNode()}),R.textContent=mt)}return ii(pt.afterSanitizeElements,R,null),Ws(R,Y)},Sb=function(R,Y,gt){if(Ie[Y]||kb(Y,R)||dt&&(Y==="id"||Y==="name")&&(gt in r||gt in AI))return!1;const mt=ce[Y]||xe.attributeCheck instanceof Function&&xe.attributeCheck(Y,R);return ur&&ar(wt,Y)||nr&&ar(Lt,Y)?!0:mt?bn[Y]||ar(it,ho(gt,Qt,""))||(Y==="src"||Y==="xlink:href"||Y==="href")&&R!=="script"&&Ay(gt,"data:")===0&&no[R]||ct&&!ar(Xt,ho(gt,Qt,""))?!0:!gt:Ab(R)&&ec(zt.tagNameCheck,R)&&ec(zt.attributeNameCheck,Y,R)||Y==="is"&&zt.allowCustomizedBuiltInElements&&ec(zt.tagNameCheck,gt)},HI=Ce({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ab=function(R){return!HI[ts(R)]&&ar(le,R)},zI=function(R,Y,gt,mt){if($&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!gt)switch(u.getAttributeType(R,Y)){case"TrustedHTML":return q(mt);case"TrustedScriptURL":return V(mt)}return mt},UI=function(R,Y,gt,mt){try{return gt?R.setAttributeNS(gt,Y,mt):R.setAttribute(Y,mt),tc(R)?(yn(R),!1):!0}catch{return qs(Y,R),!1}},vb=function(R,Y){return j&&ar(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Y)?!0:ts(R)==="attributename"&&Sy(Y,"href")!==null},cd=function(R,Y){if(ii(pt.beforeSanitizeAttributes,R,null),Ws(R,Y))return;const gt=R.attributes;if(!gt||tc(R))return;ce=wb(pt.uponSanitizeAttribute,ce,Lr,bt);const mt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce,forceKeepAttr:void 0};let Kt=gt.length;const ee=Me(R.nodeName);for(;Kt--;){const de=gt[Kt],Ve=de.name,ki=de.namespaceURI,kr=de.value,Ir=Me(Ve),js=kr;let Br=Ve==="value"?js:x6(js),Lb=!1;if(mt.attrName=Ir,mt.attrValue=Br,mt.keepAttr=!0,mt.forceKeepAttr=void 0,ii(pt.uponSanitizeAttribute,R,mt),Br=mt.attrValue,Ct&&(Ir==="id"||Ir==="name")&&Ay(Br,yt)!==0&&(qs(Ve,R,de),Br=yt+Br,Lb=!0),vb(Ve,Br)){qs(Ve,R,de);continue}if(!mt.forceKeepAttr){if(!mt.keepAttr){qs(Ve,R,de);continue}if(!vt&&ar(Py,Br)){qs(Ve,R,de);continue}if(y&&(Br=Jl(Br)),!Sb(ee,Ir,Br)){qs(Ve,R,de);continue}Br=zI(ee,Ir,ki,Br),Br!==js&&UI(R,Ve,ki,Br)&&Lb&&wy(t.removed)}}ii(pt.afterSanitizeAttributes,R,null),Ws(R,Y)},oo=function(R){let Y=null;const gt=ad(R);for(ii(pt.beforeSanitizeShadowDOM,R,null);Y=gt.nextNode();)if(ii(pt.uponSanitizeShadowNode,Y,null),ld(Y,R),cd(Y,R),xn(Y.content)&&oo(Y.content),B(Y)===ze.element){const mt=_(Y);xn(mt)&&(ud(mt),oo(mt))}y&&Eb(R),ii(pt.afterSanitizeShadowDOM,R,null)},ud=function(R){const Y=[{node:R,shadow:null}];for(;Y.length>0;){const gt=Y.pop();if(gt.shadow){oo(gt.shadow);continue}const mt=gt.node,Kt=B(mt)===ze.element,ee=b(mt);if(ee)for(let de=ee.length-1;de>=0;--de)Y.push({node:ee[de],shadow:null});if(Kt){const de=E?E(mt):null;if(typeof de=="string"&&Me(de)==="template"){const Ve=mt.content;xn(Ve)&&Y.push({node:Ve,shadow:null})}}if(Kt){const de=_(mt);xn(de)&&Y.push({node:null,shadow:de},{node:de,shadow:null})}}};return t.sanitize=function(xt){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,gt=null,mt=null,Kt=null;if(Qh=!xt,Qh&&(xt="<!-->"),typeof xt!="string"&&!ao(xt)&&(xt=T6(xt),typeof xt!="string"))throw Ki("dirty is not a string, aborting");if(!t.isSupported)return xt;ut?(Bt=st,ce=bt):ed(R),(pt.uponSanitizeElement.length>0||pt.uponSanitizeAttribute.length>0)&&(Bt=Ur(Bt)),pt.uponSanitizeAttribute.length>0&&(ce=Ur(ce)),t.removed=[];const ee=Nt&&typeof xt!="string"&&ao(xt);let de=[];const Ve=Wt;if(ee){MI(xt);const Ir=L(xt);if(typeof Ir=="string"){const js=Me(Ir);if(!Bt[js]||ie[js])throw rd(xt),Ki("root node is forbidden and cannot be sanitized in-place")}if(tc(xt))throw rd(xt),Ki("root node is clobbered and cannot be sanitized in-place");de=sd(xt),Wt=Id()}else if(ao(xt))Y=Tb("<!---->"),gt=Y.ownerDocument.importNode(xt,!0),gt.nodeType===ze.element&&gt.nodeName==="BODY"||gt.nodeName==="HTML"?Y=gt:Y.appendChild(gt),ud(Y);else{if(!J&&!y&&!rt&&xt.indexOf("<")===-1)return $&&ht?q(xt):xt;if(Y=Tb(xt),!Y)return J?null:ht?X:""}Y&&v&&yn(Y.firstChild);const ki=ee?xt:Y;try{ee&&ud(xt);const Ir=ad(ki);for(;mt=Ir.nextNode();)ld(mt,ki),cd(mt,ki),xn(mt.content)&&oo(mt.content);ee&&NI(xt,de)}catch(Ir){throw ee&&(rd(xt),_b(xt,de)),Ir}finally{Wt=Ve}if(ee){if(_b(xt,de))throw Ki("a node selected for removal could not be safely returned; refusing to sanitize in place");return y&&od(xt),xt}if(J){if(y&&od(Y),ft)for(Kt=P.call(Y.ownerDocument);Y.firstChild;)Kt.appendChild(Y.firstChild);else Kt=Y;return(ce.shadowroot||ce.shadowrootmode)&&(Kt=Tt.call(i,Kt,!0)),Kt}let kr=rt?Y.outerHTML:Y.innerHTML;return rt&&Bt["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&ar(D6,Y.ownerDocument.doctype.name)&&(kr="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
160
- `+kr),y&&(kr=Jl(kr)),$&&ht?q(kr):kr},t.setConfig=function(){let xt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ed(xt),ut=!0,st=Bt,bt=ce},t.clearConfig=function(){Us=null,ut=!1,st=null,bt=null,$=G,X=""},t.isValidAttribute=function(xt,R,Y){Us||ed({});const gt=Me(xt),mt=Me(R);return typeof Y=="string"&&(vb(R,Y)||!vt&&ar(Py,Y))?!1:Sb(gt,mt,Y)},t.addHook=function(xt,R){typeof R=="function"&&Dr(pt,xt)&&co(pt[xt],R)},t.removeHook=function(xt,R){if(Dr(pt,xt)){if(R!==void 0){const Y=m6(pt[xt],R);return Y===-1?void 0:y6(pt[xt],Y,1)[0]}return wy(pt[xt])}},t.removeHooks=function(xt){Dr(pt,xt)&&(pt[xt]=[])},t.removeAllHooks=function(){pt=My()},t}var Oa=CT(),yp=C((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(n=>yp(e,n,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(n=>{e.includes(n)||e.push(n)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const n=e;Object.entries(t).forEach(([s,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,s)||Object.defineProperty(e,s,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),n[s]===void 0&&(n[s]=Array.isArray(a)?[]:{}),typeof n[s]=="object"&&(n[s]=yp(n[s],a,{depth:r-1}))}else typeof n[s]!="object"&&(Object.hasOwn(e,s)?n[s]=a:Object.defineProperty(e,s,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),er=yp,Fi="#ffffff",$i="#f2f2f2",te=C((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),ba,z6=(ba=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,n,s,a,o,l,c,u,h,f,d,p,g,b,m,_,k,T,E,S,B,L,W,O,$,X,G,H,M,N,q,V,tt,A,Et,kt,P,Rt,Tt,pt,Ht,Yt,It,wt,Lt,Xt,Qt,le,it;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||at(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||ot(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ot(this.mainBkg,10)):(this.rowOdd=this.rowOdd||at(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let Bt=0;Bt<this.THEME_COLOR_LIMIT;Bt++)this["cScale"+Bt]=ot(this["cScale"+Bt],75);else for(let Bt=0;Bt<this.THEME_COLOR_LIMIT;Bt++)this["cScale"+Bt]=ot(this["cScale"+Bt],25);for(let Bt=0;Bt<this.THEME_COLOR_LIMIT;Bt++)this["cScaleInv"+Bt]=this["cScaleInv"+Bt]||K(this["cScale"+Bt]);for(let Bt=0;Bt<this.THEME_COLOR_LIMIT;Bt++)this.darkMode?this["cScalePeer"+Bt]=this["cScalePeer"+Bt]||at(this["cScale"+Bt],10):this["cScalePeer"+Bt]=this["cScalePeer"+Bt]||ot(this["cScale"+Bt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Bt=0;Bt<this.THEME_COLOR_LIMIT;Bt++)this["cScaleLabel"+Bt]=this["cScaleLabel"+Bt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Bt=0;Bt<5;Bt++)this["surface"+Bt]=this["surface"+Bt]||w(this.mainBkg,{h:180,s:-15,l:t*(5+Bt*3)}),this["surfacePeer"+Bt]=this["surfacePeer"+Bt]||w(this.mainBkg,{h:180,s:-15,l:t*(8+Bt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((n=this.cynefin)==null?void 0:n.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((u=this.cynefin)==null?void 0:u.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((f=this.cynefin)==null?void 0:f.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((p=this.cynefin)==null?void 0:p.confusionBg)||"#F3E5F5",textColor:((g=this.cynefin)==null?void 0:g.textColor)||this.textColor,labelColor:((b=this.cynefin)==null?void 0:b.labelColor)||this.primaryTextColor},this.radar={axisColor:((m=this.radar)==null?void 0:m.axisColor)||this.lineColor,axisStrokeWidth:((_=this.radar)==null?void 0:_.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((T=this.radar)==null?void 0:T.curveOpacity)||.5,curveStrokeWidth:((E=this.radar)==null?void 0:E.curveStrokeWidth)||2,graticuleColor:((S=this.radar)==null?void 0:S.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((B=this.radar)==null?void 0:B.graticuleStrokeWidth)||1,graticuleOpacity:((L=this.radar)==null?void 0:L.graticuleOpacity)||.3,legendBoxSize:((W=this.radar)==null?void 0:W.legendBoxSize)||12,legendFontSize:((O=this.radar)==null?void 0:O.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:(($=this.wardley)==null?void 0:$.backgroundColor)||this.background,axisColor:((X=this.wardley)==null?void 0:X.axisColor)||this.lineColor,axisTextColor:((G=this.wardley)==null?void 0:G.axisTextColor)||this.primaryTextColor,gridColor:((H=this.wardley)==null?void 0:H.gridColor)||this.gridColor,componentFill:((M=this.wardley)==null?void 0:M.componentFill)||this.background,componentStroke:((N=this.wardley)==null?void 0:N.componentStroke)||this.lineColor,componentLabelColor:((q=this.wardley)==null?void 0:q.componentLabelColor)||this.primaryTextColor,linkStroke:((V=this.wardley)==null?void 0:V.linkStroke)||this.lineColor,evolutionStroke:((tt=this.wardley)==null?void 0:tt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((A=this.wardley)==null?void 0:A.annotationStroke)||this.lineColor,annotationTextColor:((Et=this.wardley)==null?void 0:Et.annotationTextColor)||this.primaryTextColor,annotationFill:((kt=this.wardley)==null?void 0:kt.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((P=this.xyChart)==null?void 0:P.backgroundColor)||this.background,titleColor:((Rt=this.xyChart)==null?void 0:Rt.titleColor)||this.primaryTextColor,dataLabelColor:((Tt=this.xyChart)==null?void 0:Tt.dataLabelColor)||this.primaryTextColor,legendTextColor:((pt=this.xyChart)==null?void 0:pt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Ht=this.xyChart)==null?void 0:Ht.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Yt=this.xyChart)==null?void 0:Yt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((It=this.xyChart)==null?void 0:It.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((wt=this.xyChart)==null?void 0:wt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Xt=this.xyChart)==null?void 0:Xt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Qt=this.xyChart)==null?void 0:Qt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((le=this.xyChart)==null?void 0:le.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((it=this.xyChart)==null?void 0:it.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(ba,"Theme"),ba),U6=C(e=>{const t=new z6;return t.calculate(e),t},"getThemeVariables"),ya,q6=(ya=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=at(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=at(K("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Mn(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=ot("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=ot(this.sectionBkgColor,10),this.taskBorderColor=Mn(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Mn(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||at(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||ot(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,n,s,a,o,l,c,u,h,f,d,p,g,b,m,_,k,T,E,S,B,L,W,O,$,X,G,H,M,N,q,V,tt,A,Et,kt,P,Rt,Tt,pt,Ht,Yt,It,wt,Lt,Xt,Qt,le;this.secondBkg=at(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=at(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=at(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=K(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleInv"+it]=this["cScaleInv"+it]||K(this["cScale"+it]);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScalePeer"+it]=this["cScalePeer"+it]||at(this["cScale"+it],10);for(let it=0;it<5;it++)this["surface"+it]=this["surface"+it]||w(this.mainBkg,{h:30,s:-30,l:-(-10+it*4)}),this["surfacePeer"+it]=this["surfacePeer"+it]||w(this.mainBkg,{h:30,s:-30,l:-(-7+it*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleLabel"+it]=this["cScaleLabel"+it]||this.scaleLabelColor;for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["pie"+it]=this["cScale"+it];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let it=0;it<8;it++)this["venn"+(it+1)]=this["venn"+(it+1)]??at(this["cScale"+it],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((n=this.cynefin)==null?void 0:n.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#FF6B6B",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#0D47A1",chaoticBg:((h=this.cynefin)==null?void 0:h.chaoticBg)||"#BF360C",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((b=this.xyChart)==null?void 0:b.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,dataLabelColor:((_=this.xyChart)==null?void 0:_.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((E=this.xyChart)==null?void 0:E.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((B=this.xyChart)==null?void 0:B.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((L=this.xyChart)==null?void 0:L.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((W=this.xyChart)==null?void 0:W.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(($=this.xyChart)==null?void 0:$.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((X=this.xyChart)==null?void 0:X.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((G=this.radar)==null?void 0:G.axisColor)||this.lineColor,axisStrokeWidth:((H=this.radar)==null?void 0:H.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((N=this.radar)==null?void 0:N.curveOpacity)||.5,curveStrokeWidth:((q=this.radar)==null?void 0:q.curveStrokeWidth)||2,graticuleColor:((V=this.radar)==null?void 0:V.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((tt=this.radar)==null?void 0:tt.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((Et=this.radar)==null?void 0:Et.legendBoxSize)||12,legendFontSize:((kt=this.radar)==null?void 0:kt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((P=this.wardley)==null?void 0:P.backgroundColor)||this.background,axisColor:((Rt=this.wardley)==null?void 0:Rt.axisColor)||this.lineColor,axisTextColor:((Tt=this.wardley)==null?void 0:Tt.axisTextColor)||this.primaryTextColor,gridColor:((pt=this.wardley)==null?void 0:pt.gridColor)||this.gridColor,componentFill:((Ht=this.wardley)==null?void 0:Ht.componentFill)||this.mainBkg,componentStroke:((Yt=this.wardley)==null?void 0:Yt.componentStroke)||this.lineColor,componentLabelColor:((It=this.wardley)==null?void 0:It.componentLabelColor)||this.primaryTextColor,linkStroke:((wt=this.wardley)==null?void 0:wt.linkStroke)||this.lineColor,evolutionStroke:((Lt=this.wardley)==null?void 0:Lt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Xt=this.wardley)==null?void 0:Xt.annotationStroke)||this.lineColor,annotationTextColor:((Qt=this.wardley)==null?void 0:Qt.annotationTextColor)||this.primaryTextColor,annotationFill:((le=this.wardley)==null?void 0:le.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=at(this.secondaryColor,20),this.git1=at(this.pie2||this.secondaryColor,20),this.git2=at(this.pie3||this.tertiaryColor,20),this.git3=at(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=at(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=at(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=at(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=at(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||at("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||at("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||at("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||at("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||at(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||at(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||at(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||at(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(ya,"Theme"),ya),W6=C(e=>{const t=new q6;return t.calculate(e),t},"getThemeVariables"),xa,j6=(xa=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Mn(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,n,s,a,o,l,c,u,h,f,d,p,g,b,m,_,k,T,E,S,B,L,W,O,$,X,G,H,M,N,q,V,tt,A,Et,kt,P,Rt,Tt,pt,Ht,Yt,It,wt,Lt,Xt,Qt,le;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ot(this.tertiaryColor,40);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScale"+it]=ot(this["cScale"+it],10),this["cScalePeer"+it]=this["cScalePeer"+it]||ot(this["cScale"+it],25);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleInv"+it]=this["cScaleInv"+it]||w(this["cScale"+it],{h:180});for(let it=0;it<5;it++)this["surface"+it]=this["surface"+it]||w(this.mainBkg,{h:30,l:-(5+it*5)}),this["surfacePeer"+it]=this["surfacePeer"+it]||w(this.mainBkg,{h:30,l:-(7+it*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||K(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||K(this.labelTextColor);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleLabel"+it]=this["cScaleLabel"+it]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||at(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||at(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((n=this.cynefin)==null?void 0:n.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((h=this.cynefin)==null?void 0:h.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((b=this.radar)==null?void 0:b.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((_=this.radar)==null?void 0:_.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((E=this.radar)==null?void 0:E.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((S=this.radar)==null?void 0:S.graticuleStrokeWidth)||1,graticuleOpacity:((B=this.radar)==null?void 0:B.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((O=this.wardley)==null?void 0:O.backgroundColor)||this.background,axisColor:(($=this.wardley)==null?void 0:$.axisColor)||this.lineColor,axisTextColor:((X=this.wardley)==null?void 0:X.axisTextColor)||this.primaryTextColor,gridColor:((G=this.wardley)==null?void 0:G.gridColor)||this.gridColor,componentFill:((H=this.wardley)==null?void 0:H.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((N=this.wardley)==null?void 0:N.componentLabelColor)||this.primaryTextColor,linkStroke:((q=this.wardley)==null?void 0:q.linkStroke)||this.lineColor,evolutionStroke:((V=this.wardley)==null?void 0:V.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((tt=this.wardley)==null?void 0:tt.annotationStroke)||this.lineColor,annotationTextColor:((A=this.wardley)==null?void 0:A.annotationTextColor)||this.primaryTextColor,annotationFill:((Et=this.wardley)==null?void 0:Et.annotationFill)||this.background},this.xyChart={backgroundColor:((kt=this.xyChart)==null?void 0:kt.backgroundColor)||this.background,titleColor:((P=this.xyChart)==null?void 0:P.titleColor)||this.primaryTextColor,dataLabelColor:((Rt=this.xyChart)==null?void 0:Rt.dataLabelColor)||this.primaryTextColor,legendTextColor:((Tt=this.xyChart)==null?void 0:Tt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((pt=this.xyChart)==null?void 0:pt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Ht=this.xyChart)==null?void 0:Ht.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Yt=this.xyChart)==null?void 0:Yt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((It=this.xyChart)==null?void 0:It.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((wt=this.xyChart)==null?void 0:wt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Xt=this.xyChart)==null?void 0:Xt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Qt=this.xyChart)==null?void 0:Qt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((le=this.xyChart)==null?void 0:le.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||ot(K(this.git0),25),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(xa,"Theme"),xa),V6=C(e=>{const t=new j6;return t.calculate(e),t},"getThemeVariables"),Ca,G6=(Ca=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=at("#cde498",10),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.primaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,n,s,a,o,l,c,u,h,f,d,p,g,b,m,_,k,T,E,S,B,L,W,O,$,X,G,H,M,N,q,V,tt,A,Et,kt,P,Rt,Tt,pt,Ht,Yt,It,wt,Lt,Xt,Qt,le;this.actorBorder=ot(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||ot(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||ot(this.tertiaryColor,40);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScale"+it]=ot(this["cScale"+it],10),this["cScalePeer"+it]=this["cScalePeer"+it]||ot(this["cScale"+it],25);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleInv"+it]=this["cScaleInv"+it]||w(this["cScale"+it],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleLabel"+it]=this["cScaleLabel"+it]||this.scaleLabelColor;for(let it=0;it<5;it++)this["surface"+it]=this["surface"+it]||w(this.mainBkg,{h:30,s:-30,l:-(5+it*5)}),this["surfacePeer"+it]=this["surfacePeer"+it]||w(this.mainBkg,{h:30,s:-30,l:-(8+it*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||at(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||at(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((n=this.cynefin)==null?void 0:n.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B4513",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#DCEDC8",chaoticBg:((h=this.cynefin)==null?void 0:h.chaoticBg)||"#FFE0B2",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((b=this.radar)==null?void 0:b.axisColor)||this.lineColor,axisStrokeWidth:((m=this.radar)==null?void 0:m.axisStrokeWidth)||2,axisLabelFontSize:((_=this.radar)==null?void 0:_.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((T=this.radar)==null?void 0:T.curveStrokeWidth)||2,graticuleColor:((E=this.radar)==null?void 0:E.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((S=this.radar)==null?void 0:S.graticuleStrokeWidth)||1,graticuleOpacity:((B=this.radar)==null?void 0:B.graticuleOpacity)||.3,legendBoxSize:((L=this.radar)==null?void 0:L.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((O=this.wardley)==null?void 0:O.backgroundColor)||this.background,axisColor:(($=this.wardley)==null?void 0:$.axisColor)||this.lineColor,axisTextColor:((X=this.wardley)==null?void 0:X.axisTextColor)||this.primaryTextColor,gridColor:((G=this.wardley)==null?void 0:G.gridColor)||this.gridColor,componentFill:((H=this.wardley)==null?void 0:H.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((N=this.wardley)==null?void 0:N.componentLabelColor)||this.primaryTextColor,linkStroke:((q=this.wardley)==null?void 0:q.linkStroke)||this.lineColor,evolutionStroke:((V=this.wardley)==null?void 0:V.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((tt=this.wardley)==null?void 0:tt.annotationStroke)||this.lineColor,annotationTextColor:((A=this.wardley)==null?void 0:A.annotationTextColor)||this.primaryTextColor,annotationFill:((Et=this.wardley)==null?void 0:Et.annotationFill)||this.background},this.xyChart={backgroundColor:((kt=this.xyChart)==null?void 0:kt.backgroundColor)||this.background,titleColor:((P=this.xyChart)==null?void 0:P.titleColor)||this.primaryTextColor,dataLabelColor:((Rt=this.xyChart)==null?void 0:Rt.dataLabelColor)||this.primaryTextColor,legendTextColor:((Tt=this.xyChart)==null?void 0:Tt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((pt=this.xyChart)==null?void 0:pt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Ht=this.xyChart)==null?void 0:Ht.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Yt=this.xyChart)==null?void 0:Yt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((It=this.xyChart)==null?void 0:It.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((wt=this.xyChart)==null?void 0:wt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Lt=this.xyChart)==null?void 0:Lt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Xt=this.xyChart)==null?void 0:Xt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Qt=this.xyChart)==null?void 0:Qt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((le=this.xyChart)==null?void 0:le.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||K(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||K(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Ca,"Theme"),Ca),Y6=C(e=>{const t=new G6;return t.calculate(e),t},"getThemeVariables"),_a,X6=(_a=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=at(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.lineColor=K(this.background),this.textColor=K(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||at(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,n,s,a,o,l,c,u,h,f,d,p,g,b,m,_,k,T,E,S,B,L,W,O,$,X,G,H,M,N,q,V,tt,A,Et,kt,P,Rt,Tt,pt,Ht,Yt,It,wt,Lt,Xt,Qt,le;this.secondBkg=at(this.contrast,55),this.border2=this.contrast,this.actorBorder=at(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleInv"+it]=this["cScaleInv"+it]||K(this["cScale"+it]);for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this.darkMode?this["cScalePeer"+it]=this["cScalePeer"+it]||at(this["cScale"+it],10):this["cScalePeer"+it]=this["cScalePeer"+it]||ot(this["cScale"+it],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["cScaleLabel"+it]=this["cScaleLabel"+it]||this.scaleLabelColor;for(let it=0;it<5;it++)this["surface"+it]=this["surface"+it]||w(this.mainBkg,{l:-(5+it*5)}),this["surfacePeer"+it]=this["surfacePeer"+it]||w(this.mainBkg,{l:-(8+it*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=at(this.contrast,30),this.sectionBkgColor2=at(this.contrast,30),this.taskBorderColor=ot(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=at(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ot(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let it=0;it<this.THEME_COLOR_LIMIT;it++)this["pie"+it]=this["cScale"+it];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let it=0;it<8;it++)this["venn"+(it+1)]=this["venn"+(it+1)]??this["cScale"+it];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((n=this.cynefin)==null?void 0:n.boundaryWidth)||2,cliffColor:((s=this.cynefin)==null?void 0:s.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((h=this.cynefin)==null?void 0:h.chaoticBg)||"#FBE9E7",clearBg:((f=this.cynefin)==null?void 0:f.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((g=this.cynefin)==null?void 0:g.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((b=this.xyChart)==null?void 0:b.backgroundColor)||this.background,titleColor:((m=this.xyChart)==null?void 0:m.titleColor)||this.primaryTextColor,dataLabelColor:((_=this.xyChart)==null?void 0:_.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((T=this.xyChart)==null?void 0:T.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((E=this.xyChart)==null?void 0:E.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((S=this.xyChart)==null?void 0:S.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((B=this.xyChart)==null?void 0:B.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((L=this.xyChart)==null?void 0:L.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((W=this.xyChart)==null?void 0:W.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((O=this.xyChart)==null?void 0:O.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:(($=this.xyChart)==null?void 0:$.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((X=this.xyChart)==null?void 0:X.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((G=this.radar)==null?void 0:G.axisColor)||this.lineColor,axisStrokeWidth:((H=this.radar)==null?void 0:H.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((N=this.radar)==null?void 0:N.curveOpacity)||.5,curveStrokeWidth:((q=this.radar)==null?void 0:q.curveStrokeWidth)||2,graticuleColor:((V=this.radar)==null?void 0:V.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((tt=this.radar)==null?void 0:tt.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((Et=this.radar)==null?void 0:Et.legendBoxSize)||12,legendFontSize:((kt=this.radar)==null?void 0:kt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((P=this.wardley)==null?void 0:P.backgroundColor)||this.background,axisColor:((Rt=this.wardley)==null?void 0:Rt.axisColor)||this.lineColor,axisTextColor:((Tt=this.wardley)==null?void 0:Tt.axisTextColor)||this.primaryTextColor,gridColor:((pt=this.wardley)==null?void 0:pt.gridColor)||this.gridColor,componentFill:((Ht=this.wardley)==null?void 0:Ht.componentFill)||this.background,componentStroke:((Yt=this.wardley)==null?void 0:Yt.componentStroke)||this.lineColor,componentLabelColor:((It=this.wardley)==null?void 0:It.componentLabelColor)||this.primaryTextColor,linkStroke:((wt=this.wardley)==null?void 0:wt.linkStroke)||this.lineColor,evolutionStroke:((Lt=this.wardley)==null?void 0:Lt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Xt=this.wardley)==null?void 0:Xt.annotationStroke)||this.lineColor,annotationTextColor:((Qt=this.wardley)==null?void 0:Qt.annotationTextColor)||this.primaryTextColor,annotationFill:((le=this.wardley)==null?void 0:le.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ot(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(_a,"Theme"),_a),K6=C(e=>{const t=new X6;return t.calculate(e),t},"getThemeVariables"),ka,Q6=(ka=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var s,a,o,l,c,u,h,f,d,p,g,b;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||at(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||w(t,{h:30}),this.cScale4=this.cScale4||w(t,{h:60}),this.cScale5=this.cScale5||w(t,{h:90}),this.cScale6=this.cScale6||w(t,{h:120}),this.cScale7=this.cScale7||w(t,{h:150}),this.cScale8=this.cScale8||w(t,{h:210,l:150}),this.cScale9=this.cScale9||w(t,{h:270}),this.cScale10=this.cScale10||w(t,{h:300}),this.cScale11=this.cScale11||w(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=ot(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=ot(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||at(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||ot(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:n*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:n*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(ka,"Theme"),ka),Z6=C(e=>{const t=new Q6;return t.calculate(e),t},"getThemeVariables"),Ta,J6=(Ta=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=at(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=at(K("#323D47"),10),this.border1="#ccc",this.border2=Mn(255,255,255,.25),this.arrowheadColor=K(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,n,s,a,o,l,c,u,h,f,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||at(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=ot(this["cScale"+p],75);else for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=ot(this["cScale"+p],25);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||K(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||at(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||ot(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=this["cScaleLabel"+p]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||w(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||w(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Ta,"Theme"),Ta),tD=C(e=>{const t=new J6;return t.calculate(e),t},"getThemeVariables"),Ea,eD=(Ea=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=te("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var s,a,o,l,c,u,h,f,d,p,g,b;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||at(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=ot(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=ot(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||at(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||ot(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:n*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:n*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Ea,"Theme"),Ea),rD=C(e=>{const t=new eD;return t.calculate(e),t},"getThemeVariables"),wa,iD=(wa=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=at(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=at(K("#323D47"),10),this.border1="#ccc",this.border2=Mn(255,255,255,.25),this.arrowheadColor=K(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,n,s,a,o,l,c,u,h,f,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||at(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=ot(this["cScale"+p],75);else for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=ot(this["cScale"+p],25);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||K(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||at(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||ot(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=this["cScaleLabel"+p]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||w(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||w(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(wa,"Theme"),wa),nD=C(e=>{const t=new iD;return t.calculate(e),t},"getThemeVariables"),Sa,sD=(Sa=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=te(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var s,a,o,l,c,u,h,f,d,p,g,b;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=w(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||at(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||K(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||at(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||ot(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const n=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||w(this.mainBkg,{h:180,s:-15,l:n*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||w(this.mainBkg,{h:180,s:-15,l:n*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||w(t,{h:64}),this.fillType3=this.fillType3||w(r,{h:64}),this.fillType4=this.fillType4||w(t,{h:-64}),this.fillType5=this.fillType5||w(r,{h:-64}),this.fillType6=this.fillType6||w(t,{h:128}),this.fillType7=this.fillType7||w(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||w(t,{l:-10}),this.pie5=this.pie5||w(r,{l:-10}),this.pie6=this.pie6||w(i,{l:-10}),this.pie7=this.pie7||w(t,{h:60,l:-10}),this.pie8=this.pie8||w(t,{h:-60,l:-10}),this.pie9=this.pie9||w(t,{h:120,l:0}),this.pie10=this.pie10||w(t,{h:60,l:-20}),this.pie11=this.pie11||w(t,{h:-60,l:-20}),this.pie12=this.pie12||w(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||w(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((s=this.xyChart)==null?void 0:s.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((f=this.xyChart)==null?void 0:f.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||w(t,{h:-30}),this.git4=this.git4||w(t,{h:-60}),this.git5=this.git5||w(t,{h:-90}),this.git6=this.git6||w(t,{h:60}),this.git7=this.git7||w(t,{h:120}),this.darkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Sa,"Theme"),Sa),aD=C(e=>{const t=new sD;return t.calculate(e),t},"getThemeVariables"),Aa,oD=(Aa=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=at(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=K(this.background),this.secondaryBorderColor=te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=te(this.tertiaryColor,this.darkMode),this.primaryTextColor=K(this.primaryColor),this.secondaryTextColor=K(this.secondaryColor),this.tertiaryTextColor=K(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=at(K("#323D47"),10),this.border1="#ccc",this.border2=Mn(255,255,255,.25),this.arrowheadColor=K(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,n,s,a,o,l,c,u,h,f,d;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||te(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||te(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||te(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||te(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||K(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||K(this.tertiaryColor),this.lineColor=this.lineColor||K(this.background),this.arrowheadColor=this.arrowheadColor||K(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ot(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||K(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||at(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||K(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||at(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||ot(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=ot(this["cScale"+p],75);const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||w(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||w(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||mi(this.quadrant1Fill)?at(this.quadrant1Fill):ot(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((u=this.xyChart)==null?void 0:u.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((h=this.xyChart)==null?void 0:h.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((f=this.xyChart)==null?void 0:f.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ot(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=at(this.git0,25),this.git1=at(this.git1,25),this.git2=at(this.git2,25),this.git3=at(this.git3,25),this.git4=at(this.git4,25),this.git5=at(this.git5,25),this.git6=at(this.git6,25),this.git7=at(this.git7,25)):(this.git0=ot(this.git0,25),this.git1=ot(this.git1,25),this.git2=ot(this.git2,25),this.git3=ot(this.git3,25),this.git4=ot(this.git4,25),this.git5=ot(this.git5,25),this.git6=ot(this.git6,25),this.git7=ot(this.git7,25)),this.gitInv0=this.gitInv0||K(this.git0),this.gitInv1=this.gitInv1||K(this.git1),this.gitInv2=this.gitInv2||K(this.git2),this.gitInv3=this.gitInv3||K(this.git3),this.gitInv4=this.gitInv4||K(this.git4),this.gitInv5=this.gitInv5||K(this.git5),this.gitInv6=this.gitInv6||K(this.git6),this.gitInv7=this.gitInv7||K(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Fi,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||$i}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},C(Aa,"Theme"),Aa),lD=C(e=>{const t=new oD;return t.calculate(e),t},"getThemeVariables"),on={base:{getThemeVariables:U6},dark:{getThemeVariables:W6},default:{getThemeVariables:V6},forest:{getThemeVariables:Y6},neutral:{getThemeVariables:K6},neo:{getThemeVariables:Z6},"neo-dark":{getThemeVariables:tD},redux:{getThemeVariables:rD},"redux-dark":{getThemeVariables:nD},"redux-color":{getThemeVariables:aD},"redux-dark-color":{getThemeVariables:lD}},sr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},_T={...sr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:on.default.getThemeVariables(),sequence:{...sr.sequence,messageFont:C(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:C(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:C(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...sr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...sr.c4,useWidth:void 0,personFont:C(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...sr.flowchart,inheritDir:!1},external_personFont:C(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:C(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:C(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:C(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:C(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:C(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:C(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:C(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:C(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:C(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:C(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:C(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:C(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:C(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:C(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:C(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:C(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:C(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:C(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:C(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:C(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...sr.pie,useWidth:984},xyChart:{...sr.xyChart,useWidth:void 0},requirement:{...sr.requirement,useWidth:void 0},packet:{...sr.packet},eventmodeling:{...sr.eventmodeling},treeView:{...sr.treeView,useWidth:void 0},radar:{...sr.radar},railroad:{...sr.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...sr.ishikawa},sankey:{...sr.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...sr.venn},cynefin:{...sr.cynefin}},kT=C((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...kT(e[i],"")]:[...r,t+i],[]),"keyify"),cD=new Set(kT(_T,"")),TT=_T,uD={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},hD=C((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(nt.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),mu=C(e=>{if(nt.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>mu(t));return}for(const t of Object.keys(e)){if(nt.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!cD.has(t)||e[t]==null){nt.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=uD[t];i?hD(e[t],i):(nt.debug("sanitizing object",t),mu(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(nt.debug("sanitizing css option",t),e[t]=ET(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}nt.debug("After sanitization",e)}},"sanitizeDirective"),ET=C(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Na=Object.freeze(TT),Hi=C(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Pr=er({},Na),bu,_s=[],Xo=er({},Na),Dl=C((e,t)=>{let r=er({},e),i={};for(const n of t)AT(n),i=er(i,n);if(r=er(r,i),i.theme&&i.theme in on){const n=er({},bu),s=er(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in on&&(r.themeVariables=on[r.theme].getThemeVariables(s))}return Xo=r,bD(Xo),Xo},"updateCurrentConfig"),dD=C(e=>(Pr=er({},Na),Pr=er(Pr,e),e.theme&&on[e.theme]&&(Pr.themeVariables=on[e.theme].getThemeVariables(e.themeVariables)),Dl(Pr,_s),Pr),"setSiteConfig"),fD=C(e=>{bu=er({},e)},"saveConfigFromInitialize"),pD=C(e=>(Pr=er(Pr,e),Dl(Pr,_s),Pr),"updateSiteConfig"),wT=C(()=>er({},Pr),"getSiteConfig"),ST=C(e=>(Dl(Xo,[e]),Oe()),"setConfig"),Oe=C(()=>er({},Xo),"getConfig"),AT=C(e=>{e&&(["secure",...Pr.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(nt.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&AT(e[t])}))},"sanitize"),gD=C(e=>{var t;mu(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),_s.push(e),Dl(Pr,_s)},"addDirective"),yu=C((e=Pr)=>{_s=[],Dl(e,_s)},"reset"),mD={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Fy={},vT=C(e=>{Fy[e]||(nt.warn(mD[e]),Fy[e]=!0)},"issueWarning"),bD=C(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&vT("LAZY_LOAD_DEPRECATED")},"checkConfig"),Zot=C(()=>{let e={};bu&&(e=er(e,bu));for(const t of _s)e=er(e,t);return e},"getUserDefinedConfig"),yr=C(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&vT("FLOWCHART_HTML_LABELS_DEPRECATED"),Hi(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),LT=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Ko=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,yD=/\s*%%.*\n/gm,va,IT=(va=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},C(va,"UnknownDiagramError"),va),ks={},tm=C(function(e,t){e=e.replace(LT,"").replace(Ko,"").replace(yD,`
161
- `);for(const[r,{detector:i}]of Object.entries(ks))if(i(e,t))return r;throw new IT(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),xp=C((...e)=>{for(const{id:t,detector:r,loader:i}of e)BT(t,r,i)},"registerLazyLoadedDiagrams"),BT=C((e,t,r)=>{ks[e]&&nt.warn(`Detector with key ${e} already exists. Overwriting.`),ks[e]={detector:t,loader:r},nt.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),xD=C(e=>ks[e].loader,"getDiagramLoader"),Pl=/<br\s*\/?>/gi,CD=C(e=>e?NT(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),_D=(()=>{let e=!1;return()=>{e||(RT(),e=!0)}})();function RT(){const e="data-temp-href-target";Oa.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Oa.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}C(RT,"setupDompurifyHooks");var OT=C(e=>(_D(),Oa.sanitize(e)),"removeScript"),$y=C((e,t)=>{if(yr(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=OT(e):r!=="loose"&&(e=NT(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=wD(e))}return e},"sanitizeMore"),ti=C((e,t)=>e&&(t.dompurifyConfig?e=Oa.sanitize($y(e,t),t.dompurifyConfig).toString():e=Oa.sanitize($y(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),kD=C((e,t)=>typeof e=="string"?ti(e,t):e.flat().map(r=>ti(r,t)),"sanitizeTextOrArray"),TD=C(e=>Pl.test(e),"hasBreaks"),ED=C(e=>e.split(Pl),"splitBreaks"),wD=C(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),NT=C(e=>e.replace(Pl,"#br#"),"breakToPlaceholder"),SD=C(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),AD=C(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),vD=C(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Hy=C(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const s=t[i-1],a=t[i+1];LD(s,a)&&(n=s+","+a,i++,r.pop())}r.push(ID(n))}return r.join("")},"parseGenericTypes"),Cp=C((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),LD=C((e,t)=>{const r=Cp(e,"~"),i=Cp(t,"~");return r===1&&i===1},"shouldCombineSets"),ID=C(e=>{const t=Cp(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),s=i.lastIndexOf("~");for(;n!==-1&&s!==-1&&n!==s;)i[n]="<",i[s]=">",n=i.indexOf("~"),s=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),zy=C(()=>window.MathMLElement!==void 0,"isMathMLSupported"),_p=/\$\$(.*?)\$\$/g,ml=C(e=>{var t;return(((t=e.match(_p))==null?void 0:t.length)??0)>0},"hasKatex"),Jot=C(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await DT(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),BD=C(async(e,t)=>{if(!ml(e))return e;if(!(zy()||t.legacyMathML||t.forceLegacyMathML))return e.replace(_p,"MathML is unsupported in this environment.");{const{default:r}=await I(async()=>{const{default:n}=await import("./katex-C5jXJg4s.js");return{default:n}},[]),i=t.forceLegacyMathML||!zy()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Pl).map(n=>ml(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace(_p,(n,s)=>r.renderToString(s,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),DT=C(async(e,t)=>ti(await BD(e,t),t),"renderKatexSanitized"),Ml={getRows:CD,sanitizeText:ti,sanitizeTextOrArray:kD,hasBreaks:TD,splitBreaks:ED,lineBreakRegex:Pl,removeScript:OT,getUrl:SD,evaluate:Hi,getMax:AD,getMin:vD},RD=C(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),OD=C(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),PT=C(function(e,t,r,i){const n=OD(t,r,i);RD(e,n)},"configureSvgSize"),ND=C(function(e,t,r,i){const n=t.node().getBBox(),s=n.width,a=n.height;nt.info(`SVG bounds: ${s}x${a}`,n);let o=0,l=0;nt.info(`Graph bounds: ${o}x${l}`,e),o=s+r*2,l=a+r*2,nt.info(`Calculated bounds: ${o}x${l}`),PT(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Uc={};function kp(e){return[...e.cssRules].map(t=>t.cssText).join(`
162
- `)}C(kp,"cssStyleSheetToString");var DD=C((e,t,r,i)=>{let n="";return e in Uc&&Uc[e]?n=Uc[e]({...r,svgId:i}):nt.warn(`No theme found for ${e}`),`& {
163
- font-family: ${r.fontFamily};
164
- font-size: ${r.fontSize};
165
- fill: ${r.textColor}
166
- }
167
- @keyframes edge-animation-frame {
168
- from {
169
- stroke-dashoffset: 0;
170
- }
171
- }
172
- @keyframes dash {
173
- to {
174
- stroke-dashoffset: 0;
175
- }
176
- }
177
- & .edge-animation-slow {
178
- stroke-dasharray: 9,5 !important;
179
- stroke-dashoffset: 900;
180
- animation: dash 50s linear infinite;
181
- stroke-linecap: round;
182
- }
183
- & .edge-animation-fast {
184
- stroke-dasharray: 9,5 !important;
185
- stroke-dashoffset: 900;
186
- animation: dash 20s linear infinite;
187
- stroke-linecap: round;
188
- }
189
- /* Classes common for multiple diagrams */
190
-
191
- & .error-icon {
192
- fill: ${r.errorBkgColor};
193
- }
194
- & .error-text {
195
- fill: ${r.errorTextColor};
196
- stroke: ${r.errorTextColor};
197
- }
198
-
199
- & .edge-thickness-normal {
200
- stroke-width: ${r.strokeWidth??1}px;
201
- }
202
- & .edge-thickness-thick {
203
- stroke-width: 3.5px
204
- }
205
- & .edge-pattern-solid {
206
- stroke-dasharray: 0;
207
- }
208
- & .edge-thickness-invisible {
209
- stroke-width: 0;
210
- fill: none;
211
- }
212
- & .edge-pattern-dashed{
213
- stroke-dasharray: 3;
214
- }
215
- .edge-pattern-dotted {
216
- stroke-dasharray: 2;
217
- }
218
-
219
- & .marker {
220
- fill: ${r.lineColor};
221
- stroke: ${r.lineColor};
222
- }
223
- & .marker.cross {
224
- stroke: ${r.lineColor};
225
- }
226
-
227
- & svg {
228
- font-family: ${r.fontFamily};
229
- font-size: ${r.fontSize};
230
- }
231
- & p {
232
- margin: 0
233
- }
234
-
235
- ${n}
236
- .node .neo-node {
237
- stroke: ${r.nodeBorder};
238
- }
239
-
240
- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
241
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
242
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
243
- }
244
- [data-look="neo"].swimlane.cluster rect {
245
- filter: none;
246
- }
247
-
248
-
249
- [data-look="neo"].node path {
250
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
251
- stroke-width: ${r.strokeWidth??1}px;
252
- }
253
-
254
- [data-look="neo"].node .outer-path {
255
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
256
- }
257
-
258
- [data-look="neo"].node .neo-line path {
259
- stroke: ${r.nodeBorder};
260
- filter: none;
261
- }
262
-
263
- [data-look="neo"].node circle{
264
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
265
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
266
- }
267
-
268
- [data-look="neo"].node circle .state-start{
269
- fill: #000000;
270
- }
271
-
272
- [data-look="neo"].icon-shape .icon {
273
- fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
274
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
275
- }
276
-
277
- [data-look="neo"].icon-shape .icon-neo path {
278
- stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
279
- filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
280
- }
281
-
282
- ${t}
283
- `},"getStyles"),PD=C((e,t)=>{t!==void 0&&(Uc[e]=t)},"addStylesForDiagram"),MD=DD,MT={};Z5(MT,{clear:()=>FD,getAccDescription:()=>UD,getAccTitle:()=>HD,getDiagramTitle:()=>WD,setAccDescription:()=>zD,setAccTitle:()=>$D,setDiagramTitle:()=>qD});var em="",rm="",im="",nm=C(e=>ti(e,Oe()),"sanitizeText"),FD=C(()=>{em="",im="",rm=""},"clear"),$D=C(e=>{em=nm(e).replace(/^\s+/g,"")},"setAccTitle"),HD=C(()=>em,"getAccTitle"),zD=C(e=>{im=nm(e).replace(/\n\s+/g,`
284
- `)},"setAccDescription"),UD=C(()=>im,"getAccDescription"),qD=C(e=>{rm=nm(e)},"setDiagramTitle"),WD=C(()=>rm,"getDiagramTitle"),Uy=nt,jD=Jg,pe=Oe,tlt=ST,elt=Na,sm=C(e=>ti(e,pe()),"sanitizeText"),VD=ND,GD=C(()=>MT,"getCommonDb"),xu={},Cu=C((e,t,r)=>{var i;xu[e]&&Uy.warn(`Diagram with id ${e} already registered. Overwriting.`),xu[e]=t,r&&BT(e,r),PD(e,t.styles),(i=t.injectUtils)==null||i.call(t,Uy,jD,pe,sm,VD,GD(),()=>{})},"registerDiagram"),Tp=C(e=>{if(e in xu)return xu[e];throw new YD(e)},"getDiagram"),La,YD=(La=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},C(La,"DiagramNotFoundError"),La),XD={value:()=>{}};function FT(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new qc(r)}function qc(e){this._=e}function KD(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}qc.prototype=FT.prototype={constructor:qc,on:function(e,t){var r=this._,i=KD(e+"",r),n,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((n=(e=i[s]).type)&&(n=QD(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(n=(e=i[s]).type)r[n]=qy(r[n],e.name,t);else if(t==null)for(n in r)r[n]=qy(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new qc(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,n=s.length;i<n;++i)s[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,s=i.length;n<s;++n)i[n].value.apply(t,r)}};function QD(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function qy(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=XD,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ep="http://www.w3.org/1999/xhtml";const Wy={svg:"http://www.w3.org/2000/svg",xhtml:Ep,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function dh(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Wy.hasOwnProperty(t)?{space:Wy[t],local:e}:e}function ZD(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ep&&t.documentElement.namespaceURI===Ep?t.createElement(e):t.createElementNS(r,e)}}function JD(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function $T(e){var t=dh(e);return(t.local?JD:ZD)(t)}function tP(){}function am(e){return e==null?tP:function(){return this.querySelector(e)}}function eP(e){typeof e!="function"&&(e=am(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,o=i[n]=new Array(a),l,c,u=0;u<a;++u)(l=s[u])&&(c=e.call(l,l.__data__,u,s))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new Wr(i,this._parents)}function rP(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function iP(){return[]}function HT(e){return e==null?iP:function(){return this.querySelectorAll(e)}}function nP(e){return function(){return rP(e.apply(this,arguments))}}function sP(e){typeof e=="function"?e=nP(e):e=HT(e);for(var t=this._groups,r=t.length,i=[],n=[],s=0;s<r;++s)for(var a=t[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),n.push(l));return new Wr(i,n)}function zT(e){return function(){return this.matches(e)}}function UT(e){return function(t){return t.matches(e)}}var aP=Array.prototype.find;function oP(e){return function(){return aP.call(this.children,e)}}function lP(){return this.firstElementChild}function cP(e){return this.select(e==null?lP:oP(typeof e=="function"?e:UT(e)))}var uP=Array.prototype.filter;function hP(){return Array.from(this.children)}function dP(e){return function(){return uP.call(this.children,e)}}function fP(e){return this.selectAll(e==null?hP:dP(typeof e=="function"?e:UT(e)))}function pP(e){typeof e!="function"&&(e=zT(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,o=i[n]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new Wr(i,this._parents)}function qT(e){return new Array(e.length)}function gP(){return new Wr(this._enter||this._groups.map(qT),this._parents)}function _u(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}_u.prototype={constructor:_u,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function mP(e){return function(){return e}}function bP(e,t,r,i,n,s){for(var a=0,o,l=t.length,c=s.length;a<c;++a)(o=t[a])?(o.__data__=s[a],i[a]=o):r[a]=new _u(e,s[a]);for(;a<l;++a)(o=t[a])&&(n[a]=o)}function yP(e,t,r,i,n,s,a){var o,l,c=new Map,u=t.length,h=s.length,f=new Array(u),d;for(o=0;o<u;++o)(l=t[o])&&(f[o]=d=a.call(l,l.__data__,o,t)+"",c.has(d)?n[o]=l:c.set(d,l));for(o=0;o<h;++o)d=a.call(e,s[o],o,s)+"",(l=c.get(d))?(i[o]=l,l.__data__=s[o],c.delete(d)):r[o]=new _u(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(f[o])===l&&(n[o]=l)}function xP(e){return e.__data__}function CP(e,t){if(!arguments.length)return Array.from(this,xP);var r=t?yP:bP,i=this._parents,n=this._groups;typeof e!="function"&&(e=mP(e));for(var s=n.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=i[c],h=n[c],f=h.length,d=_P(e.call(u,u&&u.__data__,c,i)),p=d.length,g=o[c]=new Array(p),b=a[c]=new Array(p),m=l[c]=new Array(f);r(u,h,g,b,m,d,t);for(var _=0,k=0,T,E;_<p;++_)if(T=g[_]){for(_>=k&&(k=_+1);!(E=b[k])&&++k<p;);T._next=E||null}}return a=new Wr(a,i),a._enter=o,a._exit=l,a}function _P(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kP(){return new Wr(this._exit||this._groups.map(qT),this._parents)}function TP(e,t,r){var i=this.enter(),n=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function EP(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,s=i.length,a=Math.min(n,s),o=new Array(n),l=0;l<a;++l)for(var c=r[l],u=i[l],h=c.length,f=o[l]=new Array(h),d,p=0;p<h;++p)(d=c[p]||u[p])&&(f[p]=d);for(;l<n;++l)o[l]=r[l];return new Wr(o,this._parents)}function wP(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,s=i[n],a;--n>=0;)(a=i[n])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function SP(e){e||(e=AP);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var a=r[s],o=a.length,l=n[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new Wr(n,this._parents).order()}function AP(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function vP(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function LP(){return Array.from(this)}function IP(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length;n<s;++n){var a=i[n];if(a)return a}return null}function BP(){let e=0;for(const t of this)++e;return e}function RP(){return!this.node()}function OP(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],s=0,a=n.length,o;s<a;++s)(o=n[s])&&e.call(o,o.__data__,s,n);return this}function NP(e){return function(){this.removeAttribute(e)}}function DP(e){return function(){this.removeAttributeNS(e.space,e.local)}}function PP(e,t){return function(){this.setAttribute(e,t)}}function MP(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function FP(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function $P(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function HP(e,t){var r=dh(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?DP:NP:typeof t=="function"?r.local?$P:FP:r.local?MP:PP)(r,t))}function WT(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function zP(e){return function(){this.style.removeProperty(e)}}function UP(e,t,r){return function(){this.style.setProperty(e,t,r)}}function qP(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function WP(e,t,r){return arguments.length>1?this.each((t==null?zP:typeof t=="function"?qP:UP)(e,t,r??"")):Da(this.node(),e)}function Da(e,t){return e.style.getPropertyValue(t)||WT(e).getComputedStyle(e,null).getPropertyValue(t)}function jP(e){return function(){delete this[e]}}function VP(e,t){return function(){this[e]=t}}function GP(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function YP(e,t){return arguments.length>1?this.each((t==null?jP:typeof t=="function"?GP:VP)(e,t)):this.node()[e]}function jT(e){return e.trim().split(/^|\s+/)}function om(e){return e.classList||new VT(e)}function VT(e){this._node=e,this._names=jT(e.getAttribute("class")||"")}VT.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function GT(e,t){for(var r=om(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function YT(e,t){for(var r=om(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function XP(e){return function(){GT(this,e)}}function KP(e){return function(){YT(this,e)}}function QP(e,t){return function(){(t.apply(this,arguments)?GT:YT)(this,e)}}function ZP(e,t){var r=jT(e+"");if(arguments.length<2){for(var i=om(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?QP:t?XP:KP)(r,t))}function JP(){this.textContent=""}function tM(e){return function(){this.textContent=e}}function eM(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function rM(e){return arguments.length?this.each(e==null?JP:(typeof e=="function"?eM:tM)(e)):this.node().textContent}function iM(){this.innerHTML=""}function nM(e){return function(){this.innerHTML=e}}function sM(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function aM(e){return arguments.length?this.each(e==null?iM:(typeof e=="function"?sM:nM)(e)):this.node().innerHTML}function oM(){this.nextSibling&&this.parentNode.appendChild(this)}function lM(){return this.each(oM)}function cM(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function uM(){return this.each(cM)}function hM(e){var t=typeof e=="function"?e:$T(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function dM(){return null}function fM(e,t){var r=typeof e=="function"?e:$T(e),i=t==null?dM:typeof t=="function"?t:am(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function pM(){var e=this.parentNode;e&&e.removeChild(this)}function gM(){return this.each(pM)}function mM(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function bM(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yM(e){return this.select(e?bM:mM)}function xM(e){return arguments.length?this.property("__data__",e):this.node().__data__}function CM(e){return function(t){e.call(this,t,this.__data__)}}function _M(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function kM(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,s;r<n;++r)s=t[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function TM(e,t,r){return function(){var i=this.__on,n,s=CM(t);if(i){for(var a=0,o=i.length;a<o;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=t;return}}this.addEventListener(e.type,s,r),n={type:e.type,name:e.name,value:t,listener:s,options:r},i?i.push(n):this.__on=[n]}}function EM(e,t,r){var i=_M(e+""),n,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(n=0,u=o[l];n<s;++n)if((a=i[n]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?TM:kM,n=0;n<s;++n)this.each(o(i[n],t,r));return this}function XT(e,t,r){var i=WT(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function wM(e,t){return function(){return XT(this,e,t)}}function SM(e,t){return function(){return XT(this,e,t.apply(this,arguments))}}function AM(e,t){return this.each((typeof t=="function"?SM:wM)(e,t))}function*vM(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,s=i.length,a;n<s;++n)(a=i[n])&&(yield a)}var KT=[null];function Wr(e,t){this._groups=e,this._parents=t}function Fl(){return new Wr([[document.documentElement]],KT)}function LM(){return this}Wr.prototype=Fl.prototype={constructor:Wr,select:eP,selectAll:sP,selectChild:cP,selectChildren:fP,filter:pP,data:CP,enter:gP,exit:kP,join:TP,merge:EP,selection:LM,order:wP,sort:SP,call:vP,nodes:LP,node:IP,size:BP,empty:RP,each:OP,attr:HP,style:WP,property:YP,classed:ZP,text:rM,html:aM,raise:lM,lower:uM,append:hM,insert:fM,remove:gM,clone:yM,datum:xM,on:EM,dispatch:AM,[Symbol.iterator]:vM};function se(e){return typeof e=="string"?new Wr([[document.querySelector(e)]],[document.documentElement]):new Wr([[e]],KT)}function lm(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function QT(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function $l(){}var bl=.7,ku=1/bl,fa="\\s*([+-]?\\d+)\\s*",yl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IM=/^#([0-9a-f]{3,8})$/,BM=new RegExp(`^rgb\\(${fa},${fa},${fa}\\)$`),RM=new RegExp(`^rgb\\(${Ni},${Ni},${Ni}\\)$`),OM=new RegExp(`^rgba\\(${fa},${fa},${fa},${yl}\\)$`),NM=new RegExp(`^rgba\\(${Ni},${Ni},${Ni},${yl}\\)$`),DM=new RegExp(`^hsl\\(${yl},${Ni},${Ni}\\)$`),PM=new RegExp(`^hsla\\(${yl},${Ni},${Ni},${yl}\\)$`),jy={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};lm($l,xl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Vy,formatHex:Vy,formatHex8:MM,formatHsl:FM,formatRgb:Gy,toString:Gy});function Vy(){return this.rgb().formatHex()}function MM(){return this.rgb().formatHex8()}function FM(){return ZT(this).formatHsl()}function Gy(){return this.rgb().formatRgb()}function xl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=IM.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Yy(t):r===3?new Mr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?uc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?uc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=BM.exec(e))?new Mr(t[1],t[2],t[3],1):(t=RM.exec(e))?new Mr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=OM.exec(e))?uc(t[1],t[2],t[3],t[4]):(t=NM.exec(e))?uc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=DM.exec(e))?Qy(t[1],t[2]/100,t[3]/100,1):(t=PM.exec(e))?Qy(t[1],t[2]/100,t[3]/100,t[4]):jy.hasOwnProperty(e)?Yy(jy[e]):e==="transparent"?new Mr(NaN,NaN,NaN,0):null}function Yy(e){return new Mr(e>>16&255,e>>8&255,e&255,1)}function uc(e,t,r,i){return i<=0&&(e=t=r=NaN),new Mr(e,t,r,i)}function $M(e){return e instanceof $l||(e=xl(e)),e?(e=e.rgb(),new Mr(e.r,e.g,e.b,e.opacity)):new Mr}function wp(e,t,r,i){return arguments.length===1?$M(e):new Mr(e,t,r,i??1)}function Mr(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}lm(Mr,wp,QT($l,{brighter(e){return e=e==null?ku:Math.pow(ku,e),new Mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bl:Math.pow(bl,e),new Mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Mr(bs(this.r),bs(this.g),bs(this.b),Tu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xy,formatHex:Xy,formatHex8:HM,formatRgb:Ky,toString:Ky}));function Xy(){return`#${us(this.r)}${us(this.g)}${us(this.b)}`}function HM(){return`#${us(this.r)}${us(this.g)}${us(this.b)}${us((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ky(){const e=Tu(this.opacity);return`${e===1?"rgb(":"rgba("}${bs(this.r)}, ${bs(this.g)}, ${bs(this.b)}${e===1?")":`, ${e})`}`}function Tu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function bs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function us(e){return e=bs(e),(e<16?"0":"")+e.toString(16)}function Qy(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ui(e,t,r,i)}function ZT(e){if(e instanceof ui)return new ui(e.h,e.s,e.l,e.opacity);if(e instanceof $l||(e=xl(e)),!e)return new ui;if(e instanceof ui)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=Math.max(t,r,i),a=NaN,o=s-n,l=(s+n)/2;return o?(t===s?a=(r-i)/o+(r<i)*6:r===s?a=(i-t)/o+2:a=(t-r)/o+4,o/=l<.5?s+n:2-s-n,a*=60):o=l>0&&l<1?0:a,new ui(a,o,l,e.opacity)}function zM(e,t,r,i){return arguments.length===1?ZT(e):new ui(e,t,r,i??1)}function ui(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}lm(ui,zM,QT($l,{brighter(e){return e=e==null?ku:Math.pow(ku,e),new ui(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bl:Math.pow(bl,e),new ui(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Mr($d(e>=240?e-240:e+120,n,i),$d(e,n,i),$d(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ui(Zy(this.h),hc(this.s),hc(this.l),Tu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Tu(this.opacity);return`${e===1?"hsl(":"hsla("}${Zy(this.h)}, ${hc(this.s)*100}%, ${hc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Zy(e){return e=(e||0)%360,e<0?e+360:e}function hc(e){return Math.max(0,Math.min(1,e||0))}function $d(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const cm=e=>()=>e;function JT(e,t){return function(r){return e+r*t}}function UM(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function rlt(e,t){var r=t-e;return r?JT(e,r>180||r<-180?r-360*Math.round(r/360):r):cm(isNaN(e)?t:e)}function qM(e){return(e=+e)==1?t2:function(t,r){return r-t?UM(t,r,e):cm(isNaN(t)?r:t)}}function t2(e,t){var r=t-e;return r?JT(e,r):cm(isNaN(e)?t:e)}const Jy=(function e(t){var r=qM(t);function i(n,s){var a=r((n=wp(n)).r,(s=wp(s)).r),o=r(n.g,s.g),l=r(n.b,s.b),c=t2(n.opacity,s.opacity);return function(u){return n.r=a(u),n.g=o(u),n.b=l(u),n.opacity=c(u),n+""}}return i.gamma=e,i})(1);function Ln(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Sp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hd=new RegExp(Sp.source,"g");function WM(e){return function(){return e}}function jM(e){return function(t){return e(t)+""}}function VM(e,t){var r=Sp.lastIndex=Hd.lastIndex=0,i,n,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Sp.exec(e))&&(n=Hd.exec(t));)(s=n.index)>r&&(s=t.slice(r,s),o[a]?o[a]+=s:o[++a]=s),(i=i[0])===(n=n[0])?o[a]?o[a]+=n:o[++a]=n:(o[++a]=null,l.push({i:a,x:Ln(i,n)})),r=Hd.lastIndex;return r<t.length&&(s=t.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?jM(l[0].x):WM(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)o[(h=l[u]).i]=h.x(c);return o.join("")})}var t1=180/Math.PI,Ap={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function e2(e,t,r,i,n,s){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:n,translateY:s,rotate:Math.atan2(t,e)*t1,skewX:Math.atan(l)*t1,scaleX:a,scaleY:o}}var dc;function GM(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ap:e2(t.a,t.b,t.c,t.d,t.e,t.f)}function YM(e){return e==null||(dc||(dc=document.createElementNS("http://www.w3.org/2000/svg","g")),dc.setAttribute("transform",e),!(e=dc.transform.baseVal.consolidate()))?Ap:(e=e.matrix,e2(e.a,e.b,e.c,e.d,e.e,e.f))}function r2(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function s(c,u,h,f,d,p){if(c!==h||u!==f){var g=d.push("translate(",null,t,null,r);p.push({i:g-4,x:Ln(c,h)},{i:g-2,x:Ln(u,f)})}else(h||f)&&d.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(n(h)+"rotate(",null,i)-2,x:Ln(c,u)})):u&&h.push(n(h)+"rotate("+u+i)}function o(c,u,h,f){c!==u?f.push({i:h.push(n(h)+"skewX(",null,i)-2,x:Ln(c,u)}):u&&h.push(n(h)+"skewX("+u+i)}function l(c,u,h,f,d,p){if(c!==h||u!==f){var g=d.push(n(d)+"scale(",null,",",null,")");p.push({i:g-4,x:Ln(c,h)},{i:g-2,x:Ln(u,f)})}else(h!==1||f!==1)&&d.push(n(d)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),o(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(d){for(var p=-1,g=f.length,b;++p<g;)h[(b=f[p]).i]=b.x(d);return h.join("")}}}var XM=r2(GM,"px, ","px)","deg)"),KM=r2(YM,", ",")",")"),Pa=0,Oo=0,po=0,i2=1e3,Eu,No,wu=0,Ts=0,fh=0,Cl=typeof performance=="object"&&performance.now?performance:Date,n2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function um(){return Ts||(n2(QM),Ts=Cl.now()+fh)}function QM(){Ts=0}function Su(){this._call=this._time=this._next=null}Su.prototype=s2.prototype={constructor:Su,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?um():+r)+(t==null?0:+t),!this._next&&No!==this&&(No?No._next=this:Eu=this,No=this),this._call=e,this._time=r,vp()},stop:function(){this._call&&(this._call=null,this._time=1/0,vp())}};function s2(e,t,r){var i=new Su;return i.restart(e,t,r),i}function ZM(){um(),++Pa;for(var e=Eu,t;e;)(t=Ts-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pa}function e1(){Ts=(wu=Cl.now())+fh,Pa=Oo=0;try{ZM()}finally{Pa=0,t4(),Ts=0}}function JM(){var e=Cl.now(),t=e-wu;t>i2&&(fh-=t,wu=e)}function t4(){for(var e,t=Eu,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Eu=r);No=e,vp(i)}function vp(e){if(!Pa){Oo&&(Oo=clearTimeout(Oo));var t=e-Ts;t>24?(e<1/0&&(Oo=setTimeout(e1,e-Cl.now()-fh)),po&&(po=clearInterval(po))):(po||(wu=Cl.now(),po=setInterval(JM,i2)),Pa=1,n2(e1))}}function r1(e,t,r){var i=new Su;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var e4=FT("start","end","cancel","interrupt"),r4=[],a2=0,i1=1,Lp=2,Wc=3,n1=4,Ip=5,jc=6;function ph(e,t,r,i,n,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;i4(e,r,{name:t,index:i,group:n,on:e4,tween:r4,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:a2})}function hm(e,t){var r=bi(e,t);if(r.state>a2)throw new Error("too late; already scheduled");return r}function zi(e,t){var r=bi(e,t);if(r.state>Wc)throw new Error("too late; already running");return r}function bi(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function i4(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=s2(s,0,r.time);function s(c){r.state=i1,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,d;if(r.state!==i1)return l();for(u in i)if(d=i[u],d.name===r.name){if(d.state===Wc)return r1(a);d.state===n1?(d.state=jc,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[u]):+u<t&&(d.state=jc,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[u])}if(r1(function(){r.state===Wc&&(r.state=n1,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=Lp,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Lp){for(r.state=Wc,n=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(d=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(n[++h]=d);n.length=h+1}}function o(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Ip,1),h=-1,f=n.length;++h<f;)n[h].call(e,u);r.state===Ip&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=jc,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function n4(e,t){var r=e.__transition,i,n,s=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){s=!1;continue}n=i.state>Lp&&i.state<Ip,i.state=jc,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}s&&delete e.__transition}}function s4(e){return this.each(function(){n4(this,e)})}function a4(e,t){var r,i;return function(){var n=zi(this,e),s=n.tween;if(s!==r){i=r=s;for(var a=0,o=i.length;a<o;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function o4(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=zi(this,e),a=s.tween;if(a!==i){n=(i=a).slice();for(var o={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=o;break}l===c&&n.push(o)}s.tween=n}}function l4(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=bi(this.node(),r).tween,n=0,s=i.length,a;n<s;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((t==null?a4:o4)(r,e,t))}function dm(e,t,r){var i=e._id;return e.each(function(){var n=zi(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return bi(n,i).value[t]}}function o2(e,t){var r;return(typeof t=="number"?Ln:t instanceof xl?Jy:(r=xl(t))?(t=r,Jy):VM)(e,t)}function c4(e){return function(){this.removeAttribute(e)}}function u4(e){return function(){this.removeAttributeNS(e.space,e.local)}}function h4(e,t,r){var i,n=r+"",s;return function(){var a=this.getAttribute(e);return a===n?null:a===i?s:s=t(i=a,r)}}function d4(e,t,r){var i,n=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?s:s=t(i=a,r)}}function f4(e,t,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=t(i=a,o)))}}function p4(e,t,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=t(i=a,o)))}}function g4(e,t){var r=dh(e),i=r==="transform"?KM:o2;return this.attrTween(e,typeof t=="function"?(r.local?p4:f4)(r,i,dm(this,"attr."+e,t)):t==null?(r.local?u4:c4)(r):(r.local?d4:h4)(r,i,t))}function m4(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function b4(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function y4(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&b4(e,s)),r}return n._value=t,n}function x4(e,t){var r,i;function n(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&m4(e,s)),r}return n._value=t,n}function C4(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=dh(e);return this.tween(r,(i.local?y4:x4)(i,t))}function _4(e,t){return function(){hm(this,e).delay=+t.apply(this,arguments)}}function k4(e,t){return t=+t,function(){hm(this,e).delay=t}}function T4(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?_4:k4)(t,e)):bi(this.node(),t).delay}function E4(e,t){return function(){zi(this,e).duration=+t.apply(this,arguments)}}function w4(e,t){return t=+t,function(){zi(this,e).duration=t}}function S4(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?E4:w4)(t,e)):bi(this.node(),t).duration}function A4(e,t){if(typeof t!="function")throw new Error;return function(){zi(this,e).ease=t}}function v4(e){var t=this._id;return arguments.length?this.each(A4(t,e)):bi(this.node(),t).ease}function L4(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;zi(this,e).ease=r}}function I4(e){if(typeof e!="function")throw new Error;return this.each(L4(this._id,e))}function B4(e){typeof e!="function"&&(e=zT(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var s=t[n],a=s.length,o=i[n]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new cn(i,this._parents,this._name,this._id)}function R4(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,s=Math.min(i,n),a=new Array(i),o=0;o<s;++o)for(var l=t[o],c=r[o],u=l.length,h=a[o]=new Array(u),f,d=0;d<u;++d)(f=l[d]||c[d])&&(h[d]=f);for(;o<i;++o)a[o]=t[o];return new cn(a,this._parents,this._name,this._id)}function O4(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function N4(e,t,r){var i,n,s=O4(t)?hm:zi;return function(){var a=s(this,e),o=a.on;o!==i&&(n=(i=o).copy()).on(t,r),a.on=n}}function D4(e,t){var r=this._id;return arguments.length<2?bi(this.node(),r).on.on(e):this.each(N4(r,e,t))}function P4(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function M4(){return this.on("end.remove",P4(this._id))}function F4(e){var t=this._name,r=this._id;typeof e!="function"&&(e=am(e));for(var i=this._groups,n=i.length,s=new Array(n),a=0;a<n;++a)for(var o=i[a],l=o.length,c=s[a]=new Array(l),u,h,f=0;f<l;++f)(u=o[f])&&(h=e.call(u,u.__data__,f,o))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,ph(c[f],t,r,f,c,bi(u,r)));return new cn(s,this._parents,t,r)}function $4(e){var t=this._name,r=this._id;typeof e!="function"&&(e=HT(e));for(var i=this._groups,n=i.length,s=[],a=[],o=0;o<n;++o)for(var l=i[o],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),d,p=bi(u,r),g=0,b=f.length;g<b;++g)(d=f[g])&&ph(d,t,r,g,f,p);s.push(f),a.push(u)}return new cn(s,a,t,r)}var H4=Fl.prototype.constructor;function z4(){return new H4(this._groups,this._parents)}function U4(e,t){var r,i,n;return function(){var s=Da(this,e),a=(this.style.removeProperty(e),Da(this,e));return s===a?null:s===r&&a===i?n:n=t(r=s,i=a)}}function l2(e){return function(){this.style.removeProperty(e)}}function q4(e,t,r){var i,n=r+"",s;return function(){var a=Da(this,e);return a===n?null:a===i?s:s=t(i=a,r)}}function W4(e,t,r){var i,n,s;return function(){var a=Da(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Da(this,e))),a===l?null:a===i&&l===n?s:(n=l,s=t(i=a,o))}}function j4(e,t){var r,i,n,s="style."+t,a="end."+s,o;return function(){var l=zi(this,e),c=l.on,u=l.value[s]==null?o||(o=l2(t)):void 0;(c!==r||n!==u)&&(i=(r=c).copy()).on(a,n=u),l.on=i}}function V4(e,t,r){var i=(e+="")=="transform"?XM:o2;return t==null?this.styleTween(e,U4(e,i)).on("end.style."+e,l2(e)):typeof t=="function"?this.styleTween(e,W4(e,i,dm(this,"style."+e,t))).each(j4(this._id,e)):this.styleTween(e,q4(e,i,t),r).on("end.style."+e,null)}function G4(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function Y4(e,t,r){var i,n;function s(){var a=t.apply(this,arguments);return a!==n&&(i=(n=a)&&G4(e,a,r)),i}return s._value=t,s}function X4(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,Y4(e,t,r??""))}function K4(e){return function(){this.textContent=e}}function Q4(e){return function(){var t=e(this);this.textContent=t??""}}function Z4(e){return this.tween("text",typeof e=="function"?Q4(dm(this,"text",e)):K4(e==null?"":e+""))}function J4(e){return function(t){this.textContent=e.call(this,t)}}function tF(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&J4(n)),t}return i._value=e,i}function eF(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,tF(e))}function rF(){for(var e=this._name,t=this._id,r=c2(),i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,c=0;c<o;++c)if(l=a[c]){var u=bi(l,t);ph(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new cn(i,this._parents,e,r)}function iF(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--n===0&&s()}};r.each(function(){var c=zi(this,i),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),n===0&&s()})}var nF=0;function cn(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function c2(){return++nF}var Qi=Fl.prototype;cn.prototype={constructor:cn,select:F4,selectAll:$4,selectChild:Qi.selectChild,selectChildren:Qi.selectChildren,filter:B4,merge:R4,selection:z4,transition:rF,call:Qi.call,nodes:Qi.nodes,node:Qi.node,size:Qi.size,empty:Qi.empty,each:Qi.each,on:D4,attr:g4,attrTween:C4,style:V4,styleTween:X4,text:Z4,textTween:eF,remove:M4,tween:l4,delay:T4,duration:S4,ease:v4,easeVarying:I4,end:iF,[Symbol.iterator]:Qi[Symbol.iterator]};function sF(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var aF={time:null,delay:0,duration:250,ease:sF};function oF(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function lF(e){var t,r;e instanceof cn?(t=e._id,e=e._name):(t=c2(),(r=aF).time=um(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&ph(l,e,t,c,a,r||oF(l,t));return new cn(i,this._parents,e,t)}Fl.prototype.interrupt=s4;Fl.prototype.transition=lF;const Bp=Math.PI,Rp=2*Bp,es=1e-6,cF=Rp-es;function u2(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function uF(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return u2;const r=10**t;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class hF{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?u2:uF(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,s,a){this._append`C${+t},${+r},${+i},${+n},${this._x1=+s},${this._y1=+a}`}arcTo(t,r,i,n,s){if(t=+t,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=i-t,c=n-r,u=a-t,h=o-r,f=u*u+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>es)if(!(Math.abs(h*l-c*u)>es)||!s)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-a,p=n-o,g=l*l+c*c,b=d*d+p*p,m=Math.sqrt(g),_=Math.sqrt(f),k=s*Math.tan((Bp-Math.acos((g+f-b)/(2*m*_)))/2),T=k/_,E=k/m;Math.abs(T-1)>es&&this._append`L${t+T*u},${r+T*h}`,this._append`A${s},${s},0,0,${+(h*d>u*p)},${this._x1=t+E*l},${this._y1=r+E*c}`}}arc(t,r,i,n,s,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,u=r+l,h=1^a,f=a?n-s:s-n;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>es||Math.abs(this._y1-u)>es)&&this._append`L${c},${u}`,i&&(f<0&&(f=f%Rp+Rp),f>cF?this._append`A${i},${i},0,1,${h},${t-o},${r-l}A${i},${i},0,1,${h},${this._x1=c},${this._y1=u}`:f>es&&this._append`A${i},${i},0,${+(f>=Bp)},${h},${this._x1=t+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Xs(e){return function(){return e}}const ilt=Math.abs,nlt=Math.atan2,slt=Math.cos,alt=Math.max,olt=Math.min,llt=Math.sin,clt=Math.sqrt,s1=1e-12,fm=Math.PI,a1=fm/2,ult=2*fm;function hlt(e){return e>1?0:e<-1?fm:Math.acos(e)}function dlt(e){return e>=1?a1:e<=-1?-a1:Math.asin(e)}function dF(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new hF(t)}function fF(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function h2(e){this._context=e}h2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Qo(e){return new h2(e)}function pF(e){return e[0]}function gF(e){return e[1]}function mF(e,t){var r=Xs(!0),i=null,n=Qo,s=null,a=dF(o);e=typeof e=="function"?e:e===void 0?pF:Xs(e),t=typeof t=="function"?t:t===void 0?gF:Xs(t);function o(l){var c,u=(l=fF(l)).length,h,f=!1,d;for(i==null&&(s=n(d=a())),c=0;c<=u;++c)!(c<u&&r(h=l[c],c,l))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(h,c,l),+t(h,c,l));if(d)return s=null,d+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Xs(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Xs(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Xs(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(s=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=s=null:s=n(i=l),o):i},o}class d2{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function f2(e){return new d2(e,!0)}function p2(e){return new d2(e,!1)}function $n(){}function Au(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function gh(e){this._context=e}gh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Au(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Au(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Op(e){return new gh(e)}function g2(e){this._context=e}g2.prototype={areaStart:$n,areaEnd:$n,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Au(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bF(e){return new g2(e)}function m2(e){this._context=e}m2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Au(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yF(e){return new m2(e)}function b2(e,t){this._basis=new gh(e),this._beta=t}b2.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],s=e[r]-i,a=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*s),this._beta*t[o]+(1-this._beta)*(n+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const xF=(function e(t){function r(i){return t===1?new gh(i):new b2(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function vu(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function pm(e,t){this._context=e,this._k=(1-t)/6}pm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:vu(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:vu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const y2=(function e(t){function r(i){return new pm(i,t)}return r.tension=function(i){return e(+i)},r})(0);function gm(e,t){this._context=e,this._k=(1-t)/6}gm.prototype={areaStart:$n,areaEnd:$n,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:vu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const CF=(function e(t){function r(i){return new gm(i,t)}return r.tension=function(i){return e(+i)},r})(0);function mm(e,t){this._context=e,this._k=(1-t)/6}mm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vu(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _F=(function e(t){function r(i){return new mm(i,t)}return r.tension=function(i){return e(+i)},r})(0);function bm(e,t,r){var i=e._x1,n=e._y1,s=e._x2,a=e._y2;if(e._l01_a>s1){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>s1){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(i,n,s,a,e._x2,e._y2)}function x2(e,t){this._context=e,this._alpha=t}x2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:bm(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const C2=(function e(t){function r(i){return t?new x2(i,t):new pm(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function _2(e,t){this._context=e,this._alpha=t}_2.prototype={areaStart:$n,areaEnd:$n,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:bm(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const kF=(function e(t){function r(i){return t?new _2(i,t):new gm(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function k2(e,t){this._context=e,this._alpha=t}k2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bm(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const TF=(function e(t){function r(i){return t?new k2(i,t):new mm(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function T2(e){this._context=e}T2.prototype={areaStart:$n,areaEnd:$n,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function EF(e){return new T2(e)}function o1(e){return e<0?-1:1}function l1(e,t,r){var i=e._x1-e._x0,n=t-e._x1,s=(e._y1-e._y0)/(i||n<0&&-0),a=(r-e._y1)/(n||i<0&&-0),o=(s*n+a*i)/(i+n);return(o1(s)+o1(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function c1(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function zd(e,t,r){var i=e._x0,n=e._y0,s=e._x1,a=e._y1,o=(s-i)/3;e._context.bezierCurveTo(i+o,n+o*t,s-o,a-o*r,s,a)}function Lu(e){this._context=e}Lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:zd(this,this._t0,c1(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,zd(this,c1(this,r=l1(this,e,t)),r);break;default:zd(this,this._t0,r=l1(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function E2(e){this._context=new w2(e)}(E2.prototype=Object.create(Lu.prototype)).point=function(e,t){Lu.prototype.point.call(this,t,e)};function w2(e){this._context=e}w2.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,s){this._context.bezierCurveTo(t,e,i,r,s,n)}};function S2(e){return new Lu(e)}function A2(e){return new E2(e)}function v2(e){this._context=e}v2.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=u1(e),n=u1(t),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function u1(e){var t,r=e.length-1,i,n=new Array(r),s=new Array(r),a=new Array(r);for(n[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,s[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(n[r-1]=a[r-1]/s[r-1],t=r-2;t>=0;--t)n[t]=(a[t]-n[t+1])/s[t];for(s[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)s[t]=2*e[t+1]-n[t+1];return[n,s]}function L2(e){return new v2(e)}function mh(e,t){this._context=e,this._t=t}mh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function I2(e){return new mh(e,.5)}function B2(e){return new mh(e,0)}function R2(e){return new mh(e,1)}function Do(e,t,r){this.k=e,this.x=t,this.y=r}Do.prototype={constructor:Do,scale:function(e){return e===1?this:new Do(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Do(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Do.prototype;var wF=C(e=>{var n;const{securityLevel:t}=pe();let r=se("body");if(t==="sandbox"){const a=((n=se(`#i${e}`).node())==null?void 0:n.contentDocument)??document;r=se(a.body)}return r.select(`#${e}`)},"selectSvgElement"),SF=C(e=>{const{handDrawnSeed:t}=pe();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),AF=C(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Ga=C(e=>{const t=vF([...e.cssCompiledStyles||[],...e.cssStyles||[],...AF(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),vF=C(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),O2=C(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),$t=C(e=>{const{stylesArray:t}=Ga(e),r=[],i=[],n=[],s=[];return t.forEach(a=>{const o=a[0];O2(o)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),o.includes("stroke")&&n.push(a.join(":")+" !important"),o==="fill"&&s.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:s}},"styles2String"),Dt=C((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=pe(),{nodeBorder:n,mainBkg:s}=r,{stylesMap:a}=Ga(e);return Object.assign({roughness:.7,fill:a.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||n,seed:i,strokeWidth:((l=a.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:LF(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),LF=C(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const IF=Object.freeze({left:0,top:0,width:16,height:16}),Iu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N2=Object.freeze({...IF,...Iu}),BF=Object.freeze({...N2,body:"",hidden:!1}),RF=Object.freeze({width:null,height:null}),OF=Object.freeze({...RF,...Iu}),NF=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return Ud(c)?c:null}const s=n[0],a=s.split("-");if(a.length>1){const o={provider:i,prefix:a.shift(),name:a.join("-")};return Ud(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:s};return Ud(o,r)?o:null}return null},Ud=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function DF(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function h1(e,t){const r=DF(e,t);for(const i in BF)i in Iu?i in e&&!(i in r)&&(r[i]=Iu[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function PF(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(a){if(r[a])return n[a]=[];if(!(a in n)){n[a]=null;const o=i[a]&&i[a].parent,l=o&&s(o);l&&(n[a]=[o].concat(l))}return n[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(s),n}function d1(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let s={};function a(o){s=h1(i[o]||n[o],s)}return a(t),r.forEach(a),h1(e,s)}function MF(e,t){if(e.icons[t])return d1(e,t,[]);const r=PF(e,[t])[t];return r?d1(e,t,r):null}const FF=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$F=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function f1(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(FF);if(i===null||!i.length)return e;const n=[];let s=i.shift(),a=$F.test(s);for(;;){if(a){const o=parseFloat(s);isNaN(o)?n.push(s):n.push(Math.ceil(o*t*r)/r)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");a=!a}}function HF(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),s=e.indexOf("</"+t);if(n===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;r+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function zF(e,t){return e?"<defs>"+e+"</defs>"+t:t}function UF(e,t,r){const i=HF(e);return zF(i.defs,t+i.content+r)}const qF=e=>e==="unset"||e==="undefined"||e==="none";function WF(e,t){const r={...N2,...e},i={...OF,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,i].forEach(g=>{const b=[],m=g.hFlip,_=g.vFlip;let k=g.rotate;m?_?k+=2:(b.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),b.push("scale(-1 1)"),n.top=n.left=0):_&&(b.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),b.push("scale(1 -1)"),n.top=n.left=0);let T;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:T=n.height/2+n.top,b.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:b.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:T=n.width/2+n.left,b.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")")}k%2===1&&(n.left!==n.top&&(T=n.left,n.left=n.top,n.top=T),n.width!==n.height&&(T=n.width,n.width=n.height,n.height=T)),b.length&&(s=UF(s,'<g transform="'+b.join(" ")+'">',"</g>"))});const a=i.width,o=i.height,l=n.width,c=n.height;let u,h;a===null?(h=o===null?"1em":o==="auto"?c:o,u=f1(h,l/c)):(u=a==="auto"?l:a,h=o===null?f1(u,c/l):o==="auto"?c:o);const f={},d=(g,b)=>{qF(b)||(f[g]=b.toString())};d("width",u),d("height",h);const p=[n.left,n.top,l,c];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:s}}const jF=/\sid="(\S+)"/g,p1=new Map;function VF(e){e=e.replace(/[0-9]+$/,"")||"a";const t=p1.get(e)||0;return p1.set(e,t+1),t?`${e}${t}`:e}function GF(e){const t=[];let r;for(;r=jF.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const s=VF(n),a=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function YF(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var XF={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Np=new Map,D2=new Map,KF=C(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(nt.debug("Registering icon pack:",t.name),"loader"in t)D2.set(t.name,t.loader);else if("icons"in t)Np.set(t.name,t.icons);else throw nt.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),P2=C(async(e,t)=>{const r=NF(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=Np.get(i);if(!n){const a=D2.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await a(),prefix:i},Np.set(i,n)}catch(o){throw nt.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=MF(n,r.name);if(!s)throw new Error(`Icon not found: ${e}`);return s},"getRegisteredIconData"),QF=C(async e=>{try{return await P2(e),!0}catch{return!1}},"isIconAvailable"),Hl=C(async(e,t,r)=>{let i;try{i=await P2(e,t==null?void 0:t.fallbackPrefix)}catch(a){nt.error(a),i=XF}const n=WF(i,t),s=YF(GF(n.body),{...n.attributes,...r});return ti(s,Oe())},"getIconSVG"),fc={},Ge={},g1;function ZF(){return g1||(g1=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.BLANK_URL=Ge.relativeFirstCharacters=Ge.whitespaceEscapeCharsRegex=Ge.urlSchemeRegex=Ge.ctrlCharactersRegex=Ge.htmlCtrlEntityRegex=Ge.htmlEntitiesRegex=Ge.invalidProtocolRegex=void 0,Ge.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Ge.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Ge.htmlCtrlEntityRegex=/&(newline|tab);/gi,Ge.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Ge.urlSchemeRegex=/^.+(:|&colon;)/gim,Ge.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Ge.relativeFirstCharacters=[".","/"],Ge.BLANK_URL="about:blank"),Ge}var m1;function JF(){if(m1)return fc;m1=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.sanitizeUrl=s;var e=ZF();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var o=a.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function n(a){try{return decodeURIComponent(a)}catch{return a}}function s(a){if(!a)return e.BLANK_URL;var o,l=n(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var u=c.trimStart(),h=u.match(e.urlSchemeRegex);if(!h)return c;var f=h[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=u.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var p=new URL(d);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return d}return fc}var t8=JF();function qd(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function e8(){}function M2(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function ym(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const r8="[object RegExp]",F2="[object String]",$2="[object Number]",H2="[object Boolean]",z2="[object Arguments]",i8="[object Symbol]",n8="[object Date]",s8="[object Map]",a8="[object Set]",o8="[object Array]",l8="[object ArrayBuffer]",c8="[object Object]",u8="[object DataView]",h8="[object Uint8Array]",d8="[object Uint8ClampedArray]",f8="[object Uint16Array]",p8="[object Uint32Array]",g8="[object Int8Array]",m8="[object Int16Array]",b8="[object Int32Array]",y8="[object Float32Array]",x8="[object Float64Array]",b1=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function xm(e){return typeof b1.Buffer<"u"&&b1.Buffer.isBuffer(e)}function C8(e){return Number.isSafeInteger(e)&&e>=0}function U2(e){return e!=null&&typeof e!="function"&&C8(e.length)}function _8(e){return e==="__proto__"}function Cm(e){return e==null||typeof e!="object"&&typeof e!="function"}function _m(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function k8(e,t){return la(e,void 0,e,new Map,t)}function la(e,t,r,i=new Map,n=void 0){const s=n==null?void 0:n(e,t,r,i);if(s!==void 0)return s;if(Cm(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let o=0;o<e.length;o++)a[o]=la(e[o],o,r,i,n);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[o,l]of e)a.set(o,la(l,o,r,i,n));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const o of e)a.add(la(o,void 0,r,i,n));return a}if(xm(e))return e.subarray();if(_m(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let o=0;o<e.length;o++)a[o]=la(e[o],o,r,i,n);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),si(a,e,r,i,n),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),si(a,e,r,i,n),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),si(a,e,r,i,n),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,si(a,e,r,i,n),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),si(a,e,r,i,n),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),si(a,e,r,i,n),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),si(a,e,r,i,n),a}if(typeof e=="object"&&T8(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),si(a,e,r,i,n),a}return e}function si(e,t,r=e,i,n){const s=[...Object.keys(t),...M2(t)];for(let a=0;a<s.length;a++){const o=s[a],l=Object.getOwnPropertyDescriptor(e,o);(l==null||l.writable)&&(e[o]=la(t[o],o,r,i,n))}}function T8(e){switch(ym(e)){case z2:case o8:case l8:case u8:case H2:case n8:case y8:case x8:case g8:case m8:case b8:case s8:case $2:case c8:case r8:case a8:case F2:case i8:case h8:case d8:case f8:case p8:return!0;default:return!1}}function E8(e,t){return k8(e,(r,i,n,s)=>{if(typeof e=="object"){if(ym(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return s.set(e,a),si(a,e,n,s),a}switch(Object.prototype.toString.call(e)){case $2:case F2:case H2:{const a=new e.constructor(e==null?void 0:e.valueOf());return si(a,e),a}case z2:{const a={};return si(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function y1(e){return E8(e)}function Dp(e){return e!==null&&typeof e=="object"&&ym(e)==="[object Arguments]"}function Pp(e){return typeof e=="object"&&e!==null}function w8(e){return Pp(e)&&U2(e)}function Vc(e){return _m(e)}function S8(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function zl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);const a=e.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(zl.Cache||Map),r}zl.Cache=Map;function A8(e){if(Cm(e))return e;if(Array.isArray(e)||_m(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function v8(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let n=e;for(let s=0;s<r.length;s++){const a=r[s];n=Gc(n,a,i,new Map)}return n}function Gc(e,t,r,i){if(Cm(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return A8(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let s=0;s<t.length;s++)s in t||(t[s]=void 0)}const n=[...Object.keys(t),...M2(t)];for(let s=0;s<n.length;s++){const a=n[s];if(_8(a))continue;let o=t[a],l=e[a];if(Dp(o)&&(o={...o}),Dp(l)&&(l={...l}),xm(o)&&(o=y1(o)),Array.isArray(o))if(Array.isArray(l)){const u=[],h=Reflect.ownKeys(l);for(let f=0;f<h.length;f++){const d=h[f];u[d]=l[d]}l=u}else if(w8(l)){const u=[];for(let h=0;h<l.length;h++)u[h]=l[h];l=u}else l=[];const c=r(l,o,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(o)||Pp(l)&&Pp(o)&&(qd(l)||qd(o)||Vc(l)||Vc(o))?e[a]=Gc(l,o,r,i):l==null&&qd(o)?e[a]=Gc({},o,r,i):l==null&&Vc(o)?e[a]=y1(o):(l===void 0||o!==void 0)&&(e[a]=o)}return e}function L8(e,...t){return v8(e,...t,e8)}function x1(e){if(e==null)return!0;if(U2(e))return typeof e.splice!="function"&&typeof e!="string"&&!xm(e)&&!Vc(e)&&!Dp(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return S8(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var I8="​",B8={curveBasis:Op,curveBasisClosed:bF,curveBasisOpen:yF,curveBumpX:f2,curveBumpY:p2,curveBundle:xF,curveCardinalClosed:CF,curveCardinalOpen:_F,curveCardinal:y2,curveCatmullRomClosed:kF,curveCatmullRomOpen:TF,curveCatmullRom:C2,curveLinear:Qo,curveLinearClosed:EF,curveMonotoneX:S2,curveMonotoneY:A2,curveNatural:L2,curveStep:I2,curveStepAfter:R2,curveStepBefore:B2},R8=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,O8=C(function(e,t){const r=q2(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(o=>o.args);mu(a),i=er(i,[...a])}else i=r.args;if(!i)return;let n=tm(e,t);const s="config";return i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s]),i},"detectInit"),q2=C(function(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${R8.source})(?=[}][%]{2}).*
285
- `,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),nt.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let s;const a=[];for(;(s=Ko.exec(e))!==null;)if(s.index===Ko.lastIndex&&Ko.lastIndex++,s&&!t||t&&((r=s[1])!=null&&r.match(t))||t&&((i=s[2])!=null&&i.match(t))){const o=s[1]?s[1]:s[2],l=s[3]?s[3].trim():s[4]?JSON.parse(s[4].trim()):null;a.push({type:o,args:l})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(n){return nt.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),N8=C(function(e){return e.replace(Ko,"")},"removeDirectives"),D8=C(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function km(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return B8[r]??t}C(km,"interpolateToCurve");function W2(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?t8.sanitizeUrl(r):r}C(W2,"formatUrl");var P8=C((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s){nt.error(`Function name: ${e} not found in window`);return}s[n](...t)},"runFunc");function Tm(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}C(Tm,"distance");function j2(e){let t,r=0;e.forEach(n=>{r+=Tm(n,t),t=n});const i=r/2;return Em(e,i)}C(j2,"traverseEdge");function V2(e){return e.length===1?e[0]:j2(e)}C(V2,"calcLabelPosition");var C1=C((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Em=C((e,t)=>{let r,i=t;for(const n of e){if(r){const s=Tm(n,r);if(s===0)return r;if(s<i)i-=s;else{const a=i/s;if(a<=0)return r;if(a>=1)return{x:n.x,y:n.y};if(a>0&&a<1)return{x:C1((1-a)*r.x+a*n.x,5),y:C1((1-a)*r.y+a*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),M8=C((e,t,r)=>{nt.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Em(t,25),s=e?10:5,a=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(a)*s+(t[0].x+n.x)/2,o.y=-Math.cos(a)*s+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function G2(e,t,r){const i=structuredClone(r);nt.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,s=Em(i,n),a=10+e*.5,o=Math.atan2(i[0].y-s.y,i[0].x-s.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*a+(i[0].x+s.x)/2,l.y=-Math.cos(o+Math.PI)*a+(i[0].y+s.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(o-Math.PI)*a+(i[0].y+s.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*a+(i[0].x+s.x)/2-5,l.y=-Math.cos(o)*a+(i[0].y+s.y)/2-5):(l.x=Math.sin(o)*a+(i[0].x+s.x)/2,l.y=-Math.cos(o)*a+(i[0].y+s.y)/2),l}C(G2,"calcTerminalLabelPosition");function Y2(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}C(Y2,"getStylesFromArray");var _1=0,F8=C(()=>(_1++,"id-"+Math.random().toString(36).substr(2,12)+"-"+_1),"generateId");function X2(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}C(X2,"makeRandomHex");var $8=C(e=>X2(e.length),"random"),H8=C(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),z8=C(function(e,t){const r=t.text.replace(Ml.lineBreakRegex," "),[,i]=bh(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const s=n.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.attr("fill",t.fill),s.text(r),n},"drawSimpleText"),U8=zl((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ml.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let s="";return i.forEach((a,o)=>{const l=un(`${a} `,r),c=un(s,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=q8(a,t,"-",r);n.push(s,...f),s=d}else c+l>=t?(n.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===i.length&&n.push(s)}),n.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),q8=zl((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],s=[];let a="";return n.forEach((o,l)=>{const c=`${a}${o}`;if(un(c,i)>=t){const h=l+1,f=n.length===h,d=`${c}${r}`;s.push(f?c:d),a=""}else a=c}),{hyphenatedStrings:s,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function K2(e,t){return wm(e,t).height}C(K2,"calculateTextHeight");function un(e,t){return wm(e,t).width}C(un,"calculateTextWidth");var wm=zl((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,s]=bh(r),a=["sans-serif",i],o=e.split(Ml.lineBreakRegex),l=[],c=se("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const u=c.append("svg");for(const f of a){let d=0;const p={width:0,height:0,lineHeight:0};for(const g of o){const b=H8();b.text=g||I8;const m=z8(u,b).style("font-size",s).style("font-weight",n).style("font-family",f),_=(m._groups||m)[0][0].getBBox();if(_.width===0&&_.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,_.width)),d=Math.round(_.height),p.height+=d,p.lineHeight=Math.round(Math.max(p.lineHeight,d))}l.push(p)}u.remove();const h=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[h]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ia,W8=(Ia=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},C(Ia,"InitIDGenerator"),Ia),pc,j8=C(function(e){return pc=pc||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),pc.innerHTML=e,unescape(pc.textContent)},"entityDecode");function Sm(e){return"str"in e}C(Sm,"isDetailedError");var V8=C((e,t,r,i)=>{var s;if(!i)return;const n=(s=e.node())==null?void 0:s.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),bh=C(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Am(e,t){return L8({},e,t)}C(Am,"cleanAndMerge");var mr={assignWithDepth:er,wrapLabel:U8,calculateTextHeight:K2,calculateTextWidth:un,calculateTextDimensions:wm,cleanAndMerge:Am,detectInit:O8,detectDirective:q2,isSubstringInArray:D8,interpolateToCurve:km,calcLabelPosition:V2,calcCardinalityPosition:M8,calcTerminalLabelPosition:G2,formatUrl:W2,getStylesFromArray:Y2,generateId:F8,random:$8,runFunc:P8,entityDecode:j8,insertTitle:V8,isLabelCoordinateInPath:Q2,parseFontSize:bh,InitIDGenerator:W8},G8=C(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Hn=C(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),flt=C((e,t,{counter:r=0,prefix:i,suffix:n},s)=>s||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function je(e){return e??null}C(je,"handleUndefinedAttr");function Q2(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,s=>Math.round(parseFloat(s)).toString());return n.includes(r.toString())||n.includes(i.toString())}C(Q2,"isLabelCoordinateInPath");var Yc={exports:{}},k1=Yc.exports,T1;function Y8(){return T1||(T1=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(u){return setTimeout(u,16)};function n(){var u=this;u.reads=[],u.writes=[],u.raf=i.bind(t)}n.prototype={constructor:n,runTasks:function(u){for(var h;h=u.shift();)h()},measure:function(u,h){var f=h?u.bind(h):u;return this.reads.push(f),s(this),f},mutate:function(u,h){var f=h?u.bind(h):u;return this.writes.push(f),s(this),f},clear:function(u){return o(this.reads,u)||o(this.writes,u)},extend:function(u){if(typeof u!="object")throw new Error("expected object");var h=Object.create(this);return l(h,u),h.fastdom=this,h.initialize&&h.initialize(),h},catch:null};function s(u){u.scheduled||(u.scheduled=!0,u.raf(a.bind(null,u)))}function a(u){var h=u.writes,f=u.reads,d;try{r("flushing reads",f.length),u.runTasks(f),r("flushing writes",h.length),u.runTasks(h)}catch(p){d=p}if(u.scheduled=!1,(f.length||h.length)&&s(u),d)if(r("task errored",d.message),u.catch)u.catch(d);else throw d}function o(u,h){var f=u.indexOf(h);return!!~f&&!!u.splice(f,1)}function l(u,h){for(var f in h)h.hasOwnProperty(f)&&(u[f]=h[f])}var c=t.fastdom=t.fastdom||new n;e.exports=c})(typeof window<"u"?window:typeof k1<"u"?k1:globalThis)})(Yc)),Yc.exports}var X8=Y8();const K8=Il(X8);var Wd={exports:{}},E1;function Q8(){return E1||(E1=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,n){return r(this,"mutate",i,n)},measure:function(i,n){return r(this,"measure",i,n)},clear:function(i){var n=this._tasks,s=n.get(i);this.fastdom.clear(s),n.delete(i)}};function r(i,n,s,a){var o=i._tasks,l=i.fastdom,c,u=new Promise(function(h,f){c=l[n](function(){o.delete(u);try{h(a?s.call(a):s())}catch(d){f(d)}},a)});return o.set(u,c),u}e.exports=t})()})(Wd)),Wd.exports}var Z8=Q8();const J8=Il(Z8);function vm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Os=vm();function Z2(e){Os=e}var Zo={exec:()=>null};function ke(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Sr.caret,"$1"),r=r.replace(n,a),i},getRegex:()=>new RegExp(r,t)};return i}var t$=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Sr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},e$=/^(?:[ \t]*(?:\n|$))+/,r$=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,i$=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ul=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,n$=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Lm=/(?:[*+-]|\d{1,9}[.)])/,J2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tE=ke(J2).replace(/bull/g,Lm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),s$=ke(J2).replace(/bull/g,Lm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Im=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,a$=/^[^\n]+/,Bm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,o$=ke(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Bm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),l$=ke(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Lm).getRegex(),yh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Rm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,c$=ke("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Rm).replace("tag",yh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),eE=ke(Im).replace("hr",Ul).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yh).getRegex(),u$=ke(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",eE).getRegex(),Om={blockquote:u$,code:r$,def:o$,fences:i$,heading:n$,hr:Ul,html:c$,lheading:tE,list:l$,newline:e$,paragraph:eE,table:Zo,text:a$},w1=ke("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ul).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yh).getRegex(),h$={...Om,lheading:s$,table:w1,paragraph:ke(Im).replace("hr",Ul).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",w1).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yh).getRegex()},d$={...Om,html:ke(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Rm).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Zo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ke(Im).replace("hr",Ul).replace("heading",` *#{1,6} *[^
286
- ]`).replace("lheading",tE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},f$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,p$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rE=/^( {2,}|\\)\n(?!\s*$)/,g$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xh=/[\p{P}\p{S}]/u,Nm=/[\s\p{P}\p{S}]/u,iE=/[^\s\p{P}\p{S}]/u,m$=ke(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nm).getRegex(),nE=/(?!~)[\p{P}\p{S}]/u,b$=/(?!~)[\s\p{P}\p{S}]/u,y$=/(?:[^\s\p{P}\p{S}]|~)/u,x$=ke(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",t$?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),sE=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,C$=ke(sE,"u").replace(/punct/g,xh).getRegex(),_$=ke(sE,"u").replace(/punct/g,nE).getRegex(),aE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",k$=ke(aE,"gu").replace(/notPunctSpace/g,iE).replace(/punctSpace/g,Nm).replace(/punct/g,xh).getRegex(),T$=ke(aE,"gu").replace(/notPunctSpace/g,y$).replace(/punctSpace/g,b$).replace(/punct/g,nE).getRegex(),E$=ke("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,iE).replace(/punctSpace/g,Nm).replace(/punct/g,xh).getRegex(),w$=ke(/\\(punct)/,"gu").replace(/punct/g,xh).getRegex(),S$=ke(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),A$=ke(Rm).replace("(?:-->|$)","-->").getRegex(),v$=ke("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",A$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bu=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,L$=ke(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Bu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),oE=ke(/^!?\[(label)\]\[(ref)\]/).replace("label",Bu).replace("ref",Bm).getRegex(),lE=ke(/^!?\[(ref)\](?:\[\])?/).replace("ref",Bm).getRegex(),I$=ke("reflink|nolink(?!\\()","g").replace("reflink",oE).replace("nolink",lE).getRegex(),S1=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Dm={_backpedal:Zo,anyPunctuation:w$,autolink:S$,blockSkip:x$,br:rE,code:p$,del:Zo,emStrongLDelim:C$,emStrongRDelimAst:k$,emStrongRDelimUnd:E$,escape:f$,link:L$,nolink:lE,punctuation:m$,reflink:oE,reflinkSearch:I$,tag:v$,text:g$,url:Zo},B$={...Dm,link:ke(/^!?\[(label)\]\((.*?)\)/).replace("label",Bu).getRegex(),reflink:ke(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bu).getRegex()},Mp={...Dm,emStrongRDelimAst:T$,emStrongLDelim:_$,url:ke(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",S1).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ke(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",S1).getRegex()},R$={...Mp,br:ke(rE).replace("{2,}","*").getRegex(),text:ke(Mp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gc={normal:Om,gfm:h$,pedantic:d$},go={normal:Dm,gfm:Mp,breaks:R$,pedantic:B$},O$={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},A1=e=>O$[e];function Si(e,t){if(t){if(Sr.escapeTest.test(e))return e.replace(Sr.escapeReplace,A1)}else if(Sr.escapeTestNoEncode.test(e))return e.replace(Sr.escapeReplaceNoEncode,A1);return e}function v1(e){try{e=encodeURI(e).replace(Sr.percentDecode,"%")}catch{return null}return e}function L1(e,t){var s;let r=e.replace(Sr.findPipe,(a,o,l)=>{let c=!1,u=o;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Sr.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Sr.slashPipe,"|");return i}function mo(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function N$(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function I1(e,t,r,i,n){let s=t.href,a=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function D$(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
287
- `).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=n.length?s.slice(n.length):s}).join(`
288
- `)}var Ru=class{constructor(t){Z(this,"options");Z(this,"rules");Z(this,"lexer");this.options=t||Os}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:mo(i,`
289
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=D$(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=mo(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:mo(r[0],`
290
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=mo(r[0],`
291
- `).split(`
292
- `),n="",s="",a=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let u=l.join(`
293
- `),h=u.replace(this.rules.other.blockquoteSetextReplace,`
294
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
295
- ${u}`:u,s=s?`${s}
296
- ${h}`:h;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=f,i.length===0)break;let d=a.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let p=d,g=p.raw+`
297
- `+i.join(`
298
- `),b=this.blockquote(g);a[a.length-1]=b,n=n.substring(0,n.length-p.raw.length)+b.raw,s=s.substring(0,s.length-p.text.length)+b.text;break}else if((d==null?void 0:d.type)==="list"){let p=d,g=p.raw+`
299
- `+i.join(`
300
- `),b=this.list(g);a[a.length-1]=b,n=n.substring(0,n.length-d.raw.length)+b.raw,s=s.substring(0,s.length-p.raw.length)+b.raw,i=g.substring(a.at(-1).raw.length).split(`
301
- `);continue}}return{type:"blockquote",raw:n,tokens:a,text:s}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,s={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let a=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,u="",h="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;u=r[0],t=t.substring(u.length);let f=r[2].split(`
302
- `,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),d=t.split(`
303
- `,1)[0],p=!f.trim(),g=0;if(this.options.pedantic?(g=2,h=f.trimStart()):p?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,h=f.slice(g),g+=r[1].length),p&&this.rules.other.blankLine.test(d)&&(u+=d+`
304
- `,t=t.substring(d.length+1),c=!0),!c){let _=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),T=this.rules.other.fencesBeginRegex(g),E=this.rules.other.headingBeginRegex(g),S=this.rules.other.htmlBeginRegex(g);for(;t;){let B=t.split(`
305
- `,1)[0],L;if(d=B,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),L=d):L=d.replace(this.rules.other.tabCharGlobal," "),T.test(d)||E.test(d)||S.test(d)||_.test(d)||k.test(d))break;if(L.search(this.rules.other.nonSpaceChar)>=g||!d.trim())h+=`
306
- `+L.slice(g);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||E.test(f)||k.test(f))break;h+=`
307
- `+d}!p&&!d.trim()&&(p=!0),u+=B+`
308
- `,t=t.substring(B.length+1),f=L.slice(g)}}s.loose||(o?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let b=null,m;this.options.gfm&&(b=this.rules.other.listIsTask.exec(h),b&&(m=b[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:u,task:!!b,checked:m,loose:!1,text:h,tokens:[]}),s.raw+=u}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let u=s.items[c].tokens.filter(f=>f.type==="space"),h=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=h}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:s}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=L1(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
309
- `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let l of n)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<i.length;l++)a.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:a.align[l]});for(let l of s)a.rows.push(L1(l,a.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[u]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
310
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=mo(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=N$(r[2],"()");if(a===-2)return;if(a>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],s=a[3])}else s=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),I1(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[n.toLowerCase()];if(!s){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return I1(i,s,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let s=[...n[0]].length-1,a,o,l=s,c=0,u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*t.length+s);(n=u.exec(r))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(o=[...a].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&s%3&&!((s+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let h=[...n[0]][0].length,f=t.slice(0,s+n.index+h+o);if(Math.min(s,o)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),s=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&s&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let n,s;if(r[2]==="@")n=r[0],s="mailto:"+n;else{let a;do a=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(a!==r[0]);n=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ai=class Fp{constructor(t){Z(this,"tokens");Z(this,"options");Z(this,"state");Z(this,"tokenizer");Z(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Os,this.options.tokenizer=this.options.tokenizer||new Ru,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Sr,block:gc.normal,inline:go.normal};this.options.pedantic?(r.block=gc.pedantic,r.inline=go.pedantic):this.options.gfm&&(r.block=gc.gfm,this.options.breaks?r.inline=go.breaks:r.inline=go.gfm),this.tokenizer.rules=r}static get rules(){return{block:gc,inline:go}}static lex(t,r){return new Fp(r).lex(t)}static lexInline(t,r){return new Fp(r).inlineTokens(t)}lex(t){t=t.replace(Sr.carriageReturn,`
311
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var n,s,a;for(this.options.pedantic&&(t=t.replace(Sr.tabCharGlobal," ").replace(Sr.spaceLine,""));t;){let o;if((s=(n=this.options.extensions)==null?void 0:n.block)!=null&&s.some(c=>(o=c.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
312
- `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
313
- `)?"":`
314
- `)+o.raw,c.text+=`
315
- `+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
316
- `)?"":`
317
- `)+o.raw,c.text+=`
318
- `+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,u=t.slice(1),h;this.options.extensions.startBlock.forEach(f=>{h=f.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
319
- `)?"":`
320
- `)+o.raw,c.text+=`
321
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),i=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
322
- `)?"":`
323
- `)+o.raw,c.text+=`
324
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,u,h,f;let i=t,n=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)s=n[2]?n[2].length:0,i=i.slice(0,n.index+s)+"["+"a".repeat(n[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let a=!1,o="";for(;t;){a||(o=""),a=!1;let d;if((h=(u=this.options.extensions)==null?void 0:u.inline)!=null&&h.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,o)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let p=t;if((f=this.options.extensions)!=null&&f.startInline){let g=1/0,b=t.slice(1),m;this.options.extensions.startInline.forEach(_=>{m=_.call({lexer:this},b),typeof m=="number"&&m>=0&&(g=Math.min(g,m))}),g<1/0&&g>=0&&(p=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(p)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(o=d.raw.slice(-1)),a=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ou=class{constructor(t){Z(this,"options");Z(this,"parser");this.options=t||Os}space(t){return""}code({text:t,lang:r,escaped:i}){var a;let n=(a=(r||"").match(Sr.notSpaceStart))==null?void 0:a[0],s=t.replace(Sr.endingNewline,"")+`
325
- `;return n?'<pre><code class="language-'+Si(n)+'">'+(i?s:Si(s,!0))+`</code></pre>
326
- `:"<pre><code>"+(i?s:Si(s,!0))+`</code></pre>
327
- `}blockquote({tokens:t}){return`<blockquote>
328
- ${this.parser.parse(t)}</blockquote>
329
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
330
- `}hr(t){return`<hr>
331
- `}list(t){let r=t.ordered,i=t.start,n="";for(let o=0;o<t.items.length;o++){let l=t.items[o];n+=this.listitem(l)}let s=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+s+a+`>
332
- `+n+"</"+s+`>
333
- `}listitem(t){var i;let r="";if(t.task){let n=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=n+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=n+" "+Si(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
334
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
335
- `}table(t){let r="",i="";for(let s=0;s<t.header.length;s++)i+=this.tablecell(t.header[s]);r+=this.tablerow({text:i});let n="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];i="";for(let o=0;o<a.length;o++)i+=this.tablecell(a[o]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
336
- <thead>
337
- `+r+`</thead>
338
- `+n+`</table>
339
- `}tablerow({text:t}){return`<tr>
340
- ${t}</tr>
341
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
342
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Si(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),s=v1(t);if(s===null)return n;t=s;let a='<a href="'+t+'"';return r&&(a+=' title="'+Si(r)+'"'),a+=">"+n+"</a>",a}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let s=v1(t);if(s===null)return Si(i);t=s;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Si(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Si(t.text)}},Pm=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},oi=class $p{constructor(t){Z(this,"options");Z(this,"renderer");Z(this,"textRenderer");this.options=t||Os,this.options.renderer=this.options.renderer||new Ou,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Pm}static parse(t,r){return new $p(r).parse(t)}static parseInline(t,r){return new $p(r).parseInline(t)}parse(t,r=!0){var n,s;let i="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[o.type]){let c=o,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=u||"";continue}}let l=o;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;a+1<t.length&&t[a+1].type==="text";)c=t[++a],u+=`
343
- `+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):i+=u;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var n,s;let i="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=c||"";continue}}let l=o;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Nc,Po=(Nc=class{constructor(t){Z(this,"options");Z(this,"block");this.options=t||Os}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ai.lex:ai.lexInline}provideParser(){return this.block?oi.parse:oi.parseInline}},Z(Nc,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Z(Nc,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Nc),P$=class{constructor(...t){Z(this,"defaults",vm());Z(this,"options",this.setOptions);Z(this,"parse",this.parseMarkdown(!0));Z(this,"parseInline",this.parseMarkdown(!1));Z(this,"Parser",oi);Z(this,"Renderer",Ou);Z(this,"TextRenderer",Pm);Z(this,"Lexer",ai);Z(this,"Tokenizer",Ru);Z(this,"Hooks",Po);this.use(...t)}walkTokens(t,r){var n,s;let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let o=a;for(let l of o.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let o=a;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=a;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=a.apply(this,o)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),n.extensions=r),i.renderer){let s=this.defaults.renderer||new Ou(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,l=i.renderer[o],c=s[o];s[o]=(...u)=>{let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h||""}}n.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Ru(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,l=i.tokenizer[o],c=s[o];s[o]=(...u)=>{let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h}}n.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Po;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,l=i.hooks[o],c=s[o];Po.passThroughHooks.has(a)?s[o]=u=>{if(this.defaults.async&&Po.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(s,u);return c.call(s,f)})();let h=l.call(s,u);return c.call(s,h)}:s[o]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(s,u);return f===!1&&(f=await c.apply(s,u)),f})();let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h}}n.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(a.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ai.lex(t,r??this.defaults)}parser(t,r){return oi.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},s={...this.defaults,...n},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer():t?ai.lex:ai.lexInline)(o,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let u=await(s.hooks?await s.hooks.provideParser():t?oi.parse:oi.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(u):u})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let o=(s.hooks?s.hooks.provideLexer():t?ai.lex:ai.lexInline)(r,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let l=(s.hooks?s.hooks.provideParser():t?oi.parse:oi.parseInline)(o,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(o){return a(o)}}}onError(t,r){return i=>{if(i.message+=`
344
- Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+Si(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},Es=new P$;function Te(e,t){return Es.parse(e,t)}Te.options=Te.setOptions=function(e){return Es.setOptions(e),Te.defaults=Es.defaults,Z2(Te.defaults),Te};Te.getDefaults=vm;Te.defaults=Os;Te.use=function(...e){return Es.use(...e),Te.defaults=Es.defaults,Z2(Te.defaults),Te};Te.walkTokens=function(e,t){return Es.walkTokens(e,t)};Te.parseInline=Es.parseInline;Te.Parser=oi;Te.parser=oi.parse;Te.Renderer=Ou;Te.TextRenderer=Pm;Te.Lexer=ai;Te.lexer=ai.lex;Te.Tokenizer=Ru;Te.Hooks=Po;Te.parse=Te;Te.options;Te.setOptions;Te.use;Te.walkTokens;Te.parseInline;oi.parse;ai.lex;function cE(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(u){var h,f;return(f=(h=u.match(/[\t ]/g))===null||h===void 0?void 0:h.length)!==null&&f!==void 0?f:0})):o},[]);if(n.length){var s=new RegExp(`
345
- [ ]{`.concat(Math.min.apply(Math,n),"}"),"g");i=i.map(function(o){return o.replace(s,`
346
- `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(o,l){var c=a.match(/(?:^|\n)( *)$/),u=c?c[1]:"",h=o;typeof o=="string"&&o.includes(`
347
- `)&&(h=String(o).split(`
348
- `).map(function(f,d){return d===0?f:"".concat(u).concat(f)}).join(`
349
- `)),a+=h+i[l+1]}),a}var Hp=typeof performance<"u"&&typeof performance.now=="function",Ks=C(()=>Hp?performance.now():0,"now"),jd="🧜 ",M$="Mermaid render",F$="Mermaid",$$={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Ba;Ba=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=Ks();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Ks()-i)}}async tick(t,r){if(!this.enabled)return r();const i=Ks();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Ks()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:Ks(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Hp&&typeof performance.mark=="function")try{performance.mark(`${jd}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=Ks();if(t.duration=r-t.start,Hp&&typeof performance.measure=="function")try{performance.measure(`${jd}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:M$,trackGroup:F$,color:$$[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,n=r&&r!==t.name?`${t.name} [${r}]`:t.name,s=["ms % phase"],a=C((l,c)=>{const u=" ".repeat(c),h=l.duration.toFixed(1).padStart(8),f=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";s.push(`${h} ${f} ${u}${l.name}`);for(const d of l.children)a(d,c+1);if(l.children.length>0){const d=l.children.reduce((g,b)=>g+b.duration,0),p=l.duration-d;if(p>.5){const g=p.toFixed(1).padStart(8);s.push(`${g} ${u} (self)`)}}},"walk");a(t,0);const o=Object.keys(this.buckets);if(o.length>0){s.push("—— buckets (summed) ——");for(const l of o)s.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${jd}mermaid render profile · ${n}
350
- ${s.join(`
351
- `)}`)}},C(Ba,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});var H$=K8.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(J8),ws=H$;function uE(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
352
- `).replace(/\n{2,}/g,`
353
- `);return cE(i)}C(uE,"preprocessMarkdown");function hE(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}C(hE,"nonMarkdownToLines");function dE(e,t={}){const r=uE(e,t),i=Te.lexer(r),n=[[]];let s=0;function a(o,l="normal"){o.type==="text"?o.text.split(`
354
- `).forEach((u,h)=>{h!==0&&(s++,n.push([])),u.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&n[s].push({content:f,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{a(c,o.type)}):o.type==="html"&&n[s].push({content:o.text,type:"normal"})}return C(a,"processNode"),i.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(c=>{a(c)}):o.type==="html"?n[s].push({content:o.text,type:"normal"}):n[s].push({content:o.raw,type:"normal"})}),n}C(dE,"markdownToLines");function fE(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}C(fE,"nonMarkdownToHTML");function pE(e,{markdownAutoWrap:t}={}){const r=Te.lexer(e);function i(n){var s,a,o;return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${(s=n.tokens)==null?void 0:s.map(i).join("")}</strong>`:n.type==="em"?`<em>${(a=n.tokens)==null?void 0:a.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${(o=n.tokens)==null?void 0:o.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(nt.warn(`Unsupported markdown: ${n.type}`),n.raw)}return C(i,"output"),r.map(i).join("")}C(pE,"markdownToHTML");function gE(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}C(gE,"splitTextToChars");function mE(e,t){const r=gE(t.content);return Mm(e,[],r,t.type)}C(mE,"splitWordToFitWidth");function Mm(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...s]=r,a=[...t,n];return e([{content:a.join(""),type:i}])?Mm(e,a,s,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}C(Mm,"splitWordToFitWidthRecursion");function bE(e,t){if(e.some(({content:r})=>r.includes(`
355
- `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Nu(e,t)}C(bE,"splitLineToFitWidth");function Nu(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const s=e.shift()??{content:" ",type:"normal"},a=[...i];if(n!==""&&a.push({content:n,type:"normal"}),a.push(s),t(a))return Nu(e,t,r,a);if(i.length>0)r.push(i),e.unshift(s);else if(s.content){const[o,l]=mE(t,s);r.push([o]),l.content&&e.unshift(l)}return Nu(e,t,r)}C(Nu,"splitLineToFitWidthRecursion");function zp(e,t){t&&e.attr("style",t)}C(zp,"applyStyle");var B1=16384;async function yE(e,t,r,i,n=!1,s=Oe()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,B1)}px`),a.attr("height",`${Math.min(10*r,B1)}px`);const o=a.append("xhtml:div"),l=ml(t.label)?await DT(t.label.replace(Ml.lineBreakRegex,`
356
- `),s):ti(t.label,s),c=t.isNode?"nodeLabel":"edgeLabel",u=o.append("span");return u.html(l),zp(u,t.labelStyle),u.attr("class",`${c} ${i}`),zp(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg"),(await ws.measure(()=>o.node().getBoundingClientRect())).width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px")),a.node()}C(yE,"addHtmlSpan");function Ch(e,t,r,i=!1){const n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}C(Ch,"createTspan");function xE(e,t,r){const i=e.append("text"),n=Ch(i,1,t);_h(n,r);const s=n.node().getComputedTextLength();return i.remove(),s}C(xE,"computeWidthOfText");function z$(e,t,r){var a;const i=e.append("text"),n=Ch(i,1,t);_h(n,[{content:r,type:"normal"}]);const s=(a=n.node())==null?void 0:a.getBoundingClientRect();return s&&i.remove(),s}C(z$,"computeDimensionOfText");function CE(e,t,r,i=!1,n=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");n&&l.attr("text-anchor","middle");let c=0;for(const u of r){const h=C(d=>xE(a,1.1,d)<=e,"checkWidth"),f=h(u)?[u]:bE(u,h);for(const d of f){const p=Ch(l,c,1.1,n);_h(p,d),c++}}if(i){const u=l.node().getBBox(),h=2;return o.attr("x",u.x-h).attr("y",u.y-h).attr("width",u.width+2*h).attr("height",u.height+2*h),a.node()}else return l.node()}C(CE,"createFormattedText");function Up(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}C(Up,"decodeHTMLEntities");function _h(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(Up(r.content)):n.text(" "+Up(r.content))})}C(_h,"updateTextContentAndStyles");async function _E(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,s,a)=>(r.push((async()=>{const o=`${s}:${a}`;return await QF(o)?await Hl(o,void 0,{class:"label-icon"}):`<i class='${ti(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}C(_E,"replaceIconSubstring");var yi=C(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:s=!0,markdown:a=!0,isNode:o=!0,width:l=200,addSvgBackground:c=!1}={},u)=>{if(nt.debug("XYZ createText",t,r,i,n,s,o,"addSvgBackground: ",c),s){const h=a?pE(t,u):fE(t),f=await _E(Hn(h),u),d=t.replace(/\\\\/g,"\\"),p={isNode:o,label:ml(t)?d:f,labelStyle:r.replace("fill:","color:")};return await yE(e,p,l,n,c,u)}else{const h=Hn(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?dE(h.replace("<br>","<br/>"),u):hE(h),d=CE(l,e,f,t?c:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");se(d).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");se(d).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");se(d).select("text").attr("style",g)}return i?se(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):se(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Vd(e,t,r){if(e&&e.length){const[i,n]=t,s=Math.PI/180*r,a=Math.cos(s),o=Math.sin(s);for(const l of e){const[c,u]=l;l[0]=(c-i)*a-(u-n)*o+i,l[1]=(c-i)*o+(u-n)*a+n}}}function U$(e,t){return e[0]===t[0]&&e[1]===t[1]}function q$(e,t,r,i=1){const n=r,s=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of a)Vd(c,o,n);const l=(function(c,u,h){const f=[];for(const _ of c){const k=[..._];U$(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const d=[];u=Math.max(u,.1);const p=[];for(const _ of f)for(let k=0;k<_.length-1;k++){const T=_[k],E=_[k+1];if(T[1]!==E[1]){const S=Math.min(T[1],E[1]);p.push({ymin:S,ymax:Math.max(T[1],E[1]),x:S===T[1]?T[0]:E[0],islope:(E[0]-T[0])/(E[1]-T[1])})}}if(p.sort(((_,k)=>_.ymin<k.ymin?-1:_.ymin>k.ymin?1:_.x<k.x?-1:_.x>k.x?1:_.ymax===k.ymax?0:(_.ymax-k.ymax)/Math.abs(_.ymax-k.ymax))),!p.length)return d;let g=[],b=p[0].ymin,m=0;for(;g.length||p.length;){if(p.length){let _=-1;for(let k=0;k<p.length&&!(p[k].ymin>b);k++)_=k;p.splice(0,_+1).forEach((k=>{g.push({s:b,edge:k})}))}if(g=g.filter((_=>!(_.edge.ymax<=b))),g.sort(((_,k)=>_.edge.x===k.edge.x?0:(_.edge.x-k.edge.x)/Math.abs(_.edge.x-k.edge.x))),(h!==1||m%u==0)&&g.length>1)for(let _=0;_<g.length;_+=2){const k=_+1;if(k>=g.length)break;const T=g[_].edge,E=g[k].edge;d.push([[Math.round(T.x),b],[Math.round(E.x),b]])}b+=h,g.forEach((_=>{_.edge.x=_.edge.x+h*_.edge.islope})),m++}return d})(a,s,i);if(n){for(const c of a)Vd(c,o,-n);(function(c,u,h){const f=[];c.forEach((d=>f.push(...d))),Vd(f,u,h)})(l,o,-n)}return l}function ql(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let s=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(s=n),q$(e,n,i,s||1)}let Fm=class{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ql(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}};function kh(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}let W$=class extends Fm{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=ql(t,Object.assign({},r,{hachureGap:i})),s=Math.PI/180*r.hachureAngle,a=[],o=.5*i*Math.cos(s),l=.5*i*Math.sin(s);for(const[c,u]of n)kh([c,u])&&a.push([[c[0]-o,c[1]+l],[...u]],[[c[0]+o,c[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}};class j$ extends Fm{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),s=this._fillPolygons(t,n);return i.ops=i.ops.concat(s.ops),i}}class V${constructor(t){this.helper=t}fillPolygons(t,r){const i=ql(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);const a=n/4;for(const o of t){const l=kh(o),c=l/n,u=Math.ceil(c)-1,h=l-u*n,f=(o[0][0]+o[1][0])/2-n/4,d=Math.min(o[0][1],o[1][1]);for(let p=0;p<u;p++){const g=d+h+p*n,b=f-a+2*Math.random()*a,m=g-a+2*Math.random()*a,_=this.helper.ellipse(b,m,s,s,r);i.push(..._.ops)}}return{type:"fillSketch",ops:i}}}let G$=class{constructor(t){this.helper=t}fillPolygons(t,r){const i=ql(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,s=[];return t.forEach((a=>{const o=kh(a),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);const f=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let d=0;d<l;d++){const p=d*(i+n),g=p+i,b=[u[0]+p*Math.cos(f)+c*Math.cos(f),u[1]+p*Math.sin(f)+c*Math.sin(f)],m=[u[0]+g*Math.cos(f)+c*Math.cos(f),u[1]+g*Math.sin(f)+c*Math.sin(f)];s.push(...this.helper.doubleLineOps(b[0],b[1],m[0],m[1],r))}})),s}};class Y${constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,s=ql(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(s,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((s=>{const a=kh(s),o=Math.round(a/(2*r));let l=s[0],c=s[1];l[0]>c[0]&&(l=s[1],c=s[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let h=0;h<o;h++){const f=2*h*r,d=2*(h+1)*r,p=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+f*Math.cos(u),l[1]+f*Math.sin(u)],b=[l[0]+d*Math.cos(u),l[1]+d*Math.sin(u)],m=[g[0]+p*Math.cos(u+Math.PI/4),g[1]+p*Math.sin(u+Math.PI/4)];n.push(...this.helper.doubleLineOps(g[0],g[1],m[0],m[1],i),...this.helper.doubleLineOps(m[0],m[1],b[0],b[1],i))}})),n}}const Rr={};let X$=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};const K$=0,Gd=1,R1=2,mc={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Yd(e,t){return e.type===t}function $m(e){const t=[],r=(function(a){const o=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:K$,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Gd,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return o[o.length]={type:R1,text:""},o})(e);let i="BOD",n=0,s=r[n];for(;!Yd(s,R1);){let a=0;const o=[];if(i==="BOD"){if(s.text!=="M"&&s.text!=="m")return $m("M0,0"+e);n++,a=mc[s.text],i=s.text}else Yd(s,Gd)?a=mc[i]:(n++,a=mc[s.text],i=s.text);if(!(n+a<r.length))throw new Error("Path data ended short");for(let l=n;l<n+a;l++){const c=r[l];if(!Yd(c,Gd))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof mc[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),n+=a,s=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function kE(e){let t=0,r=0,i=0,n=0;const s=[];for(const{key:a,data:o}of e)switch(a){case"M":s.push({key:"M",data:[...o]}),[t,r]=o,[i,n]=o;break;case"m":t+=o[0],r+=o[1],s.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":s.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],s.push({key:"L",data:[t,r]});break;case"C":s.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,u)=>u%2?c+r:c+t));s.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":s.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,u)=>u%2?c+r:c+t));s.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":s.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],s.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":s.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],s.push({key:"H",data:[t]});break;case"V":s.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],s.push({key:"V",data:[r]});break;case"S":s.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,u)=>u%2?c+r:c+t));s.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":s.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],s.push({key:"T",data:[t,r]});break;case"Z":case"z":s.push({key:"Z",data:[]}),t=i,r=n}return s}function TE(e){const t=[];let r="",i=0,n=0,s=0,a=0,o=0,l=0;for(const{key:c,data:u}of e){switch(c){case"M":t.push({key:"M",data:[...u]}),[i,n]=u,[s,a]=u;break;case"C":t.push({key:"C",data:[...u]}),i=u[4],n=u[5],o=u[2],l=u[3];break;case"L":t.push({key:"L",data:[...u]}),[i,n]=u;break;case"H":i=u[0],t.push({key:"L",data:[i,n]});break;case"V":n=u[0],t.push({key:"L",data:[i,n]});break;case"S":{let h=0,f=0;r==="C"||r==="S"?(h=i+(i-o),f=n+(n-l)):(h=i,f=n),t.push({key:"C",data:[h,f,...u]}),o=u[0],l=u[1],i=u[2],n=u[3];break}case"T":{const[h,f]=u;let d=0,p=0;r==="Q"||r==="T"?(d=i+(i-o),p=n+(n-l)):(d=i,p=n);const g=i+2*(d-i)/3,b=n+2*(p-n)/3,m=h+2*(d-h)/3,_=f+2*(p-f)/3;t.push({key:"C",data:[g,b,m,_,h,f]}),o=d,l=p,i=h,n=f;break}case"Q":{const[h,f,d,p]=u,g=i+2*(h-i)/3,b=n+2*(f-n)/3,m=d+2*(h-d)/3,_=p+2*(f-p)/3;t.push({key:"C",data:[g,b,m,_,d,p]}),o=h,l=f,i=d,n=p;break}case"A":{const h=Math.abs(u[0]),f=Math.abs(u[1]),d=u[2],p=u[3],g=u[4],b=u[5],m=u[6];h===0||f===0?(t.push({key:"C",data:[i,n,b,m,b,m]}),i=b,n=m):(i!==b||n!==m)&&(EE(i,n,b,m,h,f,d,p,g).forEach((function(_){t.push({key:"C",data:_})})),i=b,n=m);break}case"Z":t.push({key:"Z",data:[]}),i=s,n=a}r=c}return t}function bo(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function EE(e,t,r,i,n,s,a,o,l,c){const u=(h=a,Math.PI*h/180);var h;let f=[],d=0,p=0,g=0,b=0;if(c)[d,p,g,b]=c;else{[e,t]=bo(e,t,-u),[r,i]=bo(r,i,-u);const G=(e-r)/2,H=(t-i)/2;let M=G*G/(n*n)+H*H/(s*s);M>1&&(M=Math.sqrt(M),n*=M,s*=M);const N=n*n,q=s*s,V=N*q-N*H*H-q*G*G,tt=N*H*H+q*G*G,A=(o===l?-1:1)*Math.sqrt(Math.abs(V/tt));g=A*n*H/s+(e+r)/2,b=A*-s*G/n+(t+i)/2,d=Math.asin(parseFloat(((t-b)/s).toFixed(9))),p=Math.asin(parseFloat(((i-b)/s).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(p=Math.PI-p),d<0&&(d=2*Math.PI+d),p<0&&(p=2*Math.PI+p),l&&d>p&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI)}let m=p-d;if(Math.abs(m)>120*Math.PI/180){const G=p,H=r,M=i;p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=EE(r=g+n*Math.cos(p),i=b+s*Math.sin(p),H,M,n,s,a,0,l,[p,G,g,b])}m=p-d;const _=Math.cos(d),k=Math.sin(d),T=Math.cos(p),E=Math.sin(p),S=Math.tan(m/4),B=4/3*n*S,L=4/3*s*S,W=[e,t],O=[e+B*k,t-L*_],$=[r+B*E,i-L*T],X=[r,i];if(O[0]=2*W[0]-O[0],O[1]=2*W[1]-O[1],c)return[O,$,X].concat(f);{f=[O,$,X].concat(f);const G=[];for(let H=0;H<f.length;H+=3){const M=bo(f[H][0],f[H][1],u),N=bo(f[H+1][0],f[H+1][1],u),q=bo(f[H+2][0],f[H+2][1],u);G.push([M[0],M[1],N[0],N[1],q[0],q[1]])}return G}}const Q$={randOffset:function(e,t){return Jt(e,t)},randOffsetWithRange:function(e,t,r){return Du(e,t,r)},ellipse:function(e,t,r,i,n){const s=SE(r,i,n);return qp(e,t,n,s).opset},doubleLineOps:function(e,t,r,i,n){return zn(e,t,r,i,n,!0)}};function wE(e,t,r,i,n){return{type:"path",ops:zn(e,t,r,i,n)}}function Xc(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let s=0;s<i-1;s++)n.push(...zn(e[s][0],e[s][1],e[s+1][0],e[s+1][1],r));return t&&n.push(...zn(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?wE(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Z$(e,t,r,i,n){return(function(s,a){return Xc(s,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function O1(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=bc(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:bc(r[0],1.5*(1+.22*t.roughness),P1(t));for(let s=1;s<r.length;s++){const a=r[s];if(a.length){const o=bc(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:bc(a,1.5*(1+.22*t.roughness),P1(t));for(const c of o)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function SE(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),s=2*Math.PI/n;let a=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return a+=Jt(a*l,r),o+=Jt(o*l,r),{increment:s,rx:a,ry:o}}function qp(e,t,r,i){const[n,s]=M1(i.increment,e,t,i.rx,i.ry,1,i.increment*Du(.1,Du(.4,1,r),r),r);let a=Pu(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=M1(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Pu(o,null,r);a=a.concat(l)}return{estimatedPoints:s,opset:{type:"path",ops:a}}}function N1(e,t,r,i,n,s,a,o,l){const c=e,u=t;let h=Math.abs(r/2),f=Math.abs(i/2);h+=Jt(.01*h,l),f+=Jt(.01*f,l);let d=n,p=s;for(;d<0;)d+=2*Math.PI,p+=2*Math.PI;p-d>2*Math.PI&&(d=0,p=2*Math.PI);const g=2*Math.PI/l.curveStepCount,b=Math.min(g/2,(p-d)/2),m=F1(b,c,u,h,f,d,p,1,l);if(!l.disableMultiStroke){const _=F1(b,c,u,h,f,d,p,1.5,l);m.push(..._)}return a&&(o?m.push(...zn(c,u,c+h*Math.cos(d),u+f*Math.sin(d),l),...zn(c,u,c+h*Math.cos(p),u+f*Math.sin(p),l)):m.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+h*Math.cos(d),u+f*Math.sin(d)]})),{type:"path",ops:m}}function D1(e,t){const r=TE(kE($m(e))),i=[];let n=[0,0],s=[0,0];for(const{key:a,data:o}of r)switch(a){case"M":s=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...zn(s[0],s[1],o[0],o[1],t)),s=[o[0],o[1]];break;case"C":{const[l,c,u,h,f,d]=o;i.push(...J$(l,c,u,h,f,d,s,t)),s=[f,d];break}case"Z":i.push(...zn(s[0],s[1],n[0],n[1],t)),s=[n[0],n[1]]}return{type:"path",ops:i}}function Xd(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,s=i.length;if(s>2){r.push({op:"move",data:[i[0][0]+Jt(n,t),i[0][1]+Jt(n,t)]});for(let a=1;a<s;a++)r.push({op:"lineTo",data:[i[a][0]+Jt(n,t),i[a][1]+Jt(n,t)]})}}return{type:"fillPath",ops:r}}function Qs(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Rr[n])switch(n){case"zigzag":Rr[n]||(Rr[n]=new W$(i));break;case"cross-hatch":Rr[n]||(Rr[n]=new j$(i));break;case"dots":Rr[n]||(Rr[n]=new V$(i));break;case"dashed":Rr[n]||(Rr[n]=new G$(i));break;case"zigzag-line":Rr[n]||(Rr[n]=new Y$(i));break;default:n="hachure",Rr[n]||(Rr[n]=new Fm(i))}return Rr[n]})(t,Q$).fillPolygons(e,t)}function P1(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function AE(e){return e.randomizer||(e.randomizer=new X$(e.seed||0)),e.randomizer.next()}function Du(e,t,r,i=1){return r.roughness*i*(AE(r)*(t-e)+e)}function Jt(e,t,r=1){return Du(-e,e,t,r)}function zn(e,t,r,i,n,s=!1){const a=s?n.disableMultiStrokeFill:n.disableMultiStroke,o=Wp(e,t,r,i,n,!0,!1);if(a)return o;const l=Wp(e,t,r,i,n,!0,!0);return o.concat(l)}function Wp(e,t,r,i,n,s,a){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>o&&(u=l/10);const h=u/2,f=.2+.2*AE(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,p=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=Jt(d,n,c),p=Jt(p,n,c);const g=[],b=()=>Jt(h,n,c),m=()=>Jt(u,n,c),_=n.preserveVertices;return a?g.push({op:"move",data:[e+(_?0:b()),t+(_?0:b())]}):g.push({op:"move",data:[e+(_?0:Jt(u,n,c)),t+(_?0:Jt(u,n,c))]}),a?g.push({op:"bcurveTo",data:[d+e+(r-e)*f+b(),p+t+(i-t)*f+b(),d+e+2*(r-e)*f+b(),p+t+2*(i-t)*f+b(),r+(_?0:b()),i+(_?0:b())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*f+m(),p+t+(i-t)*f+m(),d+e+2*(r-e)*f+m(),p+t+2*(i-t)*f+m(),r+(_?0:m()),i+(_?0:m())]}),g}function bc(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Jt(t,r),e[0][1]+Jt(t,r)]),i.push([e[0][0]+Jt(t,r),e[0][1]+Jt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+Jt(t,r),e[n][1]+Jt(t,r)]),n===e.length-1&&i.push([e[n][0]+Jt(t,r),e[n][1]+Jt(t,r)]);return Pu(i,null,r)}function Pu(e,t,r){const i=e.length,n=[];if(i>3){const s=[],a=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*e[o+1][0]-a*e[o-1][0])/6,l[1]+(a*e[o+1][1]-a*e[o-1][1])/6],s[2]=[e[o+1][0]+(a*e[o][0]-a*e[o+2][0])/6,e[o+1][1]+(a*e[o][1]-a*e[o+2][1])/6],s[3]=[e[o+1][0],e[o+1][1]],n.push({op:"bcurveTo",data:[s[1][0],s[1][1],s[2][0],s[2][1],s[3][0],s[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...Wp(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function M1(e,t,r,i,n,s,a,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let u=0;u<=2*Math.PI;u+=e){const h=[t+i*Math.cos(u),r+n*Math.sin(u)];l.push(h),c.push(h)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const u=Jt(.5,o)-Math.PI/2;c.push([Jt(s,o)+t+.9*i*Math.cos(u-e),Jt(s,o)+r+.9*n*Math.sin(u-e)]);const h=2*Math.PI+u-.01;for(let f=u;f<h;f+=e){const d=[Jt(s,o)+t+i*Math.cos(f),Jt(s,o)+r+n*Math.sin(f)];l.push(d),c.push(d)}c.push([Jt(s,o)+t+i*Math.cos(u+2*Math.PI+.5*a),Jt(s,o)+r+n*Math.sin(u+2*Math.PI+.5*a)]),c.push([Jt(s,o)+t+.98*i*Math.cos(u+a),Jt(s,o)+r+.98*n*Math.sin(u+a)]),c.push([Jt(s,o)+t+.9*i*Math.cos(u+.5*a),Jt(s,o)+r+.9*n*Math.sin(u+.5*a)])}return[c,l]}function F1(e,t,r,i,n,s,a,o,l){const c=s+Jt(.1,l),u=[];u.push([Jt(o,l)+t+.9*i*Math.cos(c-e),Jt(o,l)+r+.9*n*Math.sin(c-e)]);for(let h=c;h<=a;h+=e)u.push([Jt(o,l)+t+i*Math.cos(h),Jt(o,l)+r+n*Math.sin(h)]);return u.push([t+i*Math.cos(a),r+n*Math.sin(a)]),u.push([t+i*Math.cos(a),r+n*Math.sin(a)]),Pu(u,null,l)}function J$(e,t,r,i,n,s,a,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let u=[0,0];const h=o.disableMultiStroke?1:2,f=o.preserveVertices;for(let d=0;d<h;d++)d===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:Jt(c[0],o)),a[1]+(f?0:Jt(c[0],o))]}),u=f?[n,s]:[n+Jt(c[d],o),s+Jt(c[d],o)],l.push({op:"bcurveTo",data:[e+Jt(c[d],o),t+Jt(c[d],o),r+Jt(c[d],o),i+Jt(c[d],o),u[0],u[1]]});return l}function yo(e){return[...e]}function $1(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(yo(e[0]),yo(e[1]),yo(e[2]),yo(e[2]));else{const n=[];n.push(e[0],e[0]);for(let o=1;o<e.length;o++)n.push(e[o]),o===e.length-1&&n.push(e[o]);const s=[],a=1-t;i.push(yo(n[0]));for(let o=1;o+2<n.length;o++){const l=n[o];s[0]=[l[0],l[1]],s[1]=[l[0]+(a*n[o+1][0]-a*n[o-1][0])/6,l[1]+(a*n[o+1][1]-a*n[o-1][1])/6],s[2]=[n[o+1][0]+(a*n[o][0]-a*n[o+2][0])/6,n[o+1][1]+(a*n[o][1]-a*n[o+2][1])/6],s[3]=[n[o+1][0],n[o+1][1]],i.push(s[1],s[2],s[3])}}return i}function Kc(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function t9(e,t,r){const i=Kc(t,r);if(i===0)return Kc(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Kc(e,rs(t,r,n))}function rs(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function jp(e,t,r,i){const n=i||[];if((function(o,l){const c=o[l+0],u=o[l+1],h=o[l+2],f=o[l+3];let d=3*u[0]-2*c[0]-f[0];d*=d;let p=3*u[1]-2*c[1]-f[1];p*=p;let g=3*h[0]-2*f[0]-c[0];g*=g;let b=3*h[1]-2*f[1]-c[1];return b*=b,d<g&&(d=g),p<b&&(p=b),d+p})(e,t)<r){const o=e[t+0];n.length?(s=n[n.length-1],a=o,Math.sqrt(Kc(s,a))>1&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],u=e[t+2],h=e[t+3],f=rs(l,c,.5),d=rs(c,u,.5),p=rs(u,h,.5),g=rs(f,d,.5),b=rs(d,p,.5),m=rs(g,b,.5);jp([l,f,g,m],0,r,n),jp([m,b,p,h],0,r,n)}var s,a;return n}function e9(e,t){return Mu(e,0,e.length,t)}function Mu(e,t,r,i,n){const s=n||[],a=e[t],o=e[r-1];let l=0,c=1;for(let u=t+1;u<r-1;++u){const h=t9(e[u],a,o);h>l&&(l=h,c=u)}return Math.sqrt(l)>i?(Mu(e,t,c+1,i,s),Mu(e,c,r,i,s)):(s.length||s.push(a),s.push(o)),s}function Kd(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let s=0;s<n;s++)jp(e,3*s,t,i);return r&&r>0?Mu(i,0,i.length,r):i}const Hr="none";let Fu=class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,s){const a=this._o(s);return this._d("line",[wE(t,r,i,n,a)],a)}rectangle(t,r,i,n,s){const a=this._o(s),o=[],l=Z$(t,r,i,n,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];a.fillStyle==="solid"?o.push(Xd([c],a)):o.push(Qs([c],a))}return a.stroke!==Hr&&o.push(l),this._d("rectangle",o,a)}ellipse(t,r,i,n,s){const a=this._o(s),o=[],l=SE(i,n,a),c=qp(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const u=qp(t,r,a,l).opset;u.type="fillPath",o.push(u)}else o.push(Qs([c.estimatedPoints],a));return a.stroke!==Hr&&o.push(c.opset),this._d("ellipse",o,a)}circle(t,r,i,n){const s=this.ellipse(t,r,i,i,n);return s.shape="circle",s}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Xc(t,!1,i)],i)}arc(t,r,i,n,s,a,o=!1,l){const c=this._o(l),u=[],h=N1(t,r,i,n,s,a,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=N1(t,r,i,n,s,a,!0,!1,f);d.type="fillPath",u.push(d)}else u.push((function(f,d,p,g,b,m,_){const k=f,T=d;let E=Math.abs(p/2),S=Math.abs(g/2);E+=Jt(.01*E,_),S+=Jt(.01*S,_);let B=b,L=m;for(;B<0;)B+=2*Math.PI,L+=2*Math.PI;L-B>2*Math.PI&&(B=0,L=2*Math.PI);const W=(L-B)/_.curveStepCount,O=[];for(let $=B;$<=L;$+=W)O.push([k+E*Math.cos($),T+S*Math.sin($)]);return O.push([k+E*Math.cos(L),T+S*Math.sin(L)]),O.push([k,T]),Qs([O],_)})(t,r,i,n,s,a,c));return c.stroke!==Hr&&u.push(h),this._d("arc",u,c)}curve(t,r){const i=this._o(r),n=[],s=O1(t,i);if(i.fill&&i.fill!==Hr)if(i.fillStyle==="solid"){const a=O1(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...Kd($1([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Kd($1(c),10,(1+i.roughness)/2))}a.length&&n.push(Qs([a],i))}return i.stroke!==Hr&&n.push(s),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],s=Xc(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(Xd([t],i)):n.push(Qs([t],i))),i.stroke!==Hr&&n.push(s),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const s=i.fill&&i.fill!=="transparent"&&i.fill!==Hr,a=i.stroke!==Hr,o=!!(i.simplification&&i.simplification<1),l=(function(u,h,f){const d=TE(kE($m(u))),p=[];let g=[],b=[0,0],m=[];const _=()=>{m.length>=4&&g.push(...Kd(m,h)),m=[]},k=()=>{_(),g.length&&(p.push(g),g=[])};for(const{key:E,data:S}of d)switch(E){case"M":k(),b=[S[0],S[1]],g.push(b);break;case"L":_(),g.push([S[0],S[1]]);break;case"C":if(!m.length){const B=g.length?g[g.length-1]:b;m.push([B[0],B[1]])}m.push([S[0],S[1]]),m.push([S[2],S[3]]),m.push([S[4],S[5]]);break;case"Z":_(),g.push([b[0],b[1]])}if(k(),!f)return p;const T=[];for(const E of p){const S=e9(E,f);S.length&&T.push(S)}return T})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=D1(t,i);if(s)if(i.fillStyle==="solid")if(l.length===1){const u=D1(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else n.push(Xd(l,i));else n.push(Qs(l,i));return a&&(o?l.forEach((u=>{n.push(Xc(u,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const s=typeof r=="number"&&r>=0?n.data.map((a=>+a.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${s[0]} ${s[1]} `;break;case"bcurveTo":i+=`C${s[0]} ${s[1]}, ${s[2]} ${s[3]}, ${s[4]} ${s[5]} `;break;case"lineTo":i+=`L${s[0]} ${s[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const s of r){let a=null;switch(s.type){case"path":a={d:this.opsToPath(s),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Hr};break;case"fillPath":a={d:this.opsToPath(s),stroke:Hr,strokeWidth:0,fill:i.fill||Hr};break;case"fillSketch":a=this.fillSketch(s,i)}a&&n.push(a)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Hr,strokeWidth:i,fill:Hr}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}};class r9{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Fu(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,s=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,a,s),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,a,s,o),n.restore();break}case"fillSketch":this.fillSketch(n,a,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const s of r.ops){const a=typeof i=="number"&&i>=0?s.data.map((o=>+o.toFixed(i))):s.data;switch(s.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,s){const a=this.gen.line(t,r,i,n,s);return this.draw(a),a}rectangle(t,r,i,n,s){const a=this.gen.rectangle(t,r,i,n,s);return this.draw(a),a}ellipse(t,r,i,n,s){const a=this.gen.ellipse(t,r,i,n,s);return this.draw(a),a}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s),s}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,s,a,o=!1,l){const c=this.gen.arc(t,r,i,n,s,a,o,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const yc="http://www.w3.org/2000/svg";let i9=class{constructor(t,r){this.svg=t,this.gen=new Fu(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,s=n.createElementNS(yc,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(yc,"path"),l.setAttribute("d",this.opsToPath(o,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(yc,"path"),l.setAttribute("d",this.opsToPath(o,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,o,i)}l&&s.appendChild(l)}return s}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const s=t.createElementNS(yc,"path");return s.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),s.setAttribute("stroke",i.fill||""),s.setAttribute("stroke-width",n+""),s.setAttribute("fill","none"),i.fillLineDash&&s.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&s.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),s}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,s){const a=this.gen.line(t,r,i,n,s);return this.draw(a)}rectangle(t,r,i,n,s){const a=this.gen.rectangle(t,r,i,n,s);return this.draw(a)}ellipse(t,r,i,n,s){const a=this.gen.ellipse(t,r,i,n,s);return this.draw(a)}circle(t,r,i,n){const s=this.gen.circle(t,r,i,n);return this.draw(s)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,s,a,o=!1,l){const c=this.gen.arc(t,r,i,n,s,a,o,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}};var Pt={canvas:(e,t)=>new r9(e,t),svg:(e,t)=>new i9(e,t),generator:e=>new Fu(e),newSeed:()=>Fu.newSeed()},n9=1,s9=3;async function Hm(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!zm(e);await Promise.all([...t].map(i=>new Promise(n=>{function s(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=pe().fontSize?pe().fontSize:window.getComputedStyle(document.body).fontSize,o=5,[l=TT.fontSize]=bh(a),c=l*o+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";n(i)}C(s,"setupImage"),setTimeout(()=>{i.complete&&s()}),i.addEventListener("error",s),i.addEventListener("load",s)})))}C(Hm,"configureLabelImages");function zm(e){var r;return e.nodeType===s9?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==n9||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(zm)}C(zm,"hasTextBesidesImages");var H1=3,a9=32,o9=C(async(e,t,r)=>{var m,_,k;const i=pe(),n=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),s=n.insert("g").attr("class","label").attr("style",je(t.labelStyle)),o=[{text:typeof t.label=="string"?t.label:((m=t.label)==null?void 0:m[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(T=>({text:T,cssClass:"c4-descr"}))].filter(T=>T.text),l=t.width?Math.max(t.width-2*(t.padding??0),a9):((_=pe().flowchart)==null?void 0:_.wrappingWidth)??200,u=((k=i.c4)==null?void 0:k.wrap)??!0?l:Number.POSITIVE_INFINITY,h=await Promise.all(o.map(async T=>{const E=s.append("g").attr("class",T.cssClass),S=await yi(E,ti(Hn(T.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:u,style:t.labelStyle},i);return se(S).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),se(S).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:E,box:E.node().getBBox()}})),f=Math.max(...h.map(({box:T})=>T.width),0);let d=0;for(const{el:T,box:E}of h)T.attr("transform",`translate(${f/2-E.x-E.width/2}, ${d-E.y})`),d+=E.height+H1;const p=h.length>0?d-H1:0;s.insert("rect",":first-child"),s.attr("transform",`translate(${-f/2}, ${-p/2})`);const g=s.node().getBBox(),b=(t.padding??0)/2;return{shapeSvg:n,bbox:g,halfPadding:b,label:s}},"c4LabelHelper"),Vt=C(async(e,t,r)=>{var d,p;if(t.stereotype!==void 0)return o9(e,t,r);let i;const n=t.useHtmlLabels||Hi((d=pe())==null?void 0:d.htmlLabels);r?i=r:i="node default";const s=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",je(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",u=await yi(a,ti(Hn(o),pe()),{useHtmlLabels:n,width:t.width||t.wrappingWidth||((p=pe().flowchart)==null?void 0:p.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},pe()),h=((t==null?void 0:t.padding)??0)/2;let f;if(n){const g=u.children[0],b=se(u);await Hm(g),f=await ws.measure(()=>g.getBoundingClientRect()),b.attr("width",f.width),b.attr("height",f.height)}else f=await ws.measure(()=>u.getBBox());return n?a.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):a.attr("transform","translate(0, "+-f.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:s,bbox:f,halfPadding:h,label:a}},"labelHelper"),Qd=C(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??yr(pe()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await yi(n,ti(Hn(t),pe()),{useHtmlLabels:i,width:r.width||((c=(l=pe())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let o;if(yr(pe())){const u=s.children[0],h=se(s);o=await ws.measure(()=>u.getBoundingClientRect()),h.attr("width",o.width),h.attr("height",o.height)}else o=await ws.measure(()=>s.getBBox());return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:a,label:n}},"insertLabel"),Ft=C((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),Gt=C((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function be(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}C(be,"createPathFromPoints");function Un(e,t,r,i,n,s){const a=[],l=r-e,c=i-t,u=l/s,h=2*Math.PI/u,f=t+c/2;for(let d=0;d<=50;d++){const p=d/50,g=e+p*l,b=f+n*Math.sin(h*(g-e));a.push({x:g,y:b})}return a}C(Un,"generateFullSineWavePoints");function Oi(e,t,r,i,n,s){const a=[],o=n*Math.PI/180,u=(s*Math.PI/180-o)/(i-1);for(let h=0;h<i;h++){const f=o+h*u,d=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-d,y:-p})}return a}C(Oi,"generateCirclePoints");function Vp(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const n=t.find(l=>l.getAttribute("fill")!=="none"),s=t.find(l=>l.getAttribute("stroke")!=="none"),a=C((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(n){const l={fill:a(n,"fill"),"fill-opacity":a(n,"fill-opacity")??"1"};Object.entries(l).forEach(([c,u])=>{u&&r.setAttribute(c,u)})}if(s){const l={stroke:a(s,"stroke"),"stroke-width":a(s,"stroke-width")??"1","stroke-opacity":a(s,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,u])=>{u&&r.setAttribute(c,u)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}C(Vp,"mergePaths");var l9=C((e,t)=>{var r=e.x,i=e.y,n=t.x-r,s=t.y-i,a=e.width/2,o=e.height/2,l,c;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,c=o):(n<0&&(a=-a),l=a,c=n===0?0:a*s/n),{x:r+l,y:i+c}},"intersectRect"),Ns=l9,ri=C((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),c9=C(async(e,t,r,i=!1,n=!1)=>{let s=t||"";typeof s=="object"&&(s=s[0]);const a=pe(),o=yr(a);return await yi(e,s,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},a)},"createLabel"),On=c9;function vE(e,t){return e.intersect(t)}C(vE,"intersectNode");var u9=vE;function LE(e,t,r,i){var n=e.x,s=e.y,a=n-i.x,o=s-i.y,l=Math.sqrt(t*t*o*o+r*r*a*a),c=Math.abs(t*r*a/l);i.x<n&&(c=-c);var u=Math.abs(t*r*o/l);return i.y<s&&(u=-u),{x:n+c,y:s+u}}C(LE,"intersectEllipse");var IE=LE;function BE(e,t,r){return IE(e,t,t,r)}C(BE,"intersectCircle");var h9=BE;function RE(e,t,r,i){{const n=t.y-e.y,s=e.x-t.x,a=t.x*e.y-e.x*t.y,o=n*r.x+s*r.y+a,l=n*i.x+s*i.y+a,c=1e-6;if(o!==0&&l!==0&&Gp(o,l))return;const u=i.y-r.y,h=r.x-i.x,f=i.x*r.y-r.x*i.y,d=u*e.x+h*e.y+f,p=u*t.x+h*t.y+f;if(Math.abs(d)<c&&Math.abs(p)<c&&Gp(d,p))return;const g=n*h-u*s;if(g===0)return;const b=Math.abs(g/2);let m=s*f-h*a;const _=m<0?(m-b)/g:(m+b)/g;m=u*a-n*f;const k=m<0?(m-b)/g:(m+b)/g;return{x:_,y:k}}}C(RE,"intersectLine");function Gp(e,t){return e*t>0}C(Gp,"sameSign");var d9=RE;function OE(e,t,r){let i=e.x,n=e.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(u){a=Math.min(a,u.x),o=Math.min(o,u.y)}):(a=Math.min(a,t.x),o=Math.min(o,t.y));let l=i-e.width/2-a,c=n-e.height/2-o;for(let u=0;u<t.length;u++){let h=t[u],f=t[u<t.length-1?u+1:0],d=d9(e,r,{x:l+h.x,y:c+h.y},{x:l+f.x,y:c+f.y});d&&s.push(d)}return s.length?(s.length>1&&s.sort(function(u,h){let f=u.x-r.x,d=u.y-r.y,p=Math.sqrt(f*f+d*d),g=h.x-r.x,b=h.y-r.y,m=Math.sqrt(g*g+b*b);return p<m?-1:p===m?0:1}),s[0]):e}C(OE,"intersectPolygon");var f9=OE,Ot={node:u9,circle:h9,ellipse:IE,polygon:f9,rect:Ns};function NE(e,t){const{labelStyles:r}=$t(t);t.labelStyle=r;const i=Gt(t);let n=i;i||(n="anchor");const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),a=1,{cssStyles:o}=t,l=Pt.svg(s),c=Dt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,a*2,c),h=s.insert(()=>u,":first-child");return h.attr("class","anchor").attr("style",je(o)),Ft(t,h),t.intersect=function(f){return nt.info("Circle intersect",t,a,f),Ot.circle(t,a,f)},s}C(NE,"anchor");function Yp(e,t,r,i,n,s,a){const l=(e+r)/2,c=(t+i)/2,u=Math.atan2(i-t,r-e),h=(r-e)/2,f=(i-t)/2,d=h/n,p=f/s,g=Math.sqrt(d**2+p**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const b=Math.sqrt(1-g**2),m=l+b*s*Math.sin(u)*(a?-1:1),_=c-b*n*Math.cos(u)*(a?-1:1),k=Math.atan2((t-_)/s,(e-m)/n);let E=Math.atan2((i-_)/s,(r-m)/n)-k;a&&E<0&&(E+=2*Math.PI),!a&&E>0&&(E-=2*Math.PI);const S=[];for(let B=0;B<20;B++){const L=B/19,W=k+L*E,O=m+n*Math.cos(W),$=_+s*Math.sin(W);S.push({x:O,y:$})}return S}C(Yp,"generateArcPoints");function DE(e,t,r){const[i,n]=[t,r].sort((s,a)=>a-s);return n*(1-Math.sqrt(1-(e/i/2)**2))}C(DE,"calculateArcSagitta");async function PE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,o=C(W=>W+a,"calcTotalHeight"),l=C(W=>{const O=W/2;return[O/(2.5+W/50),O]},"calcEllipseRadius"),{shapeSvg:c,bbox:u}=await Vt(e,t,Gt(t)),h=o(t!=null&&t.height?t==null?void 0:t.height:u.height),[f,d]=l(h),p=DE(h,f,d),b=(t!=null&&t.width?t==null?void 0:t.width:u.width)+s*2+p-p,m=h,{cssStyles:_}=t,k=[{x:b/2,y:-m/2},{x:-b/2,y:-m/2},...Yp(-b/2,-m/2,-b/2,m/2,f,d,!1),{x:b/2,y:m/2},...Yp(b/2,m/2,b/2,-m/2,f,d,!0)],T=Pt.svg(c),E=Dt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const S=be(k),B=T.path(S,E),L=c.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",_),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${f/2}, 0)`),Ft(t,L),t.intersect=function(W){return Ot.polygon(t,k,W)},c}C(PE,"bowTieRect");async function ME(e,t,{config:{themeVariables:r}}){var B;const{labelStyles:i,nodeStyles:n}=$t(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:o}=await Vt(e,t,Gt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,u=Math.max(a.width+c*2,t.width??0,80),h=Math.max(Math.min(u*.08,12),5),f=Math.max(a.height+c*2+h,t.height??0),d=-f/2+h,p=f/2,g=u*.72,b=[`M${-u/2},${d}`,`L${-g/2},${p}`,`A${g/2},${h} 0 0 0 ${g/2},${p}`,`L${u/2},${d}`,`A${u/2},${h} 0 0 0 ${-u/2},${d}`,"Z"].join(" "),{cssStyles:m}=t,_=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const W=Pt.svg(s).path(b,Dt(t,{}));(B=_.node())==null||B.appendChild(W),m&&_.attr("style",m)}else _.append("path").attr("d",b).attr("style",n);_.append("ellipse").attr("cx",0).attr("cy",d).attr("rx",u/2).attr("ry",h).attr("style",`fill:none;stroke:${l};stroke-width:1px`),Ft(t,_);const k=d+(p-d)/2;o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`);const T=12,E=C((L,W,O)=>Array.from({length:T+1},($,X)=>{const G=Math.PI-X*Math.PI/T;return{x:L*Math.cos(G),y:W+O*h*Math.sin(G)}}),"arc"),S=[...E(u/2,d,-1),...E(g/2,p,1).reverse()];return t.intersect=function(L){return Ot.polygon(t,S,L)},s}C(ME,"bucket");var z1=20,U1=8,p9=80,Zd=8;async function FE(e,t){const{themeVariables:r}=pe(),i=r.clusterBkg,n=r.clusterBorder,{nodeStyles:s}=$t(t),{shapeSvg:a,bbox:o}=await Vt(e,t,Gt(t)),l=t.padding??8,c=o.height,u=Math.max(o.width+l*2,p9,(t==null?void 0:t.width)??0),h=Math.max(c+U1+z1+l*2,(t==null?void 0:t.height)??0),f=-u/2,d=-h/2,p=-28/2,g=a.select(".label");g&&(t.useHtmlLabels??yr(pe())?g.attr("transform",`translate(${-o.width/2}, ${-o.height/2+p})`):g.attr("transform",`translate(0, ${-o.height/2+p})`));let b;if(t.look==="handDrawn"){const E=Pt.svg(a),S=Dt(t,{fill:i,stroke:n,fillStyle:"solid"}),B=E.path(ri(f,d,u,h,Zd),S);b=a.insert(()=>B,":first-child"),b.attr("class","basic label-container collapsed-group").attr("style",je(t.cssStyles))}else b=a.insert("rect",":first-child"),b.attr("class","basic label-container collapsed-group").attr("style",s).attr("rx",Zd).attr("ry",Zd).attr("x",f).attr("y",d).attr("width",u).attr("height",h).attr("fill",i).attr("stroke",n);const m=d+l+c+U1;a.append("line").attr("class","collapsed-separator").attr("x1",f+8).attr("y1",m).attr("x2",f+u-8).attr("y2",m).attr("stroke",n).attr("stroke-dasharray","3, 3");const _=m+z1/2,k=2.5,T=10;for(let E=-1;E<=1;E++)a.append("circle").attr("class","collapsed-indicator").attr("cx",E*T).attr("cy",_).attr("r",k).attr("fill",n);return Ft(t,b),t.calcIntersect=function(E,S){return Ot.rect(E,S)},t.intersect=function(E){return Ot.rect(t,E)},a}C(FE,"collapsedGroup");function Ui(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}C(Ui,"insertPolygonShape");var g9=["right","left","up","down"],Um="point",m9=C(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),b9=C(e=>g9.filter(t=>e.has(t)).join("|")||Um,"getDirectionKey"),q1={"right|left|up|down":C(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":C(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":C(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":C(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":C(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":C(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":C(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":C(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":C(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":C(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":C(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:C(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:C(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:C(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:C(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[Um]:()=>[{x:0,y:0}]},y9=C((e,t,r,i)=>{const n=m9(e),s=(r.padding??0)/2,a=t.height+4*s,o=a/2,l=i??t.width+2*o+2*s,c=b9(n);return(q1[c]??q1[Um])({height:a,midpoint:o,padding:s,width:l})},"getArrowPoints");async function $E(e,t){const r=t,{shapeSvg:i,bbox:n}=await Vt(e,r,Gt(r)),s=r.padding??0,a=n.height+2*s,o=a/2,l=n.width+2*o+s,c=r.width??0,h=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,f=y9(r.directions??[],n,r,h),d=Ui(i,h,a,f);return d.attr("style",r.style??null),Ft(r,d),r.intersect=function(p){return Ot.polygon(r,f,p)},i}C($E,"block_arrow");async function HE(e,t,{config:{themeVariables:r}}){var _;const{labelStyles:i,nodeStyles:n}=$t(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:o}=await Vt(e,t,Gt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,u=18,h=12,f=Math.max(a.width+c*2,t.width??0,90),d=Math.max(a.height+c*2+u,t.height??0),p=-d/2,{cssStyles:g}=t,b=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=Pt.svg(s).path(ri(-f/2,p,f,d,h),Dt(t,{}));(_=b.node())==null||_.appendChild(T),g&&b.attr("style",g)}else b.append("rect").attr("x",-f/2).attr("y",p).attr("width",f).attr("height",d).attr("rx",h).attr("ry",h).attr("style",n);b.append("line").attr("x1",-f/2).attr("y1",p+u).attr("x2",f/2).attr("y2",p+u).attr("style",`stroke:${l};stroke-width:1px`);for(let k=0;k<3;k++)b.append("circle").attr("cx",-f/2+12+k*9).attr("cy",p+u/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);b.append("rect").attr("class","browser-address-bar").attr("x",-f/2+44).attr("y",p+4).attr("width",Math.max(f-56,10)).attr("height",u-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Ft(t,b);const m=p+u+(d-u)/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${m-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return Ot.rect(t,k)},s}C(HE,"browser");var xc=12;async function zE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?28:n,a=t.look==="neo"?24:n,{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?s*2:s+xc),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?a*2:a),h=0,f=c,d=-u,p=0,g=[{x:h+xc,y:d},{x:f,y:d},{x:f,y:p},{x:h,y:p},{x:h,y:d+xc},{x:h+xc,y:d}];let b;const{cssStyles:m}=t;if(t.look==="handDrawn"){const _=Pt.svg(o),k=Dt(t,{}),T=be(g),E=_.path(T,k);b=o.insert(()=>E,":first-child").attr("transform",`translate(${-c/2}, ${u/2})`),m&&b.attr("style",m)}else b=Ui(o,c,u,g);return i&&b.attr("style",i),Ft(t,b),t.intersect=function(_){return Ot.polygon(t,g,_)},o}C(zE,"card");function UE(e,t){const{nodeStyles:r}=$t(t);t.label="";const i=e.insert("g").attr("class",Gt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,s=Math.max(28,t.width??0),a=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],o=Pt.svg(i),l=Dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=be(a),u=o.path(c,l),h=i.insert(()=>u,":first-child");return n&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&h.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return Ot.polygon(t,a,f)},i}C(UE,"choice");async function qm(e,t,r){const{labelStyles:i,nodeStyles:n}=$t(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,halfPadding:o}=await Vt(e,t,Gt(t)),l=16,c=(r==null?void 0:r.padding)??o,u=t.look==="neo"?a.width/2+l*2:a.width/2+c;let h;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=Pt.svg(s),p=Dt(t,{}),g=d.circle(0,0,u*2,p);h=s.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",je(f))}else h=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",u).attr("cx",0).attr("cy",0);return Ft(t,h),t.calcIntersect=function(d,p){const g=d.width/2;return Ot.circle(d,g,p)},t.intersect=function(d){return nt.info("Circle intersect",t,u,d),Ot.circle(t,u,d)},s}C(qm,"circle");async function qE(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:n,bbox:s,halfPadding:a}=await Vt(e,r,i),o=n.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:s.width+l,u=r.positioned?r.height??0:s.height+l,h=r.positioned?-c/2:-s.width/2-a,f=r.positioned?-u/2:-s.height/2-a;return o.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",h).attr("y",f).attr("width",c).attr("height",u),Ft(r,o),r.intersect=function(d){return Ot.rect(r,d)},n}C(qE,"composite");async function WE(e,t,{config:{themeVariables:r}}){var _;const{labelStyles:i,nodeStyles:n}=$t(t);t.labelStyle=i;const{shapeSvg:s,bbox:a,label:o}=await Vt(e,t,Gt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,u=20,h=12,f=Math.max(a.width+c*2,t.width??0,90),d=Math.max(a.height+c*2+u,t.height??0),p=-d/2,{cssStyles:g}=t,b=s.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const T=Pt.svg(s).path(ri(-f/2,p,f,d,h),Dt(t,{}));(_=b.node())==null||_.appendChild(T),g&&b.attr("style",g)}else b.append("rect").attr("x",-f/2).attr("y",p).attr("width",f).attr("height",d).attr("rx",h).attr("ry",h).attr("style",n);b.append("text").attr("x",-f/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),Ft(t,b);const m=p+u+(d-u)/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${m-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(k){return Ot.rect(t,k)},s}C(WE,"consoleWindow");function jE(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},s={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${s.x},${s.y} L ${o.x},${o.y}
357
- M ${n.x},${n.y} L ${a.x},${a.y}`}C(jE,"createLine");function VE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",Gt(t)).attr("id",t.domId??t.id),s=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:a}=t,o=Pt.svg(n),l=Dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,s*2,l),u=jE(s),h=o.path(u,l),f=n.insert(()=>c,":first-child");return f.insert(()=>h),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Ft(t,f),t.intersect=function(d){return nt.info("crossedCircle intersect",t,{radius:s,point:d}),Ot.circle(t,s,d)},n}C(VE,"crossedCircle");function Ji(e,t,r,i=100,n=0,s=180){const a=[],o=n*Math.PI/180,u=(s*Math.PI/180-o)/(i-1);for(let h=0;h<i;h++){const f=o+h*u,d=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-d,y:-p})}return a}C(Ji,"generateCirclePoints");async function GE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Vt(e,t,Gt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+o,u=s.height+l,h=Math.max(5,u*.1),{cssStyles:f}=t,d=[...Ji(c/2,-u/2,h,30,-90,0),{x:-c/2-h,y:h},...Ji(c/2+h*2,-h,h,20,-180,-270),...Ji(c/2+h*2,h,h,20,-90,-180),{x:-c/2-h,y:-u/2},...Ji(c/2,u/2,h,20,0,90)],p=[{x:c/2,y:-u/2-h},{x:-c/2,y:-u/2-h},...Ji(c/2,-u/2,h,20,-90,0),{x:-c/2-h,y:-h},...Ji(c/2+c*.1,-h,h,20,-180,-270),...Ji(c/2+c*.1,h,h,20,-90,-180),{x:-c/2-h,y:u/2},...Ji(c/2,u/2,h,20,0,90),{x:-c/2,y:u/2+h},{x:c/2,y:u/2+h}],g=Pt.svg(n),b=Dt(t,{fill:"none"});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const _=be(d).replace("Z",""),k=g.path(_,b),T=be(p),E=g.path(T,{...b}),S=n.insert("g",":first-child");return S.insert(()=>E,":first-child").attr("stroke-opacity",0),S.insert(()=>k,":first-child"),S.attr("class","text"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${h}, 0)`),a.attr("transform",`translate(${-c/2+h-(s.x-(s.left??0))},${-u/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Ft(t,S),t.intersect=function(B){return Ot.polygon(t,p,B)},n}C(GE,"curlyBraceLeft");function tn(e,t,r,i=100,n=0,s=180){const a=[],o=n*Math.PI/180,u=(s*Math.PI/180-o)/(i-1);for(let h=0;h<i;h++){const f=o+h*u,d=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:d,y:p})}return a}C(tn,"generateCirclePoints");async function YE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Vt(e,t,Gt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?o*2:o),u=s.height+(t.look==="neo"?l*2:l),h=Math.max(5,u*.1),{cssStyles:f}=t,d=[...tn(c/2,-u/2,h,20,-90,0),{x:c/2+h,y:-h},...tn(c/2+h*2,-h,h,20,-180,-270),...tn(c/2+h*2,h,h,20,-90,-180),{x:c/2+h,y:u/2},...tn(c/2,u/2,h,20,0,90)],p=[{x:-c/2,y:-u/2-h},{x:c/2,y:-u/2-h},...tn(c/2,-u/2,h,20,-90,0),{x:c/2+h,y:-h},...tn(c/2+h*2,-h,h,20,-180,-270),...tn(c/2+h*2,h,h,20,-90,-180),{x:c/2+h,y:u/2},...tn(c/2,u/2,h,20,0,90),{x:c/2,y:u/2+h},{x:-c/2,y:u/2+h}],g=Pt.svg(n),b=Dt(t,{fill:"none"});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const _=be(d).replace("Z",""),k=g.path(_,b),T=be(p),E=g.path(T,{...b}),S=n.insert("g",":first-child");return S.insert(()=>E,":first-child").attr("stroke-opacity",0),S.insert(()=>k,":first-child"),S.attr("class","text"),f&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-h}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-u/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Ft(t,S),t.intersect=function(B){return Ot.polygon(t,p,B)},n}C(YE,"curlyBraceRight");function or(e,t,r,i=100,n=0,s=180){const a=[],o=n*Math.PI/180,u=(s*Math.PI/180-o)/(i-1);for(let h=0;h<i;h++){const f=o+h*u,d=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-d,y:-p})}return a}C(or,"generateCirclePoints");async function XE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Vt(e,t,Gt(t)),o=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=s.width+(t.look==="neo"?o*2:o),u=s.height+(t.look==="neo"?l*2:l),h=Math.max(5,u*.1),{cssStyles:f}=t,d=[...or(c/2,-u/2,h,30,-90,0),{x:-c/2-h,y:h},...or(c/2+h*2,-h,h,20,-180,-270),...or(c/2+h*2,h,h,20,-90,-180),{x:-c/2-h,y:-u/2},...or(c/2,u/2,h,20,0,90)],p=[...or(-c/2+h+h/2,-u/2,h,20,-90,-180),{x:c/2-h/2,y:h},...or(-c/2-h/2,-h,h,20,0,90),...or(-c/2-h/2,h,h,20,-90,0),{x:c/2-h/2,y:-h},...or(-c/2+h+h/2,u/2,h,30,-180,-270)],g=[{x:c/2,y:-u/2-h},{x:-c/2,y:-u/2-h},...or(c/2,-u/2,h,20,-90,0),{x:-c/2-h,y:-h},...or(c/2+h*2,-h,h,20,-180,-270),...or(c/2+h*2,h,h,20,-90,-180),{x:-c/2-h,y:u/2},...or(c/2,u/2,h,20,0,90),{x:-c/2,y:u/2+h},{x:c/2-h-h/2,y:u/2+h},...or(-c/2+h+h/2,-u/2,h,20,-90,-180),{x:c/2-h/2,y:h},...or(-c/2-h/2,-h,h,20,0,90),...or(-c/2-h/2,h,h,20,-90,0),{x:c/2-h/2,y:-h},...or(-c/2+h+h/2,u/2,h,30,-180,-270)],b=Pt.svg(n),m=Dt(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const k=be(d).replace("Z",""),T=b.path(k,m),S=be(p).replace("Z",""),B=b.path(S,m),L=be(g),W=b.path(L,{...m}),O=n.insert("g",":first-child");return O.insert(()=>W,":first-child").attr("stroke-opacity",0),O.insert(()=>T,":first-child"),O.insert(()=>B,":first-child"),O.attr("class","text"),f&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(${h-h/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(s.x-(s.left??0))},${-u/2+(t.padding??0)/2-(s.y-(s.top??0))})`),Ft(t,O),t.intersect=function($){return Ot.polygon(t,g,$)},n}C(XE,"curlyBraces");async function KE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,o=20,l=5,{shapeSvg:c,bbox:u}=await Vt(e,t,Gt(t)),h=Math.max(o,(u.width+s*2)*1.25,(t==null?void 0:t.width)??0),f=Math.max(l,u.height+a*2,(t==null?void 0:t.height)??0),d=f/2,{cssStyles:p}=t,g=Pt.svg(c),b=Dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const m=h,_=f,k=m-d,T=_/4,E=[{x:k,y:0},{x:T,y:0},{x:0,y:_/2},{x:T,y:_},{x:k,y:_},...Oi(-k,-_/2,d,50,270,90)],S=be(E),B=g.path(S,b),L=c.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-h/2}, ${-f/2})`),Ft(t,L),t.intersect=function(W){return Ot.polygon(t,E,W)},c}C(KE,"curvedTrapezoid");async function QE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Vt(e,t,Gt(t)),o=t.padding??20,l=Math.max(s.width+o*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),u=c*.27,h=Math.max(s.height+o*2,t.height?t.height-(2*c-u):0),f=Math.min(l*.177,h*.45),d=h+2*c-u,p=-d/2,g=p+2*c-u,b=n.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:m}=t;if(t.look==="handDrawn"){const L=Pt.svg(n),W=Dt(t,{}),O=L.path(ri(-l/2,g,l,h,f),W),$=L.circle(0,p+c,c*2,W);b.insert(()=>$,":first-child"),b.insert(()=>O,":first-child"),m&&b.attr("style",m)}else b.append("rect").attr("x",-l/2).attr("y",g).attr("width",l).attr("height",h).attr("rx",f).attr("ry",f).attr("style",i),b.append("circle").attr("cx",0).attr("cy",p+c).attr("r",c).attr("style",i);Ft(t,b);const _=g+h/2;a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${_-s.height/2-(s.y-(s.top??0))})`);const k=p+c,T=Math.asin(Math.min(1,(g-k)/c))*180/Math.PI,B=[...Oi(0,-k,c,24,180+T,-T),...Oi(-(-l/2+f),-(g+f),f,12,90,0),...Oi(-(-l/2+f),-(d/2-f),f,12,360,270),...Oi(-(l/2-f),-(d/2-f),f,12,270,180),...Oi(-(l/2-f),-(g+f),f,12,180,90)];return t.intersect=function(L){return Ot.polygon(t,B,L)},n}C(QE,"person");var x9=C((e,t,r,i,n,s)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),C9=C((e,t,r,i,n,s)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),_9=C((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),W1=8,j1=8;async function ZE(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?24:n,a=t.look==="neo"?24:n,o=t.width??0;if(t.width&&(t.width=t.width-a,t.width<j1&&(t.width=j1)),t.height){const _=o/2/(2.5+o/50);t.height=t.height-s-_*3,t.height<W1&&(t.height=W1)}const{shapeSvg:l,bbox:c,label:u}=await Vt(e,t,Gt(t)),h=Math.max(t.width??0,c.width)+a,f=h/2,d=f/(2.5+h/50),p=Math.max(t.height??0,c.height)+s+d;let g;const{cssStyles:b}=t;if(t.look==="handDrawn"){const m=Pt.svg(l),_=C9(0,0,h,p,f,d),k=_9(0,d,h,p,f,d),T=Dt(t,{}),E=m.path(_,T),S=m.path(k,Dt(t,{fill:"none"}));g=l.insert(()=>S,":first-child"),g=l.insert(()=>E,":first-child"),g.attr("class","basic label-container"),b&&g.attr("style",b)}else{const m=x9(0,0,h,p,f,d);g=l.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",je(b)).attr("style",i)}return g.attr("label-offset-y",d),g.attr("transform",`translate(${-h/2}, ${-(p/2+d)})`),Ft(t,g),u.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(m){const _=Ot.rect(t,m),k=_.x-(t.x??0);if(f!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(_.y-(t.y??0))>(t.height??0)/2-d)){let T=d*d*(1-k*k/(f*f));T>0&&(T=Math.sqrt(T)),T=d-T,m.y-(t.y??0)>0&&(T=-T),_.y+=T}return _},l}C(ZE,"cylinder");async function Ya(e,t,r){const{labelStyles:i,nodeStyles:n}=$t(t);t.labelStyle=i;const{shapeSvg:s,bbox:a}=await Vt(e,t,Gt(t)),o=Math.max(a.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(a.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-o/2,u=-l/2;let h,{rx:f,ry:d}=t;const{cssStyles:p}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const g=Pt.svg(s),b=Dt(t,{}),m=f||d?g.path(ri(c,u,o,l,f||0),b):g.rectangle(c,u,o,l,b);h=s.insert(()=>m,":first-child"),h.attr("class","basic label-container").attr("style",je(p))}else h=s.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",n).attr("rx",je(f)).attr("ry",je(d)).attr("x",c).attr("y",u).attr("width",o).attr("height",l);return Ft(t,h,t.look==="handDrawn"?void 0:{width:o,height:l}),t.calcIntersect=function(g,b){return Ot.rect(g,b)},t.intersect=function(g){return Ot.rect(t,g)},s}C(Ya,"drawRect");async function JE(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:n,padding:s,width:a,height:o}=t,l={rx:0,ry:0,labelPaddingX:i??(s??0)*2,labelPaddingY:n??s??0},c=await Ya(e,t,l);if(t.look==="handDrawn"){const d=Pt.svg(c),p=Dt(t,{}),g=c.select(".basic.label-container > path:nth-child(2)"),b=g.node();if(!b)return c;let m=null;if(b instanceof SVGGraphicsElement)m=b.getBBox();else return c;return c.insert(()=>d.line(m.x,m.y,m.x+m.width,m.y,p),".basic.label-container g.label"),c.insert(()=>d.line(m.x,m.y+m.height,m.x+m.width,m.y+m.height,p),".basic.label-container g.label"),g.remove(),c}const u=c.select(".basic.label-container"),h=(Number(u.attr("width"))||a)??0,f=(Number(u.attr("height"))||o)??0;return h>0&&f>0&&u.attr("stroke-dasharray",`${h} ${f}`),c}C(JE,"datastore");async function tw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:o,label:l}=await Vt(e,t,Gt(t)),c=o.width+n,u=o.height+s,h=u*.2,f=-c/2,d=-u/2-h/2,{cssStyles:p}=t,g=Pt.svg(a),b=Dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const m=[{x:f,y:d+h},{x:-f,y:d+h},{x:-f,y:-d},{x:f,y:-d},{x:f,y:d},{x:-f,y:d},{x:-f,y:d+h}],_=g.polygon(m.map(T=>[T.x,T.y]),b),k=a.insert(()=>_,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(o.x-(o.left??0))}, ${d+h+(t.padding??0)/2-(o.y-(o.top??0))})`),Ft(t,k),t.intersect=function(T){return Ot.rect(t,T)},a}C(tw,"dividedRectangle");async function ew(e,t){var d,p;const{labelStyles:r,nodeStyles:i}=$t(t),n=t.look==="neo"?12:5;t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(a??0),u=c-n;let h;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=Pt.svg(o),b=Dt(t,{roughness:.2,strokeWidth:2.5}),m=Dt(t,{roughness:.2,strokeWidth:1.5}),_=g.circle(0,0,c*2,b),k=g.circle(0,0,u*2,m);h=o.insert("g",":first-child"),h.attr("class",je(t.cssClasses)).attr("style",je(f)),(d=h.node())==null||d.appendChild(_),(p=h.node())==null||p.appendChild(k)}else{h=o.insert("g",":first-child");const g=h.insert("circle",":first-child"),b=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),b.attr("class","inner-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0)}return Ft(t,h),t.intersect=function(g){return nt.info("DoubleCircle intersect",t,c,g),Ot.circle(t,c,g)},o}C(ew,"doublecircle");function rw(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=$t(t);t.label="",t.labelStyle=i;const s=e.insert("g").attr("class",Gt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:o}=t,l=Pt.svg(s),{nodeBorder:c}=r,u=Dt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(u.roughness=0);const h=l.circle(0,0,a*2,u),f=s.insert(()=>h,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),Ft(t,f),t.intersect=function(d){return nt.info("filledCircle intersect",t,{radius:a,point:d}),Ot.circle(t,a,d)},s}C(rw,"filledCircle");var V1=10,G1=10;async function iw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<V1&&(t.height=V1),t.width=((t==null?void 0:t.width)??0)-s-s/2,t.width<G1&&(t.width=G1));const{shapeSvg:a,bbox:o,label:l}=await Vt(e,t,Gt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(s??0),u=t!=null&&t.height?t==null?void 0:t.height:c+o.height,h=u,f=[{x:0,y:-u},{x:h,y:-u},{x:h/2,y:0}],{cssStyles:d}=t,p=Pt.svg(a),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=be(f),m=p.path(b,g),_=a.insert(()=>m,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),t.width=c,t.height=u,Ft(t,_),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-u/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(k){return nt.info("Triangle intersect",t,f,k),Ot.polygon(t,f,k)},a}C(iw,"flippedTriangle");async function nw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Vt(e,t,Gt(t)),o=t.padding??12,l=Math.max(s.width+o*2,t.width??0,90),c=s.height+o*2,u=Math.max(Math.min(c*.16,14),8),h=Math.max(c+u,t.height??0),f=h-u,d=Math.max(l*.38,28),p=-h/2,g=[{x:-l/2,y:p},{x:-l/2+d,y:p},{x:-l/2+d,y:p+u},{x:l/2,y:p+u},{x:l/2,y:h/2},{x:-l/2,y:h/2}],b=[`M${g[0].x},${g[0].y}`,...g.slice(1).map(T=>`L${T.x},${T.y}`),"Z"].join(" "),{cssStyles:m}=t;let _;if(t.look==="handDrawn"){const E=Pt.svg(n).path(b,Dt(t,{}));_=n.insert(()=>E,":first-child").attr("class","basic label-container"),m&&_.attr("style",m)}else _=n.insert("path",":first-child").attr("d",b).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?Ft(t,_):Ft(t,_,{width:l,height:h});const k=p+u+f/2;return a.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${k-s.height/2-(s.y-(s.top??0))})`),t.intersect=function(T){return Ot.polygon(t,g,T)},n}C(nw,"folder");function sw(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:s}=$t(t);t.label="";const a=e.insert("g").attr("class",Gt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const u=-1*l/2,h=-1*c/2,f=Pt.svg(a),d=Dt(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const p=f.rectangle(u,h,l,c,d),g=a.insert(()=>p,":first-child");o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",s),Ft(t,g);const b=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=b/2||0,t.height+=b/2||0),t.intersect=function(m){return Ot.rect(t,m)},a}C(sw,"forkJoin");async function aw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=15,s=10,a=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<s&&(t.height=s),t.width=((t==null?void 0:t.width)??0)-a*2,t.width<n&&(t.width=n));const{shapeSvg:l,bbox:c}=await Vt(e,t,Gt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:Math.max(n,c.width))+a*2,h=(t!=null&&t.height?t==null?void 0:t.height:Math.max(s,c.height))+o*2,f=h/2,{cssStyles:d}=t,p=Pt.svg(l),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=[{x:-u/2,y:-h/2},{x:u/2-f,y:-h/2},...Oi(-u/2+f,0,f,50,90,270),{x:u/2-f,y:h/2},{x:-u/2,y:h/2}],m=be(b),_=p.path(m,g),k=l.insert(()=>_,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Ft(t,k),t.intersect=function(T){return nt.info("Pill intersect",t,{radius:f,point:T}),Ot.polygon(t,b,T)},l}C(aw,"halfRoundedRectangle");var k9=C((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function ow(e,t){const{labelStyles:r,nodeStyles:i}=$t(t),n=t.look==="neo"?3.5:4;t.labelStyle=r;const s=t.padding??0,a=70,o=32,l=t.look==="neo"?a:s,c=t.look==="neo"?o:s;if(t.width||t.height){const k=(t.height??0)/n;t.width=((t==null?void 0:t.width)??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:u,bbox:h}=await Vt(e,t,Gt(t)),f=(t!=null&&t.height?t==null?void 0:t.height:h.height)+l,d=f/n,p=(t!=null&&t.width?t==null?void 0:t.width:h.width)+2*d+c,g=[{x:d,y:0},{x:p-d,y:0},{x:p,y:-f/2},{x:p-d,y:-f},{x:d,y:-f},{x:0,y:-f/2}];let b;const{cssStyles:m}=t;if(t.look==="handDrawn"){const _=Pt.svg(u),k=Dt(t,{}),T=k9(0,0,p,f,d),E=_.path(T,k);b=u.insert(()=>E,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),m&&b.attr("style",m)}else b=Ui(u,p,f,g);return i&&b.attr("style",i),t.width=p,t.height=f,Ft(t,b),t.intersect=function(_){return Ot.polygon(t,g,_)},u}C(ow,"hexagon");async function lw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await Vt(e,t,Gt(t)),s=Math.max(30,(t==null?void 0:t.width)??0),a=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,l=Pt.svg(n),c=Dt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const u=[{x:0,y:0},{x:s,y:0},{x:0,y:a},{x:s,y:a}],h=be(u),f=l.path(h,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-s/2}, ${-a/2})`),Ft(t,d),t.intersect=function(p){return nt.info("Pill intersect",t,{points:u}),Ot.polygon(t,u,p)},n}C(lw,"hourglass");async function cw(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=$t(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,o=Math.max(s,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,label:h}=await Vt(e,t,"icon-shape default"),f=t.pos==="t",d=o,p=o,{nodeBorder:g}=r,{stylesMap:b}=Ga(t),m=-p/2,_=-d/2,k=t.label?8:0,T=Pt.svg(c),E=Dt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const S=T.rectangle(m,_,p,d,E),B=Math.max(p,u.width),L=d+u.height+k,W=T.rectangle(-B/2,-L/2,B,L,{...E,fill:"transparent",stroke:"none"}),O=c.insert(()=>S,":first-child"),$=c.insert(()=>W);if(t.icon){const X=c.append("g");X.html(`<g>${await Hl(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const G=X.node().getBBox(),H=G.width,M=G.height,N=G.x,q=G.y;X.attr("transform",`translate(${-H/2-N},${f?u.height/2+k/2-M/2-q:-u.height/2-k/2-M/2-q})`),X.attr("style",`color: ${b.get("stroke")??g};`)}return h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-L/2:L/2-u.height})`),O.attr("transform",`translate(0,${f?u.height/2+k/2:-u.height/2-k/2})`),Ft(t,$),t.intersect=function(X){if(nt.info("iconSquare intersect",t,X),!t.label)return Ot.rect(t,X);const G=t.x??0,H=t.y??0,M=t.height??0;let N=[];return f?N=[{x:G-u.width/2,y:H-M/2},{x:G+u.width/2,y:H-M/2},{x:G+u.width/2,y:H-M/2+u.height+k},{x:G+p/2,y:H-M/2+u.height+k},{x:G+p/2,y:H+M/2},{x:G-p/2,y:H+M/2},{x:G-p/2,y:H-M/2+u.height+k},{x:G-u.width/2,y:H-M/2+u.height+k}]:N=[{x:G-p/2,y:H-M/2},{x:G+p/2,y:H-M/2},{x:G+p/2,y:H-M/2+d},{x:G+u.width/2,y:H-M/2+d},{x:G+u.width/2/2,y:H+M/2},{x:G-u.width/2,y:H+M/2},{x:G-u.width/2,y:H-M/2+d},{x:G-p/2,y:H-M/2+d}],Ot.polygon(t,N,X)},c}C(cw,"icon");async function uw(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=$t(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,o=Math.max(s,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,label:h}=await Vt(e,t,"icon-shape default"),f=20,d=t.label?8:0,p=t.pos==="t",{nodeBorder:g,mainBkg:b}=r,{stylesMap:m}=Ga(t),_=Pt.svg(c),k=Dt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=m.get("fill");k.stroke=T??b;const E=c.append("g");t.icon&&E.html(`<g>${await Hl(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const S=E.node().getBBox(),B=S.width,L=S.height,W=S.x,O=S.y,$=Math.max(B,L)*Math.SQRT2+f*2,X=_.circle(0,0,$,k),G=Math.max($,u.width),H=$+u.height+d,M=_.rectangle(-G/2,-H/2,G,H,{...k,fill:"transparent",stroke:"none"}),N=c.insert(()=>X,":first-child"),q=c.insert(()=>M);return E.attr("transform",`translate(${-B/2-W},${p?u.height/2+d/2-L/2-O:-u.height/2-d/2-L/2-O})`),E.attr("style",`color: ${m.get("stroke")??g};`),h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-H/2:H/2-u.height})`),N.attr("transform",`translate(0,${p?u.height/2+d/2:-u.height/2-d/2})`),Ft(t,q),t.intersect=function(V){return nt.info("iconSquare intersect",t,V),Ot.rect(t,V)},c}C(uw,"iconCircle");async function hw(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=$t(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,o=Math.max(s,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:f}=await Vt(e,t,"icon-shape default"),d=t.pos==="t",p=o+h*2,g=o+h*2,{nodeBorder:b,mainBkg:m}=r,{stylesMap:_}=Ga(t),k=-g/2,T=-p/2,E=t.label?8:0,S=Pt.svg(c),B=Dt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=_.get("fill");B.stroke=L??m;const W=S.path(ri(k,T,g,p,5),B),O=Math.max(g,u.width),$=p+u.height+E,X=S.rectangle(-O/2,-$/2,O,$,{...B,fill:"transparent",stroke:"none"}),G=c.insert(()=>W,":first-child").attr("class","icon-shape2"),H=c.insert(()=>X);if(t.icon){const M=c.append("g");M.html(`<g>${await Hl(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const N=M.node().getBBox(),q=N.width,V=N.height,tt=N.x,A=N.y;M.attr("transform",`translate(${-q/2-tt},${d?u.height/2+E/2-V/2-A:-u.height/2-E/2-V/2-A})`),M.attr("style",`color: ${_.get("stroke")??b};`)}return f.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${d?-$/2:$/2-u.height})`),G.attr("transform",`translate(0,${d?u.height/2+E/2:-u.height/2-E/2})`),Ft(t,H),t.intersect=function(M){if(nt.info("iconSquare intersect",t,M),!t.label)return Ot.rect(t,M);const N=t.x??0,q=t.y??0,V=t.height??0;let tt=[];return d?tt=[{x:N-u.width/2,y:q-V/2},{x:N+u.width/2,y:q-V/2},{x:N+u.width/2,y:q-V/2+u.height+E},{x:N+g/2,y:q-V/2+u.height+E},{x:N+g/2,y:q+V/2},{x:N-g/2,y:q+V/2},{x:N-g/2,y:q-V/2+u.height+E},{x:N-u.width/2,y:q-V/2+u.height+E}]:tt=[{x:N-g/2,y:q-V/2},{x:N+g/2,y:q-V/2},{x:N+g/2,y:q-V/2+p},{x:N+u.width/2,y:q-V/2+p},{x:N+u.width/2/2,y:q+V/2},{x:N-u.width/2,y:q+V/2},{x:N-u.width/2,y:q-V/2+p},{x:N-g/2,y:q-V/2+p}],Ot.polygon(t,tt,M)},c}C(hw,"iconRounded");async function dw(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=$t(t);t.labelStyle=n;const s=t.assetHeight??48,a=t.assetWidth??48,o=Math.max(s,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:f}=await Vt(e,t,"icon-shape default"),d=t.pos==="t",p=o+h*2,g=o+h*2,{nodeBorder:b,mainBkg:m}=r,{stylesMap:_}=Ga(t),k=-g/2,T=-p/2,E=t.label?8:0,S=Pt.svg(c),B=Dt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=_.get("fill");B.stroke=L??m;const W=S.path(ri(k,T,g,p,.1),B),O=Math.max(g,u.width),$=p+u.height+E,X=S.rectangle(-O/2,-$/2,O,$,{...B,fill:"transparent",stroke:"none"}),G=c.insert(()=>W,":first-child"),H=c.insert(()=>X);if(t.icon){const M=c.append("g");M.html(`<g>${await Hl(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const N=M.node().getBBox(),q=N.width,V=N.height,tt=N.x,A=N.y;M.attr("transform",`translate(${-q/2-tt},${d?u.height/2+E/2-V/2-A:-u.height/2-E/2-V/2-A})`),M.attr("style",`color: ${_.get("stroke")??b};`)}return f.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${d?-$/2:$/2-u.height})`),G.attr("transform",`translate(0,${d?u.height/2+E/2:-u.height/2-E/2})`),Ft(t,H),t.intersect=function(M){if(nt.info("iconSquare intersect",t,M),!t.label)return Ot.rect(t,M);const N=t.x??0,q=t.y??0,V=t.height??0;let tt=[];return d?tt=[{x:N-u.width/2,y:q-V/2},{x:N+u.width/2,y:q-V/2},{x:N+u.width/2,y:q-V/2+u.height+E},{x:N+g/2,y:q-V/2+u.height+E},{x:N+g/2,y:q+V/2},{x:N-g/2,y:q+V/2},{x:N-g/2,y:q-V/2+u.height+E},{x:N-u.width/2,y:q-V/2+u.height+E}]:tt=[{x:N-g/2,y:q-V/2},{x:N+g/2,y:q-V/2},{x:N+g/2,y:q-V/2+p},{x:N+u.width/2,y:q-V/2+p},{x:N+u.width/2/2,y:q+V/2},{x:N-u.width/2,y:q+V/2},{x:N-u.width/2,y:q-V/2+p},{x:N-g/2,y:q-V/2+p}],Ot.polygon(t,tt,M)},c}C(dw,"iconSquare");async function fw(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/s;const{labelStyles:a}=$t(t);t.labelStyle=a;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??n),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,u=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??s;t.width=Math.max(c,o??0);const{shapeSvg:h,bbox:f,label:d}=await Vt(e,t,"image-shape default"),p=t.pos==="t",g=-c/2,b=-u/2,m=t.label?8:0,_=Pt.svg(h),k=Dt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=_.rectangle(g,b,c,u,k),E=Math.max(c,f.width),S=u+f.height+m,B=_.rectangle(-E/2,-S/2,E,S,{...k,fill:"none",stroke:"none"}),L=h.insert(()=>T,":first-child"),W=h.insert(()=>B);if(t.img){const O=h.append("image");O.attr("href",t.img),O.attr("width",c),O.attr("height",u),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${p?S/2-u:-S/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-u/2-f.height/2-m/2:u/2-f.height/2+m/2})`),L.attr("transform",`translate(0,${p?f.height/2+m/2:-f.height/2-m/2})`),Ft(t,W),t.intersect=function(O){if(nt.info("iconSquare intersect",t,O),!t.label)return Ot.rect(t,O);const $=t.x??0,X=t.y??0,G=t.height??0;let H=[];return p?H=[{x:$-f.width/2,y:X-G/2},{x:$+f.width/2,y:X-G/2},{x:$+f.width/2,y:X-G/2+f.height+m},{x:$+c/2,y:X-G/2+f.height+m},{x:$+c/2,y:X+G/2},{x:$-c/2,y:X+G/2},{x:$-c/2,y:X-G/2+f.height+m},{x:$-f.width/2,y:X-G/2+f.height+m}]:H=[{x:$-c/2,y:X-G/2},{x:$+c/2,y:X-G/2},{x:$+c/2,y:X-G/2+u},{x:$+f.width/2,y:X-G/2+u},{x:$+f.width/2/2,y:X+G/2},{x:$-f.width/2,y:X+G/2},{x:$-f.width/2,y:X-G/2+u},{x:$-c/2,y:X-G/2+u}],Ot.polygon(t,H,O)},h}C(fw,"imageSquare");async function pw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=Math.max(l.height+s*2,t.height??0),u=Math.max(l.width+a*2,(t.width??0)-c),h=[{x:0,y:0},{x:u,y:0},{x:u+3*c/6,y:-c},{x:-3*c/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=Pt.svg(o),g=Dt(t,{}),b=be(h),m=p.path(b,g);f=o.insert(()=>m,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),d&&f.attr("style",d)}else f=Ui(o,u,c,h);return i&&f.attr("style",i),t.width=u,t.height=c,Ft(t,f),t.intersect=function(p){return Ot.polygon(t,h,p)},o}C(pw,"inv_trapezoid");async function gw(e,t){const{shapeSvg:r,bbox:i,label:n}=await Vt(e,t,"label"),s=r.insert("rect",":first-child");return s.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Ft(t,s),t.intersect=function(l){return Ot.rect(t,l)},r}C(gw,"labelRect");async function mw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=Math.max(l.height+s,t.height??0),u=Math.max(l.width+a,(t.width??0)-c),h=[{x:0,y:0},{x:u+3*c/6,y:0},{x:u,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=Pt.svg(o),g=Dt(t,{}),b=be(h),m=p.path(b,g);f=o.insert(()=>m,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),d&&f.attr("style",d)}else f=Ui(o,u,c,h);return i&&f.attr("style",i),t.width=u,t.height=c,Ft(t,f),t.intersect=function(p){return Ot.polygon(t,h,p)},o}C(mw,"lean_left");async function bw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=n,a=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=Math.max(l.height+s,t.height??0),u=Math.max(l.width+a,(t.width??0)-c),h=[{x:-3*c/6,y:0},{x:u,y:0},{x:u+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=Pt.svg(o),g=Dt(t,{}),b=be(h),m=p.path(b,g);f=o.insert(()=>m,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),d&&f.attr("style",d)}else f=Ui(o,u,c,h);return i&&f.attr("style",i),t.width=u,t.height=c,Ft(t,f),t.intersect=function(p){return Ot.polygon(t,h,p)},o}C(bw,"lean_right");function yw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",Gt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:a,y:0},{x:0,y:o+l/2},{x:a-2*l,y:o+l/2},{x:0,y:2*o},{x:a,y:o-l/2},{x:2*l,y:o-l/2}],u=Pt.svg(n),h=Dt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const f=be(c),d=u.path(f,h),p=n.insert(()=>d,":first-child");return p.attr("class","outer-path"),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${a/2},${-o})`),Ft(t,p),t.intersect=function(g){return nt.info("lightningBolt intersect",t,g),Ot.polygon(t,c,g)},n}C(yw,"lightningBolt");var T9=C((e,t,r,i,n,s,a)=>[`M${e},${t+s}`,`a${n},${s} 0,0,0 ${r},0`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),E9=C((e,t,r,i,n,s,a)=>[`M${e},${t+s}`,`M${e+r},${t+s}`,`a${n},${s} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${s} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+s+a}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),w9=C((e,t,r,i,n,s)=>[`M${e-r/2},${-i/2}`,`a${n},${s} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Y1=10,X1=10;async function xw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?24:n;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-s,t.width<X1&&(t.width=X1);const k=m/2/(2.5+m/50);t.height=(t.height??0)-a-k*3,t.height<Y1&&(t.height=Y1)}const{shapeSvg:o,bbox:l,label:c}=await Vt(e,t,Gt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,h=u/2,f=h/(2.5+u/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+f+a*2,p=d*.1;let g;const{cssStyles:b}=t;if(t.look==="handDrawn"){const m=Pt.svg(o),_=E9(0,0,u,d,h,f,p),k=w9(0,f,u,d,h,f),T=Dt(t,{}),E=m.path(_,T),S=m.path(k,T);o.insert(()=>S,":first-child").attr("class","line"),g=o.insert(()=>E,":first-child"),g.attr("class","basic label-container"),b&&g.attr("style",b)}else{const m=T9(0,0,u,d,h,f,p);g=o.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",je(b)).attr("style",i)}return g.attr("label-offset-y",f),g.attr("transform",`translate(${-u/2}, ${-(d/2+f)})`),Ft(t,g),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(m){const _=Ot.rect(t,m),k=_.x-(t.x??0);if(h!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(_.y-(t.y??0))>(t.height??0)/2-f)){let T=f*f*(1-k*k/(h*h));T>0&&(T=Math.sqrt(T)),T=f-T,m.y-(t.y??0)>0&&(T=-T),_.y+=T}return _},o}C(xw,"linedCylinder");async function Cw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;if(t.width||t.height){const T=t.width;t.width=(T??0)*10/11-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:l,label:c}=await Vt(e,t,Gt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(s??0)*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(a??0)*2,f=t.look==="neo"?h/4:h/8,d=h+f,{cssStyles:p}=t,g=Pt.svg(o),b=Dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const m=[{x:-u/2-u/2*.1,y:-d/2},{x:-u/2-u/2*.1,y:d/2},...Un(-u/2-u/2*.1,d/2,u/2+u/2*.1,d/2,f,.8),{x:u/2+u/2*.1,y:-d/2},{x:-u/2-u/2*.1,y:-d/2},{x:-u/2,y:-d/2},{x:-u/2,y:d/2*1.1},{x:-u/2,y:-d/2}],_=g.polygon(m.map(T=>[T.x,T.y]),b),k=o.insert(()=>_,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)+u/2*.1/2-(l.x-(l.left??0))},${-h/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),Ft(t,k),t.intersect=function(T){return Ot.polygon(t,m,T)},o}C(Cw,"linedWaveEdgedRect");async function _w(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-2*o,10));const{shapeSvg:l,bbox:c,label:u}=await Vt(e,t,Gt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:c.width)+s*2+2*o,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+a*2+2*o,d=h-2*o,p=f-2*o,g=-d/2,b=-p/2,{cssStyles:m}=t,_=Pt.svg(l),k=Dt(t,{}),T=[{x:g-o,y:b+o},{x:g-o,y:b+p+o},{x:g+d-o,y:b+p+o},{x:g+d-o,y:b+p},{x:g+d,y:b+p},{x:g+d,y:b+p-o},{x:g+d+o,y:b+p-o},{x:g+d+o,y:b-o},{x:g+o,y:b-o},{x:g+o,y:b},{x:g,y:b},{x:g,y:b+o}],E=[{x:g,y:b+o},{x:g+d-o,y:b+o},{x:g+d-o,y:b+p},{x:g+d,y:b+p},{x:g+d,y:b},{x:g,y:b}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=be(T);let B=_.path(S,k);const L=be(E);let W=_.path(L,k);t.look!=="handDrawn"&&(B=Vp(B),W=Vp(W));const O=l.insert("g",":first-child");return O.insert(()=>B),O.insert(()=>W),O.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),u.attr("transform",`translate(${-(c.width/2)-o-(c.x-(c.left??0))}, ${-(c.height/2)+o-(c.y-(c.top??0))})`),Ft(t,O),t.intersect=function($){return Ot.polygon(t,T,$)},l}C(_w,"multiRect");async function kw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Vt(e,t,Gt(t)),o=t.padding??0,l=t.look==="neo"?16:o,c=t.look==="neo"?12:o;let u=!0;(t.width||t.height)&&(u=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const h=Math.max(s.width,(t==null?void 0:t.width)??0)+l*2,f=Math.max(s.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?f/4:f/8,p=f+(u?d/2:-d/2),g=-h/2,b=-p/2,m=10,{cssStyles:_}=t,k=Un(g-m,b+p+m,g+h-m,b+p+m,d,.8),T=k==null?void 0:k[k.length-1],E=[{x:g-m,y:b+m},{x:g-m,y:b+p+m},...k,{x:g+h-m,y:T.y-m},{x:g+h,y:T.y-m},{x:g+h,y:T.y-2*m},{x:g+h+m,y:T.y-2*m},{x:g+h+m,y:b-m},{x:g+m,y:b-m},{x:g+m,y:b},{x:g,y:b},{x:g,y:b+m}],S=[{x:g,y:b+m},{x:g+h-m,y:b+m},{x:g+h-m,y:T.y-m},{x:g+h,y:T.y-m},{x:g+h,y:b},{x:g,y:b}],B=Pt.svg(n),L=Dt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const W=be(E),O=B.path(W,L),$=be(S),X=B.path($,L),G=n.insert(()=>O,":first-child");return G.insert(()=>X),G.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&G.selectAll("path").attr("style",_),i&&t.look!=="handDrawn"&&G.selectAll("path").attr("style",i),G.attr("transform",`translate(0,${-d/2})`),a.attr("transform",`translate(${-(s.width/2)-m-(s.x-(s.left??0))}, ${-(s.height/2)+m-d/2-(s.y-(s.top??0))})`),Ft(t,G),t.intersect=function(H){return Ot.polygon(t,E,H)},n}C(kw,"multiWaveEdgedRectangle");async function Tw(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=$t(t);t.labelStyle=i,t.useHtmlLabels||yr(Oe())||(t.centerLabel=!0);const{shapeSvg:a,bbox:o,label:l}=await Vt(e,t,Gt(t)),c=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),u=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-c/2,f=-u/2,{cssStyles:d}=t,p=Pt.svg(a),g=Dt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=p.rectangle(h,f,c,u,g),m=a.insert(()=>b,":first-child");return m.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Ft(t,m),t.intersect=function(_){return Ot.rect(t,_)},a}C(Tw,"note");var S9=C((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ew(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await Vt(e,t,Gt(t)),a=s.width+(t.padding??0),o=s.height+(t.padding??0),l=a+o,c=.5,u=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=Pt.svg(n),p=Dt(t,{}),g=S9(0,0,l),b=d.path(g,p);h=n.insert(()=>b,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&h.attr("style",f)}else h=Ui(n,l,l,u),h.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&h.attr("style",i),Ft(t,h),t.calcIntersect=function(d,p){const g=d.width,b=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],m=Ot.polygon(d,b,p);return{x:m.x-.5,y:m.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},n}C(Ew,"question");async function ww(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?21:n??0,a=t.look==="neo"?12:n??0,{shapeSvg:o,bbox:l,label:c}=await Vt(e,t,Gt(t)),u=l.width+(t.look==="neo"?s*2:s),h=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),f=h/4,p=-Math.max(u,(t.width??0)-f)/2,g=-h/2,b=g/2,m=[{x:p+b,y:g},{x:p,y:0},{x:p+b,y:-g},{x:-p,y:-g},{x:-p,y:g}],{cssStyles:_}=t,k=Pt.svg(o),T=Dt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=be(m),S=k.path(E,T),B=o.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),_&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",_),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${-b/2},0)`),c.attr("transform",`translate(${-b/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ft(t,B),t.intersect=function(L){return Ot.polygon(t,m,L)},o}C(ww,"rect_left_inv_arrow");async function Sw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const s=e.insert("g").attr("class",n).attr("id",t.domId||t.id),a=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,u=await On(o,c,t.labelStyle,!0,!0);let h={width:0,height:0};if(yr(pe())){const L=u.children[0],W=se(u);h=L.getBoundingClientRect(),W.attr("width",h.width),W.attr("height",h.height)}nt.info("Text 2",l);const f=l||[],d=u.getBBox(),p=await On(o,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),g=p.children[0],b=se(p);h=g.getBoundingClientRect(),b.attr("width",h.width),b.attr("height",h.height);const m=(t.padding||0)/2;se(p).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+m+5)+")"),se(u).attr("transform","translate( "+(h.width<d.width?0:-(d.width-h.width)/2)+", 0)"),h=o.node().getBBox(),o.attr("transform","translate("+-h.width/2+", "+(-h.height/2-m+3)+")");const _=h.width+(t.padding||0),k=h.height+(t.padding||0),T=-h.width/2-m,E=-h.height/2-m;let S,B;if(t.look==="handDrawn"){const L=Pt.svg(s),W=Dt(t,{}),O=L.path(ri(T,E,_,k,t.rx||0),W),$=L.line(-h.width/2-m,-h.height/2-m+d.height+m,h.width/2+m,-h.height/2-m+d.height+m,W);B=s.insert(()=>(nt.debug("Rough node insert CXC",O),$),":first-child"),S=s.insert(()=>(nt.debug("Rough node insert CXC",O),O),":first-child")}else S=a.insert("rect",":first-child"),B=a.insert("line"),S.attr("class","outer title-state").attr("style",i).attr("x",-h.width/2-m).attr("y",-h.height/2-m).attr("width",h.width+(t.padding||0)).attr("height",h.height+(t.padding||0)),B.attr("class","divider").attr("x1",-h.width/2-m).attr("x2",h.width/2+m).attr("y1",-h.height/2-m+d.height+m).attr("y2",-h.height/2-m+d.height+m);return Ft(t,S),t.intersect=function(L){return Ot.rect(t,L)},s}C(Sw,"rectWithTitle");async function Aw(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,n={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ya(e,t,n)}C(Aw,"roundedRect");var Yn=8;async function vw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:o,label:l}=await Vt(e,t,Gt(t)),c=((t==null?void 0:t.width)??o.width)+n*2+(t.look==="neo"?Yn:Yn*2),u=((t==null?void 0:t.height)??o.height)+s*2,h=c-Yn,f=u,d=Yn-c/2,p=-u/2,{cssStyles:g}=t,b=Pt.svg(a),m=Dt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const _=[{x:d,y:p},{x:d+h,y:p},{x:d+h,y:p+f},{x:d-Yn,y:p+f},{x:d-Yn,y:p},{x:d,y:p},{x:d,y:p+f}],k=b.polygon(_.map(E=>[E.x,E.y]),m),T=a.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path").attr("style",je(g)),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),l.attr("transform",`translate(${Yn/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Ft(t,T),t.intersect=function(E){return Ot.rect(t,E)},a}C(vw,"shadedProcess");async function Lw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-a*2,10));const{shapeSvg:o,bbox:l,label:c}=await Vt(e,t,Gt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,h=((t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2)*1.5,f=u,d=h/1.5,p=-f/2,g=-d/2,{cssStyles:b}=t,m=Pt.svg(o),_=Dt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=[{x:p,y:g},{x:p,y:g+d},{x:p+f,y:g+d},{x:p+f,y:g-d/2}],T=be(k),E=m.path(T,_),S=o.insert(()=>E,":first-child");return S.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",b),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),S.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),Ft(t,S),t.intersect=function(B){return Ot.polygon(t,k,B)},o}C(Lw,"slopedRect");async function Iw(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,n=t.look==="neo"?12:r,s={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:n};return Ya(e,t,s)}C(Iw,"squareRect");async function Bw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?20:n,a=t.look==="neo"?12:n,{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=l.height+(t.look==="neo"?a*2:a),u=l.width+c/4+(t.look==="neo"?s*2:s),h=c/2,{cssStyles:f}=t,d=Pt.svg(o),p=Dt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-u/2+h,y:-c/2},{x:u/2-h,y:-c/2},...Oi(-u/2+h,0,h,50,90,270),{x:u/2-h,y:c/2},...Oi(u/2-h,0,h,50,270,450)],b=be(g),m=d.path(b,p),_=o.insert(()=>m,":first-child");return _.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),Ft(t,_),t.intersect=function(k){return Ot.polygon(t,g,k)},o}C(Bw,"stadium");async function Rw(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ya(e,t,r)}C(Rw,"state");function Ow(e,t,{config:{themeVariables:r}}){var _,k;const{labelStyles:i,nodeStyles:n}=$t(t);t.labelStyle=i;const{cssStyles:s}=t,{lineColor:a,stateBorder:o,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const u=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),h=Pt.svg(u),f=Dt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=h.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),p=o??l,g=(t.width??0)*5/14,b=h.circle(0,0,g,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=u.insert(()=>d,":first-child");if(m.insert(()=>b),t.look!=="handDrawn"&&m.attr("class","outer-path"),s&&m.selectAll("path").attr("style",s),n&&m.selectAll("path").attr("style",n),t.width<25&&c&&t.look!=="handDrawn"){const T=((k=(_=e.node())==null?void 0:_.ownerSVGElement)==null?void 0:k.id)??"",E=T?`${T}-drop-shadow-small`:"drop-shadow-small";m.attr("style",`filter:url(#${E})`)}return Ft(t,m),t.intersect=function(T){return Ot.circle(t,(t.width??0)/2,T)},u}C(Ow,"stateEnd");function Nw(e,t,{config:{themeVariables:r}}){var o,l;const{lineColor:i,nodeShadow:n}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const u=Pt.svg(s).circle(0,0,t.width,SF(i));a=s.insert(()=>u),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=s.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&n&&t.look!=="handDrawn"){const c=((l=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:l.id)??"",u=c?`${c}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${u})`)}return Ft(t,a),t.intersect=function(c){return Ot.circle(t,(t.width??7)/2,c)},s}C(Nw,"stateStart");var Zs=8;async function Dw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=(t==null?void 0:t.padding)??8,s=t.look==="neo"?28:n,a=t.look==="neo"?12:n,{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=Math.max(l.width+2*Zs+s,t.width??0),u=Math.max(l.height+a,t.height??0),h=c-2*Zs,f=u,d=-c/2,p=-u/2,g=[{x:0,y:0},{x:h,y:0},{x:h,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:h+8,y:0},{x:h+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const b=Pt.svg(o),m=Dt(t,{}),_=b.rectangle(d,p,h+16,f,m),k=b.line(d+Zs,p,d+Zs,p+f,m),T=b.line(d+Zs+h,p,d+Zs+h,p+f,m);o.insert(()=>k,":first-child"),o.insert(()=>T,":first-child");const E=o.insert(()=>_,":first-child"),{cssStyles:S}=t;E.attr("class","basic label-container").attr("style",je(S)),Ft(t,E)}else{const b=Ui(o,h,f,g);i&&b.attr("style",i),Ft(t,b)}return t.intersect=function(b){return Ot.polygon(t,g,b)},o}C(Dw,"subroutine");var Jd=.2;async function Pw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-a*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Jd*(t.height+a*2),10));const{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2,u=Jd*c,h=Jd*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2+u-u,p=c,g=-d/2,b=-p/2,{cssStyles:m}=t,_=Pt.svg(o),k=Dt(t,{}),T=[{x:g-u/2,y:b},{x:g+d+u/2,y:b},{x:g+d+u/2,y:b+p},{x:g-u/2,y:b+p}],E=[{x:g+d-u/2,y:b+p},{x:g+d+u/2,y:b+p},{x:g+d+u/2,y:b+p-h}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=be(T),B=_.path(S,k),L=be(E),W=_.path(L,{...k,fillStyle:"solid"}),O=o.insert(()=>W,":first-child");return O.insert(()=>B,":first-child"),O.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),Ft(t,O),t.intersect=function($){return Ot.polygon(t,T,$)},o}C(Pw,"taggedRect");async function Mw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,label:a}=await Vt(e,t,Gt(t)),o=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,u=.2*o,h=.2*l,f=l+c,{cssStyles:d}=t,p=Pt.svg(n),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=[{x:-o/2-o/2*.1,y:f/2},...Un(-o/2-o/2*.1,f/2,o/2+o/2*.1,f/2,c,.8),{x:o/2+o/2*.1,y:-f/2},{x:-o/2-o/2*.1,y:-f/2}],m=-o/2+o/2*.1,_=-f/2-h*.4,k=[{x:m+o-u,y:(_+l)*1.3},{x:m+o,y:_+l-h},{x:m+o,y:(_+l)*.9},...Un(m+o,(_+l)*1.25,m+o-u,(_+l)*1.3,-l*.02,.5)],T=be(b),E=p.path(T,g),S=be(k),B=p.path(S,{...g,fillStyle:"solid"}),L=n.insert(()=>B,":first-child");return L.insert(()=>E,":first-child"),L.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-o/2+(t.padding??0)-(s.x-(s.left??0))},${-l/2+(t.padding??0)-c/2-(s.y-(s.top??0))})`),Ft(t,L),t.intersect=function(W){return Ot.polygon(t,b,W)},n}C(Mw,"taggedWaveEdgedRectangle");async function Fw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s}=await Vt(e,t,Gt(t)),a=Math.max(s.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(s.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-a/2,c=-o/2,u=n.insert("rect",":first-child");return u.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",o),Ft(t,u),t.intersect=function(h){return Ot.rect(t,h)},n}C(Fw,"text");var A9=C((e,t,r,i,n,s)=>`M${e},${t}
358
- a${n},${s} 0,0,1 0,${-i}
359
- l${r},0
360
- a${n},${s} 0,0,1 0,${i}
361
- M${r},${-i}
362
- a${n},${s} 0,0,0 0,${i}
363
- l${-r},0`,"createCylinderPathD"),v9=C((e,t,r,i,n,s)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${s} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${s} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),L9=C((e,t,r,i,n,s)=>[`M${e+r/2},${-i/2}`,`a${n},${s} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),K1=5,Q1=10;async function $w(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?12:n/2,a=t.height??0;if(t.height&&(t.height=t.height-s,t.height<K1&&(t.height=K1)),t.width){const m=a/2/(2.5+a/50);t.width=t.width-s-m*3,t.width<Q1&&(t.width=Q1)}const{shapeSvg:o,bbox:l,label:c}=await Vt(e,t,Gt(t)),u=Math.max(t.height??0,l.height)+s,h=u/2,f=h/(2.5+u/50),d=Math.max(t.width??0,l.width)+f+s,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const b=Pt.svg(o),m=v9(0,0,d,u,f,h),_=L9(0,0,d,u,f,h),k=b.path(m,Dt(t,{})),T=b.path(_,Dt(t,{fill:"none"}));g=o.insert(()=>T,":first-child"),g=o.insert(()=>k,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const b=A9(0,0,d,u,f,h);g=o.insert("path",":first-child").attr("d",b).attr("class","basic label-container").attr("style",je(p)).attr("style",i),g.attr("class","basic label-container outer-path"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",f),g.attr("transform",`translate(${-d/2}, ${u/2} )`),c.attr("transform",`translate(${-(l.width/2)-f-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ft(t,g),t.intersect=function(b){const m=Ot.rect(t,b),_=m.y-(t.y??0);if(h!=0&&(Math.abs(_)<(t.height??0)/2||Math.abs(_)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-f)){let k=f*f*(1-_*_/(h*h));k!=0&&(k=Math.sqrt(Math.abs(k))),k=f-k,b.x-(t.x??0)>0&&(k=-k),m.x+=k}return m},o}C($w,"tiltedCylinder");async function Hw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=(t.look==="neo",n),a=t.look==="neo"?n*2:n,{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=Math.max(l.height+s,t.height??0),u=Math.max(l.width+a,(t.width??0)-c),h=[{x:-3*c/6,y:0},{x:u+3*c/6,y:0},{x:u,y:-c},{x:0,y:-c}];let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const p=Pt.svg(o),g=Dt(t,{}),b=be(h),m=p.path(b,g);f=o.insert(()=>m,":first-child").attr("transform",`translate(${-u/2}, ${c/2})`),d&&f.attr("style",d)}else f=Ui(o,u,c,h);return i&&f.attr("style",i),t.width=u,t.height=c,Ft(t,f),t.intersect=function(p){return Ot.polygon(t,h,p)},o}C(Hw,"trapezoid");async function zw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n,o=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-s*2,t.width<o&&(t.width=o));const{shapeSvg:c,bbox:u}=await Vt(e,t,Gt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:u.width)+s*2,f=(t!=null&&t.height?t==null?void 0:t.height:u.height)+a*2,{cssStyles:d}=t,p=Pt.svg(c),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=[{x:-h/2*.8,y:-f/2},{x:h/2*.8,y:-f/2},{x:h/2,y:-f/2*.6},{x:h/2,y:f/2},{x:-h/2,y:f/2},{x:-h/2,y:-f/2*.6}],m=be(b),_=p.path(m,g),k=c.insert(()=>_,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Ft(t,k),t.intersect=function(T){return Ot.polygon(t,b,T)},c}C(zw,"trapezoidalPentagon");var Z1=10,J1=10;async function Uw(e,t){var T;const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-s)/2,t.width<J1&&(t.width=J1),t.height=(t==null?void 0:t.height)??0,t.height<Z1&&(t.height=Z1));const{shapeSvg:a,bbox:o,label:l}=await Vt(e,t,Gt(t)),c=Hi((T=pe().flowchart)==null?void 0:T.htmlLabels),u=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s,h=t!=null&&t.height?t==null?void 0:t.height:u+o.height,f=h,d=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-h}],{cssStyles:p}=t,g=Pt.svg(a),b=Dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const m=be(d),_=g.path(m,b),k=a.insert(()=>_,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=u,t.height=h,Ft(t,k),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${h/2-(o.height+(t.padding??0)/(c?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(E){return nt.info("Triangle intersect",t,d,E),Ot.polygon(t,d,E)},a}C(Uw,"triangle");async function qw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?12:n;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-s*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:u}=await Vt(e,t,Gt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(s??0)*2,f=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(a??0)*2,d=t.look==="neo"?f/4:f/8,p=f+(o?d:-d),{cssStyles:g}=t,m=14-h,_=m>0?m/2:0,k=Pt.svg(l),T=Dt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const E=[{x:-h/2-_,y:p/2},...Un(-h/2-_,p/2,h/2+_,p/2,d,.8),{x:h/2+_,y:-p/2},{x:-h/2-_,y:-p/2}],S=be(E),B=k.path(S,T),L=l.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-d/2})`),u.attr("transform",`translate(${-h/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-d-(c.y-(c.top??0))})`),Ft(t,L),t.intersect=function(W){return Ot.polygon(t,E,W)},l}C(qw,"waveEdgedRectangle");async function Ww(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.padding??0,s=t.look==="neo"?16:n,a=t.look==="neo"?20:n;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const T=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-T*(20/9)),t.width=t.width-s*2}const{shapeSvg:o,bbox:l}=await Vt(e,t,Gt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+s*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a,h=u/8,f=u+h*2,{cssStyles:d}=t,p=Pt.svg(o),g=Dt(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const b=[{x:-c/2,y:f/2},...Un(-c/2,f/2,c/2,f/2,h,1),{x:c/2,y:-f/2},...Un(c/2,-f/2,-c/2,-f/2,h,-1)],m=be(b),_=p.path(m,g),k=o.insert(()=>_,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Ft(t,k),t.intersect=function(T){return Ot.polygon(t,b,T)},o}C(Ww,"waveRectangle");var Pe=10;async function jw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t.look==="neo"?16:t.padding??0,s=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-n*2-Pe,10),t.height=Math.max(((t==null?void 0:t.height)??0)-s*2-Pe,10));const{shapeSvg:a,bbox:o,label:l}=await Vt(e,t,Gt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:o.width)+n*2+Pe,u=(t!=null&&t.height?t==null?void 0:t.height:o.height)+s*2+Pe,h=c-Pe,f=u-Pe,d=-h/2,p=-f/2,{cssStyles:g}=t,b=Pt.svg(a),m=Dt(t,{}),_=[{x:d-Pe,y:p-Pe},{x:d-Pe,y:p+f},{x:d+h,y:p+f},{x:d+h,y:p-Pe}],k=`M${d-Pe},${p-Pe} L${d+h},${p-Pe} L${d+h},${p+f} L${d-Pe},${p+f} L${d-Pe},${p-Pe}
364
- M${d-Pe},${p} L${d+h},${p}
365
- M${d},${p-Pe} L${d},${p+f}`;t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const T=b.path(k,m),E=a.insert(()=>T,":first-child");return E.attr("transform",`translate(${Pe/2}, ${Pe/2})`),E.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(o.width/2)+Pe/2-(o.x-(o.left??0))}, ${-(o.height/2)+Pe/2-(o.y-(o.top??0))})`),Ft(t,E),t.intersect=function(S){return Ot.polygon(t,_,S)},a}C(jw,"windowPane");var tx=new Set(["redux-color","redux-dark-color"]),I9=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Wm(e,t){var pt,Ht,Yt,It;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:n}=Oe(),{rowEven:s,rowOdd:a,nodeBorder:o,borderColorArray:l}=n;if(t.look==="handDrawn"){const{themeVariables:wt}=Oe(),{background:Lt}=wt,Xt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Lt}`]};await Wm(e,Xt)}const c=Oe();t.useHtmlLabels=c.htmlLabels;let u=((pt=c.er)==null?void 0:pt.diagramPadding)??10,h=((Ht=c.er)==null?void 0:Ht.entityPadding)??6;const{cssStyles:f}=t,{labelStyles:d,nodeStyles:p}=$t(t);if(r.attributes.length===0&&t.label){const wt={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5};un(t.label,c)+wt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const Lt=await Ya(e,t,wt);if(i!=null&&tx.has(i)){const Xt=r.colorIndex??0;Lt.attr("data-color-id",`color-${Xt%l.length}`)}if(!Hi(c.htmlLabels)){const Xt=Lt.select("text"),Qt=(Yt=Xt.node())==null?void 0:Yt.getBBox();Xt.attr("transform",`translate(${-Qt.width/2}, 0)`)}return Lt}c.htmlLabels||(u*=1.25,h*=1.25);let g=Gt(t);g||(g="node default");const b=e.insert("g").attr("class",g).attr("id",t.domId||t.id),m=await ia(b,t.label??"",c,0,0,["name"],d);m.height+=h;let _=0;const k=[],T=[];let E=0,S=0,B=0,L=0,W=!0,O=!0;for(const wt of r.attributes){const Lt=await ia(b,wt.type,c,0,_,["attribute-type"],d);E=Math.max(E,Lt.width+u);const Xt=await ia(b,wt.name,c,0,_,["attribute-name"],d);S=Math.max(S,Xt.width+u);const Qt=await ia(b,wt.keys.join(),c,0,_,["attribute-keys"],d);B=Math.max(B,Qt.width+u);const le=await ia(b,wt.comment,c,0,_,["attribute-comment"],d);L=Math.max(L,le.width+u);const it=Math.max(Lt.height,Xt.height,Qt.height,le.height)+h;T.push({yOffset:_,rowHeight:it}),_+=it}let $=4;B<=u&&(W=!1,B=0,$--),L<=u&&(O=!1,L=0,$--);const X=b.node().getBBox();if(m.width+u*2-(E+S+B+L)>0){const wt=m.width+u*2-(E+S+B+L);E+=wt/$,S+=wt/$,B>0&&(B+=wt/$),L>0&&(L+=wt/$)}const G=E+S+B+L,H=Pt.svg(b),M=Dt(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let N=0;T.length>0&&(N=T.reduce((wt,Lt)=>wt+((Lt==null?void 0:Lt.rowHeight)??0),0));const q=Math.max(X.width+u*2,(t==null?void 0:t.width)||0,G),V=Math.max((N??0)+m.height,(t==null?void 0:t.height)||0),tt=-q/2,A=-V/2;if(b.selectAll("g:not(:first-child)").each((wt,Lt,Xt)=>{const Qt=se(Xt[Lt]),le=Qt.attr("transform");let it=0,Bt=0;if(le){const ce=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(le);ce&&(it=parseFloat(ce[1]),Bt=parseFloat(ce[2]),Qt.attr("class").includes("attribute-name")?it+=E:Qt.attr("class").includes("attribute-keys")?it+=E+S:Qt.attr("class").includes("attribute-comment")&&(it+=E+S+B))}Qt.attr("transform",`translate(${tt+u/2+it}, ${Bt+A+m.height+h/2})`)}),b.select(".name").attr("transform","translate("+-m.width/2+", "+(A+h/2)+")"),i!=null&&tx.has(i)){const wt=r.colorIndex??0;b.attr("data-color-id",`color-${wt%l.length}`)}const Et=H.rectangle(tt,A,q,V,M),kt=b.insert(()=>Et,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[wt,Lt]of T.entries()){const Qt=(wt+1)%2===0&&Lt.yOffset!==0,le=H.rectangle(tt,m.height+A+(Lt==null?void 0:Lt.yOffset),q,Lt==null?void 0:Lt.rowHeight,{...M,fill:Qt?s:a,stroke:o});b.insert(()=>le,"g.label").attr("style",f.join("")).attr("class",`row-rect-${Qt?"even":"odd"}`)}const P=1e-4;let Rt=na(tt,m.height+A,q+tt,m.height+A,P),Tt=H.polygon(Rt.map(wt=>[wt.x,wt.y]),M);if(b.insert(()=>Tt).attr("class","divider"),Rt=na(E+tt,m.height+A,E+tt,V+A,P),Tt=H.polygon(Rt.map(wt=>[wt.x,wt.y]),M),b.insert(()=>Tt).attr("class","divider"),W){const wt=E+S+tt;Rt=na(wt,m.height+A,wt,V+A,P),Tt=H.polygon(Rt.map(Lt=>[Lt.x,Lt.y]),M),b.insert(()=>Tt).attr("class","divider")}if(O){const wt=E+S+B+tt;Rt=na(wt,m.height+A,wt,V+A,P),Tt=H.polygon(Rt.map(Lt=>[Lt.x,Lt.y]),M),b.insert(()=>Tt).attr("class","divider")}for(const wt of k){const Lt=m.height+A+wt;Rt=na(tt,Lt,q+tt,Lt,P),Tt=H.polygon(Rt.map(Xt=>[Xt.x,Xt.y]),M),b.insert(()=>Tt).attr("class","divider")}if(Ft(t,kt),p&&t.look!=="handDrawn")if(i!=null&&I9.has(i))b.selectAll("path").attr("style",p);else{const wt=p.split(";"),Lt=(It=wt==null?void 0:wt.filter(Xt=>Xt.includes("stroke")))==null?void 0:It.map(Xt=>`${Xt}`).join("; ");b.selectAll("path").attr("style",Lt??""),b.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(wt){return Ot.rect(t,wt)},b}C(Wm,"erBox");async function ia(e,t,r,i=0,n=0,s=[],a=""){const o=e.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",a);t!==Hy(t)&&(t=Hy(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=o.node().appendChild(await yi(o,t,{width:un(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let u=l.children[0];for(u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");u.childNodes[0];)u=u.childNodes[0],u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(Hi(r.htmlLabels)){const u=l.children[0];u.style.textAlign="start";const h=se(l);c=u.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}return c}C(ia,"addText");function na(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}C(na,"lineToPolygon");async function Vw(e,t,r,i,n=r.class.padding??12){const s=i?0:3,a=e.insert("g").attr("class",Gt(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,u=null,h=0,f=0,d=0;if(o=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const _=t.annotations[0];await Mo(o,{text:`«${_}»`},0),h=o.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Mo(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();f=p.height,c=a.insert("g").attr("class","members-group text");let g=0;for(const _ of t.members){const k=await Mo(c,_,g,[_.parseClassifier()]);g+=k+s}d=c.node().getBBox().height,d<=0&&(d=n/2),u=a.insert("g").attr("class","methods-group text");let b=0;for(const _ of t.methods){const k=await Mo(u,_,b,[_.parseClassifier()]);b+=k+s}let m=a.node().getBBox();if(o!==null){const _=o.node().getBBox();o.attr("transform",`translate(${-_.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${h})`),m=a.node().getBBox(),c.attr("transform",`translate(0, ${h+f+n*2})`),m=a.node().getBBox(),u.attr("transform",`translate(0, ${h+f+(d?d+n*4:n*2)})`),m=a.node().getBBox(),{shapeSvg:a,bbox:m}}C(Vw,"textHelper");async function Mo(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),s=Oe();let a="useHtmlLabels"in t?t.useHtmlLabels:Hi(s.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!a&&o.startsWith("\\")&&(o=o.substring(1)),ml(o)&&(a=!0);const l=await yi(n,sm(Hn(o)),{width:un(o,s)+50,classes:"markdown-node-label",useHtmlLabels:a},s);let c,u=1;if(a){const h=l.children[0],f=se(l);u=h.innerHTML.split("<br>").length,h.innerHTML.includes("</math>")&&(u+=h.innerHTML.split("<mrow>").length-1),await Hm(h),c=h.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&se(l).selectAll("tspan").attr("font-weight",""),u=l.children.length;const h=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(h.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(h.textContent=h.textContent[0]+" "+h.textContent.substring(1))),h.textContent==="undefined"&&(h.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*u)+r)+")"),c.height}C(Mo,"addText");async function Gw(e,t){var H,M;const r=pe(),{themeVariables:i}=r,{useGradient:n}=i,s=r.class.padding??12,a=s,o=t.useHtmlLabels??Hi(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:u}=await Vw(e,t,r,o,a),{labelStyles:h,nodeStyles:f}=$t(t);t.labelStyle=h,t.cssStyles=l.styles||"";const d=((H=l.styles)==null?void 0:H.join(";"))||f||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const p=l.members.length===0&&l.methods.length===0&&!((M=r.class)!=null&&M.hideEmptyMembersBox),g=Pt.svg(c),b=Dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const m=Math.max(t.width??0,u.width);let _=Math.max(t.height??0,u.height);const k=(t.height??0)>u.height;l.members.length===0&&l.methods.length===0?_+=a:l.members.length>0&&l.methods.length===0&&(_+=a*2);const T=-m/2,E=-_/2;let S=p?s*2:l.members.length===0&&l.methods.length===0?-s:0;k&&(S=s*2);const B=g.rectangle(T-s,E-s-(p?s:l.members.length===0&&l.methods.length===0?-s/2:0),m+2*s,_+2*s+S,b),L=c.insert(()=>B,":first-child");L.attr("class","basic label-container outer-path");const W=L.node().getBBox(),O=c.select(".annotation-group").node().getBBox().height-(p?s/2:0)||0,$=c.select(".label-group").node().getBBox().height-(p?s/2:0)||0,X=c.select(".members-group").node().getBBox().height-(p?s/2:0)||0,G=(O+$+E+s-(E-s-(p?s:l.members.length===0&&l.methods.length===0?-s/2:0)))/2;if(c.selectAll(".text").each((N,q,V)=>{var Rt,Tt;const tt=se(V[q]),A=tt.attr("transform");let Et=0;if(A){const Ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(A);Ht&&(Et=parseFloat(Ht[2]))}let kt=Et+E+s-(p?s:l.members.length===0&&l.methods.length===0?-s/2:0);if(tt.attr("class").includes("methods-group")){const pt=Math.max(X,a/2);k?kt=Math.max(G,O+$+pt+E+a*2+s)+a*2:kt=O+$+pt+E+a*4+s}l.members.length===0&&l.methods.length===0&&((Rt=r.class)!=null&&Rt.hideEmptyMembersBox)&&(l.annotations.length>0?kt=Et-a:kt=Et),o||(kt-=4);let P=T;(tt.attr("class").includes("label-group")||tt.attr("class").includes("annotation-group"))&&(P=-((Tt=tt.node())==null?void 0:Tt.getBBox().width)/2||0,c.selectAll("text").each(function(pt,Ht,Yt){window.getComputedStyle(Yt[Ht]).textAnchor==="middle"&&(P=0)})),tt.attr("transform",`translate(${P}, ${kt})`)}),l.members.length>0||l.methods.length>0||p){const N=O+$+E+s,q=g.line(W.x,N,W.x+W.width,N+.001,b);c.insert(()=>q).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",d)}if(p||l.members.length>0||l.methods.length>0){const N=O+$+X+E+a*2+s,q=g.line(W.x,k?Math.max(G,N):N,W.x+W.width,(k?Math.max(G,N):N)+.001,b);c.insert(()=>q).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),L.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!o){const N=RegExp(/color\s*:\s*([^;]*)/),q=N.exec(d);if(q){const V=q[0].replace("color","fill");c.selectAll("tspan").attr("style",V)}else if(h){const V=N.exec(h);if(V){const tt=V[0].replace("color","fill");c.selectAll("tspan").attr("style",tt)}}}return Ft(t,L),t.intersect=function(N){return Ot.rect(t,N)},c}C(Gw,"classBox");async function Yw(e,t){var $,X;const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const n=t,s=t,a=20,o=20,l="verifyMethod"in t,c=Gt(t),u=pe(),{themeVariables:h}=u,{borderColorArray:f,requirementEdgeLabelBackground:d}=h,p=u.layout==="elk"?"start":"center",g=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let b;l?b=await Ai(g,`&lt;&lt;${n.type}&gt;&gt;`,0,t.labelStyle):b=await Ai(g,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=b;const _=await Ai(g,n.name,m,t.labelStyle+"; font-weight: bold;");if(m+=_+o,l){const G=await Ai(g,`${n.requirementId?`ID: ${n.requirementId}`:""}`,m,t.labelStyle,p);m+=G;const H=await Ai(g,`${n.text?`Text: ${n.text}`:""}`,m,t.labelStyle,p);m+=H;const M=await Ai(g,`${n.risk?`Risk: ${n.risk}`:""}`,m,t.labelStyle,p);m+=M,await Ai(g,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,m,t.labelStyle,p)}else{const G=await Ai(g,`${s.type?`Type: ${s.type}`:""}`,m,t.labelStyle,p);m+=G,await Ai(g,`${s.docRef?`Doc Ref: ${s.docRef}`:""}`,m,t.labelStyle,p)}const k=((($=g.node())==null?void 0:$.getBBox().width)??200)+a,T=(((X=g.node())==null?void 0:X.getBBox().height)??200)+a,E=-k/2,S=-T/2,B=Pt.svg(g),L=Dt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const W=B.rectangle(E,S,k,T,L),O=g.insert(()=>W,":first-child");if(O.attr("class","basic label-container outer-path").attr("style",i),f!=null&&f.length){const G=t.colorIndex??0;g.attr("data-color-id",`color-${G%f.length}`)}if(g.selectAll(".label").each((G,H,M)=>{const N=se(M[H]),q=N.attr("transform");let V=0,tt=0;if(q){const P=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(q);P&&(V=parseFloat(P[1]),tt=parseFloat(P[2]))}const A=tt-T/2;let Et=E+a/2;(H===0||H===1)&&(Et=V),N.attr("transform",`translate(${Et}, ${A+a})`)}),m>b+_+o){const G=S+b+_+o;let H;if(t.look==="neo"){const q=[[E,G],[E+k,G],[E+k,G+.001],[E,G+.001]];H=B.polygon(q,L)}else H=B.line(E,G,E+k,G,L);g.insert(()=>H).attr("class","divider")}return Ft(t,O),t.intersect=function(G){return Ot.rect(t,G)},i&&t.look!=="handDrawn"&&(d||f!=null&&f.length)&&g.selectAll("path").attr("style",i),g}C(Yw,"requirementBox");async function Ai(e,t,r,i="",n="center"){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),a=pe(),o=a.htmlLabels??!0,l=await yi(s,sm(Hn(t)),{width:un(t,a)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},a);let c;if(o){const u=l.children[0],h=se(l);n==="start"&&se(u).style("text-align","left"),c=u.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}else{const u=l.children[0];for(const h of u.children)i&&h.setAttribute("style",i);if(n==="start"){u.setAttribute("text-anchor","start");for(const h of u.children)h.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return s.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}C(Ai,"addText");var B9=C(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Xw(e,t,{config:r}){var X,G;const{labelStyles:i,nodeStyles:n}=$t(t);t.labelStyle=i||"";const s=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await Vt(e,t,Gt(t)),u=t.padding||10;let h="",f;"ticket"in t&&t.ticket&&((X=r==null?void 0:r.kanban)!=null&&X.ticketBaseUrl)&&(h=(G=r==null?void 0:r.kanban)==null?void 0:G.ticketBaseUrl.replace("#TICKET#",t.ticket),f=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",h).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,g;f?{label:p,bbox:g}=await Qd(f,"ticket"in t&&t.ticket||"",d):{label:p,bbox:g}=await Qd(o,"ticket"in t&&t.ticket||"",d);const{label:b,bbox:m}=await Qd(o,"assigned"in t&&t.assigned||"",d);t.width=a;const _=10,k=(t==null?void 0:t.width)||0,T=Math.max(g.height,m.height)/2,E=Math.max(l.height+_*2,(t==null?void 0:t.height)||0)+T,S=-k/2,B=-E/2;c.attr("transform","translate("+(u-k/2)+", "+(-T-l.height/2)+")"),p.attr("transform","translate("+(u-k/2)+", "+(-T+l.height/2)+")"),b.attr("transform","translate("+(u+k/2-m.width-2*s)+", "+(-T+l.height/2)+")");let L;const{rx:W,ry:O}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const H=Pt.svg(o),M=Dt(t,{}),N=W||O?H.path(ri(S,B,k,E,W||0),M):H.rectangle(S,B,k,E,M);L=o.insert(()=>N,":first-child"),L.attr("class","basic label-container").attr("style",$||null)}else{L=o.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",n).attr("rx",W??5).attr("ry",O??5).attr("x",S).attr("y",B).attr("width",k).attr("height",E);const H="priority"in t&&t.priority;if(H){const M=o.append("line"),N=S+2,q=B+Math.floor((W??0)/2),V=B+E-Math.floor((W??0)/2);M.attr("x1",N).attr("y1",q).attr("x2",N).attr("y2",V).attr("stroke-width","4").attr("stroke",B9(H))}}return Ft(t,L),t.height=E,t.intersect=function(H){return Ot.rect(t,H)},o}C(Xw,"kanbanItem");async function Kw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:o}=await Vt(e,t,Gt(t)),l=s.width+10*a,c=s.height+8*a,u=.15*l,{cssStyles:h}=t,f=s.width+20,d=s.height+20,p=Math.max(l,f),g=Math.max(c,d);o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);let b;const m=`M0 0
366
- a${u},${u} 1 0,0 ${p*.25},${-1*g*.1}
367
- a${u},${u} 1 0,0 ${p*.25},0
368
- a${u},${u} 1 0,0 ${p*.25},0
369
- a${u},${u} 1 0,0 ${p*.25},${g*.1}
370
-
371
- a${u},${u} 1 0,0 ${p*.15},${g*.33}
372
- a${u*.8},${u*.8} 1 0,0 0,${g*.34}
373
- a${u},${u} 1 0,0 ${-1*p*.15},${g*.33}
374
-
375
- a${u},${u} 1 0,0 ${-1*p*.25},${g*.15}
376
- a${u},${u} 1 0,0 ${-1*p*.25},0
377
- a${u},${u} 1 0,0 ${-1*p*.25},0
378
- a${u},${u} 1 0,0 ${-1*p*.25},${-1*g*.15}
379
-
380
- a${u},${u} 1 0,0 ${-1*p*.1},${-1*g*.33}
381
- a${u*.8},${u*.8} 1 0,0 0,${-1*g*.34}
382
- a${u},${u} 1 0,0 ${p*.1},${-1*g*.33}
383
- H0 V0 Z`;if(t.look==="handDrawn"){const _=Pt.svg(n),k=Dt(t,{}),T=_.path(m,k);b=n.insert(()=>T,":first-child"),b.attr("class","basic label-container").attr("style",je(h))}else b=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return b.attr("transform",`translate(${-p/2}, ${-g/2})`),Ft(t,b),t.calcIntersect=function(_,k){return Ot.rect(_,k)},t.intersect=function(_){return nt.info("Bang intersect",t,_),Ot.rect(t,_)},n}C(Kw,"bang");async function Qw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:o}=await Vt(e,t,Gt(t)),l=s.width+2*a,c=s.height+2*a,u=.15*l,h=.25*l,f=.35*l,d=.2*l,{cssStyles:p}=t;let g;const b=`M0 0
384
- a${u},${u} 0 0,1 ${l*.25},${-1*l*.1}
385
- a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
386
- a${h},${h} 1 0,1 ${l*.35},${l*.2}
387
-
388
- a${u},${u} 1 0,1 ${l*.15},${c*.35}
389
- a${d},${d} 1 0,1 ${-1*l*.15},${c*.65}
390
-
391
- a${h},${u} 1 0,1 ${-1*l*.25},${l*.15}
392
- a${f},${f} 1 0,1 ${-1*l*.5},0
393
- a${u},${u} 1 0,1 ${-1*l*.25},${-1*l*.15}
394
-
395
- a${u},${u} 1 0,1 ${-1*l*.1},${-1*c*.35}
396
- a${d},${d} 1 0,1 ${l*.1},${-1*c*.65}
397
- H0 V0 Z`;if(t.look==="handDrawn"){const m=Pt.svg(n),_=Dt(t,{}),k=m.path(b,_);g=n.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",je(p))}else g=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",b);return o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),g.attr("transform",`translate(${-l/2}, ${-c/2})`),Ft(t,g),t.calcIntersect=function(m,_){return Ot.rect(m,_)},t.intersect=function(m){return nt.info("Cloud intersect",t,m),Ot.rect(t,m)},n}C(Qw,"cloud");async function Zw(e,t){const{labelStyles:r,nodeStyles:i}=$t(t);t.labelStyle=r;const{shapeSvg:n,bbox:s,halfPadding:a,label:o}=await Vt(e,t,Gt(t)),l=s.width+8*a,c=s.height+2*a,u=5,h=t.look==="neo"?`
398
- M${-l/2} ${c/2-u}
399
- v${-c+2*u}
400
- q0,-${u} ${u},-${u}
401
- h${l-2*u}
402
- q${u},0 ${u},${u}
403
- v${c-u}
404
- H${-l/2}
405
- Z
406
- `:`
407
- M${-l/2} ${c/2-u}
408
- v${-c+2*u}
409
- q0,-${u} ${u},-${u}
410
- h${l-2*u}
411
- q${u},0 ${u},${u}
412
- v${c-2*u}
413
- q0,${u} ${-u},${u}
414
- h${-(l-2*u)}
415
- q${-u},0 ${-u},${-u}
416
- Z
417
- `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",h);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),n.append(()=>o.node()),Ft(t,f),t.calcIntersect=function(d,p){return Ot.rect(d,p)},t.intersect=function(d){return Ot.rect(t,d)},n}C(Zw,"defaultMindmapNode");async function Jw(e,t){const r={padding:t.padding??0};return qm(e,t,r)}C(Jw,"mindmapCircle");var R9=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Iw},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Aw},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Bw},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Dw},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ZE},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:JE},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:nw},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:ME},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:WE},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:HE},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:QE},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:qm},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Kw},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Qw},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ew},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ow},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:bw},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:mw},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Hw},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:pw},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ew},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Fw},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:zE},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:vw},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Nw},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ow},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:sw},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:lw},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:GE},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:YE},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:XE},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:yw},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qw},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:aw},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:$w},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:xw},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:KE},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tw},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Uw},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:jw},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:rw},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:zw},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:iw},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Lw},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:kw},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:_w},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:PE},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:VE},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Mw},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Pw},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ww},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ww},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Cw}],O9=C(()=>{const t=[...Object.entries({state:Rw,choice:UE,note:Tw,composite:qE,rectWithTitle:Sw,labelRect:gw,block_arrow:$E,collapsedGroup:FE,iconSquare:dw,iconCircle:uw,icon:cw,iconRounded:hw,imageSquare:fw,anchor:NE,kanbanItem:Xw,mindmapCircle:Jw,defaultMindmapNode:Zw,classBox:Gw,erBox:Wm,requirementBox:Yw}),...R9.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),tS=O9();function N9(e){return e in tS}C(N9,"isValidShape");var Th=C(({flowchart:e})=>{var n,s;const t=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)??0,r=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Eh=new Map;async function jm(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const s=t.shape?tS[t.shape]:void 0;if(!s)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),n=await s(i,t,r)}else n=await s(e,t,r),i=n;return i.attr("data-look",je(t.look)),t.tooltip&&n.attr("title",t.tooltip),Eh.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}C(jm,"insertNode");var wlt=C((e,t)=>{Eh.set(t.id,e)},"setNodeElem"),D9=C(()=>{Eh.clear()},"clear"),ex=C(e=>{const t=Eh.get(e.id);nt.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),P9=C(async(e,t)=>{const r=pe(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:a}=i,o=a,{labelStyles:l,nodeStyles:c,borderStyles:u,backgroundStyles:h}=$t(t),f=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),d=Hi(r.flowchart.htmlLabels),p=t.direction==="LR",g=f.insert("g").attr("class","cluster-label swimlane-label"),b=await yi(g,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=b.getBBox();if(d){const G=b.children[0],H=se(b);m=G.getBoundingClientRect(),H.attr("width",m.width),H.attr("height",m.height)}const _=t.padding??0,k=t.width<=m.width+_?m.width+_:t.width;t.width<=m.width+_?t.diff=(k-t.width)/2-_:t.diff=-_;const T=t.height,E=t.y-T/2,S=t.y+T/2,B=t.x-k/2,L=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:E+T/3,W=p?4:0,O=m.height+2*W;let $,X;if(p){const G=Math.max(O,m.height+2*W),H=B+G,M=Math.max(0,k-G);if(t.look==="handDrawn"){const V=Pt.svg(f),tt=Dt(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:n}),A=Dt(t,{roughness:.7,fill:"none",stroke:o,seed:n}),Et=V.rectangle(B,E,G,T,tt);$=f.insert(()=>Et,":first-child");const kt=V.rectangle(H,E,M,T,A);X=f.insert(()=>kt,":first-child"),$.select("path:nth-child(2)").attr("style",u.join(";")),$.select("path").attr("style",h.join(";").replace("fill","stroke"))}else $=f.insert("rect",":first-child"),X=f.insert("rect",":first-child"),$.attr("class","swimlane-title").attr("style",c).attr("x",B).attr("y",E).attr("width",G).attr("height",T).attr("fill",s).attr("stroke",o),X.attr("class","swimlane-body").attr("style",c).attr("x",H).attr("y",E).attr("width",M).attr("height",T).attr("fill","none").attr("stroke",o);const N=B+G/2,q=t.y;g.attr("transform",`translate(${N}, ${q}) rotate(-90) translate(${-m.width/2}, ${-m.height/2})`)}else{const G=Math.max(0,L-E),H=Math.min(O,G),M=E+H,N=Math.max(0,S-M),q=t.x-k/2;if(t.look==="handDrawn"){const A=Pt.svg(f),Et=Dt(t,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:n}),kt=Dt(t,{roughness:.7,fill:"none",stroke:o,seed:n}),P=A.rectangle(q,E,k,H,Et);$=f.insert(()=>P,":first-child");const Rt=A.rectangle(q,M,k,N,kt);X=f.insert(()=>Rt,":first-child"),$.select("path:nth-child(2)").attr("style",u.join(";")),$.select("path").attr("style",h.join(";").replace("fill","stroke"))}else $=f.insert("rect",":first-child"),X=f.insert("rect",":first-child"),$.attr("class","swimlane-title").attr("style",c).attr("x",q).attr("y",E).attr("width",k).attr("height",H).attr("fill",s).attr("stroke",o),X.attr("class","swimlane-body").attr("style",c).attr("x",q).attr("y",M).attr("width",k).attr("height",N).attr("fill","none").attr("stroke",o);const V=t.x-m.width/2,tt=E+(H-m.height)/2;g.attr("transform",`translate(${V}, ${tt})`)}if(nt.trace("Swimlane data ",t,JSON.stringify(t)),l){const G=g.select("span");G&&G.attr("style",l)}return t.offsetX=0,t.width=k,t.height=T,t.offsetY=m.height-_/2,t.intersect=function(G){return Ns(t,G)},{cluster:f,labelBBox:m}},"swimlane"),eS=C(async(e,t)=>{nt.info("Creating subgraph rect for ",t.id,t);const r=pe(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:u}=$t(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=yr(r),d=h.insert("g").attr("class","cluster-label ");let p;t.labelType==="markdown"?p=await yi(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):p=await On(d,t.label,t.labelStyle||"",!1,!0);let g=p.getBBox();if(yr(r)){const B=p.children[0],L=se(p);g=B.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const b=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const m=t.height,_=t.x-b/2,k=t.y-m/2;nt.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const B=Pt.svg(h),L=Dt(t,{roughness:.7,fill:s,stroke:a,fillWeight:3,seed:n}),W=B.path(ri(_,k,b,m,0),L);T=h.insert(()=>(nt.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",u.join(";").replace("fill","stroke"))}else T=h.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",k).attr("width",b).attr("height",m);const{subGraphTitleTopMargin:E}=Th(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+E})`),o){const B=d.select("span");B&&B.attr("style",o)}const S=T.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=g.height-t.padding/2,t.intersect=function(B){return Ns(t,B)},{cluster:h,labelBBox:g}},"rect"),M9=C((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),n=0*t.padding,s=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(o){return Ns(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),F9=C(async(e,t)=>{const r=pe(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:s,compositeBackground:a,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),u=c.insert("g",":first-child"),h=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=await On(h,t.label,t.labelStyle,void 0,!0);let p=d.getBBox();if(yr(r)){const W=d.children[0],O=se(d);p=W.getBoundingClientRect(),O.attr("width",p.width),O.attr("height",p.height)}const g=0*t.padding,b=g/2,m=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+g;t.width<=p.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const _=t.height+g,k=t.height+g-p.height-6,T=t.x-m/2,E=t.y-_/2;t.width=m;const S=t.y-t.height/2-b+p.height+2;let B;if(t.look==="handDrawn"){const W=t.cssClasses.includes("statediagram-cluster-alt"),O=Pt.svg(c),$=t.rx||t.ry?O.path(ri(T,E,m,_,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):O.rectangle(T,E,m,_,{seed:n});B=c.insert(()=>$,":first-child");const X=O.rectangle(T,S,m,k,{fill:W?s:a,fillStyle:W?"hachure":"solid",stroke:l,seed:n});B=c.insert(()=>$,":first-child"),f=c.insert(()=>X)}else B=u.insert("rect",":first-child"),B.attr("class","outer").attr("x",T).attr("y",E).attr("width",m).attr("height",_).attr("data-look",t.look),f.attr("class","inner").attr("x",T).attr("y",S).attr("width",m).attr("height",k);h.attr("transform",`translate(${t.x-p.width/2}, ${E+1-(yr(r)?0:3)})`);const L=B.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(W){return Ns(t,W)},{cluster:c,labelBBox:p}},"roundedWithTitle"),$9=C(async(e,t)=>{nt.info("Creating subgraph rect for ",t.id,t);const r=pe(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:s,clusterBorder:a}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:u}=$t(t),h=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=yr(r),d=h.insert("g").attr("class","cluster-label "),p=await yi(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let g=p.getBBox();if(yr(r)){const B=p.children[0],L=se(p);g=B.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const b=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const m=t.height,_=t.x-b/2,k=t.y-m/2;nt.trace("Data ",t,JSON.stringify(t));let T;if(t.look==="handDrawn"){const B=Pt.svg(h),L=Dt(t,{roughness:.7,fill:s,stroke:a,fillWeight:4,seed:n}),W=B.path(ri(_,k,b,m,t.rx),L);T=h.insert(()=>(nt.debug("Rough node insert CXC",W),W),":first-child"),T.select("path:nth-child(2)").attr("style",c.join(";")),T.select("path").attr("style",u.join(";").replace("fill","stroke"))}else T=h.insert("rect",":first-child"),T.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",_).attr("y",k).attr("width",b).attr("height",m);const{subGraphTitleTopMargin:E}=Th(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+E})`),o){const B=d.select("span");B&&B.attr("style",o)}const S=T.node().getBBox();return t.offsetX=0,t.width=S.width,t.height=S.height,t.offsetY=g.height-t.padding/2,t.intersect=function(B){return Ns(t,B)},{cluster:h,labelBBox:g}},"kanbanSection"),H9=C((e,t)=>{const r=pe(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:s}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),o=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const u=t.height+l,h=t.x-c/2,f=t.y-u/2;t.width=c;let d;if(t.look==="handDrawn"){const b=Pt.svg(a).rectangle(h,f,c,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:s,seed:n});d=a.insert(()=>b,":first-child")}else{d=o.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",h).attr("y",f).attr("width",c).attr("height",u).attr("data-look",t.look)}const p=d.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return Ns(t,g)},{cluster:a,labelBBox:{}}},"divider"),z9=eS,U9={rect:eS,squareRect:z9,roundedWithTitle:F9,noteGroup:M9,divider:H9,kanbanSection:$9,swimlane:P9},rS=new Map,iS=C(async(e,t)=>{const r=t.shape||"rect",i=await U9[r](e,t);return rS.set(t.id,i),i},"insertCluster"),q9=C(()=>{rS=new Map},"clear"),xo=C((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),pr={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},rx={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Fo(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Re(e),t=Re(t);const[r,i]=[e.x,e.y],[n,s]=[t.x,t.y],a=n-r,o=s-i;return{angle:Math.atan(o/a),deltaX:a,deltaY:o}}C(Fo,"calculateDeltaAndAngle");var Re=C(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),W9=C(e=>({x:C(function(t,r,i){let n=0;const s=Re(i[0]).x<Re(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(pr,e.arrowTypeStart)){const{angle:d,deltaX:p}=Fo(i[0],i[1]);n=pr[e.arrowTypeStart]*Math.cos(d)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pr,e.arrowTypeEnd)){const{angle:d,deltaX:p}=Fo(i[i.length-1],i[i.length-2]);n=pr[e.arrowTypeEnd]*Math.cos(d)*(p>=0?1:-1)}const a=Math.abs(Re(t).x-Re(i[i.length-1]).x),o=Math.abs(Re(t).y-Re(i[i.length-1]).y),l=Math.abs(Re(t).x-Re(i[0]).x),c=Math.abs(Re(t).y-Re(i[0]).y),u=pr[e.arrowTypeStart],h=pr[e.arrowTypeEnd],f=1;if(a<h&&a>0&&o<h){let d=h+f-a;d*=s==="right"?-1:1,n-=d}if(l<u&&l>0&&c<u){let d=u+f-l;d*=s==="right"?-1:1,n+=d}return Re(t).x+n},"x"),y:C(function(t,r,i){let n=0;const s=Re(i[0]).y<Re(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(pr,e.arrowTypeStart)){const{angle:d,deltaY:p}=Fo(i[0],i[1]);n=pr[e.arrowTypeStart]*Math.abs(Math.sin(d))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(pr,e.arrowTypeEnd)){const{angle:d,deltaY:p}=Fo(i[i.length-1],i[i.length-2]);n=pr[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(p>=0?1:-1)}const a=Math.abs(Re(t).y-Re(i[i.length-1]).y),o=Math.abs(Re(t).x-Re(i[i.length-1]).x),l=Math.abs(Re(t).y-Re(i[0]).y),c=Math.abs(Re(t).x-Re(i[0]).x),u=pr[e.arrowTypeStart],h=pr[e.arrowTypeEnd],f=1;if(a<h&&a>0&&o<h){let d=h+f-a;d*=s==="up"?-1:1,n-=d}if(l<u&&l>0&&c<u){let d=u+f-l;d*=s==="up"?-1:1,n+=d}return Re(t).y+n},"y")}),"getLineFunctionsWithOffset"),j9=C((e,t,r,i,n,s=!1,a)=>{t.arrowTypeStart&&ix(e,"start",t.arrowTypeStart,r,i,n,s,a),t.arrowTypeEnd&&ix(e,"end",t.arrowTypeEnd,r,i,n,s,a)},"addEdgeMarkers"),V9={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},G9=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],ix=C((e,t,r,i,n,s,a=!1,o)=>{var p;if(!r||r==="none")return;const l=V9[r],c=l&&G9.includes(l.type);if(!l){nt.warn(`Unknown arrow type: ${r}`);return}const u=l.type,d=`${n}_${s}-${u}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(o&&o.trim()!==""){const g=o.replace(/[^\dA-Za-z]/g,"_"),b=`${d}_${g}`;if(!document.getElementById(b)){const m=document.getElementById(d);if(m){const _=m.cloneNode(!0);_.id=b,_.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",o),l.fill&&T.setAttribute("fill",o)}),(p=m.parentNode)==null||p.appendChild(_)}}e.attr(`marker-${t}`,`url(${i}#${b})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),Y9=C(e=>{var t,r;return typeof e=="string"?e:(r=(t=pe())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Ma=new Map,$e=new Map,X9=C(()=>{Ma.clear(),$e.clear()},"clear"),nS=C(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Co=C(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Vm=C(async(e,t)=>{const r=pe();let i=yr(r);const{labelStyles:n}=$t(t);t.labelStyle=n;const s=e.insert("g").attr("class","edgeLabel"),a=s.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",c=await yi(e,t.label,{style:Co(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);a.node().appendChild(c),nt.info("abc82",t,t.labelType);let u,h;if(i){const d=c.children[0],p=se(c);u=await ws.measure(()=>d.getBoundingClientRect()),h=u,p.attr("width",u.width),p.attr("height",u.height)}else{const d=se(c).select("text").node();await ws.measure(()=>{u=c.getBBox(),d&&typeof d.getBBox=="function"?h=d.getBBox():h=u})}a.attr("transform",xo(h,i)),Ma.set(t.id,s),t.width=u.width,t.height=u.height;let f;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner"),g=await On(p,t.startLabelLeft,Co(t.labelStyle)||"",!1,!1);f=g;let b=g.getBBox();if(i){const m=g.children[0],_=se(g);b=m.getBoundingClientRect(),_.attr("width",b.width),_.attr("height",b.height)}p.attr("transform",xo(b,i)),$e.get(t.id)||$e.set(t.id,{}),$e.get(t.id).startLeft=d,$o(f,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner"),g=await On(p,t.startLabelRight,Co(t.labelStyle)||"",!1,!1);f=g;let b=g.getBBox();if(i){const m=g.children[0],_=se(g);b=m.getBoundingClientRect(),_.attr("width",b.width),_.attr("height",b.height)}p.attr("transform",xo(b,i)),$e.get(t.id)||$e.set(t.id,{}),$e.get(t.id).startRight=d,$o(f,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner"),g=await On(d,t.endLabelLeft,Co(t.labelStyle)||"",!1,!1);f=g;let b=g.getBBox();if(i){const m=g.children[0],_=se(g);b=m.getBoundingClientRect(),_.attr("width",b.width),_.attr("height",b.height)}p.attr("transform",xo(b,i)),$e.get(t.id)||$e.set(t.id,{}),$e.get(t.id).endLeft=d,$o(f,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),p=d.insert("g").attr("class","inner"),g=await On(d,t.endLabelRight,Co(t.labelStyle)||"",!1,!1);f=g;let b=g.getBBox();if(i){const m=g.children[0],_=se(g);b=m.getBoundingClientRect(),_.attr("width",b.width),_.attr("height",b.height)}p.attr("transform",xo(b,i)),$e.get(t.id)||$e.set(t.id,{}),$e.get(t.id).endRight=d,$o(f,t.endLabelRight)}return c},"insertEdgeLabel");function $o(e,t){yr(pe())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}C($o,"setTerminalWidth");var K9=C((e,t)=>{nt.debug("Moving label abc88 ",e.id,e.label,Ma.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=pe(),{subGraphTitleTotalMargin:n}=Th(i);if(e.label){const s=Ma.get(e.id);let a=e.x,o=e.y;if(r){const l=mr.calcLabelPosition(r);nt.debug("Moving label "+e.label+" from (",a,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,o=l.y)}s.attr("transform",`translate(${a}, ${o+n/2})`)}if(e.startLabelLeft){const s=$e.get(e.id).startLeft;let a=e.x,o=e.y;if(r){const l=mr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.startLabelRight){const s=$e.get(e.id).startRight;let a=e.x,o=e.y;if(r){const l=mr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.endLabelLeft){const s=$e.get(e.id).endLeft;let a=e.x,o=e.y;if(r){const l=mr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.endLabelRight){const s=$e.get(e.id).endRight;let a=e.x,o=e.y;if(r){const l=mr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}},"positionEdgeLabel"),Q9=C((e,t)=>{var a;if(!(e!=null&&e.isLabelEdge)||!((a=e==null?void 0:e.id)!=null&&a.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,n=Math.abs(i.x-r.x),s=Math.abs(i.y-r.y);return n<.001||s<.001?t:s>=n?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Z9=C((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),s=Math.abs(t.y-i),a=e.width/2,o=e.height/2;return n>=a||s>=o},"outsideNode"),J9=C((e,t,r)=>{nt.debug(`intersection calc abc89:
418
- outsidePoint: ${JSON.stringify(t)}
419
- insidePoint : ${JSON.stringify(r)}
420
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,s=Math.abs(i-r.x),a=e.width/2;let o=r.x<t.x?a-s:a+s;const l=e.height/2,c=Math.abs(t.y-r.y),u=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*a>Math.abs(i-t.x)*l){let h=r.y<t.y?t.y-l-n:n-l-t.y;o=u*h/c;const f={x:r.x<t.x?r.x+o:r.x-u+o,y:r.y<t.y?r.y+c-h:r.y-c+h};return o===0&&(f.x=t.x,f.y=t.y),u===0&&(f.x=t.x),c===0&&(f.y=t.y),nt.debug(`abc89 top/bottom calc, Q ${c}, q ${h}, R ${u}, r ${o}`,f),f}else{r.x<t.x?o=t.x-a-i:o=i-a-t.x;let h=c*o/u,f=r.x<t.x?r.x+u-o:r.x-u+o,d=r.y<t.y?r.y+h:r.y-h;return nt.debug(`sides calc abc89, Q ${c}, q ${h}, R ${u}, r ${o}`,{_x:f,_y:d}),o===0&&(f=t.x,d=t.y),u===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),nx=C((e,t)=>{nt.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(s=>{if(nt.info("abc88 checking point",s,t),!Z9(t,s)&&!n){const a=J9(t,i,s);nt.debug("abc88 inside",s,i,a),nt.debug("abc88 intersection",a,t);let o=!1;r.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?nt.warn("abc88 no intersect",a,r):r.push(a),n=!0}else nt.warn("abc88 outside",s,i),i=s,n||r.push(s)}),nt.debug("returning points",r),r},"cutPathAtIntersect");function sS(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],s=e[i],a=e[i+1];(n.x===s.x&&s.y===a.y&&Math.abs(s.x-a.x)>5&&Math.abs(s.y-n.y)>5||n.y===s.y&&s.x===a.x&&Math.abs(s.x-n.x)>5&&Math.abs(s.y-a.y)>5)&&(t.push(s),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}C(sS,"extractCornerPoints");var sx=C(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,s=Math.sqrt(i*i+n*n),a=r/s;return{x:t.x-a*i,y:t.y-a*n}},"findAdjacentPoint"),t7=C(function(e){const{cornerPointPositions:t}=sS(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],s=e[i+1],a=e[i],o=sx(n,a,5),l=sx(s,a,5),c=l.x-o.x,u=l.y-o.y;r.push(o);const h=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(s.x-n.x)>10&&Math.abs(s.y-n.y)>=10){nt.debug("Corner point fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));const d=5;a.x===o.x?f={x:c<0?o.x-d+h:o.x+d-h,y:u<0?o.y-h:o.y+h}:f={x:c<0?o.x-h:o.x+h,y:u<0?o.y-d+h:o.y+d-h}}else nt.debug("Corner point skipping fixing",Math.abs(s.x-n.x),Math.abs(s.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),e7=C((e,t,r)=>{const i=e-t-r,n=2,s=2,a=n+s,o=Math.floor(i/a),l=Number.isFinite(o)?Math.max(0,o):0,c=Array(l).fill(`${n} ${s}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),aS=C(function(e,t,r,i,n,s,a,o=!1){var V;if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=pe();let u=t.points,h=!1;const f=n;var d=s;const p=[];for(const tt in t.cssCompiledStyles)O2(tt)||p.push(t.cssCompiledStyles[tt]);if(c==="swimlane"){if(d.intersect&&f.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[f.intersect(u[0]),d.intersect(u[1])];else{const tt=u.slice(1,-1),A=tt[0],Et=tt[tt.length-1],kt=.5,P=Math.abs(u[u.length-1].x-Et.x)<kt&&Math.abs(u[u.length-1].y-Et.y)<kt,Rt=f.intersect(A),Tt=P?Et:d.intersect(Et),pt=Math.abs(Tt.x-Et.x)<kt&&Math.abs(Tt.y-Et.y)<kt,Yt=Math.abs(Rt.x-A.x)<kt&&Math.abs(Rt.y-A.y)<kt?[]:[Rt],It=pt?[]:[Tt];u=[...Yt,...tt,...It]}u=Q9(t,u)}else d.intersect&&f.intersect&&!o&&(u=u.slice(1,t.points.length-1),u.unshift(f.intersect(u[0])),u.push(d.intersect(u[u.length-1])));const g=btoa(JSON.stringify(u));t.toCluster&&(nt.info("to cluster abc88",r.get(t.toCluster)),u=nx(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(nt.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=nx(u.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let b=u.filter(tt=>!Number.isNaN(tt.y));const m=Y9(t.curve);m!=="rounded"&&(b=t7(b));let _=Qo;switch(m){case"linear":_=Qo;break;case"basis":_=Op;break;case"cardinal":_=y2;break;case"bumpX":_=f2;break;case"bumpY":_=p2;break;case"catmullRom":_=C2;break;case"monotoneX":_=S2;break;case"monotoneY":_=A2;break;case"natural":_=L2;break;case"step":_=I2;break;case"stepAfter":_=R2;break;case"stepBefore":_=B2;break;case"rounded":_=Qo;break;default:_=Op}const{x:k,y:T}=W9(t),E=mF().x(k).y(T).curve(_);let S;switch(t.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(t.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let B,L=m==="rounded"?oS(lS(b,t),5):E(b);const W=Array.isArray(t.style)?t.style:[t.style];let O=W.find(tt=>tt==null?void 0:tt.startsWith("stroke:")),$="";t.animate&&($="edge-animation-fast"),t.animation&&($="edge-animation-"+t.animation);let X=!1;if(t.look==="handDrawn"){const tt=Pt.svg(e);Object.assign([],b);const A=tt.path(L,{roughness:.3,seed:l});S+=" transition",B=se(A).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",W?W.reduce((kt,P)=>kt+";"+P,""):"");let Et=B.attr("d");B.attr("d",Et),e.node().appendChild(B.node())}else{const tt=p.join(";"),A=W?W.reduce((pt,Ht)=>pt+Ht+";",""):"",Et=(tt?tt+";"+A+";":A)+";"+(W?W.reduce((pt,Ht)=>pt+";"+Ht,""):"");B=e.append("path").attr("d",L).attr("id",`${a}-${t.id}`).attr("class"," "+S+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",Et),O=(V=Et.match(/stroke:([^;]+)/))==null?void 0:V[1],X=t.animate===!0||!!t.animation||tt.includes("animation");const kt=B.node(),P=typeof kt.getTotalLength=="function"?kt.getTotalLength():0,Rt=rx[t.arrowTypeStart]||0,Tt=rx[t.arrowTypeEnd]||0;if(t.look==="neo"&&!X){const Ht=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?e7(P,Rt,Tt):`0 ${Rt} ${P-Rt-Tt} ${Tt}`}; stroke-dashoffset: 0;`;B.attr("style",Ht+B.attr("style"))}}B.attr("data-edge",!0),B.attr("data-et","edge"),B.attr("data-id",t.id),B.attr("data-points",g),B.attr("data-look",je(t.look)),t.showPoints&&b.forEach(tt=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",tt.x).attr("cy",tt.y)});let G="";(pe().flowchart.arrowMarkerAbsolute||pe().state.arrowMarkerAbsolute)&&(G=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,G=G.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),nt.info("arrowTypeStart",t.arrowTypeStart),nt.info("arrowTypeEnd",t.arrowTypeEnd);const H=!X&&(t==null?void 0:t.look)==="neo";j9(B,t,G,a,i,H,O);const M=Math.floor(u.length/2),N=u[M];mr.isLabelCoordinateInPath(N,B.attr("d"))||(h=!0);let q={};return h&&(q.updatedPath=u),q.originalPath=t.points,q},"insertEdge");function oS(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let s=0;s<i;s++){const a=e[s],o=e[s-1],l=e[s+1];if(s===0)r+=`M${a.x},${a.y}`;else if(s===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-o.x,u=a.y-o.y,h=l.x-a.x,f=l.y-a.y,d=Math.hypot(c,u),p=Math.hypot(h,f);if(d<n||p<n){r+=`L${a.x},${a.y}`;continue}const g=c/d,b=u/d,m=h/p,_=f/p,k=g*m+b*_,T=Math.max(-1,Math.min(1,k)),E=Math.acos(T);if(E<n||Math.abs(Math.PI-E)<n){r+=`L${a.x},${a.y}`;continue}const S=Math.min(t/Math.sin(E/2),d/2,p/2),B=a.x-g*S,L=a.y-b*S,W=a.x+m*S,O=a.y+_*S;r+=`L${B},${L}`,r+=`Q${a.x},${a.y} ${W},${O}`}}return r}C(oS,"generateRoundedPath");function Xp(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}C(Xp,"calculateDeltaAndAngle");function lS(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&pr[t.arrowTypeStart]){const n=pr[t.arrowTypeStart],s=e[0],a=e[1],{angle:o}=Xp(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=s.x+l,r[0].y=s.y+c}const i=e.length;if(i>=2&&pr[t.arrowTypeEnd]){const n=pr[t.arrowTypeEnd],s=e[i-1],a=e[i-2],{angle:o}=Xp(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=s.x-l,r[i-1].y=s.y-c}return r}C(lS,"applyMarkerOffsetsToPoints");var r7=C((e,t,r,i)=>{t.forEach(n=>{w7[n](e,r,i)})},"insertMarkers"),i7=C((e,t,r)=>{nt.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),n7=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),s7=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),a7=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),o7=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),l7=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),c7=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),u7=C((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),h7=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),d7=C((e,t,r)=>{const i=Oe(),{themeVariables:n}=i,{transitionColor:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${s}`)},"barbNeo"),f7=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),p7=C((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),g7=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),m7=C((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),b7=C((e,t,r)=>{const i=Oe(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${s}`)},"only_one_neo"),y7=C((e,t,r)=>{const i=Oe(),{themeVariables:n}=i,{strokeWidth:s,mainBkg:a}=n,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");o.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${s}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${s}`)},"zero_or_one_neo"),x7=C((e,t,r)=>{const i=Oe(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${s}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${s}`)},"one_or_more_neo"),C7=C((e,t,r)=>{const i=Oe(),{themeVariables:n}=i,{strokeWidth:s,mainBkg:a}=n,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");o.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${s}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${s}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${s}`)},"zero_or_more_neo"),_7=C((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
421
- L20,10
422
- M20,10
423
- L0,20`)},"requirement_arrow"),k7=C((e,t,r)=>{const i=Oe(),{themeVariables:n}=i,{strokeWidth:s}=n;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
424
- L20,10
425
- M20,10
426
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),T7=C((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),E7=C((e,t,r)=>{const i=Oe(),{themeVariables:n}=i,{strokeWidth:s}=n,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),w7={extension:i7,composition:n7,aggregation:s7,dependency:a7,lollipop:o7,point:l7,circle:c7,cross:u7,barb:h7,barbNeo:d7,only_one:f7,zero_or_one:p7,one_or_more:g7,zero_or_more:m7,only_one_neo:b7,zero_or_one_neo:y7,one_or_more_neo:x7,zero_or_more_neo:C7,requirement_arrow:_7,requirement_contains:T7,requirement_arrow_neo:k7,requirement_contains_neo:E7},cS=r7,uS=typeof global=="object"&&global&&global.Object===Object&&global,S7=typeof self=="object"&&self&&self.Object===Object&&self,dn=uS||S7||Function("return this")(),Pi=dn.Symbol,hS=Object.prototype,A7=hS.hasOwnProperty,v7=hS.toString,_o=Pi?Pi.toStringTag:void 0;function L7(e){var t=A7.call(e,_o),r=e[_o];try{e[_o]=void 0;var i=!0}catch{}var n=v7.call(e);return i&&(t?e[_o]=r:delete e[_o]),n}var I7=Object.prototype,B7=I7.toString;function R7(e){return B7.call(e)}var O7="[object Null]",N7="[object Undefined]",ax=Pi?Pi.toStringTag:void 0;function Xa(e){return e==null?e===void 0?N7:O7:ax&&ax in Object(e)?L7(e):R7(e)}function Ss(e){return e!=null&&typeof e=="object"}var D7="[object Symbol]";function Gm(e){return typeof e=="symbol"||Ss(e)&&Xa(e)==D7}function dS(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r<i;)n[r]=t(e[r],r,e);return n}var Fr=Array.isArray,ox=Pi?Pi.prototype:void 0,lx=ox?ox.toString:void 0;function fS(e){if(typeof e=="string")return e;if(Fr(e))return dS(e,fS)+"";if(Gm(e))return lx?lx.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Ym(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function wh(e){return e}var P7="[object AsyncFunction]",M7="[object Function]",F7="[object GeneratorFunction]",$7="[object Proxy]";function $u(e){if(!Ym(e))return!1;var t=Xa(e);return t==M7||t==F7||t==P7||t==$7}var tf=dn["__core-js_shared__"],cx=(function(){var e=/[^.]+$/.exec(tf&&tf.keys&&tf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function H7(e){return!!cx&&cx in e}var z7=Function.prototype,U7=z7.toString;function Ds(e){if(e!=null){try{return U7.call(e)}catch{}try{return e+""}catch{}}return""}var q7=/[\\^$.*+?()[\]{}|]/g,W7=/^\[object .+?Constructor\]$/,j7=Function.prototype,V7=Object.prototype,G7=j7.toString,Y7=V7.hasOwnProperty,X7=RegExp("^"+G7.call(Y7).replace(q7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function K7(e){if(!Ym(e)||H7(e))return!1;var t=$u(e)?X7:W7;return t.test(Ds(e))}function Q7(e,t){return e==null?void 0:e[t]}function Ps(e,t){var r=Q7(e,t);return K7(r)?r:void 0}var Kp=Ps(dn,"WeakMap");function Z7(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function J7(){}var tH=800,eH=16,rH=Date.now;function iH(e){var t=0,r=0;return function(){var i=rH(),n=eH-(i-r);if(r=i,n>0){if(++t>=tH)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ho(e){return function(){return e}}var ux=(function(){try{var e=Ps(Object,"defineProperty");return e({},"",{}),e}catch{}})(),nH=ux?function(e,t){return ux(e,"toString",{configurable:!0,enumerable:!1,value:Ho(t),writable:!0})}:wh,sH=iH(nH);function aH(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function oH(e,t,r,i){for(var n=e.length,s=r+-1;++s<n;)if(t(e[s],s,e))return s;return-1}function lH(e){return e!==e}function cH(e,t,r){for(var i=r-1,n=e.length;++i<n;)if(e[i]===t)return i;return-1}function uH(e,t,r){return t===t?cH(e,t,r):oH(e,lH,r)}function hH(e,t){var r=e==null?0:e.length;return!!r&&uH(e,t,0)>-1}var dH=9007199254740991,fH=/^(?:0|[1-9]\d*)$/;function pS(e,t){var r=typeof e;return t=t??dH,!!t&&(r=="number"||r!="symbol"&&fH.test(e))&&e>-1&&e%1==0&&e<t}function gS(e,t){return e===t||e!==e&&t!==t}var hx=Math.max;function pH(e,t,r){return t=hx(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,s=hx(i.length-t,0),a=Array(s);++n<s;)a[n]=i[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=i[n];return o[t]=r(a),Z7(e,this,o)}}function gH(e,t){return sH(pH(e,t,wh),e+"")}var mH=9007199254740991;function Xm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=mH}function Sh(e){return e!=null&&Xm(e.length)&&!$u(e)}var bH=Object.prototype;function mS(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||bH;return e===r}function yH(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var xH="[object Arguments]";function dx(e){return Ss(e)&&Xa(e)==xH}var bS=Object.prototype,CH=bS.hasOwnProperty,_H=bS.propertyIsEnumerable,Ah=dx((function(){return arguments})())?dx:function(e){return Ss(e)&&CH.call(e,"callee")&&!_H.call(e,"callee")};function kH(){return!1}var yS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fx=yS&&typeof module=="object"&&module&&!module.nodeType&&module,TH=fx&&fx.exports===yS,px=TH?dn.Buffer:void 0,EH=px?px.isBuffer:void 0,Hu=EH||kH,wH="[object Arguments]",SH="[object Array]",AH="[object Boolean]",vH="[object Date]",LH="[object Error]",IH="[object Function]",BH="[object Map]",RH="[object Number]",OH="[object Object]",NH="[object RegExp]",DH="[object Set]",PH="[object String]",MH="[object WeakMap]",FH="[object ArrayBuffer]",$H="[object DataView]",HH="[object Float32Array]",zH="[object Float64Array]",UH="[object Int8Array]",qH="[object Int16Array]",WH="[object Int32Array]",jH="[object Uint8Array]",VH="[object Uint8ClampedArray]",GH="[object Uint16Array]",YH="[object Uint32Array]",ve={};ve[HH]=ve[zH]=ve[UH]=ve[qH]=ve[WH]=ve[jH]=ve[VH]=ve[GH]=ve[YH]=!0;ve[wH]=ve[SH]=ve[FH]=ve[AH]=ve[$H]=ve[vH]=ve[LH]=ve[IH]=ve[BH]=ve[RH]=ve[OH]=ve[NH]=ve[DH]=ve[PH]=ve[MH]=!1;function XH(e){return Ss(e)&&Xm(e.length)&&!!ve[Xa(e)]}function KH(e){return function(t){return e(t)}}var xS=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jo=xS&&typeof module=="object"&&module&&!module.nodeType&&module,QH=Jo&&Jo.exports===xS,ef=QH&&uS.process,gx=(function(){try{var e=Jo&&Jo.require&&Jo.require("util").types;return e||ef&&ef.binding&&ef.binding("util")}catch{}})(),mx=gx&&gx.isTypedArray,Km=mx?KH(mx):XH,ZH=Object.prototype,JH=ZH.hasOwnProperty;function tz(e,t){var r=Fr(e),i=!r&&Ah(e),n=!r&&!i&&Hu(e),s=!r&&!i&&!n&&Km(e),a=r||i||n||s,o=a?yH(e.length,String):[],l=o.length;for(var c in e)(t||JH.call(e,c))&&!(a&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||pS(c,l)))&&o.push(c);return o}function ez(e,t){return function(r){return e(t(r))}}var rz=ez(Object.keys,Object),iz=Object.prototype,nz=iz.hasOwnProperty;function CS(e){if(!mS(e))return rz(e);var t=[];for(var r in Object(e))nz.call(e,r)&&r!="constructor"&&t.push(r);return t}function Bi(e){return Sh(e)?tz(e):CS(e)}var sz=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,az=/^\w*$/;function Qm(e,t){if(Fr(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Gm(e)?!0:az.test(e)||!sz.test(e)||t!=null&&e in Object(t)}var _l=Ps(Object,"create");function oz(){this.__data__=_l?_l(null):{},this.size=0}function lz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var cz="__lodash_hash_undefined__",uz=Object.prototype,hz=uz.hasOwnProperty;function dz(e){var t=this.__data__;if(_l){var r=t[e];return r===cz?void 0:r}return hz.call(t,e)?t[e]:void 0}var fz=Object.prototype,pz=fz.hasOwnProperty;function gz(e){var t=this.__data__;return _l?t[e]!==void 0:pz.call(t,e)}var mz="__lodash_hash_undefined__";function bz(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=_l&&t===void 0?mz:t,this}function As(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}As.prototype.clear=oz;As.prototype.delete=lz;As.prototype.get=dz;As.prototype.has=gz;As.prototype.set=bz;function yz(){this.__data__=[],this.size=0}function vh(e,t){for(var r=e.length;r--;)if(gS(e[r][0],t))return r;return-1}var xz=Array.prototype,Cz=xz.splice;function _z(e){var t=this.__data__,r=vh(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():Cz.call(t,r,1),--this.size,!0}function kz(e){var t=this.__data__,r=vh(t,e);return r<0?void 0:t[r][1]}function Tz(e){return vh(this.__data__,e)>-1}function Ez(e,t){var r=this.__data__,i=vh(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function fn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}fn.prototype.clear=yz;fn.prototype.delete=_z;fn.prototype.get=kz;fn.prototype.has=Tz;fn.prototype.set=Ez;var kl=Ps(dn,"Map");function wz(){this.size=0,this.__data__={hash:new As,map:new(kl||fn),string:new As}}function Sz(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Lh(e,t){var r=e.__data__;return Sz(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Az(e){var t=Lh(this,e).delete(e);return this.size-=t?1:0,t}function vz(e){return Lh(this,e).get(e)}function Lz(e){return Lh(this,e).has(e)}function Iz(e,t){var r=Lh(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function pn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}pn.prototype.clear=wz;pn.prototype.delete=Az;pn.prototype.get=vz;pn.prototype.has=Lz;pn.prototype.set=Iz;var Bz="Expected a function";function Zm(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Bz);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=e.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(Zm.Cache||pn),r}Zm.Cache=pn;var Rz=500;function Oz(e){var t=Zm(e,function(i){return r.size===Rz&&r.clear(),i}),r=t.cache;return t}var Nz=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dz=/\\(\\)?/g,Pz=Oz(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Nz,function(r,i,n,s){t.push(n?s.replace(Dz,"$1"):i||r)}),t});function Mz(e){return e==null?"":fS(e)}function _S(e,t){return Fr(e)?e:Qm(e,t)?[e]:Pz(Mz(e))}function Ih(e){if(typeof e=="string"||Gm(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function kS(e,t){t=_S(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Ih(t[r++])];return r&&r==i?e:void 0}function Fz(e,t,r){var i=e==null?void 0:kS(e,t);return i===void 0?r:i}function TS(e,t){for(var r=-1,i=t.length,n=e.length;++r<i;)e[n+r]=t[r];return e}var bx=Pi?Pi.isConcatSpreadable:void 0;function $z(e){return Fr(e)||Ah(e)||!!(bx&&e&&e[bx])}function Hz(e,t,r,i,n){var s=-1,a=e.length;for(r||(r=$z),n||(n=[]);++s<a;){var o=e[s];r(o)?TS(n,o):i||(n[n.length]=o)}return n}function zz(e,t,r,i){var n=-1,s=e==null?0:e.length;for(i&&s&&(r=e[++n]);++n<s;)r=t(r,e[n],n,e);return r}function Uz(){this.__data__=new fn,this.size=0}function qz(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Wz(e){return this.__data__.get(e)}function jz(e){return this.__data__.has(e)}var Vz=200;function Gz(e,t){var r=this.__data__;if(r instanceof fn){var i=r.__data__;if(!kl||i.length<Vz-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new pn(i)}return r.set(e,t),this.size=r.size,this}function ln(e){var t=this.__data__=new fn(e);this.size=t.size}ln.prototype.clear=Uz;ln.prototype.delete=qz;ln.prototype.get=Wz;ln.prototype.has=jz;ln.prototype.set=Gz;function ES(e,t){for(var r=-1,i=e==null?0:e.length,n=0,s=[];++r<i;){var a=e[r];t(a,r,e)&&(s[n++]=a)}return s}function Yz(){return[]}var Xz=Object.prototype,Kz=Xz.propertyIsEnumerable,yx=Object.getOwnPropertySymbols,Qz=yx?function(e){return e==null?[]:(e=Object(e),ES(yx(e),function(t){return Kz.call(e,t)}))}:Yz;function Zz(e,t,r){var i=t(e);return Fr(e)?i:TS(i,r(e))}function xx(e){return Zz(e,Bi,Qz)}var Qp=Ps(dn,"DataView"),Zp=Ps(dn,"Promise"),pa=Ps(dn,"Set"),Cx="[object Map]",Jz="[object Object]",_x="[object Promise]",kx="[object Set]",Tx="[object WeakMap]",Ex="[object DataView]",tU=Ds(Qp),eU=Ds(kl),rU=Ds(Zp),iU=Ds(pa),nU=Ds(Kp),en=Xa;(Qp&&en(new Qp(new ArrayBuffer(1)))!=Ex||kl&&en(new kl)!=Cx||Zp&&en(Zp.resolve())!=_x||pa&&en(new pa)!=kx||Kp&&en(new Kp)!=Tx)&&(en=function(e){var t=Xa(e),r=t==Jz?e.constructor:void 0,i=r?Ds(r):"";if(i)switch(i){case tU:return Ex;case eU:return Cx;case rU:return _x;case iU:return kx;case nU:return Tx}return t});var wx=dn.Uint8Array,sU="__lodash_hash_undefined__";function aU(e){return this.__data__.set(e,sU),this}function oU(e){return this.__data__.has(e)}function Tl(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new pn;++t<r;)this.add(e[t])}Tl.prototype.add=Tl.prototype.push=aU;Tl.prototype.has=oU;function lU(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function wS(e,t){return e.has(t)}var cU=1,uU=2;function SS(e,t,r,i,n,s){var a=r&cU,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var h=-1,f=!0,d=r&uU?new Tl:void 0;for(s.set(e,t),s.set(t,e);++h<o;){var p=e[h],g=t[h];if(i)var b=a?i(g,p,h,t,e,s):i(p,g,h,e,t,s);if(b!==void 0){if(b)continue;f=!1;break}if(d){if(!lU(t,function(m,_){if(!wS(d,_)&&(p===m||n(p,m,r,i,s)))return d.push(_)})){f=!1;break}}else if(!(p===g||n(p,g,r,i,s))){f=!1;break}}return s.delete(e),s.delete(t),f}function hU(e){var t=-1,r=Array(e.size);return e.forEach(function(i,n){r[++t]=[n,i]}),r}function Jm(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var dU=1,fU=2,pU="[object Boolean]",gU="[object Date]",mU="[object Error]",bU="[object Map]",yU="[object Number]",xU="[object RegExp]",CU="[object Set]",_U="[object String]",kU="[object Symbol]",TU="[object ArrayBuffer]",EU="[object DataView]",Sx=Pi?Pi.prototype:void 0,rf=Sx?Sx.valueOf:void 0;function wU(e,t,r,i,n,s,a){switch(r){case EU:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case TU:return!(e.byteLength!=t.byteLength||!s(new wx(e),new wx(t)));case pU:case gU:case yU:return gS(+e,+t);case mU:return e.name==t.name&&e.message==t.message;case xU:case _U:return e==t+"";case bU:var o=hU;case CU:var l=i&dU;if(o||(o=Jm),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=fU,a.set(e,t);var u=SS(o(e),o(t),i,n,s,a);return a.delete(e),u;case kU:if(rf)return rf.call(e)==rf.call(t)}return!1}var SU=1,AU=Object.prototype,vU=AU.hasOwnProperty;function LU(e,t,r,i,n,s){var a=r&SU,o=xx(e),l=o.length,c=xx(t),u=c.length;if(l!=u&&!a)return!1;for(var h=l;h--;){var f=o[h];if(!(a?f in t:vU.call(t,f)))return!1}var d=s.get(e),p=s.get(t);if(d&&p)return d==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var b=a;++h<l;){f=o[h];var m=e[f],_=t[f];if(i)var k=a?i(_,m,f,t,e,s):i(m,_,f,e,t,s);if(!(k===void 0?m===_||n(m,_,r,i,s):k)){g=!1;break}b||(b=f=="constructor")}if(g&&!b){var T=e.constructor,E=t.constructor;T!=E&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof E=="function"&&E instanceof E)&&(g=!1)}return s.delete(e),s.delete(t),g}var IU=1,Ax="[object Arguments]",vx="[object Array]",Cc="[object Object]",BU=Object.prototype,Lx=BU.hasOwnProperty;function RU(e,t,r,i,n,s){var a=Fr(e),o=Fr(t),l=a?vx:en(e),c=o?vx:en(t);l=l==Ax?Cc:l,c=c==Ax?Cc:c;var u=l==Cc,h=c==Cc,f=l==c;if(f&&Hu(e)){if(!Hu(t))return!1;a=!0,u=!1}if(f&&!u)return s||(s=new ln),a||Km(e)?SS(e,t,r,i,n,s):wU(e,t,l,r,i,n,s);if(!(r&IU)){var d=u&&Lx.call(e,"__wrapped__"),p=h&&Lx.call(t,"__wrapped__");if(d||p){var g=d?e.value():e,b=p?t.value():t;return s||(s=new ln),n(g,b,r,i,s)}}return f?(s||(s=new ln),LU(e,t,r,i,n,s)):!1}function t0(e,t,r,i,n){return e===t?!0:e==null||t==null||!Ss(e)&&!Ss(t)?e!==e&&t!==t:RU(e,t,r,i,t0,n)}var OU=1,NU=2;function DU(e,t,r,i){var n=r.length,s=n;if(e==null)return!s;for(e=Object(e);n--;){var a=r[n];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++n<s;){a=r[n];var o=a[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var u=new ln,h;if(!(h===void 0?t0(c,l,OU|NU,i,u):h))return!1}}return!0}function AS(e){return e===e&&!Ym(e)}function PU(e){for(var t=Bi(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,AS(n)]}return t}function vS(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function MU(e){var t=PU(e);return t.length==1&&t[0][2]?vS(t[0][0],t[0][1]):function(r){return r===e||DU(r,e,t)}}function FU(e,t){return e!=null&&t in Object(e)}function $U(e,t,r){t=_S(t,e);for(var i=-1,n=t.length,s=!1;++i<n;){var a=Ih(t[i]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++i!=n?s:(n=e==null?0:e.length,!!n&&Xm(n)&&pS(a,n)&&(Fr(e)||Ah(e)))}function HU(e,t){return e!=null&&$U(e,t,FU)}var zU=1,UU=2;function qU(e,t){return Qm(e)&&AS(t)?vS(Ih(e),t):function(r){var i=Fz(r,e);return i===void 0&&i===t?HU(r,e):t0(t,i,zU|UU)}}function WU(e){return function(t){return t==null?void 0:t[e]}}function jU(e){return function(t){return kS(t,e)}}function VU(e){return Qm(e)?WU(Ih(e)):jU(e)}function LS(e){return typeof e=="function"?e:e==null?wh:typeof e=="object"?Fr(e)?qU(e[0],e[1]):MU(e):VU(e)}function GU(e){return function(t,r,i){for(var n=-1,s=Object(t),a=i(t),o=a.length;o--;){var l=a[++n];if(r(s[l],l,s)===!1)break}return t}}var YU=GU();function XU(e,t){return e&&YU(e,t,Bi)}function KU(e,t){return function(r,i){if(r==null)return r;if(!Sh(r))return e(r,i);for(var n=r.length,s=-1,a=Object(r);++s<n&&i(a[s],s,a)!==!1;);return r}}var e0=KU(XU);function QU(e){return Ss(e)&&Sh(e)}function ZU(e){return typeof e=="function"?e:wh}function Xn(e,t){var r=Fr(e)?aH:e0;return r(e,ZU(t))}function JU(e,t){var r=[];return e0(e,function(i,n,s){t(i,n,s)&&r.push(i)}),r}function _c(e,t){var r=Fr(e)?ES:JU;return r(e,LS(t))}function tq(e,t){return dS(t,function(r){return e[r]})}function nf(e){return e==null?[]:tq(e,Bi(e))}var eq="[object Map]",rq="[object Set]",iq=Object.prototype,nq=iq.hasOwnProperty;function Ix(e){if(e==null)return!0;if(Sh(e)&&(Fr(e)||typeof e=="string"||typeof e.splice=="function"||Hu(e)||Km(e)||Ah(e)))return!e.length;var t=en(e);if(t==eq||t==rq)return!e.size;if(mS(e))return!CS(e).length;for(var r in e)if(nq.call(e,r))return!1;return!0}function sa(e){return e===void 0}function sq(e,t,r,i,n){return n(e,function(s,a,o){r=i?(i=!1,s):t(r,s,a,o)}),r}function aq(e,t,r){var i=Fr(e)?zz:sq,n=arguments.length<3;return i(e,LS(t),r,n,e0)}var oq=1/0,lq=pa&&1/Jm(new pa([,-0]))[1]==oq?function(e){return new pa(e)}:J7,cq=200;function uq(e,t,r){var i=-1,n=hH,s=e.length,a=!0,o=[],l=o;if(s>=cq){var c=lq(e);if(c)return Jm(c);a=!1,n=wS,l=new Tl}else l=o;t:for(;++i<s;){var u=e[i],h=u;if(u=u!==0?u:0,a&&h===h){for(var f=l.length;f--;)if(l[f]===h)continue t;o.push(u)}else n(l,h,r)||(l!==o&&l.push(h),o.push(u))}return o}var hq=gH(function(e){return uq(Hz(e,1,QU,!0))}),dq="\0",Kn="\0",Bx="";class Bh{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Ho(void 0),this._defaultEdgeLabelFn=Ho(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Kn]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return $u(t)||(t=Ho(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Bi(this._nodes)}sources(){var t=this;return _c(this.nodes(),function(r){return Ix(t._in[r])})}sinks(){var t=this;return _c(this.nodes(),function(r){return Ix(t._out[r])})}setNodes(t,r){var i=arguments,n=this;return Xn(t,function(s){i.length>1?n.setNode(s,r):n.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Kn,this._children[t]={},this._children[Kn][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],Xn(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),Xn(Bi(this._in[t]),r),delete this._in[t],delete this._preds[t],Xn(Bi(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(sa(r))r=Kn;else{r+="";for(var i=r;!sa(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Kn)return r}}children(t){if(sa(t)&&(t=Kn),this._isCompound){var r=this._children[t];if(r)return Bi(r)}else{if(t===Kn)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Bi(r)}successors(t){var r=this._sucs[t];if(r)return Bi(r)}neighbors(t){var r=this.predecessors(t);if(r)return hq(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;Xn(this._nodes,function(a,o){t(o)&&r.setNode(o,a)}),Xn(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var n={};function s(a){var o=i.parent(a);return o===void 0||r.hasNode(o)?(n[a]=o,o):o in n?n[o]:s(o)}return this._isCompound&&Xn(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return $u(t)||(t=Ho(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return nf(this._edgeObjs)}setPath(t,r){var i=this,n=arguments;return aq(t,function(s,a){return n.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var t,r,i,n,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(n=arguments[1],s=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],s=!0)),t=""+t,r=""+r,sa(i)||(i=""+i);var o=zo(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return s&&(this._edgeLabels[o]=n),this;if(!sa(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=s?n:this._defaultEdgeLabelFn(t,r,i);var l=fq(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,Rx(this._preds[r],t),Rx(this._sucs[t],r),this._in[r][o]=l,this._out[t][o]=l,this._edgeCount++,this}edge(t,r,i){var n=arguments.length===1?sf(this._isDirected,arguments[0]):zo(this._isDirected,t,r,i);return this._edgeLabels[n]}hasEdge(t,r,i){var n=arguments.length===1?sf(this._isDirected,arguments[0]):zo(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(t,r,i){var n=arguments.length===1?sf(this._isDirected,arguments[0]):zo(this._isDirected,t,r,i),s=this._edgeObjs[n];return s&&(t=s.v,r=s.w,delete this._edgeLabels[n],delete this._edgeObjs[n],Ox(this._preds[r],t),Ox(this._sucs[t],r),delete this._in[r][n],delete this._out[t][n],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var n=nf(i);return r?_c(n,function(s){return s.v===r}):n}}outEdges(t,r){var i=this._out[t];if(i){var n=nf(i);return r?_c(n,function(s){return s.w===r}):n}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Bh.prototype._nodeCount=0;Bh.prototype._edgeCount=0;function Rx(e,t){e[t]?e[t]++:e[t]=1}function Ox(e,t){--e[t]||delete e[t]}function zo(e,t,r,i){var n=""+t,s=""+r;if(!e&&n>s){var a=n;n=s,s=a}return n+Bx+s+Bx+(sa(i)?dq:i)}function fq(e,t,r,i){var n=""+t,s=""+r;if(!e&&n>s){var a=n;n=s,s=a}var o={v:n,w:s};return i&&(o.name=i),o}function sf(e,t){return zo(e,t.v,t.w,t.name)}function IS(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),n=r.insert("g").attr("class",t),s=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:n,edgeLabels:s,nodes:a,rootGroups:r}}C(IS,"createLayoutElementGroups");async function BS(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await Vt(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}C(BS,"measureGroupLabel");async function RS(e,t,r){var s;const i=await jm(e,t,r),n=((s=i.node())==null?void 0:s.getBBox())??{width:0,height:0};return t.width=n.width,t.height=n.height,i}C(RS,"insertMeasuredNode");async function OS(e,t){const r=new Bh({multigraph:!0,compound:!0}),i=[...t.edges],n=pe(),s=IS(e),{edgeLabels:a,nodes:o}=s,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async u=>{if(u.isGroup)c&&await BS(o,u),r.setNode(u.id,{...u});else{if(c){const h=await RS(o,u,{config:n,dir:u.dir});l.set(u.id,h)}r.setNode(u.id,{...u})}}));for(const u of i)c&&nS(u)&&await Vm(a,u),r.setEdge(u.start,u.end,{...u},u.id),t.edges.some(f=>f.id===u.id)||t.edges.push(u);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:u}=await I(async()=>{const{captureNodeSizes:h}=await import("./sizeCapture-INFHLROL-Dpubco_U.js");return{captureNodeSizes:h}},__vite__mapDeps([101,102,103,104]));u(e,t)}return{graph:r,groups:s,nodeElements:l}}C(OS,"createGraphWithElements");var me=new Map,hs=new Map,NS=new Map,pq=C(()=>{hs.clear(),NS.clear(),me.clear()},"clear"),El=C((e,t)=>{const r=hs.get(t)||[];return nt.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),gq=C((e,t)=>{const r=hs.get(t)||[];return nt.info("Descendants of ",t," is ",r),nt.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||El(e.v,t)||El(e.w,t)||r.includes(e.w):(nt.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),DS=C((e,t,r,i)=>{nt.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const n=t.children(e)||[];e!==i&&n.push(e),nt.debug("Copying (nodes) clusterId",e,"nodes",n),n.forEach(s=>{if(t.children(s).length>0)DS(s,t,r,i);else{const a=t.node(s);nt.info("cp ",s," to ",i," with parent ",e),r.setNode(s,a),i!==t.parent(s)&&(nt.debug("Setting parent",s,t.parent(s)),r.setParent(s,t.parent(s))),e!==i&&s!==e?(nt.debug("Setting parent",s,e),r.setParent(s,e)):(nt.info("In copy ",e,"root",i,"data",t.node(e),i),nt.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==i,"node!==clusterId",s!==e));const o=t.edges(s);nt.debug("Copying Edges",o),o.forEach(l=>{nt.info("Edge",l);const c=t.edge(l.v,l.w,l.name);nt.info("Edge data",c,i);try{gq(l,i)?(nt.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),nt.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):nt.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(u){nt.error(u)}})}nt.debug("Removing node",s),t.removeNode(s)})},"copy"),PS=C((e,t)=>{const r=t.children(e);let i=[...r];for(const n of r)NS.set(n,e),i=[...i,...PS(n,t)];return i},"extractDescendants"),mq=C((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),n=e.edges().filter(l=>l.v===r||l.w===r),s=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=n.map(l=>({v:l.v,w:l.w}));return s.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),zu=C((e,t,r)=>{const i=t.children(e);if(nt.trace("Searching children of id ",e,i),i.length<1)return e;let n;for(const s of i){const a=zu(s,t,r),o=mq(t,r,a);if(a)if(o.length>0)n=a;else return a}return n},"findNonClusterChild"),Nx=C(e=>!me.has(e)||!me.get(e).externalConnections?e:me.has(e)?me.get(e).id:e,"getAnchorId"),Slt=C((e,t)=>{var r;if(!e||t>10){nt.debug("Opting out, no graph ");return}else nt.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(nt.debug("Cluster identified",i," Replacement id in edges: ",zu(i,e,i)),hs.set(i,PS(i,e)),me.set(i,{id:zu(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const n=e.children(i),s=e.edges();n.length>0?(nt.debug("Cluster identified",i,hs),s.forEach(a=>{const o=El(a.v,i),l=El(a.w,i);o^l&&(nt.debug("Edge: ",a," leaves cluster ",i),nt.debug("Descendants of XXX ",i,": ",hs.get(i)),me.get(i).externalConnections=!0)})):nt.debug("Not a cluster ",i,hs)});for(let i of me.keys()){const n=me.get(i).id,s=e.parent(n);s!==i&&me.has(s)&&!me.get(s).externalConnections&&(me.get(i).id=s);const a=e.edges().some(o=>o.v===i);if(n&&((r=me.get(i))!=null&&r.externalConnections)&&a&&$S(e,n,i)){const o=bq(e,i,e.parent(n));o&&(me.get(i).id=o)}}e.edges().forEach(function(i){const n=e.edge(i);nt.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),nt.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let s=i.v,a=i.w;if(nt.debug("Fix XXX",me,"ids:",i.v,i.w,"Translating: ",me.get(i.v)," --- ",me.get(i.w)),me.get(i.v)||me.get(i.w)){if(nt.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),s=Nx(i.v),a=Nx(i.w),e.removeEdge(i.v,i.w,i.name),s!==i.v){const o=e.parent(s);me.get(o).externalConnections=!0,n.fromCluster=i.v}if(a!==i.w){const o=e.parent(a);me.get(o).externalConnections=!0,n.toCluster=i.w}nt.debug("Fix Replacing with XXX",s,a,i.name),e.setEdge(s,a,n,i.name)}}),MS(e,0),nt.trace(me)},"adjustClustersAndEdges"),MS=C((e,t)=>{var n,s;if(t>10){nt.error("Bailing out");return}let r=e.nodes(),i=!1;for(const a of r){const o=e.children(a);i=i||o.length>0}if(!i){nt.debug("Done, no node has children",e.nodes());return}nt.debug("Nodes = ",r,t);for(const a of r)if(nt.debug("Extracting node",a,me,me.has(a)&&!me.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",t),!me.has(a))nt.debug("Not a cluster",a,t);else if(!me.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){nt.debug("Cluster without external connections, without a parent and with children",a,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(s=(n=me.get(a))==null?void 0:n.clusterData)!=null&&s.dir&&(l=me.get(a).clusterData.dir,nt.debug("Fixing dir",me.get(a).clusterData.dir,l));const c=new Bh({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});DS(a,e,c,a),e.setNode(a,{clusterNode:!0,id:a,clusterData:me.get(a).clusterData,label:me.get(a).label,graph:c})}else nt.debug("Cluster ** ",a," **not meeting the criteria !externalConnections:",!me.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),t),nt.debug(me);r=e.nodes(),nt.debug("New list of nodes",r);for(const a of r){const o=e.node(a);nt.debug(" Now next level",a,o),o!=null&&o.clusterNode&&MS(o.graph,t+1)}},"extractor"),FS=C((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const n=e.children(i),s=FS(e,n);r=[...r,...s]}),r},"sorter"),Alt=C(e=>FS(e,e.children()),"sortNodesByHierarchy"),$S=C((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const n=me.get(i);if(n&&!n.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),bq=C((e,t,r)=>{const i=e.children(t)??[];for(const n of i){if(n===r||El(n,r))continue;const s=zu(n,e,t);if(s&&!$S(e,s,t))return s}return null},"findSafeAnchorNode");function yq({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:n,paintOptions:s}){const a=t??zS;return C(async function(l,c,u,h){const f=c.select("g");((u==null?void 0:u.insertMarkers)??cS)(f,l.markers,l.type,l.diagramId),HS();const d={element:f,helpers:u,options:h};d.preparedLayout=await(e==null?void 0:e(l,d));const p=await a(l,d),g=await r(l,d),b={...d,measure:p};i?await i(l,b,g):await US(l,b,s),await(n==null?void 0:n(l,b,g))},"render")}C(yq,"createCommonLayoutRenderer");function HS(){D9(),X9(),q9(),pq()}C(HS,"clearLayoutRenderState");async function zS(e,{element:t}){return await OS(t,e)}C(zS,"defaultMeasureLayout");async function US(e,t,r={}){var a,o;const{measure:i}=t,{groups:n}=i;for(const l of((a=r.getNodes)==null?void 0:a.call(r,e,t))??e.nodes)(o=r.skipNode)!=null&&o.call(r,l,t)||await qS(n,l,t,r);const s=jS(e.nodes);for(const l of e.edges)VS(l,r)||await GS(n,l,s,e,r,t)}C(US,"paintLayoutData");async function qS(e,t,r,i){t.clusterNode?ex(t):WS(t,r,i)?await iS(e.clusters,t):ex(t)}C(qS,"paintLayoutNode");function WS(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}C(WS,"shouldPaintAsCluster");function jS(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}C(jS,"buildNodeLookup");function VS(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}C(VS,"shouldSkipPaintEdge");async function GS(e,t,r,i,n,s){const a=aS(e.edgePaths,{...t},n.clusterDb??new Map,i.type,Jp(t.start,t,r,s,n),Jp(t.end,t,r,s,n),i.diagramId,YS(t,n));nS(t)&&(Ma.has(t.id)||await Vm(e.edgeLabels,t),XS(t,a))}C(GS,"paintLayoutEdge");function Jp(e,t,r,i,n){var s;return((s=n.getEdgeNode)==null?void 0:s.call(n,e,t,i))??(e?r.get(e)??{}:{})}C(Jp,"getRenderedNode");function YS(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}C(YS,"shouldSkipIntersect");function XS(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=Oe(),{subGraphTitleTotalMargin:n}=Th({flowchart:i.flowchart??{}});if(e.label){const s=Ma.get(e.id);let a=e.x,o=e.y;if(r){const l=mr.calcLabelPosition(r);nt.debug("Moving label "+e.label+" from (",a,",",o,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(a=l.x,o=l.y)}s.attr("transform",`translate(${a}, ${o+n/2})`)}if(e!=null&&e.startLabelLeft){const s=$e.get(e.id).startLeft;let a=e==null?void 0:e.x,o=e==null?void 0:e.y;if(r){const l=mr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.startLabelRight){const s=$e.get(e.id).startRight;let a=e.x,o=e.y;if(r){const l=mr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.endLabelLeft){const s=$e.get(e.id).endLeft;let a=e.x,o=e.y;if(r){const l=mr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}if(e.endLabelRight){const s=$e.get(e.id).endRight;let a=e.x,o=e.y;if(r){const l=mr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,o=l.y}s.attr("transform",`translate(${a}, ${o})`)}}C(XS,"positionRenderedEdgeLabel");function KS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}C(KS,"getDefaultExportFromCjs");var hr={},kc={},_n={},Dx;function Ka(){if(Dx)return _n;Dx=1;function e(a){return typeof a>"u"||a===null}C(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}C(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}C(r,"toArray");function i(a,o){if(o){const l=Object.keys(o);for(let c=0,u=l.length;c<u;c+=1){const h=l[c];a[h]=o[h]}}return a}C(i,"extend");function n(a,o){let l="";for(let c=0;c<o;c+=1)l+=a;return l}C(n,"repeat");function s(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return C(s,"isNegativeZero"),_n.isNothing=e,_n.isObject=t,_n.toArray=r,_n.repeat=n,_n.isNegativeZero=s,_n.extend=i,_n}C(Ka,"requireCommon");var af,Px;function Qa(){if(Px)return af;Px=1;function e(r,i){let n="";const s=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(n+='in "'+r.mark.name+'" '),n+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(n+=`
427
-
428
- `+r.mark.snippet),s+" "+n):s}C(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return C(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=C(function(i){return this.name+": "+e(this,i)},"toString"),af=t,af}C(Qa,"requireException");var of,Mx;function QS(){if(Mx)return of;Mx=1;const e=Ka();function t(n,s,a,o,l){let c="",u="";const h=Math.floor(l/2)-1;return o-s>h&&(c=" ... ",s=o-h+c.length),a-o>h&&(u=" ...",a=o+h-u.length),{str:c+n.slice(s,a).replace(/\t/g,"→")+u,pos:o-s+c.length}}C(t,"getLine");function r(n,s){return e.repeat(" ",s-n.length)+n}C(r,"padStart");function i(n,s){if(s=Object.create(s||null),!n.buffer)return null;s.maxLength||(s.maxLength=79),typeof s.indent!="number"&&(s.indent=1),typeof s.linesBefore!="number"&&(s.linesBefore=3),typeof s.linesAfter!="number"&&(s.linesAfter=2);const a=/\r?\n|\r|\0/g,o=[0],l=[];let c,u=-1;for(;c=a.exec(n.buffer);)l.push(c.index),o.push(c.index+c[0].length),n.position<=c.index&&u<0&&(u=o.length-2);u<0&&(u=o.length-1);let h="";const f=Math.min(n.line+s.linesAfter,l.length).toString().length,d=s.maxLength-(s.indent+f+3);for(let g=1;g<=s.linesBefore&&!(u-g<0);g++){const b=t(n.buffer,o[u-g],l[u-g],n.position-(o[u]-o[u-g]),d);h=e.repeat(" ",s.indent)+r((n.line-g+1).toString(),f)+" | "+b.str+`
429
- `+h}const p=t(n.buffer,o[u],l[u],n.position,d);h+=e.repeat(" ",s.indent)+r((n.line+1).toString(),f)+" | "+p.str+`
430
- `,h+=e.repeat("-",s.indent+f+3+p.pos)+`^
431
- `;for(let g=1;g<=s.linesAfter&&!(u+g>=l.length);g++){const b=t(n.buffer,o[u+g],l[u+g],n.position-(o[u]-o[u+g]),d);h+=e.repeat(" ",s.indent)+r((n.line+g+1).toString(),f)+" | "+b.str+`
432
- `}return h.replace(/\n$/,"")}return C(i,"makeSnippet"),of=i,of}C(QS,"requireSnippet");var lf,Fx;function xr(){if(Fx)return lf;Fx=1;const e=Qa(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(s){const a={};return s!==null&&Object.keys(s).forEach(function(o){s[o].forEach(function(l){a[String(l)]=o})}),a}C(i,"compileStyleAliases");function n(s,a){if(a=a||{},Object.keys(a).forEach(function(o){if(t.indexOf(o)===-1)throw new e('Unknown option "'+o+'" is met in definition of "'+s+'" YAML type.')}),this.options=a,this.tag=s,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(o){return o},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+s+'" YAML type.')}return C(n,"Type2"),lf=n,lf}C(xr,"requireType");var cf,$x;function r0(){if($x)return cf;$x=1;const e=Qa(),t=xr();function r(s,a){const o=[];return s[a].forEach(function(l){let c=o.length;o.forEach(function(u,h){u.tag===l.tag&&u.kind===l.kind&&u.multi===l.multi&&(c=h)}),o[c]=l}),o}C(r,"compileList");function i(){const s={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(o){o.multi?(s.multi[o.kind].push(o),s.multi.fallback.push(o)):s[o.kind][o.tag]=s.fallback[o.tag]=o}C(a,"collectType");for(let o=0,l=arguments.length;o<l;o+=1)arguments[o].forEach(a);return s}C(i,"compileMap");function n(s){return this.extend(s)}return C(n,"Schema2"),n.prototype.extend=C(function(a){let o=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(o=o.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(u){if(!(u instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(u){if(!(u instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(n.prototype);return c.implicit=(this.implicit||[]).concat(o),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),cf=n,cf}C(r0,"requireSchema");var uf,Hx;function i0(){if(Hx)return uf;Hx=1;const e=xr();return uf=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:C(function(t){return t!==null?t:""},"construct")}),uf}C(i0,"requireStr");var hf,zx;function n0(){if(zx)return hf;zx=1;const e=xr();return hf=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:C(function(t){return t!==null?t:[]},"construct")}),hf}C(n0,"requireSeq");var df,Ux;function s0(){if(Ux)return df;Ux=1;const e=xr();return df=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:C(function(t){return t!==null?t:{}},"construct")}),df}C(s0,"requireMap");var ff,qx;function a0(){if(qx)return ff;qx=1;const e=r0();return ff=new e({explicit:[i0(),n0(),s0()]}),ff}C(a0,"requireFailsafe");var pf,Wx;function o0(){if(Wx)return pf;Wx=1;const e=xr();function t(n){if(n===null)return!0;const s=n.length;return s===1&&n==="~"||s===4&&(n==="null"||n==="Null"||n==="NULL")}C(t,"resolveYamlNull");function r(){return null}C(r,"constructYamlNull");function i(n){return n===null}return C(i,"isNull"),pf=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:C(function(){return"~"},"canonical"),lowercase:C(function(){return"null"},"lowercase"),uppercase:C(function(){return"NULL"},"uppercase"),camelcase:C(function(){return"Null"},"camelcase"),empty:C(function(){return""},"empty")},defaultStyle:"lowercase"}),pf}C(o0,"require_null");var gf,jx;function l0(){if(jx)return gf;jx=1;const e=xr();function t(n){if(n===null)return!1;const s=n.length;return s===4&&(n==="true"||n==="True"||n==="TRUE")||s===5&&(n==="false"||n==="False"||n==="FALSE")}C(t,"resolveYamlBoolean");function r(n){return n==="true"||n==="True"||n==="TRUE"}C(r,"constructYamlBoolean");function i(n){return Object.prototype.toString.call(n)==="[object Boolean]"}return C(i,"isBoolean"),gf=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:C(function(n){return n?"true":"false"},"lowercase"),uppercase:C(function(n){return n?"TRUE":"FALSE"},"uppercase"),camelcase:C(function(n){return n?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),gf}C(l0,"requireBool");var mf,Vx;function c0(){if(Vx)return mf;Vx=1;const e=Ka(),t=xr();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}C(r,"isHexCode");function i(c){return c>=48&&c<=55}C(i,"isOctCode");function n(c){return c>=48&&c<=57}C(n,"isDecCode");function s(c){if(c===null)return!1;const u=c.length;let h=0,f=!1;if(!u)return!1;let d=c[h];if((d==="-"||d==="+")&&(d=c[++h]),d==="0"){if(h+1===u)return!0;if(d=c[++h],d==="b"){for(h++;h<u;h++){if(d=c[h],d!=="0"&&d!=="1")return!1;f=!0}return f&&isFinite(a(c))}if(d==="x"){for(h++;h<u;h++){if(!r(c.charCodeAt(h)))return!1;f=!0}return f&&isFinite(a(c))}if(d==="o"){for(h++;h<u;h++){if(!i(c.charCodeAt(h)))return!1;f=!0}return f&&isFinite(a(c))}}for(;h<u;h++){if(!n(c.charCodeAt(h)))return!1;f=!0}return f?isFinite(a(c)):!1}C(s,"resolveYamlInteger");function a(c){let u=c,h=1,f=u[0];if((f==="-"||f==="+")&&(f==="-"&&(h=-1),u=u.slice(1),f=u[0]),u==="0")return 0;if(f==="0"){if(u[1]==="b")return h*parseInt(u.slice(2),2);if(u[1]==="x")return h*parseInt(u.slice(2),16);if(u[1]==="o")return h*parseInt(u.slice(2),8)}return h*parseInt(u,10)}C(a,"parseYamlInteger");function o(c){return a(c)}C(o,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return C(l,"isInteger"),mf=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:o,predicate:l,represent:{binary:C(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:C(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:C(function(c){return c.toString(10)},"decimal"),hexadecimal:C(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),mf}C(c0,"requireInt");var bf,Gx;function u0(){if(Gx)return bf;Gx=1;const e=Ka(),t=xr(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function n(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}C(n,"resolveYamlFloat");function s(c){let u=c.toLowerCase();const h=u[0]==="-"?-1:1;return"+-".indexOf(u[0])>=0&&(u=u.slice(1)),u===".inf"?h===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:u===".nan"?NaN:h*parseFloat(u,10)}C(s,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function o(c,u){if(isNaN(c))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const h=c.toString(10);return a.test(h)?h.replace("e",".e"):h}C(o,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return C(l,"isFloat"),bf=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:n,construct:s,predicate:l,represent:o,defaultStyle:"lowercase"}),bf}C(u0,"requireFloat");var yf,Yx;function h0(){return Yx||(Yx=1,yf=a0().extend({implicit:[o0(),l0(),c0(),u0()]})),yf}C(h0,"requireJson");var xf,Xx;function d0(){return Xx||(Xx=1,xf=h0()),xf}C(d0,"requireCore");var Cf,Kx;function f0(){if(Kx)return Cf;Kx=1;const e=xr(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}C(i,"resolveYamlTimestamp");function n(a){let o=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const u=+c[1],h=+c[2]-1,f=+c[3];if(!c[4])return new Date(Date.UTC(u,h,f));const d=+c[4],p=+c[5],g=+c[6];if(c[7]){for(o=c[7].slice(0,3);o.length<3;)o+="0";o=+o}if(c[9]){const m=+c[10],_=+(c[11]||0);l=(m*60+_)*6e4,c[9]==="-"&&(l=-l)}const b=new Date(Date.UTC(u,h,f,d,p,g,o));return l&&b.setTime(b.getTime()-l),b}C(n,"constructYamlTimestamp");function s(a){return a.toISOString()}return C(s,"representYamlTimestamp"),Cf=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:n,instanceOf:Date,represent:s}),Cf}C(f0,"requireTimestamp");var _f,Qx;function p0(){if(Qx)return _f;Qx=1;const e=xr();function t(r){return r==="<<"||r===null}return C(t,"resolveYamlMerge"),_f=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),_f}C(p0,"requireMerge");var kf,Zx;function g0(){if(Zx)return kf;Zx=1;const e=xr(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
433
- \r`;function r(a){if(a===null)return!1;let o=0;const l=a.length,c=t;for(let u=0;u<l;u++){const h=c.indexOf(a.charAt(u));if(!(h>64)){if(h<0)return!1;o+=6}}return o%8===0}C(r,"resolveYamlBinary");function i(a){const o=a.replace(/[\r\n=]/g,""),l=o.length,c=t;let u=0;const h=[];for(let d=0;d<l;d++)d%4===0&&d&&(h.push(u>>16&255),h.push(u>>8&255),h.push(u&255)),u=u<<6|c.indexOf(o.charAt(d));const f=l%4*6;return f===0?(h.push(u>>16&255),h.push(u>>8&255),h.push(u&255)):f===18?(h.push(u>>10&255),h.push(u>>2&255)):f===12&&h.push(u>>4&255),new Uint8Array(h)}C(i,"constructYamlBinary");function n(a){let o="",l=0;const c=a.length,u=t;for(let f=0;f<c;f++)f%3===0&&f&&(o+=u[l>>18&63],o+=u[l>>12&63],o+=u[l>>6&63],o+=u[l&63]),l=(l<<8)+a[f];const h=c%3;return h===0?(o+=u[l>>18&63],o+=u[l>>12&63],o+=u[l>>6&63],o+=u[l&63]):h===2?(o+=u[l>>10&63],o+=u[l>>4&63],o+=u[l<<2&63],o+=u[64]):h===1&&(o+=u[l>>2&63],o+=u[l<<4&63],o+=u[64],o+=u[64]),o}C(n,"representYamlBinary");function s(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return C(s,"isBinary"),kf=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:s,represent:n}),kf}C(g0,"requireBinary");var Tf,Jx;function m0(){if(Jx)return Tf;Jx=1;const e=xr(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(s){if(s===null)return!0;const a=[],o=s;for(let l=0,c=o.length;l<c;l+=1){const u=o[l];let h=!1;if(r.call(u)!=="[object Object]")return!1;let f;for(f in u)if(t.call(u,f))if(!h)h=!0;else return!1;if(!h)return!1;if(a.indexOf(f)===-1)a.push(f);else return!1}return!0}C(i,"resolveYamlOmap");function n(s){return s!==null?s:[]}return C(n,"constructYamlOmap"),Tf=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:n}),Tf}C(m0,"requireOmap");var Ef,tC;function b0(){if(tC)return Ef;tC=1;const e=xr(),t=Object.prototype.toString;function r(n){if(n===null)return!0;const s=n,a=new Array(s.length);for(let o=0,l=s.length;o<l;o+=1){const c=s[o];if(t.call(c)!=="[object Object]")return!1;const u=Object.keys(c);if(u.length!==1)return!1;a[o]=[u[0],c[u[0]]]}return!0}C(r,"resolveYamlPairs");function i(n){if(n===null)return[];const s=n,a=new Array(s.length);for(let o=0,l=s.length;o<l;o+=1){const c=s[o],u=Object.keys(c);a[o]=[u[0],c[u[0]]]}return a}return C(i,"constructYamlPairs"),Ef=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Ef}C(b0,"requirePairs");var wf,eC;function y0(){if(eC)return wf;eC=1;const e=xr(),t=Object.prototype.hasOwnProperty;function r(n){if(n===null)return!0;const s=n;for(const a in s)if(t.call(s,a)&&s[a]!==null)return!1;return!0}C(r,"resolveYamlSet");function i(n){return n!==null?n:{}}return C(i,"constructYamlSet"),wf=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),wf}C(y0,"requireSet");var Sf,rC;function Rh(){return rC||(rC=1,Sf=d0().extend({implicit:[f0(),p0()],explicit:[g0(),m0(),b0(),y0()]})),Sf}C(Rh,"require_default");var iC;function ZS(){if(iC)return kc;iC=1;const e=Ka(),t=Qa(),r=QS(),i=Rh(),n=Object.prototype.hasOwnProperty,s=1,a=2,o=3,l=4,c=1,u=2,h=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=/[\x85\u2028\u2029]/,p=/[,\[\]{}]/,g=/^(?:!|!!|![0-9A-Za-z-]+!)$/,b=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function m(y){return Object.prototype.toString.call(y)}C(m,"_class");function _(y){return y===10||y===13}C(_,"isEol");function k(y){return y===9||y===32}C(k,"isWhiteSpace");function T(y){return y===9||y===32||y===10||y===13}C(T,"isWsOrEol");function E(y){return y===44||y===91||y===93||y===123||y===125}C(E,"isFlowIndicator");function S(y){if(y>=48&&y<=57)return y-48;const j=y|32;return j>=97&&j<=102?j-97+10:-1}C(S,"fromHexCode");function B(y){return y===120?2:y===117?4:y===85?8:0}C(B,"escapedHexLen");function L(y){return y>=48&&y<=57?y-48:-1}C(L,"fromDecimalCode");function W(y){switch(y){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
434
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}C(W,"simpleEscapeSequence");function O(y){return y<=65535?String.fromCharCode(y):String.fromCharCode((y-65536>>10)+55296,(y-65536&1023)+56320)}C(O,"charFromCodepoint");function $(y,j,rt){j==="__proto__"?Object.defineProperty(y,j,{configurable:!0,enumerable:!0,writable:!0,value:rt}):y[j]=rt}C($,"setProperty");const X=new Array(256),G=new Array(256);for(let y=0;y<256;y++)X[y]=W(y)?1:0,G[y]=W(y);function H(y,j){this.input=y,this.filename=j.filename||null,this.schema=j.schema||i,this.onWarning=j.onWarning||null,this.legacy=j.legacy||!1,this.json=j.json||!1,this.listener=j.listener||null,this.maxDepth=typeof j.maxDepth=="number"?j.maxDepth:100,this.maxTotalMergeKeys=typeof j.maxTotalMergeKeys=="number"?j.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=y.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}C(H,"State");function M(y,j){const rt={name:y.filename,buffer:y.input.slice(0,-1),position:y.position,line:y.line,column:y.position-y.lineStart};return rt.snippet=r(rt),new t(j,rt)}C(M,"generateError");function N(y,j){throw M(y,j)}C(N,"throwError");function q(y,j){y.onWarning&&y.onWarning.call(null,M(y,j))}C(q,"throwWarning");function V(y,j,rt){const ut=y.anchorMapTransactions;if(ut.length!==0){const st=ut[ut.length-1];n.call(st,j)||(st[j]={existed:n.call(y.anchorMap,j),value:y.anchorMap[j]})}y.anchorMap[j]=rt}C(V,"storeAnchor");function tt(y){y.anchorMapTransactions.push(Object.create(null))}C(tt,"beginAnchorTransaction");function A(y){const j=y.anchorMapTransactions.pop(),rt=y.anchorMapTransactions;if(rt.length===0)return;const ut=rt[rt.length-1],st=Object.keys(j);for(let bt=0,v=st.length;bt<v;bt+=1){const J=st[bt];n.call(ut,J)||(ut[J]=j[J])}}C(A,"commitAnchorTransaction");function Et(y){const j=y.anchorMapTransactions.pop(),rt=Object.keys(j);for(let ut=rt.length-1;ut>=0;ut-=1){const st=j[rt[ut]];st.existed?y.anchorMap[rt[ut]]=st.value:delete y.anchorMap[rt[ut]]}}C(Et,"rollbackAnchorTransaction");function kt(y){return{position:y.position,line:y.line,lineStart:y.lineStart,lineIndent:y.lineIndent,firstTabInLine:y.firstTabInLine,tag:y.tag,anchor:y.anchor,kind:y.kind,result:y.result}}C(kt,"snapshotState");function P(y,j){y.position=j.position,y.line=j.line,y.lineStart=j.lineStart,y.lineIndent=j.lineIndent,y.firstTabInLine=j.firstTabInLine,y.tag=j.tag,y.anchor=j.anchor,y.kind=j.kind,y.result=j.result}C(P,"restoreState");const Rt={YAML:C(function(j,rt,ut){j.version!==null&&N(j,"duplication of %YAML directive"),ut.length!==1&&N(j,"YAML directive accepts exactly one argument");const st=/^([0-9]+)\.([0-9]+)$/.exec(ut[0]);st===null&&N(j,"ill-formed argument of the YAML directive");const bt=parseInt(st[1],10),v=parseInt(st[2],10);bt!==1&&N(j,"unacceptable YAML version of the document"),j.version=ut[0],j.checkLineBreaks=v<2,v!==1&&v!==2&&q(j,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:C(function(j,rt,ut){let st;ut.length!==2&&N(j,"TAG directive accepts exactly two arguments");const bt=ut[0];st=ut[1],g.test(bt)||N(j,"ill-formed tag handle (first argument) of the TAG directive"),n.call(j.tagMap,bt)&&N(j,'there is a previously declared suffix for "'+bt+'" tag handle'),b.test(st)||N(j,"ill-formed tag prefix (second argument) of the TAG directive");try{st=decodeURIComponent(st)}catch{N(j,"tag prefix is malformed: "+st)}j.tagMap[bt]=st},"handleTagDirective")};function Tt(y,j,rt,ut){if(j<rt){const st=y.input.slice(j,rt);if(ut)for(let bt=0,v=st.length;bt<v;bt+=1){const J=st.charCodeAt(bt);J===9||J>=32&&J<=1114111||N(y,"expected valid JSON character")}else f.test(st)&&N(y,"the stream contains non-printable characters");y.result+=st}}C(Tt,"captureSegment");function pt(y,j,rt,ut){e.isObject(rt)||N(y,"cannot merge mappings; the provided source object is unacceptable");const st=Object.keys(rt);for(let bt=0,v=st.length;bt<v;bt+=1){const J=st[bt];y.maxTotalMergeKeys!==-1&&++y.totalMergeKeys>y.maxTotalMergeKeys&&N(y,"merge keys exceeded maxTotalMergeKeys ("+y.maxTotalMergeKeys+")"),n.call(j,J)||($(j,J,rt[J]),ut[J]=!0)}}C(pt,"mergeMappings");function Ht(y,j,rt,ut,st,bt,v,J,ft){if(Array.isArray(st)){st=Array.prototype.slice.call(st);for(let ht=0,dt=st.length;ht<dt;ht+=1)Array.isArray(st[ht])&&N(y,"nested arrays are not supported inside keys"),typeof st=="object"&&m(st[ht])==="[object Object]"&&(st[ht]="[object Object]")}if(typeof st=="object"&&m(st)==="[object Object]"&&(st="[object Object]"),st=String(st),j===null&&(j={}),ut==="tag:yaml.org,2002:merge")if(Array.isArray(bt))for(let ht=0,dt=bt.length;ht<dt;ht+=1)pt(y,j,bt[ht],rt);else pt(y,j,bt,rt);else!y.json&&!n.call(rt,st)&&n.call(j,st)&&(y.line=v||y.line,y.lineStart=J||y.lineStart,y.position=ft||y.position,N(y,"duplicated mapping key")),$(j,st,bt),delete rt[st];return j}C(Ht,"storeMappingPair");function Yt(y){const j=y.input.charCodeAt(y.position);j===10?y.position++:j===13?(y.position++,y.input.charCodeAt(y.position)===10&&y.position++):N(y,"a line break is expected"),y.line+=1,y.lineStart=y.position,y.firstTabInLine=-1}C(Yt,"readLineBreak");function It(y,j,rt){let ut=0,st=y.input.charCodeAt(y.position);for(;st!==0;){for(;k(st);)st===9&&y.firstTabInLine===-1&&(y.firstTabInLine=y.position),st=y.input.charCodeAt(++y.position);if(j&&st===35)do st=y.input.charCodeAt(++y.position);while(st!==10&&st!==13&&st!==0);if(_(st))for(Yt(y),st=y.input.charCodeAt(y.position),ut++,y.lineIndent=0;st===32;)y.lineIndent++,st=y.input.charCodeAt(++y.position);else break}return rt!==-1&&ut!==0&&y.lineIndent<rt&&q(y,"deficient indentation"),ut}C(It,"skipSeparationSpace");function wt(y){let j=y.position,rt=y.input.charCodeAt(j);return!!((rt===45||rt===46)&&rt===y.input.charCodeAt(j+1)&&rt===y.input.charCodeAt(j+2)&&(j+=3,rt=y.input.charCodeAt(j),rt===0||T(rt)))}C(wt,"testDocumentSeparator");function Lt(y,j){j===1?y.result+=" ":j>1&&(y.result+=e.repeat(`
435
- `,j-1))}C(Lt,"writeFoldedLines");function Xt(y,j,rt){let ut,st,bt,v,J,ft;const ht=y.kind,dt=y.result;let Ct=y.input.charCodeAt(y.position);if(T(Ct)||E(Ct)||Ct===35||Ct===38||Ct===42||Ct===33||Ct===124||Ct===62||Ct===39||Ct===34||Ct===37||Ct===64||Ct===96)return!1;if(Ct===63||Ct===45){const yt=y.input.charCodeAt(y.position+1);if(T(yt)||rt&&E(yt))return!1}for(y.kind="scalar",y.result="",ut=st=y.position,bt=!1;Ct!==0;){if(Ct===58){const yt=y.input.charCodeAt(y.position+1);if(T(yt)||rt&&E(yt))break}else if(Ct===35){const yt=y.input.charCodeAt(y.position-1);if(T(yt))break}else{if(y.position===y.lineStart&&wt(y)||rt&&E(Ct))break;if(_(Ct))if(v=y.line,J=y.lineStart,ft=y.lineIndent,It(y,!1,-1),y.lineIndent>=j){bt=!0,Ct=y.input.charCodeAt(y.position);continue}else{y.position=st,y.line=v,y.lineStart=J,y.lineIndent=ft;break}}bt&&(Tt(y,ut,st,!1),Lt(y,y.line-v),ut=st=y.position,bt=!1),k(Ct)||(st=y.position+1),Ct=y.input.charCodeAt(++y.position)}return Tt(y,ut,st,!1),y.result?!0:(y.kind=ht,y.result=dt,!1)}C(Xt,"readPlainScalar");function Qt(y,j){let rt,ut,st=y.input.charCodeAt(y.position);if(st!==39)return!1;for(y.kind="scalar",y.result="",y.position++,rt=ut=y.position;(st=y.input.charCodeAt(y.position))!==0;)if(st===39)if(Tt(y,rt,y.position,!0),st=y.input.charCodeAt(++y.position),st===39)rt=y.position,y.position++,ut=y.position;else return!0;else _(st)?(Tt(y,rt,ut,!0),Lt(y,It(y,!1,j)),rt=ut=y.position):y.position===y.lineStart&&wt(y)?N(y,"unexpected end of the document within a single quoted scalar"):(y.position++,k(st)||(ut=y.position));N(y,"unexpected end of the stream within a single quoted scalar")}C(Qt,"readSingleQuotedScalar");function le(y,j){let rt,ut,st,bt=y.input.charCodeAt(y.position);if(bt!==34)return!1;for(y.kind="scalar",y.result="",y.position++,rt=ut=y.position;(bt=y.input.charCodeAt(y.position))!==0;){if(bt===34)return Tt(y,rt,y.position,!0),y.position++,!0;if(bt===92){if(Tt(y,rt,y.position,!0),bt=y.input.charCodeAt(++y.position),_(bt))It(y,!1,j);else if(bt<256&&X[bt])y.result+=G[bt],y.position++;else if((st=B(bt))>0){let v=st,J=0;for(;v>0;v--)bt=y.input.charCodeAt(++y.position),(st=S(bt))>=0?J=(J<<4)+st:N(y,"expected hexadecimal character");y.result+=O(J),y.position++}else N(y,"unknown escape sequence");rt=ut=y.position}else _(bt)?(Tt(y,rt,ut,!0),Lt(y,It(y,!1,j)),rt=ut=y.position):y.position===y.lineStart&&wt(y)?N(y,"unexpected end of the document within a double quoted scalar"):(y.position++,k(bt)||(ut=y.position))}N(y,"unexpected end of the stream within a double quoted scalar")}C(le,"readDoubleQuotedScalar");function it(y,j){let rt=!0,ut,st,bt;const v=y.tag;let J;const ft=y.anchor;let ht,dt,Ct,yt;const Mt=Object.create(null);let Nt,Wt,jt,ae=y.input.charCodeAt(y.position);if(ae===91)ht=93,yt=!1,J=[];else if(ae===123)ht=125,yt=!0,J={};else return!1;for(y.anchor!==null&&V(y,y.anchor,J),ae=y.input.charCodeAt(++y.position);ae!==0;){if(It(y,!0,j),ae=y.input.charCodeAt(y.position),ae===ht)return y.position++,y.tag=v,y.anchor=ft,y.kind=yt?"mapping":"sequence",y.result=J,!0;if(rt?ae===44&&N(y,"expected the node content, but found ','"):N(y,"missed comma between flow collection entries"),Wt=Nt=jt=null,dt=Ct=!1,ae===63){const Ee=y.input.charCodeAt(y.position+1);T(Ee)&&(dt=Ct=!0,y.position++,It(y,!0,j))}ut=y.line,st=y.lineStart,bt=y.position,xe(y,j,s,!1,!0),Wt=y.tag,Nt=y.result,It(y,!0,j),ae=y.input.charCodeAt(y.position),(Ct||y.line===ut)&&ae===58&&(dt=!0,ae=y.input.charCodeAt(++y.position),It(y,!0,j),xe(y,j,s,!1,!0),jt=y.result),yt?Ht(y,J,Mt,Wt,Nt,jt,ut,st,bt):dt?J.push(Ht(y,null,Mt,Wt,Nt,jt,ut,st,bt)):J.push(Nt),It(y,!0,j),ae=y.input.charCodeAt(y.position),ae===44?(rt=!0,ae=y.input.charCodeAt(++y.position)):rt=!1}N(y,"unexpected end of the stream within a flow collection")}C(it,"readFlowCollection");function Bt(y,j){let rt,ut=c,st=!1,bt=!1,v=j,J=0,ft=!1,ht,dt=y.input.charCodeAt(y.position);if(dt===124)rt=!1;else if(dt===62)rt=!0;else return!1;for(y.kind="scalar",y.result="";dt!==0;)if(dt=y.input.charCodeAt(++y.position),dt===43||dt===45)c===ut?ut=dt===43?h:u:N(y,"repeat of a chomping mode identifier");else if((ht=L(dt))>=0)ht===0?N(y,"bad explicit indentation width of a block scalar; it cannot be less than one"):bt?N(y,"repeat of an indentation width identifier"):(v=j+ht-1,bt=!0);else break;if(k(dt)){do dt=y.input.charCodeAt(++y.position);while(k(dt));if(dt===35)do dt=y.input.charCodeAt(++y.position);while(!_(dt)&&dt!==0)}for(;dt!==0;){for(Yt(y),y.lineIndent=0,dt=y.input.charCodeAt(y.position);(!bt||y.lineIndent<v)&&dt===32;)y.lineIndent++,dt=y.input.charCodeAt(++y.position);if(!bt&&y.lineIndent>v&&(v=y.lineIndent),_(dt)){J++;continue}if(!bt&&v===0&&N(y,"missing indentation for block scalar"),y.lineIndent<v){ut===h?y.result+=e.repeat(`
436
- `,st?1+J:J):ut===c&&st&&(y.result+=`
437
- `);break}rt?k(dt)?(ft=!0,y.result+=e.repeat(`
438
- `,st?1+J:J)):ft?(ft=!1,y.result+=e.repeat(`
439
- `,J+1)):J===0?st&&(y.result+=" "):y.result+=e.repeat(`
440
- `,J):y.result+=e.repeat(`
441
- `,st?1+J:J),st=!0,bt=!0,J=0;const Ct=y.position;for(;!_(dt)&&dt!==0;)dt=y.input.charCodeAt(++y.position);Tt(y,Ct,y.position,!1)}return!0}C(Bt,"readBlockScalar");function De(y,j){const rt=y.tag,ut=y.anchor,st=[];let bt=!1;if(y.firstTabInLine!==-1)return!1;y.anchor!==null&&V(y,y.anchor,st);let v=y.input.charCodeAt(y.position);for(;v!==0&&(y.firstTabInLine!==-1&&(y.position=y.firstTabInLine,N(y,"tab characters must not be used in indentation")),v===45);){const J=y.input.charCodeAt(y.position+1);if(!T(J))break;if(bt=!0,y.position++,It(y,!0,-1)&&y.lineIndent<=j){st.push(null),v=y.input.charCodeAt(y.position);continue}const ft=y.line;if(xe(y,j,o,!1,!0),st.push(y.result),It(y,!0,-1),v=y.input.charCodeAt(y.position),(y.line===ft||y.lineIndent>j)&&v!==0)N(y,"bad indentation of a sequence entry");else if(y.lineIndent<j)break}return bt?(y.tag=rt,y.anchor=ut,y.kind="sequence",y.result=st,!0):!1}C(De,"readBlockSequence");function ce(y,j,rt){let ut,st,bt,v;const J=y.tag,ft=y.anchor,ht={},dt=Object.create(null);let Ct=null,yt=null,Mt=null,Nt=!1,Wt=!1;if(y.firstTabInLine!==-1)return!1;y.anchor!==null&&V(y,y.anchor,ht);let jt=y.input.charCodeAt(y.position);for(;jt!==0;){!Nt&&y.firstTabInLine!==-1&&(y.position=y.firstTabInLine,N(y,"tab characters must not be used in indentation"));const ae=y.input.charCodeAt(y.position+1),Ee=y.line;if((jt===63||jt===58)&&T(ae))jt===63?(Nt&&(Ht(y,ht,dt,Ct,yt,null,st,bt,v),Ct=yt=Mt=null),Wt=!0,Nt=!0,ut=!0):Nt?(Nt=!1,ut=!0):N(y,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),y.position+=1,jt=ae;else{if(st=y.line,bt=y.lineStart,v=y.position,!xe(y,rt,a,!1,!0))break;if(y.line===Ee){for(jt=y.input.charCodeAt(y.position);k(jt);)jt=y.input.charCodeAt(++y.position);if(jt===58)jt=y.input.charCodeAt(++y.position),T(jt)||N(y,"a whitespace character is expected after the key-value separator within a block mapping"),Nt&&(Ht(y,ht,dt,Ct,yt,null,st,bt,v),Ct=yt=Mt=null),Wt=!0,Nt=!1,ut=!1,Ct=y.tag,yt=y.result;else if(Wt)N(y,"can not read an implicit mapping pair; a colon is missed");else return y.tag=J,y.anchor=ft,!0}else if(Wt)N(y,"can not read a block mapping entry; a multiline key may not be an implicit key");else return y.tag=J,y.anchor=ft,!0}if((y.line===Ee||y.lineIndent>j)&&(Nt&&(st=y.line,bt=y.lineStart,v=y.position),xe(y,j,l,!0,ut)&&(Nt?yt=y.result:Mt=y.result),Nt||(Ht(y,ht,dt,Ct,yt,Mt,st,bt,v),Ct=yt=Mt=null),It(y,!0,-1),jt=y.input.charCodeAt(y.position)),(y.line===Ee||y.lineIndent>j)&&jt!==0)N(y,"bad indentation of a mapping entry");else if(y.lineIndent<j)break}return Nt&&Ht(y,ht,dt,Ct,yt,null,st,bt,v),Wt&&(y.tag=J,y.anchor=ft,y.kind="mapping",y.result=ht),Wt}C(ce,"readBlockMapping");function Lr(y){let j=!1,rt=!1,ut,st,bt=y.input.charCodeAt(y.position);if(bt!==33)return!1;y.tag!==null&&N(y,"duplication of a tag property"),bt=y.input.charCodeAt(++y.position),bt===60?(j=!0,bt=y.input.charCodeAt(++y.position)):bt===33?(rt=!0,ut="!!",bt=y.input.charCodeAt(++y.position)):ut="!";let v=y.position;if(j){do bt=y.input.charCodeAt(++y.position);while(bt!==0&&bt!==62);y.position<y.length?(st=y.input.slice(v,y.position),bt=y.input.charCodeAt(++y.position)):N(y,"unexpected end of the stream within a verbatim tag")}else{for(;bt!==0&&!T(bt);)bt===33&&(rt?N(y,"tag suffix cannot contain exclamation marks"):(ut=y.input.slice(v-1,y.position+1),g.test(ut)||N(y,"named tag handle cannot contain such characters"),rt=!0,v=y.position+1)),bt=y.input.charCodeAt(++y.position);st=y.input.slice(v,y.position),p.test(st)&&N(y,"tag suffix cannot contain flow indicator characters")}st&&!b.test(st)&&N(y,"tag name cannot contain such characters: "+st);try{st=decodeURIComponent(st)}catch{N(y,"tag name is malformed: "+st)}return j?y.tag=st:n.call(y.tagMap,ut)?y.tag=y.tagMap[ut]+st:ut==="!"?y.tag="!"+st:ut==="!!"?y.tag="tag:yaml.org,2002:"+st:N(y,'undeclared tag handle "'+ut+'"'),!0}C(Lr,"readTagProperty");function zt(y){let j=y.input.charCodeAt(y.position);if(j!==38)return!1;y.anchor!==null&&N(y,"duplication of an anchor property"),j=y.input.charCodeAt(++y.position);const rt=y.position;for(;j!==0&&!T(j)&&!E(j);)j=y.input.charCodeAt(++y.position);return y.position===rt&&N(y,"name of an anchor node must contain at least one character"),y.anchor=y.input.slice(rt,y.position),!0}C(zt,"readAnchorProperty");function ie(y){let j=y.input.charCodeAt(y.position);if(j!==42)return!1;j=y.input.charCodeAt(++y.position);const rt=y.position;for(;j!==0&&!T(j)&&!E(j);)j=y.input.charCodeAt(++y.position);y.position===rt&&N(y,"name of an alias node must contain at least one character");const ut=y.input.slice(rt,y.position);return n.call(y.anchorMap,ut)||N(y,'unidentified alias "'+ut+'"'),y.result=y.anchorMap[ut],It(y,!0,-1),!0}C(ie,"readAlias");function Ie(y,j,rt,ut){const st=kt(y);return tt(y),P(y,j),y.tag=null,y.anchor=null,y.kind=null,y.result=null,ce(y,rt,ut)&&y.kind==="mapping"?(A(y),!0):(Et(y),P(y,st),!1)}C(Ie,"tryReadBlockMappingFromProperty");function xe(y,j,rt,ut,st){let bt,v,J=1,ft=!1,ht=!1,dt=null,Ct,yt,Mt;y.depth>=y.maxDepth&&N(y,"nesting exceeded maxDepth ("+y.maxDepth+")"),y.depth+=1,y.listener!==null&&y.listener("open",y),y.tag=null,y.anchor=null,y.kind=null,y.result=null;const Nt=bt=v=l===rt||o===rt;if(ut&&It(y,!0,-1)&&(ft=!0,y.lineIndent>j?J=1:y.lineIndent===j?J=0:y.lineIndent<j&&(J=-1)),J===1)for(;;){const Wt=y.input.charCodeAt(y.position),jt=kt(y);if(ft&&(Wt===33&&y.tag!==null||Wt===38&&y.anchor!==null)||!Lr(y)&&!zt(y))break;dt===null&&(dt=jt),It(y,!0,-1)?(ft=!0,v=Nt,y.lineIndent>j?J=1:y.lineIndent===j?J=0:y.lineIndent<j&&(J=-1)):v=!1}if(v&&(v=ft||st),J===1||l===rt)if(s===rt||a===rt?yt=j:yt=j+1,Mt=y.position-y.lineStart,J===1)if(v&&(De(y,Mt)||ce(y,Mt,yt))||it(y,yt))ht=!0;else{const Wt=y.input.charCodeAt(y.position);dt!==null&&Nt&&!v&&Wt!==124&&Wt!==62&&Ie(y,dt,dt.position-dt.lineStart,yt)||bt&&Bt(y,yt)||Qt(y,yt)||le(y,yt)?ht=!0:ie(y)?(ht=!0,(y.tag!==null||y.anchor!==null)&&N(y,"alias node should not have any properties")):Xt(y,yt,s===rt)&&(ht=!0,y.tag===null&&(y.tag="?")),y.anchor!==null&&V(y,y.anchor,y.result)}else J===0&&(ht=v&&De(y,Mt));if(y.tag===null)y.anchor!==null&&V(y,y.anchor,y.result);else if(y.tag==="?"){y.result!==null&&y.kind!=="scalar"&&N(y,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+y.kind+'"');for(let Wt=0,jt=y.implicitTypes.length;Wt<jt;Wt+=1)if(Ct=y.implicitTypes[Wt],Ct.resolve(y.result)){y.result=Ct.construct(y.result),y.tag=Ct.tag,y.anchor!==null&&V(y,y.anchor,y.result);break}}else if(y.tag!=="!"){if(n.call(y.typeMap[y.kind||"fallback"],y.tag))Ct=y.typeMap[y.kind||"fallback"][y.tag];else{Ct=null;const Wt=y.typeMap.multi[y.kind||"fallback"];for(let jt=0,ae=Wt.length;jt<ae;jt+=1)if(y.tag.slice(0,Wt[jt].tag.length)===Wt[jt].tag){Ct=Wt[jt];break}}Ct||N(y,"unknown tag !<"+y.tag+">"),y.result!==null&&Ct.kind!==y.kind&&N(y,"unacceptable node kind for !<"+y.tag+'> tag; it should be "'+Ct.kind+'", not "'+y.kind+'"'),Ct.resolve(y.result,y.tag)?(y.result=Ct.construct(y.result,y.tag),y.anchor!==null&&V(y,y.anchor,y.result)):N(y,"cannot resolve a node with !<"+y.tag+"> explicit tag")}return y.listener!==null&&y.listener("close",y),y.depth-=1,y.tag!==null||y.anchor!==null||ht}C(xe,"composeNode");function nr(y){const j=y.position;let rt=!1,ut;for(y.version=null,y.checkLineBreaks=y.legacy,y.tagMap=Object.create(null),y.anchorMap=Object.create(null);(ut=y.input.charCodeAt(y.position))!==0&&(It(y,!0,-1),ut=y.input.charCodeAt(y.position),!(y.lineIndent>0||ut!==37));){rt=!0,ut=y.input.charCodeAt(++y.position);let st=y.position;for(;ut!==0&&!T(ut);)ut=y.input.charCodeAt(++y.position);const bt=y.input.slice(st,y.position),v=[];for(bt.length<1&&N(y,"directive name must not be less than one character in length");ut!==0;){for(;k(ut);)ut=y.input.charCodeAt(++y.position);if(ut===35){do ut=y.input.charCodeAt(++y.position);while(ut!==0&&!_(ut));break}if(_(ut))break;for(st=y.position;ut!==0&&!T(ut);)ut=y.input.charCodeAt(++y.position);v.push(y.input.slice(st,y.position))}ut!==0&&Yt(y),n.call(Rt,bt)?Rt[bt](y,bt,v):q(y,'unknown document directive "'+bt+'"')}if(It(y,!0,-1),y.lineIndent===0&&y.input.charCodeAt(y.position)===45&&y.input.charCodeAt(y.position+1)===45&&y.input.charCodeAt(y.position+2)===45?(y.position+=3,It(y,!0,-1)):rt&&N(y,"directives end mark is expected"),xe(y,y.lineIndent-1,l,!1,!0),It(y,!0,-1),y.checkLineBreaks&&d.test(y.input.slice(j,y.position))&&q(y,"non-ASCII line breaks are interpreted as content"),y.documents.push(y.result),y.position===y.lineStart&&wt(y)){y.input.charCodeAt(y.position)===46&&(y.position+=3,It(y,!0,-1));return}y.position<y.length-1&&N(y,"end of the stream or a document separator is expected")}C(nr,"readDocument");function ur(y,j){y=String(y),j=j||{},y.length!==0&&(y.charCodeAt(y.length-1)!==10&&y.charCodeAt(y.length-1)!==13&&(y+=`
442
- `),y.charCodeAt(0)===65279&&(y=y.slice(1)));const rt=new H(y,j),ut=y.indexOf("\0");for(ut!==-1&&(rt.position=ut,N(rt,"null byte is not allowed in input")),rt.input+="\0";rt.input.charCodeAt(rt.position)===32;)rt.lineIndent+=1,rt.position+=1;for(;rt.position<rt.length-1;)nr(rt);return rt.documents}C(ur,"loadDocuments");function ct(y,j,rt){j!==null&&typeof j=="object"&&typeof rt>"u"&&(rt=j,j=null);const ut=ur(y,rt);if(typeof j!="function")return ut;for(let st=0,bt=ut.length;st<bt;st+=1)j(ut[st])}C(ct,"loadAll2");function vt(y,j){const rt=ur(y,j);if(rt.length!==0){if(rt.length===1)return rt[0];throw new t("expected a single document in the stream, but found more")}}return C(vt,"load2"),kc.loadAll=ct,kc.load=vt,kc}C(ZS,"requireLoader");var Af={},nC;function JS(){if(nC)return Af;nC=1;const e=Ka(),t=Qa(),r=Rh(),i=Object.prototype.toString,n=Object.prototype.hasOwnProperty,s=65279,a=9,o=10,l=13,c=32,u=33,h=34,f=35,d=37,p=38,g=39,b=42,m=44,_=45,k=58,T=61,E=62,S=63,B=64,L=91,W=93,O=96,$=123,X=124,G=125,H={};H[0]="\\0",H[7]="\\a",H[8]="\\b",H[9]="\\t",H[10]="\\n",H[11]="\\v",H[12]="\\f",H[13]="\\r",H[27]="\\e",H[34]='\\"',H[92]="\\\\",H[133]="\\N",H[160]="\\_",H[8232]="\\L",H[8233]="\\P";const M=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],N=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function q(v,J){if(J===null)return{};const ft={},ht=Object.keys(J);for(let dt=0,Ct=ht.length;dt<Ct;dt+=1){let yt=ht[dt],Mt=String(J[yt]);yt.slice(0,2)==="!!"&&(yt="tag:yaml.org,2002:"+yt.slice(2));const Nt=v.compiledTypeMap.fallback[yt];Nt&&n.call(Nt.styleAliases,Mt)&&(Mt=Nt.styleAliases[Mt]),ft[yt]=Mt}return ft}C(q,"compileStyleMap");function V(v){let J,ft;const ht=v.toString(16).toUpperCase();if(v<=255)J="x",ft=2;else if(v<=65535)J="u",ft=4;else if(v<=4294967295)J="U",ft=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+J+e.repeat("0",ft-ht.length)+ht}C(V,"encodeHex");const tt=1,A=2;function Et(v){this.schema=v.schema||r,this.indent=Math.max(1,v.indent||2),this.noArrayIndent=v.noArrayIndent||!1,this.skipInvalid=v.skipInvalid||!1,this.flowLevel=e.isNothing(v.flowLevel)?-1:v.flowLevel,this.styleMap=q(this.schema,v.styles||null),this.sortKeys=v.sortKeys||!1,this.lineWidth=v.lineWidth||80,this.noRefs=v.noRefs||!1,this.noCompatMode=v.noCompatMode||!1,this.condenseFlow=v.condenseFlow||!1,this.quotingType=v.quotingType==='"'?A:tt,this.forceQuotes=v.forceQuotes||!1,this.replacer=typeof v.replacer=="function"?v.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}C(Et,"State");function kt(v,J){const ft=e.repeat(" ",J);let ht=0,dt="";const Ct=v.length;for(;ht<Ct;){let yt;const Mt=v.indexOf(`
443
- `,ht);Mt===-1?(yt=v.slice(ht),ht=Ct):(yt=v.slice(ht,Mt+1),ht=Mt+1),yt.length&&yt!==`
444
- `&&(dt+=ft),dt+=yt}return dt}C(kt,"indentString");function P(v,J){return`
445
- `+e.repeat(" ",v.indent*J)}C(P,"generateNextLine");function Rt(v,J){for(let ft=0,ht=v.implicitTypes.length;ft<ht;ft+=1)if(v.implicitTypes[ft].resolve(J))return!0;return!1}C(Rt,"testImplicitResolving");function Tt(v){return v===c||v===a}C(Tt,"isWhitespace");function pt(v){return v>=32&&v<=126||v>=161&&v<=55295&&v!==8232&&v!==8233||v>=57344&&v<=65533&&v!==s||v>=65536&&v<=1114111}C(pt,"isPrintable");function Ht(v){return pt(v)&&v!==s&&v!==l&&v!==o}C(Ht,"isNsCharOrWhitespace");function Yt(v,J,ft){const ht=Ht(v),dt=ht&&!Tt(v);return(ft?ht:ht&&v!==m&&v!==L&&v!==W&&v!==$&&v!==G)&&v!==f&&!(J===k&&!dt)||Ht(J)&&!Tt(J)&&v===f||J===k&&dt}C(Yt,"isPlainSafe");function It(v){return pt(v)&&v!==s&&!Tt(v)&&v!==_&&v!==S&&v!==k&&v!==m&&v!==L&&v!==W&&v!==$&&v!==G&&v!==f&&v!==p&&v!==b&&v!==u&&v!==X&&v!==T&&v!==E&&v!==g&&v!==h&&v!==d&&v!==B&&v!==O}C(It,"isPlainSafeFirst");function wt(v){return!Tt(v)&&v!==k}C(wt,"isPlainSafeLast");function Lt(v,J){const ft=v.charCodeAt(J);let ht;return ft>=55296&&ft<=56319&&J+1<v.length&&(ht=v.charCodeAt(J+1),ht>=56320&&ht<=57343)?(ft-55296)*1024+ht-56320+65536:ft}C(Lt,"codePointAt");function Xt(v){return/^\n* /.test(v)}C(Xt,"needIndentIndicator");const Qt=1,le=2,it=3,Bt=4,De=5;function ce(v,J,ft,ht,dt,Ct,yt,Mt){let Nt,Wt=0,jt=null,ae=!1,Ee=!1;const no=ht!==-1;let mn=-1,bn=It(Lt(v,0))&&wt(Lt(v,v.length-1));if(J||yt)for(Nt=0;Nt<v.length;Wt>=65536?Nt+=2:Nt++){if(Wt=Lt(v,Nt),!pt(Wt))return De;bn=bn&&Yt(Wt,jt,Mt),jt=Wt}else{for(Nt=0;Nt<v.length;Wt>=65536?Nt+=2:Nt++){if(Wt=Lt(v,Nt),Wt===o)ae=!0,no&&(Ee=Ee||Nt-mn-1>ht&&v[mn+1]!==" ",mn=Nt);else if(!pt(Wt))return De;bn=bn&&Yt(Wt,jt,Mt),jt=Wt}Ee=Ee||no&&Nt-mn-1>ht&&v[mn+1]!==" "}return!ae&&!Ee?bn&&!yt&&!dt(v)?Qt:Ct===A?De:le:ft>9&&Xt(v)?De:yt?Ct===A?De:le:Ee?Bt:it}C(ce,"chooseScalarStyle");function Lr(v,J,ft,ht,dt){v.dump=(function(){if(J.length===0)return v.quotingType===A?'""':"''";if(!v.noCompatMode&&(M.indexOf(J)!==-1||N.test(J)))return v.quotingType===A?'"'+J+'"':"'"+J+"'";const Ct=v.indent*Math.max(1,ft),yt=v.lineWidth===-1?-1:Math.max(Math.min(v.lineWidth,40),v.lineWidth-Ct),Mt=ht||v.flowLevel>-1&&ft>=v.flowLevel;function Nt(Wt){return Rt(v,Wt)}switch(C(Nt,"testAmbiguity"),ce(J,Mt,v.indent,yt,Nt,v.quotingType,v.forceQuotes&&!ht,dt)){case Qt:return J;case le:return"'"+J.replace(/'/g,"''")+"'";case it:return"|"+zt(J,v.indent)+ie(kt(J,Ct));case Bt:return">"+zt(J,v.indent)+ie(kt(Ie(J,yt),Ct));case De:return'"'+nr(J)+'"';default:throw new t("impossible error: invalid scalar style")}})()}C(Lr,"writeScalar");function zt(v,J){const ft=Xt(v)?String(J):"",ht=v[v.length-1]===`
446
- `,Ct=ht&&(v[v.length-2]===`
447
- `||v===`
448
- `)?"+":ht?"":"-";return ft+Ct+`
449
- `}C(zt,"blockHeader");function ie(v){return v[v.length-1]===`
450
- `?v.slice(0,-1):v}C(ie,"dropEndingNewline");function Ie(v,J){const ft=/(\n+)([^\n]*)/g;let ht=(function(){let Mt=v.indexOf(`
451
- `);return Mt=Mt!==-1?Mt:v.length,ft.lastIndex=Mt,xe(v.slice(0,Mt),J)})(),dt=v[0]===`
452
- `||v[0]===" ",Ct,yt;for(;yt=ft.exec(v);){const Mt=yt[1],Nt=yt[2];Ct=Nt[0]===" ",ht+=Mt+(!dt&&!Ct&&Nt!==""?`
453
- `:"")+xe(Nt,J),dt=Ct}return ht}C(Ie,"foldString");function xe(v,J){if(v===""||v[0]===" ")return v;const ft=/ [^ ]/g;let ht,dt=0,Ct,yt=0,Mt=0,Nt="";for(;ht=ft.exec(v);)Mt=ht.index,Mt-dt>J&&(Ct=yt>dt?yt:Mt,Nt+=`
454
- `+v.slice(dt,Ct),dt=Ct+1),yt=Mt;return Nt+=`
455
- `,v.length-dt>J&&yt>dt?Nt+=v.slice(dt,yt)+`
456
- `+v.slice(yt+1):Nt+=v.slice(dt),Nt.slice(1)}C(xe,"foldLine");function nr(v){let J="",ft=0;for(let ht=0;ht<v.length;ft>=65536?ht+=2:ht++){ft=Lt(v,ht);const dt=H[ft];!dt&&pt(ft)?(J+=v[ht],ft>=65536&&(J+=v[ht+1])):J+=dt||V(ft)}return J}C(nr,"escapeString");function ur(v,J,ft){let ht="";const dt=v.tag;for(let Ct=0,yt=ft.length;Ct<yt;Ct+=1){let Mt=ft[Ct];v.replacer&&(Mt=v.replacer.call(ft,String(Ct),Mt)),(rt(v,J,Mt,!1,!1)||typeof Mt>"u"&&rt(v,J,null,!1,!1))&&(ht!==""&&(ht+=","+(v.condenseFlow?"":" ")),ht+=v.dump)}v.tag=dt,v.dump="["+ht+"]"}C(ur,"writeFlowSequence");function ct(v,J,ft,ht){let dt="";const Ct=v.tag;for(let yt=0,Mt=ft.length;yt<Mt;yt+=1){let Nt=ft[yt];v.replacer&&(Nt=v.replacer.call(ft,String(yt),Nt)),(rt(v,J+1,Nt,!0,!0,!1,!0)||typeof Nt>"u"&&rt(v,J+1,null,!0,!0,!1,!0))&&((!ht||dt!=="")&&(dt+=P(v,J)),v.dump&&o===v.dump.charCodeAt(0)?dt+="-":dt+="- ",dt+=v.dump)}v.tag=Ct,v.dump=dt||"[]"}C(ct,"writeBlockSequence");function vt(v,J,ft){let ht="";const dt=v.tag,Ct=Object.keys(ft);for(let yt=0,Mt=Ct.length;yt<Mt;yt+=1){let Nt="";ht!==""&&(Nt+=", "),v.condenseFlow&&(Nt+='"');const Wt=Ct[yt];let jt=ft[Wt];v.replacer&&(jt=v.replacer.call(ft,Wt,jt)),rt(v,J,Wt,!1,!1)&&(v.dump.length>1024&&(Nt+="? "),Nt+=v.dump+(v.condenseFlow?'"':"")+":"+(v.condenseFlow?"":" "),rt(v,J,jt,!1,!1)&&(Nt+=v.dump,ht+=Nt))}v.tag=dt,v.dump="{"+ht+"}"}C(vt,"writeFlowMapping");function y(v,J,ft,ht){let dt="";const Ct=v.tag,yt=Object.keys(ft);if(v.sortKeys===!0)yt.sort();else if(typeof v.sortKeys=="function")yt.sort(v.sortKeys);else if(v.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let Mt=0,Nt=yt.length;Mt<Nt;Mt+=1){let Wt="";(!ht||dt!=="")&&(Wt+=P(v,J));const jt=yt[Mt];let ae=ft[jt];if(v.replacer&&(ae=v.replacer.call(ft,jt,ae)),!rt(v,J+1,jt,!0,!0,!0))continue;const Ee=v.tag!==null&&v.tag!=="?"||v.dump&&v.dump.length>1024;Ee&&(v.dump&&o===v.dump.charCodeAt(0)?Wt+="?":Wt+="? "),Wt+=v.dump,Ee&&(Wt+=P(v,J)),rt(v,J+1,ae,!0,Ee)&&(v.dump&&o===v.dump.charCodeAt(0)?Wt+=":":Wt+=": ",Wt+=v.dump,dt+=Wt)}v.tag=Ct,v.dump=dt||"{}"}C(y,"writeBlockMapping");function j(v,J,ft){const ht=ft?v.explicitTypes:v.implicitTypes;for(let dt=0,Ct=ht.length;dt<Ct;dt+=1){const yt=ht[dt];if((yt.instanceOf||yt.predicate)&&(!yt.instanceOf||typeof J=="object"&&J instanceof yt.instanceOf)&&(!yt.predicate||yt.predicate(J))){if(ft?yt.multi&&yt.representName?v.tag=yt.representName(J):v.tag=yt.tag:v.tag="?",yt.represent){const Mt=v.styleMap[yt.tag]||yt.defaultStyle;let Nt;if(i.call(yt.represent)==="[object Function]")Nt=yt.represent(J,Mt);else if(n.call(yt.represent,Mt))Nt=yt.represent[Mt](J,Mt);else throw new t("!<"+yt.tag+'> tag resolver accepts not "'+Mt+'" style');v.dump=Nt}return!0}}return!1}C(j,"detectType");function rt(v,J,ft,ht,dt,Ct,yt){v.tag=null,v.dump=ft,j(v,ft,!1)||j(v,ft,!0);const Mt=i.call(v.dump),Nt=ht;ht&&(ht=v.flowLevel<0||v.flowLevel>J);const Wt=Mt==="[object Object]"||Mt==="[object Array]";let jt,ae;if(Wt&&(jt=v.duplicates.indexOf(ft),ae=jt!==-1),(v.tag!==null&&v.tag!=="?"||ae||v.indent!==2&&J>0)&&(dt=!1),ae&&v.usedDuplicates[jt])v.dump="*ref_"+jt;else{if(Wt&&ae&&!v.usedDuplicates[jt]&&(v.usedDuplicates[jt]=!0),Mt==="[object Object]")ht&&Object.keys(v.dump).length!==0?(y(v,J,v.dump,dt),ae&&(v.dump="&ref_"+jt+v.dump)):(vt(v,J,v.dump),ae&&(v.dump="&ref_"+jt+" "+v.dump));else if(Mt==="[object Array]")ht&&v.dump.length!==0?(v.noArrayIndent&&!yt&&J>0?ct(v,J-1,v.dump,dt):ct(v,J,v.dump,dt),ae&&(v.dump="&ref_"+jt+v.dump)):(ur(v,J,v.dump),ae&&(v.dump="&ref_"+jt+" "+v.dump));else if(Mt==="[object String]")v.tag!=="?"&&Lr(v,v.dump,J,Ct,Nt);else{if(Mt==="[object Undefined]")return!1;if(v.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+Mt)}if(v.tag!==null&&v.tag!=="?"){let Ee=encodeURI(v.tag[0]==="!"?v.tag.slice(1):v.tag).replace(/!/g,"%21");v.tag[0]==="!"?Ee="!"+Ee:Ee.slice(0,18)==="tag:yaml.org,2002:"?Ee="!!"+Ee.slice(18):Ee="!<"+Ee+">",v.dump=Ee+" "+v.dump}}return!0}C(rt,"writeNode");function ut(v,J){const ft=[],ht=[];st(v,ft,ht);const dt=ht.length;for(let Ct=0;Ct<dt;Ct+=1)J.duplicates.push(ft[ht[Ct]]);J.usedDuplicates=new Array(dt)}C(ut,"getDuplicateReferences");function st(v,J,ft){if(v!==null&&typeof v=="object"){const ht=J.indexOf(v);if(ht!==-1)ft.indexOf(ht)===-1&&ft.push(ht);else if(J.push(v),Array.isArray(v))for(let dt=0,Ct=v.length;dt<Ct;dt+=1)st(v[dt],J,ft);else{const dt=Object.keys(v);for(let Ct=0,yt=dt.length;Ct<yt;Ct+=1)st(v[dt[Ct]],J,ft)}}}C(st,"inspectNode");function bt(v,J){J=J||{};const ft=new Et(J);ft.noRefs||ut(v,ft);let ht=v;return ft.replacer&&(ht=ft.replacer.call({"":ht},"",ht)),rt(ft,0,ht,!0,!0)?ft.dump+`
457
- `:""}return C(bt,"dump2"),Af.dump=bt,Af}C(JS,"requireDumper");var sC;function tA(){if(sC)return hr;sC=1;const e=ZS(),t=JS();function r(i,n){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}return C(r,"renamed"),hr.Type=xr(),hr.Schema=r0(),hr.FAILSAFE_SCHEMA=a0(),hr.JSON_SCHEMA=h0(),hr.CORE_SCHEMA=d0(),hr.DEFAULT_SCHEMA=Rh(),hr.load=e.load,hr.loadAll=e.loadAll,hr.dump=t.dump,hr.YAMLException=Qa(),hr.types={binary:g0(),float:u0(),map:s0(),null:o0(),pairs:b0(),set:y0(),timestamp:f0(),bool:l0(),int:c0(),merge:p0(),omap:m0(),seq:n0(),str:i0()},hr.safeLoad=r("safeLoad","load"),hr.safeLoadAll=r("safeLoadAll","loadAll"),hr.safeDump=r("safeDump","dump"),hr}C(tA,"requireJsYaml");var xq=tA(),Cq=KS(xq),{Type:vlt,Schema:Llt,FAILSAFE_SCHEMA:Ilt,JSON_SCHEMA:_q,CORE_SCHEMA:Blt,DEFAULT_SCHEMA:Rlt,load:kq,loadAll:Olt,dump:Nlt,YAMLException:Dlt,types:Plt,safeLoad:Mlt,safeLoadAll:Flt,safeDump:$lt}=Cq,Tq={common:Ml,getConfig:Oe,insertCluster:iS,insertEdge:aS,insertEdgeLabel:Vm,insertMarkers:cS,insertNode:jm,interpolateToCurve:km,labelHelper:Vt,log:nt,positionEdgeLabel:K9},wl={},eA=C(e=>{for(const t of e)wl[t.name]=t},"registerLayoutLoaders"),Eq=C(()=>{eA([{name:"dagre",loader:C(async()=>await I(()=>import("./dagre-GXQ25YYZ-xmoviGlr.js"),__vite__mapDeps([105,106,102,103,104])),"loader")},{name:"swimlane",loader:C(async()=>await I(()=>import("./swimlanes-42K2YHIH-bD_tUjo6.js"),__vite__mapDeps([107,102,103,104])),"loader")},{name:"cose-bilkent",loader:C(async()=>await I(()=>import("./cose-bilkent-JH36ORCC-CtGsuuTW.js"),__vite__mapDeps([108,109,102,103,104])),"loader")}])},"registerDefaultLayoutLoaders");Eq();var Hlt=C(async(e,t)=>{if(!(e.layoutAlgorithm in wl))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const u of e.nodes){const h=u.domId||u.id;u.domId=`${e.diagramId}-${h}`}const r=wl[e.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:s}=e.config,{useGradient:a,gradientStart:o,gradientStop:l}=s,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${n!=null&&n.includes("dark")?"#FFFFFF":"#000000"}`),a){const u=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",o).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Tq,{algorithm:r.algorithm})},"render"),zlt=C((e="",{fallback:t="dagre"}={})=>{if(e in wl)return e;if(t in wl)return nt.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),x0="comm",rA="rule",iA="decl",wq="@media",Sq="@import",Aq="@supports",vq="@namespace",tg="@keyframes",nA="@layer",Lq="@scope",Iq=Math.abs,tl=String.fromCharCode;function sA(e){return e.trim()}function eg(e,t,r){return e.replace(t,r)}function ga(e,t){return e.charCodeAt(t)|0}function Fa(e,t,r){return e.slice(t,r)}function Ii(e){return e.length}function aA(e){return e.length}function Tc(e,t){return t.push(e),e}var Oh=1,$a=1,oA=0,ei=0,We=0,Za="";function C0(e,t,r,i,n,s,a,o){return{value:e,root:t,parent:r,type:i,props:n,children:s,line:Oh,column:$a,length:a,return:"",siblings:o}}function Bq(){return We}function Rq(){return We=ei>0?ga(Za,--ei):0,$a--,We===10&&($a=1,Oh--),We}function di(){return We=ei<oA?ga(Za,ei++):0,$a++,We===10&&($a=1,Oh++),We}function Nn(){return ga(Za,ei)}function Qc(){return ei}function Nh(e,t){return Fa(Za,e,t)}function Sl(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Oq(e){return Oh=$a=1,oA=Ii(Za=e),ei=0,[]}function Nq(e){return Za="",e}function vf(e){return sA(Nh(ei-1,rg(e===91?e+2:e===40?e+1:e)))}function Dq(e){for(;(We=Nn())&&We<33;)di();return Sl(e)>2||Sl(We)>3?"":" "}function Pq(e,t){for(;--t&&di()&&!(We<48||We>102||We>57&&We<65||We>70&&We<97););return Nh(e,Qc()+(t<6&&Nn()==32&&di()==32))}function rg(e){for(;di();)switch(We){case e:return ei;case 34:case 39:e!==34&&e!==39&&rg(We);break;case 40:e===41&&rg(e);break;case 92:di();break}return ei}function Mq(e,t){for(;di()&&e+We!==57;)if(e+We===84&&Nn()===47)break;return"/*"+Nh(t,ei-1)+"*"+tl(e===47?e:di())}function Fq(e){for(;!Sl(Nn());)di();return Nh(e,ei)}function $q(e){return Nq(Zc("",null,null,null,[""],e=Oq(e),0,[0],e))}function Zc(e,t,r,i,n,s,a,o,l){for(var c=0,u=0,h=a,f=0,d=0,p=0,g=1,b=1,m=1,_=0,k=0,T="",E=n,S=s,B=i,L=T;b;)switch(p=k,k=di()){case 40:p!=108&&ga(L,h-1)==58?(_++,L+="("):L+=vf(k);break;case 41:_--,L+=")";break;case 34:case 39:case 91:L+=vf(k);break;case 9:case 10:case 13:case 32:if(_>0){L+=tl(k);break}L+=Dq(p);break;case 92:L+=Pq(Qc()-1,7);continue;case 47:switch(Nn()){case 42:case 47:Tc(Hq(Mq(di(),Qc()),t,r,l),l),(Sl(p||1)==5||Sl(Nn()||1)==5)&&Ii(L)&&Fa(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*g:o[c++]=Ii(L)*m;case 125*g:case 59:case 0:if(_>0&&k){L+=tl(k);break}switch(k){case 0:case 125:b=0;case 59+u:m==-1&&(L=eg(L,/\f/g,"")),d>0&&(Ii(L)-h||g===0)&&Tc(d>32?oC(L+";",i,r,h-1,l):oC(eg(L," ","")+";",i,r,h-2,l),l);break;case 59:L+=";";default:if(Tc(B=aC(L,t,r,c,u,n,o,T,E=[],S=[],h,s),s),k===123)if(u===0)Zc(L,t,B,B,E,s,h,o,S);else{switch(f){case 99:if(ga(L,3)===110)break;case 108:if(ga(L,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Zc(e,B,B,i&&Tc(aC(e,B,B,0,0,n,o,T,n,E=[],h,S),S),n,S,h,o,i?E:S):Zc(L,B,B,B,[""],S,0,o,S)}}c=u=d=0,g=m=1,T=L="",h=a;break;case 58:h=1+Ii(L),d=p;default:if(g<1){if(k==123)--g;else if(k==125&&g++==0&&Rq()==125)continue}switch(L+=tl(k),k*g){case 38:m=u>0?1:(L+="\f",-1);break;case 44:if(_>0)break;o[c++]=(Ii(L)-1)*m,m=1;break;case 64:Nn()===45&&(L+=vf(di())),f=Nn(),u=h=Ii(T=L+=Fq(Qc())),k++;break;case 45:p===45&&Ii(L)==2&&(g=0)}}return s}function aC(e,t,r,i,n,s,a,o,l,c,u,h){for(var f=n-1,d=n===0?s:[""],p=aA(d),g=0,b=0,m=0;g<i;++g)for(var _=0,k=Fa(e,f+1,f=Iq(b=a[g])),T=e;_<p;++_)(T=sA(b>0?d[_]+" "+k:eg(k,/&\f/g,d[_])))&&(l[m++]=T);return C0(e,t,r,n===0?rA:o,l,c,u,h)}function Hq(e,t,r,i){return C0(e,t,r,x0,tl(Bq()),Fa(e,2,-2),0,i)}function oC(e,t,r,i,n){return C0(e,t,r,iA,Fa(e,0,i),Fa(e,i+1,-1),i,n)}function ig(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function zq(e,t,r,i){switch(e.type){case nA:if(e.children.length)break;case Sq:case vq:case iA:return e.return=e.return||e.value;case x0:return"";case tg:return e.return=e.value+"{"+ig(e.children,i)+"}";case rA:if(!Ii(e.value=e.props.join(",")))return""}return Ii(r=ig(e.children,i))?e.return=e.value+"{"+r+"}":""}function Uq(e){var t=aA(e);return function(r,i,n,s){for(var a="",o=0;o<t;o++)a+=e[o](r,i,n,s)||"";return a}}var lA="c4",qq=C(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Wq=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./c4Diagram-7LVT6UL2-BUUxjwvU.js");return{diagram:t}},__vite__mapDeps([110,111,102,103,104]));return{id:lA,diagram:e}},"loader"),jq={id:lA,detector:qq,loader:Wq},Vq=jq,cA="flowchart",Gq=C((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),Yq=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DueO0Ju6.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([112,113,114,115,111,116]));return{id:cA,diagram:e}},"loader"),Xq={id:cA,detector:Gq,loader:Yq},Kq=Xq,uA="flowchart-v2",Qq=C((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),Zq=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DueO0Ju6.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([112,113,114,115,111,116]));return{id:uA,diagram:e}},"loader"),Jq={id:uA,detector:Qq,loader:Zq},tW=Jq,hA="swimlane",eW=C(e=>/^\s*swimlane-beta\b/.test(e),"detector"),rW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VR7AAH4N-0wAluWQF.js");return{diagram:t}},__vite__mapDeps([117,112,113,114,115,111,116,102,103,104]));return{id:hA,diagram:e}},"loader"),iW={id:hA,detector:eW,loader:rW},nW=iW,dA="er",sW=C(e=>/^\s*erDiagram/.test(e),"detector"),aW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./erDiagram-RLTQ6QDP-Cl5kXPho.js");return{diagram:t}},__vite__mapDeps([118,114,115,116,102,103,104]));return{id:dA,diagram:e}},"loader"),oW={id:dA,detector:sW,loader:aW},lW=oW,fA="gitGraph",cW=C(e=>/^\s*gitGraph/.test(e),"detector"),uW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-B4aUQ9gY.js");return{diagram:t}},__vite__mapDeps([119,120,121,122,102,103,104]));return{id:fA,diagram:e}},"loader"),hW={id:fA,detector:cW,loader:uW},dW=hW,pA="gantt",fW=C(e=>/^\s*gantt/.test(e),"detector"),pW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-DNjT4iVH.js");return{diagram:t}},__vite__mapDeps([123,102,103,124,125,126,104]));return{id:pA,diagram:e}},"loader"),gW={id:pA,detector:fW,loader:pW},mW=gW,gA="info",bW=C(e=>/^\s*info/.test(e),"detector"),yW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./infoDiagram-27XIBGKW-CWcOvNAB.js");return{diagram:t}},__vite__mapDeps([127,122,102,103,104]));return{id:gA,diagram:e}},"loader"),xW={id:gA,detector:bW,loader:yW},mA="pie",CW=C(e=>/^\s*pie/.test(e),"detector"),_W=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-CSbpzXas.js");return{diagram:t}},__vite__mapDeps([128,121,122,102,103,129,130,125,104]));return{id:mA,diagram:e}},"loader"),kW={id:mA,detector:CW,loader:_W},bA="quadrantChart",TW=C(e=>/^\s*quadrantChart/.test(e),"detector"),EW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-DKTP6jS5.js");return{diagram:t}},__vite__mapDeps([131,124,125,126,102,103,104]));return{id:bA,diagram:e}},"loader"),wW={id:bA,detector:TW,loader:EW},SW=wW,yA="xychart",AW=C(e=>/^\s*xychart(-beta)?/.test(e),"detector"),vW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-BFqPF2Hl.js");return{diagram:t}},__vite__mapDeps([132,125,130,124,126,102,103,104]));return{id:yA,diagram:e}},"loader"),LW={id:yA,detector:AW,loader:vW},IW=LW,xA="requirement",BW=C(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),RW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./requirementDiagram-BXWQKSXE-B9hH69zu.js");return{diagram:t}},__vite__mapDeps([133,114,115,102,103,104]));return{id:xA,diagram:e}},"loader"),OW={id:xA,detector:BW,loader:RW},NW=OW,CA="sequence",DW=C(e=>/^\s*sequenceDiagram/.test(e),"detector"),PW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-BF77J63J.js");return{diagram:t}},__vite__mapDeps([134,120,111,102,103,104]));return{id:CA,diagram:e}},"loader"),MW={id:CA,detector:DW,loader:PW},FW=MW,_A="class",$W=C((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),HW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./classDiagram-ZZMXUADV-B5yD90Df.js");return{diagram:t}},__vite__mapDeps([135,136,113,114,115,111,102,103,104]));return{id:_A,diagram:e}},"loader"),zW={id:_A,detector:$W,loader:HW},UW=zW,kA="classDiagram",qW=C((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),WW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./classDiagram-v2-VYDZK3BY-B5yD90Df.js");return{diagram:t}},__vite__mapDeps([137,136,113,114,115,111,102,103,104]));return{id:kA,diagram:e}},"loader"),jW={id:kA,detector:qW,loader:WW},VW=jW,TA="state",GW=C((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),YW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./stateDiagram-D77RDMKH-CzslKEYw.js");return{diagram:t}},__vite__mapDeps([138,139,114,115,111,106,102,103,104]));return{id:TA,diagram:e}},"loader"),XW={id:TA,detector:GW,loader:YW},KW=XW,EA="stateDiagram",QW=C((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),ZW=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./stateDiagram-v2-MP3YSRHH-DKbNjyV-.js");return{diagram:t}},__vite__mapDeps([140,139,114,115,111,102,103,104]));return{id:EA,diagram:e}},"loader"),JW={id:EA,detector:QW,loader:ZW},tj=JW,wA="journey",ej=C(e=>/^\s*journey/.test(e),"detector"),rj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./journeyDiagram-3NMN7TZE-rRe3uTLu.js");return{diagram:t}},__vite__mapDeps([141,113,111,129,102,103,104]));return{id:wA,diagram:e}},"loader"),ij={id:wA,detector:ej,loader:rj},nj=ij,sj=C((e,t,r)=>{nt.debug(`rendering svg for syntax error
458
- `);const i=wF(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),PT(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),SA={draw:sj},aj=SA,oj={db:{},renderer:SA,parser:{parse:C(()=>{},"parse")}},lj=oj,AA="flowchart-elk",cj=C((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),uj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./flowDiagram-HODETNUW-DueO0Ju6.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([112,113,114,115,111,116]));return{id:AA,diagram:e}},"loader"),hj={id:AA,detector:cj,loader:uj},dj=hj,vA="timeline",fj=C(e=>/^\s*timeline/.test(e),"detector"),pj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-owGoHn8z.js");return{diagram:t}},__vite__mapDeps([142,129,102,103,104]));return{id:vA,diagram:e}},"loader"),gj={id:vA,detector:fj,loader:pj},mj=gj,LA="mindmap",bj=C(e=>/^\s*mindmap/.test(e),"detector"),yj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./mindmap-definition-YA3MSWOX-Cj5-j6a7.js");return{diagram:t}},__vite__mapDeps([143,114,115,102,103,104]));return{id:LA,diagram:e}},"loader"),xj={id:LA,detector:bj,loader:yj},Cj=xj,IA="kanban",_j=C(e=>/^\s*kanban/.test(e),"detector"),kj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./kanban-definition-UXKFOSKX-tAKCWntJ.js");return{diagram:t}},__vite__mapDeps([144,113,102,103,104]));return{id:IA,diagram:e}},"loader"),Tj={id:IA,detector:_j,loader:kj},Ej=Tj,BA="sankey",wj=C(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Sj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-CDqNONxU.js");return{diagram:t}},__vite__mapDeps([145,130,125,102,103,104]));return{id:BA,diagram:e}},"loader"),Aj={id:BA,detector:wj,loader:Sj},vj=Aj,RA="packet",Lj=C(e=>/^\s*packet(-beta)?/.test(e),"detector"),Ij=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-oZ6jRSCd.js");return{diagram:t}},__vite__mapDeps([146,121,122,102,103,104]));return{id:RA,diagram:e}},"loader"),Bj={id:RA,detector:Lj,loader:Ij},OA="radar",Rj=C(e=>/^\s*radar-beta/.test(e),"detector"),Oj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-CMX0u7Gf.js");return{diagram:t}},__vite__mapDeps([147,121,122,102,103,104]));return{id:OA,diagram:e}},"loader"),Nj={id:OA,detector:Rj,loader:Oj},NA="block",Dj=C(e=>/^\s*block(-beta)?/.test(e),"detector"),Pj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./blockDiagram-I7D4REHJ-DMrufypV.js");return{diagram:t}},__vite__mapDeps([148,113,116,102,103,104]));return{id:NA,diagram:e}},"loader"),Mj={id:NA,detector:Dj,loader:Pj},Fj=Mj,DA="treeView",$j=C(e=>/^\s*treeView-beta/.test(e),"detector"),Hj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-CguQzzXs.js");return{diagram:t}},__vite__mapDeps([149,120,121,122,102,103,104]));return{id:DA,diagram:e}},"loader"),zj={id:DA,detector:$j,loader:Hj},Uj=zj,PA="architecture",qj=C(e=>/^\s*architecture/.test(e),"detector"),Wj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-DIZ15fO5.js");return{diagram:t}},__vite__mapDeps([150,121,122,102,103,109,104]));return{id:PA,diagram:e}},"loader"),jj={id:PA,detector:qj,loader:Wj},Vj=jj,MA="eventmodeling",Gj=C(e=>/^\s*eventmodeling/.test(e),"detector"),Yj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-cuhv3Fvj.js");return{diagram:t}},__vite__mapDeps([151,121,122,102,103,104]));return{id:MA,diagram:e}},"loader"),Xj={id:MA,detector:Gj,loader:Yj},Kj=Xj,FA="ishikawa",Qj=C(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Zj=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-ccIPCUs4.js");return{diagram:t}},__vite__mapDeps([152,102,103,104]));return{id:FA,diagram:e}},"loader"),Jj={id:FA,detector:Qj,loader:Zj},$A="venn",tV=C(e=>/^\s*venn-beta/.test(e),"detector"),eV=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-D0_6bldW.js");return{diagram:t}},__vite__mapDeps([153,102,103,104]));return{id:$A,diagram:e}},"loader"),rV={id:$A,detector:tV,loader:eV},iV=rV,HA="treemap",nV=C(e=>/^\s*treemap/.test(e),"detector"),sV=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-Bp_JbX0e.js");return{diagram:t}},__vite__mapDeps([154,121,115,122,102,103,126,130,125,104]));return{id:HA,diagram:e}},"loader"),aV={id:HA,detector:nV,loader:sV},zA="wardley",oV=C(e=>/^\s*wardley-beta/i.test(e),"detector"),lV=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-D9GbTBKy.js");return{diagram:t}},__vite__mapDeps([155,121,122,102,103,104]));return{id:zA,diagram:e}},"loader"),cV={id:zA,detector:oV,loader:lV},uV=cV,UA="cynefin",hV=C(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),dV=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-kMbm5D7e.js");return{diagram:t}},__vite__mapDeps([156,121,122,102,103,104]));return{id:UA,diagram:e}},"loader"),fV={id:UA,detector:hV,loader:dV},qA="railroad",pV=C(e=>/^\s*railroad-beta/i.test(e),"detector"),gV=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-Ct8aPeLX.js");return{diagram:t}},__vite__mapDeps([157,158,121,122,102,103,104]));return{id:qA,diagram:e}},"loader"),mV={id:qA,detector:pV,loader:gV},WA="railroadEbnf",bV=C(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),yV=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-DbxnEjb0.js");return{diagram:t}},__vite__mapDeps([159,158,121,122,102,103,104]));return{id:WA,diagram:e}},"loader"),xV={id:WA,detector:bV,loader:yV},jA="railroadAbnf",CV=C(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),_V=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-K8P_VxLi.js");return{diagram:t}},__vite__mapDeps([160,158,121,122,102,103,104]));return{id:jA,diagram:e}},"loader"),kV={id:jA,detector:CV,loader:_V},VA="railroadPeg",TV=C(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),EV=C(async()=>{const{diagram:e}=await I(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-BYB3oVZ_.js");return{diagram:t}},__vite__mapDeps([161,158,121,122,102,103,104]));return{id:VA,diagram:e}},"loader"),wV={id:VA,detector:TV,loader:EV},lC=!1,Dh=C(()=>{lC||(lC=!0,Cu("error",lj,e=>e.toLowerCase().trim()==="error"),Cu("---",{db:{clear:C(()=>{},"clear")},styles:{},renderer:{draw:C(()=>{},"draw")},parser:{parse:C(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:C(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xp(dj,Cj,Vj),xp(Vq,Ej,VW,UW,lW,mW,xW,kW,NW,FW,nW,tW,Kq,mj,dW,tj,KW,nj,SW,vj,Bj,IW,Fj,Kj,Uj,Nj,Jj,aV,mV,xV,kV,wV,iV,uV,fV))},"addDiagrams"),SV=C(async()=>{nt.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(ks).map(async([r,{detector:i,loader:n}])=>{if(n)try{Tp(r)}catch{try{const{diagram:s,id:a}=await n();Cu(a,s,i)}catch(s){throw nt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete ks[r],s}}}))).filter(r=>r.status==="rejected");if(t.length>0){nt.error(`Failed to load ${t.length} external diagrams`);for(const r of t)nt.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),AV="graphics-document document";function GA(e,t){e.attr("role",AV),t!==""&&e.attr("aria-roledescription",t)}C(GA,"setA11yDiagramInfo");function YA(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}C(YA,"addSVGa11yTitleDescription");var xs,ng=(xs=class{constructor(t,r,i,n,s){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=s}static async fromText(t,r={}){var c,u;const i=Oe(),n=tm(t,i);t=G8(t)+`
459
- `;try{Tp(n)}catch{const h=xD(n);if(!h)throw new IT(`Diagram ${n} not found.`);const{id:f,diagram:d}=await h();Cu(f,d)}const{db:s,parser:a,renderer:o,init:l}=Tp(n);return a.parser&&(a.parser.yy=s),(c=s.clear)==null||c.call(s),l==null||l(i),r.title&&((u=s.setDiagramTitle)==null||u.call(s,r.title)),await a.parse(t),new xs(n,t,s,a,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},C(xs,"Diagram"),xs),cC=[],vV=C(()=>{cC.forEach(e=>{e()}),cC=[]},"attachFunctions"),LV=C(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function XA(e){const t=e.match(LT);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
460
- `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
461
- `):t[2];let n=kq(i,{schema:_q})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};const s={};return n.displayMode&&(s.displayMode=n.displayMode.toString()),n.title&&(s.title=n.title.toString()),n.config&&(s.config=n.config),{text:e.slice(t[0].length),metadata:s}}C(XA,"extractFrontMatter");var IV=C(e=>e.replace(/\r\n?/g,`
462
- `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),BV=C(e=>{const{text:t,metadata:r}=XA(e),{displayMode:i,title:n,config:s={}}=r;return i&&(s.gantt||(s.gantt={}),s.gantt.displayMode=i),{title:n,config:s,text:t}},"processFrontmatter"),RV=C(e=>{const t=mr.detectInit(e)??{},r=mr.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:N8(e),directive:t}},"processDirectives");function _0(e){const t=IV(e),r=BV(t),i=RV(r.text),n=Am(r.config,i.directive);return e=LV(i.text),{code:e,title:r.title,config:n}}C(_0,"preprocessDiagram");function KA(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}C(KA,"toBase64");var OV=5e4,NV="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",DV="sandbox",PV="loose",MV="http://www.w3.org/2000/svg",FV="http://www.w3.org/1999/xlink",$V="http://www.w3.org/1999/xhtml",HV="100%",zV="100%",UV="border:0;margin:0;",qV="margin:0",WV="allow-top-navigation-by-user-activation allow-popups",jV='The "iframe" tag is not supported by your browser.',VV=["foreignobject"],GV=["dominant-baseline"];function k0(e){const t=_0(e);return yu(),gD(t.config??{}),t}C(k0,"processAndSetConfigs");async function QA(e,t){Dh();try{const{code:r,config:i}=k0(e);return{diagramType:(await JA(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}C(QA,"parse");var uC=C((e,t,r=[])=>{const i=ET(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),YV=C((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const o=yr(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{x1(l.styles)||o.forEach(c=>{r.insertRule(uC(l.id,c,l.styles),r.cssRules.length)}),x1(l.textStyles)||r.insertRule(uC(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const n=new CSSStyleSheet;n.replaceSync(e.themeCSS),i=kp(n)+`
463
- `}else i+=`${e.themeCSS}
464
- `;return i+kp(r)},"createCssStyles"),XV=C((e,t)=>ig($q(`${e}{${t}}`),Uq([C(function(i,n,s,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===tg)return;i.props=i.props.map(o=>o===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[wq,Aq,nA,Lq,"@container","@starting-style"],tg].includes(i.type)||(nt.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=x0))},"addNamespace"),zq])),"compileCSS"),KV=C((e,t,r,i)=>{const n=YV(e,r),s=MD(t,n,{...e.themeVariables,theme:e.theme,look:e.look},i);return XV(i,s)},"createUserStyles"),QV=C((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Hn(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),ZV=C((e="",t)=>{var n,s;const r=(s=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&s.height?t.viewBox.baseVal.height+"px":zV,i=KA(`<body style="${qV}">${e}</body>`);return`<iframe style="width:${HV};height:${r};${UV}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${WV}">
465
- ${jV}
466
- </iframe>`},"putIntoIFrame"),hC=C((e,t,r,i,n)=>{const s=e.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",t).attr("width","100%").attr("xmlns",MV);return n&&a.attr("xmlns:xlink",n),a.append("g"),e},"appendDivSvgG");function sg(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}C(sg,"sandboxedIframe");var JV=C((e,t,r,i)=>{var n,s,a;(n=e.getElementById(t))==null||n.remove(),(s=e.getElementById(r))==null||s.remove(),(a=e.getElementById(i))==null||a.remove()},"removeExistingElements"),tG=C(async function(e,t,r){var G,H,M,N,q,V;Dh();const i=k0(t);t=i.code;const n=Oe();nt.debug(n),t.length>((n==null?void 0:n.maxTextSize)??OV)&&(t=NV);const s=`#${e}`,a="i"+e,o="#"+a,l="d"+e,c="#"+l,u=C(()=>{const A=se(f?o:c).node();A&&"remove"in A&&A.remove()},"removeTempElements");let h=se(document.body);const f=n.securityLevel===DV,d=n.securityLevel===PV,p=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const tt=sg(se(r),a);h=se(tt.nodes()[0].contentDocument.body),h.node().style.margin="0"}else h=se(r);hC(h,e,l,`font-family: ${p}`,FV)}else{if(JV(document,e,l,a),f){const tt=sg(se(document.body),a);h=se(tt.nodes()[0].contentDocument.body),h.node().style.margin="0"}else h=se("body");hC(h,e,l)}let g,b;try{g=await ng.fromText(t,{title:i.title})}catch(tt){if(n.suppressErrorRendering)throw u(),tt;g=await ng.fromText("error"),b=tt}const m=h.select(c).node(),_=g.type,k=m.firstChild,T=k.firstChild,E=(H=(G=g.renderer).getClasses)==null?void 0:H.call(G,t,g),S=KV(n,_,E,s),B=document.createElement("style");B.innerHTML=S,k.insertBefore(B,T);try{await g.renderer.draw(t,e,"11.17.2",g)}catch(tt){throw n.suppressErrorRendering?u():aj.draw(t,e,"11.17.2"),tt}const L=h.select(`${c} svg`),W=(N=(M=g.db).getAccTitle)==null?void 0:N.call(M),O=(V=(q=g.db).getAccDescription)==null?void 0:V.call(q);tv(_,L,W,O);const X=C(()=>{h.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",$V);let tt=h.select(c).node().innerHTML;if(nt.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),tt=QV(tt,f,Hi(n.arrowMarkerAbsolute)),f){const A=h.select(c+" svg").node();tt=ZV(tt,A)}else d||(tt=Oa.sanitize(tt,{ADD_TAGS:VV,ADD_ATTR:GV,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return vV(),tt},"serializeSvg")();if(b)throw b;return u(),{diagramType:_,svg:X,bindFunctions:g.db.bindFunctions}},"render");function ZA(e={}){var i;const t=er({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),fD(t),t!=null&&t.theme&&t.theme in on?t.themeVariables=on[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=on.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?dD(t):wT();Jg(r.logLevel),Dh()}C(ZA,"initialize");var JA=C((e,t={})=>{const{code:r}=_0(e);return ng.fromText(r,t)},"getDiagramFromText");function tv(e,t,r,i){GA(t,e),YA(t,r,i,t.attr("id"))}C(tv,"addA11yInfo");var vs=Object.freeze({render:tG,parse:QA,getDiagramFromText:JA,initialize:ZA,getConfig:Oe,setConfig:ST,getSiteConfig:wT,updateSiteConfig:pD,reset:C(()=>{yu()},"reset"),globalReset:C(()=>{yu(Na)},"globalReset"),defaultConfig:Na});Jg(Oe().logLevel);yu(Oe());var eG=C((e,t,r)=>{nt.warn(e),Sm(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),ev=C(async function(e={querySelector:".mermaid"}){try{await rG(e)}catch(t){if(Sm(t)&&nt.error(t.str),qr.parseError&&qr.parseError(t),!e.suppressErrors)throw nt.error("Use the suppressErrors option to suppress these errors"),t}},"run"),rG=C(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=vs.getConfig();nt.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");nt.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(nt.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),vs.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const s=new mr.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){if(nt.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${s.next()}`;a=l.innerHTML,a=cE(mr.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=mr.detectInit(a);u&&nt.debug("Detected early reinit: ",u);try{const{svg:h,bindFunctions:f}=await sv(c,a,l);l.innerHTML=h,e&&await e(c),f&&f(l)}catch(h){eG(h,o,qr.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),rv=C(function(e){vs.initialize(e)},"initialize"),iG=C(async function(e,t,r){nt.warn("mermaid.init is deprecated. Please use run instead."),e&&rv(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await ev(i)},"init"),nG=C(async(e,{lazyLoad:t=!0}={})=>{Dh(),xp(...e),t===!1&&await SV()},"registerExternalDiagrams"),iv=C(function(){if(qr.startOnLoad){const{startOnLoad:e}=vs.getConfig();e&&qr.run().catch(t=>nt.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",iv,!1);var sG=C(function(e){qr.parseError=e},"setParseErrorHandler"),Uu=[],Lf=!1,nv=C(async()=>{if(!Lf){for(Lf=!0;Uu.length>0;){const e=Uu.shift();if(e)try{await e()}catch(t){nt.error("Error executing queue",t)}}Lf=!1}},"executeQueue"),aG=C(async(e,t)=>new Promise((r,i)=>{const n=C(()=>new Promise((s,a)=>{vs.parse(e,t).then(o=>{s(o),r(o)},o=>{var l;nt.error("Error parsing",o),(l=qr.parseError)==null||l.call(qr,o),a(o),i(o)})}),"performCall");Uu.push(n),nv().catch(i)}),"parse"),sv=C((e,t,r)=>new Promise((i,n)=>{const s=C(()=>new Promise((a,o)=>{vs.render(e,t,r).then(l=>{a(l),i(l)},l=>{var c;nt.error("Error parsing",l),(c=qr.parseError)==null||c.call(qr,l),o(l),n(l)})}),"performCall");Uu.push(s),nv().catch(n)}),"render"),oG=C(()=>Object.keys(ks).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),qr={startOnLoad:!0,mermaidAPI:vs,parse:aG,render:sv,init:iG,run:ev,registerExternalDiagrams:nG,registerLayoutLoaders:eA,initialize:rv,parseError:void 0,contentLoaded:iv,setParseErrorHandler:sG,detectType:tm,registerIconPacks:KF,getRegisteredDiagramsMetadata:oG},If=qr;/*! Check if previously processed *//*!
467
- * Wait for document loaded before starting the execution
468
- */var dC={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0};function lG(e={}){let t=!1,r={...dC,...e.config},i={initialize(n){r={...dC,...e.config,...n},If.initialize(r),t=!0},async render(n,s){return t||(If.initialize(r),t=!0),await If.render(n,s)}};return{name:"mermaid",type:"diagram",language:"mermaid",getMermaid(n){return n&&i.initialize(n),i}}}var cG=lG();const Ph=(function(e){if(e==null)return fG;if(typeof e=="function")return Mh(e);if(typeof e=="object")return Array.isArray(e)?uG(e):hG(e);if(typeof e=="string")return dG(e);throw new Error("Expected function, string, or object as test")});function uG(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Ph(e[r]);return Mh(i);function i(...n){let s=-1;for(;++s<t.length;)if(t[s].apply(this,n))return!0;return!1}}function hG(e){const t=e;return Mh(r);function r(i){const n=i;let s;for(s in e)if(n[s]!==t[s])return!1;return!0}}function dG(e){return Mh(t);function t(r){return r&&r.type===e}}function Mh(e){return t;function t(r,i,n){return!!(pG(r)&&e.call(this,r,typeof i=="number"?i:void 0,n||void 0))}}function fG(){return!0}function pG(e){return e!==null&&typeof e=="object"&&"type"in e}const av=[],Uo=!0,ag=!1,ds="skip";function Fh(e,t,r,i){let n;typeof t=="function"&&typeof r!="function"?(i=r,r=t):n=t;const s=Ph(n),a=i?-1:1;o(e,void 0,[])();function o(l,c,u){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const d=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=av,p,g,b;if((!t||s(l,c,u[u.length-1]||void 0))&&(d=gG(r(l,u)),d[0]===ag))return d;if("children"in l&&l.children){const m=l;if(m.children&&d[0]!==ds)for(g=(i?m.children.length:-1)+a,b=u.concat(m);g>-1&&g<m.children.length;){const _=m.children[g];if(p=o(_,g,b)(),p[0]===ag)return p;g=typeof p[1]=="number"?p[1]:g+a}}return d}}}function gG(e){return Array.isArray(e)?e:typeof e=="number"?[Uo,e]:e==null?av:[e]}function gi(e,t,r,i){let n,s,a;typeof t=="function"&&typeof r!="function"?(s=void 0,a=t,n=r):(s=t,a=r,n=i),Fh(e,s,o,n);function o(l,c){const u=c[c.length-1],h=u?u.children.indexOf(l):void 0;return a(l,h,u)}}const Ha={indicator:"indicator",textOnly:"text-only",remove:"remove"};function mG({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:i=!1,allowedProtocols:n=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=Ha.indicator,imageBlockPolicy:l=Ha.indicator}){const c=t.length&&!t.every(h=>h==="*"),u=r.length&&!r.every(h=>h==="*");if(!e&&(c||u))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return h=>{const f=kG(e,t,r,i,n,s,a,o,l);ov(h),gi(h,f)}}function fC(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function bG(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const yG=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),xG=new Set(["javascript:","data:","file:","vbscript:"]);function pC(e,t,r,i=!1,n=!1,s=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!n)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return n&&i&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const u=e.substring(5);if(u&&u.length>0&&u!=="invalid")return e}}catch{return null}return null}const a=fC(e,r);if(!a||xG.has(a.protocol)||!(yG.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const l=bG(e);return a&&t.some(c=>{const u=fC(c,r);return!u||u.origin!==a.origin?!1:a.href.startsWith(u.href)})?l?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:l?a.pathname+a.search+a.hash:a.href:null}function ov(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)ov(t)}}const Bf=Symbol("node-seen");function CG(e,t,r){return t===Ha.remove?{type:"remove"}:t===Ha.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:r},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function _G(e,t,r){if(t===Ha.remove)return{type:"remove"};if(t===Ha.textOnly){const i=String(e.properties.alt||"");return i?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:i}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const kG=(e,t,r,i,n,s,a,o,l)=>{const c=(u,h,f)=>{if(u.type!=="element"||u[Bf])return Uo;if(u.tagName==="a"){const d=pC(u.properties.href,t,e,!1,!1,n);if(d===null){if(u[Bf]=!0,gi(u,c),f&&typeof h=="number"){const p=CG(u,o,a);if(p.type==="remove")return f.children.splice(h,1),[ds,h];f.children[h]=p.element}return ds}else return u.properties.href=d,u.properties.target="_blank",u.properties.rel="noopener noreferrer",Uo}if(u.tagName==="img"){const d=pC(u.properties.src,r,e,i,!0,n);if(d===null){if(u[Bf]=!0,gi(u,c),f&&typeof h=="number"){const p=_G(u,l,s);if(p.type==="remove")return f.children.splice(h,1),[ds,h];f.children[h]=p.element}return ds}else return u.properties.src=d,Uo}return Uo};return c},lv=-1,$h=0,el=1,qu=2,T0=3,E0=4,w0=5,S0=6,cv=7,uv=8,{defineProperty:TG}=Object,hv=typeof self=="object"?self:globalThis,gC=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new hv[e](t)},EG=(e,t)=>{const r=(n,s)=>(e.set(s,n),n),i=n=>{if(e.has(n))return e.get(n);const[s,a]=t[n];switch(s){case $h:case lv:return r(a,n);case el:{const o=r([],n);for(const l of a)o.push(i(l));return o}case qu:{const o=r({},n);for(const[l,c]of a){const u=i(l),h=i(c);u==="__proto__"?TG(o,u,{value:h,configurable:!0,enumerable:!0,writable:!0}):o[u]=h}return o}case T0:return r(new Date(a),n);case E0:{const{source:o,flags:l}=a;return r(new RegExp(o,l),n)}case w0:{const o=r(new Map,n);for(const[l,c]of a)o.set(i(l),i(c));return o}case S0:{const o=r(new Set,n);for(const l of a)o.add(i(l));return o}case cv:{const{name:o,message:l}=a;return r(typeof hv[o]=="function"?gC(o,l):new Error(l),n)}case uv:return r(BigInt(a),n);case"BigInt":return r(Object(BigInt(a)),n);case"ArrayBuffer":return r(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return r(new DataView(o),a)}case"-0":return-0}return r(gC(s,a),n)};return i},mC=e=>EG(new Map,e)(0),is="",{toString:wG}={},{keys:SG,is:AG}=Object,ko=e=>{const t=typeof e;if(t!=="object"||!e)return[$h,t];const r=wG.call(e).slice(8,-1);switch(r){case"Array":return[el,is];case"Object":return[qu,is];case"Date":return[T0,is];case"RegExp":return[E0,is];case"Map":return[w0,is];case"Set":return[S0,is];case"DataView":return[el,r]}return r.includes("Array")?[el,r]:e instanceof Error?[cv,e.name||"Error"]:[qu,r]},Ec=([e,t])=>e===$h&&(t==="function"||t==="symbol"),vG=(e,t,r,i)=>{const n=(a,o)=>{const l=i.push(a)-1;return r.set(o,l),l},s=a=>{if(r.has(a))return r.get(a);let[o,l]=ko(a);switch(o){case $h:{let u=a;switch(l){case"bigint":o=uv,u=a.toString();break;case"number":if(!a&&AG(a,-0))return i.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return n([lv],a)}return n([o,u],a)}case el:{if(l){let f=a;return l==="DataView"?f=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(f=new Uint8Array(a)),n([l,[...f]],a)}const u=[],h=n([o,u],a);for(const f of a)u.push(s(f));return h}case qu:{if(l)switch(l){case"BigInt":return n([l,a.toString()],a);case"Boolean":case"Number":case"String":return n([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const u=[],h=n([o,u],a);for(const f of SG(a))(e||!Ec(ko(a[f])))&&u.push([s(f),s(a[f])]);return h}case T0:return n([o,isNaN(a.getTime())?is:a.toISOString()],a);case E0:{const{source:u,flags:h}=a;return n([o,{source:u,flags:h}],a)}case w0:{const u=[],h=n([o,u],a);for(const[f,d]of a)(e||!(Ec(ko(f))||Ec(ko(d))))&&u.push([s(f),s(d)]);return h}case S0:{const u=[],h=n([o,u],a);for(const f of a)(e||!Ec(ko(f)))&&u.push(s(f));return h}}const{message:c}=a;return n([o,{name:l,message:c}],a)};return s},bC=(e,{json:t,lossy:r}={})=>{const i=[];return vG(!(t||r),!!t,new Map,i)(e),i},Ls=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?mC(bC(e,t)):structuredClone(e):(e,t)=>mC(bC(e,t));const yC=/[#.]/g;function LG(e,t){const r=e||"",i={};let n=0,s,a;for(;n<r.length;){yC.lastIndex=n;const o=yC.exec(r),l=r.slice(n,o?o.index:r.length);l&&(s?s==="#"?i.id=l:Array.isArray(i.className)?i.className.push(l):i.className=[l]:a=l,n+=l.length),o&&(s=o[0],n++)}return{type:"element",tagName:a||t||"div",properties:i,children:[]}}function dv(e,t,r){const i=r?OG(r):void 0;function n(s,a,...o){let l;if(s==null){l={type:"root",children:[]};const c=a;o.unshift(c)}else{l=LG(s,t);const c=l.tagName.toLowerCase(),u=i?i.get(c):void 0;if(l.tagName=u||c,IG(a))o.unshift(a);else for(const[h,f]of Object.entries(a))BG(e,l.properties,h,f)}for(const c of o)og(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return n}function IG(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const i of r){const n=t[i];if(n&&typeof n=="object"){if(!Array.isArray(n))return!0;const s=n;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function BG(e,t,r,i){const n=Ol(e,r);let s;if(i!=null){if(typeof i=="number"){if(Number.isNaN(i))return;s=i}else typeof i=="boolean"?s=i:typeof i=="string"?n.spaceSeparated?s=jb(i):n.commaSeparated?s=Wb(i):n.commaOrSpaceSeparated?s=jb(Wb(i).join(" ")):s=xC(n,n.property,i):Array.isArray(i)?s=[...i]:s=n.property==="style"?RG(i):String(i);if(Array.isArray(s)){const a=[];for(const o of s)a.push(xC(n,n.property,o));s=a}n.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[n.property]=s}}function og(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)og(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?og(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function xC(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||fl(r)===fl(t)))return!0}return r}function RG(e){const t=[];for(const[r,i]of Object.entries(e))t.push([r,i].join(": "));return t.join("; ")}function OG(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const NG=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],DG=dv(qa,"div"),PG=dv(Mi,"g",NG);function MG(e){const t=String(e),r=[];return{toOffset:n,toPoint:i};function i(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=r[a];if(o===void 0){const l=CC(t,r[a-1]);o=l===-1?t.length+1:l+1,r[a]=o}if(o>s)return{line:a+1,column:s-(a>0?r[a-1]:0)+1,offset:s};a++}}}function n(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;r.length<s.line;){const o=r[r.length-1],l=CC(t,o),c=l===-1?t.length+1:l+1;if(o===c)break;r.push(c)}const a=(s.line>1?r[s.line-2]:0)+s.column-1;if(a<r[s.line-1])return a}}}function CC(e,t){const r=e.indexOf("\r",t),i=e.indexOf(`
469
- `,t);return i===-1?r:r===-1||r+1===i?i:r<i?r:i}const fs={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},fv={}.hasOwnProperty,FG=Object.prototype;function $G(e,t){const r=t||{};return A0({file:r.file||void 0,location:!1,schema:r.space==="svg"?Mi:qa,verbose:r.verbose||!1},e)}function A0(e,t){let r;switch(t.nodeName){case"#comment":{const i=t;return r={type:"comment",value:i.data},Jc(e,i,r),r}case"#document":case"#document-fragment":{const i=t,n="mode"in i?i.mode==="quirks"||i.mode==="limited-quirks":!1;if(r={type:"root",children:pv(e,t.childNodes),data:{quirksMode:n}},e.file&&e.location){const s=String(e.file),a=MG(s),o=a.toPoint(0),l=a.toPoint(s.length);r.position={start:o,end:l}}return r}case"#documentType":{const i=t;return r={type:"doctype"},Jc(e,i,r),r}case"#text":{const i=t;return r={type:"text",value:i.value},Jc(e,i,r),r}default:return r=HG(e,t),r}}function pv(e,t){let r=-1;const i=[];for(;++r<t.length;){const n=A0(e,t[r]);i.push(n)}return i}function HG(e,t){const r=e.schema;e.schema=t.namespaceURI===fs.svg?Mi:qa;let i=-1;const n={};for(;++i<t.attrs.length;){const o=t.attrs[i],l=(o.prefix?o.prefix+":":"")+o.name;fv.call(FG,l)||(n[l]=o.value)}const a=(e.schema.space==="svg"?PG:DG)(t.tagName,n,pv(e,t.childNodes));if(Jc(e,t,a),a.tagName==="template"){const o=t,l=o.sourceCodeLocation,c=l&&l.startTag&&ca(l.startTag),u=l&&l.endTag&&ca(l.endTag),h=A0(e,o.content);c&&u&&e.file&&(h.position={start:c.end,end:u.start}),a.content=h}return e.schema=r,a}function Jc(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const i=zG(e,r,t.sourceCodeLocation);i&&(e.location=!0,r.position=i)}}function zG(e,t,r){const i=ca(r);if(t.type==="element"){const n=t.children[t.children.length-1];if(i&&!r.endTag&&n&&n.position&&n.position.end&&(i.end=Object.assign({},n.position.end)),e.verbose){const s={};let a;if(r.attrs)for(a in r.attrs)fv.call(r.attrs,a)&&(s[Ol(e.schema,a).property]=ca(r.attrs[a]));r.startTag;const o=ca(r.startTag),l=r.endTag?ca(r.endTag):void 0,c={opening:o};l&&(c.closing=l),c.properties=s,t.data={position:c}}}return i}function ca(e){const t=_C({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=_C({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function _C(e){return e.line&&e.column?e:void 0}const UG={},qG={}.hasOwnProperty,gv=Pg("type",{handlers:{root:jG,element:KG,text:YG,comment:XG,doctype:GG}});function WG(e,t){const i=(t||UG).space;return gv(e,i==="svg"?Mi:qa)}function jG(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=v0(e.children,r,t),Ja(e,r),r}function VG(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=v0(e.children,r,t),Ja(e,r),r}function GG(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ja(e,t),t}function YG(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ja(e,t),t}function XG(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ja(e,t),t}function KG(e,t){const r=t;let i=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Mi);const n=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&qG.call(e.properties,s)){const l=QG(i,s,e.properties[s]);l&&n.push(l)}}const a=i.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:n,namespaceURI:fs[a],childNodes:[],parentNode:null};return o.childNodes=v0(e.children,o,i),Ja(e,o),e.tagName==="template"&&e.content&&(o.content=VG(e.content,i)),o}function QG(e,t,r){const i=Ol(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&i.boolean)return;Array.isArray(r)&&(r=i.commaSeparated?Mg(r):Fg(r));const n={name:i.attribute,value:r===!0?"":String(r)};if(i.space&&i.space!=="html"&&i.space!=="svg"){const s=n.name.indexOf(":");s<0?n.prefix="":(n.name=n.name.slice(s+1),n.prefix=i.attribute.slice(0,s)),n.namespace=fs[i.space]}return n}function v0(e,t,r){let i=-1;const n=[];if(e)for(;++i<e.length;){const s=gv(e[i],r);s.parentNode=t,n.push(s)}return n}function Ja(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const ZG=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Be="�";var D;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(D||(D={}));const Or={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function mv(e){return e>=55296&&e<=57343}function JG(e){return e>=56320&&e<=57343}function tY(e,t){return(e-55296)*1024+9216+t}function bv(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function yv(e){return e>=64976&&e<=65007||ZG.has(e)}var lt;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(lt||(lt={}));const eY=65536;class rY{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=eY,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){const{line:i,col:n,offset:s}=this,a=n+r,o=s+r;return{code:t,startLine:i,endLine:i,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const r=this.html.charCodeAt(this.pos+1);if(JG(r))return this.pos++,this._addGap(),tY(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,D.EOF;return this._err(lt.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;const i=this.html.charCodeAt(r);return i===D.CARRIAGE_RETURN?D.LINE_FEED:i}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,D.EOF;let t=this.html.charCodeAt(this.pos);return t===D.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,D.LINE_FEED):t===D.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,mv(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===D.LINE_FEED||t===D.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){bv(t)?this._err(lt.controlCharacterInInputStream):yv(t)&&this._err(lt.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var fe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(fe||(fe={}));function xv(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const iY=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),nY=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function sY(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=nY.get(e))!==null&&t!==void 0?t:e}var rr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(rr||(rr={}));const aY=32;var Dn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Dn||(Dn={}));function lg(e){return e>=rr.ZERO&&e<=rr.NINE}function oY(e){return e>=rr.UPPER_A&&e<=rr.UPPER_F||e>=rr.LOWER_A&&e<=rr.LOWER_F}function lY(e){return e>=rr.UPPER_A&&e<=rr.UPPER_Z||e>=rr.LOWER_A&&e<=rr.LOWER_Z||lg(e)}function cY(e){return e===rr.EQUALS||lY(e)}var Ze;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ze||(Ze={}));var nn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(nn||(nn={}));class uY{constructor(t,r,i){this.decodeTree=t,this.emitCodePoint=r,this.errors=i,this.state=Ze.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=nn.Strict}startEntity(t){this.decodeMode=t,this.state=Ze.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Ze.EntityStart:return t.charCodeAt(r)===rr.NUM?(this.state=Ze.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Ze.NamedEntity,this.stateNamedEntity(t,r));case Ze.NumericStart:return this.stateNumericStart(t,r);case Ze.NumericDecimal:return this.stateNumericDecimal(t,r);case Ze.NumericHex:return this.stateNumericHex(t,r);case Ze.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|aY)===rr.LOWER_X?(this.state=Ze.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Ze.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,i,n){if(r!==i){const s=i-r;this.result=this.result*Math.pow(n,s)+Number.parseInt(t.substr(r,s),n),this.consumed+=s}}stateNumericHex(t,r){const i=r;for(;r<t.length;){const n=t.charCodeAt(r);if(lg(n)||oY(n))r+=1;else return this.addToNumericResult(t,i,r,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,i,r,16),-1}stateNumericDecimal(t,r){const i=r;for(;r<t.length;){const n=t.charCodeAt(r);if(lg(n))r+=1;else return this.addToNumericResult(t,i,r,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,i,r,10),-1}emitNumericEntity(t,r){var i;if(this.consumed<=r)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===rr.SEMI)this.consumed+=1;else if(this.decodeMode===nn.Strict)return 0;return this.emitCodePoint(sY(this.result),this.consumed),this.errors&&(t!==rr.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:i}=this;let n=i[this.treeIndex],s=(n&Dn.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const a=t.charCodeAt(r);if(this.treeIndex=hY(i,n,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===nn.Attribute&&(s===0||cY(a))?0:this.emitNotTerminatedNamedEntity();if(n=i[this.treeIndex],s=(n&Dn.VALUE_LENGTH)>>14,s!==0){if(a===rr.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==nn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:i}=this,n=(i[r]&Dn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,i){const{decodeTree:n}=this;return this.emitCodePoint(r===1?n[t]&~Dn.VALUE_LENGTH:n[t+1],i),r===3&&this.emitCodePoint(n[t+2],i),i}end(){var t;switch(this.state){case Ze.NamedEntity:return this.result!==0&&(this.decodeMode!==nn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ze.NumericDecimal:return this.emitNumericEntity(0,2);case Ze.NumericHex:return this.emitNumericEntity(0,3);case Ze.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ze.EntityStart:return 0}}}function hY(e,t,r,i){const n=(t&Dn.BRANCH_LENGTH)>>7,s=t&Dn.JUMP_TABLE;if(n===0)return s!==0&&i===s?r:-1;if(s){const l=i-s;return l<0||l>=n?-1:e[r+l]-1}let a=r,o=a+n-1;for(;a<=o;){const l=a+o>>>1,c=e[l];if(c<i)a=l+1;else if(c>i)o=l-1;else return e[l+n]}return-1}var _t;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(_t||(_t={}));var ys;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(ys||(ys={}));var Yr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Yr||(Yr={}));var et;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(et||(et={}));var x;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(x||(x={}));const dY=new Map([[et.A,x.A],[et.ADDRESS,x.ADDRESS],[et.ANNOTATION_XML,x.ANNOTATION_XML],[et.APPLET,x.APPLET],[et.AREA,x.AREA],[et.ARTICLE,x.ARTICLE],[et.ASIDE,x.ASIDE],[et.B,x.B],[et.BASE,x.BASE],[et.BASEFONT,x.BASEFONT],[et.BGSOUND,x.BGSOUND],[et.BIG,x.BIG],[et.BLOCKQUOTE,x.BLOCKQUOTE],[et.BODY,x.BODY],[et.BR,x.BR],[et.BUTTON,x.BUTTON],[et.CAPTION,x.CAPTION],[et.CENTER,x.CENTER],[et.CODE,x.CODE],[et.COL,x.COL],[et.COLGROUP,x.COLGROUP],[et.DD,x.DD],[et.DESC,x.DESC],[et.DETAILS,x.DETAILS],[et.DIALOG,x.DIALOG],[et.DIR,x.DIR],[et.DIV,x.DIV],[et.DL,x.DL],[et.DT,x.DT],[et.EM,x.EM],[et.EMBED,x.EMBED],[et.FIELDSET,x.FIELDSET],[et.FIGCAPTION,x.FIGCAPTION],[et.FIGURE,x.FIGURE],[et.FONT,x.FONT],[et.FOOTER,x.FOOTER],[et.FOREIGN_OBJECT,x.FOREIGN_OBJECT],[et.FORM,x.FORM],[et.FRAME,x.FRAME],[et.FRAMESET,x.FRAMESET],[et.H1,x.H1],[et.H2,x.H2],[et.H3,x.H3],[et.H4,x.H4],[et.H5,x.H5],[et.H6,x.H6],[et.HEAD,x.HEAD],[et.HEADER,x.HEADER],[et.HGROUP,x.HGROUP],[et.HR,x.HR],[et.HTML,x.HTML],[et.I,x.I],[et.IMG,x.IMG],[et.IMAGE,x.IMAGE],[et.INPUT,x.INPUT],[et.IFRAME,x.IFRAME],[et.KEYGEN,x.KEYGEN],[et.LABEL,x.LABEL],[et.LI,x.LI],[et.LINK,x.LINK],[et.LISTING,x.LISTING],[et.MAIN,x.MAIN],[et.MALIGNMARK,x.MALIGNMARK],[et.MARQUEE,x.MARQUEE],[et.MATH,x.MATH],[et.MENU,x.MENU],[et.META,x.META],[et.MGLYPH,x.MGLYPH],[et.MI,x.MI],[et.MO,x.MO],[et.MN,x.MN],[et.MS,x.MS],[et.MTEXT,x.MTEXT],[et.NAV,x.NAV],[et.NOBR,x.NOBR],[et.NOFRAMES,x.NOFRAMES],[et.NOEMBED,x.NOEMBED],[et.NOSCRIPT,x.NOSCRIPT],[et.OBJECT,x.OBJECT],[et.OL,x.OL],[et.OPTGROUP,x.OPTGROUP],[et.OPTION,x.OPTION],[et.P,x.P],[et.PARAM,x.PARAM],[et.PLAINTEXT,x.PLAINTEXT],[et.PRE,x.PRE],[et.RB,x.RB],[et.RP,x.RP],[et.RT,x.RT],[et.RTC,x.RTC],[et.RUBY,x.RUBY],[et.S,x.S],[et.SCRIPT,x.SCRIPT],[et.SEARCH,x.SEARCH],[et.SECTION,x.SECTION],[et.SELECT,x.SELECT],[et.SOURCE,x.SOURCE],[et.SMALL,x.SMALL],[et.SPAN,x.SPAN],[et.STRIKE,x.STRIKE],[et.STRONG,x.STRONG],[et.STYLE,x.STYLE],[et.SUB,x.SUB],[et.SUMMARY,x.SUMMARY],[et.SUP,x.SUP],[et.TABLE,x.TABLE],[et.TBODY,x.TBODY],[et.TEMPLATE,x.TEMPLATE],[et.TEXTAREA,x.TEXTAREA],[et.TFOOT,x.TFOOT],[et.TD,x.TD],[et.TH,x.TH],[et.THEAD,x.THEAD],[et.TITLE,x.TITLE],[et.TR,x.TR],[et.TRACK,x.TRACK],[et.TT,x.TT],[et.U,x.U],[et.UL,x.UL],[et.SVG,x.SVG],[et.VAR,x.VAR],[et.WBR,x.WBR],[et.XMP,x.XMP]]);function to(e){var t;return(t=dY.get(e))!==null&&t!==void 0?t:x.UNKNOWN}const St=x,fY={[_t.HTML]:new Set([St.ADDRESS,St.APPLET,St.AREA,St.ARTICLE,St.ASIDE,St.BASE,St.BASEFONT,St.BGSOUND,St.BLOCKQUOTE,St.BODY,St.BR,St.BUTTON,St.CAPTION,St.CENTER,St.COL,St.COLGROUP,St.DD,St.DETAILS,St.DIR,St.DIV,St.DL,St.DT,St.EMBED,St.FIELDSET,St.FIGCAPTION,St.FIGURE,St.FOOTER,St.FORM,St.FRAME,St.FRAMESET,St.H1,St.H2,St.H3,St.H4,St.H5,St.H6,St.HEAD,St.HEADER,St.HGROUP,St.HR,St.HTML,St.IFRAME,St.IMG,St.INPUT,St.LI,St.LINK,St.LISTING,St.MAIN,St.MARQUEE,St.MENU,St.META,St.NAV,St.NOEMBED,St.NOFRAMES,St.NOSCRIPT,St.OBJECT,St.OL,St.P,St.PARAM,St.PLAINTEXT,St.PRE,St.SCRIPT,St.SECTION,St.SELECT,St.SOURCE,St.STYLE,St.SUMMARY,St.TABLE,St.TBODY,St.TD,St.TEMPLATE,St.TEXTAREA,St.TFOOT,St.TH,St.THEAD,St.TITLE,St.TR,St.TRACK,St.UL,St.WBR,St.XMP]),[_t.MATHML]:new Set([St.MI,St.MO,St.MN,St.MS,St.MTEXT,St.ANNOTATION_XML]),[_t.SVG]:new Set([St.TITLE,St.FOREIGN_OBJECT,St.DESC]),[_t.XLINK]:new Set,[_t.XML]:new Set,[_t.XMLNS]:new Set},cg=new Set([St.H1,St.H2,St.H3,St.H4,St.H5,St.H6]);et.STYLE,et.SCRIPT,et.XMP,et.IFRAME,et.NOEMBED,et.NOFRAMES,et.PLAINTEXT;var F;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(F||(F={}));const He={DATA:F.DATA,RCDATA:F.RCDATA,RAWTEXT:F.RAWTEXT,SCRIPT_DATA:F.SCRIPT_DATA,PLAINTEXT:F.PLAINTEXT,CDATA_SECTION:F.CDATA_SECTION};function pY(e){return e>=D.DIGIT_0&&e<=D.DIGIT_9}function qo(e){return e>=D.LATIN_CAPITAL_A&&e<=D.LATIN_CAPITAL_Z}function gY(e){return e>=D.LATIN_SMALL_A&&e<=D.LATIN_SMALL_Z}function An(e){return gY(e)||qo(e)}function kC(e){return An(e)||pY(e)}function wc(e){return e+32}function Cv(e){return e===D.SPACE||e===D.LINE_FEED||e===D.TABULATION||e===D.FORM_FEED}function TC(e){return Cv(e)||e===D.SOLIDUS||e===D.GREATER_THAN_SIGN}function mY(e){return e===D.NULL?lt.nullCharacterReference:e>1114111?lt.characterReferenceOutsideUnicodeRange:mv(e)?lt.surrogateCharacterReference:yv(e)?lt.noncharacterCharacterReference:bv(e)||e===D.CARRIAGE_RETURN?lt.controlCharacterReference:null}class bY{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=F.DATA,this.returnState=F.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new rY(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new uY(iY,(i,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(i)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(lt.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(lt.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const n=mY(i);n&&this._err(n,1)}}:void 0)}_err(t,r=0){var i,n;(n=(i=this.handler).onParseError)===null||n===void 0||n.call(i,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,r,i){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||i==null||i()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:fe.START_TAG,tagName:"",tagID:x.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:fe.END_TAG,tagName:"",tagID:x.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:fe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:fe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;const i=this.currentToken;if(xv(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const n=(t=(r=i.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(lt.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=to(t.tagName),t.type===fe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(lt.endTagWithAttributes),t.selfClosing&&this._err(lt.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case fe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:fe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=Cv(t)?fe.WHITESPACE_CHARACTER:t===D.NULL?fe.NULL_CHARACTER:fe.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(fe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=F.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?nn.Attribute:nn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===F.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===F.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===F.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case F.DATA:{this._stateData(t);break}case F.RCDATA:{this._stateRcdata(t);break}case F.RAWTEXT:{this._stateRawtext(t);break}case F.SCRIPT_DATA:{this._stateScriptData(t);break}case F.PLAINTEXT:{this._statePlaintext(t);break}case F.TAG_OPEN:{this._stateTagOpen(t);break}case F.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case F.TAG_NAME:{this._stateTagName(t);break}case F.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case F.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case F.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case F.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case F.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case F.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case F.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case F.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case F.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case F.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case F.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case F.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case F.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case F.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case F.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case F.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case F.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case F.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case F.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case F.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case F.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case F.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case F.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case F.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case F.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case F.BOGUS_COMMENT:{this._stateBogusComment(t);break}case F.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case F.COMMENT_START:{this._stateCommentStart(t);break}case F.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case F.COMMENT:{this._stateComment(t);break}case F.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case F.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case F.COMMENT_END:{this._stateCommentEnd(t);break}case F.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case F.DOCTYPE:{this._stateDoctype(t);break}case F.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case F.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case F.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case F.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case F.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case F.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case F.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case F.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case F.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case F.CDATA_SECTION:{this._stateCdataSection(t);break}case F.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case F.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case F.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case F.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=F.TAG_OPEN;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this._emitCodePoint(t);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case D.AMPERSAND:{this._startCharacterReference();break}case D.LESS_THAN_SIGN:{this.state=F.RCDATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this._emitChars(Be);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case D.LESS_THAN_SIGN:{this.state=F.RAWTEXT_LESS_THAN_SIGN;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this._emitChars(Be);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case D.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_LESS_THAN_SIGN;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this._emitChars(Be);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case D.NULL:{this._err(lt.unexpectedNullCharacter),this._emitChars(Be);break}case D.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(An(t))this._createStartTagToken(),this.state=F.TAG_NAME,this._stateTagName(t);else switch(t){case D.EXCLAMATION_MARK:{this.state=F.MARKUP_DECLARATION_OPEN;break}case D.SOLIDUS:{this.state=F.END_TAG_OPEN;break}case D.QUESTION_MARK:{this._err(lt.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t);break}case D.EOF:{this._err(lt.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(lt.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=F.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(An(t))this._createEndTagToken(),this.state=F.TAG_NAME,this._stateTagName(t);else switch(t){case D.GREATER_THAN_SIGN:{this._err(lt.missingEndTagName),this.state=F.DATA;break}case D.EOF:{this._err(lt.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(lt.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=F.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this.state=F.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(lt.unexpectedNullCharacter),r.tagName+=Be;break}case D.EOF:{this._err(lt.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(qo(t)?wc(t):t)}}_stateRcdataLessThanSign(t){t===D.SOLIDUS?this.state=F.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=F.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){An(t)?(this.state=F.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=F.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=F.BEFORE_ATTRIBUTE_NAME,!1;case D.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=F.SELF_CLOSING_START_TAG,!1;case D.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=F.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===D.SOLIDUS?this.state=F.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){An(t)?(this.state=F.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case D.SOLIDUS:{this.state=F.SCRIPT_DATA_END_TAG_OPEN;break}case D.EXCLAMATION_MARK:{this.state=F.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=F.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){An(t)?(this.state=F.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===D.HYPHEN_MINUS?(this.state=F.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===D.HYPHEN_MINUS?(this.state=F.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this._emitChars(Be);break}case D.EOF:{this._err(lt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_ESCAPED,this._emitChars(Be);break}case D.EOF:{this._err(lt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case D.GREATER_THAN_SIGN:{this.state=F.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_ESCAPED,this._emitChars(Be);break}case D.EOF:{this._err(lt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===D.SOLIDUS?this.state=F.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:An(t)?(this._emitChars("<"),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){An(t)?(this.state=F.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Or.SCRIPT,!1)&&TC(this.preprocessor.peek(Or.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<Or.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case D.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this._emitChars(Be);break}case D.EOF:{this._err(lt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case D.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Be);break}case D.EOF:{this._err(lt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case D.HYPHEN_MINUS:{this._emitChars("-");break}case D.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case D.GREATER_THAN_SIGN:{this.state=F.SCRIPT_DATA,this._emitChars(">");break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Be);break}case D.EOF:{this._err(lt.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===D.SOLIDUS?(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Or.SCRIPT,!1)&&TC(this.preprocessor.peek(Or.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<Or.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=F.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this.state=F.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._err(lt.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=F.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=F.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:case D.SOLIDUS:case D.GREATER_THAN_SIGN:case D.EOF:{this._leaveAttrName(),this.state=F.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case D.EQUALS_SIGN:{this._leaveAttrName(),this.state=F.BEFORE_ATTRIBUTE_VALUE;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:{this._err(lt.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this.currentAttr.name+=Be;break}default:this.currentAttr.name+=String.fromCodePoint(qo(t)?wc(t):t)}}_stateAfterAttributeName(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.SOLIDUS:{this.state=F.SELF_CLOSING_START_TAG;break}case D.EQUALS_SIGN:{this.state=F.BEFORE_ATTRIBUTE_VALUE;break}case D.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(lt.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=F.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{this.state=F.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this.state=F.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(lt.missingAttributeValue),this.state=F.DATA,this.emitCurrentTagToken();break}default:this.state=F.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case D.QUOTATION_MARK:{this.state=F.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this.currentAttr.value+=Be;break}case D.EOF:{this._err(lt.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case D.APOSTROPHE:{this.state=F.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this.currentAttr.value+=Be;break}case D.EOF:{this._err(lt.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=F.BEFORE_ATTRIBUTE_NAME;break}case D.AMPERSAND:{this._startCharacterReference();break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=F.DATA,this.emitCurrentTagToken();break}case D.NULL:{this._err(lt.unexpectedNullCharacter),this.currentAttr.value+=Be;break}case D.QUOTATION_MARK:case D.APOSTROPHE:case D.LESS_THAN_SIGN:case D.EQUALS_SIGN:case D.GRAVE_ACCENT:{this._err(lt.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case D.EOF:{this._err(lt.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this._leaveAttrValue(),this.state=F.BEFORE_ATTRIBUTE_NAME;break}case D.SOLIDUS:{this._leaveAttrValue(),this.state=F.SELF_CLOSING_START_TAG;break}case D.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=F.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(lt.eofInTag),this._emitEOFToken();break}default:this._err(lt.missingWhitespaceBetweenAttributes),this.state=F.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case D.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=F.DATA,this.emitCurrentTagToken();break}case D.EOF:{this._err(lt.eofInTag),this._emitEOFToken();break}default:this._err(lt.unexpectedSolidusInTag),this.state=F.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentComment(r);break}case D.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case D.NULL:{this._err(lt.unexpectedNullCharacter),r.data+=Be;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Or.DASH_DASH,!0)?(this._createCommentToken(Or.DASH_DASH.length+1),this.state=F.COMMENT_START):this._consumeSequenceIfMatch(Or.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Or.DOCTYPE.length+1),this.state=F.DOCTYPE):this._consumeSequenceIfMatch(Or.CDATA_START,!0)?this.inForeignNode?this.state=F.CDATA_SECTION:(this._err(lt.cdataInHtmlContent),this._createCommentToken(Or.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=F.BOGUS_COMMENT):this._ensureHibernation()||(this._err(lt.incorrectlyOpenedComment),this._createCommentToken(2),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case D.HYPHEN_MINUS:{this.state=F.COMMENT_START_DASH;break}case D.GREATER_THAN_SIGN:{this._err(lt.abruptClosingOfEmptyComment),this.state=F.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=F.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const r=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=F.COMMENT_END;break}case D.GREATER_THAN_SIGN:{this._err(lt.abruptClosingOfEmptyComment),this.state=F.DATA,this.emitCurrentComment(r);break}case D.EOF:{this._err(lt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=F.COMMENT,this._stateComment(t)}}_stateComment(t){const r=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=F.COMMENT_END_DASH;break}case D.LESS_THAN_SIGN:{r.data+="<",this.state=F.COMMENT_LESS_THAN_SIGN;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),r.data+=Be;break}case D.EOF:{this._err(lt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case D.EXCLAMATION_MARK:{r.data+="!",this.state=F.COMMENT_LESS_THAN_SIGN_BANG;break}case D.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=F.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===D.HYPHEN_MINUS?this.state=F.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=F.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===D.HYPHEN_MINUS?this.state=F.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=F.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==D.GREATER_THAN_SIGN&&t!==D.EOF&&this._err(lt.nestedComment),this.state=F.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case D.HYPHEN_MINUS:{this.state=F.COMMENT_END;break}case D.EOF:{this._err(lt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=F.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const r=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentComment(r);break}case D.EXCLAMATION_MARK:{this.state=F.COMMENT_END_BANG;break}case D.HYPHEN_MINUS:{r.data+="-";break}case D.EOF:{this._err(lt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=F.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const r=this.currentToken;switch(t){case D.HYPHEN_MINUS:{r.data+="--!",this.state=F.COMMENT_END_DASH;break}case D.GREATER_THAN_SIGN:{this._err(lt.incorrectlyClosedComment),this.state=F.DATA,this.emitCurrentComment(r);break}case D.EOF:{this._err(lt.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=F.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=F.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case D.EOF:{this._err(lt.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(lt.missingWhitespaceBeforeDoctypeName),this.state=F.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(qo(t))this._createDoctypeToken(String.fromCharCode(wc(t))),this.state=F.DOCTYPE_NAME;else switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.NULL:{this._err(lt.unexpectedNullCharacter),this._createDoctypeToken(Be),this.state=F.DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this._err(lt.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=F.DATA;break}case D.EOF:{this._err(lt.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=F.DOCTYPE_NAME}}_stateDoctypeName(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=F.AFTER_DOCTYPE_NAME;break}case D.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(r);break}case D.NULL:{this._err(lt.unexpectedNullCharacter),r.name+=Be;break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(qo(t)?wc(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Or.PUBLIC,!1)?this.state=F.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Or.SYSTEM,!1)?this.state=F.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(lt.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(lt.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(lt.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(lt.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(lt.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{r.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{r.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(lt.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(lt.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),r.publicId+=Be;break}case D.GREATER_THAN_SIGN:{this._err(lt.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=F.DATA;break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),r.publicId+=Be;break}case D.GREATER_THAN_SIGN:{this._err(lt.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=F.DATA;break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=F.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case D.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(r);break}case D.QUOTATION_MARK:{this._err(lt.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(lt.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(lt.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=F.DATA;break}case D.QUOTATION_MARK:{r.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{r.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(lt.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.QUOTATION_MARK:{this._err(lt.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{this._err(lt.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(lt.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(lt.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.QUOTATION_MARK:{r.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case D.APOSTROPHE:{r.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case D.GREATER_THAN_SIGN:{this._err(lt.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(r);break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(lt.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case D.QUOTATION_MARK:{this.state=F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),r.systemId+=Be;break}case D.GREATER_THAN_SIGN:{this._err(lt.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=F.DATA;break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case D.APOSTROPHE:{this.state=F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case D.NULL:{this._err(lt.unexpectedNullCharacter),r.systemId+=Be;break}case D.GREATER_THAN_SIGN:{this._err(lt.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=F.DATA;break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case D.SPACE:case D.LINE_FEED:case D.TABULATION:case D.FORM_FEED:break;case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=F.DATA;break}case D.EOF:{this._err(lt.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(lt.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case D.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=F.DATA;break}case D.NULL:{this._err(lt.unexpectedNullCharacter);break}case D.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case D.RIGHT_SQUARE_BRACKET:{this.state=F.CDATA_SECTION_BRACKET;break}case D.EOF:{this._err(lt.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===D.RIGHT_SQUARE_BRACKET?this.state=F.CDATA_SECTION_END:(this._emitChars("]"),this.state=F.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case D.GREATER_THAN_SIGN:{this.state=F.DATA;break}case D.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=F.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(D.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&kC(this.preprocessor.peek(1))?F.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){kC(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===D.SEMICOLON&&this._err(lt.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const _v=new Set([x.DD,x.DT,x.LI,x.OPTGROUP,x.OPTION,x.P,x.RB,x.RP,x.RT,x.RTC]),EC=new Set([..._v,x.CAPTION,x.COLGROUP,x.TBODY,x.TD,x.TFOOT,x.TH,x.THEAD,x.TR]),Wu=new Set([x.APPLET,x.CAPTION,x.HTML,x.MARQUEE,x.OBJECT,x.TABLE,x.TD,x.TEMPLATE,x.TH]),yY=new Set([...Wu,x.OL,x.UL]),xY=new Set([...Wu,x.BUTTON]),wC=new Set([x.ANNOTATION_XML,x.MI,x.MN,x.MO,x.MS,x.MTEXT]),SC=new Set([x.DESC,x.FOREIGN_OBJECT,x.TITLE]),CY=new Set([x.TR,x.TEMPLATE,x.HTML]),_Y=new Set([x.TBODY,x.TFOOT,x.THEAD,x.TEMPLATE,x.HTML]),kY=new Set([x.TABLE,x.TEMPLATE,x.HTML]),TY=new Set([x.TD,x.TH]);class EY{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,i){this.treeAdapter=r,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=x.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===x.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===_t.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const i=this._indexOf(t);this.items[i]=r,i===this.stackTop&&(this.current=r)}insertAfter(t,r,i){const n=this._indexOf(t)+1;this.items.splice(n,0,r),this.tagIDs.splice(n,0,i),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==_t.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){const r=this._indexOf(t);this.shortenToLength(Math.max(r,0))}popUntilPopped(t,r){const i=this._indexOfTagNames(t,r);this.shortenToLength(Math.max(i,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(cg,_t.HTML)}popUntilTableCellPopped(){this.popUntilPopped(TY,_t.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===r)return i;return-1}clearBackTo(t,r){const i=this._indexOfTagNames(t,r);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(kY,_t.HTML)}clearBackToTableBodyContext(){this.clearBackTo(_Y,_t.HTML)}clearBackToTableRowContext(){this.clearBackTo(CY,_t.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===x.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===x.HTML}hasInDynamicScope(t,r){for(let i=this.stackTop;i>=0;i--){const n=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case _t.HTML:{if(n===t)return!0;if(r.has(n))return!1;break}case _t.SVG:{if(SC.has(n))return!1;break}case _t.MATHML:{if(wC.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Wu)}hasInListItemScope(t){return this.hasInDynamicScope(t,yY)}hasInButtonScope(t){return this.hasInDynamicScope(t,xY)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case _t.HTML:{if(cg.has(r))return!0;if(Wu.has(r))return!1;break}case _t.SVG:{if(SC.has(r))return!1;break}case _t.MATHML:{if(wC.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===_t.HTML)switch(this.tagIDs[r]){case t:return!0;case x.TABLE:case x.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===_t.HTML)switch(this.tagIDs[t]){case x.TBODY:case x.THEAD:case x.TFOOT:return!0;case x.TABLE:case x.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===_t.HTML)switch(this.tagIDs[r]){case t:return!0;case x.OPTION:case x.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&_v.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&EC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&EC.has(this.currentTagId);)this.pop()}}const Rf=3;var Ri;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ri||(Ri={}));const AC={type:Ri.Marker};class wY{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const i=[],n=r.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===Ri.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===s&&this.treeAdapter.getNamespaceURI(c)===a){const u=this.treeAdapter.getAttrList(c);u.length===n&&i.push({idx:o,attrs:u})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<Rf)return;const r=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,r);if(i.length<Rf)return;const n=new Map(r.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<i.length;a++){const o=i[a];o.attrs.every(l=>n.get(l.name)===l.value)&&(s+=1,s>=Rf&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(AC)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ri.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:Ri.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(AC);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(i=>i.type===Ri.Marker||this.treeAdapter.getTagName(i.element)===t);return r&&r.type===Ri.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===Ri.Element&&r.element===t)}}const vn={createDocument(){return{nodeName:"#document",mode:Yr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const i=e.childNodes.indexOf(r);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,i){const n=e.childNodes.find(s=>s.nodeName==="#documentType");if(n)n.name=t,n.publicId=r,n.systemId=i;else{const s={nodeName:"#documentType",name:t,publicId:r,systemId:i,parentNode:null};vn.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(vn.isTextNode(r)){r.value+=t;return}}vn.appendChild(e,vn.createTextNode(t))},insertTextBefore(e,t,r){const i=e.childNodes[e.childNodes.indexOf(r)-1];i&&vn.isTextNode(i)?i.value+=t:vn.insertBefore(e,vn.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)r.has(t[i].name)||e.attrs.push(t[i])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},kv="html",SY="about:legacy-compat",AY="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Tv=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],vY=[...Tv,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],LY=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Ev=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],IY=[...Ev,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function vC(e,t){return t.some(r=>e.startsWith(r))}function BY(e){return e.name===kv&&e.publicId===null&&(e.systemId===null||e.systemId===SY)}function RY(e){if(e.name!==kv)return Yr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===AY)return Yr.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),LY.has(r))return Yr.QUIRKS;let i=t===null?vY:Tv;if(vC(r,i))return Yr.QUIRKS;if(i=t===null?Ev:IY,vC(r,i))return Yr.LIMITED_QUIRKS}return Yr.NO_QUIRKS}const LC={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},OY="definitionurl",NY="definitionURL",DY=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),PY=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:_t.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:_t.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:_t.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:_t.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:_t.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:_t.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:_t.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:_t.XML}],["xml:space",{prefix:"xml",name:"space",namespace:_t.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:_t.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:_t.XMLNS}]]),MY=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),FY=new Set([x.B,x.BIG,x.BLOCKQUOTE,x.BODY,x.BR,x.CENTER,x.CODE,x.DD,x.DIV,x.DL,x.DT,x.EM,x.EMBED,x.H1,x.H2,x.H3,x.H4,x.H5,x.H6,x.HEAD,x.HR,x.I,x.IMG,x.LI,x.LISTING,x.MENU,x.META,x.NOBR,x.OL,x.P,x.PRE,x.RUBY,x.S,x.SMALL,x.SPAN,x.STRONG,x.STRIKE,x.SUB,x.SUP,x.TABLE,x.TT,x.U,x.UL,x.VAR]);function $Y(e){const t=e.tagID;return t===x.FONT&&e.attrs.some(({name:i})=>i===ys.COLOR||i===ys.SIZE||i===ys.FACE)||FY.has(t)}function wv(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===OY){e.attrs[t].name=NY;break}}function Sv(e){for(let t=0;t<e.attrs.length;t++){const r=DY.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function L0(e){for(let t=0;t<e.attrs.length;t++){const r=PY.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function HY(e){const t=MY.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=to(e.tagName))}function zY(e,t){return t===_t.MATHML&&(e===x.MI||e===x.MO||e===x.MN||e===x.MS||e===x.MTEXT)}function UY(e,t,r){if(t===_t.MATHML&&e===x.ANNOTATION_XML){for(let i=0;i<r.length;i++)if(r[i].name===ys.ENCODING){const n=r[i].value.toLowerCase();return n===LC.TEXT_HTML||n===LC.APPLICATION_XML}}return t===_t.SVG&&(e===x.FOREIGN_OBJECT||e===x.DESC||e===x.TITLE)}function qY(e,t,r,i){return(!i||i===_t.HTML)&&UY(e,t,r)||(!i||i===_t.MATHML)&&zY(e,t)}const WY="hidden",jY=8,VY=3;var U;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(U||(U={}));const GY={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Av=new Set([x.TABLE,x.TBODY,x.TFOOT,x.THEAD,x.TR]),IC={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:vn,onParseError:null};class BC{constructor(t,r,i=null,n=null){this.fragmentContext=i,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...IC,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new bY(this.options,this),this.activeFormattingElements=new wY(this.treeAdapter),this.fragmentContextID=i?to(this.treeAdapter.getTagName(i)):x.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new EY(this.document,this.treeAdapter,this)}static parse(t,r){const i=new this(r);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,r){const i={...IC,...r};t??(t=i.treeAdapter.createElement(et.TEMPLATE,_t.HTML,[]));const n=i.treeAdapter.createElement("documentmock",_t.HTML,[]),s=new this(i,n,t);return s.fragmentContextID===x.TEMPLATE&&s.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,i){var n;if(!this.onParseError)return;const s=(n=t.location)!==null&&n!==void 0?n:GY,a={code:r,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:i?s.startLine:s.endLine,endCol:i?s.startCol:s.endCol,endOffset:i?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,r,i){var n,s;(s=(n=this.treeAdapter).onItemPush)===null||s===void 0||s.call(n,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var i,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(i=this.treeAdapter).onItemPop)===null||n===void 0||n.call(i,t,this.openElements.current),r){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,r){const i=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===_t.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,_t.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=He.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===et.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==_t.HTML))switch(this.fragmentContextID){case x.TITLE:case x.TEXTAREA:{this.tokenizer.state=He.RCDATA;break}case x.STYLE:case x.XMP:case x.IFRAME:case x.NOEMBED:case x.NOFRAMES:case x.NOSCRIPT:{this.tokenizer.state=He.RAWTEXT;break}case x.SCRIPT:{this.tokenizer.state=He.SCRIPT_DATA;break}case x.PLAINTEXT:{this.tokenizer.state=He.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",i=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,i,n),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const i=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i??this.document,t)}}_appendElement(t,r){const i=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,r){const i=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,r){const i=this.treeAdapter.createElement(t,_t.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,_t.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,i),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(et.HTML,_t.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,x.HTML)}_appendCommentNode(t,r){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let r,i;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(r,t.chars,i):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const n=this.treeAdapter.getChildNodes(r),s=i?n.lastIndexOf(i):n.length,a=n[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:c,endOffset:u}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:c,endOffset:u})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,r){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(r,i)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const i=r.location,n=this.treeAdapter.getTagName(t),s=r.type===fe.END_TAG&&n===r.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,i;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,i=this.fragmentContextID):{current:r,currentTagId:i}=this.openElements,t.tagID===x.SVG&&this.treeAdapter.getTagName(r)===et.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===_t.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===x.MGLYPH||t.tagID===x.MALIGNMARK)&&i!==void 0&&!this._isIntegrationPoint(i,r,_t.HTML)}_processToken(t){switch(t.type){case fe.CHARACTER:{this.onCharacter(t);break}case fe.NULL_CHARACTER:{this.onNullCharacter(t);break}case fe.COMMENT:{this.onComment(t);break}case fe.DOCTYPE:{this.onDoctype(t);break}case fe.START_TAG:{this._processStartTag(t);break}case fe.END_TAG:{this.onEndTag(t);break}case fe.EOF:{this.onEof(t);break}case fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,i){const n=this.treeAdapter.getNamespaceURI(r),s=this.treeAdapter.getAttrList(r);return qY(t,n,s,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(n=>n.type===Ri.Marker||this.openElements.contains(n.element)),i=r===-1?t-1:r-1;for(let n=i;n>=0;n--){const s=this.activeFormattingElements.entries[n];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(x.P),this.openElements.popUntilTagNamePopped(x.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case x.TR:{this.insertionMode=U.IN_ROW;return}case x.TBODY:case x.THEAD:case x.TFOOT:{this.insertionMode=U.IN_TABLE_BODY;return}case x.CAPTION:{this.insertionMode=U.IN_CAPTION;return}case x.COLGROUP:{this.insertionMode=U.IN_COLUMN_GROUP;return}case x.TABLE:{this.insertionMode=U.IN_TABLE;return}case x.BODY:{this.insertionMode=U.IN_BODY;return}case x.FRAMESET:{this.insertionMode=U.IN_FRAMESET;return}case x.SELECT:{this._resetInsertionModeForSelect(t);return}case x.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case x.HTML:{this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return}case x.TD:case x.TH:{if(t>0){this.insertionMode=U.IN_CELL;return}break}case x.HEAD:{if(t>0){this.insertionMode=U.IN_HEAD;return}break}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const i=this.openElements.tagIDs[r];if(i===x.TEMPLATE)break;if(i===x.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(t){return Av.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case x.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===_t.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case x.TABLE:{const i=this.treeAdapter.getParentNode(r);return i?{parent:i,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const i=this.treeAdapter.getNamespaceURI(t);return fY[i].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){TK(this,t);return}switch(this.insertionMode){case U.INITIAL:{To(this,t);break}case U.BEFORE_HTML:{rl(this,t);break}case U.BEFORE_HEAD:{il(this,t);break}case U.IN_HEAD:{nl(this,t);break}case U.IN_HEAD_NO_SCRIPT:{sl(this,t);break}case U.AFTER_HEAD:{al(this,t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:{Lv(this,t);break}case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{Of(this,t);break}case U.IN_TABLE_TEXT:{Dv(this,t);break}case U.IN_COLUMN_GROUP:{ju(this,t);break}case U.AFTER_BODY:{Vu(this,t);break}case U.AFTER_AFTER_BODY:{tu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){kK(this,t);return}switch(this.insertionMode){case U.INITIAL:{To(this,t);break}case U.BEFORE_HTML:{rl(this,t);break}case U.BEFORE_HEAD:{il(this,t);break}case U.IN_HEAD:{nl(this,t);break}case U.IN_HEAD_NO_SCRIPT:{sl(this,t);break}case U.AFTER_HEAD:{al(this,t);break}case U.TEXT:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{Of(this,t);break}case U.IN_COLUMN_GROUP:{ju(this,t);break}case U.AFTER_BODY:{Vu(this,t);break}case U.AFTER_AFTER_BODY:{tu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ug(this,t);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{ug(this,t);break}case U.IN_TABLE_TEXT:{Eo(this,t);break}case U.AFTER_BODY:{tX(this,t);break}case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{eX(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:{rX(this,t);break}case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:{this._err(t,lt.misplacedDoctype);break}case U.IN_TABLE_TEXT:{Eo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,lt.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?EK(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{To(this,t);break}case U.BEFORE_HTML:{iX(this,t);break}case U.BEFORE_HEAD:{sX(this,t);break}case U.IN_HEAD:{xi(this,t);break}case U.IN_HEAD_NO_SCRIPT:{lX(this,t);break}case U.AFTER_HEAD:{uX(this,t);break}case U.IN_BODY:{Cr(this,t);break}case U.IN_TABLE:{za(this,t);break}case U.IN_TABLE_TEXT:{Eo(this,t);break}case U.IN_CAPTION:{aK(this,t);break}case U.IN_COLUMN_GROUP:{R0(this,t);break}case U.IN_TABLE_BODY:{Uh(this,t);break}case U.IN_ROW:{qh(this,t);break}case U.IN_CELL:{cK(this,t);break}case U.IN_SELECT:{Fv(this,t);break}case U.IN_SELECT_IN_TABLE:{hK(this,t);break}case U.IN_TEMPLATE:{fK(this,t);break}case U.AFTER_BODY:{gK(this,t);break}case U.IN_FRAMESET:{mK(this,t);break}case U.AFTER_FRAMESET:{yK(this,t);break}case U.AFTER_AFTER_BODY:{CK(this,t);break}case U.AFTER_AFTER_FRAMESET:{_K(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?wK(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{To(this,t);break}case U.BEFORE_HTML:{nX(this,t);break}case U.BEFORE_HEAD:{aX(this,t);break}case U.IN_HEAD:{oX(this,t);break}case U.IN_HEAD_NO_SCRIPT:{cX(this,t);break}case U.AFTER_HEAD:{hX(this,t);break}case U.IN_BODY:{zh(this,t);break}case U.TEXT:{KX(this,t);break}case U.IN_TABLE:{Al(this,t);break}case U.IN_TABLE_TEXT:{Eo(this,t);break}case U.IN_CAPTION:{oK(this,t);break}case U.IN_COLUMN_GROUP:{lK(this,t);break}case U.IN_TABLE_BODY:{hg(this,t);break}case U.IN_ROW:{Mv(this,t);break}case U.IN_CELL:{uK(this,t);break}case U.IN_SELECT:{$v(this,t);break}case U.IN_SELECT_IN_TABLE:{dK(this,t);break}case U.IN_TEMPLATE:{pK(this,t);break}case U.AFTER_BODY:{zv(this,t);break}case U.IN_FRAMESET:{bK(this,t);break}case U.AFTER_FRAMESET:{xK(this,t);break}case U.AFTER_AFTER_BODY:{tu(this,t);break}}}onEof(t){switch(this.insertionMode){case U.INITIAL:{To(this,t);break}case U.BEFORE_HTML:{rl(this,t);break}case U.BEFORE_HEAD:{il(this,t);break}case U.IN_HEAD:{nl(this,t);break}case U.IN_HEAD_NO_SCRIPT:{sl(this,t);break}case U.AFTER_HEAD:{al(this,t);break}case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{Ov(this,t);break}case U.TEXT:{QX(this,t);break}case U.IN_TABLE_TEXT:{Eo(this,t);break}case U.IN_TEMPLATE:{Hv(this,t);break}case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{B0(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===D.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{this._insertCharacters(t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{vv(this,t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{Of(this,t);break}case U.IN_TABLE_TEXT:{Nv(this,t);break}}}}function YY(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):Rv(e,t),r}function XY(e,t){let r=null,i=e.openElements.stackTop;for(;i>=0;i--){const n=e.openElements.items[i];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[i])&&(r=n)}return r||(e.openElements.shortenToLength(Math.max(i,0)),e.activeFormattingElements.removeEntry(t)),r}function KY(e,t,r){let i=t,n=e.openElements.getCommonAncestor(t);for(let s=0,a=n;a!==r;s++,a=n){n=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),l=o&&s>=VY;!o||l?(l&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=QY(e,o),i===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(a,i),i=a)}return i}function QY(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function ZY(e,t,r){const i=e.treeAdapter.getTagName(t),n=to(i);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(r);else{const s=e.treeAdapter.getNamespaceURI(t);n===x.TEMPLATE&&s===_t.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function JY(e,t,r){const i=e.treeAdapter.getNamespaceURI(r.element),{token:n}=r,s=e.treeAdapter.createElement(n.tagName,i,n.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,n),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,s,n.tagID)}function I0(e,t){for(let r=0;r<jY;r++){const i=YY(e,t);if(!i)break;const n=XY(e,i);if(!n)break;e.activeFormattingElements.bookmark=i;const s=KY(e,n,i.element),a=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(s),a&&ZY(e,a,s),JY(e,n,i)}}function ug(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function tX(e,t){e._appendCommentNode(t,e.openElements.items[0])}function eX(e,t){e._appendCommentNode(t,e.document)}function B0(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=r;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(i);if(n&&!n.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function rX(e,t){e._setDocumentType(t);const r=t.forceQuirks?Yr.QUIRKS:RY(t);BY(t)||e._err(t,lt.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=U.BEFORE_HTML}function To(e,t){e._err(t,lt.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Yr.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function iX(e,t){t.tagID===x.HTML?(e._insertElement(t,_t.HTML),e.insertionMode=U.BEFORE_HEAD):rl(e,t)}function nX(e,t){const r=t.tagID;(r===x.HTML||r===x.HEAD||r===x.BODY||r===x.BR)&&rl(e,t)}function rl(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function sX(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.HEAD:{e._insertElement(t,_t.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break}default:il(e,t)}}function aX(e,t){const r=t.tagID;r===x.HEAD||r===x.BODY||r===x.HTML||r===x.BR?il(e,t):e._err(t,lt.endTagWithoutMatchingOpenElement)}function il(e,t){e._insertFakeElement(et.HEAD,x.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function xi(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:{e._appendElement(t,_t.HTML),t.ackSelfClosing=!0;break}case x.TITLE:{e._switchToTextParsing(t,He.RCDATA);break}case x.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,He.RAWTEXT):(e._insertElement(t,_t.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break}case x.NOFRAMES:case x.STYLE:{e._switchToTextParsing(t,He.RAWTEXT);break}case x.SCRIPT:{e._switchToTextParsing(t,He.SCRIPT_DATA);break}case x.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break}case x.HEAD:{e._err(t,lt.misplacedStartTagForHeadElement);break}default:nl(e,t)}}function oX(e,t){switch(t.tagID){case x.HEAD:{e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break}case x.BODY:case x.BR:case x.HTML:{nl(e,t);break}case x.TEMPLATE:{Ms(e,t);break}default:e._err(t,lt.endTagWithoutMatchingOpenElement)}}function Ms(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==x.TEMPLATE&&e._err(t,lt.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(x.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,lt.endTagWithoutMatchingOpenElement)}function nl(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function lX(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.BASEFONT:case x.BGSOUND:case x.HEAD:case x.LINK:case x.META:case x.NOFRAMES:case x.STYLE:{xi(e,t);break}case x.NOSCRIPT:{e._err(t,lt.nestedNoscriptInHead);break}default:sl(e,t)}}function cX(e,t){switch(t.tagID){case x.NOSCRIPT:{e.openElements.pop(),e.insertionMode=U.IN_HEAD;break}case x.BR:{sl(e,t);break}default:e._err(t,lt.endTagWithoutMatchingOpenElement)}}function sl(e,t){const r=t.type===fe.EOF?lt.openElementsLeftAfterEof:lt.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function uX(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.BODY:{e._insertElement(t,_t.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break}case x.FRAMESET:{e._insertElement(t,_t.HTML),e.insertionMode=U.IN_FRAMESET;break}case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:case x.NOFRAMES:case x.SCRIPT:case x.STYLE:case x.TEMPLATE:case x.TITLE:{e._err(t,lt.abandonedHeadElementChild),e.openElements.push(e.headElement,x.HEAD),xi(e,t),e.openElements.remove(e.headElement);break}case x.HEAD:{e._err(t,lt.misplacedStartTagForHeadElement);break}default:al(e,t)}}function hX(e,t){switch(t.tagID){case x.BODY:case x.HTML:case x.BR:{al(e,t);break}case x.TEMPLATE:{Ms(e,t);break}default:e._err(t,lt.endTagWithoutMatchingOpenElement)}}function al(e,t){e._insertFakeElement(et.BODY,x.BODY),e.insertionMode=U.IN_BODY,Hh(e,t)}function Hh(e,t){switch(t.type){case fe.CHARACTER:{Lv(e,t);break}case fe.WHITESPACE_CHARACTER:{vv(e,t);break}case fe.COMMENT:{ug(e,t);break}case fe.START_TAG:{Cr(e,t);break}case fe.END_TAG:{zh(e,t);break}case fe.EOF:{Ov(e,t);break}}}function vv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Lv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function dX(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function fX(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function pX(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,_t.HTML),e.insertionMode=U.IN_FRAMESET)}function gX(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,_t.HTML)}function mX(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&cg.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,_t.HTML)}function bX(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,_t.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function yX(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,_t.HTML),r||(e.formElement=e.openElements.current))}function xX(e,t){e.framesetOk=!1;const r=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const n=e.openElements.tagIDs[i];if(r===x.LI&&n===x.LI||(r===x.DD||r===x.DT)&&(n===x.DD||n===x.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==x.ADDRESS&&n!==x.DIV&&n!==x.P&&e._isSpecialElement(e.openElements.items[i],n))break}e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,_t.HTML)}function CX(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,_t.HTML),e.tokenizer.state=He.PLAINTEXT}function _X(e,t){e.openElements.hasInScope(x.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,_t.HTML),e.framesetOk=!1}function kX(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(et.A);r&&(I0(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,_t.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function TX(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_t.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function EX(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(x.NOBR)&&(I0(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,_t.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function wX(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_t.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function SX(e,t){e.treeAdapter.getDocumentMode(e.document)!==Yr.QUIRKS&&e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,_t.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function Iv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,_t.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Bv(e){const t=xv(e,ys.TYPE);return t!=null&&t.toLowerCase()===WY}function AX(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,_t.HTML),Bv(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function vX(e,t){e._appendElement(t,_t.HTML),t.ackSelfClosing=!0}function LX(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._appendElement(t,_t.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function IX(e,t){t.tagName=et.IMG,t.tagID=x.IMG,Iv(e,t)}function BX(e,t){e._insertElement(t,_t.HTML),e.skipNextNewLine=!0,e.tokenizer.state=He.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function RX(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,He.RAWTEXT)}function OX(e,t){e.framesetOk=!1,e._switchToTextParsing(t,He.RAWTEXT)}function RC(e,t){e._switchToTextParsing(t,He.RAWTEXT)}function NX(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_t.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function DX(e,t){e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,_t.HTML)}function PX(e,t){e.openElements.hasInScope(x.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,_t.HTML)}function MX(e,t){e.openElements.hasInScope(x.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(x.RTC),e._insertElement(t,_t.HTML)}function FX(e,t){e._reconstructActiveFormattingElements(),wv(t),L0(t),t.selfClosing?e._appendElement(t,_t.MATHML):e._insertElement(t,_t.MATHML),t.ackSelfClosing=!0}function $X(e,t){e._reconstructActiveFormattingElements(),Sv(t),L0(t),t.selfClosing?e._appendElement(t,_t.SVG):e._insertElement(t,_t.SVG),t.ackSelfClosing=!0}function OC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,_t.HTML)}function Cr(e,t){switch(t.tagID){case x.I:case x.S:case x.B:case x.U:case x.EM:case x.TT:case x.BIG:case x.CODE:case x.FONT:case x.SMALL:case x.STRIKE:case x.STRONG:{TX(e,t);break}case x.A:{kX(e,t);break}case x.H1:case x.H2:case x.H3:case x.H4:case x.H5:case x.H6:{mX(e,t);break}case x.P:case x.DL:case x.OL:case x.UL:case x.DIV:case x.DIR:case x.NAV:case x.MAIN:case x.MENU:case x.ASIDE:case x.CENTER:case x.FIGURE:case x.FOOTER:case x.HEADER:case x.HGROUP:case x.DIALOG:case x.DETAILS:case x.ADDRESS:case x.ARTICLE:case x.SEARCH:case x.SECTION:case x.SUMMARY:case x.FIELDSET:case x.BLOCKQUOTE:case x.FIGCAPTION:{gX(e,t);break}case x.LI:case x.DD:case x.DT:{xX(e,t);break}case x.BR:case x.IMG:case x.WBR:case x.AREA:case x.EMBED:case x.KEYGEN:{Iv(e,t);break}case x.HR:{LX(e,t);break}case x.RB:case x.RTC:{PX(e,t);break}case x.RT:case x.RP:{MX(e,t);break}case x.PRE:case x.LISTING:{bX(e,t);break}case x.XMP:{RX(e,t);break}case x.SVG:{$X(e,t);break}case x.HTML:{dX(e,t);break}case x.BASE:case x.LINK:case x.META:case x.STYLE:case x.TITLE:case x.SCRIPT:case x.BGSOUND:case x.BASEFONT:case x.TEMPLATE:{xi(e,t);break}case x.BODY:{fX(e,t);break}case x.FORM:{yX(e,t);break}case x.NOBR:{EX(e,t);break}case x.MATH:{FX(e,t);break}case x.TABLE:{SX(e,t);break}case x.INPUT:{AX(e,t);break}case x.PARAM:case x.TRACK:case x.SOURCE:{vX(e,t);break}case x.IMAGE:{IX(e,t);break}case x.BUTTON:{_X(e,t);break}case x.APPLET:case x.OBJECT:case x.MARQUEE:{wX(e,t);break}case x.IFRAME:{OX(e,t);break}case x.SELECT:{NX(e,t);break}case x.OPTION:case x.OPTGROUP:{DX(e,t);break}case x.NOEMBED:case x.NOFRAMES:{RC(e,t);break}case x.FRAMESET:{pX(e,t);break}case x.TEXTAREA:{BX(e,t);break}case x.NOSCRIPT:{e.options.scriptingEnabled?RC(e,t):OC(e,t);break}case x.PLAINTEXT:{CX(e,t);break}case x.COL:case x.TH:case x.TD:case x.TR:case x.HEAD:case x.FRAME:case x.TBODY:case x.TFOOT:case x.THEAD:case x.CAPTION:case x.COLGROUP:break;default:OC(e,t)}}function HX(e,t){if(e.openElements.hasInScope(x.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function zX(e,t){e.openElements.hasInScope(x.BODY)&&(e.insertionMode=U.AFTER_BODY,zv(e,t))}function UX(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function qX(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(x.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(x.FORM):r&&e.openElements.remove(r))}function WX(e){e.openElements.hasInButtonScope(x.P)||e._insertFakeElement(et.P,x.P),e._closePElement()}function jX(e){e.openElements.hasInListItemScope(x.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(x.LI),e.openElements.popUntilTagNamePopped(x.LI))}function VX(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function GX(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function YX(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function XX(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(et.BR,x.BR),e.openElements.pop(),e.framesetOk=!1}function Rv(e,t){const r=t.tagName,i=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){const s=e.openElements.items[n],a=e.openElements.tagIDs[n];if(i===a&&(i!==x.UNKNOWN||e.treeAdapter.getTagName(s)===r)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(s,a))break}}function zh(e,t){switch(t.tagID){case x.A:case x.B:case x.I:case x.S:case x.U:case x.EM:case x.TT:case x.BIG:case x.CODE:case x.FONT:case x.NOBR:case x.SMALL:case x.STRIKE:case x.STRONG:{I0(e,t);break}case x.P:{WX(e);break}case x.DL:case x.UL:case x.OL:case x.DIR:case x.DIV:case x.NAV:case x.PRE:case x.MAIN:case x.MENU:case x.ASIDE:case x.BUTTON:case x.CENTER:case x.FIGURE:case x.FOOTER:case x.HEADER:case x.HGROUP:case x.DIALOG:case x.ADDRESS:case x.ARTICLE:case x.DETAILS:case x.SEARCH:case x.SECTION:case x.SUMMARY:case x.LISTING:case x.FIELDSET:case x.BLOCKQUOTE:case x.FIGCAPTION:{UX(e,t);break}case x.LI:{jX(e);break}case x.DD:case x.DT:{VX(e,t);break}case x.H1:case x.H2:case x.H3:case x.H4:case x.H5:case x.H6:{GX(e);break}case x.BR:{XX(e);break}case x.BODY:{HX(e,t);break}case x.HTML:{zX(e,t);break}case x.FORM:{qX(e);break}case x.APPLET:case x.OBJECT:case x.MARQUEE:{YX(e,t);break}case x.TEMPLATE:{Ms(e,t);break}default:Rv(e,t)}}function Ov(e,t){e.tmplInsertionModeStack.length>0?Hv(e,t):B0(e,t)}function KX(e,t){var r;t.tagID===x.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function QX(e,t){e._err(t,lt.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Of(e,t){if(e.openElements.currentTagId!==void 0&&Av.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case fe.CHARACTER:{Dv(e,t);break}case fe.WHITESPACE_CHARACTER:{Nv(e,t);break}}else Wl(e,t)}function ZX(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,_t.HTML),e.insertionMode=U.IN_CAPTION}function JX(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,_t.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function tK(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(et.COLGROUP,x.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,R0(e,t)}function eK(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,_t.HTML),e.insertionMode=U.IN_TABLE_BODY}function rK(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(et.TBODY,x.TBODY),e.insertionMode=U.IN_TABLE_BODY,Uh(e,t)}function iK(e,t){e.openElements.hasInTableScope(x.TABLE)&&(e.openElements.popUntilTagNamePopped(x.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function nK(e,t){Bv(t)?e._appendElement(t,_t.HTML):Wl(e,t),t.ackSelfClosing=!0}function sK(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,_t.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function za(e,t){switch(t.tagID){case x.TD:case x.TH:case x.TR:{rK(e,t);break}case x.STYLE:case x.SCRIPT:case x.TEMPLATE:{xi(e,t);break}case x.COL:{tK(e,t);break}case x.FORM:{sK(e,t);break}case x.TABLE:{iK(e,t);break}case x.TBODY:case x.TFOOT:case x.THEAD:{eK(e,t);break}case x.INPUT:{nK(e,t);break}case x.CAPTION:{ZX(e,t);break}case x.COLGROUP:{JX(e,t);break}default:Wl(e,t)}}function Al(e,t){switch(t.tagID){case x.TABLE:{e.openElements.hasInTableScope(x.TABLE)&&(e.openElements.popUntilTagNamePopped(x.TABLE),e._resetInsertionMode());break}case x.TEMPLATE:{Ms(e,t);break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TBODY:case x.TD:case x.TFOOT:case x.TH:case x.THEAD:case x.TR:break;default:Wl(e,t)}}function Wl(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Hh(e,t),e.fosterParentingEnabled=r}function Nv(e,t){e.pendingCharacterTokens.push(t)}function Dv(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Eo(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)Wl(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Pv=new Set([x.CAPTION,x.COL,x.COLGROUP,x.TBODY,x.TD,x.TFOOT,x.TH,x.THEAD,x.TR]);function aK(e,t){const r=t.tagID;Pv.has(r)?e.openElements.hasInTableScope(x.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,za(e,t)):Cr(e,t)}function oK(e,t){const r=t.tagID;switch(r){case x.CAPTION:case x.TABLE:{e.openElements.hasInTableScope(x.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,r===x.TABLE&&Al(e,t));break}case x.BODY:case x.COL:case x.COLGROUP:case x.HTML:case x.TBODY:case x.TD:case x.TFOOT:case x.TH:case x.THEAD:case x.TR:break;default:zh(e,t)}}function R0(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.COL:{e._appendElement(t,_t.HTML),t.ackSelfClosing=!0;break}case x.TEMPLATE:{xi(e,t);break}default:ju(e,t)}}function lK(e,t){switch(t.tagID){case x.COLGROUP:{e.openElements.currentTagId===x.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case x.TEMPLATE:{Ms(e,t);break}case x.COL:break;default:ju(e,t)}}function ju(e,t){e.openElements.currentTagId===x.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function Uh(e,t){switch(t.tagID){case x.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,_t.HTML),e.insertionMode=U.IN_ROW;break}case x.TH:case x.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(et.TR,x.TR),e.insertionMode=U.IN_ROW,qh(e,t);break}case x.CAPTION:case x.COL:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,za(e,t));break}default:za(e,t)}}function hg(e,t){const r=t.tagID;switch(t.tagID){case x.TBODY:case x.TFOOT:case x.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case x.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Al(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TD:case x.TH:case x.TR:break;default:Al(e,t)}}function qh(e,t){switch(t.tagID){case x.TH:case x.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,_t.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break}case x.CAPTION:case x.COL:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:case x.TR:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,Uh(e,t));break}default:za(e,t)}}function Mv(e,t){switch(t.tagID){case x.TR:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break}case x.TABLE:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,hg(e,t));break}case x.TBODY:case x.TFOOT:case x.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(x.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,hg(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TD:case x.TH:break;default:Al(e,t)}}function cK(e,t){const r=t.tagID;Pv.has(r)?(e.openElements.hasInTableScope(x.TD)||e.openElements.hasInTableScope(x.TH))&&(e._closeTableCell(),qh(e,t)):Cr(e,t)}function uK(e,t){const r=t.tagID;switch(r){case x.TD:case x.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break}case x.TABLE:case x.TBODY:case x.TFOOT:case x.THEAD:case x.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),Mv(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:break;default:zh(e,t)}}function Fv(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.OPTION:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e._insertElement(t,_t.HTML);break}case x.OPTGROUP:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop(),e._insertElement(t,_t.HTML);break}case x.HR:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop(),e._appendElement(t,_t.HTML),t.ackSelfClosing=!0;break}case x.INPUT:case x.KEYGEN:case x.TEXTAREA:case x.SELECT:{e.openElements.hasInSelectScope(x.SELECT)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),t.tagID!==x.SELECT&&e._processStartTag(t));break}case x.SCRIPT:case x.TEMPLATE:{xi(e,t);break}}}function $v(e,t){switch(t.tagID){case x.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===x.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===x.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop();break}case x.OPTION:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop();break}case x.SELECT:{e.openElements.hasInSelectScope(x.SELECT)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode());break}case x.TEMPLATE:{Ms(e,t);break}}}function hK(e,t){const r=t.tagID;r===x.CAPTION||r===x.TABLE||r===x.TBODY||r===x.TFOOT||r===x.THEAD||r===x.TR||r===x.TD||r===x.TH?(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Fv(e,t)}function dK(e,t){const r=t.tagID;r===x.CAPTION||r===x.TABLE||r===x.TBODY||r===x.TFOOT||r===x.THEAD||r===x.TR||r===x.TD||r===x.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),e.onEndTag(t)):$v(e,t)}function fK(e,t){switch(t.tagID){case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:case x.NOFRAMES:case x.SCRIPT:case x.STYLE:case x.TEMPLATE:case x.TITLE:{xi(e,t);break}case x.CAPTION:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:{e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,za(e,t);break}case x.COL:{e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,R0(e,t);break}case x.TR:{e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,Uh(e,t);break}case x.TD:case x.TH:{e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,qh(e,t);break}default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,Cr(e,t)}}function pK(e,t){t.tagID===x.TEMPLATE&&Ms(e,t)}function Hv(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(x.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):B0(e,t)}function gK(e,t){t.tagID===x.HTML?Cr(e,t):Vu(e,t)}function zv(e,t){var r;if(t.tagID===x.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===x.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(i))===null||r===void 0)&&r.endTag)&&e._setEndLocation(i,t)}}else Vu(e,t)}function Vu(e,t){e.insertionMode=U.IN_BODY,Hh(e,t)}function mK(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.FRAMESET:{e._insertElement(t,_t.HTML);break}case x.FRAME:{e._appendElement(t,_t.HTML),t.ackSelfClosing=!0;break}case x.NOFRAMES:{xi(e,t);break}}}function bK(e,t){t.tagID===x.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==x.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function yK(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.NOFRAMES:{xi(e,t);break}}}function xK(e,t){t.tagID===x.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function CK(e,t){t.tagID===x.HTML?Cr(e,t):tu(e,t)}function tu(e,t){e.insertionMode=U.IN_BODY,Hh(e,t)}function _K(e,t){switch(t.tagID){case x.HTML:{Cr(e,t);break}case x.NOFRAMES:{xi(e,t);break}}}function kK(e,t){t.chars=Be,e._insertCharacters(t)}function TK(e,t){e._insertCharacters(t),e.framesetOk=!1}function Uv(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==_t.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function EK(e,t){if($Y(t))Uv(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(r);i===_t.MATHML?wv(t):i===_t.SVG&&(HY(t),Sv(t)),L0(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function wK(e,t){if(t.tagID===x.P||t.tagID===x.BR){Uv(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const i=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(i)===_t.HTML){e._endTagOutsideForeignContent(t);break}const n=e.treeAdapter.getTagName(i);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(r);break}}}et.AREA,et.BASE,et.BASEFONT,et.BGSOUND,et.BR,et.COL,et.EMBED,et.FRAME,et.HR,et.IMG,et.INPUT,et.KEYGEN,et.LINK,et.META,et.PARAM,et.SOURCE,et.TRACK,et.WBR;const Wh=qv("end"),qi=qv("start");function qv(e){return t;function t(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Wv(e){const t=qi(e),r=Wh(e);if(t&&r)return{start:t,end:r}}const SK=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,AK=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),NC={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function jv(e,t){const r=MK(e),i=Pg("type",{handlers:{root:vK,element:LK,text:IK,comment:Gv,doctype:BK,raw:OK},unknown:NK}),n={parser:r?new BC(NC):BC.getFragmentParser(void 0,NC),handle(o){i(o,n)},stitches:!1,options:t||{}};i(e,n),eo(n,qi());const s=r?n.parser.document:n.parser.getFragment(),a=$G(s,{file:n.options.file});return n.stitches&&gi(a,"comment",function(o,l,c){const u=o;if(u.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=u.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Vv(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function vK(e,t){Vv(e.children,t)}function LK(e,t){DK(e,t),Vv(e.children,t),PK(e,t)}function IK(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:fe.CHARACTER,chars:e.value,location:jl(e)};eo(t,qi(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function BK(e,t){const r={type:fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:jl(e)};eo(t,qi(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function RK(e,t){t.stitches=!0;const r=FK(e);if("children"in e&&"children"in r){const i=jv({type:"root",children:e.children},t.options);r.children=i.children}Gv({type:"comment",value:{stitch:r}},t)}function Gv(e,t){const r=e.value,i={type:fe.COMMENT,data:r,location:jl(e)};eo(t,qi(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function OK(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Yv(t,qi(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(SK,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function NK(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))RK(r,t);else{let i="";throw AK.has(r.type)&&(i=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+i)}}function eo(e,t){Yv(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=He.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Yv(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function DK(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===He.PLAINTEXT)return;eo(t,qi(e));const i=t.parser.openElements.current;let n="namespaceURI"in i?i.namespaceURI:fs.html;n===fs.html&&r==="svg"&&(n=fs.svg);const s=WG({...e,children:[]},{space:n===fs.svg?"svg":"html"}),a={type:fe.START_TAG,tagName:r,tagID:to(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:jl(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function PK(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&bk.includes(r)||t.parser.tokenizer.state===He.PLAINTEXT)return;eo(t,Wh(e));const i={type:fe.END_TAG,tagName:r,tagID:to(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:jl(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===He.RCDATA||t.parser.tokenizer.state===He.RAWTEXT||t.parser.tokenizer.state===He.SCRIPT_DATA)&&(t.parser.tokenizer.state=He.DATA)}function MK(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function jl(e){const t=qi(e)||{line:void 0,column:void 0,offset:void 0},r=Wh(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function FK(e){return"children"in e?Ls({...e,children:[]}):Ls(e)}function dg(e){return function(t,r){return jv(t,{...e,file:r})}}const Qn=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ss={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Qn,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Qn],h2:[["className","sr-only"]],img:[...Qn,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Qn,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Qn],table:[...Qn],ul:[...Qn,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},In={}.hasOwnProperty;function $K(e,t){let r={type:"root",children:[]};const i={schema:t?{...ss,...t}:ss,stack:[]},n=Xv(i,e);return n&&(Array.isArray(n)?n.length===1?r=n[0]:r.children=n:r=n),r}function Xv(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return HK(e,r);case"doctype":return zK(e,r);case"element":return UK(e,r);case"root":return qK(e,r);case"text":return WK(e,r)}}}function HK(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",i=r.indexOf("-->"),s={type:"comment",value:i<0?r:r.slice(0,i)};return Vl(s,t),s}}function zK(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return Vl(r,t),r}}function UK(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const i=Kv(e,t.children),n=jK(e,t.properties);e.stack.pop();let s=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(s=!0,e.schema.ancestors&&In.call(e.schema.ancestors,r))){const o=e.schema.ancestors[r];let l=-1;for(s=!1;++l<o.length;)e.stack.includes(o[l])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(r)?i:void 0;const a={type:"element",tagName:r,properties:n,children:i};return Vl(a,t),a}function qK(e,t){const i={type:"root",children:Kv(e,t.children)};return Vl(i,t),i}function WK(e,t){const i={type:"text",value:typeof t.value=="string"?t.value:""};return Vl(i,t),i}function Kv(e,t){const r=[];if(Array.isArray(t)){const i=t;let n=-1;for(;++n<i.length;){const s=Xv(e,i[n]);s&&(Array.isArray(s)?r.push(...s):r.push(s))}}return r}function jK(e,t){const r=e.stack[e.stack.length-1],i=e.schema.attributes,n=e.schema.required,s=i&&In.call(i,r)?i[r]:void 0,a=i&&In.call(i,"*")?i["*"]:void 0,o=t&&typeof t=="object"?t:{},l={};let c;for(c in o)if(In.call(o,c)){const u=o[c];let h=DC(e,PC(s,c),c,u);h==null&&(h=DC(e,PC(a,c),c,u)),h!=null&&(l[c]=h)}if(n&&In.call(n,r)){const u=n[r];for(c in u)In.call(u,c)&&!In.call(l,c)&&(l[c]=u[c])}return l}function DC(e,t,r,i){return t?Array.isArray(i)?VK(e,t,r,i):Qv(e,t,r,i):void 0}function VK(e,t,r,i){let n=-1;const s=[];for(;++n<i.length;){const a=Qv(e,t,r,i[n]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function Qv(e,t,r,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&GK(e,r,i)){if(typeof t=="object"&&t.length>1){let n=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(i))){n=!0;break}}else if(a===i){n=!0;break}}if(!n)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+i:i}}function GK(e,t,r){const i=e.schema.protocols&&In.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!i||i.length===0)return!0;const n=String(r),s=n.indexOf(":"),a=n.indexOf("?"),o=n.indexOf("#"),l=n.indexOf("/");if(s<0||l>-1&&s>l||a>-1&&s>a||o>-1&&s>o)return!0;let c=-1;for(;++c<i.length;){const u=i[c];if(s===u.length&&n.slice(0,u.length)===u)return!0}return!1}function Vl(e,t){const r=Wv(t);t.data&&(e.data=Ls(t.data)),r&&(e.position=r)}function PC(e,t){let r,i=-1;if(e)for(;++i<e.length;){const n=e[i],s=typeof n=="string"?n:n[0];if(s===t)return n;s==="data*"&&(r=n)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function Zv(e){return function(t){return $K(t,e)}}const wr=Wn(/[A-Za-z]/),br=Wn(/[\dA-Za-z]/),YK=Wn(/[#-'*+\--9=?A-Z^-~]/);function Gu(e){return e!==null&&(e<32||e===127)}const fg=Wn(/\d/),XK=Wn(/[\dA-Fa-f]/),KK=Wn(/[!-/:-@[-`{-~]/);function Zt(e){return e!==null&&e<-2}function Ae(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const jh=Wn(new RegExp("\\p{P}|\\p{S}","u")),Is=Wn(/\s/);function Wn(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function QK(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ZK(e,t,r){const n=Ph((r||{}).ignore||[]),s=JK(t);let a=-1;for(;++a<s.length;)Fh(e,"text",o);function o(c,u){let h=-1,f;for(;++h<u.length;){const d=u[h],p=f?f.children:void 0;if(n(d,p?p.indexOf(d):void 0,f))return;f=d}if(f)return l(c,u)}function l(c,u){const h=u[u.length-1],f=s[a][0],d=s[a][1];let p=0;const b=h.children.indexOf(c);let m=!1,_=[];f.lastIndex=0;let k=f.exec(c.value);for(;k;){const T=k.index,E={index:k.index,input:k.input,stack:[...u,c]};let S=d(...k,E);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?f.lastIndex=T+1:(p!==T&&_.push({type:"text",value:c.value.slice(p,T)}),Array.isArray(S)?_.push(...S):S&&_.push(S),p=T+k[0].length,m=!0),!f.global)break;k=f.exec(c.value)}return m?(p<c.value.length&&_.push({type:"text",value:c.value.slice(p)}),h.children.splice(b,1,..._)):_=[c],b+_.length}}function JK(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const n=r[i];t.push([tQ(n[0]),eQ(n[1])])}return t}function tQ(e){return typeof e=="string"?new RegExp(QK(e),"g"):e}function eQ(e){return typeof e=="function"?e:function(){return e}}const Nf="phrasing",Df=["autolink","link","image","label"];function rQ(){return{transforms:[cQ],enter:{literalAutolink:nQ,literalAutolinkEmail:Pf,literalAutolinkHttp:Pf,literalAutolinkWww:Pf},exit:{literalAutolink:lQ,literalAutolinkEmail:oQ,literalAutolinkHttp:sQ,literalAutolinkWww:aQ}}}function iQ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Nf,notInConstruct:Df},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Nf,notInConstruct:Df},{character:":",before:"[ps]",after:"\\/",inConstruct:Nf,notInConstruct:Df}]}}function nQ(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Pf(e){this.config.enter.autolinkProtocol.call(this,e)}function sQ(e){this.config.exit.autolinkProtocol.call(this,e)}function aQ(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function oQ(e){this.config.exit.autolinkEmail.call(this,e)}function lQ(e){this.exit(e)}function cQ(e){ZK(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uQ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hQ]],{ignore:["link","linkReference"]})}function uQ(e,t,r,i,n){let s="";if(!Jv(n)||(/^w/i.test(t)&&(r=t+r,t="",s="http://"),!dQ(r)))return!1;const a=fQ(r+i);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function hQ(e,t,r,i){return!Jv(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function dQ(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function fQ(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],i=r.indexOf(")");const n=lu(e,"(");let s=lu(e,")");for(;i!==-1&&n>s;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),s++;return[e,r]}function Jv(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Is(r)||jh(r))&&(!t||r!==47)}function fi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}tL.peek=kQ;function pQ(){this.buffer()}function gQ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function mQ(){this.buffer()}function bQ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function yQ(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=fi(this.sliceSerialize(e)).toLowerCase(),r.label=t}function xQ(e){this.exit(e)}function CQ(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=fi(this.sliceSerialize(e)).toLowerCase(),r.label=t}function _Q(e){this.exit(e)}function kQ(){return"["}function tL(e,t,r,i){const n=r.createTracker(i);let s=n.move("[^");const a=r.enter("footnoteReference"),o=r.enter("reference");return s+=n.move(r.safe(r.associationId(e),{after:"]",before:s})),o(),a(),s+=n.move("]"),s}function TQ(){return{enter:{gfmFootnoteCallString:pQ,gfmFootnoteCall:gQ,gfmFootnoteDefinitionLabelString:mQ,gfmFootnoteDefinition:bQ},exit:{gfmFootnoteCallString:yQ,gfmFootnoteCall:xQ,gfmFootnoteDefinitionLabelString:CQ,gfmFootnoteDefinition:_Q}}}function EQ(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:tL},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,n,s,a){const o=s.createTracker(a);let l=o.move("[^");const c=s.enter("footnoteDefinition"),u=s.enter("label");return l+=o.move(s.safe(s.associationId(i),{before:l,after:"]"})),u(),l+=o.move("]:"),i.children&&i.children.length>0&&(o.shift(4),l+=o.move((t?`
470
- `:" ")+s.indentLines(s.containerFlow(i,o.current()),t?eL:wQ))),c(),l}}function wQ(e,t,r){return t===0?e:eL(e,t,r)}function eL(e,t,r){return(r?"":" ")+e}const SQ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];O0.attention=BQ;O0.peek=RQ;function AQ(){return{canContainEols:["delete"],enter:{strikethrough:LQ},exit:{strikethrough:IQ}}}function vQ(){return{handlers:{delete:O0},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:SQ}]}}function LQ(e){this.enter({type:"delete",children:[],position:void 0},e)}function IQ(e){this.exit(e)}function O0(e,t,r,i){const n=r.createTracker(i),s=r.stack.includes("strikethrough")?"~":"~~",a=r.enter("strikethrough");let o=n.move(s);return o+=r.containerPhrasing(e,{...n.current(),before:o,after:"~"}),o+=n.move(s),a(),o}function BQ(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function RQ(){return"~"}function OQ(e){return e.length}function NQ(e,t){const r=t||{},i=(r.align||[]).concat(),n=r.stringLength||OQ,s=[],a=[],o=[],l=[];let c=0,u=-1;for(;++u<e.length;){const g=[],b=[];let m=-1;for(e[u].length>c&&(c=e[u].length);++m<e[u].length;){const _=DQ(e[u][m]);if(r.alignDelimiters!==!1){const k=n(_);b[m]=k,(l[m]===void 0||k>l[m])&&(l[m]=k)}g.push(_)}a[u]=g,o[u]=b}let h=-1;if(typeof i=="object"&&"length"in i)for(;++h<c;)s[h]=MC(i[h]);else{const g=MC(i);for(;++h<c;)s[h]=g}h=-1;const f=[],d=[];for(;++h<c;){const g=s[h];let b="",m="";g===99?(b=":",m=":"):g===108?b=":":g===114&&(m=":");let _=r.alignDelimiters===!1?1:Math.max(1,l[h]-b.length-m.length);const k=b+"-".repeat(_)+m;r.alignDelimiters!==!1&&(_=b.length+_+m.length,_>l[h]&&(l[h]=_),d[h]=_),f[h]=k}a.splice(1,0,f),o.splice(1,0,d),u=-1;const p=[];for(;++u<a.length;){const g=a[u],b=o[u];h=-1;const m=[];for(;++h<c;){const _=g[h]||"";let k="",T="";if(r.alignDelimiters!==!1){const E=l[h]-(b[h]||0),S=s[h];S===114?k=" ".repeat(E):S===99?E%2?(k=" ".repeat(E/2+.5),T=" ".repeat(E/2-.5)):(k=" ".repeat(E/2),T=k):T=" ".repeat(E)}r.delimiterStart!==!1&&!h&&m.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&_==="")&&(r.delimiterStart!==!1||h)&&m.push(" "),r.alignDelimiters!==!1&&m.push(k),m.push(_),r.alignDelimiters!==!1&&m.push(T),r.padding!==!1&&m.push(" "),(r.delimiterEnd!==!1||h!==c-1)&&m.push("|")}p.push(r.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return p.join(`
471
- `)}function DQ(e){return e==null?"":String(e)}function MC(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const PQ=Ph(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MQ(e,t,r,i){const n=r.enter("blockquote"),s=r.createTracker(i);s.move("> "),s.shift(2);const a=r.indentLines(r.containerFlow(e,s.current()),FQ);return n(),a}function FQ(e,t,r){return">"+(r?"":" ")+e}function $Q(e,t){return FC(e,t.inConstruct,!0)&&!FC(e,t.notInConstruct,!1)}function FC(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function $C(e,t,r,i){let n=-1;for(;++n<r.unsafe.length;){const s=r.unsafe[n];if(s.character===`
472
- `&&!s.before&&!s.after&&$Q(r.stack,s))return/[\t ]/.test(i.before)?"":" "}return`\\
473
- `}function HQ(e,t){const r=String(e);let i=r.indexOf(t),n=i,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===n?++s>a&&(a=s):s=1,n=i+t.length,i=r.indexOf(t,n);return a}function zQ(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function UQ(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function qQ(e,t,r,i){const n=UQ(r),s=e.value||"";if(zQ(e,r)){const h=r.enter("codeIndented"),f=r.indentLines(s,WQ);return h(),f}const a=r.createTracker(i),o=n.repeat(Math.max(HQ(s,n)+1,3)),l=r.enter("codeFenced"),c=n==="`"?"GraveAccent":"Tilde";let u=a.move(o);if(e.lang){const h=r.enter(`codeFencedLang${c}`);u+=a.move(r.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),h()}if(e.lang&&e.meta){const h=r.enter(`codeFencedMeta${c}`);u+=a.move(" "),u+=a.move(r.safe(e.meta,{before:u,after:`
474
- `,encode:["`"],...a.current()})),h()}return u+=a.move(`
475
- `),s&&(u+=a.move(s+`
476
- `)),u+=a.move(o),l(),u}function WQ(e,t,r){return(r?"":" ")+e}function N0(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function jQ(e,t,r,i){const n=N0(r),s=n==='"'?"Quote":"Apostrophe",a=r.enter("definition");let o=r.enter("label");const l=r.createTracker(i);let c=l.move("[");return c+=l.move(r.safe(r.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":`
477
- `,...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),c+=l.move(" "+n),c+=l.move(r.safe(e.title,{before:c,after:n,...l.current()})),c+=l.move(n),o()),a(),c}function VQ(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}D0.attention=GQ;D0.peek=YQ;function D0(e,t,r,i){const n=r.enter("phrasing"),s=r.containerPhrasing({type:"root",children:[e]},i);return n(),s}function GQ(e,t){return{construct:"emphasis",markers:VQ(t)==="*"?["*","_"]:["_","*"],sizes:[1]}}function YQ(e,t,r){return r.options.emphasis||"*"}function XQ(e){return"&#x"+e.toString(16).toUpperCase()+";"}const KQ={};function P0(e,t){const r=KQ,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,n=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return rL(e,i,n)}function rL(e,t,r){if(QQ(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return HC(e.children,t,r)}return Array.isArray(e)?HC(e,t,r):""}function HC(e,t,r){const i=[];let n=-1;for(;++n<e.length;)i[n]=rL(e[n],t,r);return i.join("")}function QQ(e){return!!(e&&typeof e=="object")}function ZQ(e,t){let r=!1;return gi(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,ag}),!!((!e.depth||e.depth<3)&&P0(e)&&(t.options.setext||r))}function JQ(e,t,r,i){const n=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(i);if(ZQ(e,r)){const h=r.enter("headingSetext"),f=r.enter("phrasing"),d=r.containerPhrasing(e,{...s.current(),before:`
478
- `,after:`
479
- `});return f(),h(),d+`
480
- `+(n===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
481
- `))+1))}const a="#".repeat(n),o=r.enter("headingAtx"),l=r.enter("phrasing");s.move(a+" ");let c=r.containerPhrasing(e,{before:"# ",after:`
482
- `,...s.current()});const u=c.charCodeAt(0);return(u===9||u===32)&&(c=XQ(u)+c.slice(1)),c=c?a+" "+c:a,r.options.closeAtx&&(c+=" "+a),l(),o(),c}iL.peek=tZ;function iL(e){return e.value||""}function tZ(){return"<"}nL.peek=eZ;function nL(e,t,r,i){const n=N0(r),s=n==='"'?"Quote":"Apostrophe",a=r.enter("image");let o=r.enter("label");const l=r.createTracker(i);let c=l.move("![");return c+=l.move(r.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${s}`),c+=l.move(" "+n),c+=l.move(r.safe(e.title,{before:c,after:n,...l.current()})),c+=l.move(n),o()),c+=l.move(")"),a(),c}function eZ(){return"!"}sL.peek=rZ;function sL(e,t,r,i){const n=e.referenceType,s=r.enter("imageReference");let a=r.enter("label");const o=r.createTracker(i);let l=o.move("![");const c=r.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const u=r.stack;r.stack=u.filter(function(f){return f!=="phrasing"}),a=r.enter("reference");const h=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=u,s(),n==="full"||!c||c!==h?l+=o.move(h+"]"):n==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function rZ(){return"!"}aL.peek=iZ;function aL(e,t,r){let i=e.value||"",n="`",s=-1;for(;new RegExp("(^|[^`])"+n+"([^`]|$)").test(i);)n+="`";for(/[^\n\r ]/.test(i)&&(/^[\n\r ]/.test(i)&&/[\n\r ]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<r.unsafe.length;){const a=r.unsafe[s],o=r.compilePattern(a);if(!a.atBreak)continue;let l;for(;l=o.exec(i);){let c=l.index;i.charCodeAt(c)===10&&i.charCodeAt(c-1)===13&&c--,i=i.slice(0,c)+" "+i.slice(l.index+1)}}return n+i+n}function iZ(){return"`"}function oL(e,t){const r=P0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}lL.peek=nZ;function lL(e,t,r,i){const n=N0(r),s=n==='"'?"Quote":"Apostrophe",a=r.createTracker(i);if(oL(e,r)){const u=r.stack;r.stack=u.filter(function(d){return d!=="phrasing"});const h=r.enter("autolink");let f=a.move("<");return f+=a.move(r.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),h(),r.stack=u,f}const o=r.enter("link");let l=r.enter("label"),c=a.move("[");return c+=a.move(r.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=r.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(r.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=r.enter("destinationRaw"),c+=a.move(r.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=r.enter(`title${s}`),c+=a.move(" "+n),c+=a.move(r.safe(e.title,{before:c,after:n,...a.current()})),c+=a.move(n),l()),c+=a.move(")"),o(),c}function nZ(e,t,r){return oL(e,r)?"<":"["}cL.peek=sZ;function cL(e,t,r,i){const n=e.referenceType,s=r.enter("linkReference");let a=r.enter("label");const o=r.createTracker(i);let l=o.move("[");const c=r.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const u=r.stack;r.stack=u.filter(function(f){return f!=="phrasing"}),a=r.enter("reference");const h=r.safe(r.associationId(e),{before:l,after:"]",...o.current()});return a(),r.stack=u,s(),n==="full"||!c||c!==h?l+=o.move(h+"]"):n==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function sZ(){return"["}function M0(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function aZ(e){const t=M0(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function oZ(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function uL(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function lZ(e,t,r,i){const n=r.enter("list"),s=r.bulletCurrent;let a=e.ordered?oZ(r):M0(r);const o=e.ordered?a==="."?")":".":aZ(r);let l=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),uL(r)===a&&u){let h=-1;for(;++h<e.children.length;){const f=e.children[h];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),r.bulletCurrent=a;const c=r.containerFlow(e,i);return r.bulletLastUsed=a,r.bulletCurrent=s,n(),c}function cZ(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function uZ(e,t,r,i){const n=cZ(r);let s=r.bulletCurrent||M0(r);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(n==="tab"||n==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=r.createTracker(i);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,o.current()),u);return l(),c;function u(h,f,d){return f?(d?"":" ".repeat(a))+h:(d?s:s+" ".repeat(a-s.length))+h}}function hZ(e,t,r,i){const n=r.enter("paragraph"),s=r.enter("phrasing"),a=r.containerPhrasing(e,i);return s(),n(),a}function dZ(e,t,r,i){if(!e.children.some(function(o){return PQ(o)}))return r.containerFlow(e,i);const s=r.enter("phrasing"),a=r.containerPhrasing(e,i);return s(),a}function fZ(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}F0.attention=pZ;F0.peek=gZ;function F0(e,t,r,i){const n=r.enter("phrasing"),s=r.containerPhrasing({type:"root",children:[e]},i);return n(),s}function pZ(e,t){return{construct:"strong",markers:fZ(t)==="*"?["*","_"]:["_","*"],sizes:[2]}}function gZ(e,t,r){return r.options.strong||"*"}function mZ(e,t,r,i){return r.safe(e.value,i)}function bZ(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function yZ(e,t,r){const i=(uL(r)+(r.options.ruleSpaces?" ":"")).repeat(bZ(r));return r.options.ruleSpaces?i.slice(0,-1):i}const hL={blockquote:MQ,break:$C,code:qQ,definition:jQ,emphasis:D0,hardBreak:$C,heading:JQ,html:iL,image:nL,imageReference:sL,inlineCode:aL,link:lL,linkReference:cL,list:lZ,listItem:uZ,paragraph:hZ,root:dZ,strong:F0,text:mZ,thematicBreak:yZ},xZ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zC=["pre","script","style","textarea"],UC=document.createElement("i");function $0(e){const t="&"+e+";";UC.innerHTML=t;const r=UC.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function dL(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}const CZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _Z(e){return e.replace(CZ,kZ)}function kZ(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const n=r.charCodeAt(1),s=n===120||n===88;return dL(r.slice(s?2:1),s?16:10)}return $0(r)||e}function Yu(e){if(e===null||Ae(e)||Is(e))return 1;if(jh(e))return 2}function TZ(){return{enter:{table:EZ,tableData:qC,tableHeader:qC,tableRow:SZ},exit:{codeText:AZ,table:wZ,tableData:Mf,tableHeader:Mf,tableRow:Mf}}}function EZ(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function wZ(e){this.exit(e),this.data.inTable=void 0}function SZ(e){this.enter({type:"tableRow",children:[]},e)}function Mf(e){this.exit(e)}function qC(e){this.enter({type:"tableCell",children:[]},e)}function AZ(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,vZ));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function vZ(e,t){return t==="|"?t:e}function LZ(e){const t=e||{},r=t.tableCellPadding,i=t.tablePipeAlign,n=t.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
483
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:l,tableRow:o}};function a(d,p,g,b){return c(u(d,g,b),d.align)}function o(d,p,g,b){const m=h(d,g,b),_=c([m]);return _.slice(0,_.indexOf(`
484
- `))}function l(d,p,g,b){const m=g.enter("tableCell"),_=g.enter("phrasing"),k=g.containerPhrasing(d,{...b,before:s,after:s});return _(),m(),k}function c(d,p){return NQ(d,{align:p,alignDelimiters:i,padding:r,stringLength:n})}function u(d,p,g){const b=d.children;let m=-1;const _=[],k=p.enter("table");for(;++m<b.length;)_[m]=h(b[m],p,g);return k(),_}function h(d,p,g){const b=d.children;let m=-1;const _=[],k=p.enter("tableRow");for(;++m<b.length;)_[m]=l(b[m],d,p,g);return k(),_}function f(d,p,g){let b=hL.inlineCode(d,p,g);return g.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function IZ(){return{exit:{taskListCheckValueChecked:WC,taskListCheckValueUnchecked:WC,paragraph:RZ}}}function BZ(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:OZ}}}function WC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function RZ(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const n=t.children;let s=-1,a;for(;++s<n.length;){const o=n[s];if(o.type==="paragraph"){a=o;break}}a===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function OZ(e,t,r,i){const n=e.children[0],s=typeof e.checked=="boolean"&&n&&n.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=r.createTracker(i);s&&o.move(a);let l=hL.listItem(e,t,r,{...i,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function NZ(){return[rQ(),TQ(),AQ(),TZ(),IZ()]}function DZ(e){return{extensions:[iQ(),EQ(e),vQ(),LZ(e),BZ()]}}function pi(e,t,r,i){const n=e.length;let s=0,a;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,r=r>0?r:0,i.length<1e4)a=Array.from(i),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);s<i.length;)a=i.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Xr(e,t){return e.length>0?(pi(e,e.length,0,t),e):t}const jC={}.hasOwnProperty;function fL(e){const t={};let r=-1;for(;++r<e.length;)PZ(t,e[r]);return t}function PZ(e,t){let r;for(r in t){const n=(jC.call(e,r)?e[r]:void 0)||(e[r]={}),s=t[r];let a;if(s)for(a in s){jC.call(n,a)||(n[a]=[]);const o=s[a];MZ(n[a],Array.isArray(o)?o:o?[o]:[])}}}function MZ(e,t){let r=-1;const i=[];for(;++r<t.length;)(t[r].add==="after"?e:i).push(t[r]);pi(e,0,0,i)}const FZ={tokenize:WZ,partial:!0},pL={tokenize:jZ,partial:!0},gL={tokenize:VZ,partial:!0},mL={tokenize:GZ,partial:!0},$Z={tokenize:YZ,partial:!0},bL={name:"wwwAutolink",tokenize:UZ,previous:xL},yL={name:"protocolAutolink",tokenize:qZ,previous:CL},gn={name:"emailAutolink",tokenize:zZ,previous:_L},Wi={};function HZ(){return{text:Wi}}let Zn=48;for(;Zn<123;)Wi[Zn]=gn,Zn++,Zn===58?Zn=65:Zn===91&&(Zn=97);Wi[43]=gn;Wi[45]=gn;Wi[46]=gn;Wi[95]=gn;Wi[72]=[gn,yL];Wi[104]=[gn,yL];Wi[87]=[gn,bL];Wi[119]=[gn,bL];function zZ(e,t,r){const i=this;let n,s;return a;function a(h){return!pg(h)||!_L.call(i,i.previous)||H0(i.events)?r(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(h))}function o(h){return pg(h)?(e.consume(h),o):h===64?(e.consume(h),l):r(h)}function l(h){return h===46?e.check($Z,u,c)(h):h===45||h===95||br(h)?(s=!0,e.consume(h),l):u(h)}function c(h){return e.consume(h),n=!0,l}function u(h){return s&&n&&wr(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):r(h)}}function UZ(e,t,r){const i=this;return n;function n(a){return a!==87&&a!==119||!xL.call(i,i.previous)||H0(i.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(FZ,e.attempt(pL,e.attempt(gL,s),r),r)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function qZ(e,t,r){const i=this;let n="",s=!1;return a;function a(h){return(h===72||h===104)&&CL.call(i,i.previous)&&!H0(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),n+=String.fromCodePoint(h),e.consume(h),o):r(h)}function o(h){if(wr(h)&&n.length<5)return n+=String.fromCodePoint(h),e.consume(h),o;if(h===58){const f=n.toLowerCase();if(f==="http"||f==="https")return e.consume(h),l}return r(h)}function l(h){return h===47?(e.consume(h),s?c:(s=!0,l)):r(h)}function c(h){return h===null||Gu(h)||Ae(h)||Is(h)||jh(h)?r(h):e.attempt(pL,e.attempt(gL,u),r)(h)}function u(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function WZ(e,t,r){let i=0;return n;function n(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),n):a===46&&i===3?(e.consume(a),s):r(a)}function s(a){return a===null?r(a):t(a)}}function jZ(e,t,r){let i,n,s;return a;function a(c){return c===46||c===95?e.check(mL,l,o)(c):c===null||Ae(c)||Is(c)||c!==45&&jh(c)?l(c):(s=!0,e.consume(c),a)}function o(c){return c===95?i=!0:(n=i,i=void 0),e.consume(c),a}function l(c){return n||i||!s?r(c):t(c)}}function VZ(e,t){let r=0,i=0;return n;function n(a){return a===40?(r++,e.consume(a),n):a===41&&i<r?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(mL,t,s)(a):a===null||Ae(a)||Is(a)?t(a):(e.consume(a),n)}function s(a){return a===41&&i++,e.consume(a),n}}function GZ(e,t,r){return i;function i(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),i):o===38?(e.consume(o),s):o===93?(e.consume(o),n):o===60||o===null||Ae(o)||Is(o)?t(o):r(o)}function n(o){return o===null||o===40||o===91||Ae(o)||Is(o)?t(o):i(o)}function s(o){return wr(o)?a(o):r(o)}function a(o){return o===59?(e.consume(o),i):wr(o)?(e.consume(o),a):r(o)}}function YZ(e,t,r){return i;function i(s){return e.consume(s),n}function n(s){return br(s)?r(s):t(s)}}function xL(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ae(e)}function CL(e){return!wr(e)}function _L(e){return!(e===47||pg(e))}function pg(e){return e===43||e===45||e===46||e===95||br(e)}function H0(e){let t=e.length,r=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function ro(e){const t=[];let r=-1,i=0,n=0;for(;++r<e.length;){const s=e.charCodeAt(r);let a="";if(s===37&&br(e.charCodeAt(r+1))&&br(e.charCodeAt(r+2)))n=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(r+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),n=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(i,r),encodeURIComponent(a)),i=r+n+1,a=""),n&&(r+=n,n=0)}return t.join("")+e.slice(i)}function Vh(e,t,r){const i=[];let n=-1;for(;++n<e.length;){const s=e[n].resolveAll;s&&!i.includes(s)&&(t=s(t,r),i.push(s))}return t}const gg={name:"attention",resolveAll:XZ,tokenize:KZ};function XZ(e,t){let r=-1,i;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){let n=r;for(;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;const s=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1,a={...e[n][1].end},o={...e[r][1].start};VC(a,-s),VC(o,s);const l={type:s>1?"strongSequence":"emphasisSequence",start:a,end:{...e[n][1].end}},c={type:s>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:o},u={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},h={type:s>1?"strong":"emphasis",start:{...l.start},end:{...c.end}};e[n][1].end={...l.start},e[r][1].start={...c.end},i=[],e[n][1].end.offset-e[n][1].start.offset&&(i=Xr(i,[["enter",e[n][1],t],["exit",e[n][1],t]])),i=Xr(i,[["enter",h,t],["enter",l,t],["exit",l,t],["enter",u,t]]),i=Xr(i,Vh(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),i=Xr(i,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",h,t]]);let f=0;e[r][1].end.offset-e[r][1].start.offset&&(f=2,i=Xr(i,[["enter",e[r][1],t],["exit",e[r][1],t]])),pi(e,n-1,r-n+3,i),r=n+i.length-f-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function KZ(e,t){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,n=Yu(i);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const c=e.exit("attentionSequence"),u=Yu(l),h=!u||u===2&&n||r.includes(l)&&l!==42&&l!==95,f=!n||n===2&&u||r.includes(i)&&i!==42&&i!==95;return c._open=!!(s===42?h:h&&(n||!f)),c._close=!!(s===42?f:f&&(u||!h)),t(l)}}function VC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const QZ={name:"autolink",tokenize:ZZ};function ZZ(e,t,r){let i=0;return n;function n(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(d){return wr(d)?(e.consume(d),a):d===64?r(d):c(d)}function a(d){return d===43||d===45||d===46||br(d)?(i=1,o(d)):c(d)}function o(d){return d===58?(e.consume(d),i=0,l):(d===43||d===45||d===46||br(d))&&i++<32?(e.consume(d),o):(i=0,c(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||Gu(d)?r(d):(e.consume(d),l)}function c(d){return d===64?(e.consume(d),u):YK(d)?(e.consume(d),c):r(d)}function u(d){return br(d)?h(d):r(d)}function h(d){return d===46?(e.consume(d),i=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||br(d))&&i++<63){const p=d===45?f:h;return e.consume(d),p}return r(d)}}function _e(e,t,r,i){const n=i?i-1:1/0;let s=0;return a;function a(l){return he(l)?(e.enter(r),o(l)):t(l)}function o(l){return he(l)&&s++<n?(e.consume(l),o):(e.exit(r),t(l))}}function kL(e,t,r,i,n,s){let a=0;return o;function o(u){return he(u)?(e.enter(i),l(u)):c(u)}function l(u){return he(u)&&a<s?(e.consume(u),a++,l):(e.exit(i),c(u))}function c(u){return a>=n?t(u):r(u)}}const Gl={partial:!0,tokenize:JZ};function JZ(e,t,r){return i;function i(s){return he(s)?_e(e,n,"linePrefix")(s):n(s)}function n(s){return s===null||Zt(s)?t(s):r(s)}}const TL={continuation:{tokenize:eJ},exit:rJ,name:"blockQuote",tokenize:tJ};function tJ(e,t,r){const i=this;return n;function n(a){if(a===62){const o=i.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return r(a)}function s(a){return he(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function eJ(e,t,r){const i=this;return n;function n(a){return he(a)?_e(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(TL,t,r)(a)}}function rJ(e){e.exit("blockQuote")}const EL={name:"characterEscape",tokenize:iJ};function iJ(e,t,r){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),n}function n(s){return KK(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(s)}}const wL={name:"characterReference",tokenize:nJ};function nJ(e,t,r){const i=this;let n=0,s,a;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),l}function l(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=br,u(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=XK,u):(e.enter("characterReferenceValue"),s=7,a=fg,u(h))}function u(h){if(h===59&&n){const f=e.exit("characterReferenceValue");return a===br&&!$0(i.sliceSerialize(f))?r(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&n++<s?(e.consume(h),u):r(h)}}const mg={partial:!0,tokenize:sJ};function sJ(e,t,r){const i=this;return n;function n(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return i.parser.lazy[i.now().line]?r(a):t(a)}}const GC={concrete:!0,name:"codeFenced",tokenize:aJ};function aJ(e,t,r){const i=this,n={partial:!0,tokenize:E};let s=0,a=0,o;return l;function l(S){return c(S)}function c(S){const B=i.events[i.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===o?(a++,e.consume(S),u):a<3?r(S):(e.exit("codeFencedFenceSequence"),he(S)?_e(e,h,"whitespace")(S):h(S))}function h(S){return S===null||Zt(S)?(e.exit("codeFencedFence"),i.interrupt?t(S):e.check(mg,g,T)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(S))}function f(S){return S===null||Zt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):he(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_e(e,d,"whitespace")(S)):S===96&&S===o?r(S):(e.consume(S),f)}function d(S){return S===null||Zt(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||Zt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===o?r(S):(e.consume(S),p)}function g(S){return e.attempt(n,T,b)(S)}function b(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),m}function m(S){return s>0&&he(S)?_e(e,_,"linePrefix",s+1)(S):_(S)}function _(S){return S===null||Zt(S)?e.check(mg,g,T)(S):(e.enter("codeFlowValue"),k(S))}function k(S){return S===null||Zt(S)?(e.exit("codeFlowValue"),_(S)):(e.consume(S),k)}function T(S){return e.exit("codeFenced"),t(S)}function E(S,B,L){let W=0;return O;function O(M){return S.enter("lineEnding"),S.consume(M),S.exit("lineEnding"),$}function $(M){return S.enter("codeFencedFence"),he(M)?_e(S,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):X(M)}function X(M){return M===o?(S.enter("codeFencedFenceSequence"),G(M)):L(M)}function G(M){return M===o?(W++,S.consume(M),G):W>=a?(S.exit("codeFencedFenceSequence"),he(M)?_e(S,H,"whitespace")(M):H(M)):L(M)}function H(M){return M===null||Zt(M)?(S.exit("codeFencedFence"),B(M)):L(M)}}}const Ff={name:"codeIndented",tokenize:lJ},oJ={partial:!0,tokenize:cJ};function lJ(e,t,r){return i;function i(o){return e.enter("codeIndented"),kL(e,n,r,"linePrefix",4,4)(o)}function n(o){return o===null?a(o):Zt(o)?e.attempt(oJ,n,a)(o):(e.enter("codeFlowValue"),s(o))}function s(o){return o===null||Zt(o)?(e.exit("codeFlowValue"),n(o)):(e.consume(o),s)}function a(o){return e.exit("codeIndented"),t(o)}}function cJ(e,t,r){const i=this;return n;function n(a){return i.parser.lazy[i.now().line]?r(a):Zt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n):kL(e,t,s,"linePrefix",4,4)(a)}function s(a){return Zt(a)?n(a):r(a)}}const uJ={name:"codeText",previous:dJ,resolve:hJ,tokenize:fJ};function hJ(e){let t=e.length-4,r=3,i,n;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=r;++i<t;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(i=r-1,t++;++i<=t;)n===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(n=i):(i===t||e[i][1].type==="lineEnding")&&(e[n][1].type="codeTextData",i!==n+2&&(e[n][1].end=e[i-1][1].end,e.splice(n+2,i-n-2),t-=i-n-2,i=n+2),n=void 0);return e}function dJ(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fJ(e,t,r){let i=0,n,s;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),i++,o):(e.exit("codeTextSequence"),l(h))}function l(h){return h===null?r(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),l):h===96?(s=e.enter("codeTextSequence"),n=0,u(h)):Zt(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||Zt(h)?(e.exit("codeTextData"),l(h)):(e.consume(h),c)}function u(h){return h===96?(e.consume(h),n++,u):n===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",c(h))}}class pJ{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,r,i){const n=r||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return i&&wo(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),wo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),wo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);wo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);wo(this.left,r.reverse())}}}function wo(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function SL(e){const t={};let r=-1,i,n,s,a,o,l,c;const u=new pJ(e);for(;++r<u.length;){for(;r in t;)r=t[r];if(i=u.get(r),r&&i[1].type==="chunkFlow"&&u.get(r-1)[1].type==="listItemPrefix"&&(l=i[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,gJ(u,r)),r=t[r],c=!0);else if(i[1]._container){for(s=r,n=void 0;s--;)if(a=u.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(n&&(u.get(n)[1].type="lineEndingBlank"),a[1].type="lineEnding",n=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;n&&(i[1].end={...u.get(n)[1].start},o=u.slice(n,r),o.unshift(i),u.splice(n,r-n+1,o))}}return pi(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function gJ(e,t){const r=e.get(t)[1],i=e.get(t)[2];let n=t-1;const s=[];let a=r._tokenizer;a||(a=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],c={};let u,h,f=-1,d=r,p=0,g=0;const b=[g];for(;d;){for(;e.get(++n)[1]!==d;);s.push(n),d._tokenizer||(u=i.sliceStream(d),d.next||u.push(null),h&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=d,d=d.next}for(d=r;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(g=f+1,b.push(g),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):b.pop(),f=b.length;f--;){const m=o.slice(b[f],b[f+1]),_=s.pop();l.push([_,_+m.length-1]),e.splice(_,2,m)}for(l.reverse(),f=-1;++f<l.length;)c[p+l[f][0]]=p+l[f][1],p+=l[f][1]-l[f][0]-1;return c}const mJ={resolve:yJ,tokenize:xJ},bJ={partial:!0,tokenize:CJ};function yJ(e){return SL(e),e}function xJ(e,t){let r;return i;function i(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),n(o)}function n(o){return o===null?s(o):Zt(o)?e.check(bJ,a,s)(o):(e.consume(o),n)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,n}}function CJ(e,t,r){const i=this;return n;function n(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_e(e,s,"linePrefix")}function s(a){if(a===null||Zt(a))return r(a);const o=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,r,t)(a)}}function AL(e,t,r,i,n,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return h;function h(m){return m===60?(e.enter(i),e.enter(n),e.enter(s),e.consume(m),e.exit(s),f):m===null||m===32||m===41||Gu(m)?r(m):(e.enter(i),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),g(m))}function f(m){return m===62?(e.enter(s),e.consume(m),e.exit(s),e.exit(n),e.exit(i),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(o),f(m)):m===null||m===60||Zt(m)?r(m):(e.consume(m),m===92?p:d)}function p(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function g(m){return!u&&(m===null||m===41||Ae(m))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(i),t(m)):u<c&&m===40?(e.consume(m),u++,g):m===41?(e.consume(m),u--,g):m===null||m===32||m===40||Gu(m)?r(m):(e.consume(m),m===92?b:g)}function b(m){return m===40||m===41||m===92?(e.consume(m),g):g(m)}}function vL(e,t,r,i,n,s){const a=this;let o=0,l;return c;function c(d){return e.enter(i),e.enter(n),e.consume(d),e.exit(n),e.enter(s),u}function u(d){return o>999||d===null||d===91||d===93&&!l||d===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):d===93?(e.exit(s),e.enter(n),e.consume(d),e.exit(n),e.exit(i),t):Zt(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),h(d))}function h(d){return d===null||d===91||d===93||Zt(d)||o++>999?(e.exit("chunkString"),u(d)):(e.consume(d),l||(l=!he(d)),d===92?f:h)}function f(d){return d===91||d===92||d===93?(e.consume(d),o++,h):h(d)}}function LL(e,t,r,i,n,s){let a;return o;function o(f){return f===34||f===39||f===40?(e.enter(i),e.enter(n),e.consume(f),e.exit(n),a=f===40?41:f,l):r(f)}function l(f){return f===a?(e.enter(n),e.consume(f),e.exit(n),e.exit(i),t):(e.enter(s),c(f))}function c(f){return f===a?(e.exit(s),l(a)):f===null?r(f):Zt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),_e(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===a||f===null||Zt(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?h:u)}function h(f){return f===a||f===92?(e.consume(f),u):u(f)}}function ol(e,t){let r;return i;function i(n){return Zt(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),r=!0,i):he(n)?_e(e,i,r?"linePrefix":"lineSuffix")(n):t(n)}}const _J={name:"definition",tokenize:TJ},kJ={partial:!0,tokenize:EJ};function TJ(e,t,r){const i=this;let n;return s;function s(d){return e.enter("definition"),a(d)}function a(d){return vL.call(i,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function o(d){return n=fi(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):r(d)}function l(d){return Ae(d)?ol(e,c)(d):c(d)}function c(d){return AL(e,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(kJ,h,h)(d)}function h(d){return he(d)?_e(e,f,"whitespace")(d):f(d)}function f(d){return d===null||Zt(d)?(e.exit("definition"),i.parser.defined.push(n),t(d)):r(d)}}function EJ(e,t,r){return i;function i(o){return Ae(o)?ol(e,n)(o):r(o)}function n(o){return LL(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return he(o)?_e(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Zt(o)?t(o):r(o)}}const wJ={name:"hardBreakEscape",tokenize:SJ};function SJ(e,t,r){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),n}function n(s){return Zt(s)?(e.exit("hardBreakEscape"),t(s)):r(s)}}const AJ={name:"headingAtx",resolve:vJ,tokenize:LJ};function vJ(e,t){let r=e.length-2,i=3;if(e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i){const n={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},s={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"};pi(e,i,r-i+1,[["enter",n,t],["enter",s,t],["exit",s,t],["exit",n,t]])}return e}function LJ(e,t,r){let i=0;return n;function n(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&i++<6?(e.consume(u),a):u===null||Ae(u)?(e.exit("atxHeadingSequence"),o(u)):r(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Zt(u)?(e.exit("atxHeading"),t(u)):he(u)?_e(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||Ae(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const IJ={concrete:!0,name:"htmlFlow",resolveTo:RJ,tokenize:OJ},BJ={partial:!0,tokenize:NJ};function RJ(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function OJ(e,t,r){const i=this;let n,s,a,o,l;return c;function c(P){return u(P)}function u(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),h}function h(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),s=!0,g):P===63?(e.consume(P),n=3,i.interrupt?t:A):wr(P)?(e.consume(P),a=String.fromCharCode(P),b):r(P)}function f(P){return P===45?(e.consume(P),n=2,d):P===91?(e.consume(P),n=5,o=0,p):wr(P)?(e.consume(P),n=4,i.interrupt?t:A):r(P)}function d(P){return P===45?(e.consume(P),i.interrupt?t:A):r(P)}function p(P){const Rt="CDATA[";return P===Rt.charCodeAt(o++)?(e.consume(P),o===Rt.length?i.interrupt?t:X:p):r(P)}function g(P){return wr(P)?(e.consume(P),a=String.fromCharCode(P),b):r(P)}function b(P){if(P===null||P===47||P===62||Ae(P)){const Rt=P===47,Tt=a.toLowerCase();return!Rt&&!s&&zC.includes(Tt)?(n=1,i.interrupt?t(P):X(P)):xZ.includes(a.toLowerCase())?(n=6,Rt?(e.consume(P),m):i.interrupt?t(P):X(P)):(n=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(P):s?_(P):k(P))}return P===45||br(P)?(e.consume(P),a+=String.fromCharCode(P),b):r(P)}function m(P){return P===62?(e.consume(P),i.interrupt?t:X):r(P)}function _(P){return he(P)?(e.consume(P),_):O(P)}function k(P){return P===47?(e.consume(P),O):P===58||P===95||wr(P)?(e.consume(P),T):he(P)?(e.consume(P),k):O(P)}function T(P){return P===45||P===46||P===58||P===95||br(P)?(e.consume(P),T):E(P)}function E(P){return P===61?(e.consume(P),S):he(P)?(e.consume(P),E):k(P)}function S(P){return P===null||P===60||P===61||P===62||P===96?r(P):P===34||P===39?(e.consume(P),l=P,B):he(P)?(e.consume(P),S):L(P)}function B(P){return P===l?(e.consume(P),l=null,W):P===null||Zt(P)?r(P):(e.consume(P),B)}function L(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Ae(P)?E(P):(e.consume(P),L)}function W(P){return P===47||P===62||he(P)?k(P):r(P)}function O(P){return P===62?(e.consume(P),$):r(P)}function $(P){return P===null||Zt(P)?X(P):he(P)?(e.consume(P),$):r(P)}function X(P){return P===45&&n===2?(e.consume(P),N):P===60&&n===1?(e.consume(P),q):P===62&&n===4?(e.consume(P),Et):P===63&&n===3?(e.consume(P),A):P===93&&n===5?(e.consume(P),tt):Zt(P)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(BJ,kt,G)(P)):P===null||Zt(P)?(e.exit("htmlFlowData"),G(P)):(e.consume(P),X)}function G(P){return e.check(mg,H,kt)(P)}function H(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),M}function M(P){return P===null||Zt(P)?G(P):(e.enter("htmlFlowData"),X(P))}function N(P){return P===45?(e.consume(P),A):X(P)}function q(P){return P===47?(e.consume(P),a="",V):X(P)}function V(P){if(P===62){const Rt=a.toLowerCase();return zC.includes(Rt)?(e.consume(P),Et):X(P)}return wr(P)&&a.length<8?(e.consume(P),a+=String.fromCharCode(P),V):X(P)}function tt(P){return P===93?(e.consume(P),A):X(P)}function A(P){return P===62?(e.consume(P),Et):P===45&&n===2?(e.consume(P),A):X(P)}function Et(P){return P===null||Zt(P)?(e.exit("htmlFlowData"),kt(P)):(e.consume(P),Et)}function kt(P){return e.exit("htmlFlow"),t(P)}}function NJ(e,t,r){return i;function i(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(Gl,t,r)}}const DJ={name:"htmlText",tokenize:PJ};function PJ(e,t,r){const i=this;let n,s,a;return o;function o(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),l}function l(A){return A===33?(e.consume(A),c):A===47?(e.consume(A),E):A===63?(e.consume(A),k):wr(A)?(e.consume(A),L):r(A)}function c(A){return A===45?(e.consume(A),u):A===91?(e.consume(A),s=0,p):wr(A)?(e.consume(A),_):r(A)}function u(A){return A===45?(e.consume(A),d):r(A)}function h(A){return A===null?r(A):A===45?(e.consume(A),f):Zt(A)?(a=h,q(A)):(e.consume(A),h)}function f(A){return A===45?(e.consume(A),d):h(A)}function d(A){return A===62?N(A):A===45?f(A):h(A)}function p(A){const Et="CDATA[";return A===Et.charCodeAt(s++)?(e.consume(A),s===Et.length?g:p):r(A)}function g(A){return A===null?r(A):A===93?(e.consume(A),b):Zt(A)?(a=g,q(A)):(e.consume(A),g)}function b(A){return A===93?(e.consume(A),m):g(A)}function m(A){return A===62?N(A):A===93?(e.consume(A),m):g(A)}function _(A){return A===null||A===62?N(A):Zt(A)?(a=_,q(A)):(e.consume(A),_)}function k(A){return A===null?r(A):A===63?(e.consume(A),T):Zt(A)?(a=k,q(A)):(e.consume(A),k)}function T(A){return A===62?N(A):k(A)}function E(A){return wr(A)?(e.consume(A),S):r(A)}function S(A){return A===45||br(A)?(e.consume(A),S):B(A)}function B(A){return Zt(A)?(a=B,q(A)):he(A)?(e.consume(A),B):N(A)}function L(A){return A===45||br(A)?(e.consume(A),L):A===47||A===62||Ae(A)?W(A):r(A)}function W(A){return A===47?(e.consume(A),N):A===58||A===95||wr(A)?(e.consume(A),O):Zt(A)?(a=W,q(A)):he(A)?(e.consume(A),W):N(A)}function O(A){return A===45||A===46||A===58||A===95||br(A)?(e.consume(A),O):$(A)}function $(A){return A===61?(e.consume(A),X):Zt(A)?(a=$,q(A)):he(A)?(e.consume(A),$):W(A)}function X(A){return A===null||A===60||A===61||A===62||A===96?r(A):A===34||A===39?(e.consume(A),n=A,G):Zt(A)?(a=X,q(A)):he(A)?(e.consume(A),X):(e.consume(A),H)}function G(A){return A===n?(e.consume(A),n=void 0,M):A===null?r(A):Zt(A)?(a=G,q(A)):(e.consume(A),G)}function H(A){return A===null||A===34||A===39||A===60||A===61||A===96?r(A):A===47||A===62||Ae(A)?W(A):(e.consume(A),H)}function M(A){return A===47||A===62||Ae(A)?W(A):r(A)}function N(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):r(A)}function q(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),V}function V(A){return he(A)?_e(e,tt,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):tt(A)}function tt(A){return e.enter("htmlTextData"),a(A)}}const z0={name:"labelEnd",resolveAll:HJ,resolveTo:zJ,tokenize:UJ},MJ={tokenize:qJ},FJ={tokenize:WJ},$J={tokenize:jJ};function HJ(e){let t=-1;const r=[];for(;++t<e.length;){const i=e[t][1];if(r.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const n=i.type==="labelImage"?4:2;i.type="data",t+=n}}return e.length!==r.length&&pi(e,0,e.length,r),e}function zJ(e,t){let r=e.length,i=0,n,s,a;for(;r--;){const u=e[r][1];if(n){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;e[r][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(s){if(e[r][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(n=r,u.type!=="labelLink")){i=2;break}}else u.type==="labelEnd"&&(s=r)}const o={type:e[n][1].type==="labelLink"?"link":"image",start:{...e[n][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[n][1].start},end:{...e[s][1].end}},c={type:"labelText",start:{...e[n+i+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",o,t],["enter",l,t]],a=Xr(a,e.slice(n+1,n+i+3)),a=Xr(a,[["enter",c,t]]),a=Xr(a,Vh(t.parser.constructs.insideSpan.null,e.slice(n+i+4,s-3),t)),a=Xr(a,[["exit",c,t],e[s-2],e[s-1],["exit",l,t]]),a=Xr(a,e.slice(s+1)),a=Xr(a,[["exit",o,t]]),pi(e,n,e.length,a),e}function UJ(e,t,r){const i=this,n=i._labelStarts;let s,a;if(n){for(;n.length>0&&n[n.length-1]._balanced;)n.pop();s=n[n.length-1]}return o;function o(f){return s?s._inactive?h(f):(a=i.parser.defined.includes(fi(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(MJ,u,a?u:h)(f):f===91?e.attempt(FJ,u,a?c:h)(f):a?u(f):h(f)}function c(f){return e.attempt($J,u,h)(f)}function u(f){return n.pop(),t(f)}function h(f){return s._balanced=!0,r(f)}}function qJ(e,t,r){return i;function i(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),n}function n(h){return Ae(h)?ol(e,s)(h):s(h)}function s(h){return h===41?u(h):AL(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Ae(h)?ol(e,l)(h):u(h)}function o(h){return r(h)}function l(h){return h===34||h===39||h===40?LL(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):u(h)}function c(h){return Ae(h)?ol(e,u)(h):u(h)}function u(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):r(h)}}function WJ(e,t,r){const i=this;return n;function n(o){return vL.call(i,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return i.parser.defined.includes(fi(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function a(o){return r(o)}}function jJ(e,t,r){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),n}function n(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):r(s)}}const VJ={name:"labelStartImage",resolveAll:z0.resolveAll,tokenize:GJ};function GJ(e,t,r){const i=this;let n;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),n=e.exit("labelImage"),o):r(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(l):(i._labelStarts=i._labelStarts||[],i._labelStarts.push(n),t(l))}}const YJ={name:"labelStartLink",resolveAll:z0.resolveAll,tokenize:XJ};function XJ(e,t,r){const i=this;let n;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),n=e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(o):(i._labelStarts=i._labelStarts||[],i._labelStarts.push(n),t(o))}}const $f={name:"lineEnding",tokenize:KJ};function KJ(e,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),_e(e,t,"linePrefix")}}const eu={name:"thematicBreak",tokenize:QJ};function QJ(e,t,r){let i=0,n;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return n=c,o(c)}function o(c){return c===n?(e.enter("thematicBreakSequence"),l(c)):i>=3&&(c===null||Zt(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===n?(e.consume(c),i++,l):(e.exit("thematicBreakSequence"),he(c)?_e(e,o,"whitespace")(c):o(c))}}const Nr={continuation:{tokenize:ett},exit:itt,name:"list",tokenize:ttt},ZJ={partial:!0,tokenize:ntt},JJ={partial:!0,tokenize:rtt};function ttt(e,t,r){const i=this,n=i.events[i.events.length-1];let s=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,a=0;return o;function o(d){const p=i.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!i.containerState.marker||d===i.containerState.marker:fg(d)){if(i.containerState.type||(i.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(eu,r,c)(d):c(d);if(!i.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return r(d)}function l(d){return fg(d)&&++a<10?(e.consume(d),l):(!i.interrupt||a<2)&&(i.containerState.marker?d===i.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):r(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||d,e.check(Gl,i.interrupt?r:u,e.attempt(ZJ,f,h))}function u(d){return i.containerState.initialBlankLine=!0,s++,f(d)}function h(d){return he(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):r(d)}function f(d){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function ett(e,t,r){const i=this;return i.containerState._closeFlow=void 0,e.check(Gl,n,s);function n(o){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,_e(e,t,"listItemIndent",i.containerState.size+1)(o)}function s(o){return i.containerState.furtherBlankLines||!he(o)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(o)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(JJ,t,a)(o))}function a(o){return i.containerState._closeFlow=!0,i.interrupt=void 0,_e(e,e.attempt(Nr,t,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function rtt(e,t,r){const i=this;return _e(e,n,"listItemIndent",i.containerState.size+1);function n(s){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(s):r(s)}}function itt(e){e.exit(this.containerState.type)}function ntt(e,t,r){const i=this;return _e(e,n,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(s){const a=i.events[i.events.length-1];return!he(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):r(s)}}let Xu=class{constructor(){this.index=new Map,this.map=[]}add(t,r,i){YC(this,t,r,i,!1)}addBefore(t,r,i){YC(this,t,r,i,!0)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];i.push(t.slice()),t.length=0;let n=i.pop();for(;n;){for(const s of n)t.push(s);n=i.pop()}this.map.length=0,this.index.clear()}};function YC(e,t,r,i,n){if(r===0&&i.length===0)return;const s=e.index.get(t);if(s){s[1]+=r,n?(i.push(...s[2]),s[2]=i):s[2].push(...i);return}const a=[t,r,i];e.map.push(a),e.index.set(t,a)}const XC={name:"setextUnderline",resolveTo:stt,tokenize:att};function stt(e,t){const r=new Xu;let i=e.length,n,s,a;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){n=i;break}e[i][1].type==="paragraph"&&(s=i)}else e[i][1].type==="content"&&r.add(i,1,[]),!a&&e[i][1].type==="definition"&&(a=i);const o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(r.add(s,0,[["enter",o,t]]),r.add(a+1,0,[["exit",e[n][1],t]]),e[n][1].end={...e[a][1].end}):e[n][1]=o,r.add(e.length,0,[["exit",o,t]]),r.consume(e),e}function att(e,t,r){const i=this;let n;return s;function s(c){let u=i.events.length,h;for(;u--;)if(i.events[u][1].type!=="lineEnding"&&i.events[u][1].type!=="linePrefix"&&i.events[u][1].type!=="content"){h=i.events[u][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||h)?(e.enter("setextHeadingLine"),n=c,a(c)):r(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===n?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),he(c)?_e(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Zt(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}const ott={tokenize:gtt,partial:!0};function ltt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dtt,continuation:{tokenize:ftt},exit:ptt}},text:{91:{name:"gfmFootnoteCall",tokenize:htt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ctt,resolveTo:utt}}}}function ctt(e,t,r){const i=this;let n=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;n--;){const l=i.events[n][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return r(l);const c=fi(i.sliceSerialize({start:a.end,end:i.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function utt(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},n={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};n.end.column++,n.end.offset++,n.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},n.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",n,t],["exit",n,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...o),e}function htt(e,t,r){const i=this,n=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,a;return o;function o(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?r(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(s>999||h===93&&!a||h===null||h===91||Ae(h))return r(h);if(h===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return n.includes(fi(i.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(h)}return Ae(h)||(a=!0),s++,e.consume(h),h===92?u:c}function u(h){return h===91||h===92||h===93?(e.consume(h),s++,c):c(h)}}function dtt(e,t,r){const i=this,n=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(p)}function u(p){if(a>999||p===93&&!o||p===null||p===91||Ae(p))return r(p);if(p===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return s=fi(i.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Ae(p)||(o=!0),a++,e.consume(p),p===92?h:u}function h(p){return p===91||p===92||p===93?(e.consume(p),a++,u):u(p)}function f(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),n.includes(s)||n.push(s),_e(e,d,"gfmFootnoteDefinitionWhitespace")):r(p)}function d(p){return t(p)}}function ftt(e,t,r){return e.check(Gl,t,e.attempt(ott,t,r))}function ptt(e){e.exit("gfmFootnoteDefinition")}function gtt(e,t,r){const i=this;return _e(e,n,"gfmFootnoteDefinitionIndent",5);function n(s){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):r(s)}}function mtt(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:n};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function n(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},h={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},f=[["enter",u,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",h,o]],d=o.parser.constructs.insideSpan.null;d&&pi(f,f.length,0,Vh(d,a.slice(c+1,l),o)),pi(f,f.length,0,[["exit",h,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",u,o]]),pi(a,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,u=this.events;let h=0;return f;function f(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(a.enter("strikethroughSequenceTemporary"),d(p))}function d(p){const g=Yu(c);if(p===126)return h>1?l(p):(a.consume(p),h++,d);if(h<2&&!r)return l(p);const b=a.exit("strikethroughSequenceTemporary"),m=Yu(p);return b._open=!m||m===2&&!!g,b._close=!g||g===2&&!!m,o(p)}}}class btt{constructor(){this.map=[],this.index=new Map}add(t,r,i){ytt(this,t,r,i)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];i.push(t.slice()),t.length=0;let n=i.pop();for(;n;){for(const s of n)t.push(s);n=i.pop()}this.map.length=0,this.index.clear()}}function ytt(e,t,r,i){if(r===0&&i.length===0)return;const n=e.index.get(t);if(n){n[1]+=r,n[2].push(...i);return}const s=[t,r,i];e.map.push(s),e.index.set(t,s)}function xtt(e,t){let r=!1;const i=[];for(;t<e.length;){const n=e[t];if(r){if(n[0]==="enter")n[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(n[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(n[1].type==="tableDelimiterRow")break}else n[0]==="enter"&&n[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return i}function Ctt(){return{flow:{null:{name:"table",tokenize:_tt,resolveAll:ktt}}}}function _tt(e,t,r){const i=this;let n=0,s=0,a;return o;function o(O){let $=i.events.length-1;for(;$>-1;){const{type:H}=i.events[$][1];if(H==="lineEnding"||H==="linePrefix")$--;else break}const X=$>-1?i.events[$][1].type:null,G=X==="tableHead"||X==="tableRow"?S:l;return G===S&&i.parser.lazy[i.now().line]?r(O):G(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(a=!0,s+=1),u(O)}function u(O){return O===null?r(O):Zt(O)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),d):r(O):he(O)?_e(e,u,"whitespace")(O):(s+=1,a&&(a=!1,n+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),h(O)))}function h(O){return O===null||O===124||Ae(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?f:h)}function f(O){return O===92||O===124?(e.consume(O),h):h(O)}function d(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(O):(e.enter("tableDelimiterRow"),a=!1,he(O)?_e(e,p,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):p(O))}function p(O){return O===45||O===58?b(O):O===124?(a=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),g):E(O)}function g(O){return he(O)?_e(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),m):O===45?(s+=1,m(O)):O===null||Zt(O)?T(O):E(O)}function m(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):E(O)}function _(O){return O===45?(e.consume(O),_):O===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(O))}function k(O){return he(O)?_e(e,T,"whitespace")(O):T(O)}function T(O){return O===124?p(O):O===null||Zt(O)?!a||n!==s?E(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):E(O)}function E(O){return r(O)}function S(O){return e.enter("tableRow"),B(O)}function B(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),B):O===null||Zt(O)?(e.exit("tableRow"),t(O)):he(O)?_e(e,B,"whitespace")(O):(e.enter("data"),L(O))}function L(O){return O===null||O===124||Ae(O)?(e.exit("data"),B(O)):(e.consume(O),O===92?W:L)}function W(O){return O===92||O===124?(e.consume(O),L):L(O)}}function ktt(e,t){let r=-1,i=!0,n=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,u,h;const f=new btt;for(;++r<e.length;){const d=e[r],p=d[1];d[0]==="enter"?p.type==="tableHead"?(o=!1,l!==0&&(KC(f,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(r,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(i=!0,h=void 0,s=[0,0,0,0],a=[0,r+1,0,0],o&&(o=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(r,0,[["enter",u,t]])),n=p.type==="tableDelimiterRow"?2:u?3:1):n&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],h=Sc(f,t,s,n,void 0,h),s=[0,0,0,0]),a[2]=r)):p.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(a[0]=a[1],h=Sc(f,t,s,n,void 0,h)),s=a,a=[s[1],r,0,0])):p.type==="tableHead"?(o=!0,l=r):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=r,s[1]!==0?(a[0]=a[1],h=Sc(f,t,s,n,r,h)):a[1]!==0&&(h=Sc(f,t,a,n,r,h)),n=0):n&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(a[3]=r)}for(l!==0&&KC(f,t,l,c,u),f.consume(t.events),r=-1;++r<t.events.length;){const d=t.events[r];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=xtt(t.events,r))}return e}function Sc(e,t,r,i,n,s){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(s.end=Object.assign({},aa(t.events,r[0])),e.add(r[0],0,[["exit",s,t]]));const l=aa(t.events,r[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",s,t]]),r[2]!==0){const c=aa(t.events,r[2]),u=aa(t.events,r[3]),h={type:o,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(r[2],0,[["enter",h,t]]),i!==2){const f=t.events[r[2]],d=t.events[r[3]];if(f[1].end=Object.assign({},d[1].end),f[1].type="chunkText",f[1].contentType="text",r[3]>r[2]+1){const p=r[2]+1,g=r[3]-r[2]-1;e.add(p,g,[])}}e.add(r[3]+1,0,[["exit",h,t]])}return n!==void 0&&(s.end=Object.assign({},aa(t.events,n)),e.add(n,0,[["exit",s,t]]),s=void 0),s}function KC(e,t,r,i,n){const s=[],a=aa(t.events,r);n&&(n.end=Object.assign({},a),s.push(["exit",n,t])),i.end=Object.assign({},a),s.push(["exit",i,t]),e.add(r+1,0,s)}function aa(e,t){const r=e[t],i=r[0]==="enter"?"start":"end";return r[1][i]}const Ttt={name:"tasklistCheck",tokenize:wtt};function Ett(){return{text:{91:Ttt}}}function wtt(e,t,r){const i=this;return n;function n(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Ae(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):r(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(l)}function o(l){return Zt(l)?t(l):he(l)?e.check({tokenize:Stt},t,r)(l):r(l)}}function Stt(e,t,r){return _e(e,i,"whitespace");function i(n){return n===null?r(n):t(n)}}function Att(e){return fL([HZ(),ltt(),mtt(e),Ctt(),Ett()])}const vtt={};function Ltt(e){const t=this,r=e||vtt,i=t.data(),n=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);n.push(Att(r)),s.push(NZ()),a.push(DZ(r))}var Itt=Object.defineProperty,Btt=Object.defineProperties,Rtt=Object.getOwnPropertyDescriptors,QC=Object.getOwnPropertySymbols,Ott=Object.prototype.hasOwnProperty,Ntt=Object.prototype.propertyIsEnumerable,ZC=(e,t,r)=>t in e?Itt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,IL=(e,t)=>{for(var r in t||(t={}))Ott.call(t,r)&&ZC(e,r,t[r]);if(QC)for(var r of QC(t))Ntt.call(t,r)&&ZC(e,r,t[r]);return e},BL=(e,t)=>Btt(e,Rtt(t)),Dtt=e=>{let t=new Uint8Array(e.length+1),r=!1,i=!1,n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){let s=r||i?1:0;t[n+1]=s,t[n+2]=s,n+=2;continue}if(e.substring(n,n+3)==="```"){i=!i;let s=r||i?1:0,a=Math.min(n+3,e.length);for(let o=n+1;o<=a;o+=1)t[o]=s;n=a;continue}!i&&e[n]==="`"&&(r=!r),t[n+1]=r||i?1:0,n+=1}return t},JC=null,vr=(e,t)=>{let r=JC;return(r===null||r.text!==e)&&(r={text:e,lookup:Dtt(e)},JC=r),r.lookup[Math.min(t,e.length)]===1},Ptt=(e,t)=>{let r=e.substring(t,t+3)==="```",i=t>0&&e.substring(t-1,t+2)==="```",n=t>1&&e.substring(t-2,t+1)==="```";return r||i||n},Mtt=e=>{let t=0;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"&&r+1<e.length&&e[r+1]==="`"){r+=1;continue}e[r]==="`"&&!Ptt(e,r)&&(t+=1)}return t},qn=(e,t)=>{let r=!1,i=!1,n=-1;for(let s=0;s<e.length;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){i=!i,s+=2;continue}if(!i&&e[s]==="`")if(r){if(n<t&&t<s)return!0;r=!1,n=-1}else r=!0,n=s}return!1},Ftt=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,$tt=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Ftt,(t,r,i,n)=>vr(e,n)?t:`${r}\\>${i}`),Htt=/(\*\*)([^*]*\*?)$/,ztt=/(__)([^_]*?)$/,Utt=/(\*\*\*)([^*]*?)$/,qtt=/(\*)([^*]*?)$/,Wtt=/(_)([^_]*?)$/,jtt=/(`)([^`]*?)$/,Vtt=/(~~)([^~]*?)$/,Fs=/^[\s_~*`]*$/,RL=/^[\s]*[-*+][\s]+$/,Gtt=/[\p{L}\p{N}_]/u,Ytt=/^```[^`\n]*```?$/,Xtt=/^\*{4,}$/,Ktt=/(__)([^_]+)_$/,Qtt=/(~~)([^~]+)~$/,t_=/~~/g,hn=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Gtt.test(e)},Ztt=(e,t)=>{let r=1;for(let i=t-1;i>=0;i-=1)if(e[i]==="]")r+=1;else if(e[i]==="["&&(r-=1,r===0))return i;return-1},OL=(e,t)=>{let r=1;for(let i=t+1;i<e.length;i+=1)if(e[i]==="[")r+=1;else if(e[i]==="]"&&(r-=1,r===0))return i;return-1},Jtt=e=>e==="inlineLatex"||e==="blockLatex",tet=(e,t)=>t==="["&&e==="none"?"blockLatex":t==="]"&&e==="blockLatex"?"none":t==="("&&e==="none"?"inlineLatex":t===")"&&e==="inlineLatex"?"none":null,eet=(e,t)=>t?e==="blockDollar"?"none":"blockDollar":e==="blockDollar"?e:e==="inlineDollar"?"none":"inlineDollar",Gh=(e,t)=>{let r="none";for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}if(e[i]==="\\"){let n=tet(r,e[i+1]);if(n!==null){r=n,i+=1;continue}}if(e[i]==="$"&&!Jtt(r)){let n=e[i+1]==="$";r=eet(r,n),n&&(i+=1)}}return r!=="none"},ret=(e,t)=>{for(let r=t;r<e.length;r+=1){if(e[r]===")")return!0;if(e[r]===`
485
- `)return!1}return!1},NL=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===")")return!1;if(e[r]==="(")return r>0&&e[r-1]==="]"?ret(e,t):!1;if(e[r]===`
486
- `)return!1}return!1},iet=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===">")return!1;if(e[r]==="<"){let i=r+1<e.length?e[r+1]:"";return i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="/"}if(e[r]===`
487
- `)return!1}return!1},U0=(e,t,r)=>{let i=0;for(let l=t-1;l>=0;l-=1)if(e[l]===`
488
- `){i=l+1;break}let n=e.length;for(let l=t;l<e.length;l+=1)if(e[l]===`
489
- `){n=l;break}let s=e.substring(i,n),a=0,o=!1;for(let l of s)if(l===r)a+=1;else if(l!==" "&&l!==" "){o=!0;break}return a>=3&&!o},DL=e=>e.includes("$")||e.includes("\\(")||e.includes("\\["),net=(e,t,r,i)=>r==="\\"||DL(e)&&Gh(e,t)?!0:r!=="*"&&i==="*"?(t<e.length-2?e[t+2]:"")!=="*":r==="*"||(!r||r===" "||r===" "||r===`
490
- `)&&(!i||i===" "||i===" "||i===`
491
- `),Ku=e=>e===" "||e===" "||e===`
492
- `,set=(e,t)=>!!(e&&t&&hn(e)&&hn(t)),aet=(e,t,r,i)=>{let n=set(e,t),s=!!t&&!Ku(t),a=!!e&&!Ku(e);return n&&r%2===0&&!i?{count:!1}:a&&r%2===1||s?{count:!0,inWordAsteriskChain:n}:{count:!1}},PL=e=>{let t=0,r=!1,i=!1,n=e.length;for(let s=0;s<n;s+=1){if(e[s]==="`"&&s+2<n&&e[s+1]==="`"&&e[s+2]==="`"){r=!r,s+=2;continue}if(r)continue;if(e[s]!=="*"){hn(e[s])||(i=!1);continue}let a=s>0?e[s-1]:"",o=s<n-1?e[s+1]:"";if(net(e,s,a,o))continue;let l=aet(a,o,t,i);l.count&&(t+=1,i=l.inWordAsteriskChain)}return t},oet=(e,t,r,i)=>!!(r==="\\"||DL(e)&&Gh(e,t)||NL(e,t)||iet(e,t)||r==="_"||i==="_"||r&&i&&hn(r)&&hn(i)),cet=e=>{let t=0,r=!1,i=e.length;for(let n=0;n<i;n+=1){if(e[n]==="`"&&n+2<i&&e[n+1]==="`"&&e[n+2]==="`"){r=!r,n+=2;continue}if(r||e[n]!=="_")continue;let s=n>0?e[n-1]:"",a=n<i-1?e[n+1]:"";oet(e,n,s,a)||(t+=1)}return t},uet=e=>{let t=0,r=0,i=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){r>=3&&(t+=Math.floor(r/3)),r=0,i=!i,n+=2;continue}i||(e[n]==="*"?r+=1:(r>=3&&(t+=Math.floor(r/3)),r=0))}return r>=3&&(t+=Math.floor(r/3)),t},q0=e=>{let t=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){r=!r,i+=2;continue}r||e[i]==="*"&&i+1<e.length&&e[i+1]==="*"&&(t+=1,i+=1)}return t},e_=e=>{let t=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){r=!r,i+=2;continue}r||e[i]==="_"&&i+1<e.length&&e[i+1]==="_"&&(t+=1,i+=1)}return t},het=(e,t,r)=>{if(!t||Fs.test(t))return!0;let i=e.substring(0,r).lastIndexOf(`
493
- `),n=i===-1?0:i+1,s=e.substring(n,r);return RL.test(s)&&t.includes(`
494
- `)?!0:U0(e,r,"*")},det=e=>{let t=e.match(Htt);if(!t)return e;let r=t[2],i=e.lastIndexOf(t[1]);return vr(e,i)||qn(e,i)||het(e,r,i)?e:q0(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},fet=(e,t,r)=>{if(!t||Fs.test(t))return!0;let i=e.substring(0,r).lastIndexOf(`
495
- `),n=i===-1?0:i+1,s=e.substring(n,r);return RL.test(s)&&t.includes(`
496
- `)?!0:U0(e,r,"_")},pet=e=>{let t=e.match(ztt);if(!t){let n=e.match(Ktt);if(n){let s=e.lastIndexOf(n[1]);if(!(vr(e,s)||qn(e,s))&&e_(e)%2===1)return`${e}_`}return e}let r=t[2],i=e.lastIndexOf(t[1]);return vr(e,i)||qn(e,i)||fet(e,r,i)?e:e_(e)%2===1?`${e}__`:e},get=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}if(!t&&e[r]==="*"&&e[r-1]!=="*"&&e[r+1]!=="*"&&e[r-1]!=="\\"&&!Gh(e,r)){let i=r>0?e[r-1]:"",n=r<e.length-1?e[r+1]:"",s=!i||Ku(i),a=!n||Ku(n);if(s&&a||i&&n&&hn(i)&&hn(n)||a)continue;return r}}return-1},met=e=>{if(!e.match(qtt))return e;let t=get(e);if(t===-1||vr(e,t)||qn(e,t))return e;let r=e.substring(t+1);return!r||Fs.test(r)?e:PL(e)%2===1?`${e}*`:e},ML=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}if(!t&&e[r]==="_"&&e[r-1]!=="_"&&e[r+1]!=="_"&&e[r-1]!=="\\"&&!Gh(e,r)&&!NL(e,r)){let i=r>0?e[r-1]:"",n=r<e.length-1?e[r+1]:"";if(i&&n&&hn(i)&&hn(n))continue;return r}}return-1},bet=e=>{let t=e.length;for(;t>0&&e[t-1]===`
497
- `;)t-=1;if(t<e.length){let r=e.slice(0,t),i=e.slice(t);return`${r}_${i}`}return`${e}_`},yet=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(q0(t)%2!==1)return null;let r=t.indexOf("**"),i=ML(t);return r!==-1&&i!==-1&&r<i?`${t}_**`:null},xet=e=>{if(!e.match(Wtt))return e;let t=ML(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||Fs.test(r)||vr(e,t)||qn(e,t))return e;if(cet(e)%2===1){let i=yet(e);return i!==null?i:bet(e)}return e},Cet=e=>{let t=q0(e),r=PL(e);return t%2===0&&r%2===0},_et=(e,t,r)=>!t||Fs.test(t)||vr(e,r)||qn(e,r)?!0:U0(e,r,"*"),ket=e=>{if(Xtt.test(e))return e;let t=e.match(Utt);if(!t)return e;let r=t[2],i=e.lastIndexOf(t[1]);return _et(e,r,i)?e:uet(e)%2===1?Cet(e)?e:`${e}***`:e},Tet=/<[a-zA-Z/][^>]*$/,Eet=e=>{let t=e.match(Tet);return!t||t.index===void 0||vr(e,t.index)?e:e.substring(0,t.index).trimEnd()},wet=e=>!e.match(Ytt)||e.includes(`
498
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Aet=e=>(e.match(/```/g)||[]).length%2===1,vet=e=>{let t=wet(e);if(t!==null)return t;let r=e.match(jtt);if(r&&!Aet(e)){let i=r[2];if(!i||Fs.test(i))return e;if(Mtt(e)%2===1)return`${e}\``}return e},FL=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",Let=e=>{let t=0,r=!1;for(let i=0;i<e.length-1;i+=1)e[i]==="`"&&!FL(e,i)&&(r=!r),!r&&e[i]==="$"&&e[i+1]==="$"&&(t+=1,i+=1);return t},Iet=e=>{let t=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="\\"){i+=1;continue}if(e[i]==="`"&&!FL(e,i)){r=!r;continue}!r&&e[i]==="$"&&(i+1<e.length&&e[i+1]==="$"?i+=1:t+=1)}return t},Bet=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
499
- `,t)!==-1&&!e.endsWith(`
500
- `)?`${e}
501
- $$`:`${e}$$`},Ret=e=>Let(e)%2===0?e:Bet(e),Oet=e=>Iet(e)%2===1?`${e}$`:e,Net=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let i=Ztt(e,t);if(i===-1||vr(e,i))return null;let n=i>0&&e[i-1]==="!",s=n?i-1:i,a=e.substring(0,s);if(n)return a;let o=e.substring(i+1,t);return r==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},r_=(e,t)=>{for(let r=0;r<t;r++)if(e[r]==="["&&!vr(e,r)){if(r>0&&e[r-1]==="!")continue;let i=OL(e,r);if(i===-1)return r;if(i+1<e.length&&e[i+1]==="("){let n=e.indexOf(")",i+2);n!==-1&&(r=n)}}return t},Det=(e,t,r)=>{let i=t>0&&e[t-1]==="!",n=i?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,n);if(i)return s;if(r==="text-only"){let a=r_(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(OL(e,t)===-1){let s=e.substring(0,n);if(i)return s;if(r==="text-only"){let a=r_(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},$L=(e,t="protocol")=>{let r=e.lastIndexOf("](");if(r!==-1&&!vr(e,r)){let i=Net(e,r,t);if(i!==null)return i}for(let i=e.length-1;i>=0;i-=1)if(e[i]==="["&&!vr(e,i)){let n=Det(e,i,t);if(n!==null)return n}return e},Pet=/^-{1,2}$/,Met=/^[\s]*-{1,2}[\s]+$/,Fet=/^={1,2}$/,$et=/^[\s]*={1,2}[\s]+$/,Het=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
502
- `);if(t===-1)return e;let r=e.substring(t+1),i=e.substring(0,t),n=r.trim();if(Pet.test(n)&&!r.match(Met)){let s=i.split(`
503
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(Fet.test(n)&&!r.match($et)){let s=i.split(`
504
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},zet=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,Uet=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(zet,(t,r,i)=>{let n=i+r.length;return vr(e,n)?t:`${r}\\~`}),qet=e=>{var t,r;let i=e.match(Vtt);if(i){let n=i[2];if(!n||Fs.test(n))return e;let s=e.lastIndexOf(i[1]);if(vr(e,s)||qn(e,s))return e;if(((t=e.match(t_))==null?void 0:t.length)%2===1)return`${e}~~`}else{let n=e.match(Qtt);if(n){let s=e.lastIndexOf(n[0].slice(0,2));if(vr(e,s)||qn(e,s))return e;if(((r=e.match(t_))==null?void 0:r.length)%2===1)return`${e}~`}}return e},Hf=e=>e!==!1,Wet=e=>e===!0,Er={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},jet=[{handler:{name:"singleTilde",handle:Uet,priority:Er.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:$tt,priority:Er.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:Eet,priority:Er.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Het,priority:Er.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:$L,priority:Er.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:ket,priority:Er.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:det,priority:Er.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:pet,priority:Er.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:met,priority:Er.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:xet,priority:Er.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:vet,priority:Er.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:qet,priority:Er.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:Ret,priority:Er.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:Oet,priority:Er.INLINE_KATEX},optionKey:"inlineKatex"}],Vet=e=>{var t;let r=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return jet.filter(({handler:i,optionKey:n})=>i.name==="links"?Hf(e==null?void 0:e.links)||Hf(e==null?void 0:e.images):i.name==="inlineKatex"?Wet(e==null?void 0:e.inlineKatex):Hf(e==null?void 0:e[n])).map(({handler:i,earlyReturn:n})=>i.name==="links"?{handler:BL(IL({},i),{handle:s=>$L(s,r)}),earlyReturn:r==="protocol"?n:void 0}:{handler:i,earlyReturn:n})},Get=(e,t)=>{var r;if(!e||typeof e!="string")return e;let i=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,n=Vet(t),s=((r=t==null?void 0:t.handlers)!=null?r:[]).map(o=>{var l;return{handler:BL(IL({},o),{priority:(l=o.priority)!=null?l:Er.DEFAULT}),earlyReturn:void 0}}),a=[...n,...s].sort((o,l)=>{var c,u;return((c=o.handler.priority)!=null?c:0)-((u=l.handler.priority)!=null?u:0)});for(let{handler:o,earlyReturn:l}of a)if(i=o.handle(i),l!=null&&l(i))return i;return i},Yet=Get;const Xet=(e,t)=>{const r=new Array(e.length+t.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<t.length;i++)r[e.length+i]=t[i];return r},Ket=(e,t)=>({classGroupId:e,validator:t}),HL=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Qu="-",i_=[],Qet="arbitrary..",Zet=e=>{const t=trt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Jet(a);const o=a.split(Qu),l=o[0]===""&&o.length>1?1:0;return zL(o,l,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=i[a],c=r[a];return l?c?Xet(c,l):l:c||i_}return r[a]||i_}}},zL=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const c=zL(e,t+1,s);if(c)return c}const a=r.validators;if(a===null)return;const o=t===0?e.join(Qu):e.slice(t).join(Qu),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(o))return u.classGroupId}},Jet=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),i=t.slice(0,r);return i?Qet+i:void 0})(),trt=e=>{const{theme:t,classGroups:r}=e;return ert(r,t)},ert=(e,t)=>{const r=HL();for(const i in e){const n=e[i];W0(n,r,i,t)}return r},W0=(e,t,r,i)=>{const n=e.length;for(let s=0;s<n;s++){const a=e[s];rrt(a,t,r,i)}},rrt=(e,t,r,i)=>{if(typeof e=="string"){irt(e,t,r);return}if(typeof e=="function"){nrt(e,t,r,i);return}srt(e,t,r,i)},irt=(e,t,r)=>{const i=e===""?t:UL(t,e);i.classGroupId=r},nrt=(e,t,r,i)=>{if(art(e)){W0(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push(Ket(r,e))},srt=(e,t,r,i)=>{const n=Object.entries(e),s=n.length;for(let a=0;a<s;a++){const[o,l]=n[a];W0(l,UL(t,o),r,i)}},UL=(e,t)=>{let r=e;const i=t.split(Qu),n=i.length;for(let s=0;s<n;s++){const a=i[s];let o=r.nextPart.get(a);o||(o=HL(),r.nextPart.set(a,o)),r=o}return r},art=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ort=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const n=(s,a)=>{r[s]=a,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=i[s])!==void 0)return n(s,a),a},set(s,a){s in r?r[s]=a:n(s,a)}}},bg="!",n_=":",lrt=[],s_=(e,t,r,i,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:n}),crt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=n=>{const s=[];let a=0,o=0,l=0,c;const u=n.length;for(let g=0;g<u;g++){const b=n[g];if(a===0&&o===0){if(b===n_){s.push(n.slice(l,g)),l=g+1;continue}if(b==="/"){c=g;continue}}b==="["?a++:b==="]"?a--:b==="("?o++:b===")"&&o--}const h=s.length===0?n:n.slice(l);let f=h,d=!1;h.endsWith(bg)?(f=h.slice(0,-1),d=!0):h.startsWith(bg)&&(f=h.slice(1),d=!0);const p=c&&c>l?c-l:void 0;return s_(s,d,f,p)};if(t){const n=t+n_,s=i;i=a=>a.startsWith(n)?s(a.slice(n.length)):s_(lrt,!1,a,void 0,!0)}if(r){const n=i;i=s=>r({className:s,parseClassName:n})}return i},urt=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{t.set(r,1e6+i)}),r=>{const i=[];let n=[];for(let s=0;s<r.length;s++){const a=r[s],o=a[0]==="[",l=t.has(a);o||l?(n.length>0&&(n.sort(),i.push(...n),n=[]),i.push(a)):n.push(a)}return n.length>0&&(n.sort(),i.push(...n)),i}},hrt=e=>({cache:ort(e.cacheSize),parseClassName:crt(e),sortModifiers:urt(e),postfixLookupClassGroupIds:drt(e),...Zet(e)}),drt=e=>{const t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let i=0;i<r.length;i++)t[r[i]]=!0;return t},frt=/\s+/,prt=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:n,sortModifiers:s,postfixLookupClassGroupIds:a}=t,o=[],l=e.trim().split(frt);let c="";for(let u=l.length-1;u>=0;u-=1){const h=l[u],{isExternal:f,modifiers:d,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:b}=r(h);if(f){c=h+(c.length>0?" "+c:c);continue}let m=!!b,_;if(m){const B=g.substring(0,b);_=i(B);const L=_&&a[_]?i(g):void 0;L&&L!==_&&(_=L,m=!1)}else _=i(g);if(!_){if(!m){c=h+(c.length>0?" "+c:c);continue}if(_=i(g),!_){c=h+(c.length>0?" "+c:c);continue}m=!1}const k=d.length===0?"":d.length===1?d[0]:s(d).join(":"),T=p?k+bg:k,E=T+_;if(o.indexOf(E)>-1)continue;o.push(E);const S=n(_,m);for(let B=0;B<S.length;++B){const L=S[B];o.push(T+L)}c=h+(c.length>0?" "+c:c)}return c},grt=(...e)=>{let t=0,r,i,n="";for(;t<e.length;)(r=e[t++])&&(i=qL(r))&&(n&&(n+=" "),n+=i);return n},qL=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=qL(e[i]))&&(r&&(r+=" "),r+=t);return r},mrt=(e,...t)=>{let r,i,n,s;const a=l=>{const c=t.reduce((u,h)=>h(u),e());return r=hrt(c),i=r.cache.get,n=r.cache.set,s=o,o(l)},o=l=>{const c=i(l);if(c)return c;const u=prt(l,r);return n(l,u),u};return s=a,(...l)=>s(grt(...l))},brt=[],Ye=e=>{const t=r=>r[e]||brt;return t.isThemeGetter=!0,t.themeKey=e,t},WL=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jL=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yrt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,xrt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Crt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_rt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,krt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Trt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,kn=e=>yrt.test(e),ue=e=>!!e&&!Number.isNaN(Number(e)),Ti=e=>!!e&&Number.isInteger(Number(e)),zf=e=>e.endsWith("%")&&ue(e.slice(0,-1)),Zi=e=>xrt.test(e),VL=()=>!0,Ert=e=>Crt.test(e)&&!_rt.test(e),j0=()=>!1,wrt=e=>krt.test(e),Srt=e=>Trt.test(e),Art=e=>!Ut(e)&&!qt(e),vrt=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),Lrt=e=>jn(e,XL,j0),Ut=e=>WL.test(e),Jn=e=>jn(e,KL,Ert),a_=e=>jn(e,Mrt,ue),Irt=e=>jn(e,ZL,VL),Brt=e=>jn(e,QL,j0),o_=e=>jn(e,GL,j0),Rrt=e=>jn(e,YL,Srt),Ac=e=>jn(e,JL,wrt),qt=e=>jL.test(e),So=e=>$s(e,KL),Ort=e=>$s(e,QL),l_=e=>$s(e,GL),Nrt=e=>$s(e,XL),Drt=e=>$s(e,YL),vc=e=>$s(e,JL,!0),Prt=e=>$s(e,ZL,!0),jn=(e,t,r)=>{const i=WL.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},$s=(e,t,r=!1)=>{const i=jL.exec(e);return i?i[1]?t(i[1]):r:!1},GL=e=>e==="position"||e==="percentage",YL=e=>e==="image"||e==="url",XL=e=>e==="length"||e==="size"||e==="bg-size",KL=e=>e==="length",Mrt=e=>e==="number",QL=e=>e==="family-name",ZL=e=>e==="number"||e==="weight",JL=e=>e==="shadow",Frt=()=>{const e=Ye("color"),t=Ye("font"),r=Ye("text"),i=Ye("font-weight"),n=Ye("tracking"),s=Ye("leading"),a=Ye("breakpoint"),o=Ye("container"),l=Ye("spacing"),c=Ye("radius"),u=Ye("shadow"),h=Ye("inset-shadow"),f=Ye("text-shadow"),d=Ye("drop-shadow"),p=Ye("blur"),g=Ye("perspective"),b=Ye("aspect"),m=Ye("ease"),_=Ye("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),qt,Ut],S=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],L=()=>[qt,Ut,l],W=()=>[kn,"full","auto",...L()],O=()=>[Ti,"none","subgrid",qt,Ut],$=()=>["auto",{span:["full",Ti,qt,Ut]},Ti,qt,Ut],X=()=>[Ti,"auto",qt,Ut],G=()=>["auto","min","max","fr",qt,Ut],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],M=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...L()],q=()=>[kn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],V=()=>[o,kn,"screen","full","dvw","lvw","svw","min","max","fit",...L()],tt=()=>[kn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],A=()=>[e,qt,Ut],Et=()=>[...T(),l_,o_,{position:[qt,Ut]}],kt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",Nrt,Lrt,{size:[qt,Ut]}],Rt=()=>[zf,So,Jn],Tt=()=>["","none","full",c,qt,Ut],pt=()=>["",ue,So,Jn],Ht=()=>["solid","dashed","dotted","double"],Yt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],It=()=>[ue,zf,l_,o_],wt=()=>["","none",p,qt,Ut],Lt=()=>["none",ue,qt,Ut],Xt=()=>["none",ue,qt,Ut],Qt=()=>[ue,qt,Ut],le=()=>[kn,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zi],breakpoint:[Zi],color:[VL],container:[Zi],"drop-shadow":[Zi],ease:["in","out","in-out"],font:[Art],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zi],shadow:[Zi],spacing:["px",ue],text:[Zi],"text-shadow":[Zi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",kn,Ut,qt,b]}],container:["container"],"container-type":[{"@container":["","normal","size",qt,Ut]}],"container-named":[vrt],columns:[{columns:[ue,"auto",Ut,qt,o]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Ti,"auto",qt,Ut]}],basis:[{basis:[kn,"full","auto",o,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,kn,"auto","initial","none",Ut]}],grow:[{grow:["",ue,qt,Ut]}],shrink:[{shrink:["",ue,qt,Ut]}],order:[{order:[Ti,"first","last","none",qt,Ut]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...M(),"normal"]}],"justify-self":[{"justify-self":["auto",...M()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...M(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...M(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...M(),"baseline"]}],"place-self":[{"place-self":["auto",...M()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...tt()]}],"min-block-size":[{"min-block":["auto",...tt()]}],"max-block-size":[{"max-block":["none",...tt()]}],w:[{w:[o,"screen",...q()]}],"min-w":[{"min-w":[o,"screen","none",...q()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh","none",...q()]}],"font-size":[{text:["base",r,So,Jn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,Prt,Irt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",zf,Ut]}],"font-family":[{font:[Ort,Brt,t]}],"font-features":[{"font-features":[Ut]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,qt,Ut]}],"line-clamp":[{"line-clamp":[ue,"none",qt,a_]}],leading:[{leading:["none",s,...L()]}],"list-image":[{"list-image":["none",qt,Ut]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",qt,Ut]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ht(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",qt,Jn]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ue,"auto",qt,Ut]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[Ti,qt,Ut]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qt,Ut]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qt,Ut]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Et()}],"bg-repeat":[{bg:kt()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ti,qt,Ut],radial:["",qt,Ut],conic:["",Ti,qt,Ut]},Drt,Rrt]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Rt()}],"gradient-via-pos":[{via:Rt()}],"gradient-to-pos":[{to:Rt()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:Tt()}],"rounded-s":[{"rounded-s":Tt()}],"rounded-e":[{"rounded-e":Tt()}],"rounded-t":[{"rounded-t":Tt()}],"rounded-r":[{"rounded-r":Tt()}],"rounded-b":[{"rounded-b":Tt()}],"rounded-l":[{"rounded-l":Tt()}],"rounded-ss":[{"rounded-ss":Tt()}],"rounded-se":[{"rounded-se":Tt()}],"rounded-ee":[{"rounded-ee":Tt()}],"rounded-es":[{"rounded-es":Tt()}],"rounded-tl":[{"rounded-tl":Tt()}],"rounded-tr":[{"rounded-tr":Tt()}],"rounded-br":[{"rounded-br":Tt()}],"rounded-bl":[{"rounded-bl":Tt()}],"border-w":[{border:pt()}],"border-w-x":[{"border-x":pt()}],"border-w-y":[{"border-y":pt()}],"border-w-s":[{"border-s":pt()}],"border-w-e":[{"border-e":pt()}],"border-w-bs":[{"border-bs":pt()}],"border-w-be":[{"border-be":pt()}],"border-w-t":[{"border-t":pt()}],"border-w-r":[{"border-r":pt()}],"border-w-b":[{"border-b":pt()}],"border-w-l":[{"border-l":pt()}],"divide-x":[{"divide-x":pt()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pt()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ht(),"hidden","none"]}],"divide-style":[{divide:[...Ht(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...Ht(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,qt,Ut]}],"outline-w":[{outline:["",ue,So,Jn]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","inner","none",u,vc,Ac]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",h,vc,Ac]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:pt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ue,Jn]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":pt()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",f,vc,Ac]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ue,qt,Ut]}],"mix-blend":[{"mix-blend":[...Yt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Yt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":It()}],"mask-image-linear-to-pos":[{"mask-linear-to":It()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":It()}],"mask-image-t-to-pos":[{"mask-t-to":It()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":It()}],"mask-image-r-to-pos":[{"mask-r-to":It()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":It()}],"mask-image-b-to-pos":[{"mask-b-to":It()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":It()}],"mask-image-l-to-pos":[{"mask-l-to":It()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":It()}],"mask-image-x-to-pos":[{"mask-x-to":It()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":It()}],"mask-image-y-to-pos":[{"mask-y-to":It()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[qt,Ut]}],"mask-image-radial-from-pos":[{"mask-radial-from":It()}],"mask-image-radial-to-pos":[{"mask-radial-to":It()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":It()}],"mask-image-conic-to-pos":[{"mask-conic-to":It()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Et()}],"mask-repeat":[{mask:kt()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",qt,Ut]}],filter:[{filter:["","none",qt,Ut]}],blur:[{blur:wt()}],brightness:[{brightness:[ue,qt,Ut]}],contrast:[{contrast:[ue,qt,Ut]}],"drop-shadow":[{"drop-shadow":["","none",d,vc,Ac]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",ue,qt,Ut]}],"hue-rotate":[{"hue-rotate":[ue,qt,Ut]}],invert:[{invert:["",ue,qt,Ut]}],saturate:[{saturate:[ue,qt,Ut]}],sepia:[{sepia:["",ue,qt,Ut]}],"backdrop-filter":[{"backdrop-filter":["","none",qt,Ut]}],"backdrop-blur":[{"backdrop-blur":wt()}],"backdrop-brightness":[{"backdrop-brightness":[ue,qt,Ut]}],"backdrop-contrast":[{"backdrop-contrast":[ue,qt,Ut]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,qt,Ut]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,qt,Ut]}],"backdrop-invert":[{"backdrop-invert":["",ue,qt,Ut]}],"backdrop-opacity":[{"backdrop-opacity":[ue,qt,Ut]}],"backdrop-saturate":[{"backdrop-saturate":[ue,qt,Ut]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,qt,Ut]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",qt,Ut]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",qt,Ut]}],ease:[{ease:["linear","initial",m,qt,Ut]}],delay:[{delay:[ue,qt,Ut]}],animate:[{animate:["none",_,qt,Ut]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,qt,Ut]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Lt()}],"rotate-x":[{"rotate-x":Lt()}],"rotate-y":[{"rotate-y":Lt()}],"rotate-z":[{"rotate-z":Lt()}],scale:[{scale:Xt()}],"scale-x":[{"scale-x":Xt()}],"scale-y":[{"scale-y":Xt()}],"scale-z":[{"scale-z":Xt()}],"scale-3d":["scale-3d"],skew:[{skew:Qt()}],"skew-x":[{"skew-x":Qt()}],"skew-y":[{"skew-y":Qt()}],transform:[{transform:[qt,Ut,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":["translate-none"],zoom:[{zoom:[Ti,qt,Ut]}],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qt,Ut]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qt,Ut]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[ue,So,Jn,a_]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},t3=mrt(Frt),$rt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hrt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zrt={};function c_(e,t){return(zrt.jsx?Hrt:$rt).test(e)}var Js={},Uf,u_;function Urt(){if(u_)return Uf;u_=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
505
- `,c="/",u="*",h="",f="comment",d="declaration";function p(b,m){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];m=m||{};var _=1,k=1;function T(H){var M=H.match(t);M&&(_+=M.length);var N=H.lastIndexOf(l);k=~N?H.length-N:k+H.length}function E(){var H={line:_,column:k};return function(M){return M.position=new S(H),W(),M}}function S(H){this.start=H,this.end={line:_,column:k},this.source=m.source}S.prototype.content=b;function B(H){var M=new Error(m.source+":"+_+":"+k+": "+H);if(M.reason=H,M.filename=m.source,M.line=_,M.column=k,M.source=b,!m.silent)throw M}function L(H){var M=H.exec(b);if(M){var N=M[0];return T(N),b=b.slice(N.length),M}}function W(){L(r)}function O(H){var M;for(H=H||[];M=$();)M!==!1&&H.push(M);return H}function $(){var H=E();if(!(c!=b.charAt(0)||u!=b.charAt(1))){for(var M=2;h!=b.charAt(M)&&(u!=b.charAt(M)||c!=b.charAt(M+1));)++M;if(M+=2,h===b.charAt(M-1))return B("End of comment missing");var N=b.slice(2,M-2);return k+=2,T(N),b=b.slice(M),k+=2,H({type:f,comment:N})}}function X(){var H=E(),M=L(i);if(M){if($(),!L(n))return B("property missing ':'");var N=L(s),q=H({type:d,property:g(M[0].replace(e,h)),value:N?g(N[0].replace(e,h)):h});return L(a),q}}function G(){var H=[];O(H);for(var M;M=X();)M!==!1&&(H.push(M),O(H));return H}return W(),G()}function g(b){return b?b.replace(o,h):h}return Uf=p,Uf}var h_;function qrt(){if(h_)return Js;h_=1;var e=Js&&Js.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Js,"__esModule",{value:!0}),Js.default=r;const t=e(Urt());function r(i,n){let s=null;if(!i||typeof i!="string")return s;const a=(0,t.default)(i),o=typeof n=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:c,value:u}=l;o?n(c,u,l):u&&(s=s||{},s[c]=u)}),s}return Js}var Ao={},d_;function Wrt(){if(d_)return Ao;d_=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,n=/^-(ms)-/,s=function(c){return!c||r.test(c)||e.test(c)},a=function(c,u){return u.toUpperCase()},o=function(c,u){return"".concat(u,"-")},l=function(c,u){return u===void 0&&(u={}),s(c)?c:(c=c.toLowerCase(),u.reactCompat?c=c.replace(n,o):c=c.replace(i,o),c.replace(t,a))};return Ao.camelCase=l,Ao}var vo,f_;function jrt(){if(f_)return vo;f_=1;var e=vo&&vo.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},t=e(qrt()),r=Wrt();function i(n,s){var a={};return!n||typeof n!="string"||(0,t.default)(n,function(o,l){o&&l&&(a[(0,r.camelCase)(o,s)]=l)}),a}return i.default=i,vo=i,vo}var Vrt=jrt();const Grt=Il(Vrt);function ll(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?p_(e.position):"start"in e||"end"in e?p_(e):"line"in e||"column"in e?yg(e):""}function yg(e){return g_(e&&e.line)+":"+g_(e&&e.column)}function p_(e){return yg(e&&e.start)+"-"+yg(e&&e.end)}function g_(e){return e&&typeof e=="number"?e:1}class _r extends Error{constructor(t,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let n="",s={},a=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof t=="string"?n=t:!s.cause&&t&&(a=!0,n=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?s.ruleId=i:(s.source=i.slice(0,l),s.ruleId=i.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=o?o.line:void 0,this.name=ll(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}_r.prototype.file="";_r.prototype.name="";_r.prototype.reason="";_r.prototype.message="";_r.prototype.stack="";_r.prototype.column=void 0;_r.prototype.line=void 0;_r.prototype.ancestors=void 0;_r.prototype.cause=void 0;_r.prototype.fatal=void 0;_r.prototype.place=void 0;_r.prototype.ruleId=void 0;_r.prototype.source=void 0;const V0={}.hasOwnProperty,Yrt=new Map,Xrt=/[A-Z]/g,Krt=new Set(["table","tbody","thead","tfoot","tr"]),Qrt=new Set(["td","th"]),e3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Zrt(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=ait(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=sit(r,t.jsx,t.jsxs)}const n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Mi:qa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=r3(n,e,void 0);return s&&typeof s!="string"?s:n.create(e,n.Fragment,{children:s||void 0},void 0)}function r3(e,t,r){if(t.type==="element")return Jrt(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tit(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rit(e,t,r);if(t.type==="mdxjsEsm")return eit(e,t);if(t.type==="root")return iit(e,t,r);if(t.type==="text")return nit(e,t)}function Jrt(e,t,r){const i=e.schema;let n=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(n=Mi,e.schema=n),e.ancestors.push(t);const s=n3(e,t.tagName,!1),a=oit(e,t);let o=Y0(e,t);return Krt.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!rh(l):!0})),i3(e,a,s,t),G0(a,o),e.ancestors.pop(),e.schema=i,e.create(t,s,a,r)}function tit(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}vl(e,t.position)}function eit(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vl(e,t.position)}function rit(e,t,r){const i=e.schema;let n=i;t.name==="svg"&&i.space==="html"&&(n=Mi,e.schema=n),e.ancestors.push(t);const s=t.name===null?e.Fragment:n3(e,t.name,!0),a=lit(e,t),o=Y0(e,t);return i3(e,a,s,t),G0(a,o),e.ancestors.pop(),e.schema=i,e.create(t,s,a,r)}function iit(e,t,r){const i={};return G0(i,Y0(e,t)),e.create(t,e.Fragment,i,r)}function nit(e,t){return t.value}function i3(e,t,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=i)}function G0(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function sit(e,t,r){return i;function i(n,s,a,o){const c=Array.isArray(a.children)?r:t;return o?c(s,a,o):c(s,a)}}function ait(e,t){return r;function r(i,n,s,a){const o=Array.isArray(s.children),l=qi(i);return t(n,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function oit(e,t){const r={};let i,n;for(n in t.properties)if(n!=="children"&&V0.call(t.properties,n)){const s=cit(e,n,t.properties[n]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&Qrt.has(t.tagName)?i=o:r[a]=o}}if(i){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function lit(e,t){const r={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else vl(e,t.position);else{const n=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const o=i.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else vl(e,t.position);else s=i.value===null?!0:i.value;r[n]=s}return r}function Y0(e,t){const r=[];let i=-1;const n=e.passKeys?new Map:Yrt;for(;++i<t.children.length;){const s=t.children[i];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=n.get(l)||0;a=l+"-"+c,n.set(l,c+1)}}const o=r3(e,s,a);o!==void 0&&r.push(o)}return r}function cit(e,t,r){const i=Ol(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?Mg(r):Fg(r)),i.property==="style"){let n=typeof r=="object"?r:uit(e,String(r));return e.stylePropertyNameCase==="css"&&(n=hit(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&i.space?UB[i.property]||i.property:i.attribute,r]}}function uit(e,t){try{return Grt(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,n=new _r("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=e3+"#cannot-parse-style-attribute",n}}function n3(e,t,r){let i;if(!r)i={type:"Literal",value:t};else if(t.includes(".")){const n=t.split(".");let s=-1,a;for(;++s<n.length;){const o=c_(n[s])?{type:"Identifier",name:n[s]}:{type:"Literal",value:n[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}i=a}else i=c_(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const n=i.value;return V0.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(i);vl(e)}function vl(e,t){const r=new _r("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=e3+"#cannot-handle-mdx-estrees-without-createevaluater",r}function hit(e){const t={};let r;for(r in e)V0.call(e,r)&&(t[dit(r)]=e[r]);return t}function dit(e){let t=e.replace(Xrt,fit);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function fit(e){return"-"+e.toLowerCase()}const qf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},pit={tokenize:git};function git(e){const t=e.attempt(this.parser.constructs.contentInitial,i,n);let r;return t;function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),_e(e,t,"linePrefix")}function n(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return Zt(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const mit={tokenize:bit},m_={tokenize:yit};function bit(e){const t=this,r=[];let i=0,n,s,a;return o;function o(k){if(i<r.length){const T=r[i];return t.containerState=T[1],e.attempt(T[0].continuation,l,c)(k)}return c(k)}function l(k){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&_();const T=t.events.length;let E=T,S;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){S=t.events[E][1].end;break}m(i);let B=T;for(;B<t.events.length;)t.events[B][1].end={...S},B++;const L=new Xu;return L.add(E+1,0,t.events.slice(T)),L.add(T,B-T,[]),L.consume(t.events),c(k)}return o(k)}function c(k){if(i===r.length){if(!n)return f(k);if(n.currentConstruct&&n.currentConstruct.concrete)return p(k);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(m_,u,h)(k)}function u(k){return n&&_(),m(i),f(k)}function h(k){return t.parser.lazy[t.now().line]=i!==r.length,a=t.now().offset,p(k)}function f(k){return t.containerState={},e.attempt(m_,d,p)(k)}function d(k){return i++,r.push([t.currentConstruct,t.containerState]),f(k)}function p(k){if(k===null){n&&_(),m(0),e.consume(k);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:s}),g(k)}function g(k){if(k===null){b(e.exit("chunkFlow"),!0),m(0),e.consume(k);return}return Zt(k)?(e.consume(k),b(e.exit("chunkFlow")),i=0,t.interrupt=void 0,o):(e.consume(k),g)}function b(k,T){const E=t.sliceStream(k);if(T&&E.push(null),k.previous=s,s&&(s.next=k),s=k,n.defineSkip(k.start),n.write(E),t.parser.lazy[k.start.line]){let S=n.events.length;for(;S--;)if(n.events[S][1].start.offset<a&&(!n.events[S][1].end||n.events[S][1].end.offset>a))return;const B=t.events.length;let L=B,W,O;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(W){O=t.events[L][1].end;break}W=!0}for(m(i),S=B;S<t.events.length;)t.events[S][1].end={...O},S++;const $=new Xu;$.add(L+1,0,t.events.slice(B)),$.add(B,S-B,[]),$.consume(t.events)}}function m(k){let T=r.length;for(;T-- >k;){const E=r[T];t.containerState=E[1],E[0].exit.call(t,e)}r.length=k}function _(){n.write([null]),s=void 0,n=void 0,t.containerState._closeFlow=void 0}}function yit(e,t,r){return _e(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const xit={tokenize:Cit};function Cit(e){const t=this,r=e.attempt(Gl,i,e.attempt(this.parser.constructs.flowInitial,n,_e(e,e.attempt(this.parser.constructs.flow,n,e.attempt(mJ,n)),"linePrefix")));return r;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const _it={resolveAll:a3()},kit=s3("string"),Tit=s3("text");function s3(e){return{resolveAll:a3(e==="text"?Eit:void 0),tokenize:t};function t(r){const i=this,n=this.parser.constructs[e],s=r.attempt(n,a,o);return a;function a(u){return c(u)?s(u):o(u)}function o(u){if(u===null){r.consume(u);return}return r.enter("data"),r.consume(u),l}function l(u){return c(u)?(r.exit("data"),s(u)):(r.consume(u),l)}function c(u){if(u===null)return!0;const h=n[u];let f=-1;if(h)for(;++f<h.length;){const d=h[f];if(!d.previous||d.previous.call(i,i.previous))return!0}return!1}}}function a3(e){return t;function t(r,i){let n=-1,s;for(;++n<=r.length;)s===void 0?r[n]&&r[n][1].type==="data"&&(s=n,n++):(!r[n]||r[n][1].type!=="data")&&(n!==s+2&&(r[s][1].end=r[n-1][1].end,r.splice(s+2,n-s-2),n=s+2),s=void 0);return e?e(r,i):r}}function Eit(e,t){const r=new Xu;let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const n=e[i-1][1],s=t.sliceStream(n);let a=s.length,o=-1,l=0,c;for(;a--;){const u=s[a];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(u===-2)c=!0,l++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&i===e.length&&(l=0),l){const u={type:i===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:n.start._bufferIndex+o,_index:n.start._index+a,line:n.end.line,column:n.end.column-l,offset:n.end.offset-l},end:{...n.end}};n.end={...u.start},n.start.offset===n.end.offset?Object.assign(n,u):r.add(i,0,[["enter",u,t],["exit",u,t]])}i++}return r.consume(e),e}const wit={42:Nr,43:Nr,45:Nr,48:Nr,49:Nr,50:Nr,51:Nr,52:Nr,53:Nr,54:Nr,55:Nr,56:Nr,57:Nr,62:TL},Sit={91:_J},Ait={[-2]:Ff,[-1]:Ff,32:Ff},vit={35:AJ,42:eu,45:[XC,eu],60:IJ,61:XC,95:eu,96:GC,126:GC},Lit={38:wL,92:EL},Iit={[-5]:$f,[-4]:$f,[-3]:$f,33:VJ,38:wL,42:gg,60:[QZ,DJ],91:YJ,92:[wJ,EL],93:z0,95:gg,96:uJ},Bit={null:[gg,_it]},Rit={null:[42,95]},Oit={null:[]},Nit=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Rit,contentInitial:Sit,disable:Oit,document:wit,flow:vit,flowInitial:Ait,insideSpan:Bit,string:Lit,text:Iit},Symbol.toStringTag,{value:"Module"}));function Dit(e,t,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const n={},s=[];let a=[],o=[];const l={attempt:B(E),check:B(S),consume:_,enter:k,exit:T,interrupt:B(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:g,events:[],now:p,parser:e,previous:null,sliceSerialize:f,sliceStream:d,write:h};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function h($){return a=Xr(a,$),b(),a[a.length-1]!==null?[]:(L(t,0),c.events=Vh(s,c.events,c),c.events)}function f($,X){return Mit(d($),X)}function d($){return Pit(a,$)}function p(){const{_bufferIndex:$,_index:X,line:G,column:H,offset:M}=i;return{_bufferIndex:$,_index:X,line:G,column:H,offset:M}}function g($){n[$.line]=$.column,O()}function b(){for(;i._index<a.length;){const $=a[i._index];if(typeof $=="string"){const X=i._index;for(i._bufferIndex<0&&(i._bufferIndex=0);i._index===X&&i._bufferIndex<$.length;)m($.charCodeAt(i._bufferIndex))}else m($)}}function m($){u=u($)}function _($){Zt($)?(i.line++,i.column=1,i.offset+=$===-3?2:1,O()):$!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),c.previous=$}function k($,X){const G=X||{};return G.type=$,G.start=p(),c.events.push(["enter",G,c]),o.push(G),G}function T($){const X=o.pop();return X.end=p(),c.events.push(["exit",X,c]),X}function E($,X){L($,X.from)}function S($,X){X.restore()}function B($,X){return G;function G(H,M,N){let q,V,tt,A;return Array.isArray(H)?kt(H):"tokenize"in H?kt([H]):Et(H);function Et(pt){return Ht;function Ht(Yt){const It=Yt!==null&&pt[Yt],wt=Yt!==null&&pt.null,Lt=[...Array.isArray(It)?It:It?[It]:[],...Array.isArray(wt)?wt:wt?[wt]:[]];return kt(Lt)(Yt)}}function kt(pt){return q=pt,V=0,pt.length===0?N:P(pt[V])}function P(pt){return Ht;function Ht(Yt){return A=W(),tt=pt,pt.partial||(c.currentConstruct=pt),pt.name&&c.parser.constructs.disable.null.includes(pt.name)?Tt():pt.tokenize.call(X?Object.assign(Object.create(c),X):c,l,Rt,Tt)(Yt)}}function Rt(pt){return $(tt,A),M}function Tt(pt){return A.restore(),++V<q.length?P(q[V]):N}}}function L($,X){$.resolveAll&&!s.includes($)&&s.push($),$.resolve&&pi(c.events,X,c.events.length-X,$.resolve(c.events.slice(X),c)),$.resolveTo&&(c.events=$.resolveTo(c.events,c))}function W(){const $=p(),X=c.previous,G=c.currentConstruct,H=c.events.length,M=Array.from(o);return{from:H,restore:N};function N(){i=$,c.previous=X,c.currentConstruct=G,c.events.length=H,o=M,O()}}function O(){i.line in n&&i.column<2&&(i.column=n[i.line],i.offset+=n[i.line]-1)}}function Pit(e,t){const r=t.start._index,i=t.start._bufferIndex,n=t.end._index,s=t.end._bufferIndex;let a;if(r===n)a=[e[r].slice(i,s)];else{if(a=e.slice(r,n),i>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(i):a.shift()}s>0&&a.push(e[n].slice(0,s))}return a}function Mit(e,t){let r=-1;const i=[];let n;for(;++r<e.length;){const s=e[r];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
506
- `;break}case-3:{a=`\r
507
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&n)continue;a=" ";break}default:a=String.fromCharCode(s)}n=s===-2,i.push(a)}return i.join("")}function Fit(e){const i={constructs:fL([Nit,...(e||{}).extensions||[]]),content:n(pit),defined:[],document:n(mit),flow:n(xit),lazy:{},string:n(kit),text:n(Tit)};return i;function n(s){return a;function a(o){return Dit(i,s,o)}}}function $it(e){for(;!SL(e););return e}const b_=/[\0\t\n\r]/g;function Hit(){let e=1,t="",r=!0,i;return n;function n(s,a,o){s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s));const l=[];let c=0;for(t="",r&&(s.charCodeAt(0)===65279&&c++,r=void 0);c<s.length;){b_.lastIndex=c;const u=b_.exec(s),h=u&&u.index!==void 0?u.index:s.length,f=s.charCodeAt(h);if(!u){t=s.slice(c);break}if(f===10&&c===h&&i)l.push(-3),i=void 0;else switch(i&&(l.push(-5),i=void 0),c<h&&(l.push(s.slice(c,h)),e+=h-c),f){case 0:{l.push(65533),e++;break}case 9:{const d=Math.ceil(e/4)*4;for(l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:i=!0,e=1}c=h+1}return o&&(i&&l.push(-5),t&&l.push(t),l.push(null)),l}}const o3={}.hasOwnProperty;function zit(e,t,r){return t&&typeof t=="object"&&(r=t,t=void 0),Uit(r)($it(Fit(r).document().write(Hit()(e,t,!0))))}function Uit(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Lr),autolinkProtocol:W,autolinkEmail:W,atxHeading:s(it),blockQuote:s(wt),characterEscape:W,characterReference:W,codeFenced:s(Lt),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Lt,a),codeText:s(Xt,a),codeTextData:W,data:W,codeFlowValue:W,definition:s(Qt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(le),hardBreakEscape:s(Bt),hardBreakTrailing:s(Bt),htmlFlow:s(De,a),htmlFlowData:W,htmlText:s(De,a),htmlTextData:W,image:s(ce),label:a,link:s(Lr),listItem:s(ie),listItemValue:f,listOrdered:s(zt,h),listUnordered:s(zt),paragraph:s(Ie),reference:P,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(it),strong:s(xe),thematicBreak:s(ur)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:It,autolinkProtocol:Yt,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:Tt,characterReferenceMarkerNumeric:Tt,characterReferenceValue:pt,characterReference:Ht,codeFenced:l(b),codeFencedFence:g,codeFencedFenceInfo:d,codeFencedFenceMeta:p,codeFlowValue:O,codeIndented:l(m),codeText:l(M),codeTextData:O,data:O,definition:l(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(X),hardBreakTrailing:l(X),htmlFlow:l(G),htmlFlowData:O,htmlText:l(H),htmlTextData:O,image:l(q),label:tt,labelText:V,lineEnding:$,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Rt,resourceDestinationString:A,resourceTitleString:Et,resource:kt,setextHeading:l(L),setextHeadingLineSequence:B,setextHeadingText:S,strong:l(),thematicBreak:l()}};l3(t,(e||{}).mdastExtensions||[]);const r={};return i;function i(ct){let vt={type:"root",children:[]};const y={stack:[vt],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:u,data:r},j=[];let rt=-1;for(;++rt<ct.length;)if(ct[rt][1].type==="listOrdered"||ct[rt][1].type==="listUnordered")if(ct[rt][0]==="enter")j.push(rt);else{const ut=j.pop();rt=n(ct,ut,rt)}for(rt=-1;++rt<ct.length;){const ut=t[ct[rt][0]];o3.call(ut,ct[rt][1].type)&&ut[ct[rt][1].type].call(Object.assign({sliceSerialize:ct[rt][2].sliceSerialize},y),ct[rt][1])}if(y.tokenStack.length>0){const ut=y.tokenStack[y.tokenStack.length-1];(ut[1]||y_).call(y,void 0,ut[0])}for(vt.position={start:Tn(ct.length>0?ct[0][1].start:{line:1,column:1,offset:0}),end:Tn(ct.length>0?ct[ct.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)vt=t.transforms[rt](vt)||vt;return vt}function n(ct,vt,y){let j=vt-1,rt=-1,ut=!1,st,bt,v,J;for(;++j<=y;){const ft=ct[j];switch(ft[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ft[0]==="enter"?rt++:rt--,J=void 0;break}case"lineEndingBlank":{ft[0]==="enter"&&(st&&!J&&!rt&&!v&&(v=j),J=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:J=void 0}if(!rt&&ft[0]==="enter"&&ft[1].type==="listItemPrefix"||rt===-1&&ft[0]==="exit"&&(ft[1].type==="listUnordered"||ft[1].type==="listOrdered")){if(st){let ht=j;for(bt=void 0;ht--;){const dt=ct[ht];if(dt[1].type==="lineEnding"||dt[1].type==="lineEndingBlank"){if(dt[0]==="exit")continue;bt&&(ct[bt][1].type="lineEndingBlank",ut=!0),dt[1].type="lineEnding",bt=ht}else if(!(dt[1].type==="linePrefix"||dt[1].type==="blockQuotePrefix"||dt[1].type==="blockQuotePrefixWhitespace"||dt[1].type==="blockQuoteMarker"||dt[1].type==="listItemIndent"))break}v&&(!bt||v<bt)&&(st._spread=!0),st.end=Object.assign({},bt?ct[bt][1].start:ft[1].end),ct.splice(bt||j,0,["exit",st,ft[2]]),j++,y++}if(ft[1].type==="listItemPrefix"){const ht={type:"listItem",_spread:!1,start:Object.assign({},ft[1].start),end:void 0};st=ht,ct.splice(j,0,["enter",ht,ft[2]]),j++,y++,v=void 0,J=!0}}}return ct[vt][1]._spread=ut,y}function s(ct,vt){return y;function y(j){o.call(this,ct(j),j),vt&&vt.call(this,j)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(ct,vt,y){this.stack[this.stack.length-1].children.push(ct),this.stack.push(ct),this.tokenStack.push([vt,y||void 0]),ct.position={start:Tn(vt.start),end:void 0}}function l(ct){return vt;function vt(y){ct&&ct.call(this,y),c.call(this,y)}}function c(ct,vt){const y=this.stack.pop(),j=this.tokenStack.pop();if(j)j[0].type!==ct.type&&(vt?vt.call(this,ct,j[0]):(j[1]||y_).call(this,ct,j[0]));else throw new Error("Cannot close `"+ct.type+"` ("+ll({start:ct.start,end:ct.end})+"): it’s not open");y.position.end=Tn(ct.end)}function u(){return P0(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function f(ct){if(this.data.expectingFirstListItemValue){const vt=this.stack[this.stack.length-2];vt.start=Number.parseInt(this.sliceSerialize(ct),10),this.data.expectingFirstListItemValue=void 0}}function d(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.lang=ct}function p(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.meta=ct}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.value=ct.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.value=ct.replace(/(\r?\n|\r)$/g,"")}function _(ct){const vt=this.resume(),y=this.stack[this.stack.length-1];y.label=vt,y.identifier=fi(this.sliceSerialize(ct)).toLowerCase()}function k(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.title=ct}function T(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.url=ct}function E(ct){const vt=this.stack[this.stack.length-1];if(!vt.depth){const y=this.sliceSerialize(ct).length;vt.depth=y}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function B(ct){const vt=this.stack[this.stack.length-1];vt.depth=this.sliceSerialize(ct).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function W(ct){const y=this.stack[this.stack.length-1].children;let j=y[y.length-1];(!j||j.type!=="text")&&(j=nr(),j.position={start:Tn(ct.start),end:void 0},y.push(j)),this.stack.push(j)}function O(ct){const vt=this.stack.pop();vt.value+=this.sliceSerialize(ct),vt.position.end=Tn(ct.end)}function $(ct){const vt=this.stack[this.stack.length-1];if(this.data.atHardBreak){const y=vt.children[vt.children.length-1];y.position.end=Tn(ct.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(vt.type)&&(W.call(this,ct),O.call(this,ct))}function X(){this.data.atHardBreak=!0}function G(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.value=ct}function H(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.value=ct}function M(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.value=ct}function N(){const ct=this.stack[this.stack.length-1];if(this.data.inReference){const vt=this.data.referenceType||"shortcut";ct.type+="Reference",ct.referenceType=vt,delete ct.url,delete ct.title}else delete ct.identifier,delete ct.label;this.data.referenceType=void 0}function q(){const ct=this.stack[this.stack.length-1];if(this.data.inReference){const vt=this.data.referenceType||"shortcut";ct.type+="Reference",ct.referenceType=vt,delete ct.url,delete ct.title}else delete ct.identifier,delete ct.label;this.data.referenceType=void 0}function V(ct){const vt=this.sliceSerialize(ct),y=this.stack[this.stack.length-2];y.label=_Z(vt),y.identifier=fi(vt).toLowerCase()}function tt(){const ct=this.stack[this.stack.length-1],vt=this.resume(),y=this.stack[this.stack.length-1];if(this.data.inReference=!0,y.type==="link"){const j=ct.children;y.children=j}else y.alt=vt}function A(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.url=ct}function Et(){const ct=this.resume(),vt=this.stack[this.stack.length-1];vt.title=ct}function kt(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function Rt(ct){const vt=this.resume(),y=this.stack[this.stack.length-1];y.label=vt,y.identifier=fi(this.sliceSerialize(ct)).toLowerCase(),this.data.referenceType="full"}function Tt(ct){this.data.characterReferenceType=ct.type}function pt(ct){const vt=this.sliceSerialize(ct),y=this.data.characterReferenceType;let j;y?(j=dL(vt,y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):j=$0(vt);const rt=this.stack[this.stack.length-1];rt.value+=j}function Ht(ct){const vt=this.stack.pop();vt.position.end=Tn(ct.end)}function Yt(ct){O.call(this,ct);const vt=this.stack[this.stack.length-1];vt.url=this.sliceSerialize(ct)}function It(ct){O.call(this,ct);const vt=this.stack[this.stack.length-1];vt.url="mailto:"+this.sliceSerialize(ct)}function wt(){return{type:"blockquote",children:[]}}function Lt(){return{type:"code",lang:null,meta:null,value:""}}function Xt(){return{type:"inlineCode",value:""}}function Qt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function it(){return{type:"heading",depth:0,children:[]}}function Bt(){return{type:"break"}}function De(){return{type:"html",value:""}}function ce(){return{type:"image",title:null,url:"",alt:null}}function Lr(){return{type:"link",title:null,url:"",children:[]}}function zt(ct){return{type:"list",ordered:ct.type==="listOrdered",start:null,spread:ct._spread,children:[]}}function ie(ct){return{type:"listItem",spread:ct._spread,checked:null,children:[]}}function Ie(){return{type:"paragraph",children:[]}}function xe(){return{type:"strong",children:[]}}function nr(){return{type:"text",value:""}}function ur(){return{type:"thematicBreak"}}}function Tn(e){return{line:e.line,column:e.column,offset:e.offset}}function l3(e,t){let r=-1;for(;++r<t.length;){const i=t[r];Array.isArray(i)?l3(e,i):qit(e,i)}}function qit(e,t){let r;for(r in t)if(o3.call(t,r))switch(r){case"canContainEols":{const i=t[r];i&&e[r].push(...i);break}case"transforms":{const i=t[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=t[r];i&&Object.assign(e[r],i);break}}}function y_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ll({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ll({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ll({start:t.start,end:t.end})+") is still open")}function Wit(e){const t=this;t.parser=r;function r(i){return zit(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jit(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function Vit(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
508
- `}]}function Git(e,t){const r=t.value?t.value+`
509
- `:"",i={},n=t.lang?t.lang.split(/\s+/):[];n.length>0&&(i.className=["language-"+n[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Yit(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Xit(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Kit(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),n=ro(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let a,o=e.footnoteCounts.get(i);o===void 0?(o=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(i,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+n,id:r+"fnref-"+n+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function Qit(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Zit(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function c3(e,t){const r=t.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const n=e.all(t),s=n[0];s&&s.type==="text"?s.value="["+s.value:n.unshift({type:"text",value:"["});const a=n[n.length-1];return a&&a.type==="text"?a.value+=i:n.push({type:"text",value:i}),n}function Jit(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return c3(e,t);const n={src:ro(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(n.title=i.title);const s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function tnt(e,t){const r={src:ro(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function ent(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,i),e.applyData(t,i)}function rnt(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return c3(e,t);const n={href:ro(i.url||"")};i.title!==null&&i.title!==void 0&&(n.title=i.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function int(e,t){const r={href:ro(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function nnt(e,t,r){const i=e.all(t),n=r?snt(r):u3(t),s={},a=[];if(typeof t.checked=="boolean"){const u=i[0];let h;u&&u.type==="element"&&u.tagName==="p"?h=u:(h={type:"element",tagName:"p",properties:{},children:[]},i.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<i.length;){const u=i[o];(n||o!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
510
- `}),u.type==="element"&&u.tagName==="p"&&!n?a.push(...u.children):a.push(u)}const l=i[i.length-1];l&&(n||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
511
- `});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function snt(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let i=-1;for(;!t&&++i<r.length;)t=u3(r[i])}return t}function u3(e){const t=e.spread;return t??e.children.length>1}function ant(e,t){const r={},i=e.all(t);let n=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++n<i.length;){const a=i[n];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function ont(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lnt(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function cnt(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function unt(e,t){const r=e.all(t),i=r.shift(),n=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),n.push(a)}if(r.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=qi(t.children[1]),l=Wh(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),n.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(n,!0)};return e.patch(t,s),e.applyData(t,s)}function hnt(e,t,r){const i=r?r.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",a=r&&r.type==="table"?r.align:void 0,o=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const h=t.children[l],f={},d=a?a[l]:void 0;d&&(f.align=d);let p={type:"element",tagName:s,properties:f,children:[]};h&&(p.children=e.all(h),e.patch(h,p),p=e.applyData(h,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function dnt(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const x_=9,C_=32;function fnt(e){const t=String(e),r=/\r?\n|\r/g;let i=r.exec(t),n=0;const s=[];for(;i;)s.push(__(t.slice(n,i.index),n>0,!0),i[0]),n=i.index+i[0].length,i=r.exec(t);return s.push(__(t.slice(n),n>0,!1)),s.join("")}function __(e,t,r){let i=0,n=e.length;if(t){let s=e.codePointAt(i);for(;s===x_||s===C_;)i++,s=e.codePointAt(i)}if(r){let s=e.codePointAt(n-1);for(;s===x_||s===C_;)n--,s=e.codePointAt(n-1)}return n>i?e.slice(i,n):""}function pnt(e,t){const r={type:"text",value:fnt(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function gnt(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const mnt={blockquote:jit,break:Vit,code:Git,delete:Yit,emphasis:Xit,footnoteReference:Kit,heading:Qit,html:Zit,imageReference:Jit,image:tnt,inlineCode:ent,linkReference:rnt,link:int,listItem:nnt,list:ant,paragraph:ont,root:lnt,strong:cnt,table:unt,tableCell:dnt,tableRow:hnt,text:pnt,thematicBreak:gnt,toml:Lc,yaml:Lc,definition:Lc,footnoteDefinition:Lc};function Lc(){}function bnt(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function ynt(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function xnt(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||bnt,i=e.options.footnoteBackLabel||ynt,n=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),h=String(c.identifier).toUpperCase(),f=ro(h.toLowerCase());let d=0;const p=[],g=e.footnoteCounts.get(h);for(;g!==void 0&&++d<=g;){p.length>0&&p.push({type:"text",value:" "});let _=typeof r=="string"?r:r(l,d);typeof _=="string"&&(_={type:"text",value:_}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(l,d),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const b=u[u.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const _=b.children[b.children.length-1];_&&_.type==="text"?_.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...p)}else u.push(...p);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(u,!0)};e.patch(c,m),o.push(m)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ls(a),id:"footnote-label"},children:[{type:"text",value:n}]},{type:"text",value:`
512
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
513
- `}]}}const xg={}.hasOwnProperty,Cnt={};function _nt(e,t){const r=t||Cnt,i=new Map,n=new Map,s=new Map,a={...mnt,...r.handlers},o={all:c,applyData:Tnt,definitionById:i,footnoteById:n,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:r,patch:knt,wrap:wnt};return gi(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const h=u.type==="definition"?i:n,f=String(u.identifier).toUpperCase();h.has(f)||h.set(f,u)}}),o;function l(u,h){const f=u.type,d=o.handlers[f];if(xg.call(o.handlers,f)&&d)return d(o,u,h);if(o.options.passThrough&&o.options.passThrough.includes(f)){if("children"in u){const{children:g,...b}=u,m=Ls(b);return m.children=o.all(u),m}return Ls(u)}return(o.options.unknownHandler||Ent)(o,u,h)}function c(u){const h=[];if("children"in u){const f=u.children;let d=-1;for(;++d<f.length;){const p=o.one(f[d],u);if(p){if(d&&f[d-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=k_(p.value)),!Array.isArray(p)&&p.type==="element")){const g=p.children[0];g&&g.type==="text"&&(g.value=k_(g.value))}Array.isArray(p)?h.push(...p):h.push(p)}}}return h}}function knt(e,t){e.position&&(t.position=Wv(e))}function Tnt(e,t){let r=t;if(e&&e.data){const i=e.data.hName,n=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const a="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:a}}r.type==="element"&&s&&Object.assign(r.properties,Ls(s)),"children"in r&&r.children&&n!==null&&n!==void 0&&(r.children=n)}return r}function Ent(e,t){const r=t.data||{},i="value"in t&&!(xg.call(r,"hProperties")||xg.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function wnt(e,t){const r=[];let i=-1;for(t&&r.push({type:"text",value:`
514
- `});++i<e.length;)i&&r.push({type:"text",value:`
515
- `}),r.push(e[i]);return t&&e.length>0&&r.push({type:"text",value:`
516
- `}),r}function k_(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function T_(e,t){const r=_nt(e,t),i=r.one(e,void 0),n=xnt(r),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return n&&s.children.push({type:"text",value:`
517
- `},n),s}function Snt(e,t){return e&&"run"in e?async function(r,i){const n=T_(r,{file:i,...t});await e.run(n,i)}:function(r,i){return T_(r,{file:i,...e||t})}}function E_(e){if(e)throw e}var Wf,w_;function Ant(){if(w_)return Wf;w_=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,n=function(c){return typeof Array.isArray=="function"?Array.isArray(c):t.call(c)==="[object Array]"},s=function(c){if(!c||t.call(c)!=="[object Object]")return!1;var u=e.call(c,"constructor"),h=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!u&&!h)return!1;var f;for(f in c);return typeof f>"u"||e.call(c,f)},a=function(c,u){r&&u.name==="__proto__"?r(c,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):c[u.name]=u.newValue},o=function(c,u){if(u==="__proto__")if(e.call(c,u)){if(i)return i(c,u).value}else return;return c[u]};return Wf=function l(){var c,u,h,f,d,p,g=arguments[0],b=1,m=arguments.length,_=!1;for(typeof g=="boolean"&&(_=g,g=arguments[1]||{},b=2),(g==null||typeof g!="object"&&typeof g!="function")&&(g={});b<m;++b)if(c=arguments[b],c!=null)for(u in c)h=o(g,u),f=o(c,u),g!==f&&(_&&f&&(s(f)||(d=n(f)))?(d?(d=!1,p=h&&n(h)?h:[]):p=h&&s(h)?h:{},a(g,{name:u,newValue:l(_,p,f)})):typeof f<"u"&&a(g,{name:u,newValue:f}));return g},Wf}var vnt=Ant();const jf=Il(vnt);function Cg(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Lnt(){const e=[],t={run:r,use:i};return t;function r(...n){let s=-1;const a=n.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...n);function o(l,...c){const u=e[++s];let h=-1;if(l){a(l);return}for(;++h<n.length;)(c[h]===null||c[h]===void 0)&&(c[h]=n[h]);n=c,u?Int(u,o)(...c):a(null,...c)}}function i(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Int(e,t){let r;return i;function i(...a){const o=e.length>a.length;let l;o&&a.push(n);try{l=e.apply(this,a)}catch(c){const u=c;if(o&&r)throw u;return n(u)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,n):l instanceof Error?n(l):s(l))}function n(a,...o){r||(r=!0,t(a,...o))}function s(a){n(null,a)}}const Li={basename:Bnt,dirname:Rnt,extname:Ont,join:Nnt,sep:"/"};function Bnt(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Yl(e);let r=0,i=-1,n=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;n--;)if(e.codePointAt(n)===47){if(s){r=n+1;break}}else i<0&&(s=!0,i=n+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,o=t.length-1;for(;n--;)if(e.codePointAt(n)===47){if(s){r=n+1;break}}else a<0&&(s=!0,a=n+1),o>-1&&(e.codePointAt(n)===t.codePointAt(o--)?o<0&&(i=n):(o=-1,i=a));return r===i?i=a:i<0&&(i=e.length),e.slice(r,i)}function Rnt(e){if(Yl(e),e.length===0)return".";let t=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){t=r;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Ont(e){Yl(e);let t=e.length,r=-1,i=0,n=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){i=t+1;break}continue}r<0&&(a=!0,r=t+1),o===46?n<0?n=t:s!==1&&(s=1):n>-1&&(s=-1)}return n<0||r<0||s===0||s===1&&n===r-1&&n===i+1?"":e.slice(n,r)}function Nnt(...e){let t=-1,r;for(;++t<e.length;)Yl(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":Dnt(r)}function Dnt(e){Yl(e);const t=e.codePointAt(0)===47;let r=Pnt(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function Pnt(e,t){let r="",i=0,n=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(n===a-1||s===1))if(n!==a-1&&s===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",i=0):(r=r.slice(0,l),i=r.length-1-r.lastIndexOf("/")),n=a,s=0;continue}}else if(r.length>0){r="",i=0,n=a,s=0;continue}}t&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(n+1,a):r=e.slice(n+1,a),i=a-n-1;n=a,s=0}else o===46&&s>-1?s++:s=-1}return r}function Yl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Mnt={cwd:Fnt};function Fnt(){return"/"}function _g(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $nt(e){if(typeof e=="string")e=new URL(e);else if(!_g(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Hnt(e)}function Hnt(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const i=t.codePointAt(r+2);if(i===70||i===102){const n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(t)}const Vf=["history","path","basename","stem","extname","dirname"];class znt{constructor(t){let r;t?_g(t)?r={path:t}:typeof t=="string"||Unt(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":Mnt.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Vf.length;){const s=Vf[i];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let n;for(n in r)Vf.includes(n)||(this[n]=r[n])}get basename(){return typeof this.path=="string"?Li.basename(this.path):void 0}set basename(t){Yf(t,"basename"),Gf(t,"basename"),this.path=Li.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Li.dirname(this.path):void 0}set dirname(t){S_(this.basename,"dirname"),this.path=Li.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Li.extname(this.path):void 0}set extname(t){if(Gf(t,"extname"),S_(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Li.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_g(t)&&(t=$nt(t)),Yf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Li.basename(this.path,this.extname):void 0}set stem(t){Yf(t,"stem"),Gf(t,"stem"),this.path=Li.join(this.dirname||"",t+(this.extname||""))}fail(t,r,i){const n=this.message(t,r,i);throw n.fatal=!0,n}info(t,r,i){const n=this.message(t,r,i);return n.fatal=void 0,n}message(t,r,i){const n=new _r(t,r,i);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Gf(e,t){if(e&&e.includes(Li.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Li.sep+"`")}function Yf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function S_(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Unt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const qnt=(function(e){const i=this.constructor.prototype,n=i[e],s=function(){return n.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),Wnt={}.hasOwnProperty;class X0 extends qnt{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Lnt()}copy(){const t=new X0;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];t.use(...i)}return t.data(jf(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Qf("data",this.frozen),this.namespace[t]=r,this):Wnt.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Qf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const n=r.call(t,...i);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Ic(t),i=this.parser||this.Parser;return Xf("parse",i),i(String(r),r)}process(t,r){const i=this;return this.freeze(),Xf("process",this.parser||this.Parser),Kf("process",this.compiler||this.Compiler),r?n(void 0,r):new Promise(n);function n(s,a){const o=Ic(t),l=i.parse(o);i.run(l,o,function(u,h,f){if(u||!h||!f)return c(u);const d=h,p=i.stringify(d,f);Gnt(p)?f.value=p:f.result=p,c(u,f)});function c(u,h){u||!h?a(u):s?s(h):r(void 0,h)}}}processSync(t){let r=!1,i;return this.freeze(),Xf("processSync",this.parser||this.Parser),Kf("processSync",this.compiler||this.Compiler),this.process(t,n),v_("processSync","process",r),i;function n(s,a){r=!0,E_(s),i=a}}run(t,r,i){A_(t),this.freeze();const n=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?s(void 0,i):new Promise(s);function s(a,o){const l=Ic(r);n.run(t,l,c);function c(u,h,f){const d=h||t;u?o(u):a?a(d):i(void 0,d,f)}}}runSync(t,r){let i=!1,n;return this.run(t,r,s),v_("runSync","run",i),n;function s(a,o){E_(a),n=o,i=!0}}stringify(t,r){this.freeze();const i=Ic(r),n=this.compiler||this.Compiler;return Kf("stringify",n),A_(t),n(t,i)}use(t,...r){const i=this.attachers,n=this.namespace;if(Qf("use",this.frozen),t!=null)if(typeof t=="function")l(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...h]=c;l(u,h)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(c.plugins),c.settings&&(n.settings=jf(!0,n.settings,c.settings))}function o(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const h=c[u];s(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let h=-1,f=-1;for(;++h<i.length;)if(i[h][0]===c){f=h;break}if(f===-1)i.push([c,...u]);else if(u.length>0){let[d,...p]=u;const g=i[f][1];Cg(g)&&Cg(d)&&(d=jf(!0,g,d)),i[f]=[c,d,...p]}}}}const jnt=new X0().freeze();function Xf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Kf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Qf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function A_(e){if(!Cg(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function v_(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ic(e){return Vnt(e)?e:new znt(e)}function Vnt(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gnt(e){return typeof e=="string"||Ynt(e)}function Ynt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function K0(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Hs=K0();function h3(e){Hs=e}var as={exec:()=>null};function ye(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Ar.caret,"$1"),r=r.replace(n,a),i},getRegex:()=>new RegExp(r,t)};return i}var Xnt=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ar={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Knt=/^(?:[ \t]*(?:\n|$))+/,Qnt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Znt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Jnt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q0=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,d3=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,f3=ye(d3).replace(/bull/g,Q0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),tst=ye(d3).replace(/bull/g,Q0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Z0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,est=/^[^\n]+/,J0=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rst=ye(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",J0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ist=ye(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q0).getRegex(),Yh="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",tb=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,nst=ye("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",tb).replace("tag",Yh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),p3=ye(Z0).replace("hr",Xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yh).getRegex(),sst=ye(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",p3).getRegex(),eb={blockquote:sst,code:Qnt,def:rst,fences:Znt,heading:Jnt,hr:Xl,html:nst,lheading:f3,list:ist,newline:Knt,paragraph:p3,table:as,text:est},L_=ye("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yh).getRegex(),ast={...eb,lheading:tst,table:L_,paragraph:ye(Z0).replace("hr",Xl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",L_).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yh).getRegex()},ost={...eb,html:ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",tb).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:as,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ye(Z0).replace("hr",Xl).replace("heading",` *#{1,6} *[^
518
- ]`).replace("lheading",f3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lst=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cst=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,g3=/^( {2,}|\\)\n(?!\s*$)/,ust=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,io=/[\p{P}\p{S}]/u,Xh=/[\s\p{P}\p{S}]/u,rb=/[^\s\p{P}\p{S}]/u,hst=ye(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Xh).getRegex(),m3=/(?!~)[\p{P}\p{S}]/u,dst=/(?!~)[\s\p{P}\p{S}]/u,fst=/(?:[^\s\p{P}\p{S}]|~)/u,pst=ye(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xnt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),b3=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,gst=ye(b3,"u").replace(/punct/g,io).getRegex(),mst=ye(b3,"u").replace(/punct/g,m3).getRegex(),y3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bst=ye(y3,"gu").replace(/notPunctSpace/g,rb).replace(/punctSpace/g,Xh).replace(/punct/g,io).getRegex(),yst=ye(y3,"gu").replace(/notPunctSpace/g,fst).replace(/punctSpace/g,dst).replace(/punct/g,m3).getRegex(),xst=ye("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rb).replace(/punctSpace/g,Xh).replace(/punct/g,io).getRegex(),Cst=ye(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,io).getRegex(),_st="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",kst=ye(_st,"gu").replace(/notPunctSpace/g,rb).replace(/punctSpace/g,Xh).replace(/punct/g,io).getRegex(),Tst=ye(/\\(punct)/,"gu").replace(/punct/g,io).getRegex(),Est=ye(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wst=ye(tb).replace("(?:-->|$)","-->").getRegex(),Sst=ye("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",wst).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zu=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ast=ye(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Zu).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),x3=ye(/^!?\[(label)\]\[(ref)\]/).replace("label",Zu).replace("ref",J0).getRegex(),C3=ye(/^!?\[(ref)\](?:\[\])?/).replace("ref",J0).getRegex(),vst=ye("reflink|nolink(?!\\()","g").replace("reflink",x3).replace("nolink",C3).getRegex(),I_=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ib={_backpedal:as,anyPunctuation:Tst,autolink:Est,blockSkip:pst,br:g3,code:cst,del:as,delLDelim:as,delRDelim:as,emStrongLDelim:gst,emStrongRDelimAst:bst,emStrongRDelimUnd:xst,escape:lst,link:Ast,nolink:C3,punctuation:hst,reflink:x3,reflinkSearch:vst,tag:Sst,text:ust,url:as},Lst={...ib,link:ye(/^!?\[(label)\]\((.*?)\)/).replace("label",Zu).getRegex(),reflink:ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zu).getRegex()},kg={...ib,emStrongRDelimAst:yst,emStrongLDelim:mst,delLDelim:Cst,delRDelim:kst,url:ye(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",I_).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ye(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",I_).getRegex()},Ist={...kg,br:ye(g3).replace("{2,}","*").getRegex(),text:ye(kg.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Bc={normal:eb,gfm:ast,pedantic:ost},Lo={normal:ib,gfm:kg,breaks:Ist,pedantic:Lst},Bst={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},B_=e=>Bst[e];function vi(e,t){if(t){if(Ar.escapeTest.test(e))return e.replace(Ar.escapeReplace,B_)}else if(Ar.escapeTestNoEncode.test(e))return e.replace(Ar.escapeReplaceNoEncode,B_);return e}function R_(e){try{e=encodeURI(e).replace(Ar.percentDecode,"%")}catch{return null}return e}function O_(e,t){var s;let r=e.replace(Ar.findPipe,(a,o,l)=>{let c=!1,u=o;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Ar.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Ar.slashPipe,"|");return i}function Io(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function Rst(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function Ost(e,t=0){let r=t,i="";for(let n of e)if(n===" "){let s=4-r%4;i+=" ".repeat(s),r+=s}else i+=n,r++;return i}function N_(e,t,r,i,n){let s=t.href,a=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:a,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function Nst(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
519
- `).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=n.length?s.slice(n.length):s}).join(`
520
- `)}var Ju=class{constructor(e){Z(this,"options");Z(this,"rules");Z(this,"lexer");this.options=e||Hs}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Io(r,`
521
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],i=Nst(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let i=Io(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Io(t[0],`
522
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Io(t[0],`
523
- `).split(`
524
- `),i="",n="",s=[];for(;r.length>0;){let a=!1,o=[],l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),a=!0;else if(!a)o.push(r[l]);else break;r=r.slice(l);let c=o.join(`
525
- `),u=c.replace(this.rules.other.blockquoteSetextReplace,`
526
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
527
- ${c}`:c,n=n?`${n}
528
- ${u}`:u;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=h,r.length===0)break;let f=s.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let d=f,p=d.raw+`
529
- `+r.join(`
530
- `),g=this.blockquote(p);s[s.length-1]=g,i=i.substring(0,i.length-d.raw.length)+g.raw,n=n.substring(0,n.length-d.text.length)+g.text;break}else if((f==null?void 0:f.type)==="list"){let d=f,p=d.raw+`
531
- `+r.join(`
532
- `),g=this.list(p);s[s.length-1]=g,i=i.substring(0,i.length-f.raw.length)+g.raw,n=n.substring(0,n.length-d.raw.length)+g.raw,r=p.substring(s.at(-1).raw.length).split(`
533
- `);continue}}return{type:"blockquote",raw:i,tokens:s,text:n}}}list(e){var r,i;let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),s=n.length>1,a={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let o=this.rules.other.listItemRegex(n),l=!1;for(;e;){let u=!1,h="",f="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let d=Ost(t[2].split(`
534
- `,1)[0],t[1].length),p=e.split(`
535
- `,1)[0],g=!d.trim(),b=0;if(this.options.pedantic?(b=2,f=d.trimStart()):g?b=t[1].length+1:(b=d.search(this.rules.other.nonSpaceChar),b=b>4?1:b,f=d.slice(b),b+=t[1].length),g&&this.rules.other.blankLine.test(p)&&(h+=p+`
536
- `,e=e.substring(p.length+1),u=!0),!u){let m=this.rules.other.nextBulletRegex(b),_=this.rules.other.hrRegex(b),k=this.rules.other.fencesBeginRegex(b),T=this.rules.other.headingBeginRegex(b),E=this.rules.other.htmlBeginRegex(b),S=this.rules.other.blockquoteBeginRegex(b);for(;e;){let B=e.split(`
537
- `,1)[0],L;if(p=B,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),L=p):L=p.replace(this.rules.other.tabCharGlobal," "),k.test(p)||T.test(p)||E.test(p)||S.test(p)||m.test(p)||_.test(p))break;if(L.search(this.rules.other.nonSpaceChar)>=b||!p.trim())f+=`
538
- `+L.slice(b);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(d)||T.test(d)||_.test(d))break;f+=`
539
- `+p}g=!p.trim(),h+=B+`
540
- `,e=e.substring(B.length+1),d=L.slice(b)}}a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(l=!0)),a.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),a.raw+=h}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let u of a.items){if(this.lexer.state.top=!1,u.tokens=this.lexer.blockTokens(u.text,[]),u.task){if(u.text=u.text.replace(this.rules.other.listReplaceTask,""),((r=u.tokens[0])==null?void 0:r.type)==="text"||((i=u.tokens[0])==null?void 0:i.type)==="paragraph"){u.tokens[0].raw=u.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),u.tokens[0].text=u.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(u.raw);if(h){let f={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};u.checked=f.checked,a.loose?u.tokens[0]&&["paragraph","text"].includes(u.tokens[0].type)&&"tokens"in u.tokens[0]&&u.tokens[0].tokens?(u.tokens[0].raw=f.raw+u.tokens[0].raw,u.tokens[0].text=f.raw+u.tokens[0].text,u.tokens[0].tokens.unshift(f)):u.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):u.tokens.unshift(f)}}if(!a.loose){let h=u.tokens.filter(d=>d.type==="space"),f=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=f}}if(a.loose)for(let u of a.items){u.loose=!0;for(let h of u.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:i,title:n}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=O_(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
541
- `):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<r.length;o++)s.header.push({text:r[o],tokens:this.lexer.inline(r[o]),header:!0,align:s.align[o]});for(let o of n)s.rows.push(O_(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let r=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
542
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=Io(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=Rst(t[2],"()");if(s===-2)return;if(s>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],n=s[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),N_(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return N_(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!r||this.rules.inline.punctuation.exec(r))){let n=[...i[0]].length-1,s,a,o=n,l=0,c=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(i=c.exec(t))!==null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){o+=a;continue}else if((i[5]||i[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let u=[...i[0]][0].length,h=e.slice(0,n+i.index+u+a);if(Math.min(n,a)%2){let d=h.slice(1,-1);return{type:"em",raw:h,text:d,tokens:this.lexer.inlineTokens(d)}}let f=h.slice(2,-2);return{type:"strong",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!r||this.rules.inline.punctuation.exec(r))){let n=[...i[0]].length-1,s,a,o=n,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+n);(i=l.exec(t))!==null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s||(a=[...s].length,a!==n))continue;if(i[3]||i[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let c=[...i[0]][0].length,u=e.slice(0,n+i.index+c+a),h=u.slice(n,-n);return{type:"del",raw:u,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let i,n;if(t[2]==="@")i=t[0],n="mailto:"+i;else{let s;do s=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(s!==t[0]);i=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Kr=class Tg{constructor(t){Z(this,"tokens");Z(this,"options");Z(this,"state");Z(this,"inlineQueue");Z(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Hs,this.options.tokenizer=this.options.tokenizer||new Ju,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ar,block:Bc.normal,inline:Lo.normal};this.options.pedantic?(r.block=Bc.pedantic,r.inline=Lo.pedantic):this.options.gfm&&(r.block=Bc.gfm,this.options.breaks?r.inline=Lo.breaks:r.inline=Lo.gfm),this.tokenizer.rules=r}static get rules(){return{block:Bc,inline:Lo}}static lex(t,r){return new Tg(r).lex(t)}static lexInline(t,r){return new Tg(r).inlineTokens(t)}lex(t){t=t.replace(Ar.carriageReturn,`
543
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var n,s,a;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Ar.tabCharGlobal," ").replace(Ar.spaceLine,""));t;){let o;if((s=(n=this.options.extensions)==null?void 0:n.block)!=null&&s.some(c=>(o=c.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
544
- `:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
545
- `)?"":`
546
- `)+o.raw,c.text+=`
547
- `+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
548
- `)?"":`
549
- `)+o.raw,c.text+=`
550
- `+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let l=t;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,u=t.slice(1),h;this.options.extensions.startBlock.forEach(f=>{h=f.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
551
- `)?"":`
552
- `)+o.raw,c.text+=`
553
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),i=l.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
554
- `)?"":`
555
- `)+o.raw,c.text+=`
556
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,c,u,h,f;this.tokenizer.lexer=this;let i=t,n=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)d.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)s=n[2]?n[2].length:0,i=i.slice(0,n.index+s)+"["+"a".repeat(n[0].length-s-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},i))??i;let a=!1,o="";for(;t;){a||(o=""),a=!1;let d;if((h=(u=this.options.extensions)==null?void 0:u.inline)!=null&&h.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,o)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t,i,o)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let p=t;if((f=this.options.extensions)!=null&&f.startInline){let g=1/0,b=t.slice(1),m;this.options.extensions.startInline.forEach(_=>{m=_.call({lexer:this},b),typeof m=="number"&&m>=0&&(g=Math.min(g,m))}),g<1/0&&g>=0&&(p=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(p)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(o=d.raw.slice(-1)),a=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},th=class{constructor(e){Z(this,"options");Z(this,"parser");this.options=e||Hs}space(e){return""}code({text:e,lang:t,escaped:r}){var s;let i=(s=(t||"").match(Ar.notSpaceStart))==null?void 0:s[0],n=e.replace(Ar.endingNewline,"")+`
557
- `;return i?'<pre><code class="language-'+vi(i)+'">'+(r?n:vi(n,!0))+`</code></pre>
558
- `:"<pre><code>"+(r?n:vi(n,!0))+`</code></pre>
559
- `}blockquote({tokens:e}){return`<blockquote>
560
- ${this.parser.parse(e)}</blockquote>
561
- `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
562
- `}hr(e){return`<hr>
563
- `}list(e){let t=e.ordered,r=e.start,i="";for(let a=0;a<e.items.length;a++){let o=e.items[a];i+=this.listitem(o)}let n=t?"ol":"ul",s=t&&r!==1?' start="'+r+'"':"";return"<"+n+s+`>
564
- `+i+"</"+n+`>
565
- `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
566
- `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
567
- `}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let i="";for(let n=0;n<e.rows.length;n++){let s=e.rows[n];r="";for(let a=0;a<s.length;a++)r+=this.tablecell(s[a]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
568
- <thead>
569
- `+t+`</thead>
570
- `+i+`</table>
571
- `}tablerow({text:e}){return`<tr>
572
- ${e}</tr>
573
- `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
574
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${vi(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let i=this.parser.parseInline(r),n=R_(e);if(n===null)return i;e=n;let s='<a href="'+e+'"';return t&&(s+=' title="'+vi(t)+'"'),s+=">"+i+"</a>",s}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=R_(e);if(n===null)return vi(r);e=n;let s=`<img src="${e}" alt="${vi(r)}"`;return t&&(s+=` title="${vi(t)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:vi(e.text)}},nb=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},li=class Eg{constructor(t){Z(this,"options");Z(this,"renderer");Z(this,"textRenderer");this.options=t||Hs,this.options.renderer=this.options.renderer||new th,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new nb}static parse(t,r){return new Eg(r).parse(t)}static parseInline(t,r){return new Eg(r).parseInline(t)}parse(t){var i,n;this.renderer.parser=this;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((n=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&n[a.type]){let l=a,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){r+=c||"";continue}}let o=a;switch(o.type){case"space":{r+=this.renderer.space(o);break}case"hr":{r+=this.renderer.hr(o);break}case"heading":{r+=this.renderer.heading(o);break}case"code":{r+=this.renderer.code(o);break}case"table":{r+=this.renderer.table(o);break}case"blockquote":{r+=this.renderer.blockquote(o);break}case"list":{r+=this.renderer.list(o);break}case"checkbox":{r+=this.renderer.checkbox(o);break}case"html":{r+=this.renderer.html(o);break}case"def":{r+=this.renderer.def(o);break}case"paragraph":{r+=this.renderer.paragraph(o);break}case"text":{r+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(t,r=this.renderer){var n,s;this.renderer.parser=this;let i="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=c||"";continue}}let l=o;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"checkbox":{i+=r.checkbox(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Dc,Wo=(Dc=class{constructor(e){Z(this,"options");Z(this,"block");this.options=e||Hs}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Kr.lex:Kr.lexInline}provideParser(e=this.block){return e?li.parse:li.parseInline}},Z(Dc,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Z(Dc,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Dc),Dst=class{constructor(...t){Z(this,"defaults",K0());Z(this,"options",this.setOptions);Z(this,"parse",this.parseMarkdown(!0));Z(this,"parseInline",this.parseMarkdown(!1));Z(this,"Parser",li);Z(this,"Renderer",th);Z(this,"TextRenderer",nb);Z(this,"Lexer",Kr);Z(this,"Tokenizer",Ju);Z(this,"Hooks",Wo);this.use(...t)}walkTokens(t,r){var n,s;let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let o=a;for(let l of o.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let o=a;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=a;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=r.renderers[s.name];a?r.renderers[s.name]=function(...o){let l=s.renderer.apply(this,o);return l===!1&&(l=a.apply(this,o)),l}:r.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[s.level];a?a.unshift(s.tokenizer):r[s.level]=[s.tokenizer],s.start&&(s.level==="block"?r.startBlock?r.startBlock.push(s.start):r.startBlock=[s.start]:s.level==="inline"&&(r.startInline?r.startInline.push(s.start):r.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(r.childTokens[s.name]=s.childTokens)}),n.extensions=r),i.renderer){let s=this.defaults.renderer||new th(this.defaults);for(let a in i.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,l=i.renderer[o],c=s[o];s[o]=(...u)=>{let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h||""}}n.renderer=s}if(i.tokenizer){let s=this.defaults.tokenizer||new Ju(this.defaults);for(let a in i.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,l=i.tokenizer[o],c=s[o];s[o]=(...u)=>{let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h}}n.tokenizer=s}if(i.hooks){let s=this.defaults.hooks||new Wo;for(let a in i.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,l=i.hooks[o],c=s[o];Wo.passThroughHooks.has(a)?s[o]=u=>{if(this.defaults.async&&Wo.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(s,u);return c.call(s,f)})();let h=l.call(s,u);return c.call(s,h)}:s[o]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(s,u);return f===!1&&(f=await c.apply(s,u)),f})();let h=l.apply(s,u);return h===!1&&(h=c.apply(s,u)),h}}n.hooks=s}if(i.walkTokens){let s=this.defaults.walkTokens,a=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(a.call(this,o)),s&&(l=l.concat(s.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Kr.lex(t,r??this.defaults)}parser(t,r){return li.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},s={...this.defaults,...n},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(r):r,l=await(s.hooks?await s.hooks.provideLexer(t):t?Kr.lex:Kr.lexInline)(o,s),c=s.hooks?await s.hooks.processAllTokens(l):l;s.walkTokens&&await Promise.all(this.walkTokens(c,s.walkTokens));let u=await(s.hooks?await s.hooks.provideParser(t):t?li.parse:li.parseInline)(c,s);return s.hooks?await s.hooks.postprocess(u):u})().catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let o=(s.hooks?s.hooks.provideLexer(t):t?Kr.lex:Kr.lexInline)(r,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let l=(s.hooks?s.hooks.provideParser(t):t?li.parse:li.parseInline)(o,s);return s.hooks&&(l=s.hooks.postprocess(l)),l}catch(o){return a(o)}}}onError(t,r){return i=>{if(i.message+=`
575
- Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+vi(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},Bs=new Dst;function we(e,t){return Bs.parse(e,t)}we.options=we.setOptions=function(e){return Bs.setOptions(e),we.defaults=Bs.defaults,h3(we.defaults),we};we.getDefaults=K0;we.defaults=Hs;we.use=function(...e){return Bs.use(...e),we.defaults=Bs.defaults,h3(we.defaults),we};we.walkTokens=function(e,t){return Bs.walkTokens(e,t)};we.parseInline=Bs.parseInline;we.Parser=li;we.parser=li.parse;we.Renderer=th;we.TextRenderer=nb;we.Lexer=Kr;we.lexer=Kr.lex;we.Tokenizer=Ju;we.Hooks=Wo;we.parse=we;we.options;we.setOptions;we.use;we.walkTokens;we.parseInline;li.parse;Kr.lex;var Pst=300,Mst="300px",Fst=500;function $st(e={}){let{immediate:t=!1,debounceDelay:r=Pst,rootMargin:i=Mst,idleTimeout:n=Fst}=e,[s,a]=Q.useState(!1),o=Q.useRef(null),l=Q.useRef(null),c=Q.useRef(null),u=Q.useMemo(()=>d=>{let p=Date.now();return window.setTimeout(()=>{d({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-p))})},1)},[]),h=Q.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(d,p)=>window.requestIdleCallback(d,p):u,[u]),f=Q.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?d=>window.cancelIdleCallback(d):d=>{clearTimeout(d)},[]);return Q.useEffect(()=>{if(t){a(!0);return}let d=o.current;if(!d)return;l.current&&(clearTimeout(l.current),l.current=null),c.current&&(f(c.current),c.current=null);let p=()=>{l.current&&(clearTimeout(l.current),l.current=null),c.current&&(f(c.current),c.current=null)},g=k=>{c.current=h(T=>{T.timeRemaining()>0||T.didTimeout?(a(!0),k.disconnect()):c.current=h(()=>{a(!0),k.disconnect()},{timeout:n/2})},{timeout:n})},b=k=>{p(),l.current=window.setTimeout(()=>{var T,E;let S=k.takeRecords();(S.length===0||(E=(T=S.at(-1))==null?void 0:T.isIntersecting)!=null&&E)&&g(k)},r)},m=(k,T)=>{k.isIntersecting?b(T):p()},_=new IntersectionObserver(k=>{for(let T of k)m(T,_)},{rootMargin:i,threshold:0});return _.observe(d),()=>{l.current&&clearTimeout(l.current),c.current&&f(c.current),_.disconnect()}},[t,r,i,n,f,h]),{shouldRender:s,containerRef:o}}var Hst=320,zst=4,_3=()=>typeof performance>"u"?Date.now():performance.now();function D_(e){var t,r;let i=(t=e==null?void 0:e.now)!=null?t:_3,n=(r=e==null?void 0:e.maxBacklogMs)!=null?r:Hst,s=0,a=0;return{now:i,beginPass(o){a=Math.min(Math.max(s,o),o+n)},mark(){return a},rewind(o){a=o},take(o,l,c){if(o<=0)return{baseDelay:0,step:Math.max(0,l)};let u=Math.max(0,l),h=u===0?0:Math.min(u,zst),f=Math.max(a,c),d=c+n,p=f+Math.max(0,o-1)*u,g=u;if(p>d&&o>1)if(f<d){let m=d-f;g=Math.max(h,m/(o-1))}else g=h;let b=Math.max(0,Math.round(f-c));return a=f+o*g,{baseDelay:b,step:g}},commitPass(){s=a}}}var k3=/\s/,sb=/^\s+$/,Ust=new Set(["pre","svg","math","annotation"]),qst=new Set(["img","hr"]),Kl=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",ab=e=>e.some(t=>Kl(t)&&Ust.has(t.tagName)),Wst=e=>{for(let t=e.length-1;t>=0;t--){let r=e[t];if(Kl(r)&&r.tagName==="li")return r}},jst=(e,t,r,i)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate-marker"]=!0;let n=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${n}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(r)}ms;--sd-marker-easing:${i}`},Vst=new Set(["ul","ol","li"]),T3=e=>{for(let t of e.children)if(Kl(t)){if(t.tagName==="input")return t;if(Vst.has(t.tagName))continue;let r=T3(t);if(r)return r}},E3=(e,t,r,i)=>{e.properties!=null||(e.properties={}),e.properties["data-sd-animate"]=!0;let n=typeof e.properties.style=="string"?`${e.properties.style};`:"";e.properties.style=`${n}--sd-animation:sd-${t.animation};--sd-duration:${r}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(i)}ms`},Gst=(e,t,r,i)=>{let n=T3(e);n&&E3(n,t,r,i)},Yst=(e,t,r,i,n,s)=>{if(ab(t))return;let a=i.prevContentLength,o=n.count;n.count+=1;let l=a>0&&o<a,c=l?0:s.baseDelay+n.newIndex++*s.step;E3(e,r,l?0:r.duration,c)},Xst=e=>{var t;for(let r=e.length-1;r>=0;r-=1){let i=e[r];if(Kl(i)){if((t=i.properties)!=null&&t["data-sd-animated"])break;i.properties={...i.properties,"data-sd-animated":!0}}}},w3=e=>{let t=[],r="",i=!1;for(let n of e){let s=k3.test(n);if(s!==i&&r){if(s){r+=n,i=!0;continue}t.push(r),r=""}r+=n,i=s}return r&&t.push(r),t},S3=e=>{let t=[],r="";for(let i of e)k3.test(i)?t.length>0&&!sb.test(t.at(-1))?t[t.length-1]+=i:r+=i:(r&&(t.push(r),r=""),t.push(i));return r&&(t.length>0?t[t.length-1]+=r:t.push(r)),t},Kst=(e,t,r,i,n,s)=>{let a=`--sd-animation:sd-${t};--sd-duration:${n?0:r}ms;--sd-easing:${i}`;return s&&(a+=`;--sd-delay:${Math.round(s)}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:a},children:[{type:"text",value:e}]}},P_=(e,t)=>!(e>0&&t<e),wg=e=>Kl(e)&&qst.has(e.tagName),Qst=(e,t,r)=>{let i=0,n=0;return Fh(e,s=>s.type==="text"||wg(s),(s,a)=>{if(ab(a))return ds;if(wg(s)){P_(r,n)&&(i+=1),n+=1;return}let o=s.value;if(!o.trim()){n+=o.length;return}let l=t.sep==="char"?S3(o):w3(o);for(let c of l){let u=n;n+=c.length,!sb.test(c)&&P_(r,u)&&(i+=1)}}),i},Zst=(e,t,r,i,n,s)=>{var a;let o=t.at(-1);if(!(o&&"children"in o))return;if(ab(t))return ds;let l=o,c=l.children.indexOf(e);if(c===-1)return;let u=e.value;if(!u.trim()){n.count+=u.length;return}let h=r.sep==="char"?S3(u):w3(u),f=i.prevContentLength,d=!1,p=Wst(t),g=!!(p&&!((a=p.properties)!=null&&a["data-sd-animate-marker"])),b=!1,m=h.map(_=>{let k=n.count;if(n.count+=_.length,sb.test(_))return{type:"text",value:_};let T=f>0&&k<f,E=T?0:s.baseDelay+n.newIndex++*s.step;if(d=!0,p&&g&&!b){let S=T?0:r.duration;jst(p,S,E,r.easing),Gst(p,r,S,E),b=!0}return Kst(_,r.animation,r.duration,r.easing,T,E)});return d&&Xst(t),l.children.splice(c,1,...m),c+m.length},Jst=0;function A3(e){var t,r,i,n,s;let a={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(r=e==null?void 0:e.duration)!=null?r:150,easing:(i=e==null?void 0:e.easing)!=null?i:"ease",sep:(n=e==null?void 0:e.sep)!=null?n:"word",stagger:(s=e==null?void 0:e.stagger)!=null?s:40,timeline:e==null?void 0:e.timeline},o={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},l=Jst++,c=()=>u=>{var h;let f={count:0,newIndex:0};o.prevContentLength=o.committedCharCount;let d=a.timeline,p=(h=d==null?void 0:d.now())!=null?h:_3();d&&(o.pendingMark===null?o.pendingMark=d.mark():d.rewind(o.pendingMark));let g=d?d.take(Qst(u,a,o.prevContentLength),a.stagger,p):{baseDelay:0,step:a.stagger};Fh(u,b=>b.type==="text"||wg(b),(b,m)=>{if(b.type==="text")return Zst(b,m,a,o,f,g);Yst(b,m,a,o,f,g)}),o.lastRenderCharCount=f.count,o.prevContentLength=0};return Object.defineProperty(c,"name",{value:`rehypeAnimate$${l}`}),{name:"animate",type:"animate",rehypePlugin:c,setPrevContentLength(u){o.committedCharCount=u,o.prevContentLength=u},getLastRenderCharCount(){return o.lastRenderCharCount},commit(){o.committedCharCount=o.lastRenderCharCount,o.pendingMark=null}}}A3();var v3=Q.createContext(!1),tat=()=>Q.useContext(v3),Kh=(...e)=>t3(tk(e)),eat=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(i=>i.startsWith(r)?i:`${e}:${i}`).join(" ")},rat=e=>e?(...t)=>eat(e,t3(tk(t))):Kh,ma=(e,t,r)=>{let i=typeof t=="string"&&r.startsWith("text/csv")?"\uFEFF":"",n=typeof t=="string"?new Blob([i+t],{type:r}):t,s=URL.createObjectURL(n),a=document.createElement("a");a.href=s,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)},Sg=Q.createContext(Kh),ge=()=>Q.useContext(Sg),iat=8,L3=e=>{if(!(e===void 0||e===0||e===Number.POSITIVE_INFINITY)){if(typeof e=="number")return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(!(e==="0"||e==="none"||e==="Infinity"))return e}},I3=(e,t,r)=>{let i=Q.useRef(null),n=Q.useRef(!0),s=Q.useRef(!1);return Q.useEffect(()=>{let a=i.current;if(!(a&&t))return;let o=()=>{let l=a.scrollHeight-a.scrollTop-a.clientHeight<iat;n.current=l};return a.addEventListener("scroll",o,{passive:!0}),()=>a.removeEventListener("scroll",o)},[t]),Q.useEffect(()=>{e&&!s.current&&(n.current=!0),e||(n.current=!0),s.current=e},[e]),Q.useEffect(()=>{let a=i.current;a&&t&&e&&n.current&&a.scrollTo({top:a.scrollHeight,behavior:"instant"})},[e,t,r]),i},nat=Kh("block"),sat=Kh("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),aat=e=>{let t={};for(let r of e.split(";")){let i=r.indexOf(":");if(i>0){let n=r.slice(0,i).trim(),s=r.slice(i+1).trim();n&&s&&(t[n]=s)}}return t},oat=Q.memo(({children:e,result:t,language:r,className:i,maxHeight:n,startLine:s,lineNumbers:a=!0,...o})=>{let l=ge(),{isAnimating:c}=Q.useContext(cr),u=L3(n),h=I3(c,!!u,t),f=Q.useMemo(()=>l(sat),[l]),d=Q.useMemo(()=>l(nat),[l]),p=Q.useMemo(()=>{let g={};return t.bg&&(g["--sdm-bg"]=t.bg),t.fg&&(g["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(g,aat(t.rootStyle)),g},[t.bg,t.fg,t.rootStyle]);return z.jsx("div",{className:l(i,u?"overflow-y-auto":null,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",ref:h,style:u?{maxHeight:u}:void 0,...o,children:z.jsx("pre",{className:l(i,"bg-[var(--sdm-bg,inherit)]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]"),style:p,children:z.jsx("code",{className:a?l("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((g,b)=>z.jsx("span",{className:a?f:d,children:g.length===0||g.length===1&&g[0].content===""?`
576
- `:g.map((m,_)=>{let k={},T=!!m.bgColor;if(m.color&&(k["--sdm-c"]=m.color),m.bgColor&&(k["--sdm-tbg"]=m.bgColor),m.htmlStyle)for(let[E,S]of Object.entries(m.htmlStyle))E==="color"?k["--sdm-c"]=S:E==="background-color"?(k["--sdm-tbg"]=S,T=!0):k[E]=S;return z.jsx("span",{className:l("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",T&&"bg-[var(--sdm-tbg)]",T&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:k,...m.htmlAttrs,children:m.content},_)})},b))})})})}),lat=({className:e,language:t,style:r,isIncomplete:i,...n})=>{let s=ge();return z.jsx("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":i||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...n})},B3=Q.createContext({code:""}),R3=()=>Q.useContext(B3),cat=({language:e})=>{let t=ge();return z.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:z.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},uat=e=>{let t=e.length;for(;t>0&&e[t-1]===`
577
- `;)t--;return e.slice(0,t)},hat=Q.lazy(()=>I(()=>import("./highlighted-body-KPVGNVTW-gt1u8RcC.js"),__vite__mapDeps([162,102,103,104])).then(e=>({default:e.HighlightedCodeBlockBody}))),dat=({code:e,language:t,className:r,children:i,isIncomplete:n=!1,startLine:s,lineNumbers:a,...o})=>{let l=ge(),{codeBlockMaxHeight:c}=Q.useContext(cr),u=Q.useMemo(()=>uat(e),[e]),h=Q.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:u.split(`
578
- `).map(f=>[{content:f,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[u]);return z.jsx(B3.Provider,{value:{code:e},children:z.jsxs(lat,{dir:"ltr",isIncomplete:n,language:t,children:[z.jsx(cat,{language:t}),i?z.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:z.jsx("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:i})}):null,z.jsx(Q.Suspense,{fallback:z.jsx(oat,{className:r,language:t,lineNumbers:a,maxHeight:c,result:h,startLine:s,...o}),children:z.jsx(hat,{className:r,code:u,language:t,lineNumbers:a,maxHeight:c,raw:h,startLine:s,...o})})]})})},fat=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),pat=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),gat=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),mat=e=>z.jsxs("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[z.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),z.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),bat=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),yat=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),xat=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Cat=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),_at=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),kat=e=>z.jsx("svg",{"aria-hidden":"true",color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:z.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),jo={CheckIcon:fat,CopyIcon:pat,DownloadIcon:gat,ExternalLinkIcon:Cat,Loader2Icon:mat,Maximize2Icon:bat,RotateCcwIcon:yat,XIcon:xat,ZoomInIcon:_at,ZoomOutIcon:kat},O3=Q.createContext(jo),Tat=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),i=Object.keys(t);return r.length!==i.length?!1:r.every(n=>e[n]===t[n])},M_=({icons:e,children:t})=>{let r=Q.useRef(e),i=Q.useRef(e?{...jo,...e}:jo);Tat(r.current,e)||(r.current=e,i.current=e?{...jo,...e}:jo);let n=i.current;return z.jsx(O3.Provider,{value:n,children:t})},Ci=()=>Q.useContext(O3),N3={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",zoomIn:"Zoom in",zoomOut:"Zoom out",resetView:"Reset zoom and pan",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Ag=Q.createContext(N3),ji=()=>Q.useContext(Ag),vg=({onCopy:e,onError:t,timeout:r=2e3,children:i,className:n,code:s,...a})=>{let o=ge(),[l,c]=Q.useState(!1),u=Q.useRef(0),{code:h}=R3(),{isAnimating:f}=Q.useContext(cr),d=ji(),p=s??h,g=async()=>{var _;if(typeof window>"u"||!((_=navigator==null?void 0:navigator.clipboard)!=null&&_.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(p),c(!0),e==null||e(),u.current=window.setTimeout(()=>c(!1),r))}catch(k){t==null||t(k)}};Q.useEffect(()=>()=>{window.clearTimeout(u.current)},[]);let b=Ci(),m=l?b.CheckIcon:b.CopyIcon;return z.jsxs(z.Fragment,{children:[z.jsx("button",{"aria-label":d.copyCode,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),"data-streamdown":"code-block-copy-button",disabled:f,onClick:g,title:d.copyCode,type:"button",...a,children:i??z.jsx(m,{"aria-hidden":"true",size:14})}),l&&z.jsx("output",{"aria-live":"polite",className:"sr-only",children:d.copied})]})},ob=(e,t,r)=>{if(typeof e=="boolean")return r;let i=e[t];if(typeof i!="object")return r;let n=i.download;return typeof n!="object"?r:n.filename||r},F_={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Eat=({onDownload:e,onError:t,language:r,children:i,className:n,code:s,...a})=>{let o=ge(),{code:l}=R3(),{isAnimating:c,controls:u}=Q.useContext(cr),h=ji(),f=Ci(),d=s??l,p=r&&r in F_?F_[r]:"txt",g=`${ob(u,"code","file")}.${p}`,b="text/plain",m=()=>{try{ma(g,d,b),e==null||e()}catch(_){t==null||t(_)}};return z.jsx("button",{"aria-label":h.downloadFile,className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),"data-streamdown":"code-block-download-button",disabled:c,onClick:m,title:h.downloadFile,type:"button",...a,children:i??z.jsx(f.DownloadIcon,{size:14})})},$_=()=>{let{Loader2Icon:e}=Ci(),t=ge();return z.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[z.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),z.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:z.jsx(e,{className:t("size-4 animate-spin")})})]})},wat=/\.[^/.]+$/,Sat=({node:e,className:t,src:r,alt:i,onLoad:n,onError:s,showControls:a=!0,showDownloadControl:o=!0,...l})=>{let{DownloadIcon:c}=Ci(),u=ge(),h=Q.useRef(null),[f,d]=Q.useState(!1),[p,g]=Q.useState(!1),b=ji(),m=l.width!=null||l.height!=null,_=(f||m)&&!p&&a&&o,k=p&&!m;Q.useEffect(()=>{let B=h.current;if(B!=null&&B.complete){let L=B.naturalWidth>0;d(L),g(!L)}},[]);let T=Q.useCallback(B=>{d(!0),g(!1),n==null||n(B)},[n]),E=Q.useCallback(B=>{d(!1),g(!0),s==null||s(B)},[s]),S=async()=>{if(r)try{let B=await(await fetch(r)).blob(),L=new URL(r,window.location.origin).pathname.split("/").pop()||"",W=L.split(".").pop(),O=L.includes(".")&&W!==void 0&&W.length<=4,$="";if(O)$=L;else{let X=B.type,G="png";X.includes("jpeg")||X.includes("jpg")?G="jpg":X.includes("png")?G="png":X.includes("svg")?G="svg":X.includes("gif")?G="gif":X.includes("webp")&&(G="webp"),$=`${(i||L||"image").replace(wat,"")}.${G}`}ma($,B,B.type)}catch{window.open(r,"_blank")}};return r?z.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[z.jsx("img",{alt:i,className:u("max-w-full rounded-lg",k&&"hidden",t),"data-streamdown":"image",onError:E,onLoad:T,ref:h,src:r,...l}),k&&z.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:b.imageNotAvailable}),a&&z.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"),"data-streamdown":"image-overlay"}),_&&z.jsx("button",{className:u("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:S,title:b.downloadImage,type:"button",children:z.jsx(c,{size:14})})]}):null},cl=0,lb=()=>{cl+=1,cl===1&&(document.body.style.overflow="hidden")},cb=()=>{cl=Math.max(0,cl-1),cl===0&&(document.body.style.overflow="")},Aat=({url:e,isOpen:t,onClose:r,onConfirm:i})=>{let{CheckIcon:n,CopyIcon:s,ExternalLinkIcon:a,XIcon:o}=Ci(),l=ge(),[c,u]=Q.useState(!1),h=ji(),f=Q.useCallback(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),d=Q.useCallback(()=>{i(),r()},[i,r]);if(Q.useEffect(()=>{if(t){lb();let g=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),cb()}}},[t,r]),!t||typeof document>"u")return null;let p=z.jsx("div",{className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:g=>{g.key==="Escape"&&r()},role:"button",tabIndex:0,children:z.jsxs("div",{className:l("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[z.jsx("button",{className:l("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:h.close,type:"button",children:z.jsx(o,{size:16})}),z.jsxs("div",{className:l("flex flex-col gap-2"),children:[z.jsxs("div",{className:l("flex items-center gap-2 font-semibold text-lg"),children:[z.jsx(a,{size:20}),z.jsx("span",{children:h.openExternalLink})]}),z.jsx("p",{className:l("text-muted-foreground text-sm"),children:h.externalLinkWarning})]}),z.jsx("div",{className:l("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),z.jsxs("div",{className:l("flex gap-2"),children:[z.jsx("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:f,type:"button",children:c?z.jsxs(z.Fragment,{children:[z.jsx(n,{size:14}),z.jsx("span",{children:h.copied})]}):z.jsxs(z.Fragment,{children:[z.jsx(s,{size:14}),z.jsx("span",{children:h.copyLink})]})}),z.jsxs("button",{className:l("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:d,type:"button",children:[z.jsx(a,{size:14}),z.jsx("span",{children:h.openLink})]})]})]})});return Og.createPortal(p,document.body)},Lg=Q.createContext(null),ub=()=>Q.useContext(Lg),Wlt=()=>{var e;let t=ub();return(e=t==null?void 0:t.code)!=null?e:null},hb=()=>{var e;let t=ub();return(e=t==null?void 0:t.mermaid)!=null?e:null},vat=e=>{var t;let r=ub();return r!=null&&r.renderers&&e&&(t=r.renderers.find(i=>Array.isArray(i.language)?i.language.includes(e):i.language===e))!=null?t:null},Lat=e=>{if(typeof DOMParser>"u"||typeof XMLSerializer>"u")return e;let t=new DOMParser().parseFromString(e,"text/html").querySelector("svg");return t?new XMLSerializer().serializeToString(t):e},Iat=(e,t)=>{var r;let i=(r=void 0)!=null?r:5;return new Promise((n,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let l=document.createElement("canvas"),c=o.width*i,u=o.height*i;l.width=c,l.height=u;let h=l.getContext("2d");if(!h){s(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(o,0,0,c,u),l.toBlob(f=>{if(!f){s(new Error("Failed to create PNG blob"));return}n(f)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},D3=({chart:e,children:t,className:r,onDownload:i,config:n,onError:s})=>{let a=ge(),[o,l]=Q.useState(!1),c=Q.useRef(null),{isAnimating:u,controls:h}=Q.useContext(cr),f=Ci(),d=hb(),p=ji(),g=ob(h,"mermaid","diagram"),b=async m=>{try{if(m==="mmd"){let B=`${g}.mmd`;ma(B,e,"text/plain"),l(!1),i==null||i(m);return}if(!d){s==null||s(new Error("Mermaid plugin not available"));return}let _=d.getMermaid(n),k=e.split("").reduce((B,L)=>(B<<5)-B+L.charCodeAt(0)|0,0),T=`mermaid-${Math.abs(k)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:E}=await _.render(T,e);if(!E){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}let S=Lat(E);if(m==="svg"){let B=`${g}.svg`;ma(B,S,"image/svg+xml"),l(!1),i==null||i(m);return}if(m==="png"){let B=await Iat(S);ma(`${g}.png`,B,"image/png"),i==null||i(m),l(!1);return}}catch(_){s==null||s(_)}};return Q.useEffect(()=>{let m=_=>{let k=_.composedPath();c.current&&!k.includes(c.current)&&l(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[]),z.jsxs("div",{className:a("relative"),ref:c,children:[z.jsx("button",{"aria-label":p.downloadDiagram,className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:u,onClick:()=>l(!o),title:p.downloadDiagram,type:"button",children:t??z.jsx(f.DownloadIcon,{"aria-hidden":"true",size:14})}),o?z.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[z.jsx("button",{"aria-label":p.downloadDiagramAsSvg,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("svg"),title:p.downloadDiagramAsSvg,type:"button",children:p.mermaidFormatSvg}),z.jsx("button",{"aria-label":p.downloadDiagramAsPng,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("png"),title:p.downloadDiagramAsPng,type:"button",children:p.mermaidFormatPng}),z.jsx("button",{"aria-label":p.downloadDiagramAsMmd,className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("mmd"),title:p.downloadDiagramAsMmd,type:"button",children:p.mermaidFormatMmd})]}):null]})},Bat=({chart:e,config:t,onFullscreen:r,onExit:i,className:n,...s})=>{let{Maximize2Icon:a,XIcon:o}=Ci(),l=ge(),[c,u]=Q.useState(!1),{isAnimating:h,controls:f}=Q.useContext(cr),d=ji(),p=(()=>{if(typeof f=="boolean")return f;let _=f.mermaid;return _===!1?!1:_===!0||_===void 0?!0:_.panZoom!==!1})(),g=(()=>{if(typeof f=="boolean")return f;let _=f.mermaid;return _===!1?!1:_===!0||_===void 0?!0:_.download!==!1})(),b=(()=>{if(typeof f=="boolean")return f;let _=f.mermaid;return _===!1?!1:_===!0||_===void 0?!0:_.copy!==!1})(),m=()=>{u(!c)};return Q.useEffect(()=>{if(c){lb();let _=k=>{k.key==="Escape"&&u(!1)};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_),cb()}}},[c]),Q.useEffect(()=>{c?r==null||r():i&&i()},[c,r,i]),z.jsxs(z.Fragment,{children:[z.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:h,onClick:m,title:d.viewFullscreen,type:"button",...s,"aria-label":d.viewFullscreen,children:z.jsx(a,{"aria-hidden":"true",size:14})}),c?Og.createPortal(z.jsxs("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:l("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),"data-streamdown":"mermaid-fullscreen",onClick:m,onKeyDown:_=>{_.key==="Escape"&&m()},role:"dialog",children:[z.jsxs("div",{className:l("absolute top-4 right-4 z-10 flex items-center gap-1"),onClick:_=>_.stopPropagation(),onKeyDown:_=>_.stopPropagation(),role:"presentation",children:[g?z.jsx(D3,{chart:e,config:t}):null,b?z.jsx(vg,{code:e}):null,z.jsx("button",{"aria-label":d.exitFullscreen,className:l("rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:m,title:d.exitFullscreen,type:"button",children:z.jsx(o,{"aria-hidden":"true",size:20})})]}),z.jsx("div",{className:l("flex size-full items-center justify-center p-4"),onClick:_=>_.stopPropagation(),onKeyDown:_=>_.stopPropagation(),role:"presentation",children:z.jsx(kI,{chart:e,className:l("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:p})})]}),document.body):null]})};function Ig(e){var t;if(e.nodeType===Node.TEXT_NODE)return(t=e.textContent)!=null?t:"";if(e.nodeType!==Node.ELEMENT_NODE)return"";let r=e;return r.tagName==="BR"?`
579
- `:Array.from(r.childNodes).map(Ig).join("")}var P3=e=>{let t=[],r=[],i=e.querySelectorAll("thead th");for(let s of i)t.push(Ig(s).trim());let n=e.querySelectorAll("tbody tr");for(let s of n){let a=[],o=s.querySelectorAll("td");for(let l of o)a.push(Ig(l).trim());r.push(a)}return{headers:t,rows:r}},M3=e=>{var t;if(typeof e!="object")return",";let r=e.table;return typeof r!="object"?",":(t=r.csvSeparator)!=null?t:","},F3=(e,t=",")=>{let r;t==="auto"?Intl.NumberFormat().format(1.1).includes(",")?r=";":r=",":r=t;let{headers:i,rows:n}=e,s=c=>{let u=!1;for(let h of c)if(h===r||h==='"'||h===`
580
- `||h==="\r"){u=!0;break}return u?`"${c.replace(/"/g,'""')}"`:c},a=i.length>0?n.length+1:n.length,o=new Array(a),l=0;i.length>0&&(o[l]=i.map(s).join(r),l+=1);for(let c of n)o[l]=c.map(s).join(r),l+=1;return o.join(`
581
- `)},Rat=e=>{let{headers:t,rows:r}=e,i=o=>{let l=!1;for(let u of o)if(u===" "||u===`
582
- `||u==="\r"){l=!0;break}if(!l)return o;let c=[];for(let u of o)u===" "?c.push("\\t"):u===`
583
- `?c.push("\\n"):u==="\r"?c.push("\\r"):c.push(u);return c.join("")},n=t.length>0?r.length+1:r.length,s=new Array(n),a=0;t.length>0&&(s[a]=t.map(i).join(" "),a+=1);for(let o of r)s[a]=o.map(i).join(" "),a+=1;return s.join(`
584
- `)},Zf=e=>{let t=!1;for(let i of e)if(i==="\\"||i==="|"||i===`
585
- `){t=!0;break}if(!t)return e;let r=[];for(let i of e)i==="\\"?r.push("\\\\"):i==="|"?r.push("\\|"):i===`
586
- `?r.push("<br>"):r.push(i);return r.join("")},$3=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let i=new Array(r.length+2),n=0,s=t.map(o=>Zf(o));i[n]=`| ${s.join(" | ")} |`,n+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";i[n]=`| ${a.join(" | ")} |`,n+=1;for(let o of r)if(o.length<t.length){let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]=c<o.length?Zf(o[c]):"";i[n]=`| ${l.join(" | ")} |`,n+=1}else{let l=o.map(c=>Zf(c));i[n]=`| ${l.join(" | ")} |`,n+=1}return i.join(`
587
- `)},H3=({children:e,className:t,onCopy:r,onError:i,timeout:n=2e3})=>{let s=ge(),[a,o]=Q.useState(!1),[l,c]=Q.useState(!1),u=Q.useRef(null),h=Q.useRef(0),{isAnimating:f,controls:d}=Q.useContext(cr),p=ji(),g=M3(d),b=async k=>{var T,E;if(typeof window>"u"||!((T=navigator==null?void 0:navigator.clipboard)!=null&&T.write)){i==null||i(new Error("Clipboard API not available"));return}try{let S=(E=u.current)==null?void 0:E.closest('[data-streamdown="table-wrapper"]'),B=S==null?void 0:S.querySelector("table");if(!B){i==null||i(new Error("Table not found"));return}let L=P3(B),W="";k==="csv"?W=F3(L,g):k==="tsv"?W=Rat(L):W=$3(L);let O=new ClipboardItem({"text/plain":new Blob([W],{type:"text/plain"}),"text/html":new Blob([B.outerHTML],{type:"text/html"})});await navigator.clipboard.write([O]),c(!0),o(!1),r==null||r(k),h.current=window.setTimeout(()=>c(!1),n)}catch(S){i==null||i(S)}};Q.useEffect(()=>{let k=T=>{let E=T.composedPath();u.current&&!E.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k),window.clearTimeout(h.current)}},[]);let m=Ci(),_=l?m.CheckIcon:m.CopyIcon;return z.jsxs("div",{className:s("relative"),ref:u,children:[z.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>o(!a),title:p.copyTable,type:"button",children:e??z.jsx(_,{height:14,width:14})}),a?z.jsxs("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[z.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("md"),title:p.copyTableAsMarkdown,type:"button",children:p.tableFormatMarkdown}),z.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("csv"),title:p.copyTableAsCsv,type:"button",children:p.tableFormatCsv}),z.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>b("tsv"),title:p.copyTableAsTsv,type:"button",children:p.tableFormatTsv})]}):null]})},z3=({children:e,className:t,onDownload:r,onError:i})=>{let n=ge(),[s,a]=Q.useState(!1),o=Q.useRef(null),{isAnimating:l,controls:c}=Q.useContext(cr),u=ji(),h=Ci(),f=M3(c),d=p=>{var g;try{let b=(g=o.current)==null?void 0:g.closest('[data-streamdown="table-wrapper"]'),m=b==null?void 0:b.querySelector("table");if(!m){i==null||i(new Error("Table not found"));return}let _=P3(m),k=p==="csv"?F3(_,f):$3(_),T=p==="csv"?"csv":"md",E=`${ob(c,"table","table")}.${T}`;ma(E,k,p==="csv"?"text/csv":"text/markdown"),a(!1),r==null||r(p)}catch(b){i==null||i(b)}};return Q.useEffect(()=>{let p=g=>{let b=g.composedPath();o.current&&!b.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),z.jsxs("div",{className:n("relative"),ref:o,children:[z.jsx("button",{className:n("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:()=>a(!s),title:u.downloadTable,type:"button",children:e??z.jsx(h.DownloadIcon,{size:14})}),s?z.jsxs("div",{className:n("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[z.jsx("button",{className:n("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:u.downloadTableAsCsv,type:"button",children:u.tableFormatCsv}),z.jsx("button",{className:n("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:u.downloadTableAsMarkdown,type:"button",children:u.tableFormatMarkdown})]}):null]})},Oat=({children:e,className:t,showCopy:r=!0,showDownload:i=!0})=>{let{Maximize2Icon:n,XIcon:s}=Ci(),a=ge(),[o,l]=Q.useState(!1),{isAnimating:c}=Q.useContext(cr),u=ji(),h=()=>{l(!0)},f=()=>{l(!1)};return Q.useEffect(()=>{if(o){lb();let d=p=>{p.key==="Escape"&&l(!1)};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),cb()}}},[o]),z.jsxs(z.Fragment,{children:[z.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:h,title:u.viewFullscreen,type:"button",children:z.jsx(n,{size:14})}),o?Og.createPortal(z.jsx("div",{"aria-label":u.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:d=>{d.key==="Escape"&&f()},role:"dialog",children:z.jsxs("div",{className:a("flex h-full flex-col"),"data-streamdown":"table-wrapper",onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),role:"presentation",children:[z.jsxs("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[r?z.jsx(H3,{}):null,i?z.jsx(z3,{}):null,z.jsx("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:u.exitFullscreen,type:"button",children:z.jsx(s,{size:20})})]}),z.jsx("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:z.jsx("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},Nat=({children:e,className:t,maxHeight:r,showControls:i,showCopy:n=!0,showDownload:s=!0,showFullscreen:a=!0,...o})=>{let l=ge(),{isAnimating:c}=Q.useContext(cr),u=L3(r),h=I3(c,!!u,e),f=i&&n,d=i&&s,p=i&&a,g=f||d||p;return z.jsxs("div",{className:l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[g?z.jsxs("div",{className:l("flex items-center justify-end gap-1"),children:[f?z.jsx(H3,{}):null,d?z.jsx(z3,{}):null,p?z.jsx(Oat,{showCopy:f,showDownload:d,children:e}):null]}):null,z.jsx("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),ref:h,style:u?{maxHeight:u}:void 0,children:z.jsx("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},Dat=/startLine=(\d+)/,Pat=/\bnoLineNumbers\b/,Mat=Q.lazy(()=>I(()=>Promise.resolve().then(()=>Uot),void 0).then(e=>({default:e.Mermaid}))),Fat=/language-([^\s]+)/,$at="node";function Le(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;let i=e,n=t;for(let s of r)if(s!==$at&&!Object.is(i[s],n[s]))return!1;return!0}function Hat(e,t){var r,i;return((r=e==null?void 0:e.properties)==null?void 0:r.metastring)===((i=t==null?void 0:t.properties)==null?void 0:i.metastring)}var eh=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Jf=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},H_=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Rc=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},zat=(e,t)=>{if(typeof e=="boolean")return e;let r=e.image;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},db=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("ol",{className:n("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...i,children:e})},(e,t)=>Le(e,t));db.displayName="MarkdownOl";var U3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("li",{className:n("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...i,children:e})},(e,t)=>Le(e,t));U3.displayName="MarkdownLi";var q3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("ul",{className:n("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...i,children:e})},(e,t)=>Le(e,t));q3.displayName="MarkdownUl";var W3=Q.memo(({className:e,node:t,...r})=>{let i=ge();return z.jsx("hr",{className:i("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>Le(e,t));W3.displayName="MarkdownHr";var j3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("span",{className:n("font-semibold",t),"data-streamdown":"strong",...i,children:e})},(e,t)=>Le(e,t));j3.displayName="MarkdownStrong";var Uat=({children:e,className:t,href:r,node:i,...n})=>{let s=ge(),{linkSafety:a}=Q.useContext(cr),[o,l]=Q.useState(!1),c=r==="streamdown:incomplete-link",u=Q.useCallback(async p=>{if(!(!(a!=null&&a.enabled&&r)||c)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}l(!0)}},[a,r,c]),h=Q.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),f=Q.useCallback(()=>{l(!1)},[]),d={url:r??"",isOpen:o,onClose:f,onConfirm:h};return a!=null&&a.enabled&&r?z.jsxs(z.Fragment,{children:[z.jsx("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",onClick:u,type:"button",children:e}),a.renderModal?a.renderModal(d):z.jsx(Aat,{...d})]}):z.jsx("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...n,children:e})},V3=Q.memo(Uat,(e,t)=>Le(e,t));V3.displayName="MarkdownA";var G3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("h1",{className:n("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...i,children:e})},(e,t)=>Le(e,t));G3.displayName="MarkdownH1";var Y3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("h2",{className:n("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...i,children:e})},(e,t)=>Le(e,t));Y3.displayName="MarkdownH2";var X3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("h3",{className:n("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...i,children:e})},(e,t)=>Le(e,t));X3.displayName="MarkdownH3";var K3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("h4",{className:n("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...i,children:e})},(e,t)=>Le(e,t));K3.displayName="MarkdownH4";var Q3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("h5",{className:n("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...i,children:e})},(e,t)=>Le(e,t));Q3.displayName="MarkdownH5";var Z3=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("h6",{className:n("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...i,children:e})},(e,t)=>Le(e,t));Z3.displayName="MarkdownH6";var J3=Q.memo(({children:e,className:t,node:r,...i})=>{let{controls:n,tableMaxHeight:s}=Q.useContext(cr),a=eh(n,"table"),o=Jf(n,"copy"),l=Jf(n,"download"),c=Jf(n,"fullscreen");return z.jsx(Nat,{className:t,maxHeight:s,showControls:a,showCopy:o,showDownload:l,showFullscreen:c,...i,children:e})},(e,t)=>Le(e,t));J3.displayName="MarkdownTable";var tI=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("thead",{className:n("bg-muted/80",t),"data-streamdown":"table-header",...i,children:e})},(e,t)=>Le(e,t));tI.displayName="MarkdownThead";var eI=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("tbody",{className:n("divide-y divide-border",t),"data-streamdown":"table-body",...i,children:e})},(e,t)=>Le(e,t));eI.displayName="MarkdownTbody";var rI=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("tr",{className:n("border-border",t),"data-streamdown":"table-row",...i,children:e})},(e,t)=>Le(e,t));rI.displayName="MarkdownTr";var iI=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("th",{className:n("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...i,children:e})},(e,t)=>Le(e,t));iI.displayName="MarkdownTh";var nI=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("td",{className:n("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...i,children:e})},(e,t)=>Le(e,t));nI.displayName="MarkdownTd";var sI=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("blockquote",{className:n("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...i,children:e})},(e,t)=>Le(e,t));sI.displayName="MarkdownBlockquote";var aI=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("sup",{className:n("text-sm",t),"data-streamdown":"superscript",...i,children:e})},(e,t)=>Le(e,t));aI.displayName="MarkdownSup";var oI=Q.memo(({children:e,className:t,node:r,...i})=>{let n=ge();return z.jsx("sub",{className:n("text-sm",t),"data-streamdown":"subscript",...i,children:e})},(e,t)=>Le(e,t));oI.displayName="MarkdownSub";var lI=Q.memo(({children:e,className:t,node:r,...i})=>{if("data-footnotes"in i){let n=a=>{var o,l;if(!Q.isValidElement(a))return!1;let c=Array.isArray(a.props.children)?a.props.children:[a.props.children],u=!1,h=!1;for(let f of c)if(f){if(typeof f=="string")f.trim()!==""&&(u=!0);else if(Q.isValidElement(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)h=!0;else{let d=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let p of d){if(typeof p=="string"&&p.trim()!==""){u=!0;break}if(Q.isValidElement(p)&&((l=p.props)==null?void 0:l["data-footnote-backref"])===void 0){u=!0;break}}}}return h&&!u},s=Array.isArray(e)?e.map(a=>{if(!Q.isValidElement(a))return a;if(a.type===db){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(l=>!n(l));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?z.jsx("section",{className:t,...i,children:s}):null}return z.jsx("section",{className:t,...i,children:e})},(e,t)=>Le(e,t));lI.displayName="MarkdownSection";var qat=({node:e,className:t,children:r,...i})=>{var n,s;let a=ge(),o=!("data-block"in i),{mermaid:l,controls:c,lineNumbers:u}=Q.useContext(cr),h=hb(),f=tat(),d=t==null?void 0:t.match(Fat),p=(n=d==null?void 0:d.at(1))!=null?n:"",g=vat(p);if(o)return z.jsx("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...i,children:r});let b=(s=e==null?void 0:e.properties)==null?void 0:s.metastring,m=b==null?void 0:b.match(Dat),_=m?Number.parseInt(m[1],10):void 0,k=_!==void 0&&_>=1?_:void 0,T=!(b&&Pat.test(b))&&u!==!1,E="";if(Q.isValidElement(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?E=r.props.children:typeof r=="string"&&(E=r),g){let $=g.component;return z.jsx(Q.Suspense,{fallback:z.jsx($_,{}),children:z.jsx($,{code:E,isIncomplete:f,language:p,meta:b})})}if(p==="mermaid"&&h){let $=eh(c,"mermaid"),X=Rc(c,"download"),G=Rc(c,"copy"),H=Rc(c,"fullscreen"),M=Rc(c,"panZoom"),N=$&&(X||G||H);return z.jsx(Q.Suspense,{fallback:z.jsx($_,{}),children:z.jsxs("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[z.jsx("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:z.jsx("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),N?z.jsx("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:z.jsxs("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[X?z.jsx(D3,{chart:E,config:l==null?void 0:l.config}):null,G?z.jsx(vg,{code:E}):null,H?z.jsx(Bat,{chart:E,config:l==null?void 0:l.config}):null]})}):null,z.jsx("div",{className:a("rounded-md border border-border bg-background"),children:z.jsx(Mat,{chart:E,config:l==null?void 0:l.config,showControls:M})})]})})}let S=eh(c,"code"),B=H_(c,"download"),L=H_(c,"copy"),{"data-block":W,...O}=i;return z.jsx(dat,{className:t,code:E,isIncomplete:f,language:p,lineNumbers:T,startLine:k,...O,children:S?z.jsxs(z.Fragment,{children:[B?z.jsx(Eat,{code:E,language:p}):null,L?z.jsx(vg,{}):null]}):null})},cI=Q.memo(qat,(e,t)=>Le(e,t)&&Hat(e.node,t.node));cI.displayName="MarkdownCode";var Wat=({node:e,className:t,...r})=>{let{controls:i}=Q.useContext(cr),n=eh(i,"image"),s=n&&zat(i,"download");return z.jsx(Sat,{className:t,node:e,showControls:n,showDownloadControl:s,...r})},uI=Q.memo(Wat,(e,t)=>Le(e,t));uI.displayName="MarkdownImg";var hI=Q.memo(({children:e,node:t,...r})=>{let i=(Array.isArray(e)?e:[e]).filter(n=>n!=null&&n!=="");if(i.length===1&&Q.isValidElement(i[0])){let n=i[0].props.node,s=n==null?void 0:n.tagName;if(s==="img")return z.jsx(z.Fragment,{children:e});if(s==="code"&&"data-block"in i[0].props)return z.jsx(z.Fragment,{children:e})}return z.jsx("p",{...r,children:e})},(e,t)=>Le(e,t));hI.displayName="MarkdownParagraph";var jat={ol:db,li:U3,ul:q3,hr:W3,strong:j3,a:V3,h1:G3,h2:Y3,h3:X3,h4:K3,h5:Q3,h6:Z3,table:J3,thead:tI,tbody:eI,tr:rI,th:iI,td:nI,blockquote:sI,code:cI,img:uI,pre:({children:e})=>Q.isValidElement(e)?Q.cloneElement(e,{"data-block":"true"}):e,sup:aI,sub:oI,p:hI,section:lI},Vat=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Gat=new RegExp("\\p{L}","u");function dI(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,"").replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,""),r,i=0,n=0;for(let s of t){if(Vat.test(s)){r!=null||(r="rtl"),n+=1;continue}Gat.test(s)&&(r!=null||(r="ltr"),i+=1)}return n>i?"rtl":i>n?"ltr":r??"ltr"}var Yat=/^[ \t]{0,3}(`{3,}|~{3,})/,Xat=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,z_=e=>{let t=e.split(`
588
- `),r=null,i=0;for(let n of t){let s=Yat.exec(n);if(r===null){if(s){let a=s[1];r=a[0],i=a.length}}else if(s){let a=s[1],o=a[0],l=a.length;o===r&&l>=i&&(r=null,i=0)}}return r!==null},Kat=e=>{let t=e.split(`
589
- `);for(let r of t){let i=r.trim();if(i.length>0&&i.includes("|")&&Xat.test(i))return!0}return!1},Qat=()=>e=>{gi(e,"html",(t,r,i)=>{!i||typeof r!="number"||(i.children[r]={type:"text",value:t.value})})},U_=[],q_={allowDangerousHtml:!0},Oc=new WeakMap,Zat=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let r=e.rehypePlugins,i=e.remarkPlugins,n=e.remarkRehypeOptions;if(!(r||i||n)){let u="default";return this.keyCache.set(e,u),u}let s=u=>{if(!u||u.length===0)return"";let h="";for(let f=0;f<u.length;f+=1){let d=u[f];if(f>0&&(h+=","),Array.isArray(d)){let[p,g]=d;if(typeof p=="function"){let b=Oc.get(p);b||(b=p.name,Oc.set(p,b)),h+=b}else h+=String(p);h+=":",h+=JSON.stringify(g)}else if(typeof d=="function"){let p=Oc.get(d);p||(p=d.name,Oc.set(d,p)),h+=p}else h+=String(d)}return h},a=s(r),o=s(i),l=n?JSON.stringify(n):"",c=`${o}::${a}::${l}`;return this.keyCache.set(e,c),c}get(e){let t=this.generateCacheKey(e),r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(e,t){let r=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;i&&this.cache.delete(i)}this.cache.set(r,t)}clear(){this.cache.clear()}},W_=new Zat,fI=e=>{let t=Jat(e),r=e.children||"",i=t.runSync(t.parse(r),r);return aot(i,e)},Jat=e=>{let t=W_.get(e);if(t)return t;let r=eot(e);return W_.set(e,r),r},tot=e=>e.some(t=>Array.isArray(t)?t[0]===dg:t===dg),eot=e=>{let t=e.rehypePlugins||U_,r=e.remarkPlugins||U_,i=tot(t)?r:[...r,Qat],n=e.remarkRehypeOptions?{...q_,...e.remarkRehypeOptions}:q_;return jnt().use(Wit).use(i).use(Snt,n).use(t)},rot=e=>e,iot=(e,t,r,i)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:i}},not=(e,t)=>{var r;for(let i in qf)if(Object.hasOwn(qf,i)&&Object.hasOwn(e.properties,i)){let n=e.properties[i],s=qf[i];(s===null||s.includes(e.tagName))&&(e.properties[i]=(r=t(String(n||""),i,e))!=null?r:void 0)}},sot=(e,t,r,i,n,s)=>{let a=!1;return i?a=!i.includes(e.tagName):n&&(a=n.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,r)),a},aot=(e,t)=>{let{allowElement:r,allowedElements:i,disallowedElements:n,skipHtml:s,unwrapDisallowed:a,urlTransform:o}=t;if(r||i||n||s||o){let l=o||rot;gi(e,(c,u,h)=>{if(c.type==="raw"&&h&&typeof u=="number")return iot(h,u,s,c.value),u;if(c.type==="element"&&(not(c,l),sot(c,u,h,i,n,r)&&h&&typeof u=="number"))return a&&c.children?h.children.splice(u,1,...c.children):h.children.splice(u,1),u})}return Zrt(e,{Fragment:z.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0})},oot=/\[\^[\w-]{1,200}\](?!:)/,lot=/\[\^[\w-]{1,200}\]:/,cot=/<([A-Za-z][\w:-]*)[\s>/]/,uot=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),j_=new Map,V_=new Map,hot=e=>{let t=e.toLowerCase(),r=j_.get(t);if(r)return r;let i=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return j_.set(t,i),i},dot=e=>{let t=e.toLowerCase(),r=V_.get(t);if(r)return r;let i=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return V_.set(t,i),i},G_=(e,t)=>{if(uot.has(t.toLowerCase()))return 0;let r=e.match(hot(t));if(!r)return 0;let i=0;for(let n of r)n.trimEnd().endsWith("/>")||(i+=1);return i},Y_=(e,t)=>{let r=e.match(dot(t));return r?r.length:0},fot=e=>{let t=0;for(let r=0;r<e.length-1;r+=1)e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},pot=e=>{let t=oot.test(e),r=lot.test(e);if(t||r)return[e];let i=Kr.lex(e,{gfm:!0}),n=[],s=[],a=!1;for(let o of i){let l=o.raw,c=n.length;if(s.length>0){n[c-1]+=l;let u=s.at(-1),h=G_(l,u),f=Y_(l,u);for(let d=0;d<h;d+=1)s.push(u);for(let d=0;d<f;d+=1)s.length>0&&s.at(-1)===u&&s.pop();continue}if(o.type==="html"&&o.block){let u=l.match(cot);if(u){let h=u[1],f=G_(l,h),d=Y_(l,h);f>d&&s.push(h)}}if(c>0&&!a){let u=n[c-1];if(fot(u)%2===1){n[c-1]=u+l;continue}}n.push(l),o.type!=="space"&&(a=o.type==="code")}return n},got=/^\n*/,mot=/\n*$/,Bg=/\n\n/g,bot=(e,t,r)=>{if(!t.includes(`
590
- `))return e+t+r;let i=t.replace(Bg,`
591
- <!---->
592
- `).replace(got,`
593
-
594
- `).replace(mot,`
595
-
596
- `);return`${e}${i}${r}
597
-
598
- `},yot=(e,t)=>{let r=new RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,"gi"),i="",n=0,s=r.exec(e);for(;s;){let a=s[0],o=s[1],l=s.index+a.length,c=e.slice(l);if(new RegExp(`</${o}\\s*>`,"i").test(c)){s=r.exec(e);continue}if(i+=e.slice(n,s.index),c.length===0){i+=a,n=l,s=r.exec(e);continue}if(c.startsWith(`
599
-
600
- `)){let f=c.slice(2).replace(Bg,`
601
- <!---->
602
- `);i+=`${a}
603
-
604
- ${f}`,n=e.length;break}if(!c.startsWith(`
605
- `)){i+=a,n=l,s=r.exec(e);continue}let u=c.slice(1);if(u.trim().length===0){i+=a,n=l,s=r.exec(e);continue}let h=u.replace(Bg,`
606
- <!---->
607
- `);i+=`${a}
608
-
609
- ${h}`,n=e.length;break}return n===0?e:i+e.slice(n)},xot=(e,t)=>{if(!t.length)return e;let r=e;for(let i of t){let n=new RegExp(`(<${i}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${i}\\s*>)`,"gi");r=r.replace(n,(s,a,o,l)=>bot(a,o,l)),r=yot(r,i)}return r},Cot=/([\\`*_~[\]|])/g,_ot=e=>e.replace(Cot,"\\$1"),kot=(e,t)=>{if(!t.length)return e;let r=e;for(let i of t){let n=new RegExp(`(<${i}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${i}\\s*>)`,"gi");r=r.replace(n,(s,a,o,l)=>{let c=_ot(o).replace(/\n\n/g,"&#10;&#10;");return a+c+l})}return r},Tot=new Set(["blockquote","dd","dt","figcaption","h1","h2","h3","h4","h5","h6","li","p","td","th"]),pI=new Set(["code","kbd","pre","samp","var"]);function gI(e){return e.children.map(t=>t.type==="text"?t.value:t.type==="element"&&!pI.has(t.tagName)?gI(t):"").join("")}function Eot(){return e=>{gi(e,"element",t=>{if(pI.has(t.tagName)){t.properties!=null||(t.properties={}),t.properties.dir="ltr";return}Tot.has(t.tagName)&&(t.properties!=null||(t.properties={}),typeof t.properties.dir!="string"&&(t.properties.dir=dI(gI(t))))})}}var mI=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(mI).join(""):"",wot=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(i=>i.toLowerCase()));gi(t,"element",i=>{if(r.has(i.tagName.toLowerCase())){let n=mI(i);i.children=n?[{type:"text",value:n}]:[]}})},Sot=()=>e=>{gi(e,"code",t=>{var r,i;t.meta&&(t.data=(r=t.data)!=null?r:{},t.data.hProperties={...(i=t.data.hProperties)!=null?i:{},metastring:t.meta})})},Aot=/^[ \t]*<[\w!/?-]/,vot=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,Lot=e=>typeof e!="string"||e.length===0||!Aot.test(e)?e:e.replace(vot,"$1"),X_,K_,Q_,Z_,ru={...ss,clobberPrefix:"",protocols:{...ss.protocols,href:[...(K_=(X_=ss.protocols)==null?void 0:X_.href)!=null?K_:[],"tel","streamdown"]},attributes:{...ss.attributes,code:[...(Z_=(Q_=ss.attributes)==null?void 0:Q_.code)!=null?Z_:[],"metastring"]}},Rg={raw:dg,sanitize:[Zv,ru],harden:[mG,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},bI={gfm:[Ltt,{}],codeMeta:Sot},J_=Object.values(Rg),Iot=Object.values(bI),Bot={block:" ▋",circle:" ●"},yI=["github-light","github-dark"],xI={enabled:!0},Rot={codeBlockMaxHeight:400,shikiTheme:yI,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:xI,tableMaxHeight:300},cr=Q.createContext(Rot),CI=Q.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:i,isIncomplete:n,dir:s,animatePlugin:a,...o})=>{Q.useLayoutEffect(()=>{a==null||a.commit()});let l=typeof e=="string"&&r?Lot(e):e,c=z.jsx(fI,{...o,children:l});return z.jsx(v3.Provider,{value:n,children:s?z.jsx("div",{dir:s,style:{display:"contents"},children:c}):c})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),i=Object.keys(t.components||{});if(r.length!==i.length||r.some(n=>{var s,a;return((s=e.components)==null?void 0:s[n])!==((a=t.components)==null?void 0:a[n])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins||!!e.animatePlugin!=!!t.animatePlugin)});CI.displayName="Block";var _I=Q.memo(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:i=!0,normalizeHtmlIndentation:n=!1,components:s,rehypePlugins:a=J_,remarkPlugins:o=Iot,className:l,shikiTheme:c,mermaid:u,codeBlockMaxHeight:h=400,controls:f=!0,isAnimating:d=!1,tableMaxHeight:p=300,animated:g,BlockComponent:b=CI,parseMarkdownIntoBlocksFn:m=pot,caret:_,plugins:k,remend:T,linkSafety:E=xI,lineNumbers:S=!0,allowedTags:B,literalTagContent:L,translations:W,icons:O,prefix:$,onAnimationStart:X,onAnimationEnd:G,...H})=>{let M=Q.useId(),N=Q.useMemo(()=>rat($),[$]),q=Q.useRef(null),V=Q.useRef(X),tt=Q.useRef(G);V.current=X,tt.current=G,Q.useEffect(()=>{var zt,ie,Ie;if(t==="static")return;let xe=q.current;if(q.current=d,xe===null){d&&((zt=V.current)==null||zt.call(V));return}d&&!xe?(ie=V.current)==null||ie.call(V):!d&&xe&&((Ie=tt.current)==null||Ie.call(tt))},[d,t]);let A=Q.useMemo(()=>B?Object.keys(B):[],[B]),Et=Q.useMemo(()=>{if(typeof e!="string")return"";let zt=t==="streaming"&&i?Yet(e,T):e;return L&&L.length>0&&(zt=kot(zt,L)),A.length>0&&(zt=xot(zt,A)),zt},[e,t,i,T,A,L]),kt=Q.useMemo(()=>m(Et),[Et,m]),P=Q.useMemo(()=>r==="auto"?kt.map(dI):void 0,[kt,r]),Rt=Q.useMemo(()=>kt.map((zt,ie)=>`${M}-${ie}`),[kt.length,M]),Tt=Q.useMemo(()=>g===!0?"true":g?JSON.stringify(g):"",[g]),pt=Q.useRef(null),Ht=Q.useRef([]),Yt=Q.useRef([]),It=Q.useRef(null),wt=Q.useRef("");if(Tt){if(wt.current!==Tt){wt.current=Tt;let zt=Tt!=="true"?g.maxBacklogMs:void 0;pt.current=D_({maxBacklogMs:zt}),Ht.current=[],Yt.current=[]}else pt.current||(pt.current=D_());d&&pt.current&&pt.current.beginPass(pt.current.now())}else pt.current=null,Ht.current=[],Yt.current=[],wt.current="";Q.useLayoutEffect(()=>{var zt;d&&((zt=pt.current)==null||zt.commitPass())});let Lt=Q.useMemo(()=>{var zt,ie;return{codeBlockMaxHeight:h,shikiTheme:(ie=c??((zt=k==null?void 0:k.code)==null?void 0:zt.getThemes()))!=null?ie:yI,controls:f,isAnimating:d,lineNumbers:S,mode:t,mermaid:u,linkSafety:E,tableMaxHeight:p}},[h,c,f,d,S,t,u,E,k==null?void 0:k.code,p]),Xt=Q.useMemo(()=>W?JSON.stringify(W):"",[W]),Qt=Q.useMemo(()=>({...N3,...W}),[Xt]),le=Q.useMemo(()=>{let{inlineCode:zt,...ie}=s??{},Ie={...jat,...ie};if(zt){let xe=Ie.code;Ie.code=nr=>"data-block"in nr?xe?Q.createElement(xe,nr):null:Q.createElement(zt,nr)}return Ie},[s]),it=Q.useMemo(()=>{let zt=[];return k!=null&&k.cjk&&(zt=[...zt,...k.cjk.remarkPluginsBefore]),zt=[...zt,...o],k!=null&&k.cjk&&(zt=[...zt,...k.cjk.remarkPluginsAfter]),k!=null&&k.math&&(zt=[...zt,k.math.remarkPlugin]),zt},[o,k==null?void 0:k.math,k==null?void 0:k.cjk]),Bt=Q.useMemo(()=>{var zt;let ie=a;if(B&&Object.keys(B).length>0&&a===J_){let Ie={...ru,tagNames:[...(zt=ru.tagNames)!=null?zt:[],...Object.keys(B)],attributes:{...ru.attributes,...B}};ie=[Rg.raw,[Zv,Ie],Rg.harden]}return L&&L.length>0&&(ie=[...ie,[wot,L]]),k!=null&&k.math&&(ie=[...ie,k.math.rehypePlugin]),r==="auto"&&t==="static"&&(ie=[...ie,Eot]),ie},[a,k==null?void 0:k.math,B,L,r,t]),De=Q.useMemo(()=>{if(!d||kt.length===0)return!1;let zt=kt.at(-1);return z_(zt)||Kat(zt)},[d,kt]),ce=Q.useMemo(()=>_&&d&&!De?{"--streamdown-caret":`"${Bot[_]}"`}:void 0,[_,d,De]),Lr=zt=>{let ie=null;if(pt.current&&d){if(!Ht.current[zt]){let xe=Tt&&Tt!=="true"?g:{},{maxBacklogMs:nr,...ur}=xe;Ht.current[zt]=A3({...ur,timeline:pt.current})}ie=Ht.current[zt]}It.current!==Bt&&(Yt.current=[],It.current=Bt),ie&&!Yt.current[zt]&&(Yt.current[zt]=[...Bt,ie.rehypePlugin]);let Ie=ie&&Yt.current[zt]?Yt.current[zt]:Bt;return{blockAnimatePlugin:ie,blockRehypePlugins:Ie}};return t==="static"?z.jsx(Ag.Provider,{value:Qt,children:z.jsx(Lg.Provider,{value:k??null,children:z.jsx(cr.Provider,{value:Lt,children:z.jsx(M_,{icons:O,children:z.jsx(Sg.Provider,{value:N,children:z.jsx("div",{className:N("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",l),dir:r==="auto"?void 0:r,children:z.jsx(fI,{components:le,rehypePlugins:Bt,remarkPlugins:it,...H,children:Et})})})})})})}):z.jsx(Ag.Provider,{value:Qt,children:z.jsx(Lg.Provider,{value:k??null,children:z.jsx(cr.Provider,{value:Lt,children:z.jsx(M_,{icons:O,children:z.jsx(Sg.Provider,{value:N,children:z.jsxs("div",{className:N("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",_&&!De?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,l),style:ce,children:[kt.length===0&&_&&d&&z.jsx("span",{}),kt.map((zt,ie)=>{var Ie;let xe=ie===kt.length-1,nr=d&&xe&&z_(zt),{blockAnimatePlugin:ur,blockRehypePlugins:ct}=Lr(ie);return z.jsx(b,{animatePlugin:ur,components:le,content:zt,dir:(Ie=P==null?void 0:P[ie])!=null?Ie:r!=="auto"?r:void 0,index:ie,isIncomplete:nr,rehypePlugins:ct,remarkPlugins:it,shouldNormalizeHtmlIndentation:n,shouldParseIncompleteMarkdown:i,...H},Rt[ie])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);_I.displayName="Streamdown";var Oot=({children:e,className:t,minZoom:r=.5,maxZoom:i=3,zoomStep:n=.1,showControls:s=!0,initialZoom:a=1,fullscreen:o=!1})=>{let{RotateCcwIcon:l,ZoomInIcon:c,ZoomOutIcon:u}=Ci(),h=ge(),f=ji(),d=Q.useRef(null),p=Q.useRef(null),[g,b]=Q.useState(a),[m,_]=Q.useState({x:0,y:0}),[k,T]=Q.useState(!1),[E,S]=Q.useState({x:0,y:0}),[B,L]=Q.useState({x:0,y:0}),W=Q.useCallback(q=>{b(V=>Math.max(r,Math.min(i,V+q)))},[r,i]),O=Q.useCallback(()=>{W(n)},[W,n]),$=Q.useCallback(()=>{W(-n)},[W,n]),X=Q.useCallback(()=>{b(a),_({x:0,y:0})},[a]),G=Q.useCallback(q=>{q.preventDefault();let V=q.deltaY>0?-n:n;W(V)},[W,n]),H=Q.useCallback(q=>{if(q.button!==0||q.isPrimary===!1)return;T(!0),S({x:q.clientX,y:q.clientY}),L(m);let V=q.currentTarget;V instanceof HTMLElement&&V.setPointerCapture(q.pointerId)},[m]),M=Q.useCallback(q=>{if(!k)return;q.preventDefault();let V=q.clientX-E.x,tt=q.clientY-E.y;_({x:B.x+V,y:B.y+tt})},[k,E,B]),N=Q.useCallback(q=>{T(!1);let V=q.currentTarget;V instanceof HTMLElement&&V.releasePointerCapture(q.pointerId)},[]);return Q.useEffect(()=>{let q=d.current;if(q)return q.addEventListener("wheel",G,{passive:!1}),()=>{q.removeEventListener("wheel",G)}},[G]),Q.useEffect(()=>{let q=p.current;if(q&&k)return document.body.style.userSelect="none",q.addEventListener("pointermove",M,{passive:!1}),q.addEventListener("pointerup",N),q.addEventListener("pointercancel",N),()=>{document.body.style.userSelect="",q.removeEventListener("pointermove",M),q.removeEventListener("pointerup",N),q.removeEventListener("pointercancel",N)}},[k,M,N]),z.jsxs("div",{className:h("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:d,style:{cursor:k?"grabbing":"grab"},children:[s?z.jsxs("div",{className:h("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[z.jsx("button",{"aria-label":f.zoomIn,className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g>=i,onClick:O,title:f.zoomIn,type:"button",children:z.jsx(c,{"aria-hidden":"true",size:16})}),z.jsx("button",{"aria-label":f.zoomOut,className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:g<=r,onClick:$,title:f.zoomOut,type:"button",children:z.jsx(u,{"aria-hidden":"true",size:16})}),z.jsx("button",{"aria-label":f.resetView,className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:X,title:f.resetView,type:"button",children:z.jsx(l,{"aria-hidden":"true",size:16})})]}):null,z.jsx("div",{className:h("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:H,ref:p,role:"application",style:{transform:`translate(${m.x}px, ${m.y}px) scale(${g})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},kI=({chart:e,className:t,config:r,fullscreen:i=!1,showControls:n=!0})=>{let s=ge(),[a,o]=Q.useState(null),[l,c]=Q.useState(!1),[u,h]=Q.useState(""),[f,d]=Q.useState(""),[p,g]=Q.useState(0),{mermaid:b}=Q.useContext(cr),m=hb(),_=b==null?void 0:b.errorComponent,{shouldRender:k,containerRef:T}=$st({immediate:i});if(Q.useEffect(()=>{if(k){if(!m){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),c(!0);let S=m.getMermaid(r),B=e.split("").reduce((O,$)=>(O<<5)-O+$.charCodeAt(0)|0,0),L=`mermaid-${Math.abs(B)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:W}=await S.render(L,e);h(W),d(W)}catch(S){if(!(f||u)){let B=S instanceof Error?S.message:"Failed to render Mermaid chart";o(B)}}finally{c(!1)}})()}},[e,r,p,k,m]),!(k||u||f))return z.jsx("div",{className:s("my-4 min-h-[200px]",t),ref:T});if(l&&!u&&!f)return z.jsx("div",{className:s("my-4 flex justify-center p-4",t),ref:T,children:z.jsxs("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[z.jsx("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),z.jsx("span",{className:s("text-sm"),children:"Loading diagram..."})]})});if(a&&!u&&!f){let S=()=>g(B=>B+1);return _?z.jsx("div",{ref:T,children:z.jsx(_,{chart:e,error:a,retry:S})}):z.jsxs("div",{className:s("rounded-md bg-red-50 p-4",t),ref:T,children:[z.jsxs("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),z.jsxs("details",{className:s("mt-2"),children:[z.jsx("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),z.jsx("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let E=u||f;return z.jsx("div",{className:s("size-full",t),"data-streamdown":"mermaid",ref:T,children:z.jsx(Oot,{className:s(i?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:i,maxZoom:3,minZoom:.5,showControls:n,zoomStep:.1,children:z.jsx("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",i?"size-full items-center":null),dangerouslySetInnerHTML:{__html:E},role:"img"})})})};function Not(e){if(typeof e!="string"||!e.trim())return{kind:"text"};const t=e.trim();if(/^data:image\//i.test(t)||/^blob:/i.test(t))return{kind:"inline",src:t};const r=t.startsWith("//")?`https:${t}`:t;try{const i=new URL(r);if(i.protocol==="http:"||i.protocol==="https:")return{kind:"link",href:i.href}}catch{}return{kind:"text"}}const Dot={code:Q5,mermaid:cG};function Pot(e){const t=typeof e.alt=="string"?e.alt:"",r=Not(e.src);return r.kind==="inline"?z.jsx("img",{src:r.src,alt:t,className:"max-w-full"}):r.kind==="text"?t?z.jsxs("span",{children:["[",t,"]"]}):null:z.jsxs("a",{href:r.href,target:"_blank",rel:"noopener noreferrer nofollow",referrerPolicy:"no-referrer","data-testid":"markdown-remote-image",title:`Remote image, not loaded: ${r.href}`,className:"inline-flex items-center gap-1 text-primary underline",children:[z.jsx(ZI,{size:14,className:"shrink-0"}),t||r.href]})}const Mot="text-primary underline decoration-outline underline-offset-2 hover:decoration-current";function Fot(e){const t=[],r=i=>{var n;if(typeof i=="string"||typeof i=="number")t.push(String(i));else{if(Array.isArray(i))return i.every(r);if(Q.isValidElement(i)){const s=(n=i.props.node)==null?void 0:n.tagName;if(s==="ul"||s==="ol")return!1;r(i.props.children)}}return!0};return r(e),t.join("").replace(/\s+/g," ").trim()}function $ot({children:e,className:t,node:r,...i}){const n=typeof t=="string"&&t.includes("task-list-item"),s=n?Fot(e):"";return z.jsx("li",{className:ek("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...i,children:n?(Array.isArray(e)?e:[e]).map((a,o)=>Q.isValidElement(a)&&a.type==="input"?Q.cloneElement(a,{key:o,"aria-label":s||"Task"}):a):e})}const Hot="[&_a]:text-primary [&_a]:underline [&_a]:decoration-outline [&_a]:underline-offset-2 [&_a:hover]:decoration-current [&_.contains-task-list]:list-none [&_.contains-task-list]:pl-0 [&_li_.contains-task-list]:pl-6 [&_.task-list-item>input]:mr-2 [&_.task-list-item>input]:align-middle",zot=Q.memo(function({children:t,wikiLinks:r,readable:i=!1}){const{theme:n}=YI();return z.jsx(_I,{mode:"static",plugins:Dot,components:{img:Pot,li:$ot,...r?{a:s=>{const a=typeof s.href=="string"?s.href:void 0,o=s.children;if(a!=null&&a.startsWith("#wiki-")){const l=KI(decodeURIComponent(a.slice(6)));return r.slugs.includes(l)?z.jsx("button",{type:"button","data-testid":`wiki-link-${l}`,className:Mot,onClick:()=>r.select(l),children:o}):z.jsx("span",{children:o})}return z.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:o})}}:{}},...r?{remarkPlugins:[...Object.values(bI),XI]}:{},shikiTheme:["github-light","github-dark"],mermaid:{config:{theme:n==="dark"?"dark":"default"}},controls:{table:!1,code:{copy:!0,download:!1},mermaid:{copy:!0,download:!1,fullscreen:!0,panZoom:!0}},className:ek(Hot,i?"text-base leading-[1.65] text-on-surface [&>*]:!my-4 [&_pre]:max-w-full [&_pre]:overflow-auto [&_pre]:text-sm [&_:is(h1,h2,h3,h4,h5,h6)]:!mb-2 [&_:is(h1,h2,h3,h4,h5,h6)]:font-medium [&_:is(h1,h2,h3,h4,h5,h6)]:leading-snug [&_h1]:!mt-10 [&_h1]:text-2xl [&_h2]:!mt-8 [&_h2]:text-xl [&_h3]:!mt-6 [&_h3]:text-lg [&_:is(h4,h5,h6)]:!mt-5 [&_:is(h4,h5,h6)]:text-base [&>:is(ul,ol)]:!my-3 [&_:is(ul,ol)]:list-outside [&_:is(ul,ol)]:pl-6 [&_li]:py-0.5 [&_li>:is(ul,ol)]:my-1 [&_img]:max-w-full [&_table]:text-sm [&>*:first-child]:!mt-0 [&>*:last-child]:!mb-0":"text-sm leading-relaxed text-on-surface [&_p]:my-2 [&_pre]:max-w-full [&_pre]:overflow-auto [&_pre]:text-xs [&_h1]:text-xl [&_h2]:text-lg [&_h3]:text-base [&_ul]:my-2 [&_ol]:my-2"),children:t})}),jlt=Object.freeze(Object.defineProperty({__proto__:null,MarkdownRenderer:zot},Symbol.toStringTag,{value:"Module"})),Uot=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:kI},Symbol.toStringTag,{value:"Module"}));export{V6 as $,mr as A,Oe as B,Di as C,VD as D,Wlt as E,Am as F,TT as G,$8 as H,wF as I,dF as J,fm as K,slt as L,llt as M,Xs as N,a1 as O,s1 as P,ult as Q,clt as R,cr as S,olt as T,re as U,ilt as V,nlt as W,alt as X,dlt as Y,hlt as Z,C as _,HD as a,u8 as a$,tlt as a0,kq as a1,_q as a2,ml as a3,Jot as a4,bh as a5,I8 as a6,SD as a7,DT as a8,Oa as a9,Th as aA,Vm as aB,aS as aC,K9 as aD,pr as aE,z$ as aF,Cm as aG,ym as aH,Vc as aI,p8 as aJ,f8 as aK,d8 as aL,h8 as aM,i8 as aN,F2 as aO,a8 as aP,r8 as aQ,c8 as aR,$2 as aS,s8 as aT,b8 as aU,m8 as aV,g8 as aW,x8 as aX,y8 as aY,n8 as aZ,H2 as a_,Hy as aa,Bh as ab,mF as ac,Op as ad,F8 as ae,mi as af,at as ag,ot as ah,ND as ai,MT as aj,iS as ak,jm as al,ex as am,Hl as an,KF as ao,wm as ap,Pt as aq,Alt as ar,Slt as as,yq as at,me as au,IS as av,Ft as aw,wlt as ax,zu as ay,RS as az,$D as b,XU as b$,l8 as b0,o8 as b1,z2 as b2,cS as b3,Y2 as b4,pT as b5,fF as b6,Zot as b7,yi as b8,XF as b9,sH as bA,pH as bB,ez as bC,Ss as bD,Xa as bE,dn as bF,wx as bG,Pi as bH,en as bI,KH as bJ,gx as bK,Hu as bL,ln as bM,aH as bN,Fr as bO,xx as bP,Km as bQ,QU as bR,Ah as bS,$u as bT,YU as bU,LS as bV,Bi as bW,oH as bX,e0 as bY,dS as bZ,ZU as b_,elt as ba,cm as bb,Ln as bc,xl as bd,Jy as be,VM as bf,$t as bg,O2 as bh,Mr as bi,$M as bj,lm as bk,QT as bl,$l as bm,t2 as bn,rlt as bo,r6 as bp,Gm as bq,Ym as br,ux as bs,gS as bt,Sh as bu,pS as bv,gH as bw,mS as bx,tz as by,Hz as bz,oat as c,$U as c0,wh as c1,_S as c2,Ih as c3,kS as c4,HU as c5,Mz as c6,Xn as c7,Ho as c8,sa as c9,_c as ca,nf as cb,aq as cc,N9 as cd,jlt as ce,pe as d,PT as e,er as f,UD as g,un as h,tS as i,ti as j,se as k,nt as l,Ml as m,K2 as n,Pl as o,t8 as p,qD as q,WD as r,zD as s,FD as t,flt as u,Mn as v,U8 as w,Z5 as x,zlt as y,Hlt as z};