@render-harness/ui 0.1.1 → 0.1.3

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 (106) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/dist/index.js +25 -14
  3. package/dist/index.js.map +1 -1
  4. package/dist/static/assets/{architectureDiagram-3BPJPVTR-D4589TUy.js → architectureDiagram-3BPJPVTR-DLNRxqTW.js} +2 -2
  5. package/dist/static/assets/{architectureDiagram-3BPJPVTR-D4589TUy.js.map → architectureDiagram-3BPJPVTR-DLNRxqTW.js.map} +1 -1
  6. package/dist/static/assets/{blockDiagram-GPEHLZMM-Cfjv0TRV.js → blockDiagram-GPEHLZMM-CCWTkWe6.js} +2 -2
  7. package/dist/static/assets/{blockDiagram-GPEHLZMM-Cfjv0TRV.js.map → blockDiagram-GPEHLZMM-CCWTkWe6.js.map} +1 -1
  8. package/dist/static/assets/{c4Diagram-AAUBKEIU-BoXkzmRI.js → c4Diagram-AAUBKEIU-qO0tZRXO.js} +2 -2
  9. package/dist/static/assets/{c4Diagram-AAUBKEIU-BoXkzmRI.js.map → c4Diagram-AAUBKEIU-qO0tZRXO.js.map} +1 -1
  10. package/dist/static/assets/channel-CAoVqDgM.js +2 -0
  11. package/dist/static/assets/{channel-DusP3IMn.js.map → channel-CAoVqDgM.js.map} +1 -1
  12. package/dist/static/assets/{chunk-2J33WTMH-Lf1eCW8w.js → chunk-2J33WTMH-DaEvWRZX.js} +2 -2
  13. package/dist/static/assets/{chunk-2J33WTMH-Lf1eCW8w.js.map → chunk-2J33WTMH-DaEvWRZX.js.map} +1 -1
  14. package/dist/static/assets/{chunk-3OPIFGDE-BYpEG0v0.js → chunk-3OPIFGDE-xcRWDOrg.js} +2 -2
  15. package/dist/static/assets/{chunk-3OPIFGDE-BYpEG0v0.js.map → chunk-3OPIFGDE-xcRWDOrg.js.map} +1 -1
  16. package/dist/static/assets/{chunk-5ZQYHXKU-CxDIhrF-.js → chunk-5ZQYHXKU-B_3UEJ_q.js} +2 -2
  17. package/dist/static/assets/{chunk-5ZQYHXKU-CxDIhrF-.js.map → chunk-5ZQYHXKU-B_3UEJ_q.js.map} +1 -1
  18. package/dist/static/assets/{chunk-727SXJPM-BEbDzxvV.js → chunk-727SXJPM-c1bbIj6N.js} +2 -2
  19. package/dist/static/assets/{chunk-727SXJPM-BEbDzxvV.js.map → chunk-727SXJPM-c1bbIj6N.js.map} +1 -1
  20. package/dist/static/assets/{chunk-AQP2D5EJ-DGTbQ17q.js → chunk-AQP2D5EJ-Wv0w6wvH.js} +2 -2
  21. package/dist/static/assets/{chunk-AQP2D5EJ-DGTbQ17q.js.map → chunk-AQP2D5EJ-Wv0w6wvH.js.map} +1 -1
  22. package/dist/static/assets/{chunk-CSCIHK7Q-Bo3glXo1.js → chunk-CSCIHK7Q-BBzr5U3o.js} +3 -3
  23. package/dist/static/assets/{chunk-CSCIHK7Q-Bo3glXo1.js.map → chunk-CSCIHK7Q-BBzr5U3o.js.map} +1 -1
  24. package/dist/static/assets/{chunk-KSCS5N6A-DVQpViur.js → chunk-KSCS5N6A-BZrceHGX.js} +2 -2
  25. package/dist/static/assets/{chunk-KSCS5N6A-DVQpViur.js.map → chunk-KSCS5N6A-BZrceHGX.js.map} +1 -1
  26. package/dist/static/assets/{chunk-L5ZTLDWV-BwOlshrN.js → chunk-L5ZTLDWV-BAcjEn3C.js} +2 -2
  27. package/dist/static/assets/{chunk-L5ZTLDWV-BwOlshrN.js.map → chunk-L5ZTLDWV-BAcjEn3C.js.map} +1 -1
  28. package/dist/static/assets/{chunk-ND2GUHAM-a2zgmbwP.js → chunk-ND2GUHAM-DHtjIa8_.js} +2 -2
  29. package/dist/static/assets/{chunk-ND2GUHAM-a2zgmbwP.js.map → chunk-ND2GUHAM-DHtjIa8_.js.map} +1 -1
  30. package/dist/static/assets/{chunk-NZK2D7GU-BbPAL6yn.js → chunk-NZK2D7GU-DuwDtSGJ.js} +2 -2
  31. package/dist/static/assets/{chunk-NZK2D7GU-BbPAL6yn.js.map → chunk-NZK2D7GU-DuwDtSGJ.js.map} +1 -1
  32. package/dist/static/assets/{chunk-O5CBEL6O-CM0slmy1.js → chunk-O5CBEL6O-KRO56hHQ.js} +2 -2
  33. package/dist/static/assets/{chunk-O5CBEL6O-CM0slmy1.js.map → chunk-O5CBEL6O-KRO56hHQ.js.map} +1 -1
  34. package/dist/static/assets/classDiagram-4FO5ZUOK-oexPF7ww.js +2 -0
  35. package/dist/static/assets/{classDiagram-4FO5ZUOK-SuK_oLpa.js.map → classDiagram-4FO5ZUOK-oexPF7ww.js.map} +1 -1
  36. package/dist/static/assets/classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js +2 -0
  37. package/dist/static/assets/{classDiagram-v2-Q7XG4LA2-DMlc0uaN.js.map → classDiagram-v2-Q7XG4LA2-Dc4jeSLj.js.map} +1 -1
  38. package/dist/static/assets/{dagre-BM42HDAG-4I-9kC-8.js → dagre-BM42HDAG-au4dCVgC.js} +2 -2
  39. package/dist/static/assets/{dagre-BM42HDAG-4I-9kC-8.js.map → dagre-BM42HDAG-au4dCVgC.js.map} +1 -1
  40. package/dist/static/assets/{diagram-2AECGRRQ-pAKf5nK6.js → diagram-2AECGRRQ-rJMnDhBW.js} +2 -2
  41. package/dist/static/assets/{diagram-2AECGRRQ-pAKf5nK6.js.map → diagram-2AECGRRQ-rJMnDhBW.js.map} +1 -1
  42. package/dist/static/assets/{diagram-5GNKFQAL-CzKwZhm6.js → diagram-5GNKFQAL-diIxjA-v.js} +2 -2
  43. package/dist/static/assets/{diagram-5GNKFQAL-CzKwZhm6.js.map → diagram-5GNKFQAL-diIxjA-v.js.map} +1 -1
  44. package/dist/static/assets/{diagram-KO2AKTUF-BZNjYRzg.js → diagram-KO2AKTUF-D9IYocVR.js} +2 -2
  45. package/dist/static/assets/{diagram-KO2AKTUF-BZNjYRzg.js.map → diagram-KO2AKTUF-D9IYocVR.js.map} +1 -1
  46. package/dist/static/assets/{diagram-LMA3HP47-vnkpPjMC.js → diagram-LMA3HP47-BtdvpqaH.js} +2 -2
  47. package/dist/static/assets/{diagram-LMA3HP47-vnkpPjMC.js.map → diagram-LMA3HP47-BtdvpqaH.js.map} +1 -1
  48. package/dist/static/assets/{diagram-OG6HWLK6-CkBTEmTA.js → diagram-OG6HWLK6-CaRkxDoj.js} +2 -2
  49. package/dist/static/assets/{diagram-OG6HWLK6-CkBTEmTA.js.map → diagram-OG6HWLK6-CaRkxDoj.js.map} +1 -1
  50. package/dist/static/assets/{erDiagram-TEJ5UH35-DGrhtXAQ.js → erDiagram-TEJ5UH35-CgifrqeZ.js} +2 -2
  51. package/dist/static/assets/{erDiagram-TEJ5UH35-DGrhtXAQ.js.map → erDiagram-TEJ5UH35-CgifrqeZ.js.map} +1 -1
  52. package/dist/static/assets/{flowDiagram-I6XJVG4X-Cp2YiaJS.js → flowDiagram-I6XJVG4X-DaguIeM_.js} +2 -2
  53. package/dist/static/assets/{flowDiagram-I6XJVG4X-Cp2YiaJS.js.map → flowDiagram-I6XJVG4X-DaguIeM_.js.map} +1 -1
  54. package/dist/static/assets/{ganttDiagram-6RSMTGT7-C-jGZVXC.js → ganttDiagram-6RSMTGT7-DIFubQTa.js} +2 -2
  55. package/dist/static/assets/{ganttDiagram-6RSMTGT7-C-jGZVXC.js.map → ganttDiagram-6RSMTGT7-DIFubQTa.js.map} +1 -1
  56. package/dist/static/assets/{gitGraphDiagram-PVQCEYII-DDwOyc6i.js → gitGraphDiagram-PVQCEYII-Ht-SDjxh.js} +2 -2
  57. package/dist/static/assets/{gitGraphDiagram-PVQCEYII-DDwOyc6i.js.map → gitGraphDiagram-PVQCEYII-Ht-SDjxh.js.map} +1 -1
  58. package/dist/static/assets/index-D5tmHkO_.js +228 -0
  59. package/dist/static/assets/index-D5tmHkO_.js.map +1 -0
  60. package/dist/static/assets/index-luXiT-gK.css +1 -0
  61. package/dist/static/assets/{infoDiagram-5YYISTIA-B_rDp_NJ.js → infoDiagram-5YYISTIA-CwLGA7Zu.js} +2 -2
  62. package/dist/static/assets/{infoDiagram-5YYISTIA-B_rDp_NJ.js.map → infoDiagram-5YYISTIA-CwLGA7Zu.js.map} +1 -1
  63. package/dist/static/assets/{ishikawaDiagram-YF4QCWOH-ggQN-_CZ.js → ishikawaDiagram-YF4QCWOH-CaZCrUUR.js} +2 -2
  64. package/dist/static/assets/{ishikawaDiagram-YF4QCWOH-ggQN-_CZ.js.map → ishikawaDiagram-YF4QCWOH-CaZCrUUR.js.map} +1 -1
  65. package/dist/static/assets/{journeyDiagram-JHISSGLW-BjEC1jFt.js → journeyDiagram-JHISSGLW-C-j_GoJi.js} +2 -2
  66. package/dist/static/assets/{journeyDiagram-JHISSGLW-BjEC1jFt.js.map → journeyDiagram-JHISSGLW-C-j_GoJi.js.map} +1 -1
  67. package/dist/static/assets/{kanban-definition-UN3LZRKU-BVkPEFcm.js → kanban-definition-UN3LZRKU-DlYha85J.js} +2 -2
  68. package/dist/static/assets/{kanban-definition-UN3LZRKU-BVkPEFcm.js.map → kanban-definition-UN3LZRKU-DlYha85J.js.map} +1 -1
  69. package/dist/static/assets/{line-L2DeHwdZ.js → line-GCwXS1Fi.js} +2 -2
  70. package/dist/static/assets/{line-L2DeHwdZ.js.map → line-GCwXS1Fi.js.map} +1 -1
  71. package/dist/static/assets/mermaid-parser.core-BO_-QleW.js +5 -0
  72. package/dist/static/assets/{mermaid-parser.core-CZyyUBUW.js.map → mermaid-parser.core-BO_-QleW.js.map} +1 -1
  73. package/dist/static/assets/{mindmap-definition-RKZ34NQL-uf3ACEiM.js → mindmap-definition-RKZ34NQL-CPJIWJdQ.js} +2 -2
  74. package/dist/static/assets/{mindmap-definition-RKZ34NQL-uf3ACEiM.js.map → mindmap-definition-RKZ34NQL-CPJIWJdQ.js.map} +1 -1
  75. package/dist/static/assets/{pieDiagram-4H26LBE5-Dm2S6Ggt.js → pieDiagram-4H26LBE5-DTVmF_CH.js} +2 -2
  76. package/dist/static/assets/{pieDiagram-4H26LBE5-Dm2S6Ggt.js.map → pieDiagram-4H26LBE5-DTVmF_CH.js.map} +1 -1
  77. package/dist/static/assets/{quadrantDiagram-W4KKPZXB-CgiO6Q9Y.js → quadrantDiagram-W4KKPZXB-Bho6zy_y.js} +2 -2
  78. package/dist/static/assets/{quadrantDiagram-W4KKPZXB-CgiO6Q9Y.js.map → quadrantDiagram-W4KKPZXB-Bho6zy_y.js.map} +1 -1
  79. package/dist/static/assets/{requirementDiagram-4Y6WPE33-BFL5yKh2.js → requirementDiagram-4Y6WPE33-CLyoVwlh.js} +2 -2
  80. package/dist/static/assets/{requirementDiagram-4Y6WPE33-BFL5yKh2.js.map → requirementDiagram-4Y6WPE33-CLyoVwlh.js.map} +1 -1
  81. package/dist/static/assets/{sankeyDiagram-5OEKKPKP-DNSdTx8o.js → sankeyDiagram-5OEKKPKP-V2yvk-0Z.js} +2 -2
  82. package/dist/static/assets/{sankeyDiagram-5OEKKPKP-DNSdTx8o.js.map → sankeyDiagram-5OEKKPKP-V2yvk-0Z.js.map} +1 -1
  83. package/dist/static/assets/{sequenceDiagram-3UESZ5HK-BMNloRY9.js → sequenceDiagram-3UESZ5HK-Dp03aXVk.js} +2 -2
  84. package/dist/static/assets/{sequenceDiagram-3UESZ5HK-BMNloRY9.js.map → sequenceDiagram-3UESZ5HK-Dp03aXVk.js.map} +1 -1
  85. package/dist/static/assets/{stateDiagram-AJRCARHV-B1fkBSkt.js → stateDiagram-AJRCARHV-BEJW-_HK.js} +2 -2
  86. package/dist/static/assets/{stateDiagram-AJRCARHV-B1fkBSkt.js.map → stateDiagram-AJRCARHV-BEJW-_HK.js.map} +1 -1
  87. package/dist/static/assets/stateDiagram-v2-BHNVJYJU-Bo19-vKE.js +2 -0
  88. package/dist/static/assets/{stateDiagram-v2-BHNVJYJU-Fm1RY0qD.js.map → stateDiagram-v2-BHNVJYJU-Bo19-vKE.js.map} +1 -1
  89. package/dist/static/assets/{timeline-definition-PNZ67QCA-CdNdPzQU.js → timeline-definition-PNZ67QCA-C4KTq0mQ.js} +2 -2
  90. package/dist/static/assets/{timeline-definition-PNZ67QCA-CdNdPzQU.js.map → timeline-definition-PNZ67QCA-C4KTq0mQ.js.map} +1 -1
  91. package/dist/static/assets/{vennDiagram-CIIHVFJN-Cfr9Kji9.js → vennDiagram-CIIHVFJN-1jmBZPSZ.js} +2 -2
  92. package/dist/static/assets/{vennDiagram-CIIHVFJN-Cfr9Kji9.js.map → vennDiagram-CIIHVFJN-1jmBZPSZ.js.map} +1 -1
  93. package/dist/static/assets/{wardleyDiagram-YWT4CUSO-BU30t5hg.js → wardleyDiagram-YWT4CUSO-A8XYzYTW.js} +2 -2
  94. package/dist/static/assets/{wardleyDiagram-YWT4CUSO-BU30t5hg.js.map → wardleyDiagram-YWT4CUSO-A8XYzYTW.js.map} +1 -1
  95. package/dist/static/assets/{xychartDiagram-2RQKCTM6-CbAQZMXv.js → xychartDiagram-2RQKCTM6-CuyUQvFt.js} +2 -2
  96. package/dist/static/assets/{xychartDiagram-2RQKCTM6-CbAQZMXv.js.map → xychartDiagram-2RQKCTM6-CuyUQvFt.js.map} +1 -1
  97. package/dist/static/index.html +16 -16
  98. package/package.json +14 -14
  99. package/dist/static/assets/channel-DusP3IMn.js +0 -2
  100. package/dist/static/assets/classDiagram-4FO5ZUOK-SuK_oLpa.js +0 -2
  101. package/dist/static/assets/classDiagram-v2-Q7XG4LA2-DMlc0uaN.js +0 -2
  102. package/dist/static/assets/index-BfPuPCFp.js +0 -228
  103. package/dist/static/assets/index-BfPuPCFp.js.map +0 -1
  104. package/dist/static/assets/index-CyEgx13R.css +0 -1
  105. package/dist/static/assets/mermaid-parser.core-CZyyUBUW.js +0 -5
  106. package/dist/static/assets/stateDiagram-v2-BHNVJYJU-Fm1RY0qD.js +0 -2
@@ -1,228 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-4I-9kC-8.js","assets/src-DoMhBUqV.js","assets/chunk-CSCIHK7Q-Bo3glXo1.js","assets/chunk-O5CBEL6O-CM0slmy1.js","assets/chunk-5ZQYHXKU-CxDIhrF-.js","assets/dist-C2f1Lbm8.js","assets/dagre-CKPhbkRL.js","assets/graphlib-B-xHMrcv.js","assets/chunk-3OPIFGDE-BYpEG0v0.js","assets/chunk-L5ZTLDWV-BwOlshrN.js","assets/chunk-NZK2D7GU-BbPAL6yn.js","assets/rough.esm-C6nrIGLg.js","assets/chunk-BSJP7CBP-Kr5SHCan.js","assets/chunk-KSCS5N6A-DVQpViur.js","assets/line-L2DeHwdZ.js","assets/path-BmDdnQs8.js","assets/array-B4O_ir3H.js","assets/cose-bilkent-S5V4N54A-CsjsMgdo.js","assets/cytoscape.esm-C0W7YdOh.js","assets/c4Diagram-AAUBKEIU-BoXkzmRI.js","assets/chunk-ND2GUHAM-a2zgmbwP.js","assets/flowDiagram-I6XJVG4X-Cp2YiaJS.js","assets/channel-DusP3IMn.js","assets/chunk-2J33WTMH-Lf1eCW8w.js","assets/chunk-55IACEB6-aqMcRzKm.js","assets/chunk-FMBD7UC4-CiWgEw8O.js","assets/erDiagram-TEJ5UH35-DGrhtXAQ.js","assets/gitGraphDiagram-PVQCEYII-DDwOyc6i.js","assets/mermaid-parser.core-CZyyUBUW.js","assets/chunk-4EGX6M5U-sKH2Isf8.js","assets/chunk-NNHCCRGN-DSaPFNsL.js","assets/chunk-5DO6E6H7-DVriMWxp.js","assets/chunk-BR22UD5L-BCm2xrxa.js","assets/chunk-FHYWG6QK-B_z4diOF.js","assets/chunk-MPE355IW-BrU23f3r.js","assets/chunk-MZUSXYTE-BGj-wpbJ.js","assets/chunk-N66VUXT2-Bx9F_D4P.js","assets/chunk-PUPMXCY4-C2l0dHY4.js","assets/chunk-UIBZB4QT-DXVjm6Jo.js","assets/chunk-WCWK7LTN-zc10zcLo.js","assets/chunk-4BX2VUAB-BqYEJTr3.js","assets/chunk-QZHKN3VN-C51sC6VA.js","assets/ganttDiagram-6RSMTGT7-C-jGZVXC.js","assets/linear-CTnL8jvu.js","assets/defaultLocale-BGJ623y0.js","assets/init-Dfd1k18d.js","assets/infoDiagram-5YYISTIA-B_rDp_NJ.js","assets/pieDiagram-4H26LBE5-Dm2S6Ggt.js","assets/ordinal-DjeI0KOh.js","assets/arc-Ck_Wc4j5.js","assets/quadrantDiagram-W4KKPZXB-CgiO6Q9Y.js","assets/xychartDiagram-2RQKCTM6-CbAQZMXv.js","assets/requirementDiagram-4Y6WPE33-BFL5yKh2.js","assets/sequenceDiagram-3UESZ5HK-BMNloRY9.js","assets/classDiagram-4FO5ZUOK-SuK_oLpa.js","assets/chunk-727SXJPM-BEbDzxvV.js","assets/classDiagram-v2-Q7XG4LA2-DMlc0uaN.js","assets/stateDiagram-AJRCARHV-B1fkBSkt.js","assets/chunk-AQP2D5EJ-DGTbQ17q.js","assets/stateDiagram-v2-BHNVJYJU-Fm1RY0qD.js","assets/journeyDiagram-JHISSGLW-BjEC1jFt.js","assets/timeline-definition-PNZ67QCA-CdNdPzQU.js","assets/mindmap-definition-RKZ34NQL-uf3ACEiM.js","assets/kanban-definition-UN3LZRKU-BVkPEFcm.js","assets/sankeyDiagram-5OEKKPKP-DNSdTx8o.js","assets/diagram-LMA3HP47-vnkpPjMC.js","assets/diagram-2AECGRRQ-pAKf5nK6.js","assets/blockDiagram-GPEHLZMM-Cfjv0TRV.js","assets/diagram-5GNKFQAL-CzKwZhm6.js","assets/architectureDiagram-3BPJPVTR-D4589TUy.js","assets/diagram-KO2AKTUF-BZNjYRzg.js","assets/ishikawaDiagram-YF4QCWOH-ggQN-_CZ.js","assets/vennDiagram-CIIHVFJN-Cfr9Kji9.js","assets/diagram-OG6HWLK6-CkBTEmTA.js","assets/wardleyDiagram-YWT4CUSO-BU30t5hg.js","assets/angular-html-BTPgvNVF.js","assets/html-Dim8R87k.js","assets/css-D6U_Ko9J.js","assets/javascript-BL10MWEh.js","assets/angular-ts-DlluasyV.js","assets/scss-Bk85YZ5B.js","assets/apl-DXNMM5sn.js","assets/json-ByVheYRi.js","assets/xml-BGJ8DYcz.js","assets/java-DCQryRjA.js","assets/astro-Chivy__8.js","assets/postcss-B05sTlrk.js","assets/tsx-CCae5zBp.js","assets/typescript-DYRUzQ4v.js","assets/blade-CbK4h373.js","assets/html-derivative-wv0mpNga.js","assets/sql-BJUy431w.js","assets/bsl-CdDFyo5F.js","assets/sdbl-CFMWR8pX.js","assets/c-XAfXzHJL.js","assets/cairo-CCizMn05.js","assets/python-DdQYuMIU.js","assets/cobol-D99n3iqc.js","assets/coffee-D1LQvIkF.js","assets/cpp-CKg5ZwjL.js","assets/glsl-Bjsk2TMh.js","assets/regexp-DcDCrGpo.js","assets/crystal-CYzaTz8d.js","assets/shellscript-D7bH9K7P.js","assets/edge-CkCaSgQh.js","assets/elixir-CjHA8w1Y.js","assets/elm-DXIXYSVh.js","assets/erb-CnzDf1w5.js","assets/ruby-C8G-I-gY.js","assets/graphql-Cx4kQnkL.js","assets/jsx-CXM6RMr-.js","assets/haml-tmAx7Gde.js","assets/lua-DLD2Zr6L.js","assets/yaml-Cc1kud-L.js","assets/erlang-CNbCQ89n.js","assets/markdown-YB84TJfD.js","assets/fortran-fixed-form-BNQstKjF.js","assets/fortran-free-form-BnXTqrXt.js","assets/fsharp-CjygqGHI.js","assets/gdresource-CdJwksfi.js","assets/gdscript-Bv1IS9z0.js","assets/gdshader-DkHuiVRJ.js","assets/git-commit-tF6n3zME.js","assets/diff-CFBZUcgj.js","assets/git-rebase-KgX8Og1c.js","assets/glimmer-js-BGDyd0fi.js","assets/glimmer-ts-BgpDMnVZ.js","assets/hack-DUr7hpoX.js","assets/handlebars-Bjly3GZc.js","assets/http-BEgFKWFd.js","assets/hurl-wrVcT4bK.js","assets/csv-C9AlRNbg.js","assets/hxml-D3FneN50.js","assets/haxe-C5IMy4J9.js","assets/jinja-B6phq7Ig.js","assets/jison-OaSAm_Y-.js","assets/julia-CmDZ9WDU.js","assets/r-BG-aUxp7.js","assets/just-CXlTXez_.js","assets/perl-Cbj4nRfk.js","assets/latex-Dftgeikp.js","assets/tex-BlSODC1j.js","assets/liquid-DJaAYdFW.js","assets/marko-DT7MtIul.js","assets/less-BvF2kiCY.js","assets/mdc-Sj7HqqlM.js","assets/nextflow-ORht-cRv.js","assets/nextflow-groovy-oNZt-evu.js","assets/nginx-B8SA1rN2.js","assets/nim-c4YDKhvV.js","assets/php-DrQT-g-m.js","assets/pug-BK4UlN0b.js","assets/qml-BfKmfN_Y.js","assets/razor-gw0eNghw.js","assets/csharp-7zj_5c7P.js","assets/rst-RXpGCPX3.js","assets/cmake-Ci4NQnAb.js","assets/sas-BbMHg9d6.js","assets/shaderlab-gtHHzeHH.js","assets/hlsl-Bnp3EqHT.js","assets/shellsession-BxkAMrvC.js","assets/soy-BzuqaVTA.js","assets/sparql-PRQhoTwI.js","assets/turtle-BdKlZW8d.js","assets/stata-DbL7Ndl2.js","assets/surrealql-YEW9swFu.js","assets/svelte-BsO-M6w8.js","assets/templ-zMTXDva2.js","assets/go-DrxTzaFE.js","assets/ts-tags-Di_YeGim.js","assets/twig-Dmp-uJhk.js","assets/vue-Bjt7AYG8.js","assets/vue-html-DbfHTuzQ.js","assets/vue-vine-fHOt7AV6.js","assets/stylus-CrmL_SSE.js","assets/xsl-DUB-ai0Q.js"])))=>i.map(i=>d[i]);
2
- import{_ as e,b as t,g as n,h as r,p as i,x as a,y as o}from"./src-DoMhBUqV.js";import{$ as s,C as c,E as l,I as u,L as d,N as f,P as p,Q as m,S as h,T as g,V as _,W as v,X as y,Z as b,_ as x,b as S,c as C,et as w,g as T,l as E,m as ee,n as D,p as te,q as ne,r as re,s as ie,t as O,u as k,x as ae}from"./chunk-CSCIHK7Q-Bo3glXo1.js";import{G as oe,a as se,b as ce,d as le,f as ue,g as de,h as fe,i as pe,o as me,v as he,y as ge}from"./chunk-5ZQYHXKU-CxDIhrF-.js";import"./chunk-BSJP7CBP-Kr5SHCan.js";import"./chunk-L5ZTLDWV-BwOlshrN.js";import"./chunk-NZK2D7GU-BbPAL6yn.js";import{i as _e,o as ve}from"./chunk-O5CBEL6O-CM0slmy1.js";import{a as ye,i as be,s as xe}from"./chunk-3OPIFGDE-BYpEG0v0.js";import{a as Se,i as Ce,n as we,r as Te}from"./chunk-KSCS5N6A-DVQpViur.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ee=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function O(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,O(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),O(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+re(a,u),c+=O(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+re(a,u++),c+=O(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return O(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function k(e,t,n){if(e==null)return e;var r=[],i=0;return O(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var oe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},se={map:k,forEach:function(e,t,n){k(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,oe)}catch(e){oe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),De=o(((e,t)=>{t.exports=Ee()})),Oe=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=ee,D=function(){ne.postMessage(null)}}else D=function(){_(ee,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ke=o(((e,t)=>{t.exports=Oe()})),Ae=o((e=>{var t=De();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),je=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ae()})),Me=o((e=>{var t=ke(),n=De(),r=je();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),ee=Symbol.for(`react.memo_cache_sentinel`),D=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=D&&e[D]||e[`@@iterator`],typeof e==`function`?e:null)}var ne=Symbol.for(`react.client.reference`);function re(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ne?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var ie=Array.isArray,O=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},oe=[],se=-1;function ce(e){return{current:e}}function le(e){0>se||(e.current=oe[se],oe[se]=null,se--)}function ue(e,t){se++,oe[se]=e.current,e.current=t}var de=ce(null),fe=ce(null),pe=ce(null),me=ce(null);function he(e,t){switch(ue(pe,t),ue(fe,e),ue(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}le(de),ue(de,e)}function ge(){le(de),le(fe),le(pe)}function _e(e){e.memoizedState!==null&&ue(me,e);var t=de.current,n=Ud(t,e.type);t!==n&&(ue(fe,e),ue(de,n))}function ve(e){fe.current===e&&(le(de),le(fe)),me.current===e&&(le(me),$f._currentValue=ae)}var ye,be;function xe(e){if(ye===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ye=t&&t[1]||``,be=-1<e.stack.indexOf(`
3
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
- `+ye+e+be}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
- `),l=s.split(`
6
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
- Error generating stack: `+e.message+`
9
- `+e.stack}}var Ee=Object.prototype.hasOwnProperty,Oe=t.unstable_scheduleCallback,Ae=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,A=t.unstable_now,Pe=t.unstable_getCurrentPriorityLevel,Fe=t.unstable_ImmediatePriority,Ie=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Re=t.unstable_LowPriority,ze=t.unstable_IdlePriority,Be=t.log,Ve=t.unstable_setDisableYieldValue,He=null,Ue=null;function We(e){if(typeof Be==`function`&&Ve(e),Ue&&typeof Ue.setStrictMode==`function`)try{Ue.setStrictMode(He,e)}catch{}}var Ge=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function nt(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function it(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function j(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ge(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&at(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function at(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ge(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ot(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ge(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function st(e,t){var n=t&-t;return n=n&42?1:ct(n),(n&(e.suspendedLanes|t))===0?n:0}function ct(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function lt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ut(){var e=k.p;return e===0?(e=window.event,e===void 0?32:hp(e.type)):e}function dt(e,t){var n=k.p;try{return k.p=e,t()}finally{k.p=n}}var ft=Math.random().toString(36).slice(2),pt=`__reactFiber$`+ft,mt=`__reactProps$`+ft,ht=`__reactContainer$`+ft,gt=`__reactEvents$`+ft,_t=`__reactListeners$`+ft,vt=`__reactHandles$`+ft,yt=`__reactResources$`+ft,bt=`__reactMarker$`+ft;function xt(e){delete e[pt],delete e[mt],delete e[gt],delete e[_t],delete e[vt]}function St(e){var t=e[pt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ht]||n[pt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[pt])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function Ct(e){if(e=e[pt]||e[ht]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function wt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Tt(e){var t=e[yt];return t||=e[yt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Et(e){e[bt]=!0}var Dt=new Set,Ot={};function kt(e,t){At(e,t),At(e+`Capture`,t)}function At(e,t){for(Ot[e]=t,e=0;e<t.length;e++)Dt.add(t[e])}var jt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Mt={},Nt={};function Pt(e){return Ee.call(Nt,e)?!0:Ee.call(Mt,e)?!1:jt.test(e)?Nt[e]=!0:(Mt[e]=!0,!1)}function Ft(e,t,n){if(Pt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function It(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Lt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Rt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Bt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vt(e){if(!e._valueTracker){var t=zt(e)?`checked`:`value`;e._valueTracker=Bt(e,t,``+e[t])}}function Ht(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=zt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ut(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Wt=/[\n"\\]/g;function Gt(e){return e.replace(Wt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Kt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Rt(t)):e.value!==``+Rt(t)&&(e.value=``+Rt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Jt(e,o,Rt(n)):Jt(e,o,Rt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Rt(s):e.removeAttribute(`name`)}function qt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Vt(e);return}n=n==null?``:``+Rt(n),t=t==null?n:``+Rt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Vt(e)}function Jt(e,t,n){t===`number`&&Ut(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Yt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Rt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function M(e,t,n){if(t!=null&&(t=``+Rt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Rt(n)}function Xt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ie(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Rt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Vt(e)}function Zt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function $t(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function en(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&$t(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&$t(e,o,t[o])}function tn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var nn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`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`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`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`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`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`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),rn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function an(e){return rn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function on(){}var sn=null;function cn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ln=null,un=null;function dn(e){var t=Ct(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Kt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Gt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[mt]||null;if(!a)throw Error(i(90));Kt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ht(r)}break a;case`textarea`:M(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Yt(e,!!n.multiple,t,!1)}}}var fn=!1;function N(e,t,n){if(fn)return e(t,n);fn=!0;try{return e(t)}finally{if(fn=!1,(ln!==null||un!==null)&&(wu(),ln&&(t=ln,e=un,un=ln=null,dn(t),e)))for(t=0;t<e.length;t++)dn(e[t])}}function pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[mt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var mn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),hn=!1;if(mn)try{var gn={};Object.defineProperty(gn,`passive`,{get:function(){hn=!0}}),window.addEventListener(`test`,gn,gn),window.removeEventListener(`test`,gn,gn)}catch{hn=!1}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return yn=i.slice(e,1<r?1-r:void 0)}function xn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Sn(){return!0}function Cn(){return!1}function wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Sn:Cn,this.isPropagationStopped=Cn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Sn)},persist:function(){},isPersistent:Sn}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},En=wn(Tn),Dn=f({},Tn,{view:0,detail:0}),On=wn(Dn),kn,An,jn,Mn=f({},Dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Un,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==jn&&(jn&&e.type===`mousemove`?(kn=e.screenX-jn.screenX,An=e.screenY-jn.screenY):An=kn=0,jn=e),kn)},movementY:function(e){return`movementY`in e?e.movementY:An}}),Nn=wn(Mn),Pn=wn(f({},Mn,{dataTransfer:0})),Fn=wn(f({},Dn,{relatedTarget:0})),In=wn(f({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0})),Ln=wn(f({},Tn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Rn=wn(f({},Tn,{data:0})),zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Bn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Vn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Hn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vn[e])?!!t[e]:!1}function Un(){return Hn}var Wn=wn(f({},Dn,{key:function(e){if(e.key){var t=zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=xn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Bn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Un,charCode:function(e){return e.type===`keypress`?xn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?xn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Gn=wn(f({},Mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Kn=wn(f({},Dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Un})),qn=wn(f({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Jn=wn(f({},Mn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Yn=wn(f({},Tn,{newState:0,oldState:0})),Xn=[9,13,27,32],Zn=mn&&`CompositionEvent`in window,Qn=null;mn&&`documentMode`in document&&(Qn=document.documentMode);var $n=mn&&`TextEvent`in window&&!Qn,er=mn&&(!Zn||Qn&&8<Qn&&11>=Qn),tr=` `,nr=!1;function rr(e,t){switch(e){case`keyup`:return Xn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function ir(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ar=!1;function or(e,t){switch(e){case`compositionend`:return ir(t);case`keypress`:return t.which===32?(nr=!0,tr):null;case`textInput`:return e=t.data,e===tr&&nr?null:e;default:return null}}function sr(e,t){if(ar)return e===`compositionend`||!Zn&&rr(e,t)?(e=bn(),yn=vn=_n=null,ar=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return er&&t.locale!==`ko`?null:t.data;default:return null}}var cr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!cr[e.type]:t===`textarea`}function ur(e,t,n,r){ln?un?un.push(r):un=[r]:ln=r,t=Dd(t,`onChange`),0<t.length&&(n=new En(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var dr=null,fr=null;function pr(e){bd(e,0)}function mr(e){if(Ht(wt(e)))return e}function hr(e,t){if(e===`change`)return t}var gr=!1;if(mn){var _r;if(mn){var vr=`oninput`in document;if(!vr){var yr=document.createElement(`div`);yr.setAttribute(`oninput`,`return;`),vr=typeof yr.oninput==`function`}_r=vr}else _r=!1;gr=_r&&(!document.documentMode||9<document.documentMode)}function br(){dr&&(dr.detachEvent(`onpropertychange`,xr),fr=dr=null)}function xr(e){if(e.propertyName===`value`&&mr(fr)){var t=[];ur(t,fr,e,cn(e)),N(pr,t)}}function Sr(e,t,n){e===`focusin`?(br(),dr=t,fr=n,dr.attachEvent(`onpropertychange`,xr)):e===`focusout`&&br()}function Cr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return mr(fr)}function wr(e,t){if(e===`click`)return mr(t)}function Tr(e,t){if(e===`input`||e===`change`)return mr(t)}function Er(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var P=typeof Object.is==`function`?Object.is:Er;function Dr(e,t){if(P(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ee.call(t,i)||!P(e[i],t[i]))return!1}return!0}function Or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var n=Or(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ut(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ut(e.document)}return t}function Mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Nr=mn&&`documentMode`in document&&11>=document.documentMode,Pr=null,Fr=null,Ir=null,Lr=!1;function Rr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Lr||Pr==null||Pr!==Ut(r)||(r=Pr,`selectionStart`in r&&Mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ir&&Dr(Ir,r)||(Ir=r,r=Dd(Fr,`onSelect`),0<r.length&&(t=new En(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Pr)))}function zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Br={animationend:zr(`Animation`,`AnimationEnd`),animationiteration:zr(`Animation`,`AnimationIteration`),animationstart:zr(`Animation`,`AnimationStart`),transitionrun:zr(`Transition`,`TransitionRun`),transitionstart:zr(`Transition`,`TransitionStart`),transitioncancel:zr(`Transition`,`TransitionCancel`),transitionend:zr(`Transition`,`TransitionEnd`)},Vr={},Hr={};mn&&(Hr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Br.animationend.animation,delete Br.animationiteration.animation,delete Br.animationstart.animation),`TransitionEvent`in window||delete Br.transitionend.transition);function Ur(e){if(Vr[e])return Vr[e];if(!Br[e])return e;var t=Br[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Hr)return Vr[e]=t[n];return e}var Wr=Ur(`animationend`),Gr=Ur(`animationiteration`),Kr=Ur(`animationstart`),qr=Ur(`transitionrun`),Jr=Ur(`transitionstart`),Yr=Ur(`transitioncancel`),Xr=Ur(`transitionend`),Zr=new Map,Qr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Qr.push(`scrollEnd`);function $r(e,t){Zr.set(e,t),kt(t,[e])}var ei=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ti=[],ni=0,ri=0;function ii(){for(var e=ni,t=ri=ni=0;t<e;){var n=ti[t];ti[t++]=null;var r=ti[t];ti[t++]=null;var i=ti[t];ti[t++]=null;var a=ti[t];if(ti[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ci(n,i,a)}}function ai(e,t,n,r){ti[ni++]=e,ti[ni++]=t,ti[ni++]=n,ti[ni++]=r,ri|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function oi(e,t,n,r){return ai(e,t,n,r),li(e)}function si(e,t){return ai(e,null,null,t),li(e)}function ci(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ge(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function li(e){if(50<hu)throw hu=0,gu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ui={};function di(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fi(e,t,n,r){return new di(e,t,n,r)}function pi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mi(e,t){var n=e.alternate;return n===null?(n=fi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function hi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function gi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)pi(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,de.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=fi(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return _i(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=fi(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=fi(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=fi(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=fi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function _i(e,t,n,r){return e=fi(7,e,r,t),e.lanes=n,e}function vi(e,t,n){return e=fi(6,e,null,t),e.lanes=n,e}function yi(e){var t=fi(18,null,null,0);return t.stateNode=e,t}function bi(e,t,n){return t=fi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xi=new WeakMap;function Si(e,t){if(typeof e==`object`&&e){var n=xi.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},xi.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var Ci=[],wi=0,Ti=null,Ei=0,Di=[],Oi=0,ki=null,Ai=1,ji=``;function Mi(e,t){Ci[wi++]=Ei,Ci[wi++]=Ti,Ti=e,Ei=t}function Ni(e,t,n){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,ki=e;var r=Ai;e=ji;var i=32-Ge(r)-1;r&=~(1<<i),n+=1;var a=32-Ge(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ai=1<<32-Ge(t)+i|n<<i|r,ji=a+e}else Ai=1<<a|n<<i|r,ji=e}function Pi(e){e.return!==null&&(Mi(e,1),Ni(e,1,0))}function Fi(e){for(;e===Ti;)Ti=Ci[--wi],Ci[wi]=null,Ei=Ci[--wi],Ci[wi]=null;for(;e===ki;)ki=Di[--Oi],Di[Oi]=null,ji=Di[--Oi],Di[Oi]=null,Ai=Di[--Oi],Di[Oi]=null}function Ii(e,t){Di[Oi++]=Ai,Di[Oi++]=ji,Di[Oi++]=ki,Ai=t.id,ji=t.overflow,ki=e}var Li=null,F=null,I=!1,Ri=null,zi=!1,Bi=Error(i(519));function Vi(e){throw qi(Si(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[pt]=e,t[mt]=r,n){case`dialog`:Z(`cancel`,t),Z(`close`,t);break;case`iframe`:case`object`:case`embed`:Z(`load`,t);break;case`video`:case`audio`:for(n=0;n<vd.length;n++)Z(vd[n],t);break;case`source`:Z(`error`,t);break;case`img`:case`image`:case`link`:Z(`error`,t),Z(`load`,t);break;case`details`:Z(`toggle`,t);break;case`input`:Z(`invalid`,t),qt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Z(`invalid`,t);break;case`textarea`:Z(`invalid`,t),Xt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Nd(t.textContent,n)?(r.popover!=null&&(Z(`beforetoggle`,t),Z(`toggle`,t)),r.onScroll!=null&&Z(`scroll`,t),r.onScrollEnd!=null&&Z(`scrollend`,t),r.onClick!=null&&(t.onclick=on),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Li=e.return;Li;)switch(Li.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Li=Li.return}}function Wi(e){if(e!==Li)return!1;if(!I)return Ui(e),I=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Wd(e.type,e.memoizedProps)),n=!n),n&&F&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));F=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));F=df(e)}else t===27?(t=F,Qd(e.type)?(e=uf,uf=null,F=e):F=t):F=Li?lf(e.stateNode.nextSibling):null;return!0}function Gi(){F=Li=null,I=!1}function Ki(){var e=Ri;return e!==null&&(tu===null?tu=e:tu.push.apply(tu,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=ce(null),Yi=null,Xi=null;function Zi(e,t,n){ue(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,le(Ji)}function $i(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ea(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$i(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),$i(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ta(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;P(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===me.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[$f]:e.push($f))}a=a.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!P(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(i(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=fd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ba=O.S;O.S=function(e,t){iu=A(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=ce(null);function Sa(){var e=xa.current;return e===null?U.pooledCache:e}function Ca(e,t){t===null?ue(xa,xa.current):ue(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var Ta=Error(i(460)),Ea=Error(i(474)),Da=Error(i(542)),Oa={then:function(){}};function ka(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Aa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(on,on),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e;default:if(typeof t.status==`string`)t.then(on,on);else{if(e=U,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Pa(e),e}throw Ma=t,Ta}}function ja(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ma=e,Ta):e}}var Ma=null;function Na(){if(Ma===null)throw Error(i(459));var e=Ma;return Ma=null,e}function Pa(e){if(e===Ta||e===Da)throw Error(i(483))}var Fa=null,Ia=0;function La(e){var t=Ia;return Ia+=1,Fa===null&&(Fa=[]),Aa(Fa,e,t)}function Ra(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function za(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ba(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=mi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=vi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&ja(i)===t.type)?(t=a(t,n.props),Ra(t,n),t.return=e,t):(t=gi(n.type,n.key,n.props,null,e.mode,r),Ra(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=bi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=_i(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=vi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=gi(t.type,t.key,t.props,null,e.mode,n),Ra(n,t),n.return=e,n;case h:return t=bi(t,e.mode,n),t.return=e,t;case T:return t=ja(t),f(e,t,n)}if(ie(t)||te(t))return t=_i(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,La(t),n);if(t.$$typeof===b)return f(e,aa(e,t),n);za(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=ja(n),p(e,t,n,r)}if(ie(n)||te(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,La(n),r);if(n.$$typeof===b)return p(e,t,aa(e,n),r);za(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=ja(r),_(e,t,n,r,i)}if(ie(r)||te(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,La(r),i);if(r.$$typeof===b)return _(e,t,n,aa(t,r),i);za(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),I&&Mi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return I&&Mi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),I&&Mi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),I&&Mi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return I&&Mi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),I&&Mi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=_i(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=gi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=bi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=ja(o),x(e,r,o,c)}if(ie(o))return v(e,r,o,c);if(te(o)){if(l=te(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,La(o),c);if(o.$$typeof===b)return x(e,r,aa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=vi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=x(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=fi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=li(e),ci(e,null,n),t}return ai(e,r,t,n),li(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(G&p)===p:(r&p)===p){p!==0&&p===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ua=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Yl|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$a(n[e],t)}var to=ce(null),no=ce(0);function ro(e,t){e=ql,ue(no,e),ue(to,t),ql=e|t.baseLanes}function io(){ue(no,ql),ue(to,to.current)}function ao(){ql=no.current,le(to),le(no)}var oo=ce(null),so=null;function co(e){var t=e.alternate;ue(mo,mo.current&1),ue(oo,e),so===null&&(t===null||to.current!==null||t.memoizedState!==null)&&(so=e)}function lo(e){ue(mo,mo.current),ue(oo,e),so===null&&(so=e)}function uo(e){e.tag===22?(ue(mo,mo.current),ue(oo,e),so===null&&(so=e)):fo(e)}function fo(){ue(mo,mo.current),ue(oo,oo.current)}function po(e){le(oo),so===e&&(so=null),le(mo)}var mo=ce(0);function ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var go=0,L=null,R=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function To(){throw Error(i(321))}function Eo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!P(e[n],t[n]))return!1;return!0}function Do(e,t,n,r,i,a){return go=a,L=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Ws:Gs,bo=!1,a=n(r,i),bo=!1,yo&&(a=ko(t,n,r,i)),Oo(e),a}function Oo(e){O.H=Us;var t=R!==null&&R.next!==null;if(go=0,_o=R=L=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||cc||(e=e.dependencies,e!==null&&na(e)&&(cc=!0))}function ko(e,t,n,r){L=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=R=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}O.H=Ks,o=t(n,r)}while(yo);return o}function Ao(){var e=O.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(R===null?null:R.memoizedState)!==e&&(L.flags|=1024),t}function jo(){var e=xo!==0;return xo=0,e}function Mo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function No(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}go=0,_o=R=L=null,yo=!1,So=xo=0,Co=null}function Po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?L.memoizedState=_o=e:_o=_o.next=e,_o}function Fo(){if(R===null){var e=L.alternate;e=e===null?null:e.memoizedState}else e=R.next;var t=_o===null?L.memoizedState:_o.next;if(t!==null)_o=t,R=e;else{if(e===null)throw L.alternate===null?Error(i(467)):Error(i(310));R=e,e={memoizedState:R.memoizedState,baseState:R.baseState,baseQueue:R.baseQueue,queue:R.queue,next:null},_o===null?L.memoizedState=_o=e:_o=_o.next=e}return _o}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=Aa(Co,e,t),t=L,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Ws:Gs),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===b)return ia(e)}throw Error(i(438,String(e)))}function zo(e){var t=null,n=L.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=L.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Io(),L.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ee;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(Fo(),R,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(go&f)===f:(G&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ha&&(d=!0);else if((go&p)===p){u=u.next,p===ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,L.lanes|=p,Yl|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,L.lanes|=f,Yl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!P(o,e.memoizedState)&&(cc=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=Fo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);P(o,t.memoizedState)||(cc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=L,a=Fo(),o=I;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!P((R||a).memoizedState,n);if(s&&(a.memoizedState=n,cc=!0),a=a.queue,hs(qo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),U===null)throw Error(i(349));o||go&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=L.updateQueue,t===null?(t=Io(),L.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!P(e,n)}catch{return!0}}function Yo(e){var t=si(e,2);t!==null&&yu(t,e,2)}function Xo(e){var t=Po();if(typeof e==`function`){var n=e;if(e=n(),bo){We(!0);try{n()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,R,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,a){if(Bs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};O.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=O.T,o={};O.T=o;try{var s=n(i,r),c=O.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),O.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(I){var n=U.formState;if(n!==null){a:{var r=L;if(I){if(F){b:{for(var i=F,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=lf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){F=lf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=Po(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Ls.bind(null,L,r),r.dispatch=n,r=Xo(!1),a=zs.bind(null,L,!1,r.queue),r=Po(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,L,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(Fo(),R,e)}function ss(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===Ta?Da:e}else r=t;t=Fo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(L.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=Fo(),n=R;if(n!==null)return ss(t,n,e);Fo(),t=t.memoizedState,n=Fo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=L.updateQueue,t===null&&(t=Io(),L.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ds(){return Fo().memoizedState}function fs(e,t,n,r){var i=Po();L.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=Fo();r=r===void 0?null:r;var a=i.memoizedState.inst;R!==null&&r!==null&&Eo(r,R.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(L.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){L.flags|=4;var t=L.updateQueue;if(t===null)t=Io(),L.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=Fo().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(H&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Eo(t,r[1]))return r[0];if(r=e(),bo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||go&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=n,e=vu(),L.lanes|=e,Yl|=e,n)}function Es(e,t,n,r){return P(n,t)?n:to.current===null?!(go&42)||go&1073741824&&!(G&261930)?(cc=!0,e.memoizedState=n):(e=vu(),L.lanes|=e,Yl|=e,t):(e=Ts(e,n,r),P(e,t)||(cc=!0),e)}function Ds(e,t,n,r,i){var a=k.p;k.p=a!==0&&8>a?a:8;var o=O.T,s={};O.T=s,zs(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rs(e,t,ya(c,r),_u(e)):Rs(e,t,r,_u(e))}catch(n){Rs(e,t,{then:function(){},status:`rejected`,reason:n},_u())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=As(e).queue;Ds(e,a,t,ae,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:ae},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},_u())}function Ms(){return ia($f)}function Ns(){return Fo().memoizedState}function Ps(){return Fo().memoizedState}function Fs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=_u();e=Ka(n);var r=qa(t,e,n);r!==null&&(yu(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Is(e,t,n){var r=_u();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bs(e)?Vs(t,n):(n=oi(e,t,n,r),n!==null&&(yu(n,e,r),Hs(n,t,r)))}function Ls(e,t,n){Rs(e,t,n,_u())}function Rs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bs(e))Vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,P(s,o))return ai(e,t,i,0),U===null&&ii(),!1}catch{}if(n=oi(e,t,i,r),n!==null)return yu(n,e,r),Hs(n,t,r),!0}return!1}function zs(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bs(e)){if(t)throw Error(i(479))}else t=oi(e,n,r,2),t!==null&&yu(t,e,2)}function Bs(e){var t=e.alternate;return e===L||t!==null&&t===L}function Vs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var Us={readContext:ia,use:Ro,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To};Us.useEffectEvent=To;var Ws={readContext:ia,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(bo){We(!0);try{e()}finally{We(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(bo){We(!0);try{n(t)}finally{We(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Is.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Ls.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Po(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,L,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,a=Po();if(I){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),U===null)throw Error(i(349));G&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ms(qo.bind(null,r,o,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Po(),t=U.identifierPrefix;if(I){var n=ji,r=Ai;n=(r&~(1<<32-Ge(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ms,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Po();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zs.bind(null,L,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Po().memoizedState=Fs.bind(null,L)},useEffectEvent:function(e){var t=Po(),n={impl:e};return t.memoizedState=n,function(){if(H&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Gs={readContext:ia,use:Ro,useCallback:Cs,useContext:ia,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Vo,useRef:ds,useState:function(){return Vo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Es(Fo(),R.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(Fo(),R,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Gs.useEffectEvent=_s;var Ks={readContext:ia,use:Ro,useCallback:Cs,useContext:ia,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=Fo();return R===null?Ts(n,e,t):Es(n,R.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=Fo();return R===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,R,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Ks.useEffectEvent=_s;function qs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ka(r);i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(yu(t,e,r),Ja(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_u(),i=Ka(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=qa(e,i,r),t!==null&&(yu(t,e,r),Ja(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_u(),r=Ka(n);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,n),t!==null&&(yu(t,e,n),Ja(t,e,n))}};function Ys(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Dr(n,r)||!Dr(i,a):!0}function Xs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function Zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Qs(e){ei(e)}function $s(e){console.error(e)}function ec(e){ei(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){return n=Ka(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function ic(e){return e=Ka(e),e.tag=3,e}function ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){nc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){nc(t,n,r),typeof i!=`function`&&(su===null?su=new Set([this]):su.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function oc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,a,!0),n=oo.current,n!==null){switch(n.tag){case 31:case 13:return so===null?ju():n.alternate===null&&Jl===0&&(Jl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Yu(e,r,a)),!1;case 22:return n.flags|=65536,r===Oa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Yu(e,r,a)),!1}throw Error(i(435,n.tag))}return Yu(e,r,a),ju(),!1}if(I)return t=oo.current,t===null?(r!==Bi&&(t=Error(i(423),{cause:r}),qi(Si(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Si(r,n),a=rc(e.stateNode,r,a),Ya(e,a),Jl!==4&&(Jl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Bi&&(e=Error(i(422),{cause:r}),qi(Si(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Si(o,n),eu===null?eu=[o]:eu.push(o),Jl!==4&&(Jl=2),t===null)return!0;r=Si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=rc(n.stateNode,r,e),Ya(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(su===null||!su.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ic(a),ac(a,e,n,r),Ya(n,a),!1}n=n.return}while(n!==null);return!1}var sc=Error(i(461)),cc=!1;function lc(e,t,n,r){t.child=e===null?Ha(t,null,n,r):Va(t,e.child,n,r)}function uc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ra(t),r=Do(e,t,n,o,a,i),s=jo(),e!==null&&!cc?(Mo(e,t,i),Pc(e,t,i)):(I&&s&&Pi(t),t.flags|=1,lc(e,t,r,i),t.child)}function dc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!pi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,fc(e,t,a,r,i)):(e=gi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Fc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Dr:n,n(o,r)&&e.ref===t.ref)return Pc(e,t,i)}return t.flags|=1,e=mi(a,r),e.ref=t.ref,e.return=t,t.child=e}function fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref)if(cc=!1,t.pendingProps=r=a,Fc(e,i))e.flags&131072&&(cc=!0);else return t.lanes=e.lanes,Pc(e,t,i)}return bc(e,t,n,r,i)}function pc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return hc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?io():ro(t,a),uo(t);else return r=t.lanes=536870912,hc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),io(),fo(t)):(Ca(t,a.cachePool),ro(t,a),fo(t),t.memoizedState=null);return lc(e,t,i,n),t.child}function mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function hc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),io(),uo(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function gc(e,t){return t=kc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _c(e,t,n){return Va(t,e.child,null,n),e=gc(t,t.pendingProps),e.flags|=2,po(t),t.memoizedState=null,e}function vc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(I){if(r.mode===`hidden`)return e=gc(t,r),t.lanes=536870912,mc(null,e);if(lo(t),(e=F)?(e=af(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=yi(e),n.return=t,t.child=n,Li=t,F=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return gc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(lo(t),a)if(t.flags&256)t.flags&=-257,t=_c(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(cc||ta(e,t,n,!1),a=(n&e.childLanes)!==0,cc||a){if(r=U,r!==null&&(s=st(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,si(e,s),yu(r,e,s),sc;ju(),t=_c(e,t,n)}else e=o.treeContext,F=lf(s.nextSibling),Li=t,I=!0,Ri=null,zi=!1,e!==null&&Ii(t,e),t=gc(t,r),t.flags|=4096;return t}return e=mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function bc(e,t,n,r,i){return ra(t),n=Do(e,t,n,r,void 0,i),r=jo(),e!==null&&!cc?(Mo(e,t,i),Pc(e,t,i)):(I&&r&&Pi(t),t.flags|=1,lc(e,t,n,i),t.child)}function xc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=ko(t,r,n,i),Oo(e),r=jo(),e!==null&&!cc?(Mo(e,t,a),Pc(e,t,a)):(I&&r&&Pi(t),t.flags|=1,lc(e,t,n,a),t.child)}function Sc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=ui,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Js,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Wa(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):ui,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(qs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Js.enqueueReplaceState(a,a.state,null),Qa(t,r,a,i),Za(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ui,typeof u==`object`&&u&&(o=ia(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Xs(t,a,r,o),Ua=!1;var f=t.memoizedState;a.state=f,Qa(t,r,a,i),Za(),l=t.memoizedState,s||f!==l||Ua?(typeof d==`function`&&(qs(t,n,d,r),l=t.memoizedState),(c=Ua||Ys(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ga(e,t),o=t.memoizedProps,u=Zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ui,typeof l==`object`&&l&&(c=ia(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Xs(t,a,r,c),Ua=!1,f=t.memoizedState,a.state=f,Qa(t,r,a,i),Za();var p=t.memoizedState;o!==d||f!==p||Ua||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(qs(t,n,s,r),p=t.memoizedState),(u=Ua||Ys(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,yc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Va(t,e.child,null,i),t.child=Va(t,null,n,i)):lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Pc(e,t,i),e}function Cc(e,t,n,r){return Gi(),t.flags|=256,lc(e,t,n,r),t.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tc(e){return{baseLanes:e,cachePool:wa()}}function Ec(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ql),e}function Dc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(mo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(I){if(a?co(t):fo(t),(e=F)?(e=af(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ki===null?null:{id:Ai,overflow:ji},retryLane:536870912,hydrationErrors:null},n=yi(e),n.return=t,t.child=n,Li=t,F=null)):e=null,e===null)throw Vi(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(fo(t),a=t.mode,c=kc({mode:`hidden`,children:c},a),r=_i(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(null,r)):(co(t),Oc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(co(t),t.flags&=-257,t=Ac(e,t,n)):t.memoizedState===null?(fo(t),c=r.fallback,a=t.mode,r=kc({mode:`visible`,children:r.children},a),c=_i(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Va(t,e.child,null,n),r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,t=mc(null,r)):(fo(t),t.child=e.child,t.flags|=128,t=null);else if(co(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=Ac(e,t,n)}else if(cc||ta(e,t,n,!1),s=(n&e.childLanes)!==0,cc||s){if(s=U,s!==null&&(r=st(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,si(e,r),yu(s,e,r),sc;of(c)||ju(),t=Ac(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,F=lf(c.nextSibling),Li=t,I=!0,Ri=null,zi=!1,e!==null&&Ii(t,e),t=Oc(t,r.children),t.flags|=4096);return t}return a?(fo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=mi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=_i(c,a,n,null),c.flags|=2):c=mi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,mc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Tc(n):(a=c.cachePool,a===null?a=wa():(l=ua._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(e.child,r)):(co(t),n=e.child,e=n.sibling,n=mi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Oc(e,t){return t=kc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function kc(e,t){return e=fi(22,e,null,t),e.lanes=0,e}function Ac(e,t,n){return Va(t,e.child,null,n),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function Mc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Nc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=mo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,ue(mo,o),lc(e,t,r,n),r=I?Ei:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jc(e,n,t);else if(e.tag===19)jc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Mc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Mc(t,!0,n,null,a,r);break;case`together`:Mc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=mi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&na(e))):!0}function Ic(e,t,n){switch(t.tag){case 3:he(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:_e(t);break;case 4:he(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(co(t),e=Pc(e,t,n),e===null?null:e.sibling):Dc(e,t,n):(co(t),t.flags|=128,null);co(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Nc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ue(mo,mo.current),r)break;return null;case 22:return t.lanes=0,pc(e,t,n,t.pendingProps);case 24:Zi(t,ua,e.memoizedState.cache)}return Pc(e,t,n)}function Lc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)cc=!0;else{if(!Fc(e,n)&&!(t.flags&128))return cc=!1,Ic(e,t,n);cc=!!(e.flags&131072)}else cc=!1,I&&t.flags&1048576&&Ni(t,Ei,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ja(t.elementType),t.type=e,typeof e==`function`)pi(e)?(r=Zs(e,r),t.tag=1,t=Sc(null,t,e,r,n)):(t.tag=0,t=bc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=uc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=dc(null,t,e,r,n);break a}}throw t=re(e)||e,Error(i(306,t,``))}}return t;case 0:return bc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Zs(r,t.pendingProps),Sc(e,t,r,a,n);case 3:a:{if(he(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ga(e,t),Qa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Za(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Cc(e,t,r,n);break a}else if(r!==a){a=Si(Error(i(424)),t),qi(a),t=Cc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(F=lf(e.firstChild),Li=t,I=!0,Ri=null,zi=!0,n=Ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),r===a){t=Pc(e,t,n);break a}lc(e,t,r,n)}t=t.child}return t;case 26:return yc(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:I||(n=t.type,e=t.pendingProps,r=Vd(pe.current).createElement(n),r[pt]=t,r[mt]=e,Fd(r,n,e),Et(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&I&&(r=t.stateNode=pf(t.type,t.pendingProps,pe.current),Li=t,zi=!0,a=F,Qd(t.type)?(uf=a,F=lf(r.firstChild)):F=a),lc(e,t,t.pendingProps.children,n),yc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&I&&((a=r=F)&&(r=nf(r,t.type,t.pendingProps,zi),r===null?a=!1:(t.stateNode=r,Li=t,F=lf(r.firstChild),zi=!1,a=!0)),a||Vi(t)),_e(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Do(e,t,Ao,null,null,n),$f._currentValue=a),yc(e,t),lc(e,t,r,n),t.child;case 6:return e===null&&I&&((e=n=F)&&(n=rf(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Li=t,F=null,e=!0)),e||Vi(t)),null;case 13:return Dc(e,t,n);case 4:return he(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Va(t,null,r,n):lc(e,t,r,n),t.child;case 11:return uc(e,t,t.type,t.pendingProps,n);case 7:return lc(e,t,t.pendingProps,n),t.child;case 8:return lc(e,t,t.pendingProps.children,n),t.child;case 12:return lc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Zi(t,t.type,r.value),lc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ra(t),a=ia(a),r=r(a),t.flags|=1,lc(e,t,r,n),t.child;case 14:return dc(e,t,t.type,t.pendingProps,n);case 15:return fc(e,t,t.type,t.pendingProps,n);case 19:return Nc(e,t,n);case 31:return vc(e,t,n);case 22:return pc(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(a=Sa(),a===null&&(a=U,o=da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Wa(t),Zi(t,ua,a)):((e.lanes&n)!==0&&(Ga(e,t),Qa(t,null,null,n),Za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Zi(t,ua,r),r!==a.cache&&ea(t,[ua],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Zi(t,ua,r))),lc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Rc(e){e.flags|=4}function zc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Ou())e.flags|=8192;else throw Ma=Oa,Ea}else e.flags&=-16777217}function Bc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t))if(Ou())e.flags|=8192;else throw Ma=Oa,Ea}function Vc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:nt(),e.lanes|=t,$l|=t)}function Hc(e,t){if(!I)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Uc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wc(e,t,n){var r=t.pendingProps;switch(Fi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Uc(t),null;case 1:return Uc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?Rc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),Uc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Rc(t),o===null?(Uc(t),zc(t,a,null,r,n)):(Uc(t),Bc(t,o))):o?o===e.memoizedState?(Uc(t),t.flags&=-16777217):(Rc(t),Uc(t),Bc(t,o)):(e=e.memoizedProps,e!==r&&Rc(t),Uc(t),zc(t,a,e,r,n)),null;case 27:if(ve(t),n=pe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}e=de.current,Wi(t)?Hi(t,e):(e=pf(a,r,n),t.stateNode=e,Rc(t))}return Uc(t),null;case 5:if(ve(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}if(o=de.current,Wi(t))Hi(t,o);else{var s=Vd(pe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[pt]=t,o[mt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=pe.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Li,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[pt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Vi(t,!0)}else e=Vd(e).createTextNode(r),e[pt]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[pt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[pt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),Uc(t),null);case 4:return ge(),e===null&&Cd(t.stateNode.containerInfo),Uc(t),null;case 10:return Qi(t.type),Uc(t),null;case 19:if(le(mo),r=t.memoizedState,r===null)return Uc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Hc(r,!1);else{if(Jl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)hi(n,e),n=n.sibling;return ue(mo,mo.current&1|2),I&&Mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&A()>au&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!I)return Uc(t),null}else 2*A()-r.renderingStartTime>au&&n!==536870912&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=A(),e.sibling=null,n=mo.current,ue(mo,a?n&1|2:n&1),I&&Mi(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&le(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Uc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Gc(e,t){switch(Fi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),ge(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return le(mo),null;case 4:return ge(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&le(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function Kc(e,t){switch(Fi(t),t.tag){case 3:Qi(ua),ge();break;case 26:case 27:case 5:ve(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:le(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&le(xa);break;case 24:Qi(ua)}}function qc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){q(t,t.return,e)}}function Jc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){q(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){q(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){q(e,e.return,t)}}}function Xc(e,t,n){n.props=Zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){q(e,t,n)}}function Zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){q(e,t,n)}}function Qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){q(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){q(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){q(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[mt]=t}catch(t){q(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=on));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[pt]=e,t[mt]=n}catch(t){q(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,zd=cp,e=jr(e),Mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},cp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Zs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){q(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:wl(e,n),r&4&&qc(5,n);break;case 1:if(wl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){q(n,n.return,e)}else{var i=Zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){q(n,n.return,e)}}r&64&&Yc(n),r&512&&Zc(n,n.return);break;case 3:if(wl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{eo(e,t)}catch(e){q(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:wl(e,n),t===null&&r&4&&$c(n),r&512&&Zc(n,n.return);break;case 12:wl(e,n);break;case 31:wl(e,n),r&4&&vl(e,n);break;case 13:wl(e,n),r&4&&z(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Zu.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?El(e,n,(n.subtreeFlags&8772)!=0):wl(e,n),ol=i,sl=a}break;case 30:break;default:wl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&xt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(Ue&&typeof Ue.onCommitFiberUnmount==`function`)try{Ue.onCommitFiberUnmount(He,n)}catch{}switch(n.tag){case 26:sl||Qc(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||Qc(n,t);var r=ml,i=hl;Qd(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),mf(n.stateNode),ml=r,hl=i;break;case 5:sl||Qc(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null)if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){q(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){q(n,t,e)}break;case 18:ml!==null&&(hl?(e=ml,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Pp(e)):$d(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:Jc(2,n,t),sl||Jc(4,n,t),gl(e,t,n);break;case 1:sl||(Qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Xc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pp(e)}catch(e){q(t,t.return,e)}}}function z(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pp(e)}catch(e){q(t,t.return,e)}}function yl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function bl(e,t){var n=yl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Y.bind(null,e,t);t.then(r,r)}})}function B(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)xl(t,e),t=t.sibling}var V=null;function xl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:B(t,e),Sl(e),r&4&&(Jc(3,e,e.return),qc(3,e),Jc(5,e,e.return));break;case 1:B(t,e),Sl(e),r&512&&(sl||n===null||Qc(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=V;if(B(t,e),Sl(e),r&512&&(sl||n===null||Qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[bt]||o[pt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[pt]=e,Et(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[pt]=e,Et(o),r=o}e.stateNode=r}else Uf(a,e.type,e.stateNode);else e.stateNode=Lf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(a,e.type,e.stateNode):Lf(a,r,e.memoizedProps))}break;case 27:B(t,e),Sl(e),r&512&&(sl||n===null||Qc(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(B(t,e),Sl(e),r&512&&(sl||n===null||Qc(n,n.return)),e.flags&32){a=e.stateNode;try{Zt(a,``)}catch(t){q(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(B(t,e),Sl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){q(e,e.return,t)}}break;case 3:if(Vf=null,a=V,V=_f(t.containerInfo),B(t,e),V=a,Sl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Pp(t.containerInfo)}catch(t){q(e,e.return,t)}cl&&(cl=!1,Cl(e));break;case 4:r=V,V=_f(e.stateNode.containerInfo),B(t,e),Sl(e),V=r;break;case 12:B(t,e),Sl(e);break;case 31:B(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 13:B(t,e),Sl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ru=A()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,B(t,e),sl=d,ol=u,Sl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Tl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){q(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){q(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){q(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,bl(e,n))));break;case 19:B(t,e),Sl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,bl(e,r)));break;case 30:break;case 21:break;default:B(t,e),Sl(e)}}function Sl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Zt(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){q(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Cl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Cl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Tl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jc(4,t,t.return),Tl(t);break;case 1:Qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Xc(t,t.return,n),Tl(t);break;case 27:mf(t.stateNode);case 26:case 5:Qc(t,t.return),Tl(t);break;case 22:t.memoizedState===null&&Tl(t);break;case 30:Tl(t);break;default:Tl(t)}e=e.sibling}}function El(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:El(i,a,n),qc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){q(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)$a(c[i],s)}catch(e){q(r,r.return,e)}}n&&o&64&&Yc(a),Zc(a,a.return);break;case 27:al(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&$c(a),Zc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&vl(i,a);break;case 13:El(i,a,n),n&&o&4&&z(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Zc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&fa(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&qc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e)));break;case 12:if(i&2048){kl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){q(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:jl(a,o,s,c,i),qc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&Kf(n,V,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=V;V=_f(e.stateNode.containerInfo),Pl(e,t,n),V=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Jc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:Jc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Vl={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,H=0,U=null,W=null,G=0,K=0,Ul=null,Wl=!1,Gl=!1,Kl=!1,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=null,tu=null,nu=!1,ru=0,iu=0,au=1/0,ou=null,su=null,cu=0,lu=null,uu=null,du=0,fu=0,pu=null,mu=null,hu=0,gu=null;function _u(){return H&2&&G!==0?G&-G:O.T===null?ut():fd()}function vu(){if(Ql===0)if(!(G&536870912)||I){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Ql=e}else Ql=536870912;return e=oo.current,e!==null&&(e.flags|=32),Ql}function yu(e,t,n){(e===U&&(K===2||K===9)||e.cancelPendingCommit!==null)&&(Eu(e,0),Cu(e,G,Ql,!1)),it(e,n),(!(H&2)||e!==U)&&(e===U&&(!(H&2)&&(Xl|=n),Jl===4&&Cu(e,G,Ql,!1)),id(e))}function bu(e,t,n){if(H&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),a=r?Pu(e,t):Mu(e,t,!0),o=r;do{if(a===0){Gl&&!r&&Cu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Su(n)){a=Mu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=eu;var l=c.current.memoizedState.isDehydrated;if(l&&(Eu(c,s).flags|=256),s=Mu(c,s,!1),s!==2){if(Kl&&!l){c.errorRecoveryDisabledLanes|=o,Xl|=o,a=4;break a}o=tu,tu=a,o!==null&&(tu===null?tu=o:tu.push.apply(tu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Eu(e,0),Cu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Cu(r,t,Ql,!Wl);break a;case 2:tu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ru+300-A(),10<a)){if(Cu(r,t,Ql,!Wl),$e(r,0,!0)!==0)break a;du=t,r.timeoutHandle=qd(xu.bind(null,r,n,tu,ou,nu,t,Ql,Xl,$l,Wl,o,`Throttled`,-0,0),a);break a}xu(r,n,tu,ou,nu,t,Ql,Xl,$l,Wl,o,null,-0,0)}}break}while(1);id(e)}function xu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:on},Fl(t,a,d);var m=(a&62914560)===a?ru-A():(a&4194048)===a?iu-A():0;if(m=Jf(d,m),m!==null){du=a,e.cancelPendingCommit=m(Vu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Cu(e,a,o,!l);return}}Vu(e,t,a,n,r,i,o,s,c)}function Su(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!P(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cu(e,t,n,r){t&=~Zl,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ge(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&at(e,n,t)}function wu(){return H&6?!0:(ad(0,!1),!1)}function Tu(){if(W!==null){if(K===0)var e=W.return;else e=W,Xi=Yi=null,No(e),Fa=null,Ia=0,e=W;for(;e!==null;)Kc(e.alternate,e),e=e.return;W=null}}function Eu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),du=0,Tu(),U=e,W=n=mi(e.current,null),G=t,K=0,Ul=null,Wl=!1,Gl=et(e,t),Kl=!1,$l=Ql=Zl=Xl=Yl=Jl=0,tu=eu=null,nu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ge(r),a=1<<i;t|=e[i],r&=~a}return ql=t,ii(),n}function Du(e,t){L=null,O.H=Us,t===Ta||t===Da?(t=Na(),K=3):t===Ea?(t=Na(),K=4):K=t===sc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ul=t,W===null&&(Jl=1,tc(e,Si(t,e.current)))}function Ou(){var e=oo.current;return e===null?!0:(G&4194048)===G?so===null:(G&62914560)===G||G&536870912?e===so:!1}function ku(){var e=O.H;return O.H=Us,e===null?Us:e}function Au(){var e=O.A;return O.A=Vl,e}function ju(){Jl=4,Wl||(G&4194048)!==G&&oo.current!==null||(Gl=!0),!(Yl&134217727)&&!(Xl&134217727)||U===null||Cu(U,G,Ql,!1)}function Mu(e,t,n){var r=H;H|=2;var i=ku(),a=Au();(U!==e||G!==t)&&(ou=null,Eu(e,t)),t=!1;var o=Jl;a:do try{if(K!==0&&W!==null){var s=W,c=Ul;switch(K){case 8:Tu(),o=6;break a;case 3:case 2:case 9:case 6:oo.current===null&&(t=!0);var l=K;if(K=0,Ul=null,Ru(e,s,c,l),n&&Gl){o=0;break a}break;default:l=K,K=0,Ul=null,Ru(e,s,c,l)}}Nu(),o=Jl;break}catch(t){Du(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,H=r,O.H=i,O.A=a,W===null&&(U=null,G=0,ii()),o}function Nu(){for(;W!==null;)Iu(W)}function Pu(e,t){var n=H;H|=2;var r=ku(),a=Au();U!==e||G!==t?(ou=null,au=A()+500,Eu(e,t)):Gl=et(e,t);a:do try{if(K!==0&&W!==null){t=W;var o=Ul;b:switch(K){case 1:K=0,Ul=null,Ru(e,t,o,1);break;case 2:case 9:if(ka(o)){K=0,Ul=null,Lu(t);break}t=function(){K!==2&&K!==9||U!==e||(K=7),id(e)},o.then(t,t);break a;case 3:K=7;break a;case 4:K=5;break a;case 7:ka(o)?(K=0,Ul=null,Lu(t)):(K=0,Ul=null,Ru(e,t,o,7));break;case 5:var s=null;switch(W.tag){case 26:s=W.memoizedState;case 5:case 27:var c=W;if(s?Gf(s):c.stateNode.complete){K=0,Ul=null;var l=c.sibling;if(l!==null)W=l;else{var u=c.return;u===null?W=null:(W=u,zu(u))}break b}}K=0,Ul=null,Ru(e,t,o,5);break;case 6:K=0,Ul=null,Ru(e,t,o,6);break;case 8:Tu(),Jl=6;break a;default:throw Error(i(462))}}Fu();break}catch(t){Du(e,t)}while(1);return Xi=Yi=null,O.H=r,O.A=a,H=n,W===null?(U=null,G=0,ii(),Jl):0}function Fu(){for(;W!==null&&!Me();)Iu(W)}function Iu(e){var t=Lc(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?zu(e):W=t}function Lu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xc(n,t,t.pendingProps,t.type,void 0,G);break;case 11:t=xc(n,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:No(t);default:Kc(n,t),t=W=hi(t,ql),t=Lc(n,t,ql)}e.memoizedProps=e.pendingProps,t===null?zu(e):W=t}function Ru(e,t,n,r){Xi=Yi=null,No(t),Fa=null,Ia=0;var i=t.return;try{if(oc(e,i,t,n,G)){Jl=1,tc(e,Si(n,e.current)),W=null;return}}catch(t){if(i!==null)throw W=i,t;Jl=1,tc(e,Si(n,e.current)),W=null;return}t.flags&32768?(I||r===1?e=!0:Gl||G&536870912?e=!1:(Wl=e=!0,(r===2||r===9||r===3||r===6)&&(r=oo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Bu(t,e)):zu(t)}function zu(e){var t=e;do{if(t.flags&32768){Bu(t,Wl);return}e=t.return;var n=Wc(t.alternate,t,ql);if(n!==null){W=n;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);Jl===0&&(Jl=5)}function Bu(e,t){do{var n=Gc(e.alternate,e);if(n!==null){n.flags&=32767,W=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){W=e;return}W=e=n}while(e!==null);Jl=6,W=null}function Vu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Ku();while(cu!==0);if(H&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ri,j(e,n,o,s,c,l),e===U&&(W=U=null,G=0),uu=t,lu=e,du=n,fu=o,pu=a,mu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(Le,function(){return qu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=O.T,O.T=null,a=k.p,k.p=2,s=H,H|=4;try{dl(e,t,n)}finally{H=s,k.p=a,O.T=r}}cu=1,Hu(),Uu(),Wu()}}function Hu(){if(cu===1){cu=0;var e=lu,t=uu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=H;H|=4;try{xl(t,e);var a=Bd,o=jr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ar(s.ownerDocument.documentElement,s)){if(c!==null&&Mr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=kr(s,h),v=kr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}cp=!!zd,Bd=zd=null}finally{H=i,k.p=r,O.T=n}}e.current=t,cu=2}}function Uu(){if(cu===2){cu=0;var e=lu,t=uu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=H;H|=4;try{fl(e,t.alternate,t)}finally{H=i,k.p=r,O.T=n}}cu=3}}function Wu(){if(cu===4||cu===3){cu=0,Ne();var e=lu,t=uu,n=du,r=mu;t.subtreeFlags&10256||t.flags&10256?cu=5:(cu=0,uu=lu=null,Gu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(su=null),lt(n),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot==`function`)try{Ue.onCommitFiberRoot(He,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=O.T,i=k.p,k.p=2,O.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{O.T=t,k.p=i}}du&3&&Ku(),id(e),i=e.pendingLanes,n&261930&&i&42?e===gu?hu++:(hu=0,gu=e):hu=0,ad(0,!1)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function Ku(){return Hu(),Uu(),Wu(),qu()}function qu(){if(cu!==5)return!1;var e=lu,t=fu;fu=0;var n=lt(du),r=O.T,a=k.p;try{k.p=32>n?32:n,O.T=null,n=pu,pu=null;var o=lu,s=du;if(cu=0,uu=lu=null,du=0,H&6)throw Error(i(331));var c=H;if(H|=4,Rl(o.current),Al(o,o.current,s,n),H=c,ad(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot==`function`)try{Ue.onPostCommitFiberRoot(He,o)}catch{}return!0}finally{k.p=a,O.T=r,Gu(e,t)}}function Ju(e,t,n){t=Si(n,t),t=rc(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(it(e,2),id(e))}function q(e,t,n){if(e.tag===3)Ju(e,e,n);else for(;t!==null;){if(t.tag===3){Ju(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(su===null||!su.has(r))){e=Si(n,e),n=ic(2),r=qa(t,n,2),r!==null&&(ac(n,r,t,e),it(r,2),id(r));break}}t=t.return}}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Kl=!0,i.add(n),e=Xu.bind(null,e,t,n),t.then(e,e))}function Xu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,U===e&&(G&n)===n&&(Jl===4||Jl===3&&(G&62914560)===G&&300>A()-ru?!(H&2)&&Eu(e,0):Zl|=n,$l===G&&($l=0)),id(e)}function J(e,t){t===0&&(t=nt()),e=si(e,t),e!==null&&(it(e,t),id(e))}function Zu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),J(e,n)}function Y(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),J(e,n)}function Qu(e,t){return Oe(e,t)}var $u=null,ed=null,td=!1,X=!1,nd=!1,rd=0;function id(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),X=!0,td||(td=!0,dd())}function ad(e,t){if(!nd&&X){nd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ge(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=G,a=$e(r,r===U?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ud(r,a));r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){X=td=!1;var e=0;rd!==0&&Kd()&&(e=rd);for(var t=A(),n=null,r=$u;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(X=!0)),r=i}cu!==0&&cu!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ge(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=U,n=G,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(K===2||K===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ae(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ae(r),lt(n)){case 2:case 8:n=Ie;break;case 32:n=Le;break;case 268435456:n=ze;break;default:n=Le}return r=ld.bind(null,e),n=Oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ae(r),e.callbackPriority=2,e.callbackNode=null,2}function ld(e,t){if(cu!==0&&cu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ku()&&e.callbackNode!==n)return null;var r=G;return r=$e(e,e===U?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(bu(e,r,t),cd(e,A()),e.callbackNode!=null&&e.callbackNode===n?ld.bind(null,e):null)}function ud(e,t){if(Ku())return null;bu(e,t,!0)}function dd(){Xd(function(){H&6?Oe(Fe,od):sd()})}function fd(){if(rd===0){var e=ha;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),rd=e}return rd}function pd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:an(``+e)}function md(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function hd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=pd((i[mt]||null).action),o=r.submitter;o&&(t=(t=o[mt]||null)?pd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new En(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(rd!==0){var e=o?md(i,o):new FormData(i);ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?md(i,o):new FormData(i),ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var gd=0;gd<Qr.length;gd++){var _d=Qr[gd];$r(_d.toLowerCase(),`on`+(_d[0].toUpperCase()+_d.slice(1)))}$r(Wr,`onAnimationEnd`),$r(Gr,`onAnimationIteration`),$r(Kr,`onAnimationStart`),$r(`dblclick`,`onDoubleClick`),$r(`focusin`,`onFocus`),$r(`focusout`,`onBlur`),$r(qr,`onTransitionRun`),$r(Jr,`onTransitionStart`),$r(Yr,`onTransitionCancel`),$r(Xr,`onTransitionEnd`),At(`onMouseEnter`,[`mouseout`,`mouseover`]),At(`onMouseLeave`,[`mouseout`,`mouseover`]),At(`onPointerEnter`,[`pointerout`,`pointerover`]),At(`onPointerLeave`,[`pointerout`,`pointerover`]),kt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),kt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),kt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),kt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),kt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var vd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),yd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(vd));function bd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ei(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ei(e)}i.currentTarget=null,a=c}}}}function Z(e,t){var n=t[gt];n===void 0&&(n=t[gt]=new Set);var r=e+`__bubble`;n.has(r)||(wd(t,e,2,!1),n.add(r))}function xd(e,t,n){var r=0;t&&(r|=4),wd(n,e,r,t)}var Sd=`_reactListening`+Math.random().toString(36).slice(2);function Cd(e){if(!e[Sd]){e[Sd]=!0,Dt.forEach(function(t){t!==`selectionchange`&&(yd.has(t)||xd(t,!1,e),xd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sd]||(t[Sd]=!0,xd(`selectionchange`,!1,t))}}function wd(e,t,n,r){switch(hp(t)){case 2:var i=lp;break;case 8:i=up;break;default:i=dp}n=i.bind(null,t,n,e),i=void 0,!hn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Td(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=St(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}N(function(){var r=a,i=cn(n),s=[];a:{var c=Zr.get(e);if(c!==void 0){var l=En,u=e;switch(e){case`keypress`:if(xn(n)===0)break a;case`keydown`:case`keyup`:l=Wn;break;case`focusin`:u=`focus`,l=Fn;break;case`focusout`:u=`blur`,l=Fn;break;case`beforeblur`:case`afterblur`:l=Fn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Nn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Pn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Kn;break;case Wr:case Gr:case Kr:l=In;break;case Xr:l=qn;break;case`scroll`:case`scrollend`:l=On;break;case`wheel`:l=Jn;break;case`copy`:case`cut`:case`paste`:l=Ln;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Gn;break;case`toggle`:case`beforetoggle`:l=Yn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=pn(m,p),g!=null&&d.push(Ed(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==sn&&(u=n.relatedTarget||n.fromElement)&&(St(u)||u[ht]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?St(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Nn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Gn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:wt(l),h=u==null?c:wt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,St(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Od,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&kd(s,c,l,d,!1),u!==null&&f!==null&&kd(s,f,u,d,!0)}}a:{if(c=r?wt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=hr;else if(lr(c))if(gr)v=Tr;else{v=Cr;var y=Sr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&tn(r.elementType)&&(v=hr):v=wr;if(v&&=v(e,r)){ur(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Jt(c,`number`,c.value)}switch(y=r?wt(r):window,e){case`focusin`:(lr(y)||y.contentEditable===`true`)&&(Pr=y,Fr=r,Ir=null);break;case`focusout`:Ir=Fr=Pr=null;break;case`mousedown`:Lr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Lr=!1,Rr(s,n,i);break;case`selectionchange`:if(Nr)break;case`keydown`:case`keyup`:Rr(s,n,i)}var b;if(Zn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ar?rr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(er&&n.locale!==`ko`&&(ar||x!==`onCompositionStart`?x===`onCompositionEnd`&&ar&&(b=bn()):(_n=i,vn=`value`in _n?_n.value:_n.textContent,ar=!0)),y=Dd(r,x),0<y.length&&(x=new Rn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=ir(n),b!==null&&(x.data=b)))),(b=$n?or(e,n):sr(e,n))&&(x=Dd(r,`onBeforeInput`),0<x.length&&(y=new Rn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),hd(s,e,r,n,i)}bd(s,t)})}function Ed(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=pn(e,n),i!=null&&r.unshift(Ed(e,i,a)),i=pn(e,t),i!=null&&r.push(Ed(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Od(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=pn(n,a),l!=null&&o.unshift(Ed(n,l,c))):i||(l=pn(n,a),l!=null&&o.push(Ed(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ad=/\r\n?/g,jd=/\u0000|\uFFFD/g;function Md(e){return(typeof e==`string`?e:``+e).replace(Ad,`
10
- `).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Q(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Zt(e,``+r);break;case`className`:It(e,`class`,r);break;case`tabIndex`:It(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:It(e,n,r);break;case`style`:en(e,r,o);break;case`data`:if(t!==`object`){It(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Q(e,t,`name`,a.name,a,null),Q(e,t,`formEncType`,a.formEncType,a,null),Q(e,t,`formMethod`,a.formMethod,a,null),Q(e,t,`formTarget`,a.formTarget,a,null)):(Q(e,t,`encType`,a.encType,a,null),Q(e,t,`method`,a.method,a,null),Q(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=an(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=on);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=an(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Z(`beforetoggle`,e),Z(`toggle`,e),Ft(e,`popover`,r);break;case`xlinkActuate`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Lt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Lt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ft(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=nn.get(n)||n,Ft(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:en(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Zt(e,``+r);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=on);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ot.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[mt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Ft(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Z(`error`,e),Z(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Q(e,t,o,s,n,null)}}a&&Q(e,t,`srcSet`,n.srcSet,n,null),r&&Q(e,t,`src`,n.src,n,null);return;case`input`:Z(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Q(e,t,r,d,n,null)}}qt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Z(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Q(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Yt(e,!!r,n,!0):Yt(e,!!r,t,!1);return;case`textarea`:for(s in Z(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Q(e,t,s,c,n,null)}Xt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Q(e,t,l,r,n,null)}return;case`dialog`:Z(`beforetoggle`,e),Z(`toggle`,e),Z(`cancel`,e),Z(`close`,e);break;case`iframe`:case`object`:Z(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)Z(vd[r],e);break;case`image`:Z(`error`,e),Z(`load`,e);break;case`details`:Z(`toggle`,e);break;case`embed`:case`source`:case`link`:Z(`error`,e),Z(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Q(e,t,u,r,n,null)}return;default:if(tn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Q(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Q(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Q(e,t,p,m,r,f)}}Kt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Q(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Q(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Yt(e,!!n,n?[]:``,!1):Yt(e,!!n,t,!0)):Yt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Q(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Q(e,t,s,a,r,o)}M(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Q(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Q(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Q(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Q(e,t,u,p,r,m)}return;default:if(tn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Q(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Q(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Wd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Pp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[bt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Pp(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:tf(n),xt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[bt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pf(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);xt(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=k.d;k.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=wu();return e||t}function bf(e){var t=Ct(e);t!==null&&t.tag===5&&t.type===`form`?js(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=Gt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Gt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Gt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Gt(n.imageSizes)+`"]`)):i+=`[href="`+Gt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),Et(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Gt(r)+`"][href="`+Gt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),Et(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=Tt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);Et(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=Tt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=f({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),Et(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=Tt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),Et(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=pe.current)?_f(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=Tt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=Tt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=Tt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+Gt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),Et(t),e.head.appendChild(t))}function Ff(e){return`[src="`+Gt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Gt(n.href)+`"]`);if(r)return t.instance=r,Et(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Et(r),Fd(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,Et(o),o;r=Nf(n),(a=hf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),Et(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,Et(a),a):(r=n,(a=hf.get(o))&&(r=f({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Et(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[bt]||a[pt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Et(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),Et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Yf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var $f={$$typeof:b,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function ep(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function tp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ep(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=fi(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Wa(a),e}function np(e){return e?(e=ui,e):ui}function rp(e,t,n,r,i,a){i=np(i),r.context===null?r.context=i:r.pendingContext=i,r=Ka(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=qa(e,r,t),n!==null&&(yu(n,e,t),Ja(n,e,t))}function ip(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ap(e,t){ip(e,t),(e=e.alternate)&&ip(e,t)}function op(e){if(e.tag===13||e.tag===31){var t=si(e,67108864);t!==null&&yu(t,e,67108864),ap(e,67108864)}}function sp(e){if(e.tag===13||e.tag===31){var t=_u();t=ct(t);var n=si(e,t);n!==null&&yu(n,e,t),ap(e,t)}}var cp=!0;function lp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=2,dp(e,t,n,r)}finally{k.p=a,O.T=i}}function up(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=8,dp(e,t,n,r)}finally{k.p=a,O.T=i}}function dp(e,t,n,r){if(cp){var i=fp(r);if(i===null)Td(e,t,r,pp,n),wp(e,r);else if(Ep(i,e,t,n,r))r.stopPropagation();else if(wp(e,r),t&4&&-1<Cp.indexOf(e)){for(;i!==null;){var a=Ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ge(o);s.entanglements[1]|=c,o&=~c}id(a),!(H&6)&&(au=A()+500,ad(0,!1))}}break;case 31:case 13:s=si(a,2),s!==null&&yu(s,a,2),wu(),ap(a,2)}if(a=fp(r),a===null&&Td(e,t,r,pp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Td(e,t,r,null,n)}}function fp(e){return e=cn(e),mp(e)}var pp=null;function mp(e){if(pp=null,e=St(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return pp=e,null}function hp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Pe()){case Fe:return 2;case Ie:return 8;case Le:case Re:return 32;case ze:return 268435456;default:return 32}default:return 32}}var gp=!1,_p=null,vp=null,yp=null,bp=new Map,xp=new Map,Sp=[],Cp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function wp(e,t){switch(e){case`focusin`:case`focusout`:_p=null;break;case`dragenter`:case`dragleave`:vp=null;break;case`mouseover`:case`mouseout`:yp=null;break;case`pointerover`:case`pointerout`:bp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:xp.delete(t.pointerId)}}function Tp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ct(t),t!==null&&op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ep(e,t,n,r,i){switch(t){case`focusin`:return _p=Tp(_p,e,t,n,r,i),!0;case`dragenter`:return vp=Tp(vp,e,t,n,r,i),!0;case`mouseover`:return yp=Tp(yp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return bp.set(a,Tp(bp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,xp.set(a,Tp(xp.get(a)||null,e,t,n,r,i)),!0}return!1}function Dp(e){var t=St(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,dt(e.priority,function(){sp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,dt(e.priority,function(){sp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Op(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);sn=r,n.target.dispatchEvent(r),sn=null}else return t=Ct(n),t!==null&&op(t),e.blockedOn=n,!1;t.shift()}return!0}function kp(e,t,n){Op(e)&&n.delete(t)}function Ap(){gp=!1,_p!==null&&Op(_p)&&(_p=null),vp!==null&&Op(vp)&&(vp=null),yp!==null&&Op(yp)&&(yp=null),bp.forEach(kp),xp.forEach(kp)}function jp(e,n){e.blockedOn===n&&(e.blockedOn=null,gp||(gp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ap)))}var Mp=null;function Np(e){Mp!==e&&(Mp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Mp===e&&(Mp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(mp(r||n)===null)continue;break}var a=Ct(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Pp(e){function t(t){return jp(t,e)}_p!==null&&jp(_p,e),vp!==null&&jp(vp,e),yp!==null&&jp(yp,e),bp.forEach(t),xp.forEach(t);for(var n=0;n<Sp.length;n++){var r=Sp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Sp.length&&(n=Sp[0],n.blockedOn===null);)Dp(n),n.blockedOn===null&&Sp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[mt]||null;if(typeof a==`function`)o||Np(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[mt]||null)s=o.formAction;else if(mp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Np(n)}}}function Fp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Ip(e){this._internalRoot=e}Lp.prototype.render=Ip.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;rp(n,_u(),e,t,null,null)},Lp.prototype.unmount=Ip.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rp(e.current,2,null,e,null,null),wu(),t[ht]=null}};function Lp(e){this._internalRoot=e}Lp.prototype.unstable_scheduleHydration=function(e){if(e){var t=ut();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Sp.length&&t!==0&&t<Sp[n].priority;n++);Sp.splice(n,0,e),n===0&&Dp(e)}};var Rp=n.version;if(Rp!==`19.2.6`)throw Error(i(527,Rp,`19.2.6`));k.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var zp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:O,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Bp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bp.isDisabled&&Bp.supportsFiber)try{He=Bp.inject(zp),Ue=Bp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Qs,s=$s,c=ec;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=tp(e,1,!1,null,null,n,r,null,o,s,c,Fp),e[ht]=t.current,Cd(e),new Ip(t)}})),Ne=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Me()})),A=a(De(),1),Pe=Ne(),Fe=class extends Error{constructor(e,t,n){super(e),this.status=t,this.payload=n}};async function Ie(e,t){let n=await fetch(e,{credentials:`include`,headers:{accept:`application/json`,...t?.headers??{}},...t}),r=await n.text(),i=null;try{i=r?JSON.parse(r):null}catch{i=r}if(!n.ok)throw n.status===401&&(window.location.href=`/ui/login?next=${encodeURIComponent(window.location.pathname)}`),new Fe(i&&typeof i==`object`&&`error`in i?String(i.error):`request failed (${n.status})`,n.status,i);return i}function Le(e={}){let t=new URLSearchParams;for(let n of e.status??[])t.append(`status`,n);for(let n of e.agent??[])t.append(`agent`,n);e.limit&&t.set(`limit`,String(e.limit)),e.cursor&&t.set(`cursor`,e.cursor),e.allUsers&&t.set(`allUsers`,`1`);let n=t.toString();return Ie(`/runs${n?`?${n}`:``}`)}function Re(e){return Ie(`/runs/${encodeURIComponent(e)}`)}function ze(e={}){return Ie(`/conversations`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)})}function Be(e){return Ie(`/conversations/${encodeURIComponent(e)}`)}function Ve(e,t){return Ie(`/conversations/${encodeURIComponent(e)}/messages`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)})}function He(e){return Ie(`/runs/${encodeURIComponent(e)}/tool-calls`)}function Ue(e){return Ie(`/runs/${encodeURIComponent(e)}/cancel`,{method:`POST`})}function We(e,t){return Ie(`/runs/${encodeURIComponent(e)}/input`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({input:t})})}function Ge(){return Ie(`/diagnostics`)}function Ke(){return Ie(`/healthz`)}function qe(){return Ie(`/schedules`)}function Je(){return Ie(`/inbox`)}async function Ye(){let e=await fetch(`/blueprint`,{credentials:`include`,headers:{accept:`text/yaml`}});if(!e.ok)throw new Fe(`request failed (${e.status})`,e.status,null);return e.text()}function Xe(){return Ie(`/agents`)}function Ze(){return Ie(`/deployment`)}function Qe(){return Ie(`/config/env-vars`)}function $e(e,t){return Ie(`/config/env-vars/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({value:t})})}function et(e,t){return Ie(`/agents/${encodeURIComponent(e)}/model`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({spec:t})})}function tt(e){let t=new URLSearchParams;e?.from&&t.set(`from`,e.from),e?.to&&t.set(`to`,e.to),e?.allUsers&&t.set(`allUsers`,`1`);let n=t.toString();return Ie(`/usage${n?`?${n}`:``}`)}function nt(e,t){let n=`/runs/${encodeURIComponent(e)}/stream`,r=new EventSource(n,{withCredentials:!0});return r.addEventListener(`message`,e=>{try{let n=JSON.parse(e.data);t.onMessage?.(n)}catch{}}),r.addEventListener(`status`,e=>{try{let n=JSON.parse(e.data);t.onStatus?.(n.status)}catch{}}),r.addEventListener(`done`,()=>{t.onDone?.(),r.close()}),r.addEventListener(`error`,e=>{t.onError?.(e)}),()=>r.close()}function rt(e,t){let n=`/conversations/${encodeURIComponent(e)}/stream`,r=new EventSource(n,{withCredentials:!0});return r.addEventListener(`message`,e=>{try{let n=JSON.parse(e.data);t.onMessage?.(n)}catch{}}),r.addEventListener(`status`,e=>{try{let n=JSON.parse(e.data);t.onStatus?.(n.runId,n.status)}catch{}}),r.addEventListener(`run_created`,e=>{try{let n=JSON.parse(e.data);t.onRunCreated?.(n.runId)}catch{}}),r.addEventListener(`error`,e=>{t.onError?.(e)}),()=>r.close()}var it=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),j=o(((e,t)=>{t.exports=it()}))(),at=3e4;function ot(){let[e,t]=(0,A.useState)([]),[n,r]=(0,A.useState)(!1);(0,A.useEffect)(()=>{let e=!1,n=null,r=async()=>{try{let n=await Ge();if(e)return;t(n.checks)}catch(t){if(e||t instanceof Fe&&t.status===401)return}finally{e||(n=setTimeout(r,at))}};return r(),()=>{e=!0,n&&clearTimeout(n)}},[]);let i=e.filter(e=>e.level===`error`),a=e.filter(e=>e.level===`warn`);if(i.length===0&&a.length===0)return null;let o=i.length>0,s=i[0]??a[0];return s?(0,j.jsxs)(`div`,{className:`mb-4 border ${o?`border-err text-err`:`border-accent text-accent`}`,children:[(0,j.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),className:`flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-xs`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`label !text-current`,children:o?`// setup error`:`// warning`}),(0,j.jsx)(`span`,{children:s.title}),i.length+a.length>1&&(0,j.jsxs)(`span`,{className:`text-muted`,children:[`· `,i.length+a.length-1,` more`]})]}),(0,j.jsx)(`span`,{className:`text-muted`,children:n?`[-]`:`[+]`})]}),n&&(0,j.jsx)(`ul`,{className:`border-t border-current px-3 py-2 text-xs`,children:[...i,...a].map(e=>(0,j.jsxs)(`li`,{className:`mb-2 last:mb-0`,children:[(0,j.jsxs)(`div`,{className:`font-medium`,children:[(0,j.jsxs)(`span`,{className:`mr-2 text-muted`,children:[`[`,e.level.toUpperCase(),`]`]}),e.title]}),(0,j.jsx)(`div`,{className:`text-muted`,children:e.message}),e.hint&&(0,j.jsxs)(`div`,{className:`mt-0.5 text-muted`,children:[(0,j.jsx)(`span`,{className:`text-current`,children:`→`}),` `,e.hint]})]},e.id))})]}):null}var st=(0,A.createContext)(null);function ct({children:e}){let[t,n]=(0,A.useState)(null);return(0,A.useEffect)(()=>{let e=!1;return Ze().then(t=>{e||n(t)}).catch(()=>{}),()=>{e=!0}},[]),(0,j.jsx)(st.Provider,{value:t,children:e})}function lt(){return(0,A.useContext)(st)}function ut(e=`agent`){return lt()?.name??e}function dt({loading:e,error:t,empty:n,children:r}){return t?(0,j.jsxs)(`div`,{className:`border border-err p-4 text-xs text-err`,children:[(0,j.jsx)(`div`,{className:`label !text-err`,children:`ERROR`}),(0,j.jsx)(`div`,{className:`mt-1 break-all`,children:t.message})]}):e?(0,j.jsx)(ft,{children:`loading`}):n?.when?(0,j.jsx)(ft,{children:n.message}):(0,j.jsx)(j.Fragment,{children:r})}function ft({children:e}){return(0,j.jsxs)(`div`,{className:`panel p-6 text-center text-muted text-xs`,children:[e,(0,j.jsx)(`span`,{className:`blink ml-1 text-accent`,"aria-hidden":`true`,children:`▊`})]})}var pt=[{id:`claude-sonnet-4-6`,label:`Claude Sonnet 4.6`,hint:`default — best balance`,spec:{provider:`anthropic`,model:`claude-sonnet-4-6`}},{id:`claude-opus-4-7`,label:`Claude Opus 4.7`,hint:`Anthropic flagship`,spec:{provider:`anthropic`,model:`claude-opus-4-7`}},{id:`claude-haiku-4-5`,label:`Claude Haiku 4.5`,hint:`fastest Anthropic`,spec:{provider:`anthropic`,model:`claude-haiku-4-5`}},{id:`gpt-5-1`,label:`GPT-5.1`,hint:`OpenAI flagship — needs OPENAI_API_KEY`,spec:{provider:`openai-compat`,model:`gpt-5.1`,apiKeyEnv:`OPENAI_API_KEY`}},{id:`gpt-5-1-mini`,label:`GPT-5.1 Mini`,hint:`OpenAI small/fast — needs OPENAI_API_KEY`,spec:{provider:`openai-compat`,model:`gpt-5.1-mini`,apiKeyEnv:`OPENAI_API_KEY`}},{id:`gemini-2-5-pro`,label:`Gemini 2.5 Pro`,hint:`Google flagship — needs GEMINI_API_KEY`,spec:{provider:`openai-compat`,model:`gemini-2.5-pro`,baseURL:`https://generativelanguage.googleapis.com/v1beta/openai`,apiKeyEnv:`GEMINI_API_KEY`}},{id:`gemini-2-5-flash`,label:`Gemini 2.5 Flash`,hint:`Google fast — needs GEMINI_API_KEY`,spec:{provider:`openai-compat`,model:`gemini-2.5-flash`,baseURL:`https://generativelanguage.googleapis.com/v1beta/openai`,apiKeyEnv:`GEMINI_API_KEY`}},{id:`grok-4`,label:`Grok 4`,hint:`xAI — needs XAI_API_KEY`,spec:{provider:`openai-compat`,model:`grok-4`,baseURL:`https://api.x.ai/v1`,apiKeyEnv:`XAI_API_KEY`}},{id:`custom`,label:`Custom…`,hint:`any OpenAI-compatible gateway`,spec:null}],mt=[`api.anthropic.com`,`api.openai.com`,`openrouter.ai`,`api.groq.com`,`api.fireworks.ai`,`generativelanguage.googleapis.com`,`api.x.ai`,`api.deepseek.com`,`api.mistral.ai`];function ht(e){return pt.find(t=>t.id===e)??pt.find(e=>e.id===`custom`)??pt[0]}function gt(e){for(let t of pt)if(t.spec&&t.spec.provider===e.provider&&t.spec.model===e.model&&(t.spec.baseURL??null)===(e.baseURL??null)&&(t.spec.apiKeyEnv??null)===(e.apiKeyEnv??null))return t;return ht(`custom`)}function _t(e){let t={provider:e.provider,model:e.model};return e.baseURL&&e.baseURL.trim().length>0&&(t.baseURL=e.baseURL.trim()),e.apiKeyEnv&&e.apiKeyEnv.trim().length>0&&(t.apiKeyEnv=e.apiKeyEnv.trim()),e.thinking&&(t.thinking={...e.thinking}),t}function vt(e){if(!e.model||e.model.trim().length===0||e.apiKeyEnv&&!/^[A-Z][A-Z0-9_]*$/.test(e.apiKeyEnv))return!1;if(e.baseURL)try{new URL(e.baseURL)}catch{return!1}return!0}function yt({spec:e,presetId:t,onChange:n}){let r=t===`custom`;return(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`space-y-1.5`,children:pt.map(r=>(0,j.jsx)(bt,{preset:r,selected:t===r.id,onSelect:()=>{let t=ht(r.id);n({presetId:t.id,spec:t.spec??e})}},r.id))}),r?(0,j.jsx)(xt,{spec:e,onChange:e=>n({presetId:t,spec:e})}):null]})}function bt({preset:e,selected:t,onSelect:n}){return(0,j.jsxs)(`label`,{className:`flex cursor-pointer items-center justify-between border p-2 text-xs ${t?`border-accent text-accent`:`border-line`}`,children:[(0,j.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(`input`,{type:`radio`,name:`model-preset`,value:e.id,checked:t,onChange:n,className:`accent-[var(--color-accent)]`}),(0,j.jsx)(`span`,{children:e.label})]}),(0,j.jsx)(`span`,{className:`text-[11px] text-muted`,children:e.hint})]})}function xt({spec:e,onChange:t}){let n=n=>t(_t({...e,...n})),r=e.baseURL?Ct(e.baseURL):null,i=r&&!mt.includes(r);return(0,j.jsxs)(`div`,{className:`space-y-2 border border-line p-3 text-xs`,children:[(0,j.jsx)(St,{label:`Provider`,children:(0,j.jsxs)(`select`,{className:`w-full border border-line bg-transparent p-1.5 text-xs`,value:e.provider,onChange:e=>n({provider:e.target.value}),children:[(0,j.jsx)(`option`,{value:`anthropic`,children:`anthropic`}),(0,j.jsx)(`option`,{value:`openai-compat`,children:`openai-compat`})]})}),(0,j.jsx)(St,{label:`Model id`,children:(0,j.jsx)(`input`,{type:`text`,className:`w-full border border-line bg-transparent p-1.5 font-mono text-xs`,value:e.model,placeholder:e.provider===`anthropic`?`claude-sonnet-4-6`:`openai/gpt-4o`,onChange:e=>n({model:e.target.value})})}),e.provider===`openai-compat`?(0,j.jsxs)(St,{label:`Base URL (blank for OpenAI's default)`,children:[(0,j.jsx)(`input`,{type:`url`,className:`w-full border border-line bg-transparent p-1.5 font-mono text-xs`,value:e.baseURL??``,placeholder:`https://openrouter.ai/api/v1`,onChange:e=>n({baseURL:e.target.value})}),i?(0,j.jsxs)(`p`,{className:`mt-1 text-[10px] text-muted`,children:[`Host `,(0,j.jsx)(`span`,{className:`font-mono`,children:r}),` isn't on the known-providers list. Proceed only if you trust it.`]}):null]}):null,(0,j.jsxs)(St,{label:`API key env var`,children:[(0,j.jsx)(`input`,{type:`text`,className:`w-full border border-line bg-transparent p-1.5 font-mono text-xs`,value:e.apiKeyEnv??``,placeholder:e.provider===`anthropic`?`ANTHROPIC_API_KEY`:`OPENAI_API_KEY`,onChange:e=>n({apiKeyEnv:e.target.value})}),(0,j.jsx)(`p`,{className:`mt-1 text-[10px] text-muted`,children:`Must be UPPER_SNAKE_CASE. Set the secret in the Render dashboard before saving.`})]})]})}function St({label:e,children:t}){return(0,j.jsxs)(`div`,{className:`block`,children:[(0,j.jsx)(`span`,{className:`block text-[10px] uppercase tracking-wide text-muted`,children:e}),(0,j.jsx)(`div`,{className:`mt-1`,children:t})]})}function Ct(e){try{return new URL(e).host}catch{return null}}function wt({agent:e,onClose:t,onSaved:n}){let r=Et(e.model),[i,a]=(0,A.useState)(()=>gt(r).id),[o,s]=(0,A.useState)(r),[c,l]=(0,A.useState)(!1),[u,d]=(0,A.useState)(null),[f,p]=(0,A.useState)(null),m=vt(o);return(0,j.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,children:[(0,j.jsx)(`button`,{type:`button`,"aria-label":`Close`,className:`absolute inset-0 cursor-default`,onClick:t}),(0,j.jsxs)(`div`,{className:`panel relative max-h-[90vh] w-full max-w-lg overflow-auto bg-bg p-5 text-xs`,role:`dialog`,"aria-modal":`true`,"aria-label":`Edit model for ${e.name}`,children:[(0,j.jsxs)(`header`,{className:`mb-4 flex items-center justify-between`,children:[(0,j.jsxs)(`h2`,{className:`text-sm font-bold uppercase tracking-wide`,children:[`edit model — `,e.name]}),(0,j.jsx)(`button`,{type:`button`,onClick:t,className:`border border-line px-2 py-1 text-xs`,"aria-label":`Close`,children:`✕`})]}),(0,j.jsx)(yt,{spec:o,presetId:i,onChange:e=>{a(e.presetId),s(e.spec)}}),u?(0,j.jsxs)(`div`,{className:`mt-4 border border-line p-2 text-[11px]`,children:[(0,j.jsx)(`p`,{children:u}),f?(0,j.jsx)(`p`,{className:`mt-2`,children:(0,j.jsx)(`a`,{className:`text-accent underline`,href:f,target:`_top`,rel:`noreferrer`,children:`Install the render-harness GitHub App →`})}):null]}):null,(0,j.jsxs)(`p`,{className:`mt-3 text-[11px] text-muted`,children:[`Saving commits to `,(0,j.jsx)(`span`,{className:`font-mono`,children:`render-harness.yaml`}),` on the agent's repo. Render auto-deploys on push; the new model takes effect once the rolling restart completes.`]}),(0,j.jsxs)(`footer`,{className:`mt-4 flex items-center justify-end gap-2`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:t,disabled:c,className:`border border-line px-3 py-1.5 text-xs`,children:`cancel`}),(0,j.jsx)(`button`,{type:`button`,onClick:async()=>{l(!0),d(null),p(null);try{let r=await et(e.name,o);if(r.ok){n(o),t();return}if(r.error===`needs_install`&&r.installUrl){d(`The render-harness GitHub App isn't installed on this repo yet.`),p(r.installUrl);return}d(Tt(r.error,r.details))}catch(e){d(e instanceof Error?e.message:String(e))}finally{l(!1)}},disabled:c||!m,className:`border border-accent bg-accent px-3 py-1.5 text-xs text-bg disabled:opacity-50`,children:c?`saving…`:`save & redeploy`})]})]})]})}function Tt(e,t){switch(e){case`wizard_service_not_configured`:return`In-UI edits aren't wired up on this deployment. Set RENDER_HARNESS_WIZARD_URL on the worker service to enable them.`;case`wizard_shared_secret_not_configured`:return`Set WIZARD_SHARED_SECRET on both the worker and wizard services. They must match.`;case`repo_locator_missing`:return"`.render-harness/agent.json` is missing or has null org/repo. The wizard's scaffolder writes this; CLI-scaffolded repos need the install flow to populate it.";case`agent_not_found`:return`Agent id wasn't found in the deployed render-harness.yaml — has it been renamed since this deploy?`;case`stale_sha`:return`Someone else committed to render-harness.yaml under us. Reload and retry.`;case`invalid_model_spec`:return`The spec didn't validate: ${t??`unknown reason`}`;default:return t??e??`save failed`}}function Et(e){let t={provider:e.provider,model:e.model};return e.baseURL&&(t.baseURL=e.baseURL),e.apiKeyEnv&&(t.apiKeyEnv=e.apiKeyEnv),e.thinking&&(t.thinking={...e.thinking}),t}function Dt(){let[e,t]=(0,A.useState)([]),[n,r]=(0,A.useState)(!0),[i,a]=(0,A.useState)(null);return(0,A.useEffect)(()=>{let e=!1;return r(!0),Xe().then(n=>{e||t(n.agents)}).catch(t=>{e||t instanceof Fe&&t.status===401||a(t instanceof Error?t:Error(String(t)))}).finally(()=>{e||r(!1)}),()=>{e=!0}},[]),(0,j.jsx)(dt,{loading:n,error:i,empty:{when:e.length===0,message:`// no agents loaded — pass via serveWeb({ agent }) or serveWeb({ agents })`},children:(0,j.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:e.map(e=>(0,j.jsx)(Ot,{agent:e,onModelUpdated:n=>t(t=>t.map(t=>t.name===e.name?{...t,model:n}:t))},e.name))})})}function Ot({agent:e,onModelUpdated:t}){let[n,r]=(0,A.useState)(!1);return(0,j.jsxs)(`div`,{className:`panel space-y-4 p-4 text-xs`,children:[(0,j.jsxs)(`header`,{children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsx)(`h2`,{className:`text-sm font-bold uppercase tracking-wide`,children:e.name}),(0,j.jsxs)(`span`,{className:`badge`,children:[`v`,e.version]})]}),(0,j.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-muted`,children:[(0,j.jsxs)(`span`,{children:[e.model.provider,`/`,e.model.model]}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>r(!0),className:`border border-line px-1.5 py-0.5 text-[10px] text-accent hover:bg-accent hover:text-bg`,"aria-label":`Edit model for ${e.name}`,children:`edit`})]})]}),n?(0,j.jsx)(wt,{agent:e,onClose:()=>r(!1),onSaved:t}):null,(0,j.jsx)(kt,{title:`system prompt`,children:(0,j.jsxs)(`details`,{className:`border border-line p-2`,children:[(0,j.jsxs)(`summary`,{className:`cursor-pointer text-[11px] text-muted`,children:[e.systemPromptLength.toLocaleString(),` chars · click to expand preview`]}),(0,j.jsx)(`pre`,{className:`mt-2 max-h-64 overflow-auto whitespace-pre-wrap text-[11px]`,children:e.systemPromptPreview})]})}),(0,j.jsx)(kt,{title:`mcp servers`,children:e.mcpServers.length===0?(0,j.jsx)(`p`,{className:`text-muted`,children:`// none configured`}):(0,j.jsx)(`ul`,{className:`space-y-1`,children:e.mcpServers.map(e=>(0,j.jsxs)(`li`,{className:`flex items-center justify-between border border-line px-2 py-1`,children:[(0,j.jsx)(`span`,{children:e.name}),(0,j.jsx)(`span`,{className:`label`,children:e.transport})]},e.name))})}),(0,j.jsx)(kt,{title:`permissions`,children:(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(At,{label:`allowed`,items:e.permissions.allowedTools??[]}),(0,j.jsx)(At,{label:`denied`,items:e.permissions.deniedTools??[]}),(0,j.jsx)(At,{label:`requires approval`,items:e.permissions.requireApproval??[]})]})}),(0,j.jsx)(kt,{title:`tools / skills`,children:(0,j.jsxs)(`div`,{className:`text-muted`,children:[`local tools: `,e.hasLocalTools?`yes`:`no`,` · skills:`,` `,e.hasSkills?`yes`:`no`]})}),(e.budget||e.sampling)&&(0,j.jsx)(kt,{title:`budget / sampling`,children:(0,j.jsx)(`pre`,{className:`overflow-auto border border-line p-2 text-[11px]`,children:JSON.stringify({budget:e.budget,sampling:e.sampling},null,2)})})]})}function kt({title:e,children:t}){return(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`label mb-1`,children:e}),t]})}function At({label:e,items:t}){return t.length===0?(0,j.jsxs)(`div`,{className:`text-muted`,children:[(0,j.jsxs)(`span`,{className:`label`,children:[e,`:`]}),` —`]}):(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`label`,children:e}),(0,j.jsx)(`ul`,{className:`mt-1 flex flex-wrap gap-1`,children:t.map(e=>(0,j.jsx)(`li`,{className:`border border-line px-1.5 py-0.5 text-[11px]`,children:e},e))})]})}function jt(e){let t=[];for(let n of e.effectTasks)try{n()}catch(e){t.push(e)}if(t.length>0){if(t.length===1)throw t[0];for(let e of t)console.error(e);throw AggregateError(t,`Errors during commit`)}}function Mt(e){let t=[];for(let n of e.cells)if(n?.type===`effect`&&(n.deps=null,n.cleanup))try{n.cleanup?.()}catch(e){t.push(e)}finally{n.cleanup=void 0}if(t.length>0){if(t.length===1)throw t[0];for(let e of t)console.error(e);throw AggregateError(t,`Errors during cleanup`)}}var Nt=typeof process<`u`&&!1,Pt=null;function Ft(e,t){e.currentIndex=0;let n=Pt;Pt=e;try{if(t(),e.isFirstRender=!1,e.cells.length!==e.currentIndex)throw Error(`Rendered ${e.currentIndex} hooks but expected ${e.cells.length}. Hooks must be called in the exact same order in every render.`)}finally{Pt=n}}function It(){if(!Pt)throw Error(`No resource fiber available`);return Pt}function Lt(e){return Nt?Pt?.devStrictMode?Pt.isFirstRender?`child`:`root`:e?`root`:null:null}function Rt(e,t){let n=e[zt];if(!n)throw Error(`ResourceElement.type is not a valid Resource`);return n(t)}var zt=Symbol(`fnSymbol`);function Bt(e,t,n=void 0,r=Lt(!1)){return{type:e,root:t,markDirty:n,devStrictMode:r,cells:[],currentIndex:0,renderContext:void 0,isFirstRender:!0,isMounted:!1,isNeverMounted:!0}}function Vt(e){if(!e.isMounted)throw Error(`Tried to unmount a fiber that is already unmounted`);e.isMounted=!1,Mt(e)}function Ht(e,t){let n={effectTasks:[],props:t,output:void 0};return Ft(e,()=>{e.renderContext=n;try{n.output=Rt(e.type,t)}finally{e.renderContext=void 0}}),n}function Ut(e,t){e.isMounted=!0,Nt&&e.isNeverMounted&&e.devStrictMode===`root`&&(e.isNeverMounted=!1,jt(t),Mt(e)),e.isNeverMounted=!1,jt(t)}var Wt=e=>({version:0,committedVersion:0,dispatchUpdate:e,changelog:[],dirtyCells:[]}),Gt=e=>{for(let t of e.dirtyCells)t.dirty=!1,t.queue.clear(),t.current=t.workInProgress;e.committedVersion=e.version,e.changelog.length=0,e.dirtyCells.length=0},Kt=(e,t)=>{let n=e.version>t;if(e.version=t,n){for(let t of e.dirtyCells)t.dirty=!1,t.queue.clear(),t.workInProgress=t.current;if(e.dirtyCells.length=0,t===e.committedVersion)e.changelog.length=0;else{if(e.committedVersion>t)throw Error(`Version is less than committed version`);for(;e.committedVersion+e.changelog.length>t;)e.changelog.pop();e.changelog.forEach(e=>e()),Gt(e)}}},qt=(e,t)=>{t.dirty||(t.dirty=!0,e.markDirty?.(),e.root.dirtyCells.push(t))},Jt=()=>{if(!Nt)return null;let e=(0,A.useRef)(0),t=e.current===0;return(0,A.useState)(()=>e.current++),e.current===2?t?`child`:`root`:null};function Yt(e){let t=(0,A.useMemo)(()=>Wt(e=>r(e)),[]),[n,r]=(0,A.useReducer)((e,n)=>(Kt(t,e),e+ +!!n()),0);Kt(t,n);let i=Jt(),a=(0,A.useMemo)(()=>(e.key,Bt(e.type,t,void 0,i)),[e.type,e.key,t,i]),o=Ht(a,e.props);return(0,A.useLayoutEffect)(()=>()=>Vt(a),[a]),(0,A.useLayoutEffect)(()=>{Gt(t),Ut(a,o)}),o.output}function M(e){let t=e=>({type:t,props:e});return t[zt]=e,t}function Xt(e,t){return{...t,key:e}}var Zt=(e,t)=>{let n=It(),r=n.currentIndex++;if(!n.isFirstRender&&r>=n.cells.length)throw Error(`Rendered more hooks than during the previous render. Hooks must be called in the exact same order in every render.`);let i=n.cells[r];if(i||(i=t(),n.cells[r]=i),i.type!==e)throw Error(`Hook order changed between renders`);return i},Qt=e=>{It().renderContext.effectTasks.push(e)},$t=(e,t)=>{if(e.renderContext)throw Error(`Resource updated during render`);if(e.isNeverMounted)throw Error(`Resource updated before mount`);e.root.dispatchUpdate(()=>{let n=t();return n?(n(),e.root.changelog.push(n),!0):!1})};function en(e,t,n,r){let i=Zt(`reducer`,()=>{let t=It(),a=r?r(n):n;return Nt&&t.devStrictMode&&r&&r(n),{type:`reducer`,queue:new Set,dirty:!1,workInProgress:a,current:a,reducer:e,dispatch:n=>{let r={action:n,hasEagerState:!1,eagerState:void 0};$t(t,()=>t.root.dirtyCells.length===0&&!r.hasEagerState&&(r.eagerState=e(i.workInProgress,n),r.hasEagerState=!0,Object.is(i.current,r.eagerState))?null:()=>{qt(t,i),i.queue.add(r)})}}}),a=It(),o=e===i.reducer;i.reducer=e;for(let t of i.queue)(!t.hasEagerState||!o)&&(t.eagerState=e(i.workInProgress,t.action),t.hasEagerState=!0),Nt&&a.devStrictMode&&e(i.workInProgress,t.action),i.workInProgress=t.eagerState;if(i.queue.clear(),t){let e=t(i.workInProgress);Object.is(e,i.workInProgress)||(qt(a,i),i.workInProgress=e)}return[i.workInProgress,i.dispatch]}function tn(e,t,n){return en(e,void 0,t,n)}function nn(e,t,n,r){return en(e,t,n,r)}var rn=(e,t)=>typeof t==`function`?t(e):t,an=e=>typeof e==`function`?e():e;function on(e){return tn(rn,e,an)}var sn=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0},cn=()=>({type:`effect`,cleanup:void 0,deps:null});function ln(e,t){let n=Zt(`effect`,cn);if(!(t&&n.deps&&sn(n.deps,t))){if(n.deps!==null&&!!t!=!!n.deps)throw Error(`tapEffect called with and without dependencies across re-renders`);Qt(()=>{let r=[];try{n.cleanup?.()}catch(e){r.push(e)}finally{n.cleanup=void 0}try{let t=e();if(t!==void 0&&typeof t!=`function`)throw Error(`An effect function must either return a cleanup function or nothing. Received: ${typeof t}`);n.cleanup=t}catch(e){r.push(e)}if(n.deps=t,r.length>0){if(r.length===1)throw r[0];for(let e of r)console.error(e);throw AggregateError(r,`Errors during commit`)}})}}function un(e){let[t]=on(()=>({current:e}));return t}function dn(e,t){let[n]=on(e);return n}var fn=()=>{throw Error(`Memo reducer should not be called`)},N=(e,t)=>{let n=It(),[r]=nn(fn,r=>{if(r&&sn(r.deps,t))return r;let i=e();return Nt&&n.devStrictMode&&e(),{value:i,deps:t}},null);return r.value},pn=(e,t)=>N(()=>e,t);function mn(e){let t=un(e);ln(()=>{t.current=e});let n=It();return pn(((...e)=>{if(Nt&&n.renderContext)throw Error(`tapEffectEvent cannot be called during render`);return t.current(...e)}),[n])}function hn(e,t){let n=It(),r=un(0),i=N(()=>(e.key,Bt(e.type,n.root,()=>{r.current++,n.markDirty?.()})),[e.type,e.key,n]),a=t?N(()=>Ht(i,e.props),[i,...t,r.current]):Ht(i,e.props);return ln(()=>()=>Vt(i),[i]),ln(()=>{Ut(i,a)},[i,a]),a.output}function gn(e,t){let n=un(0),r=n.current,i=dn(It,[]),a=dn(()=>()=>{n.current++,i.markDirty?.()},[]),o=dn(()=>new Map,[]),s=t?pn(e,t):e,c=N(()=>{let e=s(),t=new Set,n=[],r=0;for(let s=0;s<e.length;s++){let c=e[s],l=c.key;if(l===void 0)throw Error(`tapResources did not provide a key for array at index ${s}`);if(t.has(l))throw Error(`Duplicate key ${l} in tapResources`);t.add(l);let u=o.get(l);if(!u){let e=Bt(c.type,i.root,a),t=Ht(e,c.props);u={fiber:e,next:t},r++,o.set(l,u),n.push(t.output)}else if(u.fiber.type!==c.type){let e=Bt(c.type,i.root,a),t=Ht(e,c.props);u.next=[e,t],n.push(t.output)}else u.next=Ht(u.fiber,c.props),n.push(u.next.output)}if(o.size>n.length-r)for(let e of o.keys())t.has(e)||(o.get(e).next=`delete`);return n},[s,r]);return ln(()=>()=>{for(let e of o.keys()){let t=o.get(e).fiber;Vt(t)}},[]),ln(()=>{for(let[e,t]of o.entries())t.next===`delete`?(t.fiber.isMounted&&Vt(t.fiber),o.delete(e)):Array.isArray(t.next)?(Vt(t.fiber),t.fiber=t.next[0],Ut(t.fiber,t.next[1])):Ut(t.fiber,t.next)},[c]),c}var _n=50,vn={schedulers:new Set([]),isScheduled:!1},yn=class{_task;_isDirty=!1;constructor(e){this._task=e}get isDirty(){return this._isDirty}markDirty(){this._isDirty=!0,vn.schedulers.add(this),bn()}runTask(){this._isDirty=!1,this._task()}},bn=()=>{vn.isScheduled||(vn.isScheduled=!0,Sn())},xn=()=>{try{let e=[],t=0;for(let n of vn.schedulers)if(vn.schedulers.delete(n),n.isDirty){if(t++,t>_n)throw Error(`Maximum update depth exceeded. This can happen when a resource repeatedly calls setState inside tapEffect.`);try{n.runTask()}catch(t){e.push(t)}}if(e.length>0){if(e.length===1)throw e[0];for(let t of e)console.error(t);throw AggregateError(e,`Errors occurred during flushSync`)}}finally{vn.schedulers.clear(),vn.isScheduled=!1}},Sn=(()=>{if(typeof MessageChannel<`u`){let e=new MessageChannel;return e.port1.onmessage=xn,()=>e.port2.postMessage(null)}return()=>setTimeout(xn,0)})(),Cn=e=>{let t=vn;vn={schedulers:new Set([]),isScheduled:!0};try{let t=e();return xn(),t}finally{vn=t}},wn=e=>{let t=dn(()=>new yn(()=>l(null)),[]),n=dn(()=>[],[]),r=N(()=>(e.key,Bt(e.type,Wt(e=>{!t.isDirty&&!e()||(n.push(e),t.markDirty())}))),[e.type,e.key]);Kt(r.root,r.root.committedVersion);let i=Ht(r,e.props),a=un(!1),o=un(e.props),s=un(i.output),c=dn(()=>new Set,[]),l=mn(e=>{if(e===null&&(Kt(r.root,2),Kt(r.root,1),n.forEach(e=>{Nt&&r.devStrictMode&&e(),e()}),Nt&&r.devStrictMode&&Ht(r,o.current),e=Ht(r,o.current)),t.isDirty)throw Error(`Scheduler is dirty, this should never happen`);Gt(r.root),n.length=0,a.current&&Ut(r,e),!(t.isDirty||s.current===e.output)&&(s.current=e.output,c.forEach(e=>e()))});return ln(()=>(a.current=!0,()=>{a.current=!1,Vt(r)}),[r]),ln(()=>{o.current=i.props,Gt(r.root),Ut(r,i),!(t.isDirty||s.current===i.output)&&(s.current=i.output,c.forEach(e=>e()))}),N(()=>({getValue:()=>s.current,subscribe:e=>(c.add(e),()=>c.delete(e))}),[])},Tn=Symbol(`tap.Context`),En=e=>({[Tn]:e}),Dn=(e,t,n)=>{let r=e[Tn];e[Tn]=t;try{return n()}finally{e[Tn]=r}},On=e=>e[Tn],kn=Symbol(`assistant-ui.store.clientIndex`),An=e=>e[kn],jn=En([]),Mn=()=>On(jn),Nn=(e,t)=>{let n=Mn();return Dn(jn,N(()=>[...n,e],[n,e]),t)},Pn=new Set([`$$typeof`,`nodeType`,`then`]),Fn=(e,t)=>{if(e===Symbol.toStringTag)return t;if(typeof e!=`symbol`){if(e===`toJSON`)return()=>t;if(!Pn.has(e))return!1}},In=class{getOwnPropertyDescriptor(e,t){let n=this.get(e,t);if(n!==void 0)return{value:n,writable:!1,enumerable:!0,configurable:!1}}set(){return!1}setPrototypeOf(){return!1}defineProperty(){return!1}deleteProperty(){return!1}preventExtensions(){return!1}},Ln=e=>{let t=M(e);return e=>{let n=t(e);return e.key===void 0?n:Xt(e.key,n)}},Rn=Symbol(`assistant-ui.store.getValue`),zn=e=>{let t=e[Rn];if(!t)throw Error(`Client scope contains a non-client resource. Ensure your Derived get() returns a client created with tapClientResource(), not a plain resource.`);return t.getState?.()},Bn=new Map;function Vn(e){let t=Bn.get(e);return t||(t=function(...t){if(!this||typeof this!=`object`)throw Error(`Method "${String(e)}" called without proper context. This may indicate the function was called incorrectly.`);let n=this[Rn];if(!n)throw Error(`Method "${String(e)}" called on invalid client proxy. Ensure you are calling this method on a valid client instance.`);let r=n[e];if(!r)throw Error(`Method "${String(e)}" is not implemented.`);if(typeof r!=`function`)throw Error(`"${String(e)}" is not a function.`);return r(...t)},Bn.set(e,t)),t}var Hn=class extends In{outputRef;index;boundFns;cachedReceiver;constructor(e,t){super(),this.outputRef=e,this.index=t}get(e,t,n){if(t===Rn)return this.outputRef.current;if(t===kn)return this.index;let r=Fn(t,`ClientProxy`);if(r!==!1)return r;let i=this.outputRef.current[t];if(typeof i==`function`){this.cachedReceiver!==n&&(this.boundFns=new Map,this.cachedReceiver=n);let e=this.boundFns.get(t);return e||(e=Vn(t).bind(n),this.boundFns.set(t,e)),e}return i}ownKeys(){return Object.keys(this.outputRef.current)}has(e,t){return t===Rn||t===kn?!0:t in this.outputRef.current}},Un=Ln(e=>{let t=un(null),n=Mn().length,r=N(()=>new Proxy({},new Hn(t,n)),[n]),i=Nn(r,()=>hn(e));return t.current||=i,ln(()=>{t.current=i}),{methods:r,state:i.getState?.(),key:e.key}}),Wn=e=>hn(Un(e)),Gn=Symbol(`assistant-ui.store.proxiedAssistantState`),Kn=e=>e===`on`||e===`subscribe`||typeof e==`symbol`,qn=e=>{class t extends In{get(t,n){let r=Fn(n,`AssistantState`);if(r!==!1)return r;let i=n;if(!Kn(i))return zn(e[i]())}ownKeys(){return Object.keys(e).filter(e=>!Kn(e))}has(t,n){return!Kn(n)&&n in e}}return new Proxy({},new t)},Jn=e=>e[Gn],Yn=()=>()=>{},Xn=e=>{let t=(()=>{throw Error(e)});return t.source=null,t.query=null,t},Zn=new Proxy({},new class extends In{get(e,t){if(t===`subscribe`||t===`on`)return Yn;if(t===Gn)return Qn;let n=Fn(t,`DefaultAssistantClient`);return n===!1?Xn(`You are using a component or hook that requires an AuiProvider. Wrap your component in an <AuiProvider> component.`):n}ownKeys(){return[`subscribe`,`on`,Gn]}has(e,t){return t===`subscribe`||t===`on`||t===Gn}}),Qn=qn(Zn),$n=()=>new Proxy({},{get(e,t){let n=Fn(t,`AssistantClient`);return n===!1?Xn(`The current scope does not have a "${String(t)}" property.`):n}}),er=(0,A.createContext)(Zn),tr=()=>(0,A.useContext)(er),nr=({value:e,children:t})=>(0,j.jsx)(er.Provider,{value:e,children:t}),rr=M(e=>null),ir=Symbol(`assistant-ui.transform-scopes`);function ar(e,t){let n=e;if(n[ir])throw Error(`transformScopes is already attached to this resource`);n[ir]=t}function or(e){return e[ir]}function sr(e,t){let n={...e},r=new Set,i=!0;for(;i;){i=!1;for(let e of Object.values(n)){if(e.type===rr||r.has(e.type))continue;r.add(e.type);let a=or(e.type);if(a){a(n,t),i=!0;break}}}let a={},o={};for(let[e,t]of Object.entries(n))t.type===rr?o[e]=t:a[e]=t;return{rootClients:a,derivedClients:o}}var cr=e=>N(()=>e,[...Object.entries(e).flat()]),lr=(e,t)=>{let{rootClients:n,derivedClients:r}=sr(e,t);return{rootClients:cr(n),derivedClients:cr(r)}},ur=e=>typeof e==`string`?{scope:e.split(`.`)[0],event:e}:{scope:e.scope,event:e.event},dr=M(()=>dn(()=>{let e=new Map,t=new Set,n=new Set;return{on(n,r){let i=r;if(n===`*`)return t.add(i),()=>t.delete(i);let a=e.get(n);return a||(a=new Set,e.set(n,a)),a.add(i),()=>{a.delete(i),a.size===0&&e.delete(n)}},emit(n,r,i){let a=e.get(n);!a&&t.size===0||queueMicrotask(()=>{let e=[];if(a)for(let t of a)try{t(r,i)}catch(t){e.push(t)}if(t.size>0){let a={event:n,payload:r};for(let n of t)try{n(a,i)}catch(t){e.push(t)}}if(e.length>0){if(e.length===1)throw e[0];for(let t of e)console.error(t);throw AggregateError(e,`Errors occurred during event emission`)}})},subscribe(e){return n.add(e),()=>n.delete(e)},notifySubscribers(){for(let e of n)try{e()}catch(e){console.error(`NotificationManager: subscriber callback error`,e)}}}},[])),fr=En(null),pr=(e,t)=>Dn(fr,e,t),mr=()=>{let e=On(fr);if(!e)throw Error(`AssistantTapContext is not available`);return e},hr=()=>mr().clientRef,gr=()=>{let{emit:e}=mr(),t=Mn();return mn((n,r)=>{e(n,r,t)})},_r=e=>N(()=>e,e),vr=M(({element:e,emit:t,clientRef:n})=>{let{methods:r,state:i}=pr({clientRef:n,emit:t},()=>Wn(e));return N(()=>({state:i,methods:r}),[r,i])}),yr=M(({element:e,notifications:t,clientRef:n,name:r})=>{let i=wn(vr({element:e,emit:t.emit,clientRef:n}));return ln(()=>i.subscribe(t.notifySubscribers),[i,t]),N(()=>{let e=()=>i.getValue().methods;return Object.defineProperties(e,{source:{value:`root`,writable:!1},query:{value:{},writable:!1},name:{value:r,configurable:!0}}),e},[i,r])}),br=M(()=>N(()=>({clients:[],subscribe:void 0,on:void 0}),[])),xr=M(({clients:e,clientRef:t})=>{let n=hn(dr());ln(()=>t.parent.subscribe(n.notifySubscribers),[t,n]);let r=_r(gn(()=>Object.keys(e).map(r=>Xt(r,yr({element:e[r],notifications:n,clientRef:t,name:r}))),[e,n,t]));return N(()=>({clients:r,subscribe:n.subscribe,on:function(e,r){if(!this)throw Error(`const { on } = useAui() is not supported. Use aui.on() instead.`);let{scope:i,event:a}=ur(e);if(i!==`*`&&this[i].source===null)throw Error(`Scope "${i}" is not available. Use { scope: "*", event: "${a}" } to listen globally.`);let o=n.on(a,(e,t)=>{if(i===`*`){r(e);return}let n=this[i]();n===t[An(n)]&&r(e)});if(i!==`*`&&t.parent[i].source===null)return o;let s=t.parent.on(e,r);return()=>{o(),s()}}}),[r,n,t])}),Sr=(e,t,n)=>{if(`source`in e&&`query`in e)return e;if(n.dep===e)return n.meta;let r=e.getMeta(t.current);return n.meta=r,n.dep=e,r},Cr=M(({element:e,clientRef:t,name:n})=>{let r=mn(()=>e.props);return N(()=>{let e=()=>r().get(t.current),i={};return Object.defineProperties(e,{source:{get:()=>Sr(r(),t,i).source},query:{get:()=>Sr(r(),t,i).query},name:{value:n,configurable:!0}}),e},[t,n])}),wr=M(({clients:e,clientRef:t})=>_r(gn(()=>Object.keys(e).map(n=>Xt(n,Cr({element:e[n],clientRef:t,name:n}))),[e,t]))),Tr=M(({parent:e,clients:t})=>{let{rootClients:n,derivedClients:r}=lr(t,e),i=un({parent:e,current:null}).current;ln(()=>{i.current=s});let a=hn(Object.keys(n).length>0?xr({clients:n,clientRef:i}):br()),o=hn(wr({clients:r,clientRef:i})),s=N(()=>{let t=e===Zn?$n():e,n=Object.create(t);Object.assign(n,{subscribe:a.subscribe??e.subscribe,on:a.on??e.on,[Gn]:qn(n)});for(let e of a.clients)n[e.name]=e;for(let e of o)n[e.name]=e;return n},[e,a,o]);return i.current===null&&(i.current=s),s});function Er(e,{parent:t}={parent:tr()}){if(e)return Yt(Tr({parent:t??Zn,clients:e}));if(t===null)throw Error(`received null parent, this usage is not allowed`);return t}var P=e=>{let t=Er(),n=Jn(t),r=(0,A.useSyncExternalStore)(t.subscribe,()=>e(n),()=>e(n));if(r===n)throw Error(`You tried to return the entire AssistantState. This is not supported due to technical limitations.`);return(0,A.useDebugValue)(r),r},Dr=A.createContext(!0);function Or(){throw Error(`A function wrapped in useEffectEvent can't be called during rendering.`)}var kr=`use`in A.default?()=>{try{return A.use(Dr)}catch{return!1}}:()=>!1;function Ar(e){let t=A.useRef(Or);return A.useInsertionEffect(()=>{t.current=e},[e]),(...e)=>{kr()&&Or();let n=t.current;return n(...e)}}var jr=(e,t)=>{let n=Er(),r=Ar(t),{scope:i,event:a}=ur(e);(0,A.useEffect)(()=>n.on({scope:i,event:a},r),[n,i,a,r])},Mr=e=>{let t=Er(),n=(0,A.useRef)(!1),r=n.current?null:e(t);return P(()=>n.current?e(t):r),()=>(n.current=!0,e(t))},Nr=Object.freeze({});function Pr({getItemState:e,children:t}){return Fr(t(Mr(e)))}var Fr=e=>{let t=typeof e==`object`&&e&&`type`in e?e:null,n=t?.type,r=t?.key;return(0,A.useMemo)(()=>t,[n,r,typeof t?.props==`object`&&t.props!=null&&Object.entries(t.props).length===0?Nr:t?.props])??e},Ir=Ln(e=>{if(e.key===void 0)throw Error(`tapClientResource: Element has no key`);return hn(Un(e))});function Lr(e,t){let n=gn(()=>e().map(e=>Ir(e)),t),r=N(()=>Object.keys(n),[n]),i=N(()=>n.reduce((e,t,n)=>(e[t.key]=n,e),{}),[n]);return{state:N(()=>n.map(e=>e.state),[n]),get:e=>{if(`index`in e){if(e.index<0||e.index>=r.length)throw Error(`tapClientLookup: Index ${e.index} out of bounds (length: ${r.length})`);return n[e.index].methods}let t=i[e.key];if(t===void 0)throw Error(`tapClientLookup: Key "${e.key}" not found`);return n[t].methods}}}var Rr=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},zr=(e=>e?Rr(e):Rr),Br=e=>e;function Vr(e,t=Br){let n=A.useSyncExternalStore(e.subscribe,A.useCallback(()=>t(e.getState()),[e,t]),A.useCallback(()=>t(e.getInitialState()),[e,t]));return A.useDebugValue(n),n}var Hr=e=>{let t=zr(e),n=e=>Vr(t,e);return Object.assign(n,t),n},Ur=(e=>e?Hr(e):Hr),Wr=o(((e,t)=>{var n=typeof Buffer<`u`,r=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,i=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function a(e,t,a){a==null&&typeof t==`object`&&t&&(a=t,t=void 0),n&&Buffer.isBuffer(e)&&(e=e.toString()),e&&e.charCodeAt(0)===65279&&(e=e.slice(1));let s=JSON.parse(e,t);if(typeof s!=`object`||!s)return s;let c=a&&a.protoAction||`error`,l=a&&a.constructorAction||`error`;if(c===`ignore`&&l===`ignore`)return s;if(c!==`ignore`&&l!==`ignore`){if(r.test(e)===!1&&i.test(e)===!1)return s}else if(c!==`ignore`&&l===`ignore`){if(r.test(e)===!1)return s}else if(i.test(e)===!1)return s;return o(s,{protoAction:c,constructorAction:l,safe:a&&a.safe})}function o(e,{protoAction:t=`error`,constructorAction:n=`error`,safe:r}={}){let i=[e];for(;i.length;){let e=i;i=[];for(let a of e){if(t!==`ignore`&&Object.prototype.hasOwnProperty.call(a,`__proto__`)){if(r===!0)return null;if(t===`error`)throw SyntaxError(`Object contains forbidden prototype property`);delete a.__proto__}if(n!==`ignore`&&Object.prototype.hasOwnProperty.call(a,`constructor`)&&a.constructor!==null&&typeof a.constructor==`object`&&Object.prototype.hasOwnProperty.call(a.constructor,`prototype`)){if(r===!0)return null;if(n===`error`)throw SyntaxError(`Object contains forbidden prototype property`);delete a.constructor}for(let e in a){let t=a[e];t&&typeof t==`object`&&i.push(t)}}}return e}function s(e,t,n){let{stackTraceLimit:r}=Error;Error.stackTraceLimit=0;try{return a(e,t,n)}finally{Error.stackTraceLimit=r}}function c(e,t){let{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return a(e,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=n}}t.exports=s,t.exports.default=s,t.exports.parse=s,t.exports.safeParse=c,t.exports.scan=o}));function Gr(e){let t=[`ROOT`],n=-1,r=null,i=[],a;function o(){a!==void 0&&(i.push(JSON.parse(`"${a}"`)),a=void 0)}function s(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`),o();break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`),o();break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`),o();break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`),o();break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`),o();break}}function c(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop(),a=i.pop();break}}function l(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`),a=(Number(a)+1).toString();break;case`]`:n=r,t.pop(),a=i.pop();break}}for(let o=0;o<e.length;o++){let u=e[o];switch(t[t.length-1]){case`ROOT`:s(u,o,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`),a=``;break;case`}`:n=o,t.pop(),a=i.pop();break}break;case`INSIDE_OBJECT_AFTER_COMMA`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`),a=``;break}break;case`INSIDE_OBJECT_KEY`:switch(u){case`"`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`);break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`),a+=u;break;default:a+=u;break}break;case`INSIDE_OBJECT_AFTER_KEY`:switch(u){case`:`:t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`);break}break;case`INSIDE_OBJECT_BEFORE_VALUE`:s(u,o,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:c(u,o);break;case`INSIDE_STRING`:switch(u){case`"`:t.pop(),n=o,a=i.pop();break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=o}break;case`INSIDE_ARRAY_START`:switch(u){case`]`:n=o,t.pop(),a=i.pop();break;default:n=o,a=`0`,s(u,o,`INSIDE_ARRAY_AFTER_VALUE`);break}break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(u){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`),a=(Number(a)+1).toString();break;case`]`:n=o,t.pop(),a=i.pop();break;default:n=o;break}break;case`INSIDE_ARRAY_AFTER_COMMA`:s(u,o,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),t[t.length-1]===`INSIDE_STRING`?n=o:t[t.length-1]===`INSIDE_OBJECT_KEY`&&(a+=u);break;case`INSIDE_NUMBER`:switch(u){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=o;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),a=i.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&l(u,o),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&c(u,o);break;case`}`:t.pop(),a=i.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&c(u,o);break;case`]`:t.pop(),a=i.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&l(u,o);break;default:t.pop(),a=i.pop();break}break;case`INSIDE_LITERAL`:{let i=e.substring(r,o+1);!`false`.startsWith(i)&&!`true`.startsWith(i)&&!`null`.startsWith(i)?(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?c(u,o):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&l(u,o)):n=o;break}}}let u=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:u+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:u+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:u+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?u+=`true`.slice(t.length):`false`.startsWith(t)?u+=`false`.slice(t.length):`null`.startsWith(t)&&(u+=`null`.slice(t.length))}}return[u,i]}var Kr=a(Wr(),1),qr=Symbol(`aui.parse-partial-json-object.meta`),Jr=e=>{if(e.length===0)return{[qr]:{state:`partial`,partialPath:[]}};try{let t=Kr.default.parse(e);if(typeof t!=`object`||!t)throw Error(`argsText is expected to be an object`);return t[qr]={state:`complete`,partialPath:[]},t}catch{try{let[t,n]=Gr(e),r=Kr.default.parse(t);if(typeof r!=`object`||!r)throw Error(`argsText is expected to be an object`);return r[qr]={state:`partial`,partialPath:n},r}catch{return}}},Yr=(e,t=21)=>(n=t)=>{let r=``,i=n|0;for(;i--;)r+=e[Math.random()*e.length|0];return r},Xr=M(e=>({getState:()=>e})),Zr=M(e=>{let[t]=on(()=>({suggestions:(e??[]).map(e=>typeof e==`string`?{title:e,label:``,prompt:e}:{title:e.title,label:e.label,prompt:e.prompt})})),n=Lr(()=>t.suggestions.map((e,t)=>Xt(t,Xr(e))),[t.suggestions]);return{getState:()=>t,suggestion:({index:e})=>n.get({index:e})}}),Qr=Object.freeze({type:`complete`}),$r=M(({parts:e,getMessagePart:t})=>{let[n,r]=on(!0),i=N(()=>e[e.length-1]?.status??Qr,[e]),a=N(()=>({parts:e,collapsed:n,status:i}),[e,n,i]);return{getState:()=>a,setCollapsed:r,part:t}}),ei=e=>Array.from(e).map(e=>e.getModelContext()).sort((e,t)=>(t.priority??0)-(e.priority??0)).reduce((e,t)=>{if(t.system&&(e.system?e.system+=`\n\n${t.system}`:e.system=t.system),t.tools)for(let[n,r]of Object.entries(t.tools)){let t=e.tools?.[n];if(t&&t!==r)throw Error(`You tried to define a tool with the name ${n}, but it already exists.`);e.tools||={},e.tools[n]=r}return t.config&&(e.config={...e.config,...t.config}),t.callSettings&&(e.callSettings={...e.callSettings,...t.callSettings}),e},{}),ti=class{_providers=new Set;getModelContext(){return ei(this._providers)}registerModelContextProvider(e){this._providers.add(e);let t=e.subscribe?.(()=>{this.notifySubscribers()});return this.notifySubscribers(),()=>{this._providers.delete(e),t?.(),this.notifySubscribers()}}_subscribers=new Set;notifySubscribers(){for(let e of this._subscribers)e()}subscribe(e){return this._subscribers.add(e),()=>this._subscribers.delete(e)}},ni=1,ri=M(()=>{let[e]=on(()=>({version:ni+1})),t=N(()=>new ti,[]);return{getState:()=>e,getModelContext:()=>t.getModelContext(),subscribe:e=>t.subscribe(e),register:e=>t.registerModelContextProvider(e)}}),ii=M(({toolkit:e})=>{let[t,n]=on(()=>({tools:{}})),r=hr(),i=pn((e,t)=>(n(n=>({...n,tools:{...n.tools,[e]:[...n.tools[e]??[],t]}})),()=>{n(n=>({...n,tools:{...n.tools,[e]:n.tools[e]?.filter(e=>e!==t)??[]}}))}),[]);return ln(()=>{if(!e)return;let t=[];for(let[n,r]of Object.entries(e))r.render&&t.push(i(n,r.render));let n=Object.entries(e).reduce((e,[t,n])=>{let{render:r,...i}=n;return e[t]=i,e},{});return t.push(r.current.modelContext().register({getModelContext:()=>({tools:n})})),()=>{t.forEach(e=>e())}},[e,i,r]),{getState:()=>t,setToolUI:i}});ar(ii,(e,t)=>{!e.modelContext&&t.modelContext.source===null&&(e.modelContext=ri())});var ai=M(()=>{let[e,t]=on(()=>({renderers:{},fallbacks:[]}));return{getState:()=>e,setDataUI:pn((e,n)=>(t(t=>({...t,renderers:{...t.renderers,[e]:[...t.renderers[e]??[],n]}})),()=>{t(t=>({...t,renderers:{...t.renderers,[e]:t.renderers[e]?.filter(e=>e!==n)??[]}}))}),[]),setFallbackDataUI:pn(e=>(t(t=>({...t,fallbacks:[...t.fallbacks,e]})),()=>{t(t=>({...t,fallbacks:t.fallbacks.filter(t=>t!==e)}))}),[])}}),oi=Symbol.for(`aui.tool-response`),si=class e{get[oi](){return!0}artifact;result;isError;messages;constructor(e){e.artifact!==void 0&&(this.artifact=e.artifact),this.result=e.result,this.isError=e.isError??!1,e.messages!==void 0&&(this.messages=e.messages)}static[Symbol.hasInstance](e){return typeof e==`object`&&!!e&&oi in e}static toResponse(t){return t instanceof e?t:new e({result:t===void 0?`<no result>`:t})}},ci=e=>{let[,t]=on(e.getState);return ln(()=>(t(e.getState()),e.subscribe(()=>{t(e.getState())})),[e]),e.getState()},li=M(({runtime:e})=>{let t=ci(e);return{getState:()=>t,remove:e.remove,__internal_getRuntime:()=>e}}),ui=M(({runtime:e})=>{let t=ci(e);return{getState:()=>t,addToolResult:t=>e.addToolResult(t),resumeToolCall:t=>e.resumeToolCall(t),__internal_getRuntime:()=>e}}),di=M(({runtime:e,index:t})=>hn(li({runtime:N(()=>e.getAttachmentByIndex(t),[e,t])}))),fi=M(({threadIdRef:e,messageIdRef:t,runtime:n})=>{let r=ci(n),i=gr();ln(()=>{let r=[];for(let a of[`send`,`attachmentAdd`]){let o=n.unstable_on(a,()=>{i(`composer.${a}`,{threadId:e.current,...t&&{messageId:t.current}})});r.push(o)}return r.push(n.unstable_on(`attachmentAddError`,n=>{i(`composer.attachmentAddError`,{threadId:e.current,...t&&{messageId:t.current},...n.attachmentId&&{attachmentId:n.attachmentId},reason:n.reason,message:n.message})})),()=>{for(let e of r)e()}},[n,i,e,t]);let a=Lr(()=>r.attachments.map((e,t)=>Xt(e.id,di({runtime:n,index:t}))),[r.attachments,n]),o=N(()=>({text:r.text,role:r.role,attachments:a.state,runConfig:r.runConfig,isEditing:r.isEditing,canCancel:r.canCancel,attachmentAccept:r.attachmentAccept,isEmpty:r.isEmpty,type:r.type??`thread`,dictation:r.dictation,quote:r.quote,queue:[]}),[r,a.state]);return{getState:()=>o,setText:n.setText,setRole:n.setRole,setRunConfig:n.setRunConfig,addAttachment:n.addAttachment,reset:n.reset,clearAttachments:n.clearAttachments,send:n.send,cancel:n.cancel,beginEdit:n.beginEdit??(()=>{throw Error(`beginEdit is not supported in this runtime`)}),startDictation:n.startDictation,stopDictation:n.stopDictation,setQuote:n.setQuote,attachment:e=>`id`in e?a.get({key:e.id}):a.get(e),queueItem:()=>{throw Error(`Queue is not supported in this runtime`)},__internal_getRuntime:()=>n}}),pi=M(({runtime:e,index:t})=>hn(li({runtime:N(()=>e.getAttachmentByIndex(t),[e,t])}))),mi=M(({runtime:e,index:t})=>hn(ui({runtime:N(()=>e.getMessagePartByIndex(t),[e,t])}))),hi=M(({runtime:e,threadIdRef:t})=>{let n=ci(e),[r,i]=on(!1),[a,o]=on(!1),s=N(()=>({get current(){return e.getState().id}}),[e]),c=Wn(fi({runtime:e.composer,threadIdRef:t,messageIdRef:s})),l=Lr(()=>n.content.map((t,n)=>Xt(`toolCallId`in t&&t.toolCallId!=null?`toolCallId-${t.toolCallId}`:`index-${n}`,mi({runtime:e,index:n}))),[n.content,e]),u=Lr(()=>(n.attachments??[]).map((t,n)=>Xt(t.id,pi({runtime:e,index:n}))),[n.attachments,e]),d=N(()=>({...n,parts:l.state,composer:c.state,isCopied:r,isHovering:a}),[n,l.state,c.state,r,a]);return{getState:()=>d,composer:()=>c.methods,reload:t=>e.reload(t),speak:()=>e.speak(),stopSpeaking:()=>e.stopSpeaking(),submitFeedback:t=>e.submitFeedback(t),switchToBranch:t=>e.switchToBranch(t),getCopyText:()=>e.unstable_getCopyText(),part:e=>`index`in e?l.get({index:e.index}):l.get({key:`toolCallId-${e.toolCallId}`}),attachment:e=>`id`in e?u.get({key:e.id}):u.get(e),setIsCopied:i,setIsHovering:o,__internal_getRuntime:()=>e}}),gi=M(({runtime:e,id:t,threadIdRef:n})=>hn(hi({runtime:N(()=>e.getMessageById(t),[e,t]),threadIdRef:n}))),_i=M(({runtime:e})=>{let t=ci(e),n=gr();ln(()=>{let t=[];for(let r of[`runStart`,`runEnd`,`initialize`,`modelContextUpdate`]){let i=e.unstable_on(r,()=>{let t=e.getState()?.threadId||`unknown`;n(`thread.${r}`,{threadId:t})});t.push(i)}return()=>{for(let e of t)e()}},[e,n]);let r=N(()=>({get current(){return e.getState().threadId}}),[e]),i=Wn(fi({runtime:e.composer,threadIdRef:r})),a=Lr(()=>t.messages.map(t=>Xt(t.id,gi({runtime:e,id:t.id,threadIdRef:r}))),[t.messages,e,r]),o=N(()=>({isEmpty:a.state.length===0&&!t.isLoading,isDisabled:t.isDisabled,isLoading:t.isLoading,isRunning:t.isRunning,capabilities:t.capabilities,state:t.state,suggestions:t.suggestions,extras:t.extras,speech:t.speech,voice:t.voice,composer:i.state,messages:a.state}),[t,a,i.state]);return{getState:()=>o,composer:()=>i.methods,append:e.append,startRun:e.startRun,resumeRun:e.resumeRun,cancelRun:e.cancelRun,getModelContext:e.getModelContext,export:e.export,import:e.import,reset:e.reset,stopSpeaking:e.stopSpeaking,connectVoice:e.connectVoice,disconnectVoice:e.disconnectVoice,getVoiceVolume:e.getVoiceVolume,subscribeVoiceVolume:e.subscribeVoiceVolume,muteVoice:e.muteVoice,unmuteVoice:e.unmuteVoice,message:e=>`id`in e?a.get({key:e.id}):a.get(e),__internal_getRuntime:()=>e}}),vi=M(({runtime:e})=>{let t=ci(e),n=gr();return ln(()=>{let t=[];for(let r of[`switchedTo`,`switchedAway`]){let i=e.unstable_on(r,()=>{n(`threadListItem.${r}`,{threadId:e.getState().id})});t.push(i)}return()=>{for(let e of t)e()}},[e,n]),{getState:()=>t,switchTo:e.switchTo,rename:e.rename,archive:e.archive,unarchive:e.unarchive,delete:e.delete,generateTitle:e.generateTitle,initialize:e.initialize,detach:e.detach,__internal_getRuntime:()=>e}}),yi=M(({runtime:e,id:t})=>hn(vi({runtime:N(()=>e.getItemById(t),[e,t])}))),bi=M(({runtime:e,__internal_assistantRuntime:t})=>{let n=ci(e),r=Wn(_i({runtime:e.main})),i=Lr(()=>Object.keys(n.threadItems).map(t=>Xt(t,yi({runtime:e,id:t}))),[n.threadItems,e]),a=N(()=>({mainThreadId:n.mainThreadId,newThreadId:n.newThreadId??null,isLoading:n.isLoading,isLoadingMore:n.isLoadingMore,hasMore:n.hasMore,threadIds:n.threadIds,archivedThreadIds:n.archivedThreadIds,threadItems:i.state,main:r.state}),[n,i.state,r.state]);return{getState:()=>a,thread:()=>r.methods,item:e=>{if(e===`main`)return i.get({key:a.mainThreadId});if(`id`in e)return i.get({key:e.id});let{index:t,archived:n=!1}=e,r=n?a.archivedThreadIds[t]:a.threadIds[t];return i.get({key:r})},switchToThread:async t=>{await e.switchToThread(t)},switchToNewThread:async()=>{await e.switchToNewThread()},getLoadThreadsPromise:()=>e.getLoadThreadsPromise(),reload:()=>e.reload(),loadMore:()=>e.loadMore(),__internal_getAssistantRuntime:()=>t}}),xi=M(e=>{let t=hr();return ln(()=>e.registerModelContextProvider(t.current.modelContext()),[e,t]),hn(bi({runtime:e.threads,__internal_assistantRuntime:e}))}),Si=(e,t)=>{e.thread??=rr({source:`threads`,query:{type:`main`},get:e=>e.threads().thread(`main`)}),e.threadListItem??=rr({source:`threads`,query:{type:`main`},get:e=>e.threads().item(`main`)}),e.composer??=rr({source:`thread`,query:{},get:e=>e.threads().thread(`main`).composer()}),!e.modelContext&&t.modelContext.source===null&&(e.modelContext=ri()),!e.suggestions&&t.suggestions.source===null&&(e.suggestions=Zr())},Ci=({index:e,children:t})=>(0,j.jsx)(nr,{value:Er({message:rr({source:`thread`,query:{type:`index`,index:e},get:t=>t.thread().message({index:e})}),composer:rr({source:`message`,query:{},get:t=>t.thread().message({index:e}).composer()})}),children:t}),wi=({index:e,children:t})=>(0,j.jsx)(nr,{value:Er({part:rr({source:`message`,query:{type:`index`,index:e},get:t=>t.message().part({index:e})})}),children:t}),Ti=M(({text:e,isRunning:t})=>{let n=N(()=>({type:`text`,text:e,status:t?{type:`running`}:{type:`complete`}}),[e,t]);return{getState:()=>n,addToolResult:()=>{throw Error(`Not supported`)},resumeToolCall:()=>{throw Error(`Not supported`)}}}),Ei=({text:e,isRunning:t=!1,children:n})=>(0,j.jsx)(nr,{value:Er({part:Ti({text:e,isRunning:t})}),children:n}),Di=({startIndex:e,endIndex:t,children:n})=>{let r=P(e=>e.message.parts).slice(e,t+1),i=Er();return(0,j.jsx)(nr,{value:Er({chainOfThought:$r({parts:r,getMessagePart:({index:t})=>{if(t<0||t>=r.length)throw Error(`ChainOfThought part index ${t} is out of bounds (0..${r.length-1})`);return i.message().part({index:e+t})}})}),children:n})},Oi=Symbol(`skip-update`);function ki(e,t){if(e===void 0&&t===void 0)return!0;if(e===void 0||t===void 0)return!1;for(let n of Object.keys(e)){let r=e[n],i=t[n];if(!Object.is(r,i))return!1}return!0}var Ai=class{_subscribers=new Set;subscribe(e){return this._subscribers.add(e),()=>this._subscribers.delete(e)}waitForUpdate(){return new Promise(e=>{let t=this.subscribe(()=>{t(),e()})})}_notifySubscribers(){let e=[];for(let t of this._subscribers)try{t()}catch(t){e.push(t)}if(e.length>0){if(e.length===1)throw e[0];for(let t of e)console.error(t);throw AggregateError(e)}}},ji=class{_subscriptions=new Set;_connection;get isConnected(){return!!this._connection}notifySubscribers(e){for(let t of this._subscriptions)t(e)}_updateConnection(){if(this._subscriptions.size>0){if(this._connection)return;this._connection=this._connect()}else this._connection?.(),this._connection=void 0}subscribe(e){return this._subscriptions.add(e),this._updateConnection(),()=>{this._subscriptions.delete(e),this._updateConnection()}}},Mi=class extends ji{binding;get path(){return this.binding.path}constructor(e){super(),this.binding=e;let t=e.getState();if(t===Oi)throw Error(`Entry not available in the store`);this._previousState=t}_previousState;getState=()=>(this.isConnected||this._syncState(),this._previousState);_syncState(){let e=this.binding.getState();return e===Oi||ki(e,this._previousState)?!1:(this._previousState=e,!0)}_connect(){return this.binding.subscribe(()=>{this._syncState()&&this.notifySubscribers()})}},Ni=class extends ji{binding;get path(){return this.binding.path}constructor(e){super(),this.binding=e}_previousStateDirty=!0;_previousState;getState=()=>{if(!this.isConnected||this._previousStateDirty){let e=this.binding.getState();e!==Oi&&(this._previousState=e),this._previousStateDirty=!1}if(this._previousState===void 0)throw Error(`Entry not available in the store`);return this._previousState};_connect(){return this.binding.subscribe(()=>{this._previousStateDirty=!0,this.notifySubscribers()})}},Pi=class extends ji{binding;get path(){return this.binding.path}constructor(e){super(),this.binding=e}getState(){return this.binding.getState()}outerSubscribe(e){return this.binding.subscribe(e)}_connect(){let e=()=>{this.notifySubscribers()},t=this.binding.getState(),n=t?.subscribe(e),r=this.outerSubscribe(()=>{let r=this.binding.getState();r!==t&&(t=r,n?.(),n=r?.subscribe(e),e())});return()=>{r?.(),n?.()}}},Fi=class extends ji{config;constructor(e){super(),this.config=e}getState(){return this.config.binding.getState()}outerSubscribe(e){return this.config.binding.subscribe(e)}_connect(){let e=e=>{this.notifySubscribers(e)},t=this.config.binding.getState(),n=t?.unstable_on(this.config.event,e),r=this.outerSubscribe(()=>{let r=this.config.binding.getState();r!==t&&(t=r,n?.(),n=r?.unstable_on(this.config.event,e))});return()=>{r?.(),n?.()}}},Ii=class{_contextProvider=new ti;registerModelContextProvider(e){return this._contextProvider.registerModelContextProvider(e)}getModelContextProvider(){return this._contextProvider}},Li=e=>e.content.filter(e=>e.type===`text`).map(e=>e.text).join(`
11
-
12
- `),F=Yr(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,7),I=`__optimistic__`,Ri=()=>`${I}${F()}`,zi=Symbol(`autoStatus`),Bi=Object.freeze(Object.assign({type:`running`},{[zi]:!0})),Vi=Object.freeze(Object.assign({type:`complete`,reason:`unknown`},{[zi]:!0})),Hi=Object.freeze(Object.assign({type:`requires-action`,reason:`tool-calls`},{[zi]:!0})),Ui=Object.freeze(Object.assign({type:`requires-action`,reason:`interrupt`},{[zi]:!0})),Wi=e=>e[zi]===!0,Gi=(e,t,n,r,i)=>e&&i?Object.assign({type:`incomplete`,reason:`error`,error:i},{[zi]:!0}):e&&t?Bi:n?Ui:r?Hi:Vi,Ki=(e,t)=>{if(e.startsWith(`data-`))return{type:`data`,name:e.substring(5),data:t}},qi=(e,t,n)=>{let{role:r,id:i,createdAt:a,attachments:o,status:s,metadata:c}=e,l={id:i??t,createdAt:a??new Date},u=typeof e.content==`string`?[{type:`text`,text:e.content}]:e.content,d=({image:e,...t})=>e.match(/^data:image\/(png|jpeg|jpg|gif|webp);base64,(.*)$/)?{...t,image:e}:(console.warn(`Invalid image data format detected`),null);if(r!==`user`&&o?.length)throw Error(`attachments are only supported for user messages`);if(r!==`assistant`&&s)throw Error(`status is only supported for assistant messages`);if(r!==`assistant`&&c?.steps)throw Error(`metadata.steps is only supported for assistant messages`);switch(r){case`assistant`:return{...l,role:r,content:u.map(e=>{let t=e.type;switch(t){case`text`:case`reasoning`:return e.text.trim().length===0?null:e;case`file`:case`source`:return e;case`image`:return d(e);case`data`:return e;case`tool-call`:{let{parentId:t,messages:n,...r}=e,i={...r,toolCallId:e.toolCallId??`tool-${F()}`,...t!==void 0&&{parentId:t},...n!==void 0&&{messages:n}};return e.args?{...i,args:e.args,argsText:e.argsText??JSON.stringify(e.args)}:{...i,args:Jr(e.argsText??``)??{},argsText:e.argsText??``}}default:{let n=Ki(t,e.data);if(n)return n;throw Error(`Unsupported assistant message part type: ${t}`)}}}).filter(e=>!!e),status:s??n,metadata:{unstable_state:c?.unstable_state??null,unstable_annotations:c?.unstable_annotations??[],unstable_data:c?.unstable_data??[],custom:c?.custom??{},steps:c?.steps??[],...c?.timing&&{timing:c.timing},...c?.submittedFeedback&&{submittedFeedback:c.submittedFeedback}}};case`user`:return{...l,role:r,content:u.map(e=>{let t=e.type;switch(t){case`text`:case`image`:case`audio`:case`file`:case`data`:return e;default:{let n=Ki(t,e.data);if(n)return n;throw Error(`Unsupported user message part type: ${t}`)}}}),attachments:(o??[]).map(e=>({...e,content:e.content.map(e=>Ki(e.type,e.data)??e)})),metadata:{custom:c?.custom??{}}};case`system`:if(u.length!==1||u[0].type!==`text`)throw Error(`System messages must have exactly one text message part.`);return{...l,role:r,content:u,metadata:{custom:c?.custom??{}}};default:throw Error(`Unknown message role: ${r}`)}},Ji={fromArray:e=>{let t=e.map(e=>qi(e,F(),Gi(!1,!1,!1,!1,void 0)));return{messages:t.map((e,n)=>({parentId:n>0?t[n-1].id:null,message:e}))}},fromBranchableArray:(e,t)=>{let n=Gi(!1,!1,!1,!1,void 0);return{...t?.headId===void 0?void 0:{headId:t.headId},messages:e.map(({message:e,parentId:t})=>{if(!e.id)throw Error(`ExportedMessageRepository.fromBranchableArray: Each message must have an 'id' field set.`);return{parentId:t,message:qi(e,e.id,n)}})}}},Yi=e=>e.next?Yi(e.next):`current`in e?e:null,Xi=class{func;_value=null;constructor(e){this.func=e}get value(){return this._value===null&&(this._value=this.func()),this._value}dirty(){this._value=null}},Zi=class{messages=new Map;head=null;root={children:[],next:null};updateLevels(e,t){e.level=t;for(let n of e.children){let e=this.messages.get(n);e&&this.updateLevels(e,t+1)}}performOp(e,t,n){let r=t.prev??this.root,i=e??this.root;if(!(n===`relink`&&r===i)){if(n!==`link`&&(r.children=r.children.filter(e=>e!==t.current.id),r.next===t)){let e=r.children.at(-1),t=e?this.messages.get(e):null;if(t===void 0)throw Error(`MessageRepository(performOp/cut): Fallback sibling message not found. This is likely an internal bug in assistant-ui.`);r.next=t}if(n!==`cut`){for(let n=e;n;n=n.prev)if(n.current.id===t.current.id)throw Error(`MessageRepository(performOp/link): A message with the same id already exists in the parent tree. This error occurs if the same message id is found multiple times. This is likely an internal bug in assistant-ui.`);i.children=[...i.children,t.current.id],(Yi(t)===this.head||i.next===null)&&(i.next=t),t.prev=e;let n=e?e.level+1:0;this.updateLevels(t,n)}}}_messages=new Xi(()=>{let e=Array((this.head?.level??-1)+1);for(let t=this.head;t;t=t.prev)e[t.level]=t.current;return e});get headId(){return this.head?.current.id??null}getMessages(e){if(e===void 0||e===this.head?.current.id)return this._messages.value;let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(getMessages): Head message not found. This is likely an internal bug in assistant-ui.`);let n=Array(t.level+1);for(let e=t;e;e=e.prev)n[e.level]=e.current;return n}addOrUpdateMessage(e,t){let n=this.messages.get(t.id),r=e?this.messages.get(e):null;if(r===void 0)throw Error(`MessageRepository(addOrUpdateMessage): Parent message not found. This is likely an internal bug in assistant-ui.`);if(n){n.current=t,this.performOp(r,n,`relink`),this._messages.dirty();return}let i={prev:r,current:t,next:null,children:[],level:r?r.level+1:0};this.messages.set(t.id,i),this.performOp(r,i,`link`),this.head===r&&(this.head=i),this._messages.dirty()}getMessage(e){let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(updateMessage): Message not found. This is likely an internal bug in assistant-ui.`);return{parentId:t.prev?.current.id??null,message:t.current,index:t.level}}appendOptimisticMessage(e,t){let n;do n=Ri();while(this.messages.has(n));return this.addOrUpdateMessage(e,qi(t,n,{type:`running`})),n}deleteMessage(e,t){let n=this.messages.get(e);if(!n)throw Error(`MessageRepository(deleteMessage): Message not found. This is likely an internal bug in assistant-ui.`);let r=t===void 0?n.prev:t===null?null:this.messages.get(t);if(r===void 0)throw Error(`MessageRepository(deleteMessage): Replacement not found. This is likely an internal bug in assistant-ui.`);for(let e of n.children){let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(deleteMessage): Child message not found. This is likely an internal bug in assistant-ui.`);this.performOp(r,t,`relink`)}this.performOp(null,n,`cut`),this.messages.delete(e),this.head===n&&(this.head=Yi(r??this.root)),this._messages.dirty()}getBranches(e){let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(getBranches): Message not found. This is likely an internal bug in assistant-ui.`);let{children:n}=t.prev??this.root;return n}switchToBranch(e){let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(switchToBranch): Branch not found. This is likely an internal bug in assistant-ui.`);let n=t.prev??this.root;n.next=t,this.head=Yi(t),this._messages.dirty()}resetHead(e){if(e===null){this.clear();return}let t=this.messages.get(e);if(!t)throw Error(`MessageRepository(resetHead): Branch not found. This is likely an internal bug in assistant-ui.`);if(t.children.length>0){let e=t=>{for(let n of t.children){let t=this.messages.get(n);t&&(e(t),this.messages.delete(n))}};e(t),t.children=[],t.next=null}this.head=t;for(let e=t;e;e=e.prev)e.prev?e.prev.next=e:this.root.next=e;this._messages.dirty()}clear(){this.messages.clear(),this.head=null,this.root={children:[],next:null},this._messages.dirty()}export(){let e=[];for(let[,t]of this.messages)e.push({message:t.current,parentId:t.prev?.current.id??null});return{headId:this.head?.current.id??null,messages:e}}import({headId:e,messages:t}){for(let{message:e,parentId:n}of t)this.addOrUpdateMessage(n,e);this.resetHead(e??t.at(-1)?.message.id??null)}};function Qi(e,t){if(t===`*`)return!0;let n=t.split(`,`).map(e=>e.trim().toLowerCase()),r=`.${e.name.split(`.`).pop().toLowerCase()}`,i=e.type.toLowerCase();for(let e of n){if(e.startsWith(`.`)&&e===r||e.includes(`/`)&&e===i)return!0;if(e.endsWith(`/*`)){let t=e.split(`/`)[0];if(i.startsWith(`${t}/`))return!0}}return!1}function $i(e,t){return e.length===t.length?e.every((e,n)=>e.id===t[n].id):!1}function ea(e){let t=F();return e.type===`image`?{id:t,type:`image`,name:e.filename??`image`,content:[e],status:{type:`complete`}}:e.type===`file`?{id:t,type:`document`,name:e.filename??`document`,contentType:e.mimeType,content:[e],status:{type:`complete`}}:e.type===`audio`?{id:t,type:`audio`,name:`audio.${e.audio.format}`,contentType:`audio/${e.audio.format}`,content:[e],status:{type:`complete`}}:{id:t,type:`data`,name:e.name,content:[e],status:{type:`complete`}}}function ta(e){let t=[];for(let n of e)n.type!==`text`&&t.push(ea(n));return t}var na=e=>e.status.type===`complete`,ra=class extends Ai{isEditing=!0;get attachmentAccept(){return this.getAttachmentAdapter()?.accept??`*`}_attachments=[];get attachments(){return this._attachments}setAttachments(e){this._attachments=e,this._notifySubscribers()}get isEmpty(){return!this.text.trim()&&!this.attachments.length}_text=``;get text(){return this._text}_role=`user`;get role(){return this._role}_runConfig={};get runConfig(){return this._runConfig}_quote=void 0;get quote(){return this._quote}setQuote(e){this._quote!==e&&(this._quote=e,this._notifySubscribers())}setText(e){if(this._text!==e){if(this._text=e,this._dictation){this._dictationBaseText=e,this._currentInterimText=``;let{status:t,inputDisabled:n}=this._dictation;this._dictation=n?{status:t,inputDisabled:n}:{status:t}}this._notifySubscribers()}}setRole(e){this._role!==e&&(this._role=e,this._notifySubscribers())}setRunConfig(e){this._runConfig!==e&&(this._runConfig=e,this._notifySubscribers())}_emptyTextAndAttachments(){this._attachments=[],this._text=``,this._notifySubscribers()}async _onClearAttachments(){let e=this.getAttachmentAdapter();if(e){let t=this._attachments.filter(e=>!na(e));await Promise.all(t.map(t=>e.remove(t)))}}async reset(){if(this._attachments.length===0&&this._text===``&&this._role===`user`&&Object.keys(this._runConfig).length===0&&this._quote===void 0)return;this._role=`user`,this._runConfig={},this._quote=void 0;let e=this._onClearAttachments();this._emptyTextAndAttachments(),await e}async clearAttachments(){let e=this._onClearAttachments();this.setAttachments([]),await e}async send(e){if(this.isEmpty)return;this._dictationSession&&(this._dictationSession.cancel(),this._cleanupDictation());let t=this.getAttachmentAdapter(),n=this.attachments.length>0?Promise.all(this.attachments.map(async e=>{if(na(e))return e;if(!t)throw Error(`Attachments are not supported`);return await t.send(e)})):[],r=this.text,i=this._quote;this._quote=void 0,this._emptyTextAndAttachments();let a={createdAt:new Date,role:this.role,content:r?[{type:`text`,text:r}]:[],attachments:await n,runConfig:this.runConfig,metadata:{custom:{...i?{quote:i}:{}}}};this.handleSend(a,e),this._notifyEventSubscribers(`send`,{})}cancel(){this.handleCancel()}async addAttachment(e){if(!(e instanceof File)){let t=this.getAttachmentAdapter();if(t&&!Qi({name:e.name,type:e.contentType??``},t.accept)){let n=`File type ${e.contentType||`unknown`} is not accepted. Accepted types: ${t.accept}`,r=Error(n);throw this._safeEmitAttachmentAddError(`not-accepted`,n,void 0,r),r}let n={id:e.id??F(),type:e.type??`document`,name:e.name,contentType:e.contentType,content:e.content,status:{type:`complete`}};this._attachments=[...this._attachments,n],this._notifySubscribers(),this._notifyEventSubscribers(`attachmentAdd`,{});return}let t=e=>{let t=this._attachments.findIndex(t=>t.id===e.id);t===-1?this._attachments=[...this._attachments,e]:this._attachments=[...this._attachments.slice(0,t),e,...this._attachments.slice(t+1)],this._notifySubscribers()},n=this.getAttachmentAdapter();if(!n){let e=`Attachments are not supported`,t=Error(e);throw this._safeEmitAttachmentAddError(`no-adapter`,e,void 0,t),t}if(!Qi({name:e.name,type:e.type},n.accept)){let t=`File type ${e.type||`unknown`} is not accepted. Accepted types: ${n.accept}`,r=Error(t);throw this._safeEmitAttachmentAddError(`not-accepted`,t,void 0,r),r}let r;try{let i=n.add({file:e});if(Symbol.asyncIterator in i)for await(let e of i)r=e,t(e);else r=await i,t(r)}catch(e){throw r&&t({...r,status:{type:`incomplete`,reason:`error`}}),this._safeEmitAttachmentAddError(`adapter-error`,e instanceof Error?e.message:String(e),r?.id,e instanceof Error?e:void 0),e}r?.status.type===`incomplete`&&r.status.reason===`error`?this._safeEmitAttachmentAddError(`adapter-error`,`Attachment upload did not complete successfully.`,r?.id):this._notifyEventSubscribers(`attachmentAdd`,{})}_safeEmitAttachmentAddError(e,t,n,r){try{this._notifyEventSubscribers(`attachmentAddError`,{reason:e,message:t,...n!==void 0&&{attachmentId:n},...r!==void 0&&{error:r}})}catch(e){console.error(`[assistant-ui] attachmentAddError subscriber threw:`,e)}}async removeAttachment(e){let t=this._attachments.findIndex(t=>t.id===e);if(t===-1)throw Error(`Attachment not found`);let n=this._attachments[t];if(!na(n)){let e=this.getAttachmentAdapter();if(!e)throw Error(`Attachments are not supported`);await e.remove(n)}this._attachments=this._attachments.filter(t=>t.id!==e),this._notifySubscribers()}_dictation;_dictationSession;_dictationUnsubscribes=[];_dictationBaseText=``;_currentInterimText=``;_dictationSessionIdCounter=0;_activeDictationSessionId;_isCleaningDictation=!1;get dictation(){return this._dictation}_isActiveSession(e,t){return this._activeDictationSessionId===e&&this._dictationSession===t}startDictation(){let e=this.getDictationAdapter();if(!e)throw Error(`Dictation adapter not configured`);if(this._dictationSession){for(let e of this._dictationUnsubscribes)e();this._dictationUnsubscribes=[],this._dictationSession.stop().catch(()=>{}),this._dictationSession=void 0}let t=e.disableInputDuringDictation??!1;this._dictationBaseText=this._text,this._currentInterimText=``;let n=e.listen();this._dictationSession=n;let r=++this._dictationSessionIdCounter;this._activeDictationSessionId=r,this._dictation={status:n.status,inputDisabled:t},this._notifySubscribers();let i=n.onSpeech(e=>{if(!this._isActiveSession(r,n))return;let t=e.isFinal!==!1,i=this._dictationBaseText&&!this._dictationBaseText.endsWith(` `)&&e.transcript?` `:``;if(t){if(this._dictationBaseText=this._dictationBaseText+i+e.transcript,this._currentInterimText=``,this._text=this._dictationBaseText,this._dictation){let{transcript:e,...t}=this._dictation;this._dictation=t}this._notifySubscribers()}else this._currentInterimText=i+e.transcript,this._text=this._dictationBaseText+this._currentInterimText,this._dictation&&={...this._dictation,transcript:e.transcript},this._notifySubscribers()});this._dictationUnsubscribes.push(i);let a=n.onSpeechStart(()=>{this._isActiveSession(r,n)&&(this._dictation={status:{type:`running`},inputDisabled:t,...this._dictation?.transcript&&{transcript:this._dictation.transcript}},this._notifySubscribers())});this._dictationUnsubscribes.push(a);let o=n.onSpeechEnd(()=>{this._cleanupDictation({sessionId:r})});this._dictationUnsubscribes.push(o);let s=setInterval(()=>{this._isActiveSession(r,n)&&n.status.type===`ended`&&this._cleanupDictation({sessionId:r})},100);this._dictationUnsubscribes.push(()=>clearInterval(s))}stopDictation(){if(!this._dictationSession)return;let e=this._dictationSession,t=this._activeDictationSessionId;e.stop().finally(()=>{this._cleanupDictation({sessionId:t})})}_cleanupDictation(e){if(!(e?.sessionId!==void 0&&e.sessionId!==this._activeDictationSessionId||this._isCleaningDictation)){this._isCleaningDictation=!0;try{for(let e of this._dictationUnsubscribes)e();this._dictationUnsubscribes=[],this._dictationSession=void 0,this._activeDictationSessionId=void 0,this._dictation=void 0,this._dictationBaseText=``,this._currentInterimText=``,this._notifySubscribers()}finally{this._isCleaningDictation=!1}}}_eventSubscribers=new Map;_notifyEventSubscribers(e,t){let n=this._eventSubscribers.get(e);if(n)for(let e of n)e(t)}unstable_on(e,t){let n=t,r=this._eventSubscribers.get(e);return r||(r=new Set,this._eventSubscribers.set(e,r)),r.add(n),()=>{this._eventSubscribers.get(e)?.delete(n)}}},ia=class extends ra{runtime;_canCancel=!1;get canCancel(){return this._canCancel}getAttachmentAdapter(){return this.runtime.adapters?.attachments}getDictationAdapter(){return this.runtime.adapters?.dictation}constructor(e){super(),this.runtime=e,this.connect()}connect(){return this.runtime.subscribe(()=>{this.canCancel!==this.runtime.capabilities.cancel&&(this._canCancel=this.runtime.capabilities.cancel,this._notifySubscribers())})}async handleSend(e,t){this.runtime.append({...e,parentId:this.runtime.messages.at(-1)?.id??null,sourceId:null,startRun:t?.startRun})}async handleCancel(){this.runtime.cancelRun()}},aa=class extends ra{runtime;endEditCallback;get canCancel(){return!0}getAttachmentAdapter(){return this.runtime.adapters?.attachments}getDictationAdapter(){return this.runtime.adapters?.dictation}_previousText;_previousAttachments;_nonTextPassthrough;_parentId;_sourceId;constructor(e,t,{parentId:n,message:r}){super(),this.runtime=e,this.endEditCallback=t,this._parentId=n,this._sourceId=r.id,this._previousText=Li(r),this.setText(this._previousText),this.setRole(r.role),r.role===`user`?(this._previousAttachments=[...r.attachments??[],...ta(r.content)],this._nonTextPassthrough=[]):(this._previousAttachments=r.attachments??[],this._nonTextPassthrough=r.content.filter(e=>e.type!==`text`)),this.setAttachments(this._previousAttachments),this.setRunConfig({...e.composer.runConfig})}get parentId(){return this._parentId}get sourceId(){return this._sourceId}async handleSend(e,t){let n=Li(e),r=!$i(e.attachments??[],this._previousAttachments);if(n!==this._previousText||r||t?.startRun){let n=this._nonTextPassthrough.length>0?[...e.content,...this._nonTextPassthrough]:e.content;this.runtime.append({...e,content:n,parentId:this._parentId,sourceId:this._sourceId,startRun:t?.startRun})}this.handleCancel()}handleCancel(){this.endEditCallback(),this._notifySubscribers()}},oa=class{_contextProvider;_subscriptions=new Set;_isInitialized=!1;repository=new Zi;_voiceMessages=[];_voiceGeneration=0;_cachedMergedMessages=null;_cachedVoiceGeneration=-1;_cachedMergedBase=null;_markVoiceMessagesDirty(){this._voiceGeneration++,this._cachedMergedMessages=null}_getBaseMessages(){return this.repository.getMessages()}get messages(){if(this._voiceMessages.length===0)return this._getBaseMessages();let e=this._getBaseMessages();return(this._cachedVoiceGeneration!==this._voiceGeneration||this._cachedMergedBase!==e)&&(this._cachedMergedMessages=[...e,...this._voiceMessages],this._cachedVoiceGeneration=this._voiceGeneration,this._cachedMergedBase=e),this._cachedMergedMessages}get state(){let e;for(let t of this.messages)t.role===`assistant`&&(e=t);return e?.metadata.unstable_state??null}composer=new ia(this);constructor(e){this._contextProvider=e}getModelContext(){return this._contextProvider.getModelContext()}_editComposers=new Map;getEditComposer(e){return this._editComposers.get(e)}beginEdit(e){if(this._editComposers.has(e))throw Error(`Edit already in progress`);this._editComposers.set(e,new aa(this,()=>this._editComposers.delete(e),this.repository.getMessage(e))),this._notifySubscribers()}getMessageById(e){try{return this.repository.getMessage(e)}catch{let t=this.repository.getMessages(),n=this._voiceMessages.findIndex(t=>t.id===e);return n===-1?void 0:{parentId:n>0?this._voiceMessages[n-1].id:t.at(-1)?.id??null,message:this._voiceMessages[n],index:t.length+n}}}getBranches(e){return this._voiceMessages.some(t=>t.id===e)?[]:this.repository.getBranches(e)}switchToBranch(e){this.repository.switchToBranch(e),this._notifySubscribers()}_notifySubscribers(){for(let e of this._subscriptions)e()}_notifyEventSubscribers(e,t){let n=this._eventSubscribers.get(e);if(n)for(let e of n)e(t)}subscribe(e){return this._subscriptions.add(e),()=>this._subscriptions.delete(e)}submitFeedback({messageId:e,type:t}){let n=this.adapters?.feedback;if(!n)throw Error(`Feedback adapter not configured`);let{message:r,parentId:i}=this.repository.getMessage(e);if(n.submit({message:r,type:t}),r.role===`assistant`){let e={...r,metadata:{...r.metadata,submittedFeedback:{type:t}}};this.repository.addOrUpdateMessage(i,e)}this._notifySubscribers()}_stopSpeaking;speech;speak(e){let t=this.adapters?.speech;if(!t)throw Error(`Speech adapter not configured`);let{message:n}=this.repository.getMessage(e);this._stopSpeaking?.();let r=t.speak(Li(n)),i=r.subscribe(()=>{r.status.type===`ended`?(this._stopSpeaking=void 0,this.speech=void 0):this.speech={messageId:e,status:r.status},this._notifySubscribers()});this.speech={messageId:e,status:r.status},this._notifySubscribers(),this._stopSpeaking=()=>{r.cancel(),i(),this.speech=void 0,this._stopSpeaking=void 0}}stopSpeaking(){if(!this._stopSpeaking)throw Error(`No message is being spoken`);this._stopSpeaking(),this._notifySubscribers()}_voiceSession;_voiceUnsubs=[];voice;_voiceVolume=0;_voiceVolumeSubscribers=new Set;getVoiceVolume=()=>this._voiceVolume;subscribeVoiceVolume=e=>(this._voiceVolumeSubscribers.add(e),()=>this._voiceVolumeSubscribers.delete(e));connectVoice(){let e=this.adapters?.voice;if(!e)throw Error(`Voice adapter not configured`);this.disconnectVoice();let t=e.connect({});this._voiceSession=t;let n=[],r=`listening`;this.voice={status:t.status,isMuted:t.isMuted,mode:r},this._voiceVolume=0,this._notifySubscribers(),n.push(t.onStatusChange(e=>{e.type===`ended`?(this._finishVoiceAssistantMessage(),this._voiceSession=void 0,this.voice=void 0):this.voice={status:e,isMuted:t.isMuted,mode:r},this._notifySubscribers()})),n.push(t.onModeChange(e=>{r=e,this.voice&&(this.voice={...this.voice,mode:e},this._notifySubscribers())})),n.push(t.onVolumeChange(e=>{this._voiceVolume=e;for(let e of this._voiceVolumeSubscribers)e()})),n.push(t.onTranscript(e=>{this._handleVoiceTranscript(e)})),this._voiceUnsubs=n}_currentAssistantMsg=null;_handleVoiceTranscript(e){if(this.ensureInitialized(),e.role===`user`)this._finishVoiceAssistantMessage(),this._currentAssistantMsg=null,e.isFinal&&(this._voiceMessages.push({id:F(),role:`user`,content:[{type:`text`,text:e.text}],metadata:{custom:{}},createdAt:new Date,status:{type:`complete`,reason:`unknown`},attachments:[]}),this._markVoiceMessagesDirty(),this._notifySubscribers());else{if(!this._currentAssistantMsg)this._currentAssistantMsg={id:F(),role:`assistant`,content:[{type:`text`,text:e.text}],metadata:{unstable_state:this.state,unstable_annotations:[],unstable_data:[],steps:[],custom:{}},status:{type:`running`},createdAt:new Date},this._voiceMessages.push(this._currentAssistantMsg);else{let t=this._voiceMessages.indexOf(this._currentAssistantMsg);if(t===-1)return;let n={...this._currentAssistantMsg,content:[{type:`text`,text:e.text}],...e.isFinal?{status:{type:`complete`,reason:`stop`}}:{}};this._voiceMessages[t]=n,this._currentAssistantMsg=n}e.isFinal&&(this._currentAssistantMsg=null),this._markVoiceMessagesDirty(),this._notifySubscribers()}}_finishVoiceAssistantMessage(){let e=this._voiceMessages.at(-1);if(e?.role===`assistant`&&e.status.type===`running`){let t=this._voiceMessages.length-1;this._voiceMessages[t]={...e,status:{type:`complete`,reason:`stop`}},this._markVoiceMessagesDirty(),this._notifySubscribers()}}disconnectVoice(){this._finishVoiceAssistantMessage(),this._currentAssistantMsg=null;for(let e of this._voiceUnsubs)e();this._voiceUnsubs=[],this._voiceSession?.disconnect(),this._voiceSession=void 0,this.voice=void 0,this._voiceVolume=0;for(let e of this._voiceVolumeSubscribers)e();this._voiceMessages=[],this._markVoiceMessagesDirty(),this._notifySubscribers()}muteVoice(){if(!this._voiceSession)throw Error(`No active voice session`);this._voiceSession.mute(),this.voice={...this.voice,isMuted:!0},this._notifySubscribers()}unmuteVoice(){if(!this._voiceSession)throw Error(`No active voice session`);this._voiceSession.unmute(),this.voice={...this.voice,isMuted:!1},this._notifySubscribers()}ensureInitialized(){this._isInitialized||(this._isInitialized=!0,this._notifyEventSubscribers(`initialize`,{}))}export(){return this.repository.export()}import(e){this.ensureInitialized(),this.repository.clear(),this.repository.import(e),this._notifySubscribers()}reset(e){this.import(Ji.fromArray(e??[]))}_eventSubscribers=new Map;unstable_on(e,t){let n=t;if(e===`modelContextUpdate`)return this._contextProvider.subscribe?.(()=>n({}))??(()=>{});let r=this._eventSubscribers.get(e);return r||(r=new Set,this._eventSubscribers.set(e,r)),r.add(n),()=>{this._eventSubscribers.get(e)?.delete(n)}}},sa=class{_core;_threadListBinding;get path(){return this._core.path}constructor(e,t){this._core=e,this._threadListBinding=t,this.__internal_bindMethods()}__internal_bindMethods(){this.switchTo=this.switchTo.bind(this),this.rename=this.rename.bind(this),this.archive=this.archive.bind(this),this.unarchive=this.unarchive.bind(this),this.delete=this.delete.bind(this),this.initialize=this.initialize.bind(this),this.generateTitle=this.generateTitle.bind(this),this.subscribe=this.subscribe.bind(this),this.unstable_on=this.unstable_on.bind(this),this.getState=this.getState.bind(this),this.detach=this.detach.bind(this)}getState(){return this._core.getState()}switchTo(){let e=this._core.getState();return this._threadListBinding.switchToThread(e.id)}rename(e){let t=this._core.getState();return this._threadListBinding.rename(t.id,e)}archive(){let e=this._core.getState();return this._threadListBinding.archive(e.id)}unarchive(){let e=this._core.getState();return this._threadListBinding.unarchive(e.id)}delete(){let e=this._core.getState();return this._threadListBinding.delete(e.id)}initialize(){let e=this._core.getState();return this._threadListBinding.initialize(e.id)}generateTitle(){let e=this._core.getState();return this._threadListBinding.generateTitle(e.id)}unstable_on(e,t){let n=this._core.getState().isMain,r=this._core.getState().id;return this.subscribe(()=>{let i=this._core.getState(),a=i.isMain,o=i.id;n===a&&r===o||(n=a,r=o,!(e===`switchedTo`&&!a)&&(e===`switchedAway`&&a||t({})))})}subscribe(e){return this._core.subscribe(e)}detach(){let e=this._core.getState();this._threadListBinding.detach(e.id)}__internal_getRuntime(){return this}},ca=Symbol(`innerMessage`),la=Symbol(`innerMessages`),ua=[],da=(e,t)=>{ca in e||(e[ca]=t)},fa=e=>{let t=`messages`in e?e.messages:e,n=t[la]||t[ca];return n?Array.isArray(n)?n:(t[la]=[n],t[la]):ua},pa=class{_core;get path(){return this._core.path}constructor(e){this._core=e,this.__internal_bindMethods()}__internal_bindMethods(){this.getState=this.getState.bind(this),this.remove=this.remove.bind(this),this.subscribe=this.subscribe.bind(this)}getState(){return this._core.getState()}subscribe(e){return this._core.subscribe(e)}},ma=class extends pa{_composerApi;constructor(e,t){super(e),this._composerApi=t}remove(){let e=this._composerApi.getState();if(!e)throw Error(`Composer is not available`);return e.removeAttachment(this.getState().id)}},ha=class extends ma{get source(){return`thread-composer`}},ga=class extends ma{get source(){return`edit-composer`}},_a=class extends pa{get source(){return`message`}remove(){throw Error(`Message attachments cannot be removed`)}},va=Object.freeze([]),ya=Object.freeze({}),ba=e=>Object.freeze({type:`thread`,isEditing:e?.isEditing??!1,canCancel:e?.canCancel??!1,isEmpty:e?.isEmpty??!0,attachments:e?.attachments??va,text:e?.text??``,role:e?.role??`user`,runConfig:e?.runConfig??ya,attachmentAccept:e?.attachmentAccept??``,dictation:e?.dictation,quote:e?.quote,value:e?.text??``}),xa=e=>Object.freeze({type:`edit`,isEditing:e?.isEditing??!1,canCancel:e?.canCancel??!1,isEmpty:e?.isEmpty??!0,text:e?.text??``,role:e?.role??`user`,attachments:e?.attachments??va,runConfig:e?.runConfig??ya,attachmentAccept:e?.attachmentAccept??``,dictation:e?.dictation,quote:e?.quote,parentId:e?.parentId??null,sourceId:e?.sourceId??null,value:e?.text??``}),Sa=class{_core;get path(){return this._core.path}constructor(e){this._core=e}__internal_bindMethods(){this.setText=this.setText.bind(this),this.setRunConfig=this.setRunConfig.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.addAttachment=this.addAttachment.bind(this),this.reset=this.reset.bind(this),this.clearAttachments=this.clearAttachments.bind(this),this.send=this.send.bind(this),this.cancel=this.cancel.bind(this),this.setRole=this.setRole.bind(this),this.getAttachmentByIndex=this.getAttachmentByIndex.bind(this),this.startDictation=this.startDictation.bind(this),this.stopDictation=this.stopDictation.bind(this),this.setQuote=this.setQuote.bind(this),this.unstable_on=this.unstable_on.bind(this)}setText(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.setText(e)}setRunConfig(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.setRunConfig(e)}addAttachment(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);return t.addAttachment(e)}reset(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);return e.reset()}clearAttachments(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);return e.clearAttachments()}send(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.send(e)}cancel(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);e.cancel()}setRole(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.setRole(e)}startDictation(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);e.startDictation()}stopDictation(){let e=this._core.getState();if(!e)throw Error(`Composer is not available`);e.stopDictation()}setQuote(e){let t=this._core.getState();if(!t)throw Error(`Composer is not available`);t.setQuote(e)}subscribe(e){return this._core.subscribe(e)}_eventSubscriptionSubjects=new Map;unstable_on(e,t){let n=this._eventSubscriptionSubjects.get(e);return n||(n=new Fi({event:e,binding:this._core}),this._eventSubscriptionSubjects.set(e,n)),n.subscribe(t)}},Ca=class extends Sa{get path(){return this._core.path}get type(){return`thread`}_getState;constructor(e){let t=new Ni({path:e.path,getState:()=>ba(e.getState()),subscribe:t=>e.subscribe(t)});super({path:e.path,getState:()=>e.getState(),subscribe:e=>t.subscribe(e)}),this._getState=t.getState.bind(t),this.__internal_bindMethods()}getState(){return this._getState()}getAttachmentByIndex(e){return new ha(new Mi({path:{...this.path,attachmentSource:`thread-composer`,attachmentSelector:{type:`index`,index:e},ref:`${this.path.ref}.attachments[${e}]`},getState:()=>{let t=this.getState().attachments[e];return t?{...t,source:`thread-composer`}:Oi},subscribe:e=>this._core.subscribe(e)}),this._core)}},wa=class extends Sa{_beginEdit;get path(){return this._core.path}get type(){return`edit`}_getState;constructor(e,t){let n=new Ni({path:e.path,getState:()=>xa(e.getState()),subscribe:t=>e.subscribe(t)});super({path:e.path,getState:()=>e.getState(),subscribe:e=>n.subscribe(e)}),this._beginEdit=t,this._getState=n.getState.bind(n),this.__internal_bindMethods()}__internal_bindMethods(){super.__internal_bindMethods(),this.beginEdit=this.beginEdit.bind(this)}getState(){return this._getState()}beginEdit(){this._beginEdit()}getAttachmentByIndex(e){return new ga(new Mi({path:{...this.path,attachmentSource:`edit-composer`,attachmentSelector:{type:`index`,index:e},ref:`${this.path.ref}.attachments[${e}]`},getState:()=>{let t=this.getState().attachments[e];return t?{...t,source:`edit-composer`}:Oi},subscribe:e=>this._core.subscribe(e)}),this._core)}},Ta=class{contentBinding;messageApi;threadApi;get path(){return this.contentBinding.path}constructor(e,t,n){this.contentBinding=e,this.messageApi=t,this.threadApi=n,this.__internal_bindMethods()}__internal_bindMethods(){this.addToolResult=this.addToolResult.bind(this),this.resumeToolCall=this.resumeToolCall.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this)}getState(){return this.contentBinding.getState()}addToolResult(e){let t=this.contentBinding.getState();if(!t)throw Error(`Message part is not available`);if(t.type!==`tool-call`)throw Error(`Tried to add tool result to non-tool message part`);if(!this.messageApi)throw Error(`Message API is not available. This is likely a bug in assistant-ui.`);if(!this.threadApi)throw Error(`Thread API is not available`);let n=this.messageApi.getState();if(!n)throw Error(`Message is not available`);let r=t.toolName,i=t.toolCallId,a=si.toResponse(e);this.threadApi.getState().addToolResult({messageId:n.id,toolName:r,toolCallId:i,result:a.result,artifact:a.artifact,isError:a.isError})}resumeToolCall(e){let t=this.contentBinding.getState();if(!t)throw Error(`Message part is not available`);if(t.type!==`tool-call`)throw Error(`Tried to resume tool call on non-tool message part`);if(!this.threadApi)throw Error(`Thread API is not available`);let n=t.toolCallId;this.threadApi.getState().resumeToolCall({toolCallId:n,payload:e})}subscribe(e){return this.contentBinding.subscribe(e)}},Ea=Object.freeze({type:`complete`}),Da=(e,t,n)=>{if(e.role!==`assistant`)return Ea;if(n.type===`tool-call`)return n.result?Ea:e.status;let r=t===Math.max(0,e.content.length-1);return e.status.type===`requires-action`?Ea:r?e.status:Ea},Oa=(e,t)=>{let n=e.content[t];if(!n)return Oi;let r=Da(e,t,n);return Object.freeze({...n,[ca]:n[ca],status:r})},ka=class{_core;_threadBinding;get path(){return this._core.path}constructor(e,t){this._core=e,this._threadBinding=t,this.composer=new wa(new Pi({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.composer`,composerSource:`edit`},getState:this._getEditComposerRuntimeCore,subscribe:e=>this._threadBinding.subscribe(e)}),()=>this._threadBinding.getState().beginEdit(this._core.getState().id)),this.__internal_bindMethods()}__internal_bindMethods(){this.reload=this.reload.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.getMessagePartByIndex=this.getMessagePartByIndex.bind(this),this.getMessagePartByToolCallId=this.getMessagePartByToolCallId.bind(this),this.getAttachmentByIndex=this.getAttachmentByIndex.bind(this),this.unstable_getCopyText=this.unstable_getCopyText.bind(this),this.speak=this.speak.bind(this),this.stopSpeaking=this.stopSpeaking.bind(this),this.submitFeedback=this.submitFeedback.bind(this),this.switchToBranch=this.switchToBranch.bind(this)}composer;_getEditComposerRuntimeCore=()=>this._threadBinding.getState().getEditComposer(this._core.getState().id);getState(){return this._core.getState()}reload(e={}){let t=this._getEditComposerRuntimeCore(),n=t??this._threadBinding.getState().composer,r=t??n,{runConfig:i=r.runConfig}=e,a=this._core.getState();if(a.role!==`assistant`)throw Error(`Can only reload assistant messages`);this._threadBinding.getState().startRun({parentId:a.parentId,sourceId:a.id,runConfig:i})}speak(){let e=this._core.getState();return this._threadBinding.getState().speak(e.id)}stopSpeaking(){let e=this._core.getState();if(this._threadBinding.getState().speech?.messageId===e.id)this._threadBinding.getState().stopSpeaking();else throw Error(`Message is not being spoken`)}submitFeedback({type:e}){let t=this._core.getState();this._threadBinding.getState().submitFeedback({messageId:t.id,type:e})}switchToBranch({position:e,branchId:t}){let n=this._core.getState();if(t&&e)throw Error(`May not specify both branchId and position`);if(!t&&!e)throw Error(`Must specify either branchId or position`);let r=this._threadBinding.getState().getBranches(n.id),i=t;if(e===`previous`?i=r[n.branchNumber-2]:e===`next`&&(i=r[n.branchNumber]),!i)throw Error(`Branch not found`);this._threadBinding.getState().switchToBranch(i)}unstable_getCopyText(){return Li(this.getState())}subscribe(e){return this._core.subscribe(e)}getMessagePartByIndex(e){if(e<0)throw Error(`Message part index must be >= 0`);return new Ta(new Mi({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.content[${e}]`,messagePartSelector:{type:`index`,index:e}},getState:()=>Oa(this.getState(),e),subscribe:e=>this._core.subscribe(e)}),this._core,this._threadBinding)}getMessagePartByToolCallId(e){return new Ta(new Mi({path:{...this.path,ref:this.path.ref+`${this.path.ref}.content[toolCallId=${JSON.stringify(e)}]`,messagePartSelector:{type:`toolCallId`,toolCallId:e}},getState:()=>{let t=this._core.getState(),n=t.content.findIndex(t=>t.type===`tool-call`&&t.toolCallId===e);return n===-1?Oi:Oa(t,n)},subscribe:e=>this._core.subscribe(e)}),this._core,this._threadBinding)}getAttachmentByIndex(e){return new _a(new Mi({path:{...this.path,ref:`${this.path.ref}${this.path.ref}.attachments[${e}]`,attachmentSource:`message`,attachmentSelector:{type:`index`,index:e}},getState:()=>{let t=this.getState().attachments?.[e];return t?{...t,source:`message`}:Oi},subscribe:e=>this._core.subscribe(e)}))}},Aa=e=>({parentId:e.parentId??null,sourceId:e.sourceId??null,runConfig:e.runConfig??{},...e.stream?{stream:e.stream}:{}}),ja=e=>({parentId:e.parentId??null,sourceId:e.sourceId??null,runConfig:e.runConfig??{}}),Ma=(e,t)=>typeof t==`string`?{createdAt:new Date,parentId:e.at(-1)?.id??null,sourceId:null,runConfig:{},role:`user`,content:[{type:`text`,text:t}],attachments:[],metadata:{custom:{}}}:{createdAt:t.createdAt??new Date,parentId:t.parentId??e.at(-1)?.id??null,sourceId:t.sourceId??null,role:t.role??`user`,content:t.content,attachments:t.attachments??[],metadata:t.metadata??{custom:{}},runConfig:t.runConfig??{},startRun:t.startRun},Na=(e,t)=>{let n=e.messages.at(-1);return Object.freeze({threadId:t.id,metadata:t,capabilities:e.capabilities,isDisabled:e.isDisabled,isLoading:e.isLoading,isRunning:e.isRunning??(n?.role===`assistant`?n.status.type===`running`:!1),messages:e.messages,state:e.state,suggestions:e.suggestions,extras:e.extras,speech:e.speech,voice:e.voice})},Pa=class{get path(){return this._threadBinding.path}get __internal_threadBinding(){return this._threadBinding}_threadBinding;constructor(e,t){let n=new Mi({path:e.path,getState:()=>Na(e.getState(),t.getState()),subscribe:n=>{let r=e.subscribe(n),i=t.subscribe(n);return()=>{r(),i()}}});this._threadBinding={path:e.path,getState:()=>e.getState(),getStateState:()=>n.getState(),outerSubscribe:t=>e.outerSubscribe(t),subscribe:t=>e.subscribe(t)},this.composer=new Ca(new Pi({path:{...this.path,ref:`${this.path.ref}.composer`,composerSource:`thread`},getState:()=>this._threadBinding.getState().composer,subscribe:e=>this._threadBinding.subscribe(e)})),this.__internal_bindMethods()}__internal_bindMethods(){this.append=this.append.bind(this),this.resumeRun=this.resumeRun.bind(this),this.importExternalState=this.importExternalState.bind(this),this.exportExternalState=this.exportExternalState.bind(this),this.startRun=this.startRun.bind(this),this.cancelRun=this.cancelRun.bind(this),this.stopSpeaking=this.stopSpeaking.bind(this),this.connectVoice=this.connectVoice.bind(this),this.disconnectVoice=this.disconnectVoice.bind(this),this.muteVoice=this.muteVoice.bind(this),this.unmuteVoice=this.unmuteVoice.bind(this),this.getVoiceVolume=this.getVoiceVolume.bind(this),this.subscribeVoiceVolume=this.subscribeVoiceVolume.bind(this),this.export=this.export.bind(this),this.import=this.import.bind(this),this.reset=this.reset.bind(this),this.getMessageByIndex=this.getMessageByIndex.bind(this),this.getMessageById=this.getMessageById.bind(this),this.subscribe=this.subscribe.bind(this),this.unstable_on=this.unstable_on.bind(this),this.getModelContext=this.getModelContext.bind(this),this.getState=this.getState.bind(this)}composer;getState(){return this._threadBinding.getStateState()}append(e){this._threadBinding.getState().append(Ma(this._threadBinding.getState().messages,e))}subscribe(e){return this._threadBinding.subscribe(e)}getModelContext(){return this._threadBinding.getState().getModelContext()}startRun(e){return this._threadBinding.getState().startRun(ja(e))}resumeRun(e){return this._threadBinding.getState().resumeRun(Aa(e))}exportExternalState(){return this._threadBinding.getState().exportExternalState()}importExternalState(e){this._threadBinding.getState().importExternalState(e)}cancelRun(){this._threadBinding.getState().cancelRun()}stopSpeaking(){return this._threadBinding.getState().stopSpeaking()}connectVoice(){this._threadBinding.getState().connectVoice()}disconnectVoice(){this._threadBinding.getState().disconnectVoice()}getVoiceVolume(){return this._threadBinding.getState().getVoiceVolume()}subscribeVoiceVolume(e){return this._threadBinding.getState().subscribeVoiceVolume(e)}muteVoice(){this._threadBinding.getState().muteVoice()}unmuteVoice(){this._threadBinding.getState().unmuteVoice()}export(){return this._threadBinding.getState().export()}import(e){this._threadBinding.getState().import(e)}reset(e){this._threadBinding.getState().reset(e)}getMessageByIndex(e){if(e<0)throw Error(`Message index must be >= 0`);return this._getMessageRuntime({...this.path,ref:`${this.path.ref}.messages[${e}]`,messageSelector:{type:`index`,index:e}},()=>{let t=this._threadBinding.getState().messages,n=t[e];if(n)return{message:n,parentId:t[e-1]?.id??null,index:e}})}getMessageById(e){return this._getMessageRuntime({...this.path,ref:`${this.path.ref}.messages[messageId=${JSON.stringify(e)}]`,messageSelector:{type:`messageId`,messageId:e}},()=>this._threadBinding.getState().getMessageById(e))}_getMessageRuntime(e,t){return new ka(new Mi({path:e,getState:()=>{let{message:e,parentId:n,index:r}=t()??{},{messages:i,speech:a}=this._threadBinding.getState();if(!e||n===void 0||r===void 0)return Oi;let o=this._threadBinding.getState().getBranches(e.id);return{...e,[ca]:e[ca],index:r,isLast:i.at(-1)?.id===e.id,parentId:n,branchNumber:o.indexOf(e.id)+1,branchCount:o.length,speech:a?.messageId===e.id?a:void 0}},subscribe:e=>this._threadBinding.subscribe(e)}),this._threadBinding)}_eventSubscriptionSubjects=new Map;unstable_on(e,t){let n=this._eventSubscriptionSubjects.get(e);return n||(n=new Fi({event:e,binding:this._threadBinding}),this._eventSubscriptionSubjects.set(e,n)),n.subscribe(t)}},Fa=Promise.resolve(),Ia=e=>({mainThreadId:e.mainThreadId,newThreadId:e.newThreadId,threadIds:e.threadIds,archivedThreadIds:e.archivedThreadIds,isLoading:e.isLoading,isLoadingMore:e.isLoadingMore??!1,hasMore:e.hasMore??!1,threadItems:e.threadItems}),La=(e,t)=>{if(t===void 0)return Oi;let n=e.getItemById(t);return n?{id:n.id,remoteId:n.remoteId,externalId:n.externalId,title:n.title,status:n.status,custom:n.custom,isMain:n.id===e.mainThreadId}:Oi},Ra=class{_core;_runtimeFactory;_getState;constructor(e,t=Pa){this._core=e,this._runtimeFactory=t;let n=new Ni({path:{},getState:()=>Ia(e),subscribe:t=>e.subscribe(t)});this._getState=n.getState.bind(n),this._mainThreadListItemRuntime=new sa(new Mi({path:{ref:`threadItems[main]`,threadSelector:{type:`main`}},getState:()=>La(this._core,this._core.mainThreadId),subscribe:e=>this._core.subscribe(e)}),this._core),this.main=new t(new Pi({path:{ref:`threads.main`,threadSelector:{type:`main`}},getState:()=>e.getMainThreadRuntimeCore(),subscribe:t=>e.subscribe(t)}),this._mainThreadListItemRuntime),this.__internal_bindMethods()}__internal_bindMethods(){this.switchToThread=this.switchToThread.bind(this),this.switchToNewThread=this.switchToNewThread.bind(this),this.getLoadThreadsPromise=this.getLoadThreadsPromise.bind(this),this.reload=this.reload.bind(this),this.loadMore=this.loadMore.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.getById=this.getById.bind(this),this.getItemById=this.getItemById.bind(this),this.getItemByIndex=this.getItemByIndex.bind(this),this.getArchivedItemByIndex=this.getArchivedItemByIndex.bind(this)}switchToThread(e){return this._core.switchToThread(e)}switchToNewThread(){return this._core.switchToNewThread()}getLoadThreadsPromise(){return this._core.getLoadThreadsPromise()}reload(){return this._core.reload?.()??Fa}loadMore(){return this._core.loadMore?.()??Fa}getState(){return this._getState()}subscribe(e){return this._core.subscribe(e)}_mainThreadListItemRuntime;main;get mainItem(){return this._mainThreadListItemRuntime}getById(e){return new this._runtimeFactory(new Pi({path:{ref:`threads[threadId=${JSON.stringify(e)}]`,threadSelector:{type:`threadId`,threadId:e}},getState:()=>this._core.getThreadRuntimeCore(e),subscribe:e=>this._core.subscribe(e)}),this.mainItem)}getItemByIndex(e){return new sa(new Mi({path:{ref:`threadItems[${e}]`,threadSelector:{type:`index`,index:e}},getState:()=>La(this._core,this._core.threadIds[e]),subscribe:e=>this._core.subscribe(e)}),this._core)}getArchivedItemByIndex(e){return new sa(new Mi({path:{ref:`archivedThreadItems[${e}]`,threadSelector:{type:`archiveIndex`,index:e}},getState:()=>La(this._core,this._core.archivedThreadIds[e]),subscribe:e=>this._core.subscribe(e)}),this._core)}getItemById(e){return new sa(new Mi({path:{ref:`threadItems[threadId=${e}]`,threadSelector:{type:`threadId`,threadId:e}},getState:()=>La(this._core,e),subscribe:e=>this._core.subscribe(e)}),this._core)}},za=class{_core;threads;_thread;constructor(e){this._core=e,this.threads=new Ra(e.threads),this._thread=this.threads.main,this.__internal_bindMethods()}__internal_bindMethods(){this.registerModelContextProvider=this.registerModelContextProvider.bind(this)}get thread(){return this._thread}registerModelContextProvider(e){return this._core.registerModelContextProvider(e)}},Ba=M(e=>hn(xi(e)));ar(Ba,(e,t)=>{Si(e,t),!e.tools&&t.tools.source===null&&(e.tools=ii({})),!e.dataRenderers&&t.dataRenderers.source===null&&(e.dataRenderers=ai())});var Va=(0,A.createContext)(null),Ha=()=>(0,A.useContext)(Va),Ua=Object.freeze([]),Wa=`DEFAULT_THREAD_ID`,Ga=Object.freeze([Wa]),Ka=Object.freeze({id:Wa,remoteId:void 0,externalId:void 0,status:`regular`}),qa=Promise.resolve(),Ja=Object.freeze({[Wa]:Ka}),Ya=class{threadFactory;_mainThreadId=Wa;_threads=Ga;_archivedThreads=Ua;_threadData=Ja;adapter={};get isLoading(){return this.adapter.isLoading??!1}get newThreadId(){}get threadIds(){return this._threads}get archivedThreadIds(){return this._archivedThreads}get threadItems(){return this._threadData}getLoadThreadsPromise(){return qa}_mainThread;get mainThreadId(){return this._mainThreadId}constructor(e={},t){this.threadFactory=t,this.__internal_setAdapter(e,!0)}getMainThreadRuntimeCore(){return this._mainThread}getThreadRuntimeCore(){throw Error(`Method not implemented.`)}getItemById(e){for(let t of this.adapter.threads??[])if(t.id===e)return t;for(let t of this.adapter.archivedThreads??[])if(t.id===e)return t;if(e===Wa)return Ka}__internal_setAdapter(e,t=!1){let n=this.adapter;this.adapter=e;let r=e.threadId??Wa,i=e.threads??Ua,a=e.archivedThreads??Ua,o=n.threadId??Wa,s=n.threads??Ua,c=n.archivedThreads??Ua;!t&&o===r&&s===i&&c===a||((s!==i||c!==a)&&(this._threadData={...Ja,...Object.fromEntries(e.threads?.map(e=>[e.id,{...e,remoteId:e.remoteId,externalId:e.externalId,status:`regular`}])??[]),...Object.fromEntries(e.archivedThreads?.map(e=>[e.id,{...e,remoteId:e.remoteId,externalId:e.externalId,status:`archived`}])??[])}),s!==i&&(this._threads=this.adapter.threads?.map(e=>e.id)??Ua),c!==a&&(this._archivedThreads=this.adapter.archivedThreads?.map(e=>e.id)??Ua),(t||o!==r)&&(this._mainThreadId=r,this._mainThread=this.threadFactory()),this._notifySubscribers())}async switchToThread(e){if(this._mainThreadId===e)return;let t=this.adapter.onSwitchToThread;if(!t)throw Error(`External store adapter does not support switching to thread`);await t(e)}async switchToNewThread(){let e=this.adapter.onSwitchToNewThread;if(!e)throw Error(`External store adapter does not support switching to new thread`);await e()}async rename(e,t){let n=this.adapter.onRename;if(!n)throw Error(`External store adapter does not support renaming`);await n(e,t)}async detach(){}async archive(e){let t=this.adapter.onArchive;if(!t)throw Error(`External store adapter does not support archiving`);await t(e)}async unarchive(e){let t=this.adapter.onUnarchive;if(!t)throw Error(`External store adapter does not support unarchiving`);await t(e)}async delete(e){let t=this.adapter.onDelete;if(!t)throw Error(`External store adapter does not support deleting`);await t(e)}initialize(e){return Promise.resolve({remoteId:e,externalId:void 0})}generateTitle(){throw Error(`Method not implemented.`)}_subscriptions=new Set;subscribe(e){return this._subscriptions.add(e),()=>this._subscriptions.delete(e)}_notifySubscribers(){for(let e of this._subscriptions)e()}},Xa=class{cache=new WeakMap;convertMessages(e,t){return e.map((e,n)=>{let r=t(this.cache.get(e),e,n);return this.cache.set(e,r),r})}},Za=Object.freeze([]),Qa=(e,t)=>{let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0},$a=(e,t)=>e&&t[t.length-1]?.role!==`assistant`,eo=class extends oa{_assistantOptimisticId=null;_capabilities={switchToBranch:!1,switchBranchDuringRun:!1,edit:!1,reload:!1,cancel:!1,unstable_copy:!1,speech:!1,dictation:!1,voice:!1,attachments:!1,feedback:!1,queue:!1};get capabilities(){return this._capabilities}_messages;isDisabled;get isLoading(){return this._store.isLoading??!1}get isRunning(){return this._store.isRunning}_getBaseMessages(){return this._messages}get state(){return this._store.state??super.state}get adapters(){return this._store.adapters}suggestions=[];extras=void 0;_converter=new Xa;_store;beginEdit(e){if(!this._store.onEdit)throw Error(`Runtime does not support editing.`);super.beginEdit(e)}constructor(e,t){super(e),this.__internal_setAdapter(t)}__internal_setAdapter(e){if(this._store===e)return;let t=e.isRunning??!1;this.isDisabled=e.isDisabled??!1;let n=this._store;this._store=e,this.extras!==e.extras&&(this.extras=e.extras);let r=e.suggestions??Za;Qa(this.suggestions,r)||(this.suggestions=r);let i={switchToBranch:this._store.setMessages!==void 0,switchBranchDuringRun:!1,edit:this._store.onEdit!==void 0,reload:this._store.onReload!==void 0,cancel:this._store.onCancel!==void 0,speech:this._store.adapters?.speech!==void 0,dictation:this._store.adapters?.dictation!==void 0,voice:this._store.adapters?.voice!==void 0,unstable_copy:this._store.unstable_capabilities?.copy!==!1,attachments:!!this._store.adapters?.attachments,feedback:!!this._store.adapters?.feedback,queue:!1};Qa(this._capabilities,i)||(this._capabilities=i);let a;if(e.messageRepository){if(n&&n.isRunning===e.isRunning&&n.messageRepository===e.messageRepository){this._notifySubscribers();return}this.repository.clear(),this._assistantOptimisticId=null,this.repository.import(e.messageRepository),a=this.repository.getMessages()}else if(e.messages){if(n){if(n.convertMessage!==e.convertMessage)this._converter=new Xa;else if(n.isRunning===e.isRunning&&n.messages===e.messages){this._notifySubscribers();return}}a=e.convertMessage?this._converter.convertMessages(e.messages,(n,r,i)=>{if(!e.convertMessage)return r;let a=Gi(i===(e.messages?.length??0)-1,t,!1,!1,void 0);if(n&&(n.role!==`assistant`||!Wi(n.status)||n.status===a))return n;let o=qi(e.convertMessage(r,i),i.toString(),a);return da(o,r),o}):e.messages;for(let e=0;e<a.length;e++){let t=a[e],n=a[e-1];this.repository.addOrUpdateMessage(n?.id??null,t)}}else throw Error(`ExternalStoreAdapter must provide either 'messages' or 'messageRepository'`);a.length>0&&this.ensureInitialized(),(n?.isRunning??!1)!==(e.isRunning??!1)&&(e.isRunning?this._notifyEventSubscribers(`runStart`,{}):this._notifyEventSubscribers(`runEnd`,{})),this._assistantOptimisticId&&=(this.repository.deleteMessage(this._assistantOptimisticId),null),$a(t,a)&&(this._assistantOptimisticId=this.repository.appendOptimisticMessage(a.at(-1)?.id??null,{role:`assistant`,content:[]})),this.repository.resetHead(this._assistantOptimisticId??a.at(-1)?.id??null),this._messages=this.repository.getMessages(),this._notifySubscribers()}switchToBranch(e){if(!this._store.setMessages)throw Error(`Runtime does not support switching branches.`);this._store.isRunning||(this.repository.switchToBranch(e),this.updateMessages(this.repository.getMessages()))}async append(e){if(e.parentId!==(this.messages.at(-1)?.id??null)){if(!this._store.onEdit)throw Error(`Runtime does not support editing messages.`);await this._store.onEdit(e)}else await this._store.onNew(e)}async startRun(e){if(!this._store.onReload)throw Error(`Runtime does not support reloading messages.`);await this._store.onReload(e.parentId,e)}async resumeRun(e){if(!this._store.onResume)throw Error(`Runtime does not support resuming runs.`);await this._store.onResume(e)}exportExternalState(){if(!this._store.onExportExternalState)throw Error(`Runtime does not support exporting external states.`);return this._store.onExportExternalState()}importExternalState(e){if(!this._store.onLoadExternalState)throw Error(`Runtime does not support importing external states.`);this._store.onLoadExternalState(e)}cancelRun(){if(!this._store.onCancel)throw Error(`Runtime does not support cancelling runs.`);this._store.onCancel(),this._assistantOptimisticId&&=(this.repository.deleteMessage(this._assistantOptimisticId),null);let e=this.repository.getMessages(),t=e[e.length-1];t?.role===`user`&&t.id===e.at(-1)?.id?(this.repository.deleteMessage(t.id),this.composer.text.trim()||this.composer.setText(Li(t)),e=this.repository.getMessages()):this._notifySubscribers(),setTimeout(()=>{this.updateMessages(e)},0)}addToolResult(e){if(!this._store.onAddToolResult&&!this._store.onAddToolResult)throw Error(`Runtime does not support tool results.`);this._store.onAddToolResult?.(e)}resumeToolCall(e){if(!this._store.onResumeToolCall)throw Error(`Runtime does not support resuming tool calls.`);this._store.onResumeToolCall(e)}reset(e){let t=new Zi;t.import(Ji.fromArray(e??[])),this.updateMessages(t.getMessages())}import(e){this._assistantOptimisticId=null,super.import(e),this._store.onImport&&this._store.onImport(this.repository.getMessages())}updateMessages=e=>{this._store.convertMessage===void 0?this._store.setMessages?.(e):this._store.setMessages?.(e.flatMap(fa))}},to=e=>e.adapters?.threadList??{},no=class extends Ii{threads;constructor(e){super(),this.threads=new Ya(to(e),()=>new eo(this._contextProvider,e))}setAdapter(e){this.threads.__internal_setAdapter(to(e)),this.threads.getMainThreadRuntimeCore().__internal_setAdapter(e)}},ro=e=>{let[t]=(0,A.useState)(()=>new no(e));(0,A.useEffect)(()=>{t.setAdapter(e)});let{modelContext:n}=Ha()??{};return(0,A.useEffect)(()=>{if(n)return t.registerModelContextProvider(n)},[n,t]),(0,A.useMemo)(()=>new za(t),[t])},io=e=>e._core?.RenderComponent,ao=(0,A.memo)(({runtime:e,aui:t=null,children:n})=>{let r=Er({threads:Ba(e)},{parent:t}),i=io(e);return(0,j.jsxs)(nr,{value:r,children:[i&&(0,j.jsx)(i,{}),n]})}),oo=(e,t)=>e.Message===t.Message&&e.EditComposer===t.EditComposer&&e.UserEditComposer===t.UserEditComposer&&e.AssistantEditComposer===t.AssistantEditComposer&&e.SystemEditComposer===t.SystemEditComposer&&e.UserMessage===t.UserMessage&&e.AssistantMessage===t.AssistantMessage&&e.SystemMessage===t.SystemMessage,so=()=>null,co=(e,t,n)=>{switch(t){case`user`:return n?e.UserEditComposer??e.EditComposer??e.UserMessage??e.Message:e.UserMessage??e.Message;case`assistant`:return n?e.AssistantEditComposer??e.EditComposer??e.AssistantMessage??e.Message:e.AssistantMessage??e.Message;case`system`:return n?e.SystemEditComposer??e.EditComposer??e.SystemMessage??e.Message:e.SystemMessage??e.Message??so;default:throw Error(`Unknown message role: ${t}`)}},lo=({components:e})=>(0,j.jsx)(co(e,P(e=>e.message.role),P(e=>e.message.composer.isEditing)),{}),uo=(0,A.memo)(({index:e,components:t})=>(0,j.jsx)(Ci,{index:e,children:(0,j.jsx)(lo,{components:t})}),(e,t)=>e.index===t.index&&oo(e.components,t.components));uo.displayName=`ThreadPrimitive.MessageByIndex`;var fo=({children:e})=>{let t=P(e=>e.thread.messages.length);return(0,A.useMemo)(()=>t===0?null:Array.from({length:t},(t,n)=>(0,j.jsx)(Ci,{index:n,children:(0,j.jsx)(Pr,{getItemState:e=>e.thread().message({index:n}).getState(),children:t=>e({get message(){return t()}})})},n)),[t,e])},po=({components:e,children:t})=>e?(0,j.jsx)(fo,{children:()=>(0,j.jsx)(lo,{components:e})}):(0,j.jsx)(fo,{children:t});po.displayName=`ThreadPrimitive.Messages`;var mo=(0,A.memo)(po,(e,t)=>e.children||t.children?e.children===t.children:oo(e.components,t.components)),ho=e=>{let t=e.message.metadata;if(!(!t||typeof t!=`object`))return t.custom?.quote},go=e=>Symbol.iterator in e,L=e=>`entries`in e,R=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},_o=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function vo(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:go(e)&&go(t)?L(e)&&L(t)?R(e,t):_o(e,t):R({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function yo(e){let t=A.useRef(void 0);return n=>{let r=e(n);return vo(t.current,r)?t.current:t.current=r}}var bo=e=>{let t=-1;return{startGroup:e=>{t===-1&&(t=e)},endGroup:(n,r)=>{t!==-1&&(r.push({type:e,startIndex:t,endIndex:n}),t=-1)},finalize:(n,r)=>{t!==-1&&r.push({type:e,startIndex:t,endIndex:n})}}},xo=(e,t)=>{let n=[];if(t){let t=bo(`chainOfThoughtGroup`);for(let r=0;r<e.length;r++){let i=e[r];i===`tool-call`||i===`reasoning`?t.startGroup(r):(t.endGroup(r-1,n),n.push({type:`single`,index:r}))}t.finalize(e.length-1,n)}else{let t=bo(`toolGroup`),r=bo(`reasoningGroup`);for(let i=0;i<e.length;i++){let a=e[i];a===`tool-call`?(r.endGroup(i-1,n),t.startGroup(i)):a===`reasoning`?(t.endGroup(i-1,n),r.startGroup(i)):(t.endGroup(i-1,n),r.endGroup(i-1,n),n.push({type:`single`,index:i}))}t.finalize(e.length-1,n),r.finalize(e.length-1,n)}return n},So=e=>{let t=P(yo(e=>e.message.parts.map(e=>e.type)));return(0,A.useMemo)(()=>t.length===0?[]:xo(t,e),[t,e])},Co=({Fallback:e,...t})=>{let n=P(n=>{let r=n.tools.tools[t.toolName]??e;return Array.isArray(r)?r[0]??e:r});return n?(0,j.jsx)(n,{...t}):null},wo=(e,t,n)=>e.renderers[t]?.[0]||(e.fallbacks[0]??n),To=({Fallback:e,...t})=>{let n=P(n=>wo(n.dataRenderers,t.name,e));return n?(0,j.jsx)(n,{...t}):null},Eo={Text:()=>null,Reasoning:()=>null,Source:()=>null,Image:()=>null,File:()=>null,Unstable_Audio:()=>null,ToolGroup:({children:e})=>e,ReasoningGroup:({children:e})=>e},Do=({components:{Text:e=Eo.Text,Reasoning:t=Eo.Reasoning,Image:n=Eo.Image,Source:r=Eo.Source,File:i=Eo.File,Unstable_Audio:a=Eo.Unstable_Audio,tools:o={},data:s}={}})=>{let c=Er(),l=P(e=>e.part),u=l.type;if(u===`tool-call`){let e=c.part().addToolResult,t=c.part().resumeToolCall;if(`Override`in o)return(0,j.jsx)(o.Override,{...l,addResult:e,resume:t});let n=o.by_name?.[l.toolName]??o.Fallback;return(0,j.jsx)(Co,{...l,Fallback:n,addResult:e,resume:t})}if(l.status?.type===`requires-action`)throw Error(`Encountered unexpected requires-action status`);switch(u){case`text`:return(0,j.jsx)(e,{...l});case`reasoning`:return(0,j.jsx)(t,{...l});case`source`:return(0,j.jsx)(r,{...l});case`image`:return(0,j.jsx)(n,{...l});case`file`:return(0,j.jsx)(i,{...l});case`audio`:return(0,j.jsx)(a,{...l});case`data`:{let e=s?.by_name?.[l.name]??s?.Fallback;return(0,j.jsx)(To,{...l,Fallback:e})}default:return console.warn(`Unknown message part type: ${u}`),null}},Oo=(0,A.memo)(({index:e,components:t})=>(0,j.jsx)(wi,{index:e,children:(0,j.jsx)(Do,{components:t})}),(e,t)=>e.index===t.index&&e.components?.Text===t.components?.Text&&e.components?.Reasoning===t.components?.Reasoning&&e.components?.Source===t.components?.Source&&e.components?.Image===t.components?.Image&&e.components?.File===t.components?.File&&e.components?.Unstable_Audio===t.components?.Unstable_Audio&&e.components?.tools===t.components?.tools&&e.components?.data===t.components?.data&&e.components?.ToolGroup===t.components?.ToolGroup&&e.components?.ReasoningGroup===t.components?.ReasoningGroup);Oo.displayName=`MessagePrimitive.PartByIndex`;var ko=({status:e,component:t})=>(0,j.jsx)(Ei,{text:``,isRunning:e.type===`running`,children:(0,j.jsx)(t,{type:`text`,text:``,status:e})}),Ao=Object.freeze({type:`complete`}),jo=Object.freeze({type:`running`}),Mo=(0,A.memo)(({components:e})=>{let t=P(e=>e.message.status??Ao);return e?.Empty?(0,j.jsx)(e.Empty,{status:t}):t.type===`running`?(0,j.jsx)(ko,{status:t,component:e?.Text??Eo.Text}):null},(e,t)=>e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),No=(0,A.memo)(({components:e,enabled:t})=>P(e=>{if(!t||e.message.parts.length===0)return!1;let n=e.message.parts[e.message.parts.length-1];return n?.type!==`text`&&n?.type!==`reasoning`})?(0,j.jsx)(Mo,{components:e}):null,(e,t)=>e.enabled===t.enabled&&e.components?.Empty===t.components?.Empty&&e.components?.Text===t.components?.Text),Po=(0,A.memo)(({Quote:e})=>{let t=P(ho);return t?(0,j.jsx)(e,{text:t.text,messageId:t.messageId}):null}),Fo=()=>{let e=Er(),t=P(e=>e.part),n=P(e=>{if(e.part.type!==`tool-call`)return null;let t=e.tools.tools[e.part.toolName];return Array.isArray(t)?t[0]??null:t??null});return!n||t.type!==`tool-call`?null:(0,j.jsx)(n,{...t,addResult:e.part().addToolResult,resume:e.part().resumeToolCall})},Io=()=>{let e=P(e=>e.part),t=P(e=>e.part.type===`data`?wo(e.dataRenderers,e.part.name,void 0)??null:null);return!t||e.type!==`data`?null:(0,j.jsx)(t,{...e})},Lo=()=>{let e=P(e=>e.part.type);return e===`tool-call`?(0,j.jsx)(Fo,{}):e===`data`?(0,j.jsx)(Io,{}):null},Ro=Object.freeze({type:`text`,text:``,status:jo}),zo=({index:e,children:t})=>{let n=Er(),r=P(e=>e.dataRenderers);return(0,j.jsx)(wi,{index:e,children:(0,j.jsx)(Pr,{getItemState:t=>t.message().part({index:e}).getState(),children:i=>t({get part(){let t=i();if(t.type===`tool-call`){let r=n.tools().getState().tools[t.toolName],i=Array.isArray(r)?!!r[0]:!!r,a=n.message().part({index:e});return{...t,toolUI:i?(0,j.jsx)(Fo,{}):null,addResult:a.addToolResult,resume:a.resumeToolCall}}if(t.type===`data`){let e=wo(r,t.name,void 0)!==void 0;return{...t,dataRendererUI:e?(0,j.jsx)(Io,{}):null}}return t}})})})},Bo=({children:e})=>{let t=P(e=>e.message.parts.length),n=P(e=>(e.message.status?.type??`complete`)===`running`);return t===0?t===0&&n?(0,j.jsx)(Ei,{text:``,isRunning:!0,children:e({part:Ro})}):null:(0,j.jsx)(j.Fragment,{children:Array.from({length:t},(t,n)=>(0,j.jsx)(zo,{index:n,children:t=>e(t)??(0,j.jsx)(Lo,{})},n))})},Vo=({components:e,unstable_showEmptyOnNonTextEnd:t=!0,children:n})=>n?(0,j.jsx)(Bo,{children:n}):(0,j.jsx)(Ho,{components:e,unstable_showEmptyOnNonTextEnd:t});Vo.displayName=`MessagePrimitive.Parts`;var Ho=({components:e,unstable_showEmptyOnNonTextEnd:t})=>{let n=P(e=>e.message.parts.length),r=So(!!e?.ChainOfThought),i=(0,A.useMemo)(()=>n===0?(0,j.jsx)(Mo,{components:e}):r.map(t=>{if(t.type===`single`)return(0,j.jsx)(Oo,{index:t.index,components:e},t.index);if(t.type===`chainOfThoughtGroup`){let n=e?.ChainOfThought;return n?(0,j.jsx)(Di,{startIndex:t.startIndex,endIndex:t.endIndex,children:(0,j.jsx)(n,{})},`chainOfThought-${t.startIndex}`):null}else if(t.type===`toolGroup`)return(0,j.jsx)(e?.ToolGroup??Eo.ToolGroup,{startIndex:t.startIndex,endIndex:t.endIndex,children:Array.from({length:t.endIndex-t.startIndex+1},(n,r)=>(0,j.jsx)(Oo,{index:t.startIndex+r,components:e},r))},`tool-${t.startIndex}`);else return(0,j.jsx)(e?.ReasoningGroup??Eo.ReasoningGroup,{startIndex:t.startIndex,endIndex:t.endIndex,children:Array.from({length:t.endIndex-t.startIndex+1},(n,r)=>(0,j.jsx)(Oo,{index:t.startIndex+r,components:e},r))},`reasoning-${t.startIndex}`)}),[r,e,n]);return(0,j.jsxs)(j.Fragment,{children:[e?.Quote&&(0,j.jsx)(Po,{Quote:e.Quote}),i,(0,j.jsx)(No,{components:e,enabled:t})]})},Uo=()=>{let e=Er(),t=P(e=>e.thread.isRunning&&!e.thread.capabilities.queue||!e.composer.isEditing||e.composer.isEmpty);return{send:(0,A.useCallback)(t=>{e.composer().send(t)},[e]),disabled:t}},Wo=e=>{let t=new Map,n=()=>{let n=0;for(let e of t.values())n+=e;e(n)};return{register:()=>{let e=Symbol();return t.set(e,0),{setHeight:r=>{t.get(e)!==r&&(t.set(e,r),n())},unregister:()=>{t.delete(e),n()}}}}},Go=(e={})=>{let t=new Set,n=Wo(e=>{a.setState({height:{...a.getState().height,viewport:e}})}),r=Wo(e=>{a.setState({height:{...a.getState().height,inset:e}})}),i=(e,t)=>(a.setState({element:{...a.getState().element,[e]:t}}),()=>{a.getState().element[e]===t&&a.setState({element:{...a.getState().element,[e]:null}})}),a=Ur(()=>({isAtBottom:!0,scrollToBottom:({behavior:e=`auto`}={})=>{for(let n of t)n({behavior:e})},onScrollToBottom:e=>(t.add(e),()=>{t.delete(e)}),turnAnchor:e.turnAnchor??`bottom`,topAnchorMessageClamp:{tallerThan:e.topAnchorMessageClamp?.tallerThan??`10em`,visibleHeight:e.topAnchorMessageClamp?.visibleHeight??`6em`},height:{viewport:0,inset:0},element:{viewport:null,anchor:null,target:null},targetConfig:null,topAnchorTurn:null,registerViewport:n.register,registerContentInset:r.register,registerViewportElement:e=>i(`viewport`,e),registerAnchorElement:e=>i(`anchor`,e),registerAnchorTargetElement:(e,t)=>(a.setState({element:{...a.getState().element,target:e},targetConfig:e&&t?t:null}),()=>{a.getState().element.target===e&&a.setState({element:{...a.getState().element,target:null},targetConfig:null})}),setTopAnchorTurn:e=>{a.setState({topAnchorTurn:e})}}));return a};function Ko(e,t){function n(n){let r=(0,A.useContext)(e);if(!n?.optional&&!r)throw Error(`This component must be used within ${t}.`);return r}return n}function qo(e,t){function n(n){let r=e(n);return r?r[t]:null}function r(e){let t=!1,r;typeof e==`function`?r=e:e&&typeof e==`object`&&(t=!!e.optional,r=e.selector);let i=n({optional:t});return i?r?i(r):i():null}return{[t]:r,[`${t}Store`]:n}}var Jo=(0,A.createContext)(null),{useThreadViewport:Yo,useThreadViewportStore:Xo}=qo(Ko(Jo,`ThreadPrimitive.Viewport`),`useThreadViewport`),Zo=e=>e,Qo=e=>{let t=Xo({optional:!0}),[n]=(0,A.useState)(()=>Go(e));return(0,A.useEffect)(()=>t?.getState().onScrollToBottom(()=>{n.getState().scrollToBottom()}),[t,n]),(0,A.useEffect)(()=>{if(t)return n.subscribe(e=>{t.getState().isAtBottom!==e.isAtBottom&&Zo(t).setState({isAtBottom:e.isAtBottom})})},[n,t]),n},$o=({children:e,options:t={}})=>{let n=Qo(t),[r]=(0,A.useState)(()=>({useThreadViewport:n}));return(0,j.jsx)(Jo.Provider,{value:r,children:e})},es=()=>((0,A.useEffect)(()=>{},[Er()]),null),ts=(0,A.memo)(({children:e,aui:t,runtime:n})=>(0,j.jsxs)(ao,{runtime:n,aui:t??null,children:[(0,j.jsx)(es,{}),(0,j.jsx)($o,{children:e})]}));function ns(e){let t=Er(),n=P(()=>t.thread.source?t.thread().__internal_getRuntime?.()??null:null);if(!n&&!e?.optional)throw Error(`ThreadRuntime is not available`);return n}function rs(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function is(...e){return t=>{let n=!1,r=e.map(e=>{let r=rs(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():rs(e[t],null)}}}}function as(...e){return A.useCallback(is(...e),e)}var os=Symbol.for(`react.lazy`),ss=A.use;function cs(e){return typeof e==`object`&&!!e&&`then`in e}function ls(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===os&&`_payload`in e&&cs(e._payload)}function us(e){let t=ds(e),n=A.forwardRef((e,n)=>{let{children:r,...i}=e;ls(r)&&typeof ss==`function`&&(r=ss(r._payload));let a=A.Children.toArray(r),o=a.find(ps);if(o){let e=o.props.children,r=a.map(t=>t===o?A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null:t);return(0,j.jsx)(t,{...i,ref:n,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,j.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function ds(e){let t=A.forwardRef((e,t)=>{let{children:n,...r}=e;if(ls(n)&&typeof ss==`function`&&(n=ss(n._payload)),A.isValidElement(n)){let e=hs(n),i=ms(r,n.props);return n.type!==A.Fragment&&(i.ref=t?is(t,e):e),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fs=Symbol(`radix.slottable`);function ps(e){return A.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===fs}function ms(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function hs(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}je();var gs=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=us(`Primitive.${t}`),r=A.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,j.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),_s=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`];function vs(e){let t=(0,A.forwardRef)(({render:t,asChild:n,children:r,...i},a)=>{let o=e;if(t&&(0,A.isValidElement)(t)){let e=r===void 0?t.props.children:r;return(0,j.jsx)(o,{...i,asChild:!0,ref:a,children:(0,A.cloneElement)(t,void 0,e)})}return(0,j.jsx)(o,{...i,asChild:n,ref:a,children:r})});return t.displayName=typeof e==`string`?e:e.displayName??e.name??`Component`,t}function ys(e){let t=gs[e],n=vs(t);return n.displayName=`Primitive.${e}`,n}var bs=_s.reduce((e,t)=>(e[t]=ys(t),e),{});typeof window<`u`&&window.document&&window.document.createElement;function xs(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Ss=(e,t,n=[])=>{let r=(0,A.forwardRef)((e,r)=>{let i={},a={};Object.keys(e).forEach(t=>{n.includes(t)?i[t]=e[t]:a[t]=e[t]});let o=t(i)??void 0;return(0,j.jsx)(bs.button,{...a,type:`button`,ref:r,disabled:a.disabled||!o,onClick:xs(a.onClick,o)})});return r.displayName=e,r};function Cs(e){let t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...e)=>t.current?.(...e),[])}function ws(e,t=globalThis?.document){let n=Cs(e);A.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}function Ts(e){let t=Ds(e),n=A.forwardRef((e,n)=>{let{children:r,...i}=e,a=A.Children.toArray(r),o=a.find(ks);if(o){let e=o.props.children,r=a.map(t=>t===o?A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null:t);return(0,j.jsx)(t,{...i,ref:n,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,j.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Es=Ts(`Slot`);function Ds(e){let t=A.forwardRef((e,t)=>{let{children:n,...r}=e;if(A.isValidElement(n)){let e=js(n),i=As(r,n.props);return n.type!==A.Fragment&&(i.ref=t?is(t,e):e),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Os=Symbol(`radix.slottable`);function ks(e){return A.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Os}function As(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function js(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ms=()=>{let{disabled:e,send:t}=Uo(),n=(0,A.useCallback)(()=>t(),[t]);return e?null:n},Ns=Ss(`ComposerPrimitive.Send`,Ms),Ps=(0,A.forwardRef)(({onSubmit:e,...t},n)=>{let r=Ms(),i=e=>{e.preventDefault(),r&&r()};return(0,j.jsx)(bs.form,{...t,ref:n,onSubmit:xs(e,i)})});Ps.displayName=`ComposerPrimitive.Root`;function Fs(){return Fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fs.apply(null,arguments)}function Is(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ls=A.useLayoutEffect,Rs=function(e){var t=A.useRef(e);return Ls(function(){t.current=e}),t},zs=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},Bs=function(e,t){var n=A.useRef();return A.useCallback(function(r){e.current=r,n.current&&zs(n.current,null),n.current=t,t&&zs(t,r)},[t])},Vs={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},Hs=function(e){Object.keys(Vs).forEach(function(t){e.style.setProperty(t,Vs[t],`important`)})},Us=null,Ws=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function Gs(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Us||(Us=document.createElement(`textarea`),Us.setAttribute(`tabindex`,`-1`),Us.setAttribute(`aria-hidden`,`true`),Hs(Us)),Us.parentNode===null&&document.body.appendChild(Us);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;Us.style[t]=o[t]}),Hs(Us),Us.value=t;var c=Ws(Us,e);Us.value=t,c=Ws(Us,e),Us.value=`x`;var l=Us.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var Ks=function(){},qs=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},Js=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Ys=!!document.documentElement.currentStyle,Xs=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=qs(Js,t),r=n.boxSizing;return r===``?null:(Ys&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function Zs(e,t,n){var r=Rs(n);A.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var Qs=function(e,t){Zs(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},$s=function(e){Zs(window,`resize`,e)},ec=function(e){Zs(document.fonts,`loadingdone`,e)},tc=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],nc=A.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Ks:a,s=e.onHeightChange,c=s===void 0?Ks:s,l=Is(e,tc),u=l.value!==void 0,d=A.useRef(null),f=Bs(d,t),p=A.useRef(0),m=A.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Xs(e);if(t){m.current=t;var a=Gs(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return A.useLayoutEffect(h),Qs(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),$s(h),ec(h),A.createElement(`textarea`,Fs({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),rc=e=>{let t=Cs(e),n=Yo(e=>e.onScrollToBottom);(0,A.useEffect)(()=>n(t),[n,t])},ic=(0,A.createContext)(null),ac=()=>(0,A.useContext)(ic),oc=(0,A.forwardRef)(({autoFocus:e=!1,asChild:t,render:n,disabled:r,onChange:i,onKeyDown:a,onPaste:o,onSelect:s,submitOnEnter:c,submitMode:l,cancelOnEscape:u=!0,unstable_focusOnRunStart:d=!0,unstable_focusOnScrollToBottom:f=!0,unstable_focusOnThreadSwitched:p=!0,addAttachmentOnPaste:m=!0,...h},g)=>{let _=Er(),v=ac(),y=l??(c===!1?`none`:`enter`),b=P(e=>e.composer.isEditing?e.composer.text:``),x=P(e=>e.thread.isDisabled||e.composer.dictation?.inputDisabled)||r,S=(0,A.useRef)(null),C=as(g,S),w=(0,A.useRef)(!1);ws(e=>{if(!S.current?.contains(e.target))return;if(v){for(let t of v.getPlugins())if(t.handleKeyDown(e))return}if(!u)return;let t=_.composer();t.getState().canCancel&&(t.cancel(),e.preventDefault())});let T=e=>{if(!x&&!e.nativeEvent.isComposing){if(v){for(let t of v.getPlugins())if(t.handleKeyDown(e))return}if(e.key===`Enter`){let t=_.thread().getState(),n=t.capabilities.queue;if(e.shiftKey&&(e.ctrlKey||e.metaKey)&&n&&y!==`none`&&!_.composer().getState().isEmpty){e.preventDefault(),_.composer().send({steer:!0});return}if(e.shiftKey||t.isRunning&&!n)return;let r=!1;y===`ctrlEnter`?r=e.ctrlKey||e.metaKey:y===`enter`&&(r=!0),r&&(e.preventDefault(),S.current?.closest(`form`)?.requestSubmit())}}},E=async e=>{if(!m)return;let t=_.thread().getState().capabilities,n=Array.from(e.clipboardData?.files||[]);if(t.attachments&&n.length>0)try{e.preventDefault(),await Promise.all(n.map(e=>_.composer().addAttachment(e)))}catch(e){console.error(`Error adding attachment:`,e)}},ee=e&&!x,D=(0,A.useCallback)(()=>{let e=S.current;!e||!ee||(e.focus({preventScroll:!0}),e.setSelectionRange(e.value.length,e.value.length))},[ee]);(0,A.useEffect)(()=>D(),[D]),rc(()=>{_.composer().getState().type===`thread`&&f&&D()}),(0,A.useEffect)(()=>{if(!(_.composer().getState().type!==`thread`||!d))return _.on(`thread.runStart`,D)},[d,D,_]),(0,A.useEffect)(()=>{if(!(_.composer().getState().type!==`thread`||!p))return _.on(`threadListItem.switchedTo`,D)},[p,D,_]);let te={name:`input`,value:b,...h,ref:C,disabled:x,onChange:xs(i,e=>{if(!_.composer().getState().isEditing)return;let t=e.nativeEvent.isComposing===!0;w.current&&!t&&(w.current=!1);let n=t||w.current;if(Cn(()=>{_.composer().setText(e.target.value)}),n)return;let r=e.target.selectionStart??e.target.value.length;if(v)for(let e of v.getPlugins())e.setCursorPosition(r)}),onKeyDown:xs(a,T),onCompositionStart:xs(h.onCompositionStart,()=>{w.current=!0}),onCompositionEnd:xs(h.onCompositionEnd,e=>{if(w.current=!1,!_.composer().getState().isEditing)return;let t=e.target;Cn(()=>{_.composer().setText(t.value)});let n=t.selectionStart??t.value.length;if(v)for(let e of v.getPlugins())e.setCursorPosition(n)}),onSelect:xs(s,e=>{if(w.current)return;let t=e.target,n=t.selectionStart??t.value.length;if(v)for(let e of v.getPlugins())e.setCursorPosition(n)}),onPaste:xs(o,E)};if(n&&(0,A.isValidElement)(n)){let e=h.children===void 0?n.props.children:h.children;return(0,j.jsx)(Es,{...te,children:(0,A.cloneElement)(n,void 0,e)})}return(0,j.jsx)(t?Es:nc,{...te})});oc.displayName=`ComposerPrimitive.Input`;var sc=()=>P(e=>{if(e.part.type!==`text`&&e.part.type!==`reasoning`)throw Error(`MessagePartText can only be used inside text or reasoning message parts.`);return e.part}),cc=(0,A.createContext)(null);function lc(e){let t=(0,A.useContext)(cc);if(!e?.optional&&!t)throw Error(`This component must be used within a SmoothContextProvider.`);return t}var{useSmoothStatus:uc,useSmoothStatusStore:dc}=qo(lc,`useSmoothStatus`),fc=class{currentText;setText;animationFrameId=null;lastUpdateTime=Date.now();targetText=``;constructor(e,t){this.currentText=e,this.setText=t}start(){this.animationFrameId===null&&(this.lastUpdateTime=Date.now(),this.animate())}stop(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}animate=()=>{let e=Date.now(),t=e-this.lastUpdateTime,n=this.targetText.length-this.currentText.length,r=Math.min(5,250/n),i=0;for(;t>=r&&i<n;)i++,t-=r;i===n?this.animationFrameId=null:this.animationFrameId=requestAnimationFrame(this.animate),i!==0&&(this.currentText=this.targetText.slice(0,this.currentText.length+i),this.lastUpdateTime=e-t,this.setText(this.currentText))}},pc=Object.freeze({type:`running`}),mc=(e,t=!1)=>{let{text:n}=e,r=P(e=>e.message.id),i=(0,A.useRef)(r),[a,o]=(0,A.useState)(e.status.type===`running`?``:n),s=dc({optional:!0}),c=Cs(t=>{if(o(t),s){let n=a!==t||e.status.type===`running`?pc:e.status;Zo(s).setState(n,!0)}});(0,A.useEffect)(()=>{if(s){let r=t&&(a!==n||e.status.type===`running`)?pc:e.status;Zo(s).setState(r,!0)}},[s,t,n,a,e.status]);let[l]=(0,A.useState)(new fc(a,c));return(0,A.useEffect)(()=>{if(!t){l.stop();return}if(i.current!==r||!n.startsWith(l.targetText)){i.current=r,e.status.type===`running`?(c(``),l.currentText=``,l.targetText=n,l.start()):(c(n),l.currentText=n,l.targetText=n,l.stop());return}l.targetText=n,l.start()},[c,l,r,t,n,e.status.type]),(0,A.useEffect)(()=>()=>{l.stop()},[l]),(0,A.useMemo)(()=>t?{type:`text`,text:a,status:n===a?e.status:pc}:e,[t,a,e,n])},hc=(0,A.forwardRef)(({smooth:e=!0,component:t=`span`,...n},r)=>{let{text:i,status:a}=mc(sc(),e);return(0,j.jsx)(t,{"data-status":a.type,...n,ref:r,children:i})});hc.displayName=`MessagePartPrimitive.Text`;var gc=()=>P(e=>{if(e.part.type!==`image`)throw Error(`MessagePartImage can only be used inside image message parts.`);return e.part}),_c=(0,A.forwardRef)((e,t)=>{let{image:n}=gc();return(0,j.jsx)(bs.img,{src:n,...e,ref:t})});_c.displayName=`MessagePartPrimitive.Image`;var vc=({children:e})=>P(e=>e.part.status.type===`running`)?e:null;vc.displayName=`MessagePartPrimitive.InProgress`;var yc=e=>{let t=(0,A.useRef)(void 0);return(0,A.useCallback)(n=>{t.current&&=(t.current(),void 0),n&&(t.current=e(n))},[e])},bc=e=>e.dataset.messageId,xc=()=>{let e=document.createElement(`div`);return e.dataset.auiTopAnchorReserve=``,e.style.height=`0px`,e.style.flexShrink=`0`,e.style.pointerEvents=`none`,e.setAttribute(`aria-hidden`,`true`),e},Sc=(e,t)=>{let n=`${t}px`;return e.style.height===n?!1:(e.style.height=n,!0)},Cc=e=>{let t=window.devicePixelRatio||1;return Math.round(e*t)/t},wc={...Eo,Text:()=>(0,j.jsxs)(`p`,{style:{whiteSpace:`pre-line`},children:[(0,j.jsx)(hc,{}),(0,j.jsx)(vc,{children:(0,j.jsx)(`span`,{style:{fontFamily:`revert`},children:` ●`})})]}),Image:()=>(0,j.jsx)(_c,{})},Tc=e=>{if(`children`in e)return(0,j.jsx)(Vo,{children:e.children});let{components:t,...n}=e;return(0,j.jsx)(Vo,{components:t?{Text:t.Text??wc.Text,Image:t.Image??wc.Image,Reasoning:t.Reasoning??Eo.Reasoning,Source:t.Source??Eo.Source,File:t.File??Eo.File,Unstable_Audio:t.Unstable_Audio??Eo.Unstable_Audio,...`ChainOfThought`in t?{ChainOfThought:t.ChainOfThought}:{tools:t.tools,data:t.data,ToolGroup:t.ToolGroup??Eo.ToolGroup,ReasoningGroup:t.ReasoningGroup??Eo.ReasoningGroup},Empty:t.Empty,Quote:t.Quote}:wc,...n})};Tc.displayName=`MessagePrimitive.Parts`;var Ec=(0,A.forwardRef)((e,t)=>(0,j.jsx)(bs.div,{...e,ref:t}));Ec.displayName=`ThreadPrimitive.Root`;var Dc=({children:e})=>P(e=>e.thread.isEmpty)?e:null;Dc.displayName=`ThreadPrimitive.Empty`;var Oc=e=>P(t=>!(e.empty===!0&&!t.thread.isEmpty||e.empty===!1&&t.thread.isEmpty||e.running===!0&&!t.thread.isRunning||e.running===!1&&t.thread.isRunning||e.disabled===!0&&!t.thread.isDisabled||e.disabled===!1&&t.thread.isDisabled)),kc=({children:e,...t})=>Oc(t)?e:null;kc.displayName=`ThreadPrimitive.If`;var Ac=e=>{let t=Cs(e);return yc((0,A.useCallback)(e=>{let n=new ResizeObserver(()=>{t()}),r=new MutationObserver(e=>{e.some(e=>e.type!==`attributes`||e.attributeName!==`style`)&&t()});return n.observe(e),r.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),()=>{n.disconnect(),r.disconnect()}},[t]))},jc=({autoScroll:e,scrollToBottomOnRunStart:t=!0,scrollToBottomOnInitialize:n=!0,scrollToBottomOnThreadSwitch:r=!0})=>{let i=(0,A.useRef)(null),a=Xo();e===void 0&&(e=a.getState().turnAnchor!==`top`);let o=(0,A.useRef)(0),s=(0,A.useRef)(null),c=(0,A.useCallback)(e=>{let t=i.current;t&&(s.current=e,t.scrollTo({top:t.scrollHeight,behavior:e}))},[]),l=(0,A.useCallback)(()=>{let e=a.getState();return e.turnAnchor===`top`&&e.element.viewport===i.current&&e.element.anchor!==null},[a]),u=()=>{let e=i.current;if(!e)return;let t=a.getState().isAtBottom,n=Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)<1||e.scrollHeight<=e.clientHeight;!n&&o.current<e.scrollTop||(n&&(s.current=null),(n||s.current===null)&&n!==t&&Zo(a).setState({isAtBottom:n})),o.current=e.scrollTop},d=Ac(()=>{let t=s.current;t&&l()?s.current=null:t?c(t):e&&a.getState().isAtBottom&&c(`instant`),u()}),f=yc(e=>(e.addEventListener(`scroll`,u),()=>{e.removeEventListener(`scroll`,u)}));return rc(({behavior:e})=>{c(e)}),jr(`thread.runStart`,()=>{t&&a.getState().turnAnchor!==`top`&&(s.current=`auto`,requestAnimationFrame(()=>{c(`auto`)}))}),jr(`thread.initialize`,()=>{n&&(s.current=`instant`,requestAnimationFrame(()=>{c(`instant`)}))}),jr(`threadListItem.switchedTo`,()=>{r&&(s.current=`instant`,requestAnimationFrame(()=>{c(`instant`)}))}),as(d,f,i)},Mc=(e,t)=>yc((0,A.useCallback)(n=>{if(!e)return;let r=e(),i=()=>{let e=t?t(n):n.offsetHeight;r.setHeight(e)},a=new ResizeObserver(i);return a.observe(n),i(),()=>{a.disconnect(),r.unregister()}},[e,t])),Nc=e=>{let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t},Pc=(e,t)=>{let n=0,r=e;for(;r&&r!==t;)n+=r.offsetTop,r=r.offsetParent;return r===t?n:Nc(e)-Nc(t)},Fc=({viewport:e,anchor:t,tallerThan:n,visibleHeight:r})=>{let i=Pc(t,e),a=t.offsetHeight;return i+Math.max(0,a-(a<=n?a:r))},Ic=({scrollHeight:e,...t})=>{let{viewport:n}=t,r=Fc(t)+n.clientHeight;return Math.max(0,r-e)},Lc=({viewport:e,reserve:t,...n})=>Ic({viewport:e,...n,scrollHeight:e.scrollHeight-t.offsetHeight}),Rc=e=>{let t=new ResizeObserver(e),n=new MutationObserver(e),r=null,i=null,a=null,o=()=>{t.disconnect(),n.disconnect(),r=null,i=null,a=null};return{target:(e,s,c)=>{r===e&&i===s&&a===c||(o(),t.observe(e),t.observe(s),t.observe(c),n.observe(c,{childList:!0,subtree:!0,characterData:!0}),r=e,i=s,a=c)},disconnect:o}},zc=e=>{let t=null;return{schedule:()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))},cancel:()=>{t!==null&&(cancelAnimationFrame(t),t=null)}}},Bc=e=>{let t=null,n;function r(){let r=e.getState(),{viewport:o,anchor:s,target:c}=r.element,l=r.targetConfig;if(r.turnAnchor!==`top`||!o||!s||!c||!l){a.disconnect(),t&&(Sc(t,0),t.remove());return}if(t??=xc(),(t.parentElement!==c.parentElement||t.previousElementSibling!==c)&&c.after(t),a.target(o,s,c),Sc(t,Lc({viewport:o,anchor:s,reserve:t,...l}))){i.schedule();return}let u=bc(s);if(u!==void 0&&n===u)return;let d=Cc(Fc({viewport:o,anchor:s,...l}));Math.abs(o.scrollTop-d)>1&&o.scrollTo({top:d,behavior:`smooth`}),u!==void 0&&(n=u)}let i=zc(r),a=Rc(i.schedule);i.schedule();let o=e.subscribe(i.schedule);return()=>{i.cancel(),o(),a.disconnect(),t?.remove()}},Vc=e=>{let t=Xo();(0,A.useLayoutEffect)(()=>{if(e)return Bc(t)},[e,t])},Hc=({isRunning:e,messages:t})=>{if(!e)return null;let n=t.at(-1),r=t.at(-2);return r?.role!==`user`||n?.role!==`assistant`?null:{anchorId:r.id,targetId:n.id}},Uc=e=>Hc(e)?.anchorId,Wc=e=>Hc(e)?.targetId,Gc=()=>Mc(Yo(e=>e.registerViewport),(0,A.useCallback)(e=>e.clientHeight,[])),Kc=()=>yc(Yo(e=>e.registerViewportElement)),qc=e=>{let t=Xo(),n=P(t=>{if(e)return Uc(t.thread)}),r=P(t=>{if(e)return Wc(t.thread)}),i=(0,A.useMemo)(()=>!n||!r?null:{anchorId:n,targetId:r},[n,r]);(0,A.useLayoutEffect)(()=>{if(!i)return;let e=t.getState(),n=e.topAnchorTurn;n?.anchorId===i.anchorId&&n.targetId===i.targetId||e.setTopAnchorTurn(i)},[i,t]);let a=(0,A.useCallback)(()=>{t.getState().setTopAnchorTurn(null)},[t]);jr(`thread.initialize`,a),jr(`threadListItem.switchedTo`,a)},Jc=(0,A.forwardRef)(({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:n,scrollToBottomOnThreadSwitch:r,children:i,...a},o)=>{let s=jc({autoScroll:e,scrollToBottomOnRunStart:t,scrollToBottomOnInitialize:n,scrollToBottomOnThreadSwitch:r}),c=Gc(),l=Kc(),u=Xo().getState().turnAnchor===`top`;qc(u),Vc(u);let d=as(o,s,c,l);return(0,j.jsx)(bs.div,{...a,ref:d,children:i})});Jc.displayName=`ThreadPrimitive.ViewportScrollable`;var Yc=(0,A.forwardRef)(({turnAnchor:e,topAnchorMessageClamp:t,...n},r)=>(0,j.jsx)($o,{options:{turnAnchor:e,topAnchorMessageClamp:t},children:(0,j.jsx)(Jc,{...n,ref:r})}));Yc.displayName=`ThreadPrimitive.Viewport`;function Xc(e){let t=e.role===`tool`?`system`:e.role,n=e.content.map(Qc),r=t===`system`?[Zc(n)]:n;return{id:e.id,role:t,content:r,createdAt:new Date(e.createdAt)}}function Zc(e){if(e.length===0)return{type:`text`,text:``};let t=[];for(let n of e)n.type===`text`||n.type===`reasoning`?t.push(n.text):n.type===`tool-call`?t.push(`[tool-call ${n.toolName}] ${n.argsText??``}`):t.push(JSON.stringify(n));return{type:`text`,text:t.join(`
13
-
14
- `)}}function Qc(e){if(e.type===`text`)return{type:`text`,text:e.text};if(e.type===`thinking`)return{type:`reasoning`,text:e.thinking};if(e.type===`tool_use`){let t=el(e.input);return{type:`tool-call`,toolCallId:e.id,toolName:e.name,args:t,argsText:$c(e.input)}}return e.type===`tool_result`?{type:`text`,text:e.is_error?`[tool error] ${e.content}`:`[tool result] ${e.content}`}:{type:`text`,text:JSON.stringify(e)}}function $c(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function el(e){if(typeof e!=`object`||!e||Array.isArray(e))return{};try{let t=JSON.parse(JSON.stringify(e));return typeof t!=`object`||!t||Array.isArray(t)?{}:t}catch{return{}}}var tl=new Set([`pending`,`running`,`paused`]);function nl(e){let{agentName:t}=e,n=e.conversationId??null,[r,i]=(0,A.useState)(n),[a,o]=(0,A.useState)([]),[s,c]=(0,A.useState)(null),[l,u]=(0,A.useState)(null),[d,f]=(0,A.useState)(null),[p,m]=(0,A.useState)(n!==null),h=(0,A.useRef)(e.onConversationIdChange);h.current=e.onConversationIdChange;let g=(0,A.useCallback)(e=>{i(t=>t===e?t:(h.current?.(e),e))},[]),_=l!==null&&tl.has(l);(0,A.useEffect)(()=>{let e=!1;if(f(null),!n){g(null),o([]),c(null),u(null),m(!1);return}return m(!0),(async()=>{try{let t=await Be(n);if(e)return;g(t.conversation.id),o(t.messages),c(null),u(null)}catch(t){if(e||t instanceof Fe&&t.status===401)return;f(t instanceof Error?t:Error(String(t)))}finally{e||m(!1)}})(),()=>{e=!0}},[n,g]),(0,A.useEffect)(()=>{if(r)return rt(r,{onMessage:e=>{o(t=>t.some(t=>t.id===e.id)?t:[...t.filter(e=>!e.id.startsWith(`local-`)),e])},onStatus:(e,t)=>{c(t=>t??e),u(e=>e===null||e!==null?t:e)},onRunCreated:e=>{c(e),u(`pending`)},onError:()=>{}})},[r]);let v=(0,A.useCallback)(()=>{g(null),o([]),c(null),u(null),f(null)},[g]),y=(0,A.useCallback)(async e=>{let n=rl(e.content);if(n.trim()){if(!t){f(Error(`no agent selected`));return}f(null);try{let e=r;e||(e=(await ze({agentName:t})).conversation.id,g(e));let i=await Ve(e,{input:n});c(i.runId),u(i.status)}catch(e){f(e instanceof Error?e:Error(String(e)))}}},[t,r,g]),b=(0,A.useCallback)(async()=>{if(s){f(null);try{await Ue(s)}catch(e){f(e instanceof Error?e:Error(String(e)))}}},[s]);return{runtime:ro({messages:(0,A.useMemo)(()=>il(a,_),[a,_]),isRunning:_,convertMessage:Xc,onNew:y,onCancel:b}),conversationId:r,activeRunId:s,status:l,isRunning:_,error:d,hydrating:p,reset:v}}function rl(e){let t=[];for(let n of e)n.type===`text`&&typeof n.text==`string`&&t.push(n.text);return t.join(`
15
- `)}function il(e,t){if(!t||e.length===0)return e;let n=e[e.length-1];return!n||n.role===`assistant`?e:[...e,{id:`local-thinking-${n.id}`,role:`assistant`,content:[{type:`text`,text:`thinking`}],createdAt:new Date().toISOString()}]}function al(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ol=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cl={};function ll(e,t){return((t||cl).jsx?sl:ol).test(e)}var ul=/[ \t\n\f\r]/g;function dl(e){return typeof e==`object`?e.type===`text`?fl(e.value):!1:fl(e)}function fl(e){return e.replace(ul,``)===``}var pl=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};pl.prototype.normal={},pl.prototype.property={},pl.prototype.space=void 0;function ml(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new pl(n,r,t)}function hl(e){return e.toLowerCase()}var gl=class{constructor(e,t){this.attribute=t,this.property=e}};gl.prototype.attribute=``,gl.prototype.booleanish=!1,gl.prototype.boolean=!1,gl.prototype.commaOrSpaceSeparated=!1,gl.prototype.commaSeparated=!1,gl.prototype.defined=!1,gl.prototype.mustUseProperty=!1,gl.prototype.number=!1,gl.prototype.overloadedBoolean=!1,gl.prototype.property=``,gl.prototype.spaceSeparated=!1,gl.prototype.space=void 0;var _l=t({boolean:()=>z,booleanish:()=>yl,commaOrSpaceSeparated:()=>Sl,commaSeparated:()=>xl,number:()=>B,overloadedBoolean:()=>bl,spaceSeparated:()=>V}),vl=0,z=Cl(),yl=Cl(),bl=Cl(),B=Cl(),V=Cl(),xl=Cl(),Sl=Cl();function Cl(){return 2**++vl}var wl=Object.keys(_l),Tl=class extends gl{constructor(e,t,n,r){let i=-1;if(super(e,t),El(this,`space`,r),typeof n==`number`)for(;++i<wl.length;){let e=wl[i];El(this,wl[i],(n&_l[e])===_l[e])}}};Tl.prototype.defined=!0;function El(e,t,n){n&&(e[t]=n)}function Dl(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Tl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hl(r)]=r,n[hl(a.attribute)]=r}return new pl(t,n,e.space)}var Ol=Dl({properties:{ariaActiveDescendant:null,ariaAtomic:yl,ariaAutoComplete:null,ariaBusy:yl,ariaChecked:yl,ariaColCount:B,ariaColIndex:B,ariaColSpan:B,ariaControls:V,ariaCurrent:null,ariaDescribedBy:V,ariaDetails:null,ariaDisabled:yl,ariaDropEffect:V,ariaErrorMessage:null,ariaExpanded:yl,ariaFlowTo:V,ariaGrabbed:yl,ariaHasPopup:null,ariaHidden:yl,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:V,ariaLevel:B,ariaLive:null,ariaModal:yl,ariaMultiLine:yl,ariaMultiSelectable:yl,ariaOrientation:null,ariaOwns:V,ariaPlaceholder:null,ariaPosInSet:B,ariaPressed:yl,ariaReadOnly:yl,ariaRelevant:null,ariaRequired:yl,ariaRoleDescription:V,ariaRowCount:B,ariaRowIndex:B,ariaRowSpan:B,ariaSelected:yl,ariaSetSize:B,ariaSort:null,ariaValueMax:B,ariaValueMin:B,ariaValueNow:B,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function kl(e,t){return t in e?e[t]:t}function Al(e,t){return kl(e,t.toLowerCase())}var jl=Dl({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:xl,acceptCharset:V,accessKey:V,action:null,allow:null,allowFullScreen:z,allowPaymentRequest:z,allowUserMedia:z,alt:null,as:null,async:z,autoCapitalize:null,autoComplete:V,autoFocus:z,autoPlay:z,blocking:V,capture:null,charSet:null,checked:z,cite:null,className:V,cols:B,colSpan:null,content:null,contentEditable:yl,controls:z,controlsList:V,coords:B|xl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:z,defer:z,dir:null,dirName:null,disabled:z,download:bl,draggable:yl,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:z,formTarget:null,headers:V,height:B,hidden:bl,high:B,href:null,hrefLang:null,htmlFor:V,httpEquiv:V,id:null,imageSizes:null,imageSrcSet:null,inert:z,inputMode:null,integrity:null,is:null,isMap:z,itemId:null,itemProp:V,itemRef:V,itemScope:z,itemType:V,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:z,low:B,manifest:null,max:null,maxLength:B,media:null,method:null,min:null,minLength:B,multiple:z,muted:z,name:null,nonce:null,noModule:z,noValidate:z,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:z,optimum:B,pattern:null,ping:V,placeholder:null,playsInline:z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:z,referrerPolicy:null,rel:V,required:z,reversed:z,rows:B,rowSpan:B,sandbox:V,scope:null,scoped:z,seamless:z,selected:z,shadowRootClonable:z,shadowRootDelegatesFocus:z,shadowRootMode:null,shape:null,size:B,sizes:null,slot:null,span:B,spellCheck:yl,src:null,srcDoc:null,srcLang:null,srcSet:null,start:B,step:null,style:null,tabIndex:B,target:null,title:null,translate:null,type:null,typeMustMatch:z,useMap:null,value:yl,width:B,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:V,axis:null,background:null,bgColor:null,border:B,borderColor:null,bottomMargin:B,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:z,declare:z,event:null,face:null,frame:null,frameBorder:null,hSpace:B,leftMargin:B,link:null,longDesc:null,lowSrc:null,marginHeight:B,marginWidth:B,noResize:z,noHref:z,noShade:z,noWrap:z,object:null,profile:null,prompt:null,rev:null,rightMargin:B,rules:null,scheme:null,scrolling:yl,standby:null,summary:null,text:null,topMargin:B,valueType:null,version:null,vAlign:null,vLink:null,vSpace:B,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:z,disableRemotePlayback:z,prefix:null,property:null,results:B,security:null,unselectable:null},space:`html`,transform:Al}),Ml=Dl({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`,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:Sl,accentHeight:B,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:B,amplitude:B,arabicForm:null,ascent:B,attributeName:null,attributeType:null,azimuth:B,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:B,by:null,calcMode:null,capHeight:B,className:V,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:B,diffuseConstant:B,direction:null,display:null,dur:null,divisor:B,dominantBaseline:null,download:z,dx:null,dy:null,edgeMode:null,editable:null,elevation:B,enableBackground:null,end:null,event:null,exponent:B,externalResourcesRequired:null,fill:null,fillOpacity:B,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:xl,g2:xl,glyphName:xl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:B,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:B,horizOriginX:B,horizOriginY:B,id:null,ideographic:B,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:B,k:B,k1:B,k2:B,k3:B,k4:B,kernelMatrix:Sl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:B,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:B,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:B,overlineThickness:B,paintOrder:null,panose1:null,path:null,pathLength:B,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:V,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:B,pointsAtY:B,pointsAtZ:B,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sl,rev:Sl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sl,requiredFeatures:Sl,requiredFonts:Sl,requiredFormats:Sl,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:B,specularExponent:B,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:B,strikethroughThickness:B,string:null,stroke:null,strokeDashArray:Sl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:B,strokeOpacity:B,strokeWidth:null,style:null,surfaceScale:B,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sl,tabIndex:B,tableValues:null,target:null,targetX:B,targetY:B,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:B,underlineThickness:B,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:B,values:null,vAlphabetic:B,vMathematical:B,vectorEffect:null,vHanging:B,vIdeographic:B,version:null,vertAdvY:B,vertOriginX:B,vertOriginY:B,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:B,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:kl}),Nl=Dl({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()}}),Pl=Dl({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Al}),Fl=Dl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Il={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`},Ll=/[A-Z]/g,Rl=/-[a-z]/g,zl=/^data[-\w.:]+$/i;function Bl(e,t){let n=hl(t),r=t,i=gl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&zl.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Rl,Hl);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Rl.test(e)){let n=e.replace(Ll,Vl);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Tl}return new i(r,t)}function Vl(e){return`-`+e.toLowerCase()}function Hl(e){return e.charAt(1).toUpperCase()}var H=ml([Ol,jl,Nl,Pl,Fl],`html`),U=ml([Ol,Ml,Nl,Pl,Fl],`svg`);function W(e){return e.join(` `).trim()}var G=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
16
- `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function ee(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),ee()}function _(e){return e?e.replace(l,p):p}t.exports=g})),K=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(G());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Ul=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Wl=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(K()),r=Ul();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Gl=ql(`end`),Kl=ql(`start`);function ql(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Jl(e){let t=Kl(e),n=Gl(e);if(t&&n)return{start:t,end:n}}function Yl(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Zl(e.position):`start`in e||`end`in e?Zl(e):`line`in e||`column`in e?Xl(e):``}function Xl(e){return Ql(e&&e.line)+`:`+Ql(e&&e.column)}function Zl(e){return Xl(e&&e.start)+`-`+Xl(e&&e.end)}function Ql(e){return e&&typeof e==`number`?e:1}var $l=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Yl(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};$l.prototype.file=``,$l.prototype.name=``,$l.prototype.reason=``,$l.prototype.message=``,$l.prototype.stack=``,$l.prototype.column=void 0,$l.prototype.line=void 0,$l.prototype.ancestors=void 0,$l.prototype.cause=void 0,$l.prototype.fatal=void 0,$l.prototype.place=void 0,$l.prototype.ruleId=void 0,$l.prototype.source=void 0;var eu=a(Wl(),1),tu={}.hasOwnProperty,nu=new Map,ru=/[A-Z]/g,iu=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),au=new Set([`td`,`th`]),ou=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function su(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=vu(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=_u(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?U:H,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=cu(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function cu(e,t,n){if(t.type===`element`)return lu(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return uu(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return fu(e,t,n);if(t.type===`mdxjsEsm`)return du(e,t);if(t.type===`root`)return pu(e,t,n);if(t.type===`text`)return mu(e,t)}function lu(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=U,e.schema=i),e.ancestors.push(t);let a=wu(e,t.tagName,!1),o=yu(e,t),s=xu(e,t);return iu.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!dl(e):!0})),hu(e,o,a,t),gu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function uu(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Tu(e,t.position)}function du(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tu(e,t.position)}function fu(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=U,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:wu(e,t.name,!0),o=bu(e,t),s=xu(e,t);return hu(e,o,a,t),gu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function pu(e,t,n){let r={};return gu(r,xu(e,t)),e.create(t,e.Fragment,r,n)}function mu(e,t){return t.value}function hu(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gu(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function _u(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function vu(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Kl(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function yu(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&tu.call(t.properties,i)){let a=Su(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&au.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function bu(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Tu(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Tu(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function xu(e,t){let n=[],r=-1,i=e.passKeys?new Map:nu;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=cu(e,a,o);s!==void 0&&n.push(s)}return n}function Su(e,t,n){let r=Bl(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?al(n):W(n)),r.property===`style`){let t=typeof n==`object`?n:Cu(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Eu(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Il[r.property]||r.property:r.attribute,n]}}function Cu(e,t){try{return(0,eu.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new $l("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=ou+`#cannot-parse-style-attribute`,r}}function wu(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=ll(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=ll(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return tu.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Tu(e)}function Tu(e,t){let n=new $l("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=ou+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Eu(e){let t={},n;for(n in e)tu.call(e,n)&&(t[Du(n)]=e[n]);return t}function Du(e){let t=e.replace(ru,Ou);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Ou(e){return`-`+e.toLowerCase()}var ku={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`]},Au={};function ju(e,t){let n=t||Au;return Mu(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Mu(e,t,n){if(Pu(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Nu(e.children,t,n)}return Array.isArray(e)?Nu(e,t,n):``}function Nu(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Mu(e[i],t,n);return r.join(``)}function Pu(e){return!!(e&&typeof e==`object`)}var Fu=document.createElement(`i`);function Iu(e){let t=`&`+e+`;`;Fu.innerHTML=t;let n=Fu.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Lu(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Ru(e,t){return e.length>0?(Lu(e,e.length,0,t),e):t}var zu={}.hasOwnProperty;function Bu(e){let t={},n=-1;for(;++n<e.length;)Vu(t,e[n]);return t}function Vu(e,t){let n;for(n in t){let r=(zu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){zu.call(r,a)||(r[a]=[]);let e=i[a];Hu(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Hu(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Lu(e,0,0,r)}function Uu(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Wu(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Gu=ed(/[A-Za-z]/),Ku=ed(/[\dA-Za-z]/),qu=ed(/[#-'*+\--9=?A-Z^-~]/);function Ju(e){return e!==null&&(e<32||e===127)}var q=ed(/\d/),Yu=ed(/[\dA-Fa-f]/),Xu=ed(/[!-/:-@[-`{-~]/);function J(e){return e!==null&&e<-2}function Zu(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}var Qu=ed(/\p{P}|\p{S}/u),$u=ed(/\s/);function ed(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function td(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Ku(e.charCodeAt(n+1))&&Ku(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function X(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Y(r)?(e.enter(n),s(r)):t(r)}function s(r){return Y(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var nd={tokenize:rd};function rd(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),X(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return J(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var id={tokenize:od},ad={tokenize:sd};function od(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Lu(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ad,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(ad,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return J(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Lu(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sd(e,t,n){return X(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function cd(e){if(e===null||Zu(e)||$u(e))return 1;if(Qu(e))return 2}function ld(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var ud={name:`attention`,resolveAll:dd,tokenize:fd};function dd(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};pd(d,-c),pd(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ru(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Ru(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Ru(l,ld(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ru(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Ru(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Lu(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function fd(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=cd(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=cd(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function pd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var md={name:`autolink`,tokenize:hd};function hd(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Gu(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Ku(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Ku(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Ju(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):qu(t)?(e.consume(t),l):n(t)}function u(e){return Ku(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Ku(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var gd={partial:!0,tokenize:_d};function _d(e,t,n){return r;function r(t){return Y(t)?X(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||J(e)?t(e):n(e)}}var vd={continuation:{tokenize:bd},exit:Z,name:`blockQuote`,tokenize:yd};function yd(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Y(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function bd(e,t,n){let r=this;return i;function i(t){return Y(t)?X(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(vd,t,n)(r)}}function Z(e){e.exit(`blockQuote`)}var xd={name:`characterEscape`,tokenize:Sd};function Sd(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Xu(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Cd={name:`characterReference`,tokenize:wd};function wd(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Ku,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Yu,u):(e.enter(`characterReferenceValue`),a=7,o=q,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Ku&&!Iu(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Td={partial:!0,tokenize:Od},Ed={concrete:!0,name:`codeFenced`,tokenize:Dd};function Dd(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||J(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Td,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),X(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||J(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||J(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Y(t)?X(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||J(t)?e.check(Td,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||J(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Y(t)?X(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||J(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Od(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var kd={name:`codeIndented`,tokenize:jd},Ad={partial:!0,tokenize:Md};function jd(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),X(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):J(t)?e.attempt(Ad,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||J(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Md(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):X(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):J(e)?i(e):n(e)}}var Nd={name:`codeText`,previous:Pd,resolve:Q,tokenize:Fd};function Q(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Pd(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Fd(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||J(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Id=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Ld(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Ld(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ld(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Ld(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Ld(this.left,t.reverse())}}};function Ld(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Rd(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Id(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,zd(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Lu(e,0,1/0,u.slice(0)),!l}function zd(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Bd={resolve:Hd,tokenize:Ud},Vd={partial:!0,tokenize:Wd};function Hd(e){return Rd(e),e}function Ud(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):J(t)?e.check(Vd,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Wd(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,a,`linePrefix`)}function a(i){if(i===null||J(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Gd(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Ju(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||J(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Zu(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Ju(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Kd(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):J(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||J(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Y(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function qd(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||J(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Jd(e,t){let n;return r;function r(i){return J(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Y(i)?X(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Yd={name:`definition`,tokenize:Zd},Xd={partial:!0,tokenize:Qd};function Zd(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Kd.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Wu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Zu(t)?Jd(e,l)(t):l(t)}function l(t){return Gd(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Xd,d,d)(t)}function d(t){return Y(t)?X(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||J(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Qd(e,t,n){return r;function r(t){return Zu(t)?Jd(e,i)(t):n(t)}function i(t){return qd(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Y(t)?X(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||J(e)?t(e):n(e)}}var $d={name:`hardBreakEscape`,tokenize:ef};function ef(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return J(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var tf={name:`headingAtx`,resolve:nf,tokenize:rf};function nf(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Lu(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function rf(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Zu(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||J(n)?(e.exit(`atxHeading`),t(n)):Y(n)?X(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Zu(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var af=`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`.split(`.`),of=[`pre`,`script`,`style`,`textarea`],sf={concrete:!0,name:`htmlFlow`,resolveTo:uf,tokenize:df},cf={partial:!0,tokenize:pf},lf={partial:!0,tokenize:ff};function uf(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 df(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:oe):Gu(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Gu(a)?(e.consume(a),i=4,r.interrupt?t:oe):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:oe):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return Gu(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Zu(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&of.includes(l)?(i=1,r.interrupt?t(s):D(s)):af.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Ku(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return Y(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Gu(t)?(e.consume(t),b):Y(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Ku(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Y(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Y(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||J(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Zu(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Y(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),ee):n(t)}function ee(t){return t===null||J(t)?D(t):Y(t)?(e.consume(t),ee):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),O):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),oe):t===93&&i===5?(e.consume(t),ae):J(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(cf,ce,te)(t)):t===null||J(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(lf,ne,ce)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||J(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),oe):D(t)}function O(t){return t===47?(e.consume(t),o=``,k):D(t)}function k(t){if(t===62){let n=o.toLowerCase();return of.includes(n)?(e.consume(t),se):D(t)}return Gu(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),k):D(t)}function ae(t){return t===93?(e.consume(t),oe):D(t)}function oe(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),oe):D(t)}function se(t){return t===null||J(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function ff(e,t,n){let r=this;return i;function i(t){return J(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function pf(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(gd,t,n)}}var mf={name:`htmlText`,tokenize:hf};function hf(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Gu(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Gu(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):J(t)?(o=d,O(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):J(t)?(o=h,O(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):J(t)?(o=v,O(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):J(t)?(o=y,O(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return Gu(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Ku(t)?(e.consume(t),S):C(t)}function C(t){return J(t)?(o=C,O(t)):Y(t)?(e.consume(t),C):ie(t)}function w(t){return t===45||Ku(t)?(e.consume(t),w):t===47||t===62||Zu(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ie):t===58||t===95||Gu(t)?(e.consume(t),E):J(t)?(o=T,O(t)):Y(t)?(e.consume(t),T):ie(t)}function E(t){return t===45||t===46||t===58||t===95||Ku(t)?(e.consume(t),E):ee(t)}function ee(t){return t===61?(e.consume(t),D):J(t)?(o=ee,O(t)):Y(t)?(e.consume(t),ee):T(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):J(t)?(o=D,O(t)):Y(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):J(t)?(o=te,O(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Zu(t)?T(t):(e.consume(t),ne)}function re(e){return e===47||e===62||Zu(e)?T(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function O(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),k}function k(t){return Y(t)?X(e,ae,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ae(t)}function ae(t){return e.enter(`htmlTextData`),o(t)}}var gf={name:`labelEnd`,resolveAll:bf,resolveTo:xf,tokenize:Sf},_f={tokenize:Cf},vf={tokenize:wf},yf={tokenize:Tf};function bf(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Lu(e,0,e.length,n),e}function xf(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Ru(s,e.slice(a+1,a+r+3)),s=Ru(s,[[`enter`,u,t]]),s=Ru(s,ld(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Ru(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Ru(s,e.slice(o+1)),s=Ru(s,[[`exit`,c,t]]),Lu(e,a,e.length,s),e}function Sf(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Wu(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(_f,u,o?u:d)(t):t===91?e.attempt(vf,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(yf,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Cf(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Zu(t)?Jd(e,a)(t):a(t)}function a(t){return t===41?u(t):Gd(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Zu(t)?Jd(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?qd(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Zu(t)?Jd(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function wf(e,t,n){let r=this;return i;function i(t){return Kd.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Wu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Tf(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Ef={name:`labelStartImage`,resolveAll:gf.resolveAll,tokenize:Df};function Df(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Of={name:`labelStartLink`,resolveAll:gf.resolveAll,tokenize:kf};function kf(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Af={name:`lineEnding`,tokenize:jf};function jf(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),X(e,t,`linePrefix`)}}var Mf={name:`thematicBreak`,tokenize:Nf};function Nf(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||J(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Y(t)?X(e,s,`whitespace`)(t):s(t))}}var Pf={continuation:{tokenize:Rf},exit:Bf,name:`list`,tokenize:Lf},Ff={partial:!0,tokenize:Vf},If={partial:!0,tokenize:zf};function Lf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:q(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Mf,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return q(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(gd,r.interrupt?n:u,e.attempt(Ff,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Y(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Rf(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(gd,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Y(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(If,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(Pf,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function zf(e,t,n){let r=this;return X(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Bf(e){e.exit(this.containerState.type)}function Vf(e,t,n){let r=this;return X(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Y(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Hf={name:`setextUnderline`,resolveTo:Uf,tokenize:Wf};function Uf(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Wf(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Y(t)?X(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||J(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Gf={tokenize:Kf};function Kf(e){let t=this,n=e.attempt(gd,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Bd,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var qf={resolveAll:Zf()},Jf=Xf(`string`),Yf=Xf(`text`);function Xf(e){return{resolveAll:Zf(e===`text`?Qf:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Zf(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Qf(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var $f=t({attentionMarkers:()=>sp,contentInitial:()=>tp,disable:()=>cp,document:()=>ep,flow:()=>rp,flowInitial:()=>np,insideSpan:()=>op,string:()=>ip,text:()=>ap}),ep={42:Pf,43:Pf,45:Pf,48:Pf,49:Pf,50:Pf,51:Pf,52:Pf,53:Pf,54:Pf,55:Pf,56:Pf,57:Pf,62:vd},tp={91:Yd},np={[-2]:kd,[-1]:kd,32:kd},rp={35:tf,42:Mf,45:[Hf,Mf],60:sf,61:Hf,95:Mf,96:Ed,126:Ed},ip={38:Cd,92:xd},ap={[-5]:Af,[-4]:Af,[-3]:Af,33:Ef,38:Cd,42:ud,60:[md,mf],91:Of,92:[$d,xd],93:gf,95:ud,96:Nd},op={null:[ud,qf]},sp={null:[42,95]},cp={null:[]};function lp(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Ru(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ld(a,l.events,l),l.events):[]}function f(e,t){return dp(p(e),t)}function p(e){return up(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){J(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Lu(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function up(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function dp(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
17
- `;break;case-3:o=`\r
18
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function fp(e){let t={constructs:Bu([$f,...(e||{}).extensions||[]]),content:n(nd),defined:[],document:n(id),flow:n(Gf),lazy:{},string:n(Jf),text:n(Yf)};return t;function n(e){return n;function n(n){return lp(t,e,n)}}}function pp(e){for(;!Rd(e););return e}var mp=/[\0\t\n\r]/g;function hp(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(mp.lastIndex=u,c=mp.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var gp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _p(e){return e.replace(gp,vp)}function vp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Uu(n.slice(t?2:1),t?16:10)}return Iu(n)||e}var yp={}.hasOwnProperty;function bp(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),xp(n)(pp(fp(n).document().write(hp()(e,t,!0))))}function xp(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Te),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(xe),blockQuote:a(ge),characterEscape:T,characterReference:T,codeFenced:a(_e),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(_e,o),codeText:a(ve,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ye),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(be),hardBreakEscape:a(Se),hardBreakTrailing:a(Se),htmlFlow:a(Ce,o),htmlFlowData:T,htmlText:a(Ce,o),htmlTextData:T,image:a(we),label:o,link:a(Te),listItem:a(De),listItemValue:f,listOrdered:a(Ee,d),listUnordered:a(Ee),paragraph:a(Oe),reference:le,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(xe),strong:a(ke),thematicBreak:a(je)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:he,autolinkProtocol:me,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:fe,characterReference:pe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(re),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(te),htmlFlowData:E,htmlText:c(ne),htmlTextData:E,image:c(O),label:ae,labelText:k,lineEnding:ee,link:c(ie),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ue,resourceDestinationString:oe,resourceTitleString:se,resource:ce,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Cp(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];yp.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Tp).call(a,void 0,e[0])}for(r.position={start:Sp(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Sp(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Sp(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Tp).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Yl({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Sp(e.end)}function u(){return ju(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Wu(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ae(),n.position={start:Sp(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Sp(e.end)}function ee(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Sp(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function D(){this.data.atHardBreak=!0}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function k(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=_p(t),n.identifier=Wu(t).toLowerCase()}function ae(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ce(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function ue(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Wu(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function de(e){this.data.characterReferenceType=e.type}function fe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Uu(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Iu(t);let i=this.stack[this.stack.length-1];i.value+=r}function pe(e){let t=this.stack.pop();t.position.end=Sp(e.end)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function he(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ge(){return{type:`blockquote`,children:[]}}function _e(){return{type:`code`,lang:null,meta:null,value:``}}function ve(){return{type:`inlineCode`,value:``}}function ye(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function be(){return{type:`emphasis`,children:[]}}function xe(){return{type:`heading`,depth:0,children:[]}}function Se(){return{type:`break`}}function Ce(){return{type:`html`,value:``}}function we(){return{type:`image`,title:null,url:``,alt:null}}function Te(){return{type:`link`,title:null,url:``,children:[]}}function Ee(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function De(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Oe(){return{type:`paragraph`,children:[]}}function ke(){return{type:`strong`,children:[]}}function Ae(){return{type:`text`,value:``}}function je(){return{type:`thematicBreak`}}}function Sp(e){return{line:e.line,column:e.column,offset:e.offset}}function Cp(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Cp(e,r):wp(e,r)}}function wp(e,t){let n;for(n in t)if(yp.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Tp(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Yl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yl({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Yl({start:t.start,end:t.end})+`) is still open`)}function Ep(e){let t=this;t.parser=n;function n(n){return bp(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Dp(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Op(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
19
- `}]}function kp(e,t){let n=t.value?t.value+`
20
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Ap(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jp(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mp(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=td(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Np(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pp(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Fp(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Ip(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fp(e,t);let i={src:td(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Lp(e,t){let n={src:td(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Rp(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function zp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Fp(e,t);let i={href:td(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Bp(e,t){let n={href:td(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Vp(e,t,n){let r=e.all(t),i=n?Hp(n):Up(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
21
- `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
22
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Hp(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Up(n[r])}return t}function Up(e){return e.spread??e.children.length>1}function Wp(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Gp(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kp(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qp(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jp(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Kl(t.children[1]),o=Gl(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Yp(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Xp(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Zp=9,Qp=32;function $p(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(em(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(em(t.slice(i),i>0,!1)),a.join(``)}function em(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Zp||t===Qp;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Zp||t===Qp;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function tm(e,t){let n={type:`text`,value:$p(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function nm(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var rm={blockquote:Dp,break:Op,code:kp,delete:Ap,emphasis:jp,footnoteReference:Mp,heading:Np,html:Pp,imageReference:Ip,image:Lp,inlineCode:Rp,linkReference:zp,link:Bp,listItem:Vp,list:Wp,paragraph:Gp,root:Kp,strong:qp,table:Jp,tableCell:Xp,tableRow:Yp,text:tm,thematicBreak:nm,toml:im,yaml:im,definition:im,footnoteDefinition:im};function im(){}var am=typeof self==`object`?self:globalThis,om=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new am[e](t)},sm=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(om(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(om(a,o),i)};return r},cm=e=>sm(new Map,e)(0),lm=``,{toString:um}={},{keys:dm}=Object,fm=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=um.call(e).slice(8,-1);switch(n){case`Array`:return[1,lm];case`Object`:return[2,lm];case`Date`:return[3,lm];case`RegExp`:return[4,lm];case`Map`:return[5,lm];case`Set`:return[6,lm];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},pm=([e,t])=>e===0&&(t===`function`||t===`symbol`),mm=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=fm(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of dm(r))(e||!pm(fm(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(pm(fm(n))||pm(fm(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!pm(fm(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},hm=(e,{json:t,lossy:n}={})=>{let r=[];return mm(!(t||n),!!t,new Map,r)(e),r},gm=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?cm(hm(e,t)):structuredClone(e):(e,t)=>cm(hm(e,t));function _m(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function vm(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function ym(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||_m,r=e.options.footnoteBackLabel||vm,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=td(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...gm(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
23
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
24
- `}]}}var bm=(function(e){if(e==null)return Tm;if(typeof e==`function`)return wm(e);if(typeof e==`object`)return Array.isArray(e)?xm(e):Sm(e);if(typeof e==`string`)return Cm(e);throw Error(`Expected function, string, or object as test`)});function xm(e){let t=[],n=-1;for(;++n<e.length;)t[n]=bm(e[n]);return wm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Sm(e){let t=e;return wm(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Cm(e){return wm(t);function t(t){return t&&t.type===e}}function wm(e){return t;function t(t,n,r){return!!(Em(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Tm(){return!0}function Em(e){return typeof e==`object`&&!!e&&`type`in e}function Dm(e){return e}var Om=[];function km(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=bm(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+Dm(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=Om,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Am(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Am(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?Om:[e]}function jm(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),km(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Mm={}.hasOwnProperty,Nm={};function Pm(e,t){let n=t||Nm,r=new Map,i=new Map,a={all:s,applyData:Im,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...rm,...n.handlers},one:o,options:n,patch:Fm,wrap:Rm};return jm(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Mm.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=gm(n);return r.children=a.all(e),r}return gm(e)}return(a.options.unknownHandler||Lm)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=zm(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=zm(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Fm(e,t){e.position&&(t.position=Jl(e))}function Im(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,gm(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Lm(e,t){let n=t.data||{},r=`value`in t&&!(Mm.call(n,`hProperties`)||Mm.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Rm(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
25
- `});++r<e.length;)r&&n.push({type:`text`,value:`
26
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
27
- `}),n}function zm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Bm(e,t){let n=Pm(e,t),r=n.one(e,void 0),i=ym(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
28
- `},i)),a}function Vm(e,t){return e&&`run`in e?async function(n,r){let i=Bm(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Bm(n,{file:r,...e||t})}}function Hm(e){if(e)throw e}var Um=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Wm(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Gm(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Km(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Km(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var qm={basename:Jm,dirname:Ym,extname:Xm,join:Zm,sep:`/`};function Jm(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);eh(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Ym(e){if(eh(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Xm(e){eh(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Zm(...e){let t=-1,n;for(;++t<e.length;)eh(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Qm(n)}function Qm(e){eh(e);let t=e.codePointAt(0)===47,n=$m(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function $m(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function eh(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var th={cwd:nh};function nh(){return`/`}function rh(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function ih(e){if(typeof e==`string`)e=new URL(e);else if(!rh(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return ah(e)}function ah(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var oh=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],sh=class{constructor(e){let t;t=e?rh(e)?{path:e}:typeof e==`string`||dh(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:th.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<oh.length;){let e=oh[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)oh.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?qm.basename(this.path):void 0}set basename(e){lh(e,`basename`),ch(e,`basename`),this.path=qm.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?qm.dirname(this.path):void 0}set dirname(e){uh(this.basename,`dirname`),this.path=qm.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?qm.extname(this.path):void 0}set extname(e){if(ch(e,`extname`),uh(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=qm.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){rh(e)&&(e=ih(e)),lh(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?qm.basename(this.path,this.extname):void 0}set stem(e){lh(e,`stem`),ch(e,`stem`),this.path=qm.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new $l(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ch(e,t){if(e&&e.includes(qm.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+qm.sep+"`")}function lh(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function uh(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function dh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var fh=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),ph=a(Um(),1),mh={}.hasOwnProperty,hh=new class e extends fh{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=Gm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,ph.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(vh(`data`,this.frozen),this.namespace[e]=t,this):mh.call(this.namespace,e)&&this.namespace[e]||void 0:e?(vh(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=xh(e),n=this.parser||this.Parser;return gh(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),gh(`process`,this.parser||this.Parser),_h(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=xh(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Ch(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),gh(`processSync`,this.parser||this.Parser),_h(`processSync`,this.compiler||this.Compiler),this.process(e,r),bh(`processSync`,`process`,t),n;function r(e,r){t=!0,Hm(e),n=r}}run(e,t,n){yh(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=xh(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),bh(`runSync`,`run`,n),r;function i(e,t){Hm(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=xh(t),r=this.compiler||this.Compiler;return _h(`stringify`,r),yh(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(vh(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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(e.plugins),e.settings&&(r.settings=(0,ph.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Wm(o)&&Wm(r)&&(r=(0,ph.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function gh(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function _h(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function vh(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yh(e){if(!Wm(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function bh(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function xh(e){return Sh(e)?e:new sh(e)}function Sh(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Ch(e){return typeof e==`string`||wh(e)}function wh(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Th=[],Eh={allowDangerousHtml:!0},Dh=/^(https?|ircs?|mailto|xmpp)$/i,Oh=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function kh(e){let t=Ah(e),n=jh(e);return Mh(t.runSync(t.parse(n),n),e)}function Ah(e){let t=e.rehypePlugins||Th,n=e.remarkPlugins||Th,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Eh}:Eh;return hh().use(Ep).use(n).use(Vm,r).use(t)}function jh(e){let t=e.children||``,n=new sh;return typeof t==`string`?n.value=t:``+t,n}function Mh(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Nh;for(let e of Oh)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return jm(e,l),su(e,{Fragment:j.Fragment,components:i,ignoreInvalidStyle:!0,jsx:j.jsx,jsxs:j.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in ku)if(Object.hasOwn(ku,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=ku[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Nh(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Dh.test(e.slice(0,t))?e:``}function Ph(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Fh(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Ih(e,t,n){let r=bm((n||{}).ignore||[]),i=Lh(t),a=-1;for(;++a<i.length;)km(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Lh(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Rh(e[0]),zh(e[1])])}return t}function Rh(e){return typeof e==`string`?new RegExp(Fh(e),`g`):e}function zh(e){return typeof e==`function`?e:function(){return e}}var Bh=`phrasing`,Vh=[`autolink`,`link`,`image`,`label`];function Hh(){return{transforms:[Xh],enter:{literalAutolink:Wh,literalAutolinkEmail:Gh,literalAutolinkHttp:Gh,literalAutolinkWww:Gh},exit:{literalAutolink:Yh,literalAutolinkEmail:Jh,literalAutolinkHttp:Kh,literalAutolinkWww:qh}}}function Uh(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Bh,notInConstruct:Vh},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Bh,notInConstruct:Vh},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Bh,notInConstruct:Vh}]}}function Wh(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Gh(e){this.config.enter.autolinkProtocol.call(this,e)}function Kh(e){this.config.exit.autolinkProtocol.call(this,e)}function qh(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Jh(e){this.config.exit.autolinkEmail.call(this,e)}function Yh(e){this.exit(e)}function Xh(e){Ih(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Zh],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Qh]],{ignore:[`link`,`linkReference`]})}function Zh(e,t,n,r,i){let a=``;if(!tg(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!$h(n)))return!1;let o=eg(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Qh(e,t,n,r){return!tg(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function $h(e){let 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 eg(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Ph(e,`(`),a=Ph(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function tg(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||$u(n)||Qu(n))&&(!t||n!==47)}dg.peek=ug;function ng(){this.buffer()}function rg(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ig(){this.buffer()}function ag(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function og(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function sg(e){this.exit(e)}function cg(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Wu(this.sliceSerialize(e)).toLowerCase(),n.label=t}function lg(e){this.exit(e)}function ug(){return`[`}function dg(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function fg(){return{enter:{gfmFootnoteCallString:ng,gfmFootnoteCall:rg,gfmFootnoteDefinitionLabelString:ig,gfmFootnoteDefinition:ag},exit:{gfmFootnoteCallString:og,gfmFootnoteCall:sg,gfmFootnoteDefinitionLabelString:cg,gfmFootnoteDefinition:lg}}}function pg(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:dg},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
29
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?hg:mg))),s(),o}}function mg(e,t,n){return t===0?e:hg(e,t,n)}function hg(e,t,n){return(n?``:` `)+e}var gg=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];xg.peek=Sg;function _g(){return{canContainEols:[`delete`],enter:{strikethrough:yg},exit:{strikethrough:bg}}}function vg(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:gg}],handlers:{delete:xg}}}function yg(e){this.enter({type:`delete`,children:[]},e)}function bg(e){this.exit(e)}function xg(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Sg(){return`~`}function Cg(e){return e.length}function wg(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Cg,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Tg(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Eg(r[d]);else{let e=Eg(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
30
- `)}function Tg(e){return e==null?``:String(e)}function Eg(e){let 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}var Dg={}.hasOwnProperty;function Og(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Dg.call(t,e)){let n=String(t[e]);i=Dg.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function kg(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Ag);return i(),o}function Ag(e,t,n){return`>`+(n?``:` `)+e}function jg(e,t){return Mg(e,t.inConstruct,!0)&&!Mg(e,t.notInConstruct,!1)}function Mg(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Ng(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
31
- `&&jg(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
32
- `}function Pg(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Fg(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Ig(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Lg(e,t,n,r){let i=Ig(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Fg(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Rg);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Pg(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
33
- `,encode:["`"],...s.current()})),t()}return u+=s.move(`
34
- `),a&&(u+=s.move(a+`
35
- `)),u+=s.move(c),l(),u}function Rg(e,t,n){return(n?``:` `)+e}function zg(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Bg(e,t,n,r){let i=zg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
36
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Vg(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Hg(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Ug(e,t,n){let r=cd(e),i=cd(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Wg.peek=Gg;function Wg(e,t,n,r){let i=Vg(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Ug(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Hg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Ug(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Hg(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Gg(e,t,n){return n.options.emphasis||`*`}function Kg(e,t){let n=!1;return jm(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ju(e)&&(t.options.setext||n))}function qg(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Kg(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
37
- `,after:`
38
- `});return r(),t(),o+`
39
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
40
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
41
- `,...a.current()});return/^[\t ]/.test(l)&&(l=Hg(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Jg.peek=Yg;function Jg(e){return e.value||``}function Yg(){return`<`}Xg.peek=Zg;function Xg(e,t,n,r){let i=zg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Zg(){return`!`}Qg.peek=$g;function Qg(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function $g(){return`!`}e_.peek=t_;function e_(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function t_(){return"`"}function n_(e,t){let n=ju(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}r_.peek=i_;function r_(e,t,n,r){let i=zg(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(n_(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function i_(e,t,n){return n_(e,n)?`<`:`[`}a_.peek=o_;function a_(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function o_(){return`[`}function s_(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function c_(e){let t=s_(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function l_(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function u_(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function d_(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?l_(n):s_(n),s=e.ordered?o===`.`?`)`:`.`:c_(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),u_(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function f_(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function p_(e,t,n,r){let i=f_(n),a=n.bulletCurrent||s_(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function m_(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var h_=bm([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function g_(e,t,n,r){return(e.children.some(function(e){return h_(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function __(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}v_.peek=y_;function v_(e,t,n,r){let i=__(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Ug(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Hg(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Ug(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Hg(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function y_(e,t,n){return n.options.strong||`*`}function b_(e,t,n,r){return n.safe(e.value,r)}function x_(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function S_(e,t,n){let r=(u_(n)+(n.options.ruleSpaces?` `:``)).repeat(x_(n));return n.options.ruleSpaces?r.slice(0,-1):r}var C_={blockquote:kg,break:Ng,code:Lg,definition:Bg,emphasis:Wg,hardBreak:Ng,heading:qg,html:Jg,image:Xg,imageReference:Qg,inlineCode:e_,link:r_,linkReference:a_,list:d_,listItem:p_,paragraph:m_,root:g_,strong:v_,text:b_,thematicBreak:S_};function w_(){return{enter:{table:T_,tableData:k_,tableHeader:k_,tableRow:D_},exit:{codeText:A_,table:E_,tableData:O_,tableHeader:O_,tableRow:O_}}}function T_(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function E_(e){this.exit(e),this.data.inTable=void 0}function D_(e){this.enter({type:`tableRow`,children:[]},e)}function O_(e){this.exit(e)}function k_(e){this.enter({type:`tableCell`,children:[]},e)}function A_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,j_));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function j_(e,t){return t===`|`?t:e}function M_(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
42
- `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
43
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return wg(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=C_.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function N_(){return{exit:{taskListCheckValueChecked:F_,taskListCheckValueUnchecked:F_,paragraph:I_}}}function P_(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:L_}}}function F_(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function I_(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function L_(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=C_.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function R_(){return[Hh(),fg(),_g(),w_(),N_()]}function z_(e){return{extensions:[Uh(),pg(e),vg(),M_(e),P_()]}}var B_={tokenize:ev,partial:!0},V_={tokenize:tv,partial:!0},H_={tokenize:nv,partial:!0},U_={tokenize:rv,partial:!0},W_={tokenize:iv,partial:!0},G_={name:`wwwAutolink`,tokenize:Q_,previous:av},K_={name:`protocolAutolink`,tokenize:$_,previous:ov},q_={name:`emailAutolink`,tokenize:Z_,previous:sv},J_={};function Y_(){return{text:J_}}for(var X_=48;X_<123;)J_[X_]=q_,X_++,X_===58?X_=65:X_===91&&(X_=97);J_[43]=q_,J_[45]=q_,J_[46]=q_,J_[95]=q_,J_[72]=[q_,K_],J_[104]=[q_,K_],J_[87]=[q_,G_],J_[119]=[q_,G_];function Z_(e,t,n){let r=this,i,a;return o;function o(t){return!cv(t)||!sv.call(r,r.previous)||lv(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return cv(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(W_,u,l)(t):t===45||t===95||Ku(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Gu(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Q_(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!av.call(r,r.previous)||lv(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(B_,e.attempt(V_,e.attempt(H_,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function $_(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&ov.call(r,r.previous)&&!lv(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Gu(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Ju(t)||Zu(t)||$u(t)||Qu(t)?n(t):e.attempt(V_,e.attempt(H_,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ev(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function tv(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(U_,c,s)(t):t===null||Zu(t)||$u(t)||t!==45&&Qu(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function nv(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(U_,t,a)(o):o===null||Zu(o)||$u(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function rv(e,t,n){return r;function r(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),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Zu(o)||$u(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Zu(e)||$u(e)?t(e):r(e)}function a(e){return Gu(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Gu(t)?(e.consume(t),o):n(t)}}function iv(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Ku(e)?n(e):t(e)}}function av(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Zu(e)}function ov(e){return!Gu(e)}function sv(e){return!(e===47||cv(e))}function cv(e){return e===43||e===45||e===46||e===95||Ku(e)}function lv(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var uv={tokenize:vv,partial:!0};function dv(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:hv,continuation:{tokenize:gv},exit:_v}},text:{91:{name:`gfmFootnoteCall`,tokenize:mv},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:fv,resolveTo:pv}}}}function fv(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Wu(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function pv(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function mv(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Zu(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Wu(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Zu(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function hv(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Zu(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Wu(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Zu(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),X(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function gv(e,t,n){return e.check(gd,t,e.attempt(uv,t,n))}function _v(e){e.exit(`gfmFootnoteDefinition`)}function vv(e,t,n){let r=this;return X(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function yv(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Lu(o,o.length,0,ld(s,e.slice(r+1,n),t)),Lu(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Lu(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=cd(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=cd(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var bv=class{constructor(){this.map=[]}add(e,t,n){xv(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function xv(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Sv(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Cv(){return{flow:{null:{name:`table`,tokenize:wv,resolveAll:Tv}}}}function wv(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):J(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Y(t)?X(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Zu(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Y(t)?X(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Y(t)?X(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||J(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Y(t)?X(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||J(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||J(n)?(e.exit(`tableRow`),t(n)):Y(n)?X(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Zu(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Tv(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new bv;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Dv(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ev(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ev(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ev(f,t,o,i,n,d)):(o[0]=o[1],d=Ev(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Dv(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Sv(t.events,n))}return e}function Ev(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ov(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ov(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ov(t.events,n[2]),a=Ov(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ov(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Dv(e,t,n,r,i){let a=[],o=Ov(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ov(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var kv={name:`tasklistCheck`,tokenize:jv};function Av(){return{text:{91:kv}}}function jv(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Zu(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return J(r)?t(r):Y(r)?e.check({tokenize:Mv},t,n)(r):n(r)}}function Mv(e,t,n){return X(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Nv(e){return Bu([Y_(),dv(),yv(e),Cv(),Av()])}var Pv={};function Fv(e){let t=this,n=e||Pv,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Nv(n)),a.push(R_()),o.push(z_(n))}var Iv=r(e=>{let{securityLevel:t}=ae(),n=i(`body`);return t===`sandbox`&&(n=i((i(`#i${e}`).node()?.contentDocument??document).body)),n.select(`#${e}`)},`selectSvgElement`);function Lv(e){return e==null}r(Lv,`isNothing`);function Rv(e){return typeof e==`object`&&!!e}r(Rv,`isObject`);function zv(e){return Array.isArray(e)?e:Lv(e)?[]:[e]}r(zv,`toArray`);function Bv(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}r(Bv,`extend`);function Vv(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}r(Vv,`repeat`);function Hv(e){return e===0&&1/e==-1/0}r(Hv,`isNegativeZero`);var Uv={isNothing:Lv,isObject:Rv,toArray:zv,repeat:Vv,isNegativeZero:Hv,extend:Bv};function Wv(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
44
-
45
- `+e.mark.snippet),r+` `+n):r}r(Wv,`formatError`);function Gv(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=Wv(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}r(Gv,`YAMLException$1`),Gv.prototype=Object.create(Error.prototype),Gv.prototype.constructor=Gv,Gv.prototype.toString=r(function(e){return this.name+`: `+Wv(this,e)},`toString`);var Kv=Gv;function qv(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}r(qv,`getLine`);function Jv(e,t){return Uv.repeat(` `,t-e.length)+e}r(Jv,`padStart`);function Yv(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var s=``,c,l,u=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=qv(e.buffer,r[o-c],i[o-c],e.position-(r[o]-r[o-c]),d),s=Uv.repeat(` `,t.indent)+Jv((e.line-c+1).toString(),u)+` | `+l.str+`
46
- `+s;for(l=qv(e.buffer,r[o],i[o],e.position,d),s+=Uv.repeat(` `,t.indent)+Jv((e.line+1).toString(),u)+` | `+l.str+`
47
- `,s+=Uv.repeat(`-`,t.indent+u+3+l.pos)+`^
48
- `,c=1;c<=t.linesAfter&&!(o+c>=i.length);c++)l=qv(e.buffer,r[o+c],i[o+c],e.position-(r[o]-r[o+c]),d),s+=Uv.repeat(` `,t.indent)+Jv((e.line+c+1).toString(),u)+` | `+l.str+`
49
- `;return s.replace(/\n$/,``)}r(Yv,`makeSnippet`);var Xv=Yv,Zv=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],Qv=[`scalar`,`sequence`,`mapping`];function $v(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}r($v,`compileStyleAliases`);function ey(e,t){if(t||={},Object.keys(t).forEach(function(t){if(Zv.indexOf(t)===-1)throw new Kv(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=$v(t.styleAliases||null),Qv.indexOf(this.kind)===-1)throw new Kv(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}r(ey,`Type$1`);var ty=ey;function ny(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}r(ny,`compileList`);function ry(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function i(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(r(i,`collectType`),t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(i);return e}r(ry,`compileMap`);function iy(e){return this.extend(e)}r(iy,`Schema$1`),iy.prototype.extend=r(function(e){var t=[],n=[];if(e instanceof ty)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Kv(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof ty))throw new Kv(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new Kv(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new Kv(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),n.forEach(function(e){if(!(e instanceof ty))throw new Kv(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});var r=Object.create(iy.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=ny(r,`implicit`),r.compiledExplicit=ny(r,`explicit`),r.compiledTypeMap=ry(r.compiledImplicit,r.compiledExplicit),r},`extend`);var ay=new iy({explicit:[new ty(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:r(function(e){return e===null?``:e},`construct`)}),new ty(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:r(function(e){return e===null?[]:e},`construct`)}),new ty(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:r(function(e){return e===null?{}:e},`construct`)})]});function oy(e){if(e===null)return!0;var t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}r(oy,`resolveYamlNull`);function sy(){return null}r(sy,`constructYamlNull`);function cy(e){return e===null}r(cy,`isNull`);var ly=new ty(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:oy,construct:sy,predicate:cy,represent:{canonical:r(function(){return`~`},`canonical`),lowercase:r(function(){return`null`},`lowercase`),uppercase:r(function(){return`NULL`},`uppercase`),camelcase:r(function(){return`Null`},`camelcase`),empty:r(function(){return``},`empty`)},defaultStyle:`lowercase`});function uy(e){if(e===null)return!1;var t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}r(uy,`resolveYamlBoolean`);function dy(e){return e===`true`||e===`True`||e===`TRUE`}r(dy,`constructYamlBoolean`);function fy(e){return Object.prototype.toString.call(e)===`[object Boolean]`}r(fy,`isBoolean`);var py=new ty(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:uy,construct:dy,predicate:fy,represent:{lowercase:r(function(e){return e?`true`:`false`},`lowercase`),uppercase:r(function(e){return e?`TRUE`:`FALSE`},`uppercase`),camelcase:r(function(e){return e?`True`:`False`},`camelcase`)},defaultStyle:`lowercase`});function my(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}r(my,`isHexCode`);function hy(e){return 48<=e&&e<=55}r(hy,`isOctCode`);function gy(e){return 48<=e&&e<=57}r(gy,`isDecCode`);function _y(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i===`-`||i===`+`)&&(i=e[++n]),i===`0`){if(n+1===t)return!0;if(i=e[++n],i===`b`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(i!==`0`&&i!==`1`)return!1;r=!0}return r&&i!==`_`}if(i===`x`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!my(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}if(i===`o`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!hy(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}}if(i===`_`)return!1;for(;n<t;n++)if(i=e[n],i!==`_`){if(!gy(e.charCodeAt(n)))return!1;r=!0}return!(!r||i===`_`)}r(_y,`resolveYamlInteger`);function vy(e){var t=e,n=1,r;if(t.indexOf(`_`)!==-1&&(t=t.replace(/_/g,``)),r=t[0],(r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}r(vy,`constructYamlInteger`);function yy(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!Uv.isNegativeZero(e)}r(yy,`isInteger`);var by=new ty(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:_y,construct:vy,predicate:yy,represent:{binary:r(function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:r(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:r(function(e){return e.toString(10)},`decimal`),hexadecimal:r(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),xy=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function Sy(e){return!(e===null||!xy.test(e)||e[e.length-1]===`_`)}r(Sy,`resolveYamlFloat`);function Cy(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}r(Cy,`constructYamlFloat`);var wy=/^[-+]?[0-9]+e/;function Ty(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(Uv.isNegativeZero(e))return`-0.0`;return n=e.toString(10),wy.test(n)?n.replace(`e`,`.e`):n}r(Ty,`representYamlFloat`);function Ey(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||Uv.isNegativeZero(e))}r(Ey,`isFloat`);var Dy=new ty(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:Sy,construct:Cy,predicate:Ey,represent:Ty,defaultStyle:`lowercase`}),Oy=ay.extend({implicit:[ly,py,by,Dy]}),ky=Oy,Ay=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),jy=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 My(e){return e===null?!1:Ay.exec(e)!==null||jy.exec(e)!==null}r(My,`resolveYamlTimestamp`);function Ny(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=Ay.exec(e),t===null&&(t=jy.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}r(Ny,`constructYamlTimestamp`);function Py(e){return e.toISOString()}r(Py,`representYamlTimestamp`);var Fy=new ty(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:My,construct:Ny,instanceOf:Date,represent:Py});function Iy(e){return e===`<<`||e===null}r(Iy,`resolveYamlMerge`);var Ly=new ty(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:Iy}),Ry=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
50
- \r`;function zy(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=Ry;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8==0}r(zy,`resolveYamlBinary`);function By(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=Ry,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}r(By,`constructYamlBinary`);function Vy(e){var t=``,n=0,r,i,a=e.length,o=Ry;for(r=0;r<a;r++)r%3==0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}r(Vy,`representYamlBinary`);function Hy(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}r(Hy,`isBinary`);var Uy=new ty(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:zy,construct:By,predicate:Hy,represent:Vy}),Wy=Object.prototype.hasOwnProperty,Gy=Object.prototype.toString;function Ky(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],o=!1,Gy.call(i)!==`[object Object]`)return!1;for(a in i)if(Wy.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}r(Ky,`resolveYamlOmap`);function qy(e){return e===null?[]:e}r(qy,`constructYamlOmap`);var Jy=new ty(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:Ky,construct:qy}),Yy=Object.prototype.toString;function Xy(e){if(e===null)return!0;var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],Yy.call(r)!==`[object Object]`||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}r(Xy,`resolveYamlPairs`);function Zy(e){if(e===null)return[];var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}r(Zy,`constructYamlPairs`);var Qy=new ty(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:Xy,construct:Zy}),$y=Object.prototype.hasOwnProperty;function eb(e){if(e===null)return!0;var t,n=e;for(t in n)if($y.call(n,t)&&n[t]!==null)return!1;return!0}r(eb,`resolveYamlSet`);function tb(e){return e===null?{}:e}r(tb,`constructYamlSet`);var nb=new ty(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:eb,construct:tb}),rb=ky.extend({implicit:[Fy,Ly],explicit:[Uy,Jy,Qy,nb]}),ib=Object.prototype.hasOwnProperty,ab=1,ob=2,sb=3,cb=4,lb=1,ub=2,db=3,fb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,pb=/[\x85\u2028\u2029]/,mb=/[,\[\]\{\}]/,hb=/^(?:!|!!|![a-z\-]+!)$/i,gb=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _b(e){return Object.prototype.toString.call(e)}r(_b,`_class`);function vb(e){return e===10||e===13}r(vb,`is_EOL`);function yb(e){return e===9||e===32}r(yb,`is_WHITE_SPACE`);function bb(e){return e===9||e===32||e===10||e===13}r(bb,`is_WS_OR_EOL`);function xb(e){return e===44||e===91||e===93||e===123||e===125}r(xb,`is_FLOW_INDICATOR`);function Sb(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}r(Sb,`fromHexCode`);function Cb(e){return e===120?2:e===117?4:e===85?8:0}r(Cb,`escapedHexLen`);function wb(e){return 48<=e&&e<=57?e-48:-1}r(wb,`fromDecimalCode`);function Tb(e){return e===48?`\0`:e===97?`\x07`:e===98?`\b`:e===116||e===9?` `:e===110?`
51
- `:e===118?`\v`:e===102?`\f`:e===114?`\r`:e===101?`\x1B`:e===32?` `:e===34?`"`:e===47?`/`:e===92?`\\`:e===78?`…`:e===95?`\xA0`:e===76?`\u2028`:e===80?`\u2029`:``}r(Tb,`simpleEscapeSequence`);function Eb(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}r(Eb,`charFromCodepoint`);function Db(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}r(Db,`setProperty`);var Ob=Array(256),kb=Array(256);for(Ab=0;Ab<256;Ab++)Ob[Ab]=+!!Tb(Ab),kb[Ab]=Tb(Ab);var Ab;function jb(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||rb,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}r(jb,`State$1`);function Mb(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=Xv(n),new Kv(t,n)}r(Mb,`generateError`);function $(e,t){throw Mb(e,t)}r($,`throwError`);function Nb(e,t){e.onWarning&&e.onWarning.call(null,Mb(e,t))}r(Nb,`throwWarning`);var Pb={YAML:r(function(e,t,n){var r,i,a;e.version!==null&&$(e,`duplication of %YAML directive`),n.length!==1&&$(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&$(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&$(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Nb(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:r(function(e,t,n){var r,i;n.length!==2&&$(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],hb.test(r)||$(e,`ill-formed tag handle (first argument) of the TAG directive`),ib.call(e.tagMap,r)&&$(e,`there is a previously declared suffix for "`+r+`" tag handle`),gb.test(i)||$(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{$(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i},`handleTagDirective`)};function Fb(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),o===9||32<=o&&o<=1114111||$(e,`expected valid JSON character`);else fb.test(s)&&$(e,`the stream contains non-printable characters`);e.result+=s}}r(Fb,`captureSegment`);function Ib(e,t,n,r){var i,a,o,s;for(Uv.isObject(n)||$(e,`cannot merge mappings; the provided source object is unacceptable`),i=Object.keys(n),o=0,s=i.length;o<s;o+=1)a=i[o],ib.call(t,a)||(Db(t,a,n[a]),r[a]=!0)}r(Ib,`mergeMappings`);function Lb(e,t,n,r,i,a,o,s,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&$(e,`nested arrays are not supported inside keys`),typeof i==`object`&&_b(i[l])===`[object Object]`&&(i[l]=`[object Object]`);if(typeof i==`object`&&_b(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)Ib(e,t,a[l],n);else Ib(e,t,a,n);else !e.json&&!ib.call(n,i)&&ib.call(t,i)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,$(e,`duplicated mapping key`)),Db(t,i,a),delete n[i];return t}r(Lb,`storeMappingPair`);function Rb(e){var t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):$(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}r(Rb,`readLineBreak`);function zb(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;yb(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(vb(i))for(Rb(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Nb(e,`deficient indentation`),r}r(zb,`skipSeparationSpace`);function Bb(e){var t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||bb(n)))}r(Bb,`testDocumentSeparator`);function Vb(e,t){t===1?e.result+=` `:t>1&&(e.result+=Uv.repeat(`
52
- `,t-1))}r(Vb,`writeFoldedLines`);function Hb(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(bb(p)||xb(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),bb(i)||n&&xb(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),bb(i)||n&&xb(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),bb(r))break}else if(e.position===e.lineStart&&Bb(e)||n&&xb(p))break;else if(vb(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,zb(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(Fb(e,a,o,!1),Vb(e,e.line-c),a=o=e.position,!1),yb(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Fb(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}r(Hb,`readPlainScalar`);function Ub(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Fb(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else vb(n)?(Fb(e,r,i,!0),Vb(e,zb(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Bb(e)?$(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);$(e,`unexpected end of the stream within a single quoted scalar`)}r(Ub,`readSingleQuotedScalar`);function Wb(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return Fb(e,n,e.position,!0),e.position++,!0;else if(s===92){if(Fb(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),vb(s))zb(e,!1,t);else if(s<256&&Ob[s])e.result+=kb[s],e.position++;else if((o=Cb(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=Sb(s))>=0?a=(a<<4)+o:$(e,`expected hexadecimal character`);e.result+=Eb(a),e.position++}else $(e,`unknown escape sequence`);n=r=e.position}else vb(s)?(Fb(e,n,r,!0),Vb(e,zb(e,!1,t)),n=r=e.position):e.position===e.lineStart&&Bb(e)?$(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);$(e,`unexpected end of the stream within a double quoted scalar`)}r(Wb,`readDoubleQuotedScalar`);function Gb(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(zb(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&$(e,`expected the node content, but found ','`):$(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),bb(l)&&(d=f=!0,e.position++,zb(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,Qb(e,t,ab,!1,!0),g=e.tag,h=e.result,zb(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),zb(e,!0,t),Qb(e,t,ab,!1,!0),_=e.result),p?Lb(e,s,m,g,h,_,r,i,a):d?s.push(Lb(e,null,m,g,h,_,r,i,a)):s.push(h),zb(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}$(e,`unexpected end of the stream within a flow collection`)}r(Gb,`readFlowCollection`);function Kb(e,t){var n,r,i=lb,a=!1,o=!1,s=t,c=0,l=!1,u,d=e.input.charCodeAt(e.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)lb===i?i=d===43?db:ub:$(e,`repeat of a chomping mode identifier`);else if((u=wb(d))>=0)u===0?$(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?$(e,`repeat of an indentation width identifier`):(s=t+u-1,o=!0);else break;if(yb(d)){do d=e.input.charCodeAt(++e.position);while(yb(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!vb(d)&&d!==0)}for(;d!==0;){for(Rb(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),vb(d)){c++;continue}if(e.lineIndent<s){i===db?e.result+=Uv.repeat(`
53
- `,a?1+c:c):i===lb&&a&&(e.result+=`
54
- `);break}for(r?yb(d)?(l=!0,e.result+=Uv.repeat(`
55
- `,a?1+c:c)):l?(l=!1,e.result+=Uv.repeat(`
56
- `,c+1)):c===0?a&&(e.result+=` `):e.result+=Uv.repeat(`
57
- `,c):e.result+=Uv.repeat(`
58
- `,a?1+c:c),a=!0,o=!0,c=0,n=e.position;!vb(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Fb(e,n,e.position,!1)}return!0}r(Kb,`readBlockScalar`);function qb(e,t){var n,r=e.tag,i=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$(e,`tab characters must not be used in indentation`)),!(c!==45||(o=e.input.charCodeAt(e.position+1),!bb(o))));){if(s=!0,e.position++,zb(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,Qb(e,t,sb,!1,!0),a.push(e.result),zb(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)$(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind=`sequence`,e.result=a,!0):!1}r(qb,`readBlockSequence`);function Jb(e,t,n){var r,i,a,o,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$(e,`tab characters must not be used in indentation`)),r=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&bb(r))v===63?(g&&(Lb(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!0,i=!0):g?(g=!1,i=!0):$(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=r;else{if(o=e.line,s=e.lineStart,c=e.position,!Qb(e,n,ob,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);yb(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),bb(v)||$(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(Lb(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!1,i=!1,p=e.tag,m=e.result;else if(_)$(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=l,e.anchor=u,!0}else if(_)$(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=l,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(g&&(o=e.line,s=e.lineStart,c=e.position),Qb(e,t,cb,!0,i)&&(g?m=e.result:h=e.result),g||(Lb(e,d,f,p,m,h,o,s,c),p=m=h=null),zb(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)$(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&Lb(e,d,f,p,m,null,o,s,c),_&&(e.tag=l,e.anchor=u,e.kind=`mapping`,e.result=d),_}r(Jb,`readBlockMapping`);function Yb(e){var t,n=!1,r=!1,i,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;if(e.tag!==null&&$(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i=`!!`,o=e.input.charCodeAt(++e.position)):i=`!`,t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):$(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!bb(o);)o===33&&(r?$(e,`tag suffix cannot contain exclamation marks`):(i=e.input.slice(t-1,e.position+1),hb.test(i)||$(e,`named tag handle cannot contain such characters`),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),mb.test(a)&&$(e,`tag suffix cannot contain flow indicator characters`)}a&&!gb.test(a)&&$(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{$(e,`tag name is malformed: `+a)}return n?e.tag=a:ib.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i===`!`?e.tag=`!`+a:i===`!!`?e.tag=`tag:yaml.org,2002:`+a:$(e,`undeclared tag handle "`+i+`"`),!0}r(Yb,`readTagProperty`);function Xb(e){var t,n=e.input.charCodeAt(e.position);if(n!==38)return!1;for(e.anchor!==null&&$(e,`duplication of an anchor property`),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!bb(n)&&!xb(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&$(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(t,e.position),!0}r(Xb,`readAnchorProperty`);function Zb(e){var t,n,r=e.input.charCodeAt(e.position);if(r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!bb(r)&&!xb(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&$(e,`name of an alias node must contain at least one character`),n=e.input.slice(t,e.position),ib.call(e.anchorMap,n)||$(e,`unidentified alias "`+n+`"`),e.result=e.anchorMap[n],zb(e,!0,-1),!0}r(Zb,`readAlias`);function Qb(e,t,n,r,i){var a,o,s,c=1,l=!1,u=!1,d,f,p,m,h,g;if(e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=cb===n||sb===n,r&&zb(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;Yb(e)||Xb(e);)zb(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&=l||i,(c===1||cb===n)&&(h=ab===n||ob===n?t:t+1,g=e.position-e.lineStart,c===1?s&&(qb(e,g)||Jb(e,g,h))||Gb(e,h)?u=!0:(o&&Kb(e,h)||Ub(e,h)||Wb(e,h)?u=!0:Zb(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&$(e,`alias node should not have any properties`)):Hb(e,h,ab===n)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&qb(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===`?`){for(e.result!==null&&e.kind!==`scalar`&&$(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d<f;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==`!`){if(ib.call(e.typeMap[e.kind||`fallback`],e.tag))m=e.typeMap[e.kind||`fallback`][e.tag];else for(m=null,p=e.typeMap.multi[e.kind||`fallback`],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){m=p[d];break}m||$(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&m.kind!==e.kind&&$(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):$(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}r(Qb,`composeNode`);function $b(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(zb(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!bb(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&$(e,`directive name must not be less than one character in length`);o!==0;){for(;yb(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!vb(o));break}if(vb(o))break;for(n=e.position;o!==0&&!bb(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&Rb(e),ib.call(Pb,r)?Pb[r](e,r,i):Nb(e,`unknown document directive "`+r+`"`)}if(zb(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,zb(e,!0,-1)):a&&$(e,`directives end mark is expected`),Qb(e,e.lineIndent-1,cb,!1,!0),zb(e,!0,-1),e.checkLineBreaks&&pb.test(e.input.slice(t,e.position))&&Nb(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&Bb(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,zb(e,!0,-1));return}if(e.position<e.length-1)$(e,`end of the stream or a document separator is expected`);else return}r($b,`readDocument`);function ex(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
59
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new jb(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,$(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)$b(n);return n.documents}r(ex,`loadDocuments`);function tx(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);var r=ex(e,n);if(typeof t!=`function`)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])}r(tx,`loadAll$1`);function nx(e,t){var n=ex(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new Kv(`expected a single document in the stream, but found more`)}}r(nx,`load$1`);var rx={loadAll:tx,load:nx},ix=Object.prototype.toString,ax=Object.prototype.hasOwnProperty,ox=65279,sx=9,cx=10,lx=13,ux=32,dx=33,fx=34,px=35,mx=37,hx=38,gx=39,_x=42,vx=44,yx=45,bx=58,xx=61,Sx=62,Cx=63,wx=64,Tx=91,Ex=93,Dx=96,Ox=123,kx=124,Ax=125,jx={};jx[0]=`\\0`,jx[7]=`\\a`,jx[8]=`\\b`,jx[9]=`\\t`,jx[10]=`\\n`,jx[11]=`\\v`,jx[12]=`\\f`,jx[13]=`\\r`,jx[27]=`\\e`,jx[34]=`\\"`,jx[92]=`\\\\`,jx[133]=`\\N`,jx[160]=`\\_`,jx[8232]=`\\L`,jx[8233]=`\\P`;var Mx=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],Nx=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Px(e,t){var n,r,i,a,o,s,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&ax.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s;return n}r(Px,`compileStyleMap`);function Fx(e){var t=e.toString(16).toUpperCase(),n,r;if(e<=255)n=`x`,r=2;else if(e<=65535)n=`u`,r=4;else if(e<=4294967295)n=`U`,r=8;else throw new Kv(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+n+Uv.repeat(`0`,r-t.length)+t}r(Fx,`encodeHex`);var Ix=1,Lx=2;function Rx(e){this.schema=e.schema||rb,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Uv.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Px(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`"`?Lx:Ix,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}r(Rx,`State`);function zx(e,t){for(var n=Uv.repeat(` `,t),r=0,i=-1,a=``,o,s=e.length;r<s;)i=e.indexOf(`
60
- `,r),i===-1?(o=e.slice(r),r=s):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
61
- `&&(a+=n),a+=o;return a}r(zx,`indentString`);function Bx(e,t){return`
62
- `+Uv.repeat(` `,e.indent*t)}r(Bx,`generateNextLine`);function Vx(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}r(Vx,`testImplicitResolving`);function Hx(e){return e===ux||e===sx}r(Hx,`isWhitespace`);function Ux(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ox||65536<=e&&e<=1114111}r(Ux,`isPrintable`);function Wx(e){return Ux(e)&&e!==ox&&e!==lx&&e!==cx}r(Wx,`isNsCharOrWhitespace`);function Gx(e,t,n){var r=Wx(e),i=r&&!Hx(e);return(n?r:r&&e!==vx&&e!==Tx&&e!==Ex&&e!==Ox&&e!==Ax)&&e!==px&&!(t===bx&&!i)||Wx(t)&&!Hx(t)&&e===px||t===bx&&i}r(Gx,`isPlainSafe`);function Kx(e){return Ux(e)&&e!==ox&&!Hx(e)&&e!==yx&&e!==Cx&&e!==bx&&e!==vx&&e!==Tx&&e!==Ex&&e!==Ox&&e!==Ax&&e!==px&&e!==hx&&e!==_x&&e!==dx&&e!==kx&&e!==xx&&e!==Sx&&e!==gx&&e!==fx&&e!==mx&&e!==wx&&e!==Dx}r(Kx,`isPlainSafeFirst`);function qx(e){return!Hx(e)&&e!==bx}r(qx,`isPlainSafeLast`);function Jx(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}r(Jx,`codePointAt`);function Yx(e){return/^\n* /.test(e)}r(Yx,`needIndentIndicator`);var Xx=1,Zx=2,Qx=3,$x=4,eS=5;function tS(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=Kx(Jx(e,0))&&qx(Jx(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Jx(e,c),!Ux(l))return eS;h&&=Gx(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Jx(e,c),l===cx)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!Ux(l))return eS;h&&=Gx(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?Xx:a===Lx?eS:Zx:n>9&&Yx(e)?eS:o?a===Lx?eS:Zx:f?$x:Qx}r(tS,`chooseScalarStyle`);function nS(e,t,n,i,a){e.dump=(function(){if(t.length===0)return e.quotingType===Lx?`""`:`''`;if(!e.noCompatMode&&(Mx.indexOf(t)!==-1||Nx.test(t)))return e.quotingType===Lx?`"`+t+`"`:`'`+t+`'`;var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),c=i||e.flowLevel>-1&&n>=e.flowLevel;function l(t){return Vx(e,t)}switch(r(l,`testAmbiguity`),tS(t,c,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,a)){case Xx:return t;case Zx:return`'`+t.replace(/'/g,`''`)+`'`;case Qx:return`|`+rS(t,e.indent)+iS(zx(t,o));case $x:return`>`+rS(t,e.indent)+iS(zx(aS(t,s),o));case eS:return`"`+sS(t)+`"`;default:throw new Kv(`impossible error: invalid scalar style`)}})()}r(nS,`writeScalar`);function rS(e,t){var n=Yx(e)?String(t):``,r=e[e.length-1]===`
63
- `;return n+(r&&(e[e.length-2]===`
64
- `||e===`
65
- `)?`+`:r?``:`-`)+`
66
- `}r(rS,`blockHeader`);function iS(e){return e[e.length-1]===`
67
- `?e.slice(0,-1):e}r(iS,`dropEndingNewline`);function aS(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var r=e.indexOf(`
68
- `);return r=r===-1?e.length:r,n.lastIndex=r,oS(e.slice(0,r),t)})(),i=e[0]===`
69
- `||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?`
70
- `:``)+oS(c,t),i=a}return r}r(aS,`foldString`);function oS(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
71
- `+e.slice(i,a),i=a+1),o=s;return c+=`
72
- `,e.length-i>t&&o>i?c+=e.slice(i,o)+`
73
- `+e.slice(o+1):c+=e.slice(i),c.slice(1)}r(oS,`foldLine`);function sS(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Jx(e,i),r=jx[n],!r&&Ux(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||Fx(n);return t}r(sS,`escapeString`);function cS(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(pS(e,t,s,!1,!1)||s===void 0&&pS(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}r(cS,`writeFlowSequence`);function lS(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(pS(e,t+1,c,!0,!0,!1,!0)||c===void 0&&pS(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=Bx(e,t)),e.dump&&cx===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}r(lS,`writeBlockSequence`);function uS(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),pS(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),pS(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}r(uS,`writeFlowMapping`);function dS(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,u,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new Kv(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)f=``,(!r||i!==``)&&(f+=Bx(e,t)),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),pS(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,d&&(e.dump&&cx===e.dump.charCodeAt(0)?f+=`?`:f+=`? `),f+=e.dump,d&&(f+=Bx(e,t)),pS(e,t+1,u,!0,d)&&(e.dump&&cx===e.dump.charCodeAt(0)?f+=`:`:f+=`: `,f+=e.dump,i+=f));e.tag=a,e.dump=i||`{}`}r(dS,`writeBlockMapping`);function fS(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,ix.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(ax.call(s.represent,c))r=s.represent[c](t,c);else throw new Kv(`!<`+s.tag+`> tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}r(fS,`detectType`);function pS(e,t,n,r,i,a,o){e.tag=null,e.dump=n,fS(e,n,!1)||fS(e,n,!0);var s=ix.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var u=s===`[object Object]`||s===`[object Array]`,d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!==`?`||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump=`*ref_`+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(dS(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(uS(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?lS(e,t-1,e.dump,i):lS(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(cS(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&nS(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new Kv(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}r(pS,`writeNode`);function mS(e,t){var n=[],r=[],i,a;for(hS(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}r(mS,`getDuplicateReferences`);function hS(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)hS(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)hS(e[r[i]],t,n)}r(hS,`inspectNode`);function gS(e,t){t||={};var n=new Rx(t);n.noRefs||mS(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),pS(n,0,r,!0,!0)?n.dump+`
74
- `:``}r(gS,`dump$1`);var _S={dump:gS};function vS(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}r(vS,`renamed`);var yS=Oy,bS=rx.load;rx.loadAll,_S.dump;function xS(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function SS(e){if(e==null)return!0;if(oe(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!ce(e)&&!he(e)&&!ge(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return xS(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var CS={common:ie,getConfig:S,insertCluster:be,insertEdge:we,insertEdgeLabel:Te,insertMarkers:Ce,insertNode:ye,interpolateToCurve:le,labelHelper:xe,log:n,positionEdgeLabel:Se},wS={},TS=r(e=>{for(let t of e)wS[t.name]=t},`registerLayoutLoaders`);r(()=>{TS([{name:`dagre`,loader:r(async()=>await s(()=>import(`./dagre-BM42HDAG-4I-9kC-8.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])),`loader`)},{name:`cose-bilkent`,loader:r(async()=>await s(()=>import(`./cose-bilkent-S5V4N54A-CsjsMgdo.js`),__vite__mapDeps([17,1,18])),`loader`)}])},`registerDefaultLayoutLoaders`)();var ES=r(async(e,t)=>{if(!(e.layoutAlgorithm in wS))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=wS[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-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`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,CS,{algorithm:n.algorithm})},`render`),DS=r((e=``,{fallback:t=`dagre`}={})=>{if(e in wS)return e;if(t in wS)return n.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`),OS=`comm`,kS=`rule`,AS=`decl`,jS=`@import`,MS=`@namespace`,NS=`@keyframes`,PS=`@layer`,FS=Math.abs,IS=String.fromCharCode;function LS(e){return e.trim()}function RS(e,t,n){return e.replace(t,n)}function zS(e,t){return e.charCodeAt(t)|0}function BS(e,t,n){return e.slice(t,n)}function VS(e){return e.length}function HS(e){return e.length}function US(e,t){return t.push(e),e}var WS=1,GS=1,KS=0,qS=0,JS=0,YS=``;function XS(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:WS,column:GS,length:o,return:``,siblings:s}}function ZS(){return JS}function QS(){return JS=qS>0?zS(YS,--qS):0,GS--,JS===10&&(GS=1,WS--),JS}function $S(){return JS=qS<KS?zS(YS,qS++):0,GS++,JS===10&&(GS=1,WS++),JS}function eC(){return zS(YS,qS)}function tC(){return qS}function nC(e,t){return BS(YS,e,t)}function rC(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 iC(e){return WS=GS=1,KS=VS(YS=e),qS=0,[]}function aC(e){return YS=``,e}function oC(e){return LS(nC(qS-1,lC(e===91?e+2:e===40?e+1:e)))}function sC(e){for(;(JS=eC())&&JS<33;)$S();return rC(e)>2||rC(JS)>3?``:` `}function cC(e,t){for(;--t&&$S()&&!(JS<48||JS>102||JS>57&&JS<65||JS>70&&JS<97););return nC(e,tC()+(t<6&&eC()==32&&$S()==32))}function lC(e){for(;$S();)switch(JS){case e:return qS;case 34:case 39:e!==34&&e!==39&&lC(JS);break;case 40:e===41&&lC(e);break;case 92:$S();break}return qS}function uC(e,t){for(;$S()&&e+JS!==57&&!(e+JS===84&&eC()===47););return`/*`+nC(t,qS-1)+`*`+IS(e===47?e:$S())}function dC(e){for(;!rC(eC());)$S();return nC(e,qS)}function fC(e){return aC(pC(``,null,null,null,[``],e=iC(e),0,[0],e))}function pC(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=$S()){case 40:m!=108&&zS(w,d-1)==58?(v++,w+=`(`):w+=oC(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=oC(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=IS(y);break}w+=sC(m);break;case 92:w+=cC(tC()-1,7);continue;case 47:switch(eC()){case 42:case 47:US(hC(uC($S(),tC()),t,n,c),c),(rC(m||1)==5||rC(eC()||1)==5)&&VS(w)&&BS(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=VS(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=IS(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=RS(w,/\f/g,``)),p>0&&(VS(w)-d||h===0)&&US(p>32?gC(w+`;`,r,n,d-1,c):gC(RS(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(US(C=mC(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)pC(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(zS(w,3)===110)break;case 108:if(zS(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?pC(e,C,C,r&&US(mC(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):pC(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+VS(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&QS()==125)continue}switch(w+=IS(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(VS(w)-1)*_,_=1;break;case 64:eC()===45&&(w+=oC($S())),f=eC(),u=d=VS(b=w+=dC(tC())),y++;break;case 45:m===45&&VS(w)==2&&(h=0)}}return a}function mC(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=HS(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=BS(e,f+1,f=FS(g=o[h])),b=e;v<m;++v)(b=LS(g>0?p[v]+` `+y:RS(y,/&\f/g,p[v])))&&(c[_++]=b);return XS(e,t,n,i===0?kS:s,c,l,u,d)}function hC(e,t,n,r){return XS(e,t,n,OS,IS(ZS()),BS(e,2,-2),0,r)}function gC(e,t,n,r,i){return XS(e,t,n,AS,BS(e,0,r),BS(e,r+1,-1),r,i)}function _C(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function vC(e,t,n,r){switch(e.type){case PS:if(e.children.length)break;case jS:case MS:case AS:return e.return=e.return||e.value;case OS:return``;case NS:return e.return=e.value+`{`+_C(e.children,r)+`}`;case kS:if(!VS(e.value=e.props.join(`,`)))return``}return VS(n=_C(e.children,r))?e.return=e.value+`{`+n+`}`:``}function yC(e){var t=HS(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}var bC=`c4`,xC={id:bC,detector:r(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./c4Diagram-AAUBKEIU-BoXkzmRI.js`);return{diagram:e}},__vite__mapDeps([19,1,2,5,4,20]));return{id:bC,diagram:e}},`loader`)},SC=`flowchart`,CC={id:SC,detector:r((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-Cp2YiaJS.js`);return{diagram:e}},__vite__mapDeps([21,1,2,3,4,5,22,23,8,9,10,11,24,12,25,13,14,15,16,20]));return{id:SC,diagram:e}},`loader`)},wC=`flowchart-v2`,TC={id:wC,detector:r((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-Cp2YiaJS.js`);return{diagram:e}},__vite__mapDeps([21,1,2,3,4,5,22,23,8,9,10,11,24,12,25,13,14,15,16,20]));return{id:wC,diagram:e}},`loader`)},EC=`er`,DC={id:EC,detector:r(e=>/^\s*erDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./erDiagram-TEJ5UH35-DGrhtXAQ.js`);return{diagram:e}},__vite__mapDeps([26,1,2,3,4,5,22,23,8,9,10,11,24,12,13,14,15,16]));return{id:EC,diagram:e}},`loader`)},OC=`gitGraph`,kC={id:OC,detector:r(e=>/^\s*gitGraph/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-PVQCEYII-DDwOyc6i.js`);return{diagram:e}},__vite__mapDeps([27,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40,41]));return{id:OC,diagram:e}},`loader`)},AC=`gantt`,jC={id:AC,detector:r(e=>/^\s*gantt/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./ganttDiagram-6RSMTGT7-C-jGZVXC.js`);return{diagram:e}},__vite__mapDeps([42,1,2,5,43,44,45,4]));return{id:AC,diagram:e}},`loader`)},MC=`info`,NC={id:MC,detector:r(e=>/^\s*info/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./infoDiagram-5YYISTIA-B_rDp_NJ.js`);return{diagram:e}},__vite__mapDeps([46,1,2,28,29,30,31,32,33,34,35,36,37,38,39]));return{id:MC,diagram:e}},`loader`)},PC=`pie`,FC={id:PC,detector:r(e=>/^\s*pie/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./pieDiagram-4H26LBE5-Dm2S6Ggt.js`);return{diagram:e}},__vite__mapDeps([47,1,2,5,28,29,30,31,32,33,34,35,36,37,38,39,15,48,45,49,16,4,40]));return{id:PC,diagram:e}},`loader`)},IC=`quadrantChart`,LC={id:IC,detector:r(e=>/^\s*quadrantChart/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./quadrantDiagram-W4KKPZXB-CgiO6Q9Y.js`);return{diagram:e}},__vite__mapDeps([50,1,2,43,44,45]));return{id:IC,diagram:e}},`loader`)},RC=`xychart`,zC={id:RC,detector:r(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./xychartDiagram-2RQKCTM6-CbAQZMXv.js`);return{diagram:e}},__vite__mapDeps([51,1,2,3,4,5,43,44,45,48,14,15,16]));return{id:RC,diagram:e}},`loader`)},BC=`requirement`,VC={id:BC,detector:r(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./requirementDiagram-4Y6WPE33-BFL5yKh2.js`);return{diagram:e}},__vite__mapDeps([52,1,2,3,4,5,23,8,9,10,11,24,12,13,14,15,16]));return{id:BC,diagram:e}},`loader`)},HC=`sequence`,UC={id:HC,detector:r(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./sequenceDiagram-3UESZ5HK-BMNloRY9.js`);return{diagram:e}},__vite__mapDeps([53,1,2,5,4,20,41]));return{id:HC,diagram:e}},`loader`)},WC=`class`,GC={id:WC,detector:r((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./classDiagram-4FO5ZUOK-SuK_oLpa.js`);return{diagram:e}},__vite__mapDeps([54,1,2,3,4,5,23,8,9,10,11,24,55,25,20,12,13,14,15,16]));return{id:WC,diagram:e}},`loader`)},KC=`classDiagram`,qC={id:KC,detector:r((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./classDiagram-v2-Q7XG4LA2-DMlc0uaN.js`);return{diagram:e}},__vite__mapDeps([56,1,2,3,4,5,23,8,9,10,11,24,55,25,20,12,13,14,15,16]));return{id:KC,diagram:e}},`loader`)},JC=`state`,YC={id:JC,detector:r((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./stateDiagram-AJRCARHV-B1fkBSkt.js`);return{diagram:e}},__vite__mapDeps([57,1,2,3,4,5,14,15,16,6,7,23,8,9,10,11,24,58,12,13]));return{id:JC,diagram:e}},`loader`)},XC=`stateDiagram`,ZC={id:XC,detector:r((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-BHNVJYJU-Fm1RY0qD.js`);return{diagram:e}},__vite__mapDeps([59,1,2,3,4,5,23,8,9,10,11,24,58,12,13,14,15,16]));return{id:XC,diagram:e}},`loader`)},QC=`journey`,$C={id:QC,detector:r(e=>/^\s*journey/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./journeyDiagram-JHISSGLW-BjEC1jFt.js`);return{diagram:e}},__vite__mapDeps([60,1,2,49,5,15,25,20]));return{id:QC,diagram:e}},`loader`)},ew={draw:r((e,t,r)=>{n.debug(`rendering svg for syntax error
75
- `);let i=Iv(t),a=i.append(`g`);i.attr(`viewBox`,`0 0 2412 512`),C(i,100,512,!0),a.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`),a.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`),a.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`),a.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`),a.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`),a.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`),a.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`),a.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`)},tw=ew,nw={db:{},renderer:ew,parser:{parse:r(()=>{},`parse`)}},rw=`flowchart-elk`,iw={id:rw,detector:r((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-Cp2YiaJS.js`);return{diagram:e}},__vite__mapDeps([21,1,2,3,4,5,22,23,8,9,10,11,24,12,25,13,14,15,16,20]));return{id:rw,diagram:e}},`loader`)},aw=`timeline`,ow={id:aw,detector:r(e=>/^\s*timeline/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./timeline-definition-PNZ67QCA-CdNdPzQU.js`);return{diagram:e}},__vite__mapDeps([61,1,2,49,5,15,4]));return{id:aw,diagram:e}},`loader`)},sw=`mindmap`,cw={id:sw,detector:r(e=>/^\s*mindmap/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./mindmap-definition-RKZ34NQL-uf3ACEiM.js`);return{diagram:e}},__vite__mapDeps([62,1,2,3,4,5,23,8,9,10,11,24,12,13,14,15,16]));return{id:sw,diagram:e}},`loader`)},lw=`kanban`,uw={id:lw,detector:r(e=>/^\s*kanban/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./kanban-definition-UN3LZRKU-BVkPEFcm.js`);return{diagram:e}},__vite__mapDeps([63,1,2,3,4,5,8,9,10,11,25]));return{id:lw,diagram:e}},`loader`)},dw=`sankey`,fw={id:dw,detector:r(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./sankeyDiagram-5OEKKPKP-DNSdTx8o.js`);return{diagram:e}},__vite__mapDeps([64,1,2,48,45]));return{id:dw,diagram:e}},`loader`)},pw=`packet`,mw={id:pw,detector:r(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-LMA3HP47-vnkpPjMC.js`);return{diagram:e}},__vite__mapDeps([65,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40]));return{id:pw,diagram:e}},`loader`)},hw=`radar`,gw={id:hw,detector:r(e=>/^\s*radar-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-2AECGRRQ-pAKf5nK6.js`);return{diagram:e}},__vite__mapDeps([66,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40]));return{id:hw,diagram:e}},`loader`)},_w=`block`,vw={id:_w,detector:r(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./blockDiagram-GPEHLZMM-Cfjv0TRV.js`);return{diagram:e}},__vite__mapDeps([67,1,2,3,4,5,14,15,16,7,22,12,25,9]));return{id:_w,diagram:e}},`loader`)},yw=`treeView`,bw={id:yw,detector:r(e=>/^\s*treeView-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-5GNKFQAL-CzKwZhm6.js`);return{diagram:e}},__vite__mapDeps([68,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40,41]));return{id:yw,diagram:e}},`loader`)},xw=`architecture`,Sw={id:xw,detector:r(e=>/^\s*architecture/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./architectureDiagram-3BPJPVTR-D4589TUy.js`);return{diagram:e}},__vite__mapDeps([69,1,2,3,4,5,28,29,30,31,32,33,34,35,36,37,38,39,18,40]));return{id:xw,diagram:e}},`loader`)},Cw=`eventmodeling`,ww={id:Cw,detector:r(e=>/^\s*eventmodeling/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-KO2AKTUF-BZNjYRzg.js`);return{diagram:e}},__vite__mapDeps([70,1,2,30,28,29,31,32,33,34,35,36,37,38,39,4,5,40]));return{id:Cw,diagram:e}},`loader`)},Tw=`ishikawa`,Ew={id:Tw,detector:r(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-YF4QCWOH-ggQN-_CZ.js`);return{diagram:e}},__vite__mapDeps([71,1,2,4,5,11]));return{id:Tw,diagram:e}},`loader`)},Dw=`venn`,Ow={id:Dw,detector:r(e=>/^\s*venn-beta/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./vennDiagram-CIIHVFJN-Cfr9Kji9.js`);return{diagram:e}},__vite__mapDeps([72,1,2,4,5,11]));return{id:Dw,diagram:e}},`loader`)},kw=`treemap`,Aw={id:kw,detector:r(e=>/^\s*treemap/.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./diagram-OG6HWLK6-CkBTEmTA.js`);return{diagram:e}},__vite__mapDeps([73,1,2,28,29,30,31,32,33,34,35,36,37,38,39,44,48,45,4,5,23,40,10]));return{id:kw,diagram:e}},`loader`)},jw=`wardley-beta`,Mw={id:jw,detector:r(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:r(async()=>{let{diagram:e}=await s(async()=>{let{diagram:e}=await import(`./wardleyDiagram-YWT4CUSO-BU30t5hg.js`);return{diagram:e}},__vite__mapDeps([74,1,2,28,29,30,31,32,33,34,35,36,37,38,39,4,5,40]));return{id:jw,diagram:e}},`loader`)},Nw=!1,Pw=r(()=>{Nw||(Nw=!0,f(`error`,nw,e=>e.toLowerCase().trim()===`error`),f(`---`,{db:{clear:r(()=>{},`clear`)},styles:{},renderer:{draw:r(()=>{},`draw`)},parser:{parse:r(()=>{throw 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:r(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),p(iw,cw,Sw),p(xC,uw,qC,GC,DC,jC,NC,FC,VC,UC,TC,CC,ow,kC,ZC,YC,$C,LC,fw,mw,zC,vw,ww,bw,gw,Ew,Aw,Ow,Mw))},`addDiagrams`),Fw=r(async()=>{n.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(ee).map(async([e,{detector:t,loader:r}])=>{if(r)try{h(e)}catch{try{let{diagram:e,id:n}=await r();f(n,e,t)}catch(t){throw n.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete ee[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){n.error(`Failed to load ${e.length} external diagrams`);for(let t of e)n.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),Iw=`graphics-document document`;function Lw(e,t){e.attr(`role`,Iw),t!==``&&e.attr(`aria-roledescription`,t)}r(Lw,`setA11yDiagramInfo`);function Rw(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}r(Rw,`addSVGa11yTitleDescription`);var zw=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{r(this,`Diagram`)}static async fromText(t,n={}){let r=S(),i=te(t,r);t=me(t)+`
76
- `;try{h(i)}catch{let e=c(i);if(!e)throw new O(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();f(t,n)}let{db:a,parser:o,renderer:s,init:l}=h(i);return o.parser&&(o.parser.yy=a),a.clear?.(),l?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(t),new e(i,t,a,o,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Bw=[],Vw=r(()=>{Bw.forEach(e=>{e()}),Bw=[]},`attachFunctions`),Hw=r(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function Uw(e){let t=e.match(x);if(!t)return{text:e,metadata:{}};let n=bS(t[1],{schema:yS})??{};n=typeof n==`object`&&!Array.isArray(n)?n:{};let r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}r(Uw,`extractFrontMatter`);var Ww=r(e=>e.replace(/\r\n?/g,`
77
- `).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),Gw=r(e=>{let{text:t,metadata:n}=Uw(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),Kw=r(e=>{let t=de.detectInit(e)??{},n=de.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:fe(e),directive:t}},`processDirectives`);function qw(e){let t=Gw(Ww(e)),n=Kw(t.text),r=pe(t.config,n.directive);return e=Hw(n.text),{code:e,title:t.title,config:r}}r(qw,`preprocessDiagram`);function Jw(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}r(Jw,`toBase64`);var Yw=5e4,Xw=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,Zw=`sandbox`,Qw=`loose`,$w=`http://www.w3.org/2000/svg`,eT=`http://www.w3.org/1999/xlink`,tT=`http://www.w3.org/1999/xhtml`,nT=`100%`,rT=`100%`,iT=`border:0;margin:0;`,aT=`margin:0`,oT=`allow-top-navigation-by-user-activation allow-popups`,sT=`The "iframe" tag is not supported by your browser.`,cT=[`foreignobject`],lT=[`dominant-baseline`];function uT(e){let t=qw(e);return u(),D(t.config??{}),t}r(uT,`processAndSetConfigs`);async function dT(e,t){Pw();try{let{code:t,config:n}=uT(e);return{diagramType:(await CT(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}r(dT,`parse`);var fT=r((e,t,n=[])=>`.${e} ${t} ${d(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),pT=r((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=g(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{SS(e.styles)||r.forEach(t=>{n.insertRule(fT(e.id,t,e.styles),n.cssRules.length)}),SS(e.textStyles)||n.insertRule(fT(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0)if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=E(t)+`
78
- `}else r+=`${e.themeCSS}
79
- `;return r+E(n)},`createCssStyles`),mT=r((e,t)=>_C(fC(`${e}{${t}}`),yC([r(function(t,r,i,a){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(t=>t.startsWith(e)?t:`${e} ${t}`)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(n.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=OS))},`addNamespace`),vC])),`compileCSS`),hT=r((e,t,n,r)=>mT(r,y(t,pT(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)),`createUserStyles`),gT=r((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=se(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),_T=r((e=``,t)=>`<iframe style="width:${nT};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:rT};${iT}" src="data:text/html;charset=UTF-8;base64,${Jw(`<body style="${aT}">${e}</body>`)}" sandbox="${oT}">
80
- ${sT}
81
- </iframe>`,`putIntoIFrame`),vT=r((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,$w);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function yT(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}r(yT,`sandboxedIframe`);var bT=r((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),xT=r(async function(e,t,a){Pw();let o=uT(t);t=o.code;let s=S();n.debug(s),t.length>(s?.maxTextSize??Yw)&&(t=Xw);let c=`#${e}`,l=`i`+e,u=`#`+l,d=`d`+e,f=`#`+d,p=r(()=>{let e=i(h?u:f).node();e&&`remove`in e&&e.remove()},`removeTempElements`),m=i(document.body),h=s.securityLevel===Zw,g=s.securityLevel===Qw,_=s.fontFamily;a===void 0?(bT(document,e,d,l),h?(m=i(yT(i(document.body),l).nodes()[0].contentDocument.body),m.node().style.margin=`0`):m=i(`body`),vT(m,e,d)):(a&&(a.innerHTML=``),h?(m=i(yT(i(a),l).nodes()[0].contentDocument.body),m.node().style.margin=`0`):m=i(a),vT(m,e,d,`font-family: ${_}`,eT));let v,y;try{v=await zw.fromText(t,{title:o.title})}catch(e){if(s.suppressErrorRendering)throw p(),e;v=await zw.fromText(`error`),y=e}let b=m.select(f).node(),x=v.type,C=b.firstChild,E=C.firstChild,ee=v.renderer.getClasses?.(t,v),D=hT(s,x,ee,c),te=document.createElement(`style`);te.innerHTML=D,C.insertBefore(te,E);try{await v.renderer.draw(t,e,`11.15.0`,v)}catch(n){throw s.suppressErrorRendering?p():tw.draw(t,e,`11.15.0`),n}let ne=m.select(`${f} svg`),re=v.db.getAccTitle?.(),ie=v.db.getAccDescription?.();wT(x,ne,re,ie),m.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,tT);let O=m.select(f).node().innerHTML;if(n.debug(`config.arrowMarkerAbsolute`,s.arrowMarkerAbsolute),O=gT(O,h,T(s.arrowMarkerAbsolute)),h){let e=m.select(f+` svg`).node();O=_T(O,e)}else g||(O=w.sanitize(O,{ADD_TAGS:cT,ADD_ATTR:lT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Vw(),y)throw y;return p(),{diagramType:x,svg:O,bindFunctions:v.db.bindFunctions}},`render`);function ST(t={}){let n=re({},t);n?.fontFamily&&!n.themeVariables?.fontFamily&&(n.themeVariables||={},n.themeVariables.fontFamily=n.fontFamily),_(n),n?.theme&&n.theme in b?n.themeVariables=b[n.theme].getThemeVariables(n.themeVariables):n&&(n.themeVariables=b.default.getThemeVariables(n.themeVariables)),e((typeof n==`object`?ne(n):l()).logLevel),Pw()}r(ST,`initialize`);var CT=r((e,t={})=>{let{code:n}=qw(e);return zw.fromText(n,t)},`getDiagramFromText`);function wT(e,t,n,r){Lw(t,e),Rw(t,n,r,t.attr(`id`))}r(wT,`addA11yInfo`);var TT=Object.freeze({render:xT,parse:dT,getDiagramFromText:CT,initialize:ST,getConfig:S,setConfig:v,getSiteConfig:l,updateSiteConfig:m,reset:r(()=>{u()},`reset`),globalReset:r(()=>{u(k)},`globalReset`),defaultConfig:k});e(S().logLevel),u(S());var ET=r((e,t,r)=>{n.warn(e),ue(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`),DT=r(async function(e={querySelector:`.mermaid`}){try{await OT(e)}catch(t){if(ue(t)&&n.error(t.str),zT.parseError&&zT.parseError(t),!e.suppressErrors)throw n.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),OT=r(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:`.mermaid`}){let i=TT.getConfig();n.debug(`${e?``:`No `}Callback function found`);let a;if(r)a=r;else if(t)a=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);n.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(n.debug(`Start On Load: `+i?.startOnLoad),TT.updateSiteConfig({startOnLoad:i?.startOnLoad}));let o=new de.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),s,c=[];for(let t of Array.from(a)){if(n.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let r=`mermaid-${o.next()}`;s=t.innerHTML,s=ve(de.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let i=de.detectInit(s);i&&n.debug(`Detected early reinit: `,i);try{let{svg:n,bindFunctions:i}=await RT(r,s,t);t.innerHTML=n,e&&await e(r),i&&i(t)}catch(e){ET(e,c,zT.parseError)}}if(c.length>0)throw c[0]},`runThrowsErrors`),kT=r(function(e){TT.initialize(e)},`initialize`),AT=r(async function(e,t,r){n.warn(`mermaid.init is deprecated. Please use run instead.`),e&&kT(e);let i={postRenderCallback:r,querySelector:`.mermaid`};typeof t==`string`?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await DT(i)},`init`),jT=r(async(e,{lazyLoad:t=!0}={})=>{Pw(),p(...e),t===!1&&await Fw()},`registerExternalDiagrams`),MT=r(function(){if(zT.startOnLoad){let{startOnLoad:e}=TT.getConfig();e&&zT.run().catch(e=>n.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,MT,!1);var NT=r(function(e){zT.parseError=e},`setParseErrorHandler`),PT=[],FT=!1,IT=r(async()=>{if(!FT){for(FT=!0;PT.length>0;){let e=PT.shift();if(e)try{await e()}catch(e){n.error(`Error executing queue`,e)}}FT=!1}},`executeQueue`),LT=r(async(e,t)=>new Promise((i,a)=>{let o=r(()=>new Promise((r,o)=>{TT.parse(e,t).then(e=>{r(e),i(e)},e=>{n.error(`Error parsing`,e),zT.parseError?.(e),o(e),a(e)})}),`performCall`);PT.push(o),IT().catch(a)}),`parse`),RT=r((e,t,i)=>new Promise((a,o)=>{let s=r(()=>new Promise((r,s)=>{TT.render(e,t,i).then(e=>{r(e),a(e)},e=>{n.error(`Error parsing`,e),zT.parseError?.(e),s(e),o(e)})}),`performCall`);PT.push(s),IT().catch(o)}),`render`),zT={startOnLoad:!0,mermaidAPI:TT,parse:LT,render:RT,init:AT,run:DT,registerExternalDiagrams:jT,registerLayoutLoaders:TS,initialize:kT,parseError:void 0,contentLoaded:MT,setParseErrorHandler:NT,detectType:te,registerIconPacks:_e,getRegisteredDiagramsMetadata:r(()=>Object.keys(ee).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},BT=zT;BT.initialize({startOnLoad:!1,securityLevel:`strict`,theme:`base`,themeVariables:{background:`transparent`,mainBkg:`#050505`,primaryColor:`#050505`,primaryBorderColor:`#2a2a2a`,primaryTextColor:`#ffffff`,lineColor:`#c084fc`,secondaryColor:`#101010`,tertiaryColor:`#000000`,fontFamily:`JetBrains Mono Variable, ui-monospace, monospace`}});function VT({chart:e}){let t=(0,A.useId)().replaceAll(`:`,``),[n,r]=(0,A.useState)(null),[i,a]=(0,A.useState)(null);return(0,A.useEffect)(()=>{let n=!1;return r(null),a(null),BT.render(`mermaid-${t}`,e).then(({svg:e})=>{n||r(e)}).catch(e=>{n||a(e instanceof Error?e.message:String(e))}),()=>{n=!0}},[e,t]),i?(0,j.jsx)(`pre`,{className:`my-2 overflow-auto border border-err p-3 text-[11px] text-err`,children:i}):n?(0,j.jsx)(`div`,{className:`mermaid-host panel my-3 overflow-auto p-3`,dangerouslySetInnerHTML:{__html:n}}):(0,j.jsx)(`div`,{className:`panel my-2 p-3 text-xs text-muted`,children:`rendering diagram…`})}var HT=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function UT(e){return WT(e)}function WT(e){return Array.isArray(e)?GT(e):e instanceof RegExp?e:typeof e==`object`?KT(e):e}function GT(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=WT(e[n]);return t}function KT(e){let t={};for(let n in e)t[n]=WT(e[n]);return t}function qT(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function JT(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?JT(e.substring(0,e.length-1)):e.substr(~t+1)}var YT=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,XT=class{static hasCaptures(e){return e===null?!1:(YT.lastIndex=0,YT.test(e))}static replaceCaptures(e,t,n){return e.replace(YT,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function ZT(e,t){return e<t?-1:+(e>t)}function QT(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=ZT(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function $T(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 eE(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var tE=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},nE=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(sE(e),t)}static createFromParsedTheme(e,t){return uE(e,t)}_cachedMatchRoot=new tE(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>iE(e.parent,t.parentScopes));return n?new oE(n.fontStyle,n.foreground,n.background):null}},rE=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function iE(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!aE(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function aE(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var oE=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function sE(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&$T(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&$T(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new cE(l,u,e,o,s,c)}}return n}var cE=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},lE=(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))(lE||{});function uE(e,t){e.sort((e,t)=>{let n=ZT(e.scope,t.scope);return n!==0||(n=QT(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new dE(t),o=new oE(n,a.getId(r),a.getId(i)),s=new mE(new pE(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new nE(a,o,s)}var dE=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;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 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)}},fE=Object.freeze([]),pE=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||fE,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},mE=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),pE.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(QT(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new pE(e,t,n,r,i))}},hE=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=_E(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function gE(e){return e}function _E(e){return e}function vE(e,t){let n=[],r=bE(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(yE(i)){let e=[];do e.push(i),i=r.next();while(yE(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function yE(e){return!!e&&!!e.match(/[\w\.:]+/)}function bE(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function xE(e){typeof e.dispose==`function`&&e.dispose()}var SE=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},CE=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},wE=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},TE=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new SE(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new wE;for(let n of e)EE(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof SE){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function EE(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof SE?OE({baseGrammar:a,selfGrammar:i},r):DE(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new SE(e))}function DE(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];kE([r],t,n)}}function OE(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&kE(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&kE(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function kE(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?qT({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&kE(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=FE(i);switch(a.kind){case 0:OE({...t,selfGrammar:t.baseGrammar},n);break;case 1:OE(t,n);break;case 2:DE(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?DE(a.ruleName,i,n):OE(i,n)}else a.kind===4?n.add(new CE(a.scopeName,a.ruleName)):n.add(new SE(a.scopeName));break}}}var AE=class{kind=0},jE=class{kind=1},ME=class{constructor(e){this.ruleName=e}kind=2},NE=class{constructor(e){this.scopeName=e}kind=3},PE=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function FE(e){if(e===`$base`)return new AE;if(e===`$self`)return new jE;let t=e.indexOf(`#`);return t===-1?new NE(e):t===0?new ME(e.substring(1)):new PE(e.substring(0,t),e.substring(t+1))}var IE=/\\(\d+)/,LE=/\\(\d+)/g,RE=-1,zE=-2;function BE(e){return e}function VE(e){return e}var HE=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=XT.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=XT.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${JT(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:XT.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:XT.replaceCaptures(this._contentName,e,t)}},UE=class extends HE{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},WE=class extends HE{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new YE(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new XE,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},GE=class extends HE{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new XE,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},KE=class extends HE{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new YE(i,this.id),this.beginCaptures=a,this._end=new YE(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new XE;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},qE=class extends HE{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new YE(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new YE(o,zE),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(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new XE;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new XE,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},JE=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new UE(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new WE(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=qT({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new GE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new qE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new KE(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=FE(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof GE||e instanceof KE||e instanceof qE)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},YE=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=IE.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return LE.lastIndex=0,this.source.replace(LE,(e,t)=>eE(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},XE=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){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(),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(e=>e.source);this._cached=new ZE(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new ZE(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},ZE=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
82
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},QE=class{constructor(e,t){this.languageId=e,this.tokenType=t}},$E=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new QE(e,8),this._embeddedLanguagesMatcher=new eD(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new QE(0,0);_getBasicScopeAttributes=new tE(e=>new QE(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},eD=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>eE(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var tD=!1,nD=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function rD(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=iD(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new nD(i,!0);f()}return new nD(i,!1);function f(){let o=aD(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===RE){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),dD(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof KE){let r=o;dD(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof qE){let r=o;dD(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(dD(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function iD(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof qE&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=lD(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==zE){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),dD(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function aD(e,t,n,r,i,a){let o=oD(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=sD(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function oD(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=cD(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function sD(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=cD(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function cD(e,t,n,r,i){return tD?{ruleScanner:e.compile(t,n),findOptions:uD(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function lD(e,t,n,r,i){return tD?{ruleScanner:e.compileWhile(t,n),findOptions:uD(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function uD(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function dD(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));rD(e,p,n&&d.start===0,d.start,f,i,!1,0),xE(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new fD(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var fD=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function pD(e,t,n,r,i,a,o,s){return new _D(e,t,n,r,i,a,o,s)}function mD(e,t,n,r,i){let a=vE(t,hD),o=JE.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function hD(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(gD(t[r],e))return n=r+1,!0;return!1})}function gD(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var _D=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new $E(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=vD(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=vE(e,hD);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let 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(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)mD(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&mD(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(BE(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[VE(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=vD(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=JE.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===bD.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=hE.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?yD.createRootAndLookUpScopeName(a,r,this):yD.createRoot(`unknown`,r),t=new bD(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
83
- `;let a=this.createOnigString(e),o=a.content.length,s=new SD(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=rD(this,a,i,0,t,s,!0,r);return xE(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function vD(e,t){return e=UT(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 yD=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=rE.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new rE(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new rE(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),hE.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},bD=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?yD.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:VE(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=yD.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,BE(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,yD.fromExtension(r,n.contentNameScopesList))}},xD=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):vE(e,hD).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>vE(e,hD).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},SD=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=hE.set(n,0,gE(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=hE.set(n,0,8,r,-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}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},CD=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let 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,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,pD(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},wD=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new CD(nE.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(nE.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new xD(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new TE(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},TD=bD.NULL,ED=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],DD=/["&'<>`]/g,OD=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,kD=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,AD=/[|\\{}()[\]^$+*?.]/g,jD=new WeakMap;function MD(e,t){if(e=e.replace(t.subset?ND(t.subset):DD,r),t.subset||t.escapeOnly)return e;return e.replace(OD,n).replace(kD,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function ND(e){let t=jD.get(e);return t||(t=PD(e),jD.set(e,t)),t}function PD(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(AD,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var FD=/[\dA-Fa-f]/;function ID(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!FD.test(String.fromCharCode(t))?r:r+`;`}var LD=/\d/;function RD(e,t,n){let r=`&#`+String(e);return n&&t&&!LD.test(String.fromCharCode(t))?r:r+`;`}var zD=`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`.split(`.`),BD={nbsp:`\xA0`,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:`€`},VD=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],HD={}.hasOwnProperty,UD={},WD;for(WD in BD)HD.call(BD,WD)&&(UD[BD[WD]]=WD);var GD=/[^\dA-Za-z]/;function KD(e,t,n,r){let i=String.fromCharCode(e);if(HD.call(UD,i)){let e=UD[i],a=`&`+e;return n&&zD.includes(e)&&!VD.includes(e)&&(!r||t&&t!==61&&GD.test(String.fromCharCode(t)))?a:a+`;`}return``}function qD(e,t,n){let r=ID(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=KD(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=RD(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function JD(e,t){return MD(e,Object.assign({format:qD},t))}var YD=/^>|^->|<!--|-->|--!>|<!-$/g,XD=[`>`],ZD=[`<`,`>`];function QD(e,t,n,r){return r.settings.bogusComments?`<?`+JD(e.value,Object.assign({},r.settings.characterReferences,{subset:XD}))+`>`:`<!--`+e.value.replace(YD,i)+`-->`;function i(e){return JD(e,Object.assign({},r.settings.characterReferences,{subset:ZD}))}}function $D(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var eO=rO(1),tO=rO(-1),nO=[];function rO(e){return t;function t(t,n,r){let i=t?t.children:nO,a=(n||0)+e,o=i[a];if(!r)for(;o&&dl(o);)a+=e,o=i[a];return o}}var iO={}.hasOwnProperty;function aO(e){return t;function t(t,n,r){return iO.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var oO=aO({body:lO,caption:sO,colgroup:sO,dd:pO,dt:fO,head:sO,html:cO,li:dO,optgroup:hO,option:gO,p:uO,rp:mO,rt:mO,tbody:vO,td:xO,tfoot:yO,th:xO,thead:_O,tr:bO});function sO(e,t,n){let r=eO(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&dl(r.value.charAt(0)))}function cO(e,t,n){let r=eO(n,t);return!r||r.type!==`comment`}function lO(e,t,n){let r=eO(n,t);return!r||r.type!==`comment`}function uO(e,t,n){let r=eO(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function dO(e,t,n){let r=eO(n,t);return!r||r.type===`element`&&r.tagName===`li`}function fO(e,t,n){let r=eO(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function pO(e,t,n){let r=eO(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function mO(e,t,n){let r=eO(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function hO(e,t,n){let r=eO(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function gO(e,t,n){let r=eO(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function _O(e,t,n){let r=eO(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function vO(e,t,n){let r=eO(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function yO(e,t,n){return!eO(n,t)}function bO(e,t,n){let r=eO(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function xO(e,t,n){let r=eO(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var SO=aO({body:TO,colgroup:EO,head:wO,html:CO,tbody:DO});function CO(e){let t=eO(e,-1);return!t||t.type!==`comment`}function wO(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function TO(e){let t=eO(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&dl(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function EO(e,t,n){let r=tO(n,t),i=eO(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&oO(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function DO(e,t,n){let r=tO(n,t),i=eO(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&oO(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var OO={name:[[`
84
- \f\r &/=>`.split(``),`
85
- \f\r "&'/=>\``.split(``)],[`\0
86
- \f\r "&'/<=>`.split(``),`\0
87
- \f\r "&'/<=>\``.split(``)]],unquoted:[[`
88
- \f\r &>`.split(``),`\0
89
- \f\r "&'<=>\``.split(``)],[`\0
90
- \f\r "&'<=>\``.split(``),`\0
91
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function kO(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=U);let l=AO(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!SO(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!oO(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function AO(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=jO(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function jO(e,t,n){let r=Bl(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=JD(r.attribute,Object.assign({},e.settings.characterReferences,{subset:OO.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?al:W)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=JD(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:OO.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&Ph(n,o)>Ph(n,e.alternative)&&(o=e.alternative),s=o+JD(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?OO.single:OO.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var MO=[`<`,`&`];function NO(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:JD(e.value,Object.assign({},r.settings.characterReferences,{subset:MO}))}function PO(e,t,n,r){return r.settings.allowDangerousHtml?e.value:NO(e,t,n,r)}function FO(e,t,n,r){return r.all(e)}var IO=Og(`type`,{invalid:LO,unknown:RO,handlers:{comment:QD,doctype:$D,element:kO,raw:PO,root:FO,text:NO}});function LO(e){throw Error("Expected node, not `"+e+"`")}function RO(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var zO={},BO={},VO=[];function HO(e,t){let n=t||zO,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:UO,all:WO,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ED,characterReferences:n.characterReferences||BO,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?U:H,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function UO(e,t,n){return IO(e,t,n,this)}function WO(e){let t=[],n=e&&e.children||VO,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function GO(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function KO(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function qO(e){return Array.isArray(e)?e:[e]}async function JO(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function YO(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function XO(e){return e===`ansi`||YO(e)}function ZO(e){return e===`none`}function QO(e){return ZO(e)}function $O(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function ek(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function tk(e){let t=ek(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function nk(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var rk=`light-dark()`,ik=[`color`,`background-color`];function ak(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function ok(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?ak(e,t):e})):e}function sk(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>ck(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&ik.includes(a))if(r===rk&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new HT('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function ck(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&lE.Italic&&(t[`font-style`]=`italic`),e.fontStyle&lE.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&lE.Underline&&n.push(`underline`),e.fontStyle&lE.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function lk(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var uk=new WeakMap;function dk(e,t){uk.set(e,t)}function fk(e){return uk.get(e)}var pk=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(qO(n).map(e=>[e,TD])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return mk(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function mk(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function hk(e,t){if(!(e instanceof pk))throw new HT(`Invalid grammar state`);return e.getInternalStack(t)}function gk(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new HT(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new HT(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new HT(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=tk(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));_k(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return ok(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new HT(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=vk(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new HT(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new HT(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&$O(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function _k(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new HT(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new HT(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function vk(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(vk).join(``):``}var yk=[gk()];function bk(e){let t=xk(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...yk]}function xk(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Sk=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Ck={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function wk(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Tk(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Ek(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Ck[r]&&t.push({type:`setDecoration`,value:Ck[r]});else if(r<=29){let e=Ck[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Sk[r-30]}});else if(r===38){let n=Tk(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Sk[r-40]}});else if(r===48){let n=Tk(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Sk[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Sk[r-100+8]}})}return t}function Dk(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=wk(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Ek(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Ok={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 kk(e=Ok){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Sk.length;e++)r.push(t(Sk[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Ak={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 jk(e,t,n){let r=GO(e,n),i=ek(t),a=kk(Object.fromEntries(Sk.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Ak[t]]}))),o=Dk();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=KO(i,r),o=KO(o,r),n.decorations.has(`dim`)&&(i=Mk(i));let s=lE.None;return n.decorations.has(`bold`)&&(s|=lE.Bold),n.decorations.has(`italic`)&&(s|=lE.Italic),n.decorations.has(`underline`)&&(s|=lE.Underline),n.decorations.has(`strikethrough`)&&(s|=lE.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Mk(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Nk(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(YO(i)||ZO(r))return ek(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return jk(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new HT(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new HT(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Fk(t,s,a,o,n)}function Pk(...e){if(e.length===2)return fk(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(YO(i)||ZO(a))throw new HT(`Plain language does not have grammar state`);if(i===`ansi`)throw new HT(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new pk(Ik(n,c,o,s,r).stateStack,c.name,o.name)}function Fk(e,t,n,r,i){let a=Ik(e,t,n,r,i),o=new pk(a.stateStack,t.name,n.name);return dk(a.tokens,o),a.tokens}function Ik(e,t,n,r,i){let a=GO(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=ek(e),l=i.grammarState?hk(i.grammarState,n.name)??TD:i.grammarContextCode==null?TD:Ik(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=KO(r[hE.getForeground(s)],a),l=hE.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Lk(t.scopes):Rk(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Lk(e){return e.map(e=>({scopeName:e}))}function Rk(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Vk(e,i,t.slice(0,r))}}return n}function zk(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Bk(e,t,n){if(!zk(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)zk(e[r],n[i])&&--r,--i;return r===-1}function Vk(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Bk(e,t,n)){r.push(a);break}return r}function Hk(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=Nk(e,t,{...n,theme:r.theme});return{tokens:i,state:fk(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=Uk(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new pk(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&dk(o,s),o}function Uk(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function Wk(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new HT("`themes` option must not be empty");let p=Hk(e,t,n);if(c=fk(p),l&&rk!==l&&!f.find(e=>e.color===l))throw new HT(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>sk(e,h,u,l,d))),c&&dk(a,c);let g=f.map(e=>GO(e.theme,n));i=Gk(f,m,g,u,l,`fg`,d),r=Gk(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=GO(n.theme,n);a=Nk(e,t,n);let l=e.getTheme(n.theme);r=KO(l.bg,s),i=KO(l.fg,s),o=l.name,c=fk(a)}else throw new HT("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Gk(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=KO(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===rk&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new HT('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${KO(t[r][a],n[r])||`inherit`}, ${KO(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function Kk(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Kk(e,t,n),codeToTokens:(t,n)=>Wk(e,t,n)}){let i=t;for(let e of bk(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Wk(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Jk(a):d===`never`&&(a=Yk(a)),f&&(a=Xk(a));let p={...r,get source(){return i}};for(let e of bk(n))a=e.tokens?.call(p,a)||a;return qk(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function qk(e,t,n,r=fk(e)){let i=bk(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:$O,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
92
- `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=lk(a.htmlStyle||ck(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&dk(m,r),m}function Jk(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&lE.Underline||i.fontStyle&lE.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Yk(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Xk(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=lk(e.htmlStyle||ck(e)),i=lk(n.htmlStyle||ck(n)),a=e.fontStyle&&(e.fontStyle&lE.Underline||e.fontStyle&lE.Strikethrough),o=n.fontStyle&&(n.fontStyle&lE.Underline||n.fontStyle&lE.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Zk=HO;function Qk(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Kk(e,t,n),codeToTokens:(t,n)=>Wk(e,t,n)},i=Zk(Kk(e,t,n,r));for(let e of bk(n))i=e.postprocess?.call(r,i,n)||i;return i}var $k={light:`#333333`,dark:`#bbbbbb`},eA={light:`#fffffe`,dark:`#1e1e1e`},tA=`__shiki_resolved`;function nA(e){if(e?.[tA])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?$k.light:$k.dark,n||=t.type===`light`?eA.light:eA.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,tA,{enumerable:!1,writable:!1,value:!0}),t}async function rA(e){return Array.from(new Set((await Promise.all(e.filter(e=>!XO(e)).map(async e=>await JO(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function iA(e){return(await Promise.all(e.map(async e=>QO(e)?null:nA(await JO(e))))).filter(e=>!!e)}var aA=3,oA=!1;function sA(e,t=3){if(aA&&!(typeof aA==`number`&&t>aA)){if(oA)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var cA=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function lA(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new cA(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var uA=class extends wD{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=nA(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=nE.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=lA(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new cA(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},dA=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},fA=0;function pA(e){fA+=1,e.warnings!==!1&&fA>=10&&fA%10==0&&console.warn(`[Shiki] ${fA} 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 cA("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(nA),i=new uA(new dA(e.engine,n),r,n,e.langAlias),a;function o(t){return lA(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new cA(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new cA(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await rA(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await iA(e))}function g(){if(t)throw new cA(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--fA)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function mA(e){e.engine||sA("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([iA(e.themes||[]),rA(e.langs||[]),e.engine]);return pA({...e,themes:t,langs:n,engine:r})}async function hA(e){let t=await mA(e);return{getLastGrammarState:(...e)=>Pk(t,...e),codeToTokensBase:(e,n)=>Nk(t,e,n),codeToTokensWithThemes:(e,n)=>Hk(t,e,n),codeToTokens:(e,n)=>Wk(t,e,n),codeToHast:(e,n)=>Kk(t,e,n),codeToHtml:(e,n)=>Qk(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function gA(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,XO(n))return[];let r=t[n];if(!r)throw new HT(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(QO(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new HT(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await hA({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function _A(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function vA(e,t){let n=_A(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var yA=[{id:`abap`,name:`ABAP`,import:(()=>s(()=>import(`./abap-KdbeOgWW.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>s(()=>import(`./actionscript-3-3WlWJhVE.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>s(()=>import(`./ada-UX949e0K.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>s(()=>import(`./angular-html-BTPgvNVF.js`).then(e=>e.n),__vite__mapDeps([75,1,76,77,78])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>s(()=>import(`./angular-ts-DlluasyV.js`),__vite__mapDeps([79,75,1,76,77,78,80])))},{id:`apache`,name:`Apache Conf`,import:(()=>s(()=>import(`./apache-DRCaPXs2.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>s(()=>import(`./apex-DP1SARVr.js`),[]))},{id:`apl`,name:`APL`,import:(()=>s(()=>import(`./apl-DXNMM5sn.js`),__vite__mapDeps([81,77,1,76,78,82,83,84])))},{id:`applescript`,name:`AppleScript`,import:(()=>s(()=>import(`./applescript-D9G0c8qw.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>s(()=>import(`./ara-BgeZ4gDq.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>s(()=>import(`./asciidoc-DA7OahK-.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>s(()=>import(`./asm-jkcfc58s.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>s(()=>import(`./astro-Chivy__8.js`),__vite__mapDeps([85,77,1,78,82,86,87,88])))},{id:`awk`,name:`AWK`,import:(()=>s(()=>import(`./awk-BwMjoh3C.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>s(()=>import(`./ballerina-Df6bvtmj.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>s(()=>import(`./bat-D6313cgA.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>s(()=>import(`./beancount-DBJ7TpTK.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>s(()=>import(`./berry-BRSrtxoH.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>s(()=>import(`./bibtex-DWHt0I1s.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>s(()=>import(`./bicep-CmLWFcFA.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>s(()=>import(`./bird2-DTXdeZCk.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>s(()=>import(`./blade-CbK4h373.js`),__vite__mapDeps([89,77,1,90,76,78,82,91,83,84])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>s(()=>import(`./bsl-CdDFyo5F.js`),__vite__mapDeps([92,93])))},{id:`c`,name:`C`,import:(()=>s(()=>import(`./c-XAfXzHJL.js`).then(e=>e.n),__vite__mapDeps([94,1])))},{id:`c3`,name:`C3`,import:(()=>s(()=>import(`./c3-NoRyU2Ya.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>s(()=>import(`./cadence-hUAU7YJY.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>s(()=>import(`./cairo-CCizMn05.js`),__vite__mapDeps([95,96])))},{id:`clarity`,name:`Clarity`,import:(()=>s(()=>import(`./clarity-CZYgpMAM.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>s(()=>import(`./clojure-Cov_fIof.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>s(()=>import(`./cmake-Ci4NQnAb.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>s(()=>import(`./cobol-D99n3iqc.js`),__vite__mapDeps([97,76,1,77,78,84])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>s(()=>import(`./codeowners-CojwFqaS.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>s(()=>import(`./codeql-DSYUnmiC.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>s(()=>import(`./coffee-D1LQvIkF.js`),__vite__mapDeps([98,78,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>s(()=>import(`./common-lisp-DGmU2khh.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>s(()=>import(`./coq-B0d8jPsA.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>s(()=>import(`./cpp-CKg5ZwjL.js`).then(e=>e.n),__vite__mapDeps([99,1,100,94,101,91])))},{id:`crystal`,name:`Crystal`,import:(()=>s(()=>import(`./crystal-CYzaTz8d.js`),__vite__mapDeps([102,94,1,77,76,78,103,91])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>s(()=>import(`./csharp-7zj_5c7P.js`),[]))},{id:`css`,name:`CSS`,import:(()=>s(()=>import(`./css-D6U_Ko9J.js`).then(e=>e.n),__vite__mapDeps([77,1])))},{id:`csv`,name:`CSV`,import:(()=>s(()=>import(`./csv-C9AlRNbg.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>s(()=>import(`./cue-9Ltq98qN.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>s(()=>import(`./cypher-C6-_SkCs.js`),[]))},{id:`d`,name:`D`,import:(()=>s(()=>import(`./d-BRESyypb.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>s(()=>import(`./dart-6m3pGlVS.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>s(()=>import(`./dax-DSg8tGIm.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>s(()=>import(`./desktop-BvBIfhCq.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>s(()=>import(`./diff-CFBZUcgj.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>s(()=>import(`./docker-DhiNHNs9.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>s(()=>import(`./dotenv-CQ4OwQjk.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>s(()=>import(`./dream-maker-DWc07rTN.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>s(()=>import(`./edge-CkCaSgQh.js`),__vite__mapDeps([104,90,76,1,77,78,88])))},{id:`elixir`,name:`Elixir`,import:(()=>s(()=>import(`./elixir-CjHA8w1Y.js`),__vite__mapDeps([105,76,1,77,78])))},{id:`elm`,name:`Elm`,import:(()=>s(()=>import(`./elm-DXIXYSVh.js`),__vite__mapDeps([106,100,1,94])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>s(()=>import(`./emacs-lisp-CtWVyDfk.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>s(()=>import(`./erb-CnzDf1w5.js`),__vite__mapDeps([107,76,1,77,78,108,94,99,100,101,91,109,110,87,88,111,112,103,83,84,113])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>s(()=>import(`./erlang-CNbCQ89n.js`),__vite__mapDeps([114,115])))},{id:`fennel`,name:`Fennel`,import:(()=>s(()=>import(`./fennel-pY91A3cM.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>s(()=>import(`./fish-CMqYuwXA.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>s(()=>import(`./fluent-CmVa3NNV.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>s(()=>import(`./fortran-fixed-form-BNQstKjF.js`),__vite__mapDeps([116,117])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>s(()=>import(`./fortran-free-form-BnXTqrXt.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>s(()=>import(`./fsharp-CjygqGHI.js`),__vite__mapDeps([118,115])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>s(()=>import(`./gdresource-CdJwksfi.js`),__vite__mapDeps([119,120,121])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>s(()=>import(`./gdscript-Bv1IS9z0.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>s(()=>import(`./gdshader-DkHuiVRJ.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>s(()=>import(`./genie-n-5G3rfW.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>s(()=>import(`./gherkin-CspC4QG0.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>s(()=>import(`./git-commit-tF6n3zME.js`),__vite__mapDeps([122,123])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>s(()=>import(`./git-rebase-KgX8Og1c.js`),__vite__mapDeps([124,103,1])))},{id:`gleam`,name:`Gleam`,import:(()=>s(()=>import(`./gleam-BX5i_nxD.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>s(()=>import(`./glimmer-js-BGDyd0fi.js`),__vite__mapDeps([125,77,1,76,78,88])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>s(()=>import(`./glimmer-ts-BgpDMnVZ.js`),__vite__mapDeps([126,77,1,76,78,88])))},{id:`glsl`,name:`GLSL`,import:(()=>s(()=>import(`./glsl-Bjsk2TMh.js`).then(e=>e.n),__vite__mapDeps([100,1,94])))},{id:`gn`,name:`GN`,import:(()=>s(()=>import(`./gn-DZw9o4Gq.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>s(()=>import(`./gnuplot-CXzBKzj-.js`),[]))},{id:`go`,name:`Go`,import:(()=>s(()=>import(`./go-DrxTzaFE.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>s(()=>import(`./graphql-Cx4kQnkL.js`).then(e=>e.n),__vite__mapDeps([109,1,78,110,87,88])))},{id:`groovy`,name:`Groovy`,import:(()=>s(()=>import(`./groovy-DL6IQdPy.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>s(()=>import(`./hack-DUr7hpoX.js`),__vite__mapDeps([127,76,1,77,78,91])))},{id:`haml`,name:`Ruby Haml`,import:(()=>s(()=>import(`./haml-tmAx7Gde.js`).then(e=>e.n),__vite__mapDeps([111,1,77,78])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>s(()=>import(`./handlebars-Bjly3GZc.js`),__vite__mapDeps([128,77,1,76,78,113])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>s(()=>import(`./haskell-DpD2Pom4.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>s(()=>import(`./haxe-C5IMy4J9.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>s(()=>import(`./hcl-CnxdhTif.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>s(()=>import(`./hjson-D6z9MXmd.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>s(()=>import(`./hlsl-Bnp3EqHT.js`),[]))},{id:`html`,name:`HTML`,import:(()=>s(()=>import(`./html-Dim8R87k.js`).then(e=>e.n),__vite__mapDeps([76,1,77,78])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>s(()=>import(`./html-derivative-wv0mpNga.js`),__vite__mapDeps([90,76,1,77,78])))},{id:`http`,name:`HTTP`,import:(()=>s(()=>import(`./http-BEgFKWFd.js`),__vite__mapDeps([129,109,1,78,110,87,88,82,103,83,84])))},{id:`hurl`,name:`Hurl`,import:(()=>s(()=>import(`./hurl-wrVcT4bK.js`),__vite__mapDeps([130,131,109,1,78,110,87,88,83,84])))},{id:`hxml`,name:`HXML`,import:(()=>s(()=>import(`./hxml-D3FneN50.js`),__vite__mapDeps([132,133])))},{id:`hy`,name:`Hy`,import:(()=>s(()=>import(`./hy-B3dnkU1O.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>s(()=>import(`./imba-WIgfrEvA.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>s(()=>import(`./ini-WpXUS-oh.js`),[]))},{id:`java`,name:`Java`,import:(()=>s(()=>import(`./java-DCQryRjA.js`).then(e=>e.n),__vite__mapDeps([84,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>s(()=>import(`./javascript-BL10MWEh.js`).then(e=>e.n),__vite__mapDeps([78,1])))},{id:`jinja`,name:`Jinja`,import:(()=>s(()=>import(`./jinja-B6phq7Ig.js`),__vite__mapDeps([134,76,1,77,78])))},{id:`jison`,name:`Jison`,import:(()=>s(()=>import(`./jison-OaSAm_Y-.js`),__vite__mapDeps([135,78,1])))},{id:`json`,name:`JSON`,import:(()=>s(()=>import(`./json-ByVheYRi.js`).then(e=>e.n),__vite__mapDeps([82,1])))},{id:`json5`,name:`JSON5`,import:(()=>s(()=>import(`./json5-DWNKCJwi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>s(()=>import(`./jsonc-CdEpFp1R.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>s(()=>import(`./jsonl-B9YUX8Zz.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>s(()=>import(`./jsonnet-BB_Y5U6D.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>s(()=>import(`./jssm-ztQz58D2.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>s(()=>import(`./jsx-CXM6RMr-.js`).then(e=>e.n),__vite__mapDeps([110,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>s(()=>import(`./julia-CmDZ9WDU.js`),__vite__mapDeps([136,99,1,100,94,101,91,78,96,137])))},{id:`just`,name:`Just`,import:(()=>s(()=>import(`./just-CXlTXez_.js`),__vite__mapDeps([138,78,1,139,77,76,91,83,84,96,108,94,99,100,101,109,110,87,88,111,112,103,113])))},{id:`kdl`,name:`KDL`,import:(()=>s(()=>import(`./kdl-CnTWAnOU.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>s(()=>import(`./kotlin-CEdaY2pE.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>s(()=>import(`./kusto-DDo06G-l.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>s(()=>import(`./latex-Dftgeikp.js`),__vite__mapDeps([140,141,137,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>s(()=>import(`./lean-C4W8O2K9.js`),[]))},{id:`less`,name:`Less`,import:(()=>s(()=>import(`./less-BvF2kiCY.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>s(()=>import(`./liquid-DJaAYdFW.js`),__vite__mapDeps([142,77,1,76,78,82])))},{id:`llvm`,name:`LLVM IR`,import:(()=>s(()=>import(`./llvm-BtLXPzeV.js`),[]))},{id:`log`,name:`Log file`,import:(()=>s(()=>import(`./log-ux9_5OLb.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>s(()=>import(`./logo-BlBVs1Eo.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>s(()=>import(`./lua-DLD2Zr6L.js`).then(e=>e.n),__vite__mapDeps([112,1,94])))},{id:`luau`,name:`Luau`,import:(()=>s(()=>import(`./luau-DklCyoQG.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>s(()=>import(`./make-DkWIE-Pu.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>s(()=>import(`./markdown-YB84TJfD.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>s(()=>import(`./marko-DT7MtIul.js`),__vite__mapDeps([143,77,1,144,80,88])))},{id:`matlab`,name:`MATLAB`,import:(()=>s(()=>import(`./matlab-eyjqOB3u.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>s(()=>import(`./mdc-Sj7HqqlM.js`),__vite__mapDeps([145,90,76,1,77,78,115,113])))},{id:`mdx`,name:`MDX`,import:(()=>s(()=>import(`./mdx-HMzOIHIt.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>s(()=>import(`./mermaid-IpivAU1W.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>s(()=>import(`./mipsasm-FQCttMQB.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>s(()=>import(`./mojo-DO_LVzYO.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>s(()=>import(`./moonbit-CmItaUeq.js`),[]))},{id:`move`,name:`Move`,import:(()=>s(()=>import(`./move-CeYGv5N6.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>s(()=>import(`./narrat-CyEgqgdC.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>s(()=>import(`./nextflow-ORht-cRv.js`),__vite__mapDeps([146,147])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>s(()=>import(`./nextflow-groovy-oNZt-evu.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>s(()=>import(`./nginx-B8SA1rN2.js`),__vite__mapDeps([148,112,1,94])))},{id:`nim`,name:`Nim`,import:(()=>s(()=>import(`./nim-c4YDKhvV.js`),__vite__mapDeps([149,94,1,77,100,76,78,115,83,84])))},{id:`nix`,name:`Nix`,import:(()=>s(()=>import(`./nix-BnX2CKzB.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>s(()=>import(`./nushell-CYRTMHZa.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>s(()=>import(`./objective-c-BBkC2fIW.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>s(()=>import(`./objective-cpp-6h-OCXBm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>s(()=>import(`./ocaml-D9kMWurc.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>s(()=>import(`./odin-DKor8PTs.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>s(()=>import(`./openscad-C9_k9PPP.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>s(()=>import(`./pascal-BuRrvbrc.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>s(()=>import(`./perl-Cbj4nRfk.js`),__vite__mapDeps([139,77,1,76,78,91,83,84])))},{id:`php`,name:`PHP`,import:(()=>s(()=>import(`./php-DrQT-g-m.js`),__vite__mapDeps([150,77,1,76,78,82,91,83,84])))},{id:`pkl`,name:`Pkl`,import:(()=>s(()=>import(`./pkl-aVb0ESav.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>s(()=>import(`./plsql-CfyJKao0.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>s(()=>import(`./po-BlGYJCZb.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>s(()=>import(`./polar-BUpphIWw.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>s(()=>import(`./postcss-B05sTlrk.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>s(()=>import(`./powerquery-CYophLop.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>s(()=>import(`./powershell-a_hlQtap.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>s(()=>import(`./prisma-CdlmpFSA.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>s(()=>import(`./prolog-CGqI61Xk.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>s(()=>import(`./proto-BWdEsXnQ.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>s(()=>import(`./pug-BK4UlN0b.js`),__vite__mapDeps([151,77,1,76,78])))},{id:`puppet`,name:`Puppet`,import:(()=>s(()=>import(`./puppet-6r8jTajy.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>s(()=>import(`./purescript-D2zjhXmH.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>s(()=>import(`./python-DdQYuMIU.js`),[]))},{id:`qml`,name:`QML`,import:(()=>s(()=>import(`./qml-BfKmfN_Y.js`),__vite__mapDeps([152,78,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>s(()=>import(`./qmldir-CgCLQY8E.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>s(()=>import(`./qss-dTyh7yTV.js`),[]))},{id:`r`,name:`R`,import:(()=>s(()=>import(`./r-BG-aUxp7.js`).then(e=>e.n),__vite__mapDeps([137,1])))},{id:`racket`,name:`Racket`,import:(()=>s(()=>import(`./racket-UypKzy0j.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>s(()=>import(`./raku-DtRCR4aG.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>s(()=>import(`./razor-gw0eNghw.js`),__vite__mapDeps([153,154,76,1,77,78])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>s(()=>import(`./reg-CLo2Erzq.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>s(()=>import(`./regexp-DcDCrGpo.js`).then(e=>e.n),__vite__mapDeps([101,1])))},{id:`rel`,name:`Rel`,import:(()=>s(()=>import(`./rel-mYsn4YLc.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>s(()=>import(`./riscv-BLj4o9M9.js`),[]))},{id:`ron`,name:`RON`,import:(()=>s(()=>import(`./ron-B47UL_2S.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>s(()=>import(`./rosmsg-BLL5cSQT.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>s(()=>import(`./rst-RXpGCPX3.js`),__vite__mapDeps([155,156,99,1,100,94,101,91,90,76,77,78,96,108,109,110,87,88,111,112,103,83,84,113])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>s(()=>import(`./ruby-C8G-I-gY.js`),__vite__mapDeps([108,94,1,99,100,101,91,77,109,78,110,87,88,111,76,112,103,83,84,113])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>s(()=>import(`./rust-BB34tfhZ.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>s(()=>import(`./sas-BbMHg9d6.js`),__vite__mapDeps([157,91,1])))},{id:`sass`,name:`Sass`,import:(()=>s(()=>import(`./sass-CK5TQbFO.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>s(()=>import(`./scala-CqcvaPSa.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>s(()=>import(`./scheme-BiQA0y8V.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>s(()=>import(`./scss-Bk85YZ5B.js`).then(e=>e.n),__vite__mapDeps([80,1,77])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>s(()=>import(`./sdbl-CFMWR8pX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>s(()=>import(`./shaderlab-gtHHzeHH.js`),__vite__mapDeps([158,159])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>s(()=>import(`./shellscript-D7bH9K7P.js`).then(e=>e.n),__vite__mapDeps([103,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>s(()=>import(`./shellsession-BxkAMrvC.js`),__vite__mapDeps([160,103,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>s(()=>import(`./smalltalk-YAUCjzSo.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>s(()=>import(`./solidity-B54yhlKd.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>s(()=>import(`./soy-BzuqaVTA.js`),__vite__mapDeps([161,76,1,77,78])))},{id:`sparql`,name:`SPARQL`,import:(()=>s(()=>import(`./sparql-PRQhoTwI.js`),__vite__mapDeps([162,163])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>s(()=>import(`./splunk-DCVCZFIM.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>s(()=>import(`./sql-BJUy431w.js`).then(e=>e.n),__vite__mapDeps([91,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>s(()=>import(`./ssh-config-Bo46VIzm.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>s(()=>import(`./stata-DbL7Ndl2.js`),__vite__mapDeps([164,91,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>s(()=>import(`./stylus-CrmL_SSE.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>s(()=>import(`./surrealql-YEW9swFu.js`),__vite__mapDeps([165,78,1])))},{id:`svelte`,name:`Svelte`,import:(()=>s(()=>import(`./svelte-BsO-M6w8.js`),__vite__mapDeps([166,77,1,78,86,88])))},{id:`swift`,name:`Swift`,import:(()=>s(()=>import(`./swift-JGYdIIES.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>s(()=>import(`./system-verilog-71p6-W_u.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>s(()=>import(`./systemd-Bv2wDC90.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>s(()=>import(`./talonscript-BMOduTZV.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>s(()=>import(`./tasl-eSRMgwBx.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>s(()=>import(`./tcl-1fExNKbP.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>s(()=>import(`./templ-zMTXDva2.js`),__vite__mapDeps([167,77,1,168,78])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>s(()=>import(`./terraform-DFR4nCnh.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>s(()=>import(`./tex-BlSODC1j.js`),__vite__mapDeps([141,137,1])))},{id:`toml`,name:`TOML`,import:(()=>s(()=>import(`./toml-BvGJhzg4.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>s(()=>import(`./ts-tags-Di_YeGim.js`),__vite__mapDeps([169,77,1,100,94,76,78,91,88,83,84])))},{id:`tsv`,name:`TSV`,import:(()=>s(()=>import(`./tsv-LHzL7ka1.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>s(()=>import(`./tsx-CCae5zBp.js`).then(e=>e.n),__vite__mapDeps([87,1])))},{id:`turtle`,name:`Turtle`,import:(()=>s(()=>import(`./turtle-BdKlZW8d.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>s(()=>import(`./twig-Dmp-uJhk.js`),__vite__mapDeps([170,77,1,78,150,76,82,91,83,84,96,108,94,99,100,101,109,110,87,88,111,112,103,113,80])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>s(()=>import(`./typescript-DYRUzQ4v.js`).then(e=>e.n),__vite__mapDeps([88,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>s(()=>import(`./typespec-CEkEAnja.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>s(()=>import(`./typst-CEQwssu2.js`),[]))},{id:`v`,name:`V`,import:(()=>s(()=>import(`./v-DX44c0Fb.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>s(()=>import(`./vala-Hxv1isxk.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>s(()=>import(`./vb-DQbP3oUY.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>s(()=>import(`./verilog-esZPqbkB.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>s(()=>import(`./vhdl-PwqNA34x.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>s(()=>import(`./viml-DUpBM0Gk.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>s(()=>import(`./vue-Bjt7AYG8.js`),__vite__mapDeps([171,77,1,90,76,78,82,88])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>s(()=>import(`./vue-html-DbfHTuzQ.js`),__vite__mapDeps([172,78,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>s(()=>import(`./vue-vine-fHOt7AV6.js`),__vite__mapDeps([173,77,1,78,144,86,80,174])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>s(()=>import(`./vyper-BcUoHONt.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>s(()=>import(`./wasm-DnZ0BHfN.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>s(()=>import(`./wenyan-bQjTuGHj.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>s(()=>import(`./wgsl-BgzputEt.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>s(()=>import(`./wikitext-D7JRoz1f.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>s(()=>import(`./wit-CppNxjpi.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>s(()=>import(`./wolfram-DIPQCD7J.js`),[]))},{id:`xml`,name:`XML`,import:(()=>s(()=>import(`./xml-BGJ8DYcz.js`).then(e=>e.n),__vite__mapDeps([83,1,84])))},{id:`xsl`,name:`XSL`,import:(()=>s(()=>import(`./xsl-DUB-ai0Q.js`),__vite__mapDeps([175,83,1,84])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>s(()=>import(`./yaml-Cc1kud-L.js`).then(e=>e.n),__vite__mapDeps([113,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>s(()=>import(`./zenscript-DBuir66n.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>s(()=>import(`./zig-CslG60KY.js`),[]))}],bA=Object.fromEntries(yA.map(e=>[e.id,e.import])),xA=Object.fromEntries(yA.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),SA={...bA,...xA},CA=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>s(()=>import(`./andromeeda-B_gVJxvp.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>s(()=>import(`./aurora-x-BozDXyw2.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>s(()=>import(`./ayu-dark-B_CJvu_v.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>s(()=>import(`./ayu-light-BQK54nNp.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>s(()=>import(`./ayu-mirage-7kt2NZXi.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>s(()=>import(`./catppuccin-frappe-9febZXyT.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>s(()=>import(`./catppuccin-latte-Chncf9--.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>s(()=>import(`./catppuccin-macchiato-C_WuLQJY.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>s(()=>import(`./catppuccin-mocha-CLqVJARs.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>s(()=>import(`./dark-plus-DiQC4aeN.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>s(()=>import(`./dracula-lcDuW9Go.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>s(()=>import(`./dracula-soft-Ce6GMbeF.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>s(()=>import(`./everforest-dark-gx4OARDl.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>s(()=>import(`./everforest-light-DVJtoQBa.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>s(()=>import(`./github-dark-BYLuEE8-.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>s(()=>import(`./github-dark-default-CWXoKcju.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>s(()=>import(`./github-dark-dimmed-BSdXOUgX.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>s(()=>import(`./github-dark-high-contrast-BV2T6K5m.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>s(()=>import(`./github-light-CiOdyZHM.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>s(()=>import(`./github-light-default-Cv00Zdvi.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>s(()=>import(`./github-light-high-contrast-DmsX_iF3.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>s(()=>import(`./gruvbox-dark-hard-B4fgIElJ.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>s(()=>import(`./gruvbox-dark-medium-BDXnTutg.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>s(()=>import(`./gruvbox-dark-soft-DbxoAQHm.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>s(()=>import(`./gruvbox-light-hard-YZYZeyEo.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>s(()=>import(`./gruvbox-light-medium-CUq7dINd.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>s(()=>import(`./gruvbox-light-soft-yL34W2vf.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>s(()=>import(`./horizon-Bi8LXjxX.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>s(()=>import(`./horizon-bright-DBDDPcKI.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>s(()=>import(`./houston-B89kVvEi.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>s(()=>import(`./kanagawa-dragon-DgoaOaF7.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>s(()=>import(`./kanagawa-lotus-3NgVzoaJ.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>s(()=>import(`./kanagawa-wave-DSUZ61FQ.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>s(()=>import(`./laserwave-AYDA8rzg.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>s(()=>import(`./light-plus-Dd3s1voW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>s(()=>import(`./material-theme-B8W_NLTj.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>s(()=>import(`./material-theme-darker-CdyXo4FZ.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>s(()=>import(`./material-theme-lighter-CymOU8Y5.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>s(()=>import(`./material-theme-ocean-Dk9zBTaP.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>s(()=>import(`./material-theme-palenight-CINYHeyf.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>s(()=>import(`./min-dark-C2gvlkG_.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>s(()=>import(`./min-light-Bz9gKlTR.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>s(()=>import(`./monokai-6XVgd8Lb.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>s(()=>import(`./night-owl-CVr1Acvt.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>s(()=>import(`./night-owl-light-oYg6SlB2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>s(()=>import(`./nord-o0gm5mt_.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>s(()=>import(`./one-dark-pro-ClpNRdFi.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>s(()=>import(`./one-light-DF-70uIM.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>s(()=>import(`./plastic-DWi5jYUY.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>s(()=>import(`./poimandres-MXtqikSE.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>s(()=>import(`./red-BdLeDZaD.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>s(()=>import(`./rose-pine-BdV45vil.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>s(()=>import(`./rose-pine-dawn-Dos80YGn.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>s(()=>import(`./rose-pine-moon-DbRqALZG.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>s(()=>import(`./slack-dark-DmjKz1P2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>s(()=>import(`./slack-ochin-wTZATI9h.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>s(()=>import(`./snazzy-light-B42aLgZJ.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>s(()=>import(`./solarized-dark-DInn5w8o.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>s(()=>import(`./solarized-light-CEaI6xSe.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>s(()=>import(`./synthwave-84-yMxuZek_.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>s(()=>import(`./tokyo-night-C-nBGA2n.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>s(()=>import(`./vesper-Bc6c4xT4.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>s(()=>import(`./vitesse-black-CbgIKamS.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>s(()=>import(`./vitesse-dark-DZgc4dHD.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>s(()=>import(`./vitesse-light-D7auQmSc.js`),[]))}].map(e=>[e.id,e.import])),wA=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function TA(){return 2147483648}function EA(){return typeof performance<`u`?performance.now():Date.now()}var DA=(e,t)=>e+(t-e%t)%t;async function OA(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=TA();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,DA(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:EA,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var kA=Object.defineProperty,AA=(e,t,n)=>t in e?kA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jA=(e,t,n)=>AA(e,typeof t==`symbol`?t:t+``,n),MA=null;function NA(e){throw new wA(e.UTF8ToString(e.getLastOnigError()))}var PA=class e{constructor(t){jA(this,`utf16Length`),jA(this,`utf8Length`),jA(this,`utf16Value`),jA(this,`utf8Value`),jA(this,`utf16OffsetToUtf8`),jA(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},FA=class e{constructor(t){if(jA(this,`id`,++e.LAST_ID),jA(this,`_onigBinding`),jA(this,`content`),jA(this,`utf16Length`),jA(this,`utf8Length`),jA(this,`utf16OffsetToUtf8`),jA(this,`utf8OffsetToUtf16`),jA(this,`ptr`),!MA)throw new wA(`Must invoke loadWasm first.`);this._onigBinding=MA,this.content=t;let n=new PA(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=MA.omalloc(1e4),e._sharedPtrInUse=!0,MA.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(MA)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};jA(FA,`LAST_ID`,0),jA(FA,`_sharedPtr`,0),jA(FA,`_sharedPtrInUse`,!1);var IA=FA,LA=class{constructor(e){if(jA(this,`_onigBinding`),jA(this,`_ptr`),!MA)throw new wA(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new PA(e[r]);t[r]=i.createString(MA),n[r]=i.utf8Length}let r=MA.omalloc(4*e.length);MA.HEAPU32.set(t,r/4);let i=MA.omalloc(4*e.length);MA.HEAPU32.set(n,i/4);let a=MA.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)MA.ofree(t[n]);MA.ofree(i),MA.ofree(r),a===0&&NA(MA),this._onigBinding=MA,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new IA(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function RA(e){return typeof e.instantiator==`function`}function zA(e){return typeof e.default==`function`}function BA(e){return e.data!==void 0}function VA(e){return typeof Response<`u`&&e instanceof Response}function HA(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var UA;function WA(e){if(UA)return UA;async function t(){MA=await OA(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),RA(n)?n=await n.instantiator(t):zA(n)?n=await n.default(t):(BA(n)&&(n=n.data),VA(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await KA(n)(t):await qA(n)(t):HA(n)||n instanceof WebAssembly.Module?n=await GA(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await GA(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return UA=t(),UA}function GA(e){return t=>WebAssembly.instantiate(e,t)}function KA(e){return t=>WebAssembly.instantiateStreaming(e,t)}function qA(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function JA(e){return e&&await WA(e),{createScanner(e){return new LA(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new IA(e)}}}var YA=gA({langs:SA,themes:CA,engine:()=>JA(s(()=>import(`./wasm-ALLkb1hB.js`),[]))}),{codeToHtml:XA,codeToHast:ZA,codeToTokens:QA,codeToTokensBase:$A,codeToTokensWithThemes:ej,getSingletonHighlighter:tj,getLastGrammarState:nj}=vA(YA,{guessEmbeddedLanguages:nk}),rj=`typescript.tsx.javascript.jsx.json.yaml.toml.xml.bash.shell.powershell.python.rust.go.java.kotlin.swift.ruby.php.csharp.c.cpp.sql.html.css.scss.markdown.diff.dockerfile`.split(`.`),ij=[`github-light`,`github-dark`],aj=null;function oj(){return aj||=YA({themes:[...ij],langs:[...rj]}),aj}var sj={ts:`typescript`,js:`javascript`,yml:`yaml`,sh:`bash`,zsh:`bash`,py:`python`,rs:`rust`,golang:`go`,rb:`ruby`,cs:`csharp`,"c++":`cpp`,cxx:`cpp`,"c#":`csharp`,ps1:`powershell`,pwsh:`powershell`,text:`markdown`,txt:`markdown`};function cj(e){if(!e)return`text`;let t=e.toLowerCase();return rj.includes(t)?t:t in sj?sj[t]??`text`:`text`}function lj({code:e,language:t,label:n,maxHeight:r}){let[i,a]=(0,A.useState)(null);(0,A.useEffect)(()=>{let n=!1,r=cj(t);return oj().then(t=>{n||a(t.codeToHtml(e,{lang:r,themes:{light:`github-light`,dark:`github-dark`},defaultColor:!1,cssVariablePrefix:`--shiki-`}))}).catch(()=>{}),()=>{n=!0}},[e,t]);let o=n??t,s=r??`max-h-96`;return(0,j.jsxs)(`div`,{className:`my-2 overflow-hidden border border-line text-[12px] first:mt-0 last:mb-0`,children:[o&&(0,j.jsx)(`div`,{className:`label border-b border-line px-3 py-1`,children:o}),i?(0,j.jsx)(`div`,{className:`shiki-host ${s} overflow-auto`,dangerouslySetInnerHTML:{__html:i}}):(0,j.jsx)(`pre`,{className:`${s} overflow-auto p-3`,children:(0,j.jsx)(`code`,{children:e})})]})}var uj={p:({children:e})=>(0,j.jsx)(`p`,{className:`my-2 first:mt-0 last:mb-0`,children:e}),h1:({children:e})=>(0,j.jsx)(`h1`,{className:`mt-5 mb-2 text-base font-bold tracking-tight first:mt-0`,children:e}),h2:({children:e})=>(0,j.jsx)(`h2`,{className:`mt-4 mb-2 text-base font-bold tracking-tight first:mt-0`,children:e}),h3:({children:e})=>(0,j.jsx)(`h3`,{className:`mt-4 mb-1.5 text-sm font-bold tracking-tight first:mt-0`,children:e}),h4:({children:e})=>(0,j.jsx)(`h4`,{className:`mt-3 mb-1 text-sm font-bold tracking-tight first:mt-0`,children:e}),ul:({children:e})=>(0,j.jsx)(`ul`,{className:`my-2 ml-5 list-disc space-y-0.5 first:mt-0 last:mb-0 marker:text-muted`,children:e}),ol:({children:e})=>(0,j.jsx)(`ol`,{className:`my-2 ml-5 list-decimal space-y-0.5 first:mt-0 last:mb-0 marker:text-muted`,children:e}),li:({children:e})=>(0,j.jsx)(`li`,{className:`pl-1`,children:e}),blockquote:({children:e})=>(0,j.jsx)(`blockquote`,{className:`my-2 border-l-2 border-muted pl-3 text-muted first:mt-0 last:mb-0`,children:e}),hr:()=>(0,j.jsx)(`hr`,{className:`my-3 border-line`}),a:({children:e,href:t})=>(0,j.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer noopener`,className:`text-accent underline underline-offset-2 hover:opacity-80`,children:e}),strong:({children:e})=>(0,j.jsx)(`strong`,{className:`font-bold`,children:e}),em:({children:e})=>(0,j.jsx)(`em`,{className:`italic`,children:e}),del:({children:e})=>(0,j.jsx)(`del`,{className:`text-muted line-through`,children:e}),code:({className:e,children:t,...n})=>{if(!e)return(0,j.jsx)(`code`,{className:`bg-code-bg px-1 text-[0.85em]`,...n,children:t});let r=/language-([\w-]+)/.exec(e??``),i=String(t).replace(/\n$/,``);return r?.[1]===`mermaid`?(0,j.jsx)(VT,{chart:i}):r?.[1]?(0,j.jsx)(lj,{code:i,language:r[1]}):(0,j.jsx)(lj,{code:i})},pre:({children:e})=>(0,j.jsx)(j.Fragment,{children:e}),table:({children:e})=>(0,j.jsx)(`div`,{className:`my-2 overflow-auto first:mt-0 last:mb-0`,children:(0,j.jsx)(`table`,{className:`w-full border-collapse border border-line text-xs`,children:e})}),thead:({children:e})=>(0,j.jsx)(`thead`,{className:`border-b border-line`,children:e}),th:({children:e})=>(0,j.jsx)(`th`,{className:`border-r border-line px-2 py-1 text-left text-xs font-bold uppercase tracking-wider last:border-r-0`,children:e}),td:({children:e})=>(0,j.jsx)(`td`,{className:`border-t border-r border-line px-2 py-1 last:border-r-0`,children:e})},dj=(0,A.memo)(function({text:e}){return(0,j.jsx)(`div`,{className:`leading-relaxed`,children:(0,j.jsx)(kh,{remarkPlugins:[Fv],components:uj,children:e})})});function fj({conversationId:e,onConversationChange:t}){let[n,r]=(0,A.useState)([]),[i,a]=(0,A.useState)(!0),[o,s]=(0,A.useState)(null),[c,l]=(0,A.useState)(null);return(0,A.useEffect)(()=>{let e=!1;return a(!0),Xe().then(t=>{e||(r(t.agents),t.agents[0]&&l(e=>e??t.agents[0]?.name??null))}).catch(t=>{e||t instanceof Fe&&t.status===401||s(t instanceof Error?t:Error(String(t)))}).finally(()=>{e||a(!1)}),()=>{e=!0}},[]),(0,j.jsx)(dt,{loading:i,error:o,empty:{when:n.length===0,message:`// no agents loaded — pass via serveWeb({ agent }) or serveWeb({ agents })`},children:(0,j.jsx)(pj,{agents:n,selectedAgent:c,onSelectAgent:l,conversationId:e,onConversationChange:t})})}function pj({agents:e,selectedAgent:t,onSelectAgent:n,conversationId:r,onConversationChange:i}){let a=nl({agentName:t,conversationId:r,onConversationIdChange:i}),o=(0,A.useCallback)(()=>{a.reset(),i(null)},[a,i]),s=e.find(e=>e.name===t)??null;return(0,j.jsx)(`div`,{className:`mx-auto flex h-[calc(100vh-3rem)] max-w-5xl flex-col`,children:(0,j.jsxs)(`div`,{className:`panel flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b border-line px-3 py-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] uppercase tracking-widest text-muted`,children:[(0,j.jsx)(`span`,{className:`text-accent`,children:`●`}),(0,j.jsx)(`span`,{children:`terminal`}),(0,j.jsx)(`span`,{children:`/`}),(0,j.jsx)(`span`,{children:`chat`})]}),(0,j.jsx)(`div`,{className:`font-mono text-[10px] text-muted`,children:a.conversationId??`new`})]}),(0,j.jsx)(`div`,{className:`border-b border-line px-3 py-2`,children:(0,j.jsx)(mj,{agents:e,selectedAgent:t,onSelectAgent:n,conversationId:a.conversationId,status:a.status,onNewChat:o})}),a.error&&(0,j.jsxs)(`div`,{className:`border-b border-err p-2 text-xs text-err`,children:[(0,j.jsx)(`span`,{className:`label text-err!`,children:`error:`}),` `,a.error.message]}),(0,j.jsx)(ts,{runtime:a.runtime,children:(0,j.jsxs)(Ec,{className:`flex min-h-0 flex-1 flex-col px-4`,children:[(0,j.jsxs)(Yc,{autoScroll:!0,className:`flex-1 overflow-y-auto py-4`,children:[(0,j.jsx)(Dc,{children:(0,j.jsx)(gj,{agent:s,hydrating:a.hydrating})}),(0,j.jsx)(mo,{components:{UserMessage:_j,AssistantMessage:vj,SystemMessage:bj}})]}),(0,j.jsx)(Ej,{})]})})]})})}function mj({agents:e,selectedAgent:t,onSelectAgent:n,conversationId:r,status:i,onNewChat:a}){return(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,j.jsx)(`span`,{className:`label`,children:`agent:`}),e.length===1?(0,j.jsxs)(`span`,{children:[e[0]?.name,` `,(0,j.jsxs)(`span`,{className:`text-muted`,children:[`v`,e[0]?.version]})]}):(0,j.jsx)(`select`,{value:t??``,onChange:e=>n(e.target.value),className:`px-1 py-0.5`,children:e.map(e=>(0,j.jsxs)(`option`,{value:e.name,children:[e.name,` v`,e.version]},e.name))}),i&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{className:`label ml-3`,children:`status:`}),(0,j.jsx)(`span`,{className:hj(i),children:i})]}),(0,j.jsx)(`button`,{type:`button`,onClick:a,className:`btn ml-auto`,disabled:!r,title:`Start a new conversation (the previous one stays in the Runs tab).`,children:`new chat`})]})}function hj(e){return e===`running`||e===`pending`?`badge badge-fill`:e===`paused`?`badge badge-warn`:e===`failed`||e===`cancelled`?`badge badge-err`:`badge`}function gj({agent:e,hydrating:t}){return t?(0,j.jsxs)(`div`,{className:`text-center text-xs text-muted`,children:[`loading session`,(0,j.jsx)(`span`,{className:`blink ml-1 text-accent`,"aria-hidden":`true`,children:`▊`})]}):(0,j.jsxs)(`div`,{className:`space-y-2 text-xs text-muted`,children:[(0,j.jsx)(`div`,{children:(0,j.jsx)(`span`,{className:`label`,children:`// chat`})}),e?(0,j.jsxs)(`div`,{children:[`ready · `,e.name,` v`,e.version,(0,j.jsx)(`span`,{className:`blink ml-1 text-accent`,"aria-hidden":`true`,children:`▊`})]}):(0,j.jsx)(`div`,{children:`// pick an agent above to start chatting`})]})}function _j(){return(0,j.jsxs)(`div`,{className:`mb-5 text-sm last:mb-0`,children:[(0,j.jsx)(`div`,{className:`label mb-1.5`,children:`you`}),(0,j.jsx)(`div`,{className:`border-l-2 border-line pl-3`,children:(0,j.jsx)(Tc,{components:{Text:xj}})})]})}function vj(){return(0,j.jsxs)(`div`,{className:`mb-5 text-sm last:mb-0`,children:[(0,j.jsx)(`div`,{className:`label text-accent! mb-1.5`,children:`agent`}),(0,j.jsx)(`div`,{className:`border-l-2 border-accent pl-3`,children:(0,j.jsx)(yj,{})})]})}function yj(){return(0,j.jsx)(Tc,{components:{Text:xj,Reasoning:Cj,tools:{Fallback:wj}}})}function bj(){return(0,j.jsxs)(`div`,{className:`mb-5 text-xs last:mb-0`,children:[(0,j.jsx)(`div`,{className:`label mb-1.5`,children:`tool`}),(0,j.jsx)(`div`,{className:`border-l-2 border-muted pl-3`,children:(0,j.jsxs)(`details`,{children:[(0,j.jsx)(`summary`,{className:`label cursor-pointer text-muted`,children:`raw result`}),(0,j.jsx)(`div`,{className:`mt-2 text-muted`,children:(0,j.jsx)(Tc,{components:{Text:xj}})})]})})]})}function xj(e){return e.text===`thinking`?(0,j.jsx)(Sj,{}):(0,j.jsx)(dj,{text:e.text})}function Sj(){return(0,j.jsxs)(`span`,{className:`text-muted`,children:[`thinking`,(0,j.jsx)(`span`,{className:`cli-dots`,"aria-hidden":`true`}),(0,j.jsx)(`span`,{className:`sr-only`,children:`...`})]})}function Cj(e){return(0,j.jsxs)(`details`,{className:`my-1 border border-line p-2 text-xs`,children:[(0,j.jsx)(`summary`,{className:`cursor-pointer text-muted`,children:`thinking`}),(0,j.jsx)(`pre`,{className:`mt-2 whitespace-pre-wrap text-[11px]`,children:e.text})]})}function wj(e){let t=typeof e.argsText==`string`?e.argsText:Tj(e.args??{});return(0,j.jsxs)(`div`,{className:`my-1 border border-line p-2 text-xs`,children:[(0,j.jsxs)(`div`,{className:`label text-accent!`,children:[`tool · `,e.toolName]}),(0,j.jsxs)(`details`,{className:`mt-1`,children:[(0,j.jsx)(`summary`,{className:`label cursor-pointer text-muted`,children:`raw input`}),(0,j.jsx)(`pre`,{className:`mt-1 max-h-48 overflow-auto whitespace-pre-wrap text-[11px]`,children:t})]}),e.result!==void 0&&(0,j.jsxs)(`details`,{className:`mt-2 border-t border-line pt-2`,children:[(0,j.jsx)(`summary`,{className:`label cursor-pointer text-muted`,children:`raw result`}),(0,j.jsx)(`pre`,{className:`mt-1 max-h-48 overflow-auto whitespace-pre-wrap text-[11px]`,children:typeof e.result==`string`?e.result:Tj(e.result)})]})]})}function Tj(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Ej(){return(0,j.jsxs)(Ps,{className:`flex items-center gap-3 border-t border-line py-3 pr-3 pl-0`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center text-accent leading-none`,children:(0,j.jsx)(`span`,{children:`$`})}),(0,j.jsx)(oc,{autoFocus:!0,rows:1,maxRows:8,placeholder:`ask the agent…`,className:`min-h-0 flex-1 resize-none border-0 bg-transparent p-0 text-sm leading-none focus:outline-none`,submitMode:`enter`}),(0,j.jsx)(kc,{running:!1,children:(0,j.jsx)(Ns,{asChild:!0,children:(0,j.jsx)(`button`,{type:`submit`,className:`btn btn-primary`,children:`send`})})}),(0,j.jsx)(kc,{running:!0,children:(0,j.jsx)(Dj,{})})]})}function Dj(){let e=ns();return(0,j.jsx)(`button`,{type:`button`,className:`btn btn-danger`,onClick:()=>e.cancelRun(),children:`stop`})}function Oj({title:e}){return(0,j.jsx)(`h2`,{className:`hr-section`,children:(0,j.jsx)(`span`,{children:`// ${e}`})})}function kj(){let e=lt(),[t,n]=(0,A.useState)([]),[r,i]=(0,A.useState)(!0),[a,o]=(0,A.useState)(null),[s,c]=(0,A.useState)(null),l=(0,A.useCallback)(async()=>{try{n((await Qe()).envVars)}catch(e){o(e instanceof Error?e:Error(String(e)))}finally{i(!1)}},[]);(0,A.useEffect)(()=>{l()},[l]);let u=!!(e?.renderService?.serviceId&&e.renderService.apiKeyConfigured),d=e?.renderService?.serviceId??null;return(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsxs)(`section`,{children:[(0,j.jsx)(Oj,{title:`ENV VARS`}),(0,j.jsx)(Aj,{deployment:e}),(0,j.jsx)(dt,{loading:r,error:a,empty:{when:t.length===0,message:`// no env vars declared in render-harness.yaml — capability packs and the harness manifest can add entries to envSchema`},children:(0,j.jsx)(`ul`,{className:`space-y-1.5`,children:t.map(e=>(0,j.jsx)(jj,{envVar:e,onEdit:()=>c(e)},e.name))})})]}),s?(0,j.jsx)(Mj,{envVar:s,canWrite:u,renderServiceId:d,onClose:()=>c(null),onSaved:()=>{c(null),l(),window.setTimeout(()=>void l(),5e3),window.setTimeout(()=>void l(),15e3)}}):null]})}function Aj({deployment:e}){if(!e)return null;if(e.renderService?.serviceId&&e.renderService.apiKeyConfigured)return(0,j.jsx)(`p`,{className:`mb-3 text-[11px] text-muted`,children:`// edits write through the Render API — service auto-restarts on save`});let t=[];return e.renderService?.serviceId||t.push(`RENDER_SERVICE_ID`),e.renderService?.apiKeyConfigured||t.push(`RENDER_API_KEY`),(0,j.jsx)(`p`,{className:`mb-3 border border-line p-2 text-[11px] text-muted`,children:`// ${t.join(` + `)} not set — edits will open the Render dashboard instead. Set those env vars on this service to enable in-UI writes.`})}function jj({envVar:e,onEdit:t}){let n=e.isSet?`btn`:e.required?`btn btn-danger-solid`:`btn btn-primary`;return(0,j.jsxs)(`li`,{className:`flex items-start gap-3 border border-line p-3 text-xs`,children:[(0,j.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,j.jsx)(`span`,{className:`font-mono text-sm`,children:e.name}),e.secret?(0,j.jsx)(`span`,{className:`badge`,children:`secret`}):null,e.source===`capability`&&e.packName?(0,j.jsx)(`span`,{className:`text-[10px] text-muted`,children:e.packName}):null]}),e.description?(0,j.jsx)(`p`,{className:`mt-1 text-[11px] text-muted`,children:e.description}):null,e.default!==void 0&&!e.isSet?(0,j.jsxs)(`p`,{className:`mt-1 text-[11px] text-muted`,children:[`default: `,(0,j.jsx)(`span`,{className:`font-mono`,children:e.default})]}):null]}),(0,j.jsx)(`button`,{type:`button`,onClick:t,className:n,children:e.isSet?`rotate`:`set`})]})}function Mj({envVar:e,canWrite:t,renderServiceId:n,onClose:r,onSaved:i}){let[a,o]=(0,A.useState)(``),[s,c]=(0,A.useState)(!1),[l,u]=(0,A.useState)(null),[d,f]=(0,A.useState)(!1),p=n?`https://dashboard.render.com/services/${encodeURIComponent(n)}/env`:`https://dashboard.render.com`;return(0,j.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4`,children:[(0,j.jsx)(`button`,{type:`button`,"aria-label":`Close`,className:`absolute inset-0 cursor-default`,onClick:r}),(0,j.jsxs)(`div`,{className:`panel relative max-h-[90vh] w-full max-w-lg overflow-auto bg-bg p-5 text-xs`,role:`dialog`,"aria-modal":`true`,"aria-label":`Edit ${e.name}`,children:[(0,j.jsxs)(`header`,{className:`mb-4 flex items-center justify-between`,children:[(0,j.jsxs)(`h2`,{className:`text-sm font-bold uppercase tracking-wide`,children:[e.isSet?`rotate`:`set`,` — `,(0,j.jsx)(`span`,{className:`font-mono`,children:e.name})]}),(0,j.jsx)(`button`,{type:`button`,onClick:r,className:`border border-line px-2 py-1 text-xs`,"aria-label":`Close`,children:`✕`})]}),e.description?(0,j.jsx)(`p`,{className:`mb-3 text-[11px] text-muted`,children:e.description}):null,t?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`label`,{className:`block`,children:[(0,j.jsx)(`span`,{className:`block text-[10px] uppercase tracking-wide text-muted`,children:`value`}),(0,j.jsxs)(`div`,{className:`mt-1 flex gap-2`,children:[(0,j.jsx)(`input`,{type:e.secret&&!d?`password`:`text`,className:`w-full border border-line bg-transparent p-2 font-mono text-xs`,value:a,onChange:e=>o(e.target.value)}),e.secret?(0,j.jsx)(`button`,{type:`button`,onClick:()=>f(e=>!e),className:`border border-line px-2 py-1 text-[10px]`,children:d?`hide`:`show`}):null]})]}),(0,j.jsx)(`p`,{className:`mt-2 text-[10px] text-muted`,children:`Saving writes through the Render API. The service will restart automatically once the new value is committed.`}),l?(0,j.jsx)(`p`,{className:`mt-3 border border-line p-2 text-[11px] text-err`,children:l}):null,(0,j.jsxs)(`footer`,{className:`mt-4 flex items-center justify-end gap-2`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:r,disabled:s,className:`border border-line px-3 py-1.5 text-xs`,children:`cancel`}),(0,j.jsx)(`button`,{type:`button`,onClick:async()=>{c(!0),u(null);try{let t=await $e(e.name,a);if(t.ok||t.restart){i();return}u(t.details??t.error??`save failed`)}catch(e){if(e instanceof TypeError){i();return}u(e instanceof Error?e.message:String(e))}finally{c(!1)}},disabled:s||a.length===0,className:`border border-accent bg-accent px-3 py-1.5 text-xs text-bg disabled:opacity-50`,children:s?`saving…`:`save & restart`})]})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`p`,{className:`mb-3 text-[11px]`,children:[`In-UI writes aren't enabled on this deployment. To set`,` `,(0,j.jsx)(`span`,{className:`font-mono`,children:e.name}),`, open the Render dashboard and add it to this service's env vars.`]}),(0,j.jsxs)(`p`,{className:`mb-3 text-[10px] text-muted`,children:[`To enable in-UI editing, set `,(0,j.jsx)(`span`,{className:`font-mono`,children:`RENDER_API_KEY`}),` on this service. (RENDER_SERVICE_ID is injected by Render automatically.)`]}),(0,j.jsxs)(`footer`,{className:`mt-4 flex items-center justify-end gap-2`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:r,className:`border border-line px-3 py-1.5 text-xs`,children:`close`}),(0,j.jsx)(`a`,{href:p,target:`_blank`,rel:`noreferrer`,className:`border border-accent bg-accent px-3 py-1.5 text-xs text-bg`,children:`open Render dashboard →`})]})]})]})]})}var Nj=`https://render-agent-harness.onrender.com/`;function Pj(){return(0,j.jsx)(`div`,{className:`h-screen overflow-hidden`,children:(0,j.jsx)(`iframe`,{title:`Render Harness documentation`,src:Nj,className:`h-full w-full bg-canvas`})})}function Fj({title:e,lede:t,body:n,livePanel:r}){return(0,j.jsxs)(`article`,{className:`space-y-6`,children:[(0,j.jsxs)(`header`,{className:`space-y-1`,children:[(0,j.jsx)(`h1`,{className:`text-base font-bold uppercase tracking-wider`,children:`// ${e}`}),(0,j.jsx)(`p`,{className:`text-xs text-muted`,children:t})]}),(0,j.jsxs)(`div`,{className:r?`grid grid-cols-1 gap-6 lg:grid-cols-[1fr_280px]`:`max-w-3xl`,children:[(0,j.jsx)(`div`,{className:`min-w-0 space-y-4 text-sm leading-relaxed`,children:n}),r&&(0,j.jsx)(`aside`,{className:`lg:sticky lg:top-4 lg:self-start`,children:r})]})]})}function Ij({children:e,language:t}){let n=t?Lj(t):void 0;return(0,j.jsx)(lj,{code:e,...n?{language:n}:{},...t?{label:t}:{}})}function Lj(e){return!e.includes(`.`)&&!e.includes(`/`)&&!e.includes(` `)?e:/\.([\w]+)$/.exec(e)?.[1]??`text`}function Rj({cmd:e}){return(0,j.jsx)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(e)},title:`Copy command to clipboard`,className:`bg-code-bg cursor-pointer px-1 text-[0.85em] hover:text-accent`,children:e})}function zj({title:e,children:t}){return(0,j.jsxs)(`div`,{className:`border border-line p-3`,children:[(0,j.jsx)(`div`,{className:`label mb-3`,children:`// live · ${e}`}),(0,j.jsx)(`div`,{className:`space-y-2 text-xs`,children:t})]})}function Bj({k:e,v:t}){return(0,j.jsxs)(`div`,{className:`flex items-baseline justify-between gap-3`,children:[(0,j.jsx)(`span`,{className:`text-muted`,children:e}),(0,j.jsx)(`span`,{className:`text-right break-all`,children:t})]})}function Vj({label:e,hint:t,onClick:n,href:r}){let i=(0,j.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`text-accent`,children:`→`}),(0,j.jsx)(`span`,{children:e}),t&&(0,j.jsx)(`span`,{className:`text-muted`,children:t})]});return r?(0,j.jsx)(`a`,{href:r,target:`_blank`,rel:`noreferrer noopener`,className:`block w-full border border-line px-3 py-2 text-xs hover:border-accent hover:text-accent`,children:i}):(0,j.jsx)(`button`,{type:`button`,onClick:n,className:`block w-full border border-line px-3 py-2 text-left text-xs hover:border-accent hover:text-accent`,children:i})}var Hj=`
93
- Every agent in the harness is just a value passed to \`defineAgent()\`. There's no class hierarchy and no implicit registry — what you write is what runs. The example below shows the canonical shape of an agent declaration:
94
- `;function Uj(e,t){return`
95
- The agent is a value; the runtime is what actually drives it. The harness ships four runtime adapters that share the same loop in \`@render-harness/core\`. **${e}** uses ${t?`the web + worker pair`:`the single-process web runtime`}:
96
-
97
- ${["- `@render-harness/web` — multi-tenant HTTP service. Mounts the UI, exposes `/runs`, persists messages, streams via SSE, doesn't call the model itself.",t?"- `@render-harness/runtime-worker` — long-lived process. Pulls jobs from a Postgres queue (pg-boss) and runs the agent loop.":"- `@render-harness/runtime-web` — single-process synchronous shape. Runs the agent loop inline in the request handler. Best for sub-30s interactions."].join(`
98
- `)}
99
-
100
- ${t?"Both processes load the **same agent definition** from `render-harness.yaml` via `defineFromConfig()`. One agent, two adapters, separate scaling.":"The web service loads the agent definition from `render-harness.yaml` via `defineFromConfig()` and runs the agent loop in-process — no separate worker needed."}
101
-
102
- For other shapes the harness has \`@render-harness/runtime-cron\` (one-shot scheduled runs) and \`@render-harness/runtime-workflows\` (durable, multi-day, human-in-the-loop). Same \`AgentDefinition\` runs unchanged on any of them.
103
- `}var Wj='\nMulti-turn chat is built on `agent_conversations`: one row groups many runs together. Each user turn enqueues a fresh run on the same `conversationId`; the run loads message history across every prior run in the conversation, completes normally, and the next user turn starts another run. The Chat tab uses `POST /conversations/:id/messages` for every turn and subscribes to `GET /conversations/:id/stream` (which stays open across run boundaries). Runs always end in a terminal state — `paused` is now strictly HITL (`ask_user`, approval gates), never "waiting for the next user message."\n';function Gj(){let e=ut(),t=(lt()?.agents??[]).some(e=>e.runtimes.some(e=>e.kind===`worker`)),n=`${e}-runs`;return(0,j.jsx)(Fj,{title:`agent + runtime — the smallest moving parts`,lede:t?`One AgentDefinition, two adapters, one shared agent loop.`:`One AgentDefinition, one runtime adapter, one shared agent loop.`,body:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dj,{text:Hj}),(0,j.jsx)(Ij,{language:`src/agent.ts`,children:`import { type AgentDefinition, defineAgent } from "@render-harness/core";
104
-
105
- const SYSTEM_PROMPT = \`\\
106
- You are a helpful agent. Read the latest user message in context with
107
- the prior turns and respond in Markdown.
108
-
109
- Keep answers short — usually one or two paragraphs.\`;
110
-
111
- export function buildAgent(): AgentDefinition {
112
- return defineAgent({
113
- name: "${e}",
114
- version: "0.1.0",
115
- model: {
116
- provider: "anthropic",
117
- model: process.env.LLM_MODEL ?? "claude-sonnet-4-6",
118
- },
119
- systemPrompt: SYSTEM_PROMPT,
120
- sampling: { temperature: 0.4, maxOutputTokens: 1024 },
121
- });
122
- }`}),(0,j.jsx)(dj,{text:Uj(e,t)}),t?(0,j.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2`,children:[(0,j.jsx)(Ij,{language:`src/web.ts`,children:`import { serveWeb } from "@render-harness/web";
123
- import { buildAgent } from "./agent.js";
124
-
125
- await serveWeb({
126
- agent: buildAgent(),
127
- queue: process.env.WORKER_QUEUE ?? "${n}",
128
- ui: true,
129
- });`}),(0,j.jsx)(Ij,{language:`src/worker.ts`,children:`import { startWorkerAndWait } from "@render-harness/runtime-worker";
130
- import { buildAgent } from "./agent.js";
131
-
132
- await startWorkerAndWait({
133
- agent: buildAgent(),
134
- queue: process.env.WORKER_QUEUE ?? "${n}",
135
- });`})]}):(0,j.jsx)(Ij,{language:`src/web.ts`,children:`import { serveAgent } from "@render-harness/runtime-web";
136
- import { buildAgent } from "./agent.js";
137
-
138
- await serveAgent({ agent: buildAgent() });`}),t&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`h3`,{className:`label mt-6`,children:`why two processes?`}),(0,j.jsx)(`p`,{children:`Splitting the public API from the agent loop lets you scale them independently and put the worker on the private network in production. The web service stays cheap, predictable, and answerable to load balancers; the worker can be CPU-heavy and run for hours without breaking the request budget.`}),(0,j.jsxs)(`p`,{children:[`Locally they share the same image — Compose just runs`,` `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`node dist/web.js`}),` for one and`,` `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`node dist/worker.js`}),` for the other.`]})]}),(0,j.jsx)(`h3`,{className:`label mt-6`,children:`how multi-turn chat works`}),(0,j.jsx)(dj,{text:Wj})]}),livePanel:(0,j.jsx)(Kj,{})})}function Kj(){let[e,t]=(0,A.useState)(null),[n,r]=(0,A.useState)(null);return(0,A.useEffect)(()=>{let e=!1;return Xe().then(n=>{e||t(n.agents)}).catch(t=>{e||t instanceof Fe&&t.status===401||r(t instanceof Error?t:Error(String(t)))}),()=>{e=!0}},[]),(0,j.jsx)(zj,{title:`loaded agent`,children:n?(0,j.jsx)(`div`,{className:`text-err`,children:n.message}):e?e[0]?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Bj,{k:`name`,v:e[0].name}),(0,j.jsx)(Bj,{k:`version`,v:e[0].version}),(0,j.jsx)(Bj,{k:`model`,v:`${e[0].model.provider}/${e[0].model.model}`}),(0,j.jsx)(Bj,{k:`prompt`,v:`${e[0].systemPromptLength.toLocaleString()} chars`}),(0,j.jsx)(Bj,{k:`mcp servers`,v:String(e[0].mcpServers.length)}),(0,j.jsx)(Bj,{k:`local tools`,v:e[0].hasLocalTools?`yes`:`no`}),(0,j.jsx)(Bj,{k:`skills`,v:e[0].hasSkills?`yes`:`no`})]}):(0,j.jsx)(`div`,{className:`text-muted`,children:`no agents loaded`}):(0,j.jsx)(`div`,{className:`text-muted`,children:`loading…`})})}var qj=`
139
- **Capability packs** are the harness's extension surface for "give the agent a new ability without me writing tool code." A pack is a small TypeScript module that exposes some combination of:
140
-
141
- - one or more MCP servers,
142
- - a skills directory the model can pull into context,
143
- - env-var declarations the harness validates at boot,
144
- - and a pre-validated default config.
145
-
146
- First-party packs live in [\`packages/capabilities/\`](https://github.com/render/render-harness/tree/main/packages/capabilities) and on npm with the \`render-harness-cap\` keyword. Community packs follow the same shape.
147
- `,Jj="\n### What ships in the box\n\n| Pack | What it adds | Env vars |\n| --- | --- | --- |\n| `@render-harness/cap-search-exa` | Exa MCP — high-recall web search | `EXA_API_KEY` |\n| `@render-harness/cap-search-tavily` | Tavily MCP — search + answer engine | `TAVILY_API_KEY` |\n| `@render-harness/cap-scrape-firecrawl` | Firecrawl MCP — page scraping | `FIRECRAWL_API_KEY` |\n| `@render-harness/cap-memory-pg` | Long-term memory in Postgres | (uses `DATABASE_URL`) |\n| `@render-harness/cap-browser-browserbase` | Browserbase MCP — full browser automation | `BROWSERBASE_API_KEY` |\n",Yj=`
148
- ### Worked example: add web search
149
-
150
- Three steps. After this, the agent can search the web mid-conversation.
151
- `,Xj="\n### The declarative path\n\nInside the harness's config registry, capabilities compose declaratively in `render-harness.yaml` instead of TypeScript. The same pack works in either path; `defineFromConfig()` reads the YAML, the build emits a Render Blueprint, and one click deploys it. See [`docs/registry-guide.md`](https://github.com/render/render-harness/blob/main/docs/registry-guide.md) for the full walkthrough.\n";function Zj(){return(0,j.jsx)(Fj,{title:`capabilities — extend without rewriting`,lede:`Plug-ins for the agent loop. Search, scrape, memory, browser.`,body:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dj,{text:qj}),(0,j.jsx)(dj,{text:Jj}),(0,j.jsx)(dj,{text:Yj}),(0,j.jsxs)(`ol`,{className:`list-decimal space-y-3 pl-6 text-sm`,children:[(0,j.jsxs)(`li`,{children:[(0,j.jsx)(`p`,{children:`Install the pack:`}),(0,j.jsx)(Rj,{cmd:`pnpm add @render-harness/cap-search-exa`})]}),(0,j.jsxs)(`li`,{children:[(0,j.jsxs)(`p`,{children:[`Reference it in `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`render-harness.yaml`}),` under`,` `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`capabilities`}),`. The harness materializes the pack at boot, wires its MCP servers into each agent, and the live panel below reads the pack list to show what's installed:`]}),(0,j.jsx)(Ij,{language:`excerpt — render-harness.yaml`,children:`capabilities:
152
- - pack: "@render-harness/cap-search-exa"
153
- config:
154
- defaultMaxResults: 10`})]}),(0,j.jsxs)(`li`,{children:[(0,j.jsxs)(`p`,{children:[`Add the API key to `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`.env`}),`:`]}),(0,j.jsx)(Rj,{cmd:`echo "EXA_API_KEY=..." >> .env`})]}),(0,j.jsx)(`li`,{children:(0,j.jsxs)(`p`,{children:[`Restart `,(0,j.jsx)(Rj,{cmd:`pnpm dev`}),`. Now ask the chat agent to "search the web for…" and watch the new tool fire.`]})})]}),(0,j.jsx)(dj,{text:Xj})]}),livePanel:(0,j.jsx)(Qj,{})})}function Qj(){let e=lt(),[t,n]=(0,A.useState)(null),[r,i]=(0,A.useState)(null);(0,A.useEffect)(()=>{let e=!1;return Xe().then(t=>{e||n(t.agents)}).catch(t=>{e||t instanceof Fe&&t.status===401||i(t instanceof Error?t:Error(String(t)))}),()=>{e=!0}},[]);let a=e?.capabilityPacks&&e.capabilityPacks.length>0?e.capabilityPacks:t?.[0]?.capabilityPacks??[];return(0,j.jsx)(zj,{title:`installed packs`,children:r?(0,j.jsx)(`div`,{className:`text-err`,children:r.message}):t?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Bj,{k:`capabilityPacks`,v:String(a.length)}),a.length>0?(0,j.jsx)(`ul`,{className:`space-y-1 text-[11px]`,children:a.map(e=>(0,j.jsx)(`li`,{className:`border border-line px-2 py-1 font-mono`,children:e},e))}):(0,j.jsx)(`div`,{className:`text-[11px] text-muted`,children:`// none yet. Follow the recipe on the left and the pack name will show up here after restart.`}),t[0]&&(0,j.jsxs)(`div`,{className:`hairline-top mt-3 border-t border-line pt-3 text-[11px] text-muted`,children:[(0,j.jsxs)(`div`,{children:[`mcp servers: `,t[0].mcpServers.length]}),(0,j.jsxs)(`div`,{children:[`local tools: `,t[0].hasLocalTools?`yes`:`no`]}),(0,j.jsxs)(`div`,{children:[`skills: `,t[0].hasSkills?`yes`:`no`]})]})]}):(0,j.jsx)(`div`,{className:`text-muted`,children:`loading…`})})}var $j=365.2425,eM=6048e5,tM=864e5,nM=6e4,rM=36e5,iM=525600,aM=43200,oM=1440,sM=3600*24;sM*7,sM*$j/12*3;var cM=Symbol.for(`constructDateFrom`);function lM(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&cM in e?e[cM](t):e instanceof Date?new e.constructor(t):new Date(t)}function uM(e,t){return lM(t||e,e)}var dM={};function fM(){return dM}function pM(e,t){let n=fM(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=uM(e,t?.in),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function mM(e,t){return pM(e,{...t,weekStartsOn:1})}function hM(e,t){let n=uM(e,t?.in),r=n.getFullYear(),i=lM(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=mM(i),o=lM(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=mM(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function gM(e){let t=uM(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-+n}function _M(e,...t){let n=lM.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function vM(e,t){let n=uM(e,t?.in);return n.setHours(0,0,0,0),n}function yM(e,t,n){let[r,i]=_M(n?.in,e,t),a=vM(r),o=vM(i),s=+a-gM(a),c=+o-gM(o);return Math.round((s-c)/tM)}function bM(e,t){let n=hM(e,t),r=lM(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),mM(r)}function xM(e,t){let n=uM(e)-+uM(t);return n<0?-1:n>0?1:n}function SM(e){return lM(e,Date.now())}function CM(e){return e instanceof Date||typeof e==`object`&&Object.prototype.toString.call(e)===`[object Date]`}function wM(e){return!(!CM(e)&&typeof e!=`number`||isNaN(+uM(e)))}function TM(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return n===0?0:n}}function EM(e,t){let n=uM(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}var DM={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},OM=(e,t,n)=>{let r,i=DM[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r};function kM(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var AM={date:kM({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:kM({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:kM({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},jM={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},MM=(e,t,n,r)=>jM[e];function NM(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}var PM={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:NM({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:NM({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:NM({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:NM({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:NM({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})};function FM(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?LM(s,e=>e.test(o)):IM(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function IM(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function LM(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function RM(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var zM={code:`en-US`,formatDistance:OM,formatLong:AM,formatRelative:MM,localize:PM,match:{ordinalNumber:RM({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:FM({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:FM({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:FM({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:FM({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:FM({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function BM(e,t){let n=uM(e,t?.in);return yM(n,EM(n))+1}function VM(e,t){let n=uM(e,t?.in),r=mM(n)-+bM(n);return Math.round(r/eM)+1}function HM(e,t){let n=uM(e,t?.in),r=n.getFullYear(),i=fM(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,o=lM(t?.in||e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);let s=pM(o,t),c=lM(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);let l=pM(c,t);return+n>=+s?r+1:+n>=+l?r:r-1}function UM(e,t){let n=fM(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=HM(e,t),a=lM(t?.in||e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),pM(a,t)}function WM(e,t){let n=uM(e,t?.in),r=pM(n,t)-+UM(n,t);return Math.round(r/eM)+1}function GM(e,t){return(e<0?`-`:``)+Math.abs(e).toString().padStart(t,`0`)}var KM={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return GM(t===`yy`?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t===`M`?String(n+1):GM(n+1,2)},d(e,t){return GM(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.toUpperCase();case`aaa`:return n;case`aaaaa`:return n[0];default:return n===`am`?`a.m.`:`p.m.`}},h(e,t){return GM(e.getHours()%12||12,t.length)},H(e,t){return GM(e.getHours(),t.length)},m(e,t){return GM(e.getMinutes(),t.length)},s(e,t){return GM(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds();return GM(Math.trunc(r*10**(n-3)),t.length)}},qM={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},JM={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return KM.y(e,t)},Y:function(e,t,n,r){let i=HM(e,r),a=i>0?i:1-i;return t===`YY`?GM(a%100,2):t===`Yo`?n.ordinalNumber(a,{unit:`year`}):GM(a,t.length)},R:function(e,t){return GM(hM(e),t.length)},u:function(e,t){return GM(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return GM(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return GM(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return KM.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return GM(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let i=WM(e,r);return t===`wo`?n.ordinalNumber(i,{unit:`week`}):GM(i,t.length)},I:function(e,t,n){let r=VM(e);return t===`Io`?n.ordinalNumber(r,{unit:`week`}):GM(r,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):KM.d(e,t)},D:function(e,t,n){let r=BM(e);return t===`Do`?n.ordinalNumber(r,{unit:`dayOfYear`}):GM(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(a);case`ee`:return GM(a,2);case`eo`:return n.ordinalNumber(a,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(a);case`cc`:return GM(a,t.length);case`co`:return n.ordinalNumber(a,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return GM(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?qM.noon:r===0?qM.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?qM.evening:r>=12?qM.afternoon:r>=4?qM.morning:qM.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return KM.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):KM.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):GM(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):GM(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):KM.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):KM.s(e,t)},S:function(e,t){return KM.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return XM(r);case`XXXX`:case`XX`:return ZM(r);default:return ZM(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return XM(r);case`xxxx`:case`xx`:return ZM(r);default:return ZM(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+YM(r,`:`);default:return`GMT`+ZM(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+YM(r,`:`);default:return`GMT`+ZM(r,`:`)}},t:function(e,t,n){return GM(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return GM(+e,t.length)}};function YM(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+GM(a,2)}function XM(e,t){return e%60==0?(e>0?`-`:`+`)+GM(Math.abs(e)/60,2):ZM(e,t)}function ZM(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=GM(Math.trunc(r/60),2),a=GM(r%60,2);return n+i+t+a}var QM=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},$M=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},eN={p:$M,P:(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return QM(e,t);let a;switch(r){case`P`:a=t.dateTime({width:`short`});break;case`PP`:a=t.dateTime({width:`medium`});break;case`PPP`:a=t.dateTime({width:`long`});break;default:a=t.dateTime({width:`full`});break}return a.replace(`{{date}}`,QM(r,t)).replace(`{{time}}`,$M(i,t))}},tN=/^D+$/,nN=/^Y+$/,rN=[`D`,`DD`,`YY`,`YYYY`];function iN(e){return tN.test(e)}function aN(e){return nN.test(e)}function oN(e,t,n){let r=sN(e,t,n);if(console.warn(r),rN.includes(e))throw RangeError(r)}function sN(e,t,n){let r=e[0]===`Y`?`years`:`days of the month`;return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var cN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,uN=/^'([^]*?)'?$/,dN=/''/g,fN=/[a-zA-Z]/;function pN(e,t,n){let r=fM(),i=n?.locale??r.locale??zM,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=uM(e,n?.in);if(!wM(s))throw RangeError(`Invalid time value`);let c=t.match(lN).map(e=>{let t=e[0];if(t===`p`||t===`P`){let n=eN[t];return n(e,i.formatLong)}return e}).join(``).match(cN).map(e=>{if(e===`''`)return{isToken:!1,value:`'`};let t=e[0];if(t===`'`)return{isToken:!1,value:mN(e)};if(JM[t])return{isToken:!0,value:e};if(t.match(fN))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});i.localize.preprocessor&&(c=i.localize.preprocessor(s,c));let l={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(r=>{if(!r.isToken)return r.value;let a=r.value;(!n?.useAdditionalWeekYearTokens&&aN(a)||!n?.useAdditionalDayOfYearTokens&&iN(a))&&oN(a,t,String(e));let o=JM[a[0]];return o(s,a,i.localize,l)}).join(``)}function mN(e){let t=e.match(uN);return t?t[1].replace(dN,`'`):e}function hN(e,t,n){let r=fM(),i=n?.locale??r.locale??zM,a=xM(e,t);if(isNaN(a))throw RangeError(`Invalid time value`);let o=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[s,c]=_M(n?.in,...a>0?[t,e]:[e,t]),l=TM(n?.roundingMethod??`round`),u=c.getTime()-s.getTime(),d=u/nM,f=(u-(gM(c)-gM(s)))/nM,p=n?.unit,m;if(m=p||(d<1?`second`:d<60?`minute`:d<1440?`hour`:f<43200?`day`:f<525600?`month`:`year`),m===`second`){let e=l(u/1e3);return i.formatDistance(`xSeconds`,e,o)}else if(m===`minute`){let e=l(d);return i.formatDistance(`xMinutes`,e,o)}else if(m===`hour`){let e=l(d/60);return i.formatDistance(`xHours`,e,o)}else if(m===`day`){let e=l(f/oM);return i.formatDistance(`xDays`,e,o)}else if(m===`month`){let e=l(f/aM);return e===12&&p!==`month`?i.formatDistance(`xYears`,1,o):i.formatDistance(`xMonths`,e,o)}else{let e=l(f/iM);return i.formatDistance(`xYears`,e,o)}}function gN(e,t){return hN(e,SM(e),t)}function _N(e,t){let n=()=>lM(t?.in,NaN),r=t?.additionalDigits??2,i=SN(e),a;if(i.date){let e=CN(i.date,r);a=wN(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,c;if(i.time&&(s=EN(i.time),isNaN(s)))return n();if(i.timezone){if(c=ON(i.timezone),isNaN(c))return n()}else{let e=new Date(o+s),n=uM(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return uM(o+s+c,t?.in)}var vN={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},yN=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,bN=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,xN=/^([+-])(\d{2})(?::?(\d{2}))?$/;function SN(e){let t={},n=e.split(vN.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],vN.timeZoneDelimiter.test(t.date)&&(t.date=e.split(vN.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=vN.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function CN(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function wN(e,t){if(t===null)return new Date(NaN);let n=e.match(yN);if(!n)return new Date(NaN);let r=!!n[4],i=TN(n[1]),a=TN(n[2])-1,o=TN(n[3]),s=TN(n[4]),c=TN(n[5])-1;if(r)return PN(t,s,c)?kN(t,s,c):new Date(NaN);{let e=new Date(0);return!MN(t,a,o)||!NN(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function TN(e){return e?parseInt(e):1}function EN(e){let t=e.match(bN);if(!t)return NaN;let n=DN(t[1]),r=DN(t[2]),i=DN(t[3]);return FN(n,r,i)?n*rM+r*nM+i*1e3:NaN}function DN(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function ON(e){if(e===`Z`)return 0;let t=e.match(xN);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return IN(r,i)?n*(r*rM+i*nM):NaN}function kN(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var AN=[31,null,31,30,31,30,31,31,30,31,30,31];function jN(e){return e%400==0||e%4==0&&e%100!=0}function MN(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(AN[t]||(jN(e)?29:28))}function NN(e,t){return t>=1&&t<=(jN(e)?366:365)}function PN(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function FN(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function IN(e,t){return t>=0&&t<=59}var LN="\nThree changes you'll likely make first. Each is a one or two-line edit in `render-harness.yaml` (or the agent's TS source). Restart the dev process — `tsx` watches for changes and reboots the runtimes in a couple of seconds. No image rebuild, no reinstall, no Docker layer cache fights.\n",RN=`pnpm dev`,zN=`
155
- ### 1. Change the system prompt
156
-
157
- It's a string. Replace it with whatever shape you want the agent to take — a customer-support persona, a coding assistant, a bedtime-story writer.
158
- `,BN=`
159
- ### 2. Swap the model
160
-
161
- The harness has two model adapters: \`anthropic\` (direct Anthropic SDK) and \`openai-compat\` (any OpenAI-compatible gateway, including OpenRouter, Bedrock-via-LiteLLM, vLLM, Ollama, etc.). Switching providers is one config block.
162
- `,VN=`
163
- ### 3. Add an MCP server
164
-
165
- MCP gives the agent tools without you writing tool code. Drop a server into \`mcpServers\` and the harness connects, lists the tools, and exposes them to the model. Render's own MCP works as a read-only example — the agent can list services, fetch deploy logs, and inspect Postgres / Key Value resources.
166
- `,HN=`
167
- ### Putting it together
168
-
169
- Each of these is a small edit. The reload loop is fast enough that you can iterate on prompts and tool wiring with the chat tab open in the next monitor — change a line, hit reload, send a message, see the new behavior immediately.
170
- `;function UN(){let e=ut();return(0,j.jsx)(Fj,{title:`customizing — make it yours`,lede:`Three concrete recipes; each ~5 lines and a 5-second reload.`,body:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dj,{text:LN}),(0,j.jsxs)(`div`,{className:`border border-line p-3 text-xs`,children:[(0,j.jsx)(`div`,{className:`label mb-2`,children:`// the reload loop`}),(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsxs)(`div`,{children:[`1. edit `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`render-harness.yaml`}),` (or the agent's`,` `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`src/*.ts`}),`)`]}),(0,j.jsxs)(`div`,{children:[`2. restart `,(0,j.jsx)(Rj,{cmd:RN}),` (or let`,` `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`tsx`}),` reload it for you)`]}),(0,j.jsx)(`div`,{children:`3. refresh the chat tab; the new behavior is live`})]})]}),(0,j.jsx)(dj,{text:zN}),(0,j.jsx)(Ij,{language:`excerpt — render-harness.yaml`,children:`agents:
171
- - id: ${e}
172
- agent:
173
- kind: builtin
174
- ref: chat
175
- systemPrompt: |
176
- You are a customer-support agent for Acme Co. Be empathetic and
177
- concrete. Always end with: "Anything else I can help with?"
178
- runtimes:
179
- - kind: web`}),(0,j.jsx)(dj,{text:BN}),(0,j.jsx)(Ij,{language:`excerpt — render-harness.yaml`,children:`shared:
180
- model:
181
- provider: openai-compat
182
- model: anthropic/claude-sonnet-4
183
- baseURL: https://openrouter.ai/api/v1
184
- apiKeyEnv: OPENROUTER_API_KEY`}),(0,j.jsxs)(`p`,{className:`text-xs text-muted`,children:[`Then add `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`OPENROUTER_API_KEY=sk-...`}),` to your`,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`.env`}),` and restart.`]}),(0,j.jsx)(dj,{text:VN}),(0,j.jsx)(Ij,{language:`excerpt — render-harness.yaml`,children:`agents:
185
- - id: ${e}
186
- mcpServers:
187
- - name: render
188
- transport: http
189
- url: https://mcp.render.com/mcp
190
- headers:
191
- Authorization: "Bearer \${RENDER_API_KEY}"
192
- permissions:
193
- deniedTools:
194
- - render__delete_service
195
- - render__delete_postgres
196
- - render__delete_keyvalue`}),(0,j.jsxs)(`p`,{className:`text-xs text-muted`,children:[`Set `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`RENDER_API_KEY`}),` in`,` `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`.env`}),` (read-only is the default behavior; the explicit deny list above hardens it).`]}),(0,j.jsx)(dj,{text:HN})]}),livePanel:(0,j.jsx)(WN,{})})}function WN(){let[e,t]=(0,A.useState)(null),[n,r]=(0,A.useState)(null),[i,a]=(0,A.useState)(null),[,o]=(0,A.useState)(0);return(0,A.useEffect)(()=>{let e=!1,n=()=>{Promise.all([Ke(),Xe()]).then(([n,i])=>{e||(t(n),r(i.agents))}).catch(t=>{e||t instanceof Fe&&t.status===401||a(t instanceof Error?t:Error(String(t)))})};n();let i=setInterval(n,5e3),s=setInterval(()=>o(e=>e+1),3e4);return()=>{e=!0,clearInterval(i),clearInterval(s)}},[]),(0,j.jsx)(zj,{title:`reload state`,children:i?(0,j.jsx)(`div`,{className:`text-err`,children:i.message}):!e||!n?(0,j.jsx)(`div`,{className:`text-muted`,children:`loading…`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Bj,{k:`last reload`,v:gN(_N(e.bootedAt),{addSuffix:!0})}),(0,j.jsx)(Bj,{k:`version`,v:n[0]?.version??`—`}),(0,j.jsx)(Bj,{k:`model`,v:n[0]?`${n[0].model.provider}/${n[0].model.model}`:`—`}),(0,j.jsx)(Bj,{k:`mcp servers`,v:String(n[0]?.mcpServers.length??0)}),(0,j.jsxs)(`div`,{className:`hairline-top mt-3 border-t border-line pt-3 text-[11px] text-muted`,children:[`Edit `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`agent.ts`}),`, run`,` `,(0,j.jsx)(Rj,{cmd:RN}),`, watch this number go to "just now".`]})]})})}function GN(e){return`
197
- The local Compose stack you're running has a one-to-one mapping to a Render Blueprint. Every container becomes a Render service: \`postgres\` becomes a Managed Postgres, \`valkey\` becomes Render Key Value, \`${e}-web\` becomes a public web service, \`${e}-worker\` becomes a private service. The harness uses the same image and same code; only the runtime layout changes.
198
- `}var KN=`
199
- ### The Blueprint
200
-
201
- A starter \`render.yaml\` that matches your loaded agent is just one HTTP call away — see the live panel on the right. The shape mirrors [\`blueprints/render.private.yaml\`](https://github.com/render/render-harness/blob/main/blueprints/render.private.yaml):
202
-
203
- - a managed Postgres for state + queue
204
- - Render Key Value for cancel signals
205
- - a public \`type: web\` for the agent console / JSON API
206
- - a private \`type: pserv\` for the worker
207
-
208
- Why private for the worker? It runs the agent loop, which means it talks to model providers and (sometimes) third-party MCP servers. Putting it on the private network keeps DB and KV traffic off the public internet — the only outbound is to the model and any MCP endpoints.
209
- `,qN="\n### Required env vars\n\nEach generated service needs these set in the Render Dashboard before the first deploy:\n\n- **`WEB_API_KEY`** — bearer token for the JSON API and the agent console's login form. Use a strong shared secret.\n- **`UI_COOKIE_SECRET`** — Render generates this automatically with `generateValue: true` in the Blueprint. Don't override.\n- **`ANTHROPIC_API_KEY`** (or `OPENAI_API_KEY`, etc., based on your model adapter) — model provider key.\n- Pack-specific keys (e.g. `EXA_API_KEY`, `RENDER_API_KEY`) — only the ones you've actually wired in.\n",JN="\n### Deploy\n\n1. Push the repo (with your edited `agent.ts`) to GitHub.\n2. In the Render Dashboard, **New → Blueprint**, point it at your repo's `render.yaml`.\n3. Render reads the file, prompts for the `sync: false` env vars, and provisions all four services together.\n4. Once the build finishes, the agent console is at the assigned `*.onrender.com` URL plus `/ui`.\n\nFor zero-downtime rolling deploys, keep each conversation turn idempotent (state lives in `agent_conversations` + `agent_runs`, not in process memory) and let Render's rolling deploy handle the rest. Worker jobs in flight finish before the old container exits — the worker has a SIGTERM handler that waits up to 30s for in-flight runs.\n";function YN(e){let t=[...e].map(e=>`\`runtime-${e}\``).join(` + `),n=e.has(`cron`),r=e.has(`workflows`),i=[];return e.has(`web`)||i.push("- [`runtime-web`](https://github.com/render/render-harness/tree/main/packages/runtime-web) — synchronous HTTP shape (sub-30s). The bundled `runtime-worker` pair (above) is the multi-tenant production default."),n||i.push("- [`runtime-cron`](https://github.com/render/render-harness/tree/main/packages/runtime-cron) — one-shot scheduled runs, max 12 hours each. See the [`citations-monitor`](https://github.com/render/render-harness/tree/main/examples/citations-monitor) example."),r||i.push("- [`runtime-workflows`](https://github.com/render/render-harness/tree/main/packages/runtime-workflows) — durable, multi-day, human-in-the-loop. See the [`deploy-agent`](https://github.com/render/render-harness/tree/main/examples/deploy-agent) example."),i.length===0?`\n### Other runtimes\n\nThis bundle already uses every runtime adapter the harness ships (${t}). Same \`AgentDefinition\` would run unchanged on any of them — different deploy shape, same code.\n`:`\n### Other runtimes\n\nThis bundle uses ${t}. The harness also ships:\n\n${i.join(`
210
- `)}\n\nSame \`AgentDefinition\`. Same skills. Same MCP wiring. Different deploy shape.\n`}function XN(){let e=ut(),t=lt(),n=ZN(e,t),r=new Set;for(let e of t?.agents??[]){for(let t of e.runtimes)r.add(t.kind);e.workflowTask&&r.add(`workflows`)}return(0,j.jsx)(Fj,{title:`deploy — go to render`,lede:`Local Compose stack → render.yaml. One file, every service.`,body:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dj,{text:GN(e)}),n.length>0&&(0,j.jsxs)(`div`,{className:`border border-line p-3 text-xs`,children:[(0,j.jsx)(`div`,{className:`label mb-2`,children:`// services this bundle deploys`}),(0,j.jsx)(`ul`,{className:`space-y-1 font-mono`,children:n.map(e=>(0,j.jsxs)(`li`,{children:[(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:e.label}),` — `,e.role]},e.label))})]}),(0,j.jsx)(dj,{text:KN}),(0,j.jsx)(`p`,{className:`text-xs text-muted`,children:`Want to see the generated yaml inline? The live panel on the right has a "fetch blueprint" button — it returns a starter file based on the agent and queue this instance is configured with.`}),(0,j.jsx)(dj,{text:qN}),(0,j.jsx)(dj,{text:JN}),(0,j.jsx)(`h3`,{className:`label mt-6`,children:`handy commands`}),(0,j.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,j.jsxs)(`div`,{children:[`Validate your Blueprint locally before pushing:`,` `,(0,j.jsx)(Rj,{cmd:`render blueprints validate render.yaml`})]}),(0,j.jsxs)(`div`,{children:[`Tail logs in production:`,` `,(0,j.jsx)(Rj,{cmd:`render logs --tail --service ${e}-worker`})]})]}),(0,j.jsx)(dj,{text:YN(r)})]}),livePanel:(0,j.jsx)(QN,{})})}function ZN(e,t){if(!t)return[];let n=[],r=new Set,i=!1;for(let a of t.agents){a.workflowTask&&(i=!0);for(let t of a.runtimes)r.add(t.kind),t.kind===`cron`&&n.push({label:t.via===`workflow`?`${e}-cron-trigger-${a.id}`:`${e}-cron-${a.id}`,role:t.via===`workflow`?`triggers ${a.id} as a workflow task on \`${t.schedule}\``:`runs ${a.id} inline on \`${t.schedule}\``})}if(r.has(`web`)&&n.unshift({label:`${e}-web`,role:`public HTTP / SSE + agent console`}),r.has(`worker`)){let t=n.findIndex(t=>t.label===`${e}-web`);n.splice(t+1,0,{label:`${e}-worker`,role:`private pserv — pulls jobs from the pg-boss queue`})}return i&&n.push({label:`${e}-workflows`,role:`Render Workflows service (Dashboard-provisioned)`}),n}function QN(){let[e,t]=(0,A.useState)(null),[n,r]=(0,A.useState)(!1),[i,a]=(0,A.useState)(null),[o,s]=(0,A.useState)(!1);return(0,j.jsxs)(zj,{title:`blueprint`,children:[(0,j.jsx)(Bj,{k:`endpoint`,v:(0,j.jsx)(`a`,{href:`/blueprint`,target:`_blank`,rel:`noreferrer noopener`,className:`text-accent hover:underline`,children:`GET /blueprint`})}),!e&&(0,j.jsx)(Vj,{label:n?`fetching…`:`generate blueprint`,hint:`render.yaml`,onClick:()=>{r(!0),a(null),s(!1),Ye().then(e=>t(e)).catch(e=>{e instanceof Fe&&e.status===401||a(e instanceof Error?e:Error(String(e)))}).finally(()=>r(!1))}}),i&&(0,j.jsx)(`div`,{className:`text-err`,children:i.message}),e&&(0,j.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,j.jsxs)(`span`,{className:`label`,children:[`render.yaml (`,e.length.toLocaleString(),` chars)`]}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>{e&&(navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3))},className:`border border-line px-2 py-0.5 text-[10px] uppercase tracking-wider hover:border-accent hover:text-accent`,children:o?`copied!`:`copy`})]}),(0,j.jsx)(Ij,{language:`render.yaml`,children:e}),(0,j.jsx)(Vj,{label:`open Render dashboard`,hint:`new blueprint`,href:`https://dashboard.render.com/blueprints`})]})]})}function $N(e){return`
211
- You're looking at the **${e}** stack — an end-to-end agent deployment built on the Render agent harness. Everything you see in the UI is powered by four cooperating containers running locally via Docker Compose:
212
-
213
- - \`${e}-web\` — the public web service. It serves this UI, exposes the JSON+SSE API (\`/runs\`, \`/agents\`, \`/usage\`, \`/diagnostics\`), and enqueues new run jobs onto a Postgres-backed queue.
214
- - \`${e}-worker\` — a separate process that pulls jobs off the queue and actually drives the agent loop. Same image as the web service, just a different command.
215
- - \`postgres\` — durable state. Runs, messages, tool calls, and the queue itself all live here.
216
- - \`valkey\` — Redis-compatible. Holds short-lived signals like cancel flags. Cancellation only works because we have it.
217
-
218
- When you send a chat message:
219
-
220
- 1. Your browser POSTs to \`/runs\` (or \`/runs/:id/input\` on a follow-up turn).
221
- 2. The web service persists the message and pushes a job onto the queue in Postgres.
222
- 3. The worker pulls the job, calls Anthropic, writes assistant messages back to Postgres, and emits Postgres \`NOTIFY\` events.
223
- 4. The web service tails \`NOTIFY\` and forwards everything to your browser as Server-Sent Events on \`/runs/:id/stream\`.
224
-
225
- That separation is deliberate: the public web service stays cheap and stateless, the worker can be put on the private network in production. The same code shape works for Slack agents, scheduled jobs, and durable Workflows tasks — only the runtime adapter changes.
226
- `}function eP(){let e=ut(),t=lt(),[n,r]=(0,A.useState)(null),[i,a]=(0,A.useState)(null),[o,s]=(0,A.useState)(null);return(0,A.useEffect)(()=>{let e=!1;return Promise.all([Xe(),Ge()]).then(([t,n])=>{e||(r(t.agents),a(n.checks))}).catch(t=>{e||t instanceof Fe&&t.status===401||s(t instanceof Error?t:Error(String(t)))}),()=>{e=!0}},[]),(0,j.jsx)(Fj,{title:`tour — what's running`,lede:`Five minutes from cold-start to grokking the moving parts.`,body:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(dj,{text:$N(e)}),(0,j.jsx)(nP,{name:e,deployment:t}),(0,j.jsx)(`h3`,{className:`label mt-6`,children:`peek at the wiring`}),(0,j.jsx)(`p`,{children:`From your shell, watch what each container is doing right now:`}),(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(Rj,{cmd:`docker compose logs -f ${e}-worker`}),` — agent loop, model calls, tool use.`]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(Rj,{cmd:`docker compose logs -f ${e}-web`}),` — HTTP requests, SSE streams.`]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(Rj,{cmd:`docker compose exec postgres psql -U harness -d harness`}),` — runs and messages live in `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`agent_runs`}),` and`,` `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`agent_messages`}),`.`]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(Rj,{cmd:`docker compose exec valkey valkey-cli`}),` — try`,` `,(0,j.jsx)(`code`,{className:`bg-code-bg px-1`,children:`KEYS cancel:*`}),` after you click cancel on an active run.`]})]})]}),livePanel:(0,j.jsx)(zj,{title:`this deployment`,children:o?(0,j.jsx)(`div`,{className:`text-err`,children:o.message}):!n||!i?(0,j.jsx)(`div`,{className:`text-muted`,children:`loading…`}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Bj,{k:`agents loaded`,v:n.length===0?`0`:`${n.length} (${n.map(e=>e.name).join(`, `)})`}),(0,j.jsx)(Bj,{k:`health`,v:tP(i)}),(0,j.jsx)(Bj,{k:`errors`,v:String(i.filter(e=>e.level===`error`).length)}),(0,j.jsx)(Bj,{k:`warnings`,v:String(i.filter(e=>e.level===`warn`).length)}),(0,j.jsx)(`div`,{className:`hairline-top mt-3 border-t border-line pt-3`,children:(0,j.jsx)(Vj,{label:`see all checks`,hint:`diagnostics`,onClick:()=>{window.location.hash=`#/usage`}})})]})})})}function tP(e){let t=e.filter(e=>e.level===`error`).length,n=e.filter(e=>e.level===`warn`).length;return t>0?`needs attention`:n>0?`ok with warnings`:`all good`}function nP({name:e,deployment:t}){return(0,j.jsx)(VT,{chart:t?iP(e,t):iP(e,rP(e))})}function rP(e){return{name:e,agents:[{id:e,name:e,runtimes:[{kind:`web`},{kind:`worker`}],workflowTask:!1}]}}function iP(e,t){let n=new Set,r=[],i=[],a=[];for(let e of t.agents){e.workflowTask&&a.push(e);for(let t of e.runtimes)n.add(t.kind),t.kind===`cron`&&(t.via===`workflow`?i.push(e):r.push(e))}let o=n.has(`web`),s=n.has(`worker`),c=a.length>0,l=[`flowchart TD`];o&&(l.push(` web["${oP(`${e}-web`)}<br/>serves /ui, /runs, SSE"]`),l.push(` web -->|"enqueue job (pg-boss)"| postgres`)),l.push(` postgres["postgres<br/>agent_runs, agent_messages, pgboss.job"]`),s&&(l.push(` postgres -->|"pull job + NOTIFY"| worker`),l.push(` worker["${oP(`${e}-worker`)}<br/>model + MCP loop"]`)),l.push(` valkey["valkey (KV)<br/>cancel:runId"]`),o&&l.push(` web -. "cancel signal (TTL)" .-> valkey`),s&&l.push(` worker -. check cancel .-> valkey`);for(let t of r){let n=aP(`cron`,t.id);l.push(` ${n}["${oP(`${e}-cron-${t.id}`)}<br/>inline agent loop"]`),l.push(` ${n} -->|"runs ${oP(t.id)} on schedule"| postgres`)}for(let t of i){let n=aP(`cronTrigger`,t.id);l.push(` ${n}["${oP(`${e}-cron-trigger-${t.id}`)}<br/>runTask trigger"]`),l.push(` ${n} -->|"starts ${oP(t.id)} task"| workflows`)}return c&&(l.push(` workflows["${oP(`${e}-workflows`)}<br/>Render Workflows: ${a.length} task${a.length===1?``:`s`}"]`),l.push(` workflows -->|"writes state"| postgres`)),l.join(`
227
- `)}function aP(e,t){return`${e}_${t.replaceAll(/[^a-zA-Z0-9_]/g,`_`)}`}function oP(e){return e.replaceAll(`"`,`\\"`)}var sP=[{id:`tour`,label:`01. tour`,blurb:`what's running and how it fits together`,Component:eP},{id:`agent`,label:`02. agent + runtime`,blurb:`defineAgent, serveWeb, startWorker`,Component:Gj},{id:`customizing`,label:`03. customizing`,blurb:`prompts, models, MCP servers`,Component:UN},{id:`capabilities`,label:`04. capabilities`,blurb:`first-party + community packs`,Component:Zj},{id:`deploy`,label:`05. deploy`,blurb:`blueprint to Render`,Component:XN}],cP=new Set(sP.map(e=>e.id));function lP(e){return cP.has(e)}function uP({section:e,onSectionChange:t}){let n=e??sP[0]?.id??`tour`,r=sP.find(e=>e.id===n)?.Component??eP,i=(0,A.useRef)(null);return(0,A.useEffect)(()=>{n&&i.current?.scrollTo({top:0,behavior:`instant`})},[n]),(0,j.jsxs)(`div`,{className:`grid grid-cols-1 gap-6 lg:grid-cols-[200px_1fr]`,children:[(0,j.jsx)(dP,{active:n,onSectionChange:t}),(0,j.jsx)(`div`,{ref:i,className:`min-w-0`,children:(0,j.jsx)(r,{})})]})}function dP({active:e,onSectionChange:t}){return(0,j.jsxs)(`aside`,{className:`lg:sticky lg:top-4 lg:self-start`,children:[(0,j.jsx)(`div`,{className:`label mb-3`,children:`// guide`}),(0,j.jsx)(`nav`,{className:`space-y-1 text-xs`,children:sP.map(n=>(0,j.jsxs)(`button`,{type:`button`,onClick:()=>t(n.id),className:`flex w-full flex-col items-start border-l-2 px-2 py-1.5 text-left transition ${n.id===e?`border-accent text-accent`:`border-line text-ink hover:border-accent hover:text-accent`}`,children:[(0,j.jsx)(`span`,{className:`uppercase tracking-wider`,children:n.label}),(0,j.jsx)(`span`,{className:`text-[10px] normal-case text-muted`,children:n.blurb})]},n.id))})]})}var fP=e=>Number.isFinite(e)?e:0;function pP(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(fP(e*1e3)%1e3),nanoseconds:Math.trunc(fP(e*1e6)%1e3)}}function mP(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function hP(e){switch(typeof e){case`number`:if(Number.isFinite(e))return pP(e);break;case`bigint`:return mP(e)}throw TypeError(`Expected a finite number or bigint`)}var gP=e=>e===0||e===0n,_P=(e,t)=>t===1||t===1n?e:`${e}s`,vP=1e-7,yP=24n*60n*60n*1000n;function bP(e,t){let n=typeof e==`bigint`;if(!n&&!Number.isFinite(e))throw TypeError(`Expected a finite number or bigint`);t={...t};let r=e<0?`-`:``;e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let i=[],a=(e,t)=>{let n=Math.floor(e*10**t+vP);return(Math.round(n)/10**t).toFixed(t)},o=(e,n,r,a)=>{if(!((i.length===0||!t.colonNotation)&&gP(e)&&!(t.colonNotation&&r===`m`))){if(a??=String(e),t.colonNotation){let e=a.includes(`.`)?a.split(`.`)[0].length:a.length,t=i.length>0?2:1;a=`0`.repeat(Math.max(0,t-e))+a}else a+=t.verbose?` `+_P(n,e):r;i.push(a)}},s=hP(e),c=BigInt(s.days);if(t.hideYearAndDays?o(BigInt(c)*24n+BigInt(s.hours),`hour`,`h`):(t.hideYear?o(c,`day`,`d`):(o(c/365n,`year`,`y`),o(c%365n,`day`,`d`)),o(Number(s.hours),`hour`,`h`)),o(Number(s.minutes),`minute`,`m`),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){let e=Number(s.seconds),n=Number(s.milliseconds),r=Number(s.microseconds),i=Number(s.nanoseconds);if(o(e,`second`,`s`),t.formatSubMilliseconds)o(n,`millisecond`,`ms`),o(r,`microsecond`,`µs`),o(i,`nanosecond`,`ns`);else{let e=n+r/1e3+i/1e6,a=typeof t.millisecondsDecimalDigits==`number`?t.millisecondsDecimalDigits:0,s=a?e.toFixed(a):e>=1?Math.round(e):Math.ceil(e);o(Number.parseFloat(s),`millisecond`,`ms`,s)}}else{let r=a((n?Number(e%yP):e)/1e3%60,typeof t.secondsDecimalDigits==`number`?t.secondsDecimalDigits:1),i=t.keepDecimalsOnWholeSeconds?r:r.replace(/\.0+$/,``);o(Number.parseFloat(i),`second`,`s`,i)}if(i.length===0)return r+`0`+(t.verbose?` milliseconds`:`ms`);let l=t.colonNotation?`:`:` `;return typeof t.unitCount==`number`&&(i=i.slice(0,Math.max(t.unitCount,1))),r+i.join(l)}var xP=new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:1}),SP=new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}),CP=new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:4,maximumFractionDigits:4});function wP(e){let t=_N(e);return Number.isNaN(t.getTime())?e:`${gN(t,{addSuffix:!0})}`}function TP(e){if(!e)return`—`;let t=_N(e);return Number.isNaN(t.getTime())?e:pN(t,`yyyy-MM-dd HH:mm:ss`)}function EP(e){return e==null||!Number.isFinite(e)?`—`:bP(e,{compact:!0})}function DP(e){return Number.isFinite(e)?xP.format(e):`—`}function OP(e){return!Number.isFinite(e)||e===0?SP.format(0):e>0&&e<.01?CP.format(e):SP.format(e)}var kP={pending:`badge`,running:`badge badge-fill`,paused:`badge badge-warn`,completed:`badge`,failed:`badge badge-err`,cancelled:`badge`},AP={pending:`PENDING`,running:`RUNNING`,paused:`PAUSED`,completed:`DONE`,failed:`FAILED`,cancelled:`CANCELLED`};function jP({status:e}){return(0,j.jsxs)(`span`,{className:kP[e],children:[`[`,AP[e],`]`]})}function MP({runId:e,onBack:t,onOpenInChat:n}){let[r,i]=(0,A.useState)(null),[a,o]=(0,A.useState)([]),[s,c]=(0,A.useState)(!0),[l,u]=(0,A.useState)(null),[d,f]=(0,A.useState)(null),[p,m]=(0,A.useState)(``),[h,g]=(0,A.useState)(!1),[_,v]=(0,A.useState)(!1);(0,A.useEffect)(()=>{let t=!1;return c(!0),u(null),Promise.all([Re(e),He(e)]).then(([e,n])=>{t||(i(e),o(n.toolCalls))}).catch(e=>{t||e instanceof Fe&&e.status===401||u(e instanceof Error?e:Error(String(e)))}).finally(()=>{t||c(!1)}),()=>{t=!0}},[e]),(0,A.useEffect)(()=>{if(r&&!(r.run.status===`completed`||r.run.status===`failed`||r.run.status===`cancelled`))return nt(e,{onMessage:e=>{i(t=>!t||t.messages.some(t=>t.id===e.id)?t:{...t,messages:[...t.messages,e]})},onStatus:t=>{i(e=>e&&{...e,run:{...e.run,status:t}}),He(e).then(e=>o(e.toolCalls)).catch(()=>{})}})},[e,r]);let y=(0,A.useMemo)(()=>IP(r?.messages??[],a),[r?.messages,a]),b=async()=>{f(null),v(!0);try{await Ue(e)}catch(e){f(e instanceof Error?e.message:String(e))}finally{v(!1)}},x=async t=>{if(t.preventDefault(),f(null),p.trim()){g(!0);try{await We(e,p),m(``),i(await Re(e))}catch(e){f(e instanceof Error?e.message:String(e))}finally{g(!1)}}},S=r?.run.conversationId??null;return(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:t,className:`text-xs uppercase tracking-widest text-muted hover:text-accent`,children:`← back to runs`}),S&&n&&(0,j.jsx)(`button`,{type:`button`,onClick:()=>n(S),className:`btn`,title:`Open the parent conversation in the Chat tab.`,children:`open in chat`})]}),(0,j.jsx)(dt,{loading:s,error:l,children:r&&(0,j.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 lg:grid-cols-[260px_1fr_280px]`,children:[(0,j.jsx)(NP,{run:r.run}),(0,j.jsx)(LP,{items:y}),(0,j.jsx)(FP,{status:r.run.status,onCancel:b,cancelBusy:_,hitlInput:p,setHitlInput:m,hitlBusy:h,onSendInput:x,actionError:d})]})})]})}function NP({run:e}){let t=(e.cursor.usage?.inputTokens??0)+(e.cursor.usage?.outputTokens??0);return(0,j.jsxs)(`aside`,{className:`panel space-y-4 p-4 text-xs`,children:[(0,j.jsx)(`div`,{children:(0,j.jsx)(jP,{status:e.status})}),(0,j.jsx)(PP,{label:`run id`,value:(0,j.jsx)(`span`,{className:`break-all`,children:e.id})}),(0,j.jsx)(PP,{label:`agent`,value:`${e.agentName}@${e.agentVersion}`}),(0,j.jsx)(PP,{label:`user`,value:e.userId??`—`}),(0,j.jsx)(PP,{label:`created`,value:TP(e.createdAt)}),(0,j.jsx)(PP,{label:`started`,value:TP(e.startedAt)}),(0,j.jsx)(PP,{label:`finished`,value:TP(e.finishedAt)}),(0,j.jsx)(PP,{label:`turns`,value:String(e.cursor.turn??0)}),(0,j.jsx)(PP,{label:`tool calls`,value:String(e.cursor.toolCalls??0)}),(0,j.jsx)(PP,{label:`tokens`,value:DP(t)}),(0,j.jsx)(PP,{label:`cost`,value:OP(e.totalCostUsd)})]})}function PP({label:e,value:t}){return(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`label`,children:e}),(0,j.jsx)(`div`,{className:`mt-0.5 break-all`,children:t})]})}function FP({status:e,onCancel:t,cancelBusy:n,hitlInput:r,setHitlInput:i,hitlBusy:a,onSendInput:o,actionError:s}){return(0,j.jsxs)(`aside`,{className:`panel space-y-3 p-4 text-xs`,children:[(0,j.jsx)(`div`,{className:`label`,children:`actions`}),(0,j.jsx)(`button`,{type:`button`,onClick:t,disabled:e===`completed`||e===`failed`||e===`cancelled`||n,className:`btn btn-danger w-full`,children:n?`Cancelling…`:`Cancel run`}),e===`paused`&&(0,j.jsxs)(`form`,{onSubmit:o,className:`space-y-2`,children:[(0,j.jsx)(`div`,{className:`label`,children:`send hitl input`}),(0,j.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,j.jsx)(`span`,{className:`text-accent`,children:`>`}),(0,j.jsx)(`textarea`,{rows:4,value:r,onChange:e=>i(e.target.value),placeholder:`reply to the paused agent…`,className:`w-full text-xs`})]}),(0,j.jsx)(`button`,{type:`submit`,disabled:a||!r.trim(),className:`btn btn-primary w-full`,children:a?`Sending…`:`Resume run`})]}),s&&(0,j.jsx)(`div`,{className:`border border-err p-2 text-xs text-err`,children:s})]})}function IP(e,t){let n=[];for(let t of e)n.push({kind:`message`,at:new Date(t.createdAt).getTime(),message:t});for(let e of t)n.push({kind:`tool`,at:new Date(e.createdAt).getTime(),call:e});return n.sort((e,t)=>e.at-t.at)}function LP({items:e}){return e.length===0?(0,j.jsx)(`div`,{className:`panel p-6 text-center text-xs text-muted`,children:`// no activity yet`}):(0,j.jsx)(`div`,{className:`space-y-3`,children:e.map(e=>e.kind===`message`?(0,j.jsx)(RP,{message:e.message},`m-${e.message.id}`):(0,j.jsx)(VP,{call:e.call},`t-${e.call.id}`))})}function RP({message:e}){return(0,j.jsxs)(`div`,{className:`panel p-4 text-xs`,children:[(0,j.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,j.jsx)(`span`,{className:`badge`,children:e.role.toUpperCase()}),(0,j.jsx)(`span`,{className:`text-muted`,children:wP(e.createdAt)})]}),(0,j.jsx)(`div`,{className:`space-y-2`,children:e.content.map((t,n)=>(0,j.jsx)(BP,{block:t},zP(e.id,t,n)))}),e.usage&&(0,j.jsxs)(`div`,{className:`mt-2 text-[11px] text-muted`,children:[DP(e.usage.inputTokens),` in · `,DP(e.usage.outputTokens),` `,`out`]})]})}function zP(e,t,n){return t.type===`tool_use`?`${e}-tu-${t.id}`:t.type===`tool_result`?`${e}-tr-${t.tool_use_id}`:`${e}-${t.type}-${n}`}function BP({block:e}){return e.type===`text`?(0,j.jsx)(`pre`,{className:`whitespace-pre-wrap wrap-break-word`,children:e.text}):e.type===`thinking`?(0,j.jsxs)(`details`,{className:`border border-line p-2`,children:[(0,j.jsx)(`summary`,{className:`label cursor-pointer`,children:`[thinking]`}),(0,j.jsx)(`pre`,{className:`mt-2 whitespace-pre-wrap text-[11px] text-muted`,children:e.thinking})]}):e.type===`tool_use`?(0,j.jsxs)(`div`,{className:`border border-line p-2`,children:[(0,j.jsxs)(`div`,{className:`mb-1`,children:[(0,j.jsx)(`span`,{className:`badge`,children:`TOOL_USE`}),(0,j.jsx)(`span`,{className:`ml-2`,children:e.name})]}),(0,j.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap break-all text-[11px]`,children:JSON.stringify(e.input,null,2)})]}):e.type===`tool_result`?(0,j.jsxs)(`div`,{className:`border p-2 ${e.is_error?`border-err`:`border-line`}`,children:[(0,j.jsx)(`div`,{children:(0,j.jsxs)(`span`,{className:e.is_error?`badge badge-err`:`badge`,children:[`TOOL_RESULT`,e.is_error?` · ERROR`:``]})}),(0,j.jsxs)(`details`,{className:`mt-2`,children:[(0,j.jsx)(`summary`,{className:`label cursor-pointer`,children:`raw result`}),(0,j.jsx)(`pre`,{className:`mt-1 max-h-48 overflow-auto whitespace-pre-wrap break-all text-[11px]`,children:e.content})]})]}):null}function VP({call:e}){let[t,n]=(0,A.useState)(!1),r=e.result?.isError===!0||e.status===`failed`;return(0,j.jsxs)(`div`,{className:`border p-3 text-xs ${r?`border-err`:`border-line`}`,children:[(0,j.jsxs)(`button`,{type:`button`,onClick:()=>n(e=>!e),className:`flex w-full items-center justify-between gap-3 text-left`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(`span`,{className:r?`badge badge-err`:`badge`,children:`TOOL`}),(0,j.jsx)(`span`,{children:e.name}),(0,j.jsx)(`span`,{className:`label`,children:e.status})]}),(0,j.jsxs)(`div`,{className:`text-muted`,children:[EP(e.result?.durationMs??null),(0,j.jsx)(`span`,{className:`ml-2`,children:t?`[-]`:`[+]`})]})]}),t&&(0,j.jsxs)(`div`,{className:`mt-3 space-y-3`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`label`,children:`input`}),(0,j.jsx)(`pre`,{className:`mt-1 max-h-64 overflow-auto whitespace-pre-wrap break-all text-[11px]`,children:JSON.stringify(e.input,null,2)})]}),e.result?(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`label`,children:[`result · `,DP(e.result.tokenCount),` tokens`]}),(0,j.jsxs)(`details`,{className:`mt-1`,children:[(0,j.jsx)(`summary`,{className:`label cursor-pointer`,children:`raw result`}),(0,j.jsx)(`pre`,{className:`mt-1 max-h-96 overflow-auto whitespace-pre-wrap break-all text-[11px]`,children:e.result.content})]})]}):(0,j.jsx)(`div`,{className:`text-muted`,children:`// result not yet recorded`})]})]})}var HP=[`pending`,`running`,`paused`,`completed`,`failed`,`cancelled`];function UP({runId:e,onSelectRun:t,onBackToList:n,onOpenInChat:r}){return e?(0,j.jsx)(MP,{runId:e,onBack:n,onOpenInChat:r}):(0,j.jsx)(WP,{onSelect:t})}function WP({onSelect:e}){let[t,n]=(0,A.useState)([]),[r,i]=(0,A.useState)(null),[a,o]=(0,A.useState)(!0),[s,c]=(0,A.useState)(null),[l,u]=(0,A.useState)(new Set),[d,f]=(0,A.useState)(``),[p,m]=(0,A.useState)(!1),h=(0,A.useCallback)(async e=>{c(null),e?.append||o(!0);try{let t=await Le({status:Array.from(l),...d.trim()?{agent:[d.trim()]}:{},...e?.cursor?{cursor:e.cursor}:{},...p?{allUsers:!0}:{}});n(n=>e?.append?[...n,...t.runs]:t.runs),i(t.nextCursor)}catch(e){(!(e instanceof Fe)||e.status!==401)&&c(e instanceof Error?e:Error(String(e)))}finally{o(!1)}},[l,d,p]);(0,A.useEffect)(()=>{h()},[h]);let g=e=>{u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`label mr-1`,children:`FILTER`}),HP.map(e=>(0,j.jsx)(`button`,{type:`button`,onClick:()=>g(e),className:`btn ${l.has(e)?`btn-active`:``}`,children:e},e)),(0,j.jsx)(`input`,{type:`text`,placeholder:`agent name`,value:d,onChange:e=>f(e.target.value),className:`min-w-[10rem] text-xs`}),(0,j.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-muted`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),`all users`]}),(0,j.jsx)(`button`,{type:`button`,onClick:()=>void h(),className:`btn ml-auto`,children:`Refresh`})]}),(0,j.jsxs)(dt,{loading:a,error:s,empty:{when:t.length===0,message:`// no runs match the current filters`},children:[(0,j.jsx)(`div`,{className:`panel`,children:(0,j.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,j.jsx)(`thead`,{className:`label`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(GP,{children:`STATUS`}),(0,j.jsx)(GP,{children:`RUN`}),(0,j.jsx)(GP,{children:`AGENT`}),(0,j.jsx)(GP,{children:`USER`}),(0,j.jsx)(GP,{children:`TOKENS`}),(0,j.jsx)(GP,{children:`COST`}),(0,j.jsx)(GP,{children:`CREATED`})]})}),(0,j.jsx)(`tbody`,{children:t.map((t,n)=>{let r=(t.cursor.usage?.inputTokens??0)+(t.cursor.usage?.outputTokens??0);return(0,j.jsxs)(`tr`,{className:`cursor-pointer hover:text-accent ${n>0?`border-t border-line`:``}`,onClick:()=>e(t.id),children:[(0,j.jsx)(KP,{children:(0,j.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,j.jsx)(jP,{status:t.status}),t.conversationId&&(0,j.jsx)(`span`,{className:`badge`,title:`Part of a conversation`,children:`chat`})]})}),(0,j.jsxs)(KP,{children:[t.id.slice(0,12),`…`]}),(0,j.jsxs)(KP,{children:[(0,j.jsx)(`div`,{children:t.agentName}),(0,j.jsxs)(`div`,{className:`text-[10px] text-muted`,children:[`v`,t.agentVersion]})]}),(0,j.jsx)(KP,{children:t.userId??`—`}),(0,j.jsx)(KP,{className:`tabular-nums`,children:DP(r)}),(0,j.jsx)(KP,{className:`tabular-nums`,children:OP(t.totalCostUsd)}),(0,j.jsx)(KP,{children:wP(t.createdAt)})]},t.id)})})]})}),r&&(0,j.jsx)(`div`,{className:`flex justify-center pt-2`,children:(0,j.jsx)(`button`,{type:`button`,onClick:()=>void h({append:!0,cursor:r}),className:`btn`,children:`Load more`})})]})]})}function GP({children:e}){return(0,j.jsx)(`th`,{className:`border-b border-line px-3 py-2 text-left font-medium`,children:e})}function KP({children:e,className:t}){return(0,j.jsx)(`td`,{className:`px-3 py-2 align-top ${t??``}`,children:e})}function qP(){let[e,t]=(0,A.useState)([]),[n,r]=(0,A.useState)([]),[i,a]=(0,A.useState)(!0),[o,s]=(0,A.useState)(null),c=(0,A.useCallback)(async()=>{a(!0),s(null);try{let[e,n]=await Promise.all([qe(),Je()]);t(e.schedules),r(n.items)}catch(e){(!(e instanceof Fe)||e.status!==401)&&s(e instanceof Error?e:Error(String(e)))}finally{a(!1)}},[]);return(0,A.useEffect)(()=>{c()},[c]),(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h2`,{className:`text-sm uppercase tracking-widest`,children:`Scheduled tasks`}),(0,j.jsx)(`p`,{className:`mt-1 text-xs text-muted`,children:`Create or change schedules from chat. This tab shows what is active and what delivered.`})]}),(0,j.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>void c(),children:`Refresh`})]}),(0,j.jsxs)(dt,{loading:i,error:o,empty:{when:e.length===0&&n.length===0,message:`// no schedules or scheduled outputs yet`},children:[(0,j.jsxs)(`section`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`hr-section`,children:`Schedules`}),(0,j.jsx)(`div`,{className:`panel overflow-x-auto`,children:(0,j.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,j.jsx)(`thead`,{className:`label`,children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(JP,{children:`STATE`}),(0,j.jsx)(JP,{children:`AGENT`}),(0,j.jsx)(JP,{children:`CRON`}),(0,j.jsx)(JP,{children:`NEXT`}),(0,j.jsx)(JP,{children:`LAST`}),(0,j.jsx)(JP,{children:`NOTIFY`})]})}),(0,j.jsx)(`tbody`,{children:e.map((e,t)=>(0,j.jsxs)(`tr`,{className:t>0?`border-t border-line`:``,children:[(0,j.jsxs)(YP,{children:[(0,j.jsx)(`span`,{className:`badge ${e.enabled?`text-accent`:``}`,children:e.enabled?`enabled`:`disabled`}),(0,j.jsxs)(`div`,{className:`mt-1 text-[10px] text-muted`,children:[e.id.slice(0,12),`…`]})]}),(0,j.jsx)(YP,{children:e.agentName}),(0,j.jsxs)(YP,{children:[(0,j.jsx)(`code`,{children:e.cronExpr}),(0,j.jsx)(`div`,{className:`text-[10px] text-muted`,children:e.timezone})]}),(0,j.jsx)(YP,{children:TP(e.nextFireAt)}),(0,j.jsx)(YP,{children:TP(e.lastFiredAt)}),(0,j.jsx)(YP,{children:e.notifications.map(e=>e.kind).join(`, `)||`—`})]},e.id))})]})})]}),(0,j.jsxs)(`section`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`hr-section`,children:`Inbox`}),(0,j.jsx)(`div`,{className:`space-y-2`,children:n.map(e=>(0,j.jsxs)(`article`,{className:`panel p-3 text-xs`,children:[(0,j.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-2 text-[10px] uppercase tracking-wider text-muted`,children:[(0,j.jsx)(`span`,{children:wP(e.createdAt)}),(0,j.jsxs)(`span`,{children:[`run `,e.runId.slice(0,12),`…`]}),e.scheduleId&&(0,j.jsxs)(`span`,{children:[`schedule `,e.scheduleId.slice(0,12),`…`]}),(0,j.jsx)(`span`,{children:e.status})]}),(0,j.jsx)(`p`,{className:`whitespace-pre-wrap`,children:e.summary})]},e.id))})]})]})]})}function JP({children:e}){return(0,j.jsx)(`th`,{className:`border-b border-line px-3 py-2 text-left font-medium`,children:e})}function YP({children:e}){return(0,j.jsx)(`td`,{className:`px-3 py-2 align-top`,children:e})}var XP=[{id:7,label:`7d`},{id:30,label:`30d`},{id:90,label:`90d`}];function ZP(){let[e,t]=(0,A.useState)(30),[n,r]=(0,A.useState)(!1),[i,a]=(0,A.useState)([]),[o,s]=(0,A.useState)(!0),[c,l]=(0,A.useState)(null);(0,A.useEffect)(()=>{let t=!1;s(!0),l(null);let r=new Date;return tt({from:new Date(r.getTime()-e*24*60*60*1e3).toISOString(),to:r.toISOString(),allUsers:n}).then(e=>{t||a(e.rollups)}).catch(e=>{t||e instanceof Fe&&e.status===401||l(e instanceof Error?e:Error(String(e)))}).finally(()=>{t||s(!1)}),()=>{t=!0}},[e,n]);let u=(0,A.useMemo)(()=>{let e=0,t=0,n=0,r=0;for(let a of i)e+=a.runs,t+=a.costUsd,n+=a.inputTokens,r+=a.outputTokens;return{runs:e,cost:t,inTokens:n,outTokens:r}},[i]),d=(0,A.useMemo)(()=>{let e=new Map;for(let t of i){let n=e.get(t.agentName);n?(n.runs+=t.runs,n.costUsd+=t.costUsd,n.inputTokens+=t.inputTokens,n.outputTokens+=t.outputTokens):e.set(t.agentName,{...t,day:``})}return Array.from(e.values()).sort((e,t)=>t.costUsd-e.costUsd)},[i]);return(0,j.jsxs)(`div`,{className:`space-y-4`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`label mr-1`,children:`RANGE`}),XP.map(n=>(0,j.jsx)(`button`,{type:`button`,onClick:()=>t(n.id),className:`btn ${e===n.id?`btn-active`:``}`,children:n.label},n.id)),(0,j.jsxs)(`label`,{className:`ml-2 flex items-center gap-2 text-xs text-muted`,children:[(0,j.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>r(e.target.checked)}),`all users`]})]}),(0,j.jsxs)(dt,{loading:o,error:c,empty:{when:i.length===0,message:`// no runs in this window`},children:[(0,j.jsx)(Oj,{title:`totals`}),(0,j.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-4`,children:[(0,j.jsx)(QP,{label:`runs`,value:u.runs.toLocaleString()}),(0,j.jsx)(QP,{label:`cost`,value:OP(u.cost)}),(0,j.jsx)(QP,{label:`input tokens`,value:DP(u.inTokens)}),(0,j.jsx)(QP,{label:`output tokens`,value:DP(u.outTokens)})]}),(0,j.jsx)(Oj,{title:`by agent`}),(0,j.jsx)($P,{rows:d.map(e=>({key:e.agentName,cells:[e.agentName,e.runs.toLocaleString(),OP(e.costUsd),DP(e.inputTokens),DP(e.outputTokens)]})),headers:[`AGENT`,`RUNS`,`COST`,`INPUT`,`OUTPUT`]}),(0,j.jsx)(Oj,{title:`by day`}),(0,j.jsx)($P,{rows:i.map(e=>({key:`${e.day}-${e.agentName}`,cells:[e.day,e.agentName,e.runs.toLocaleString(),OP(e.costUsd),DP(e.inputTokens+e.outputTokens)]})),headers:[`DAY`,`AGENT`,`RUNS`,`COST`,`TOKENS`]})]})]})}function QP({label:e,value:t}){return(0,j.jsxs)(`div`,{className:`panel p-4`,children:[(0,j.jsx)(`div`,{className:`label`,children:e}),(0,j.jsx)(`div`,{className:`mt-1 text-xl tabular-nums`,children:t})]})}function $P({headers:e,rows:t}){return(0,j.jsx)(`div`,{className:`panel`,children:(0,j.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,j.jsx)(`thead`,{className:`label`,children:(0,j.jsx)(`tr`,{children:e.map(e=>(0,j.jsx)(`th`,{className:`border-b border-line px-3 py-2 text-left font-medium`,children:e},e))})}),(0,j.jsx)(`tbody`,{children:t.map((t,n)=>(0,j.jsx)(`tr`,{className:n>0?`border-t border-line`:``,children:t.cells.map((n,r)=>{let i=e[r]??String(r);return(0,j.jsx)(`td`,{className:`px-3 py-2 tabular-nums`,children:n},`${t.key}-${i}`)})},t.key))})]})})}var eF=[{label:null,items:[{id:`chat`,label:`Chat`,mark:`>`},{id:`runs`,label:`Runs`,mark:`[]`},{id:`scheduled`,label:`Cron`,mark:`()`},{id:`agents`,label:`Agents`,mark:`{}`},{id:`usage`,label:`Usage`,mark:`%%`},{id:`config`,label:`Config`,mark:`##`}]},{label:`Learn`,items:[{id:`guide`,label:`Guide`,mark:`?`},{id:`docs`,label:`Documentation`,mark:`::`}]}],tF=new Set(eF.flatMap(e=>e.items.map(e=>e.id)));function nF(){let[e,t]=window.location.hash.replace(/^#\/?/,``).split(`/`),n=e&&tF.has(e)?e:`chat`;return{tab:n,runId:n===`runs`&&t?decodeURIComponent(t):null,conversationId:n===`chat`&&t?decodeURIComponent(t):null,guideSection:n===`guide`&&t&&lP(t)?t:null}}function rF(){return(0,j.jsx)(ct,{children:(0,j.jsx)(iF,{})})}function iF(){let[e,t]=(0,A.useState)(()=>nF()),n=ut();(0,A.useEffect)(()=>{let e=()=>t(nF());return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let r=(0,A.useMemo)(()=>(e,n)=>{let r=n?`#/${e}/${encodeURIComponent(n)}`:`#/${e}`;window.location.hash===r?t(nF()):window.location.hash=r},[]),i=(0,A.useCallback)(n=>{if(e.tab!==`chat`)return;let r=n?`#/chat/${encodeURIComponent(n)}`:`#/chat`;window.location.hash!==r&&(window.history.replaceState(null,``,r),t({tab:`chat`,runId:null,conversationId:n,guideSection:null}))},[e.tab]),a=(0,A.useCallback)(e=>{let n=`#/guide/${e}`;window.location.hash!==n&&(window.history.replaceState(null,``,n),t({tab:`guide`,runId:null,conversationId:null,guideSection:e}))},[]);return(0,j.jsxs)(`div`,{className:`min-h-full lg:flex`,children:[(0,j.jsxs)(`aside`,{className:`border-b border-line bg-canvas lg:sticky lg:top-0 lg:flex lg:h-screen lg:w-64 lg:shrink-0 lg:flex-col lg:border-r lg:border-b-0`,children:[(0,j.jsxs)(`div`,{className:`border-b border-line p-4`,children:[(0,j.jsxs)(`div`,{className:`text-base font-bold uppercase leading-none tracking-widest`,children:[(0,j.jsx)(`div`,{children:`Render`}),(0,j.jsx)(`div`,{children:`Harness`})]}),(0,j.jsx)(`div`,{className:`mt-3 text-[10px] uppercase tracking-wider text-muted`,children:n})]}),(0,j.jsx)(`nav`,{className:`flex flex-wrap gap-0 lg:block lg:flex-1 lg:overflow-y-auto`,children:eF.map((t,n)=>(0,j.jsxs)(`div`,{className:n>0?`border-t border-line`:``,children:[t.label&&(0,j.jsx)(`div`,{className:`px-4 pt-4 pb-2 text-[10px] uppercase tracking-widest text-muted`,children:t.label}),t.items.map(t=>(0,j.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-3 px-4 py-3 text-left text-xs uppercase tracking-[0.18em] transition ${e.tab===t.id?`bg-accent text-canvas`:`text-muted hover:bg-code-bg hover:text-ink`}`,onClick:()=>r(t.id),children:[(0,j.jsx)(`span`,{className:`w-6 font-mono text-[10px]`,children:t.mark}),(0,j.jsx)(`span`,{children:t.label})]},t.id))]},t.label??`main`))}),(0,j.jsxs)(`div`,{className:`border-t border-line p-4 text-[10px] uppercase tracking-wider text-muted`,children:[(0,j.jsx)(`div`,{children:`System`}),(0,j.jsx)(`div`,{className:`mt-2`,children:`gateway status: running`}),(0,j.jsx)(`form`,{method:`post`,action:`/ui/logout`,className:`mt-4`,children:(0,j.jsx)(`button`,{type:`submit`,className:`btn w-full`,children:`Sign out`})})]})]}),(0,j.jsx)(`main`,{className:e.tab===`docs`?`min-w-0 flex-1 lg:h-screen lg:overflow-hidden`:`min-w-0 flex-1 px-4 py-6 lg:max-h-screen lg:overflow-y-auto`,children:e.tab===`docs`?(0,j.jsx)(Pj,{}):(0,j.jsxs)(`div`,{className:`mx-auto w-full max-w-6xl`,children:[(0,j.jsx)(ot,{}),e.tab===`chat`&&(0,j.jsx)(fj,{conversationId:e.conversationId,onConversationChange:i}),e.tab===`runs`&&(0,j.jsx)(UP,{runId:e.runId,onSelectRun:e=>r(`runs`,e),onBackToList:()=>r(`runs`),onOpenInChat:e=>r(`chat`,e)}),e.tab===`agents`&&(0,j.jsx)(Dt,{}),e.tab===`scheduled`&&(0,j.jsx)(qP,{}),e.tab===`config`&&(0,j.jsx)(kj,{}),e.tab===`usage`&&(0,j.jsx)(ZP,{}),e.tab===`guide`&&(0,j.jsx)(uP,{section:e.guideSection,onSectionChange:a})]})})]})}var aF=document.getElementById(`root`);if(!aF)throw Error(`missing #root`);(0,Pe.createRoot)(aF).render((0,j.jsx)(A.StrictMode,{children:(0,j.jsx)(rF,{})}));export{Iv as a,bS as i,ES as n,yS as r,DS as t};
228
- //# sourceMappingURL=index-BfPuPCFp.js.map