prefect 3.6.14.dev3__py3-none-any.whl → 3.6.14.dev4__py3-none-any.whl

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 (251) hide show
  1. prefect/_build_info.py +3 -3
  2. prefect/futures.py +17 -4
  3. prefect/runner/runner.py +113 -29
  4. prefect/server/ui-v2/assets/{artifact-card-CNabu-6j.js → artifact-card-DmR_0bKj.js} +2 -2
  5. prefect/server/ui-v2/assets/{artifact-card-CNabu-6j.js.map → artifact-card-DmR_0bKj.js.map} +1 -1
  6. prefect/server/ui-v2/assets/{artifact._id-Emkhr_0h.js → artifact._id-BF4365i6.js} +2 -2
  7. prefect/server/ui-v2/assets/{artifact._id-Emkhr_0h.js.map → artifact._id-BF4365i6.js.map} +1 -1
  8. prefect/server/ui-v2/assets/{automation-schema-CRKJHa4q.js → automation-schema-crrFcHTg.js} +2 -2
  9. prefect/server/ui-v2/assets/{automation-schema-CRKJHa4q.js.map → automation-schema-crrFcHTg.js.map} +1 -1
  10. prefect/server/ui-v2/assets/{automation-wizard-Cej8aik5.js → automation-wizard-DMI3p_HA.js} +2 -2
  11. prefect/server/ui-v2/assets/{automation-wizard-Cej8aik5.js.map → automation-wizard-DMI3p_HA.js.map} +1 -1
  12. prefect/server/ui-v2/assets/automation._id-C_ZATYDQ.js +2 -0
  13. prefect/server/ui-v2/assets/{automation._id-Bm1T3_NO.js.map → automation._id-C_ZATYDQ.js.map} +1 -1
  14. prefect/server/ui-v2/assets/{automation_._id.edit-C5NIVfxR.js → automation_._id.edit-Dkc09fFA.js} +2 -2
  15. prefect/server/ui-v2/assets/{automation_._id.edit-C5NIVfxR.js.map → automation_._id.edit-Dkc09fFA.js.map} +1 -1
  16. prefect/server/ui-v2/assets/{automations-header-CdJSlWw8.js → automations-header-H_FW9LY7.js} +2 -2
  17. prefect/server/ui-v2/assets/{automations-header-CdJSlWw8.js.map → automations-header-H_FW9LY7.js.map} +1 -1
  18. prefect/server/ui-v2/assets/{base-job-template-form-section-DX_X28oU.js → base-job-template-form-section-CVnxwfEi.js} +2 -2
  19. prefect/server/ui-v2/assets/{base-job-template-form-section-DX_X28oU.js.map → base-job-template-form-section-CVnxwfEi.js.map} +1 -1
  20. prefect/server/ui-v2/assets/{block-type-details-BcpcwaJS.js → block-type-details-BIzTWlfj.js} +2 -2
  21. prefect/server/ui-v2/assets/{block-type-details-BcpcwaJS.js.map → block-type-details-BIzTWlfj.js.map} +1 -1
  22. prefect/server/ui-v2/assets/block-type-logo-B3XAhRSL.js +2 -0
  23. prefect/server/ui-v2/assets/{block-type-logo-ox5VqJuy.js.map → block-type-logo-B3XAhRSL.js.map} +1 -1
  24. prefect/server/ui-v2/assets/{block._id-BD6wu3yC.js → block._id-Bj0YEdv1.js} +2 -2
  25. prefect/server/ui-v2/assets/{block._id-BD6wu3yC.js.map → block._id-Bj0YEdv1.js.map} +1 -1
  26. prefect/server/ui-v2/assets/{block_._id.edit-aneXPzUW.js → block_._id.edit-C7sUQ8mQ.js} +2 -2
  27. prefect/server/ui-v2/assets/{block_._id.edit-aneXPzUW.js.map → block_._id.edit-C7sUQ8mQ.js.map} +1 -1
  28. prefect/server/ui-v2/assets/{catalog-C7ttFKuv.js → catalog-Cywf-iho.js} +2 -2
  29. prefect/server/ui-v2/assets/{catalog-C7ttFKuv.js.map → catalog-Cywf-iho.js.map} +1 -1
  30. prefect/server/ui-v2/assets/{catalog_._slug-CrcphBbo.js → catalog_._slug-qLWMRQt3.js} +2 -2
  31. prefect/server/ui-v2/assets/{catalog_._slug-CrcphBbo.js.map → catalog_._slug-qLWMRQt3.js.map} +1 -1
  32. prefect/server/ui-v2/assets/{catalog_._slug_.create-Dd7ATIKq.js → catalog_._slug_.create-LslFlpde.js} +2 -2
  33. prefect/server/ui-v2/assets/{catalog_._slug_.create-Dd7ATIKq.js.map → catalog_._slug_.create-LslFlpde.js.map} +1 -1
  34. prefect/server/ui-v2/assets/{collapsible-D5U2XK4R.js → collapsible-BszH-EeY.js} +2 -2
  35. prefect/server/ui-v2/assets/{collapsible-D5U2XK4R.js.map → collapsible-BszH-EeY.js.map} +1 -1
  36. prefect/server/ui-v2/assets/{concurrency-limit._id-D-xV_tiF.js → concurrency-limit._id-Dam_Ftkw.js} +2 -2
  37. prefect/server/ui-v2/assets/{concurrency-limit._id-D-xV_tiF.js.map → concurrency-limit._id-Dam_Ftkw.js.map} +1 -1
  38. prefect/server/ui-v2/assets/{create-Da7OBOa5.js → create-B11nNTmT.js} +2 -2
  39. prefect/server/ui-v2/assets/{create-Da7OBOa5.js.map → create-B11nNTmT.js.map} +1 -1
  40. prefect/server/ui-v2/assets/create-B8EFPjmO.js +2 -0
  41. prefect/server/ui-v2/assets/{create-CiMo25er.js.map → create-B8EFPjmO.js.map} +1 -1
  42. prefect/server/ui-v2/assets/cronstrue-IJcBJ9tZ.js +2 -0
  43. prefect/server/ui-v2/assets/cronstrue-IJcBJ9tZ.js.map +1 -0
  44. prefect/server/ui-v2/assets/{data-table-Bfa8_ZJd.js → data-table-C1eRvlXV.js} +2 -2
  45. prefect/server/ui-v2/assets/{data-table-Bfa8_ZJd.js.map → data-table-C1eRvlXV.js.map} +1 -1
  46. prefect/server/ui-v2/assets/{delete-confirmation-dialog-D18TITKv.js → delete-confirmation-dialog-DCmC1ZTD.js} +2 -2
  47. prefect/server/ui-v2/assets/{delete-confirmation-dialog-D18TITKv.js.map → delete-confirmation-dialog-DCmC1ZTD.js.map} +1 -1
  48. prefect/server/ui-v2/assets/deployment-action-header-WD51TIyE.js +2 -0
  49. prefect/server/ui-v2/assets/{deployment-action-header-AamGn0qI.js.map → deployment-action-header-WD51TIyE.js.map} +1 -1
  50. prefect/server/ui-v2/assets/{deployment-form-QIRH-pew.js → deployment-form-FaqDdnNa.js} +3 -3
  51. prefect/server/ui-v2/assets/{deployment-form-QIRH-pew.js.map → deployment-form-FaqDdnNa.js.map} +1 -1
  52. prefect/server/ui-v2/assets/{deployment-links-yTRvIDd3.js → deployment-links-CLax44tW.js} +2 -2
  53. prefect/server/ui-v2/assets/{deployment-links-yTRvIDd3.js.map → deployment-links-CLax44tW.js.map} +1 -1
  54. prefect/server/ui-v2/assets/{deployment._id-CCBPOCfw.js → deployment._id-CbWiylvh.js} +2 -2
  55. prefect/server/ui-v2/assets/{deployment._id-CCBPOCfw.js.map → deployment._id-CbWiylvh.js.map} +1 -1
  56. prefect/server/ui-v2/assets/{deployment._id-m4luvPWl.js → deployment._id-DrtOyhFC.js} +2 -2
  57. prefect/server/ui-v2/assets/{deployment._id-m4luvPWl.js.map → deployment._id-DrtOyhFC.js.map} +1 -1
  58. prefect/server/ui-v2/assets/deployment_._id.duplicate-CqlNWQfz.js +2 -0
  59. prefect/server/ui-v2/assets/{deployment_._id.duplicate-DFjSeYn4.js.map → deployment_._id.duplicate-CqlNWQfz.js.map} +1 -1
  60. prefect/server/ui-v2/assets/deployment_._id.edit-CbvCe2YU.js +2 -0
  61. prefect/server/ui-v2/assets/{deployment_._id.edit-5-mFOphJ.js.map → deployment_._id.edit-CbvCe2YU.js.map} +1 -1
  62. prefect/server/ui-v2/assets/{deployment_._id.run-CwVe5hPJ.js → deployment_._id.run-BnIFeR-d.js} +2 -2
  63. prefect/server/ui-v2/assets/{deployment_._id.run-CwVe5hPJ.js.map → deployment_._id.run-BnIFeR-d.js.map} +1 -1
  64. prefect/server/ui-v2/assets/{dropdown-menu-g64QiYKu.js → dropdown-menu-Bhox1zoa.js} +2 -2
  65. prefect/server/ui-v2/assets/{dropdown-menu-g64QiYKu.js.map → dropdown-menu-Bhox1zoa.js.map} +1 -1
  66. prefect/server/ui-v2/assets/{event-resource-display-BqqHFc0B.js → event-resource-display-65B76oFV.js} +2 -2
  67. prefect/server/ui-v2/assets/{event-resource-display-BqqHFc0B.js.map → event-resource-display-65B76oFV.js.map} +1 -1
  68. prefect/server/ui-v2/assets/{event._eventDate._eventId-BR0eukkm.js → event._eventDate._eventId-CxPjH2H7.js} +2 -2
  69. prefect/server/ui-v2/assets/{event._eventDate._eventId-BR0eukkm.js.map → event._eventDate._eventId-CxPjH2H7.js.map} +1 -1
  70. prefect/server/ui-v2/assets/{flow-run-graph-kZfaIevn.js → flow-run-graph-ZOatFLjv.js} +2 -2
  71. prefect/server/ui-v2/assets/{flow-run-graph-kZfaIevn.js.map → flow-run-graph-ZOatFLjv.js.map} +1 -1
  72. prefect/server/ui-v2/assets/flow-run._id-1RC-URiA.js +2 -0
  73. prefect/server/ui-v2/assets/{flow-run._id-Caq--9Lr.js.map → flow-run._id-1RC-URiA.js.map} +1 -1
  74. prefect/server/ui-v2/assets/flow-run._id-CDFeuz16.js +2 -0
  75. prefect/server/ui-v2/assets/{flow-run._id-DiA0_X5m.js.map → flow-run._id-CDFeuz16.js.map} +1 -1
  76. prefect/server/ui-v2/assets/{flow-run._id-BX0UeXTj.js → flow-run._id-U6rzXfvR.js} +4 -4
  77. prefect/server/ui-v2/assets/{flow-run._id-BX0UeXTj.js.map → flow-run._id-U6rzXfvR.js.map} +1 -1
  78. prefect/server/ui-v2/assets/{flow-runs-pagination-CoZZ-ed_.js → flow-runs-pagination-D_d5hdM0.js} +2 -2
  79. prefect/server/ui-v2/assets/{flow-runs-pagination-CoZZ-ed_.js.map → flow-runs-pagination-D_d5hdM0.js.map} +1 -1
  80. prefect/server/ui-v2/assets/{flow._id-nRzTWzLb.js → flow._id-DkeN8TLS.js} +2 -2
  81. prefect/server/ui-v2/assets/{flow._id-nRzTWzLb.js.map → flow._id-DkeN8TLS.js.map} +1 -1
  82. prefect/server/ui-v2/assets/{form-CdcF42XZ.js → form-CJfDUosd.js} +2 -2
  83. prefect/server/ui-v2/assets/{form-CdcF42XZ.js.map → form-CJfDUosd.js.map} +1 -1
  84. prefect/server/ui-v2/assets/{header-DijI5Lcu.js → header-C5liWcfp.js} +2 -2
  85. prefect/server/ui-v2/assets/{header-DijI5Lcu.js.map → header-C5liWcfp.js.map} +1 -1
  86. prefect/server/ui-v2/assets/{header-DkJo9Uge.js → header-MZZX5lQ8.js} +2 -2
  87. prefect/server/ui-v2/assets/{header-DkJo9Uge.js.map → header-MZZX5lQ8.js.map} +1 -1
  88. prefect/server/ui-v2/assets/{header-DV0gMQER.js → header-vYbWNFdK.js} +2 -2
  89. prefect/server/ui-v2/assets/{header-DV0gMQER.js.map → header-vYbWNFdK.js.map} +1 -1
  90. prefect/server/ui-v2/assets/{index-VUajxmNL.js → index-4xVLy12E.js} +2 -2
  91. prefect/server/ui-v2/assets/{index-VUajxmNL.js.map → index-4xVLy12E.js.map} +1 -1
  92. prefect/server/ui-v2/assets/{index-KlV75baW.js → index-5fQrQZ3K.js} +2 -2
  93. prefect/server/ui-v2/assets/{index-KlV75baW.js.map → index-5fQrQZ3K.js.map} +1 -1
  94. prefect/server/ui-v2/assets/index-7bWZ2Znt.js +2 -0
  95. prefect/server/ui-v2/assets/{index-CqvGvZOq.js.map → index-7bWZ2Znt.js.map} +1 -1
  96. prefect/server/ui-v2/assets/{index-Chtop8D8.js → index-BOVwKiXn.js} +2 -2
  97. prefect/server/ui-v2/assets/{index-Chtop8D8.js.map → index-BOVwKiXn.js.map} +1 -1
  98. prefect/server/ui-v2/assets/{index-BZ9TDxSy.js → index-BPmw935P.js} +2 -2
  99. prefect/server/ui-v2/assets/{index-BZ9TDxSy.js.map → index-BPmw935P.js.map} +1 -1
  100. prefect/server/ui-v2/assets/index-BR6bwuK4.js +2 -0
  101. prefect/server/ui-v2/assets/{index-BCKNs_w7.js.map → index-BR6bwuK4.js.map} +1 -1
  102. prefect/server/ui-v2/assets/{index-DYKO0qOd.js → index-B_3WKH2_.js} +2 -2
  103. prefect/server/ui-v2/assets/{index-DYKO0qOd.js.map → index-B_3WKH2_.js.map} +1 -1
  104. prefect/server/ui-v2/assets/{index-BV3WqCCv.js → index-BgOHAC5L.js} +2 -2
  105. prefect/server/ui-v2/assets/{index-BV3WqCCv.js.map → index-BgOHAC5L.js.map} +1 -1
  106. prefect/server/ui-v2/assets/{index-CUZXozY8.js → index-Bmd9p_xN.js} +2 -2
  107. prefect/server/ui-v2/assets/{index-CUZXozY8.js.map → index-Bmd9p_xN.js.map} +1 -1
  108. prefect/server/ui-v2/assets/{index-faXvGo5k.js → index-BmdTLblr.js} +2 -2
  109. prefect/server/ui-v2/assets/{index-faXvGo5k.js.map → index-BmdTLblr.js.map} +1 -1
  110. prefect/server/ui-v2/assets/{index-Cuh3BwlA.js → index-CCCwtbSq.js} +2 -2
  111. prefect/server/ui-v2/assets/{index-Cuh3BwlA.js.map → index-CCCwtbSq.js.map} +1 -1
  112. prefect/server/ui-v2/assets/{index-yTjygRmH.js → index-CbJNJTr8.js} +2 -2
  113. prefect/server/ui-v2/assets/{index-yTjygRmH.js.map → index-CbJNJTr8.js.map} +1 -1
  114. prefect/server/ui-v2/assets/index-CcyfsgGP.js +2 -0
  115. prefect/server/ui-v2/assets/{index-BijfHkUE.js.map → index-CcyfsgGP.js.map} +1 -1
  116. prefect/server/ui-v2/assets/{index-AXV1ellj.js → index-CfHvTOAO.js} +2 -2
  117. prefect/server/ui-v2/assets/{index-AXV1ellj.js.map → index-CfHvTOAO.js.map} +1 -1
  118. prefect/server/ui-v2/assets/{index-BGZtCgRR.js → index-ClXbR8i0.js} +2 -2
  119. prefect/server/ui-v2/assets/{index-BGZtCgRR.js.map → index-ClXbR8i0.js.map} +1 -1
  120. prefect/server/ui-v2/assets/{index-BfuGBXBN.js → index-Cyw9YHlj.js} +2 -2
  121. prefect/server/ui-v2/assets/{index-BfuGBXBN.js.map → index-Cyw9YHlj.js.map} +1 -1
  122. prefect/server/ui-v2/assets/{index-BZqccBpn.js → index-DLuXqHi9.js} +6 -6
  123. prefect/server/ui-v2/assets/index-DLuXqHi9.js.map +1 -0
  124. prefect/server/ui-v2/assets/{index-BmUvoLOK.js → index-DeeA9nPM.js} +2 -2
  125. prefect/server/ui-v2/assets/{index-BmUvoLOK.js.map → index-DeeA9nPM.js.map} +1 -1
  126. prefect/server/ui-v2/assets/index-MeJBhX-C.js +2 -0
  127. prefect/server/ui-v2/assets/{index-CUJoNEgb.js.map → index-MeJBhX-C.js.map} +1 -1
  128. prefect/server/ui-v2/assets/{index-DO_c3_A_.js → index-enqoJV8x.js} +2 -2
  129. prefect/server/ui-v2/assets/{index-DO_c3_A_.js.map → index-enqoJV8x.js.map} +1 -1
  130. prefect/server/ui-v2/assets/{json-input-DFgWdLGv.js → json-input-CJ1Ipjax.js} +2 -2
  131. prefect/server/ui-v2/assets/{json-input-DFgWdLGv.js.map → json-input-CJ1Ipjax.js.map} +1 -1
  132. prefect/server/ui-v2/assets/{key._key-CpeWM0mN.js → key._key-B0wb5Umi.js} +2 -2
  133. prefect/server/ui-v2/assets/{key._key-CpeWM0mN.js.map → key._key-B0wb5Umi.js.map} +1 -1
  134. prefect/server/ui-v2/assets/{lazy-markdown-Bzi0YUUV.js → lazy-markdown-sP3PYQgB.js} +3 -3
  135. prefect/server/ui-v2/assets/{lazy-markdown-Bzi0YUUV.js.map → lazy-markdown-sP3PYQgB.js.map} +1 -1
  136. prefect/server/ui-v2/assets/{login-CM0nuDdd.js → login-DNY0o3XU.js} +2 -2
  137. prefect/server/ui-v2/assets/{login-CM0nuDdd.js.map → login-DNY0o3XU.js.map} +1 -1
  138. prefect/server/ui-v2/assets/{markdown-input-CGOAnaWz.js → markdown-input-Bos2JYXW.js} +2 -2
  139. prefect/server/ui-v2/assets/{markdown-input-CGOAnaWz.js.map → markdown-input-Bos2JYXW.js.map} +1 -1
  140. prefect/server/ui-v2/assets/{python-example-snippet-CyJ28Tm-.js → python-example-snippet-CWSJRd48.js} +3 -3
  141. prefect/server/ui-v2/assets/{python-example-snippet-CyJ28Tm-.js.map → python-example-snippet-CWSJRd48.js.map} +1 -1
  142. prefect/server/ui-v2/assets/{python-input-D8_x22t4.js → python-input-Bu4995lK.js} +2 -2
  143. prefect/server/ui-v2/assets/{python-input-D8_x22t4.js.map → python-input-Bu4995lK.js.map} +1 -1
  144. prefect/server/ui-v2/assets/{radio-group-Dgu38qwz.js → radio-group-C0D0oLYd.js} +2 -2
  145. prefect/server/ui-v2/assets/{radio-group-Dgu38qwz.js.map → radio-group-C0D0oLYd.js.map} +1 -1
  146. prefect/server/ui-v2/assets/{route-error-state-CVHTggxQ.js → route-error-state-DzKu_Iw_.js} +2 -2
  147. prefect/server/ui-v2/assets/{route-error-state-CVHTggxQ.js.map → route-error-state-DzKu_Iw_.js.map} +1 -1
  148. prefect/server/ui-v2/assets/{schema-form-DqRLX--T.js → schema-form-BD95b0iS.js} +2 -2
  149. prefect/server/ui-v2/assets/schema-form-BD95b0iS.js.map +1 -0
  150. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-DuEmswz-.js → schema-form-input-string-format-datetime-DyDs1jNl.js} +4 -4
  151. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-DuEmswz-.js.map → schema-form-input-string-format-datetime-DyDs1jNl.js.map} +1 -1
  152. prefect/server/ui-v2/assets/{settings-CtKmYnoo.js → settings-a90cwhBe.js} +2 -2
  153. prefect/server/ui-v2/assets/{settings-CtKmYnoo.js.map → settings-a90cwhBe.js.map} +1 -1
  154. prefect/server/ui-v2/assets/{sort-filter-BNQ6rjAG.js → sort-filter-CCltjs1E.js} +2 -2
  155. prefect/server/ui-v2/assets/{sort-filter-BNQ6rjAG.js.map → sort-filter-CCltjs1E.js.map} +1 -1
  156. prefect/server/ui-v2/assets/{table-CJS-5Aky.js → table-CrPymfJD.js} +2 -2
  157. prefect/server/ui-v2/assets/{table-CJS-5Aky.js.map → table-CrPymfJD.js.map} +1 -1
  158. prefect/server/ui-v2/assets/{tags-input-CDvuqe9B.js → tags-input-BdNYl8nS.js} +2 -2
  159. prefect/server/ui-v2/assets/{tags-input-CDvuqe9B.js.map → tags-input-BdNYl8nS.js.map} +1 -1
  160. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-DMqNFEVn.js → task-run-concurrency-limits-reset-dialog-B4bdiAgf.js} +2 -2
  161. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-DMqNFEVn.js.map → task-run-concurrency-limits-reset-dialog-B4bdiAgf.js.map} +1 -1
  162. prefect/server/ui-v2/assets/{task-run._id-CV5t0LR0.js → task-run._id-BQac40_I.js} +3 -3
  163. prefect/server/ui-v2/assets/{task-run._id-CV5t0LR0.js.map → task-run._id-BQac40_I.js.map} +1 -1
  164. prefect/server/ui-v2/assets/task-run._id-BzeMfM08.js +2 -0
  165. prefect/server/ui-v2/assets/{task-run._id-CiVsXKpy.js.map → task-run._id-BzeMfM08.js.map} +1 -1
  166. prefect/server/ui-v2/assets/task-runs-pagination-WFGIqR6p.js +2 -0
  167. prefect/server/ui-v2/assets/{task-runs-pagination-DGjxL4DO.js.map → task-runs-pagination-WFGIqR6p.js.map} +1 -1
  168. prefect/server/ui-v2/assets/{textarea-Mne2s-1n.js → textarea-CGFflH-n.js} +2 -2
  169. prefect/server/ui-v2/assets/{textarea-Mne2s-1n.js.map → textarea-CGFflH-n.js.map} +1 -1
  170. prefect/server/ui-v2/assets/{timezone-select-CPBtT8tA.js → timezone-select-ClE9nfKA.js} +2 -2
  171. prefect/server/ui-v2/assets/{timezone-select-CPBtT8tA.js.map → timezone-select-ClE9nfKA.js.map} +1 -1
  172. prefect/server/ui-v2/assets/{toggle-group-CvPe0UY1.js → toggle-group-Dnv_LMnU.js} +2 -2
  173. prefect/server/ui-v2/assets/{toggle-group-CvPe0UY1.js.map → toggle-group-Dnv_LMnU.js.map} +1 -1
  174. prefect/server/ui-v2/assets/{use-debounce-callback-Dcf0d0U7.js → use-debounce-callback-CVfZS_LP.js} +2 -2
  175. prefect/server/ui-v2/assets/{use-debounce-callback-Dcf0d0U7.js.map → use-debounce-callback-CVfZS_LP.js.map} +1 -1
  176. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-DnRkM1Cj.js → use-delete-automation-confirmation-dialog-CRGV6wvn.js} +2 -2
  177. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-DnRkM1Cj.js.map → use-delete-automation-confirmation-dialog-CRGV6wvn.js.map} +1 -1
  178. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-CMHtwDvb.js → use-delete-block-document-confirmation-dialog-DNMP_gtr.js} +2 -2
  179. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-CMHtwDvb.js.map → use-delete-block-document-confirmation-dialog-DNMP_gtr.js.map} +1 -1
  180. prefect/server/ui-v2/assets/{use-delete-confirmation-dialog-Bka9YDdO.js → use-delete-confirmation-dialog-C5d6hPL-.js} +2 -2
  181. prefect/server/ui-v2/assets/{use-delete-confirmation-dialog-Bka9YDdO.js.map → use-delete-confirmation-dialog-C5d6hPL-.js.map} +1 -1
  182. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DB4pe2_m.js → use-flow-runs-selected-rows-D3-TVsRL.js} +2 -2
  183. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-DB4pe2_m.js.map → use-flow-runs-selected-rows-D3-TVsRL.js.map} +1 -1
  184. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DUPrB7V9.js → use-get-artifacts-flow-task-runs-I3Wb9fOV.js} +2 -2
  185. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-DUPrB7V9.js.map → use-get-artifacts-flow-task-runs-I3Wb9fOV.js.map} +1 -1
  186. prefect/server/ui-v2/assets/{use-is-overflowing-Cc-Qm0vx.js → use-is-overflowing-CyVH32I2.js} +2 -2
  187. prefect/server/ui-v2/assets/{use-is-overflowing-Cc-Qm0vx.js.map → use-is-overflowing-CyVH32I2.js.map} +1 -1
  188. prefect/server/ui-v2/assets/{use-page-title-ELpQMkBC.js → use-page-title-CImKMV-D.js} +2 -2
  189. prefect/server/ui-v2/assets/{use-page-title-ELpQMkBC.js.map → use-page-title-CImKMV-D.js.map} +1 -1
  190. prefect/server/ui-v2/assets/use-quick-run-Be-i6Tzi.js +2 -0
  191. prefect/server/ui-v2/assets/{use-quick-run-uAasMmAv.js.map → use-quick-run-Be-i6Tzi.js.map} +1 -1
  192. prefect/server/ui-v2/assets/{use-state-favicon-CzOUYzQe.js → use-state-favicon-DtW_I9k3.js} +2 -2
  193. prefect/server/ui-v2/assets/{use-state-favicon-CzOUYzQe.js.map → use-state-favicon-DtW_I9k3.js.map} +1 -1
  194. prefect/server/ui-v2/assets/{use-stepper-DvHmfROo.js → use-stepper-BSvi_u_j.js} +2 -2
  195. prefect/server/ui-v2/assets/{use-stepper-DvHmfROo.js.map → use-stepper-BSvi_u_j.js.map} +1 -1
  196. prefect/server/ui-v2/assets/{utilities-XA-1-LhA.js → utilities-BCBDUmEl.js} +2 -2
  197. prefect/server/ui-v2/assets/{utilities-XA-1-LhA.js.map → utilities-BCBDUmEl.js.map} +1 -1
  198. prefect/server/ui-v2/assets/{vendor-codemirror-Dn73yRFx.js → vendor-codemirror-OTxfneaa.js} +2 -2
  199. prefect/server/ui-v2/assets/{vendor-codemirror-Dn73yRFx.js.map → vendor-codemirror-OTxfneaa.js.map} +1 -1
  200. prefect/server/ui-v2/assets/{vendor-date-Bxa7CHB1.js → vendor-date-CRz8gtWZ.js} +2 -2
  201. prefect/server/ui-v2/assets/{vendor-date-Bxa7CHB1.js.map → vendor-date-CRz8gtWZ.js.map} +1 -1
  202. prefect/server/ui-v2/assets/{vendor-forms-mroZAMaw.js → vendor-forms-D-iybWES.js} +2 -2
  203. prefect/server/ui-v2/assets/{vendor-forms-mroZAMaw.js.map → vendor-forms-D-iybWES.js.map} +1 -1
  204. prefect/server/ui-v2/assets/{vendor-markdown-BV905mMk.js → vendor-markdown-TdbL8FCd.js} +2 -2
  205. prefect/server/ui-v2/assets/{vendor-markdown-BV905mMk.js.map → vendor-markdown-TdbL8FCd.js.map} +1 -1
  206. prefect/server/ui-v2/assets/{vendor-radix-CP6hQtRc.js → vendor-radix-DRMjKWJW.js} +5 -5
  207. prefect/server/ui-v2/assets/{vendor-radix-CP6hQtRc.js.map → vendor-radix-DRMjKWJW.js.map} +1 -1
  208. prefect/server/ui-v2/assets/{vendor-recharts-BOcghvr2.js → vendor-recharts-BGjDGXVf.js} +2 -2
  209. prefect/server/ui-v2/assets/{vendor-recharts-BOcghvr2.js.map → vendor-recharts-BGjDGXVf.js.map} +1 -1
  210. prefect/server/ui-v2/assets/{vendor-tanstack-CLpbOGYv.js → vendor-tanstack-CWDKYA_B.js} +2 -2
  211. prefect/server/ui-v2/assets/{vendor-tanstack-CLpbOGYv.js.map → vendor-tanstack-CWDKYA_B.js.map} +1 -1
  212. prefect/server/ui-v2/assets/{work-pool-filter-D4DI4Hd5.js → work-pool-filter-BuJB9elW.js} +2 -2
  213. prefect/server/ui-v2/assets/{work-pool-filter-D4DI4Hd5.js.map → work-pool-filter-BuJB9elW.js.map} +1 -1
  214. prefect/server/ui-v2/assets/{work-pool-queue-toggle--tVsqhDi.js → work-pool-queue-toggle-DP2ONU28.js} +2 -2
  215. prefect/server/ui-v2/assets/{work-pool-queue-toggle--tVsqhDi.js.map → work-pool-queue-toggle-DP2ONU28.js.map} +1 -1
  216. prefect/server/ui-v2/assets/{work-pool._workPoolName-Ba0XSN4m.js → work-pool._workPoolName-BjhJe3F4.js} +2 -2
  217. prefect/server/ui-v2/assets/{work-pool._workPoolName-Ba0XSN4m.js.map → work-pool._workPoolName-BjhJe3F4.js.map} +1 -1
  218. prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-lHDf1Aih.js +2 -0
  219. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-CeYLESXS.js.map → work-pool_._workPoolName.edit-lHDf1Aih.js.map} +1 -1
  220. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CHvlnO-U.js → work-pool_._workPoolName.queue._workQueueName-CLthz7sB.js} +2 -2
  221. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-CHvlnO-U.js.map → work-pool_._workPoolName.queue._workQueueName-CLthz7sB.js.map} +1 -1
  222. prefect/server/ui-v2/assets/{work-queue-icon-text-DnQAtUi_.js → work-queue-icon-text-4iEAtZOh.js} +2 -2
  223. prefect/server/ui-v2/assets/{work-queue-icon-text-DnQAtUi_.js.map → work-queue-icon-text-4iEAtZOh.js.map} +1 -1
  224. prefect/server/ui-v2/assets/{zod-cc-7bk3x.js → zod-CjGf5GIv.js} +2 -2
  225. prefect/server/ui-v2/assets/{zod-cc-7bk3x.js.map → zod-CjGf5GIv.js.map} +1 -1
  226. prefect/server/ui-v2/index.html +6 -6
  227. {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/METADATA +2 -2
  228. {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/RECORD +231 -231
  229. prefect/server/ui-v2/assets/automation._id-Bm1T3_NO.js +0 -2
  230. prefect/server/ui-v2/assets/block-type-logo-ox5VqJuy.js +0 -2
  231. prefect/server/ui-v2/assets/create-CiMo25er.js +0 -2
  232. prefect/server/ui-v2/assets/cronstrue-CeanGOEE.js +0 -2
  233. prefect/server/ui-v2/assets/cronstrue-CeanGOEE.js.map +0 -1
  234. prefect/server/ui-v2/assets/deployment-action-header-AamGn0qI.js +0 -2
  235. prefect/server/ui-v2/assets/deployment_._id.duplicate-DFjSeYn4.js +0 -2
  236. prefect/server/ui-v2/assets/deployment_._id.edit-5-mFOphJ.js +0 -2
  237. prefect/server/ui-v2/assets/flow-run._id-Caq--9Lr.js +0 -2
  238. prefect/server/ui-v2/assets/flow-run._id-DiA0_X5m.js +0 -2
  239. prefect/server/ui-v2/assets/index-BCKNs_w7.js +0 -2
  240. prefect/server/ui-v2/assets/index-BZqccBpn.js.map +0 -1
  241. prefect/server/ui-v2/assets/index-BijfHkUE.js +0 -2
  242. prefect/server/ui-v2/assets/index-CUJoNEgb.js +0 -2
  243. prefect/server/ui-v2/assets/index-CqvGvZOq.js +0 -2
  244. prefect/server/ui-v2/assets/schema-form-DqRLX--T.js.map +0 -1
  245. prefect/server/ui-v2/assets/task-run._id-CiVsXKpy.js +0 -2
  246. prefect/server/ui-v2/assets/task-runs-pagination-DGjxL4DO.js +0 -2
  247. prefect/server/ui-v2/assets/use-quick-run-uAasMmAv.js +0 -2
  248. prefect/server/ui-v2/assets/work-pool_._workPoolName.edit-CeYLESXS.js +0 -2
  249. {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/WHEEL +0 -0
  250. {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/entry_points.txt +0 -0
  251. {prefect-3.6.14.dev3.dist-info → prefect-3.6.14.dev4.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
1
- import{r as Te,j as Rp}from"./vendor-tanstack-CLpbOGYv.js";const pf=1024;let qp=0,Ue=class{constructor(e,t){this.from=e,this.to=t}};class M{constructor(e={}){this.id=qp++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=fe.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}M.closedBy=new M({deserialize:n=>n.split(" ")});M.openedBy=new M({deserialize:n=>n.split(" ")});M.group=new M({deserialize:n=>n.split(" ")});M.isolate=new M({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});M.contextHash=new M({perNode:!0});M.lookAhead=new M({perNode:!0});M.mounted=new M({perNode:!0});class fn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[M.mounted.id]}}const Ap=Object.create(null);class fe{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Ap,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new fe(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(M.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(M.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}fe.none=new fe("",Object.create(null),0,8);class Mn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);o&&(r||(r=Object.assign({},i.props)),r[o[0].id]=o[1])}t.push(r?new fe(i.name,r,i.id,i.flags):i)}return new Mn(t)}}const Yn=new WeakMap,ka=new WeakMap;var H;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(H||(H={}));class G{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=fn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new qr(this.topNode,e)}cursorAt(e,t=0,i=0){let r=Yn.get(this)||this.topNode,s=new qr(r);return s.moveTo(e,t),Yn.set(this,s._tree),s}get topNode(){return new Pe(this,0,0,null)}resolve(e,t=0){let i=On(Yn.get(this)||this.topNode,e,t,!1);return Yn.set(this,i),i}resolveInner(e,t=0){let i=On(ka.get(this)||this.topNode,e,t,!0);return ka.set(this,i),i}resolveStack(e,t=0){return Wp(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&H.IncludeAnonymous)>0;for(let a=this.cursor(o|H.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:$l(fe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new G(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new G(fe.none,t,i,r)))}static build(e){return Vp(e)}}G.empty=new G(fe.none,[],[],0);class wl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new wl(this.buffer,this.index)}}class Vt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return fe.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(mf(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=r[l++],s[a++]=r[l++]-i;let h=s[a++]=r[l++]-i;s[a++]=r[l++]-e,o=Math.max(o,h)}return new Vt(s,o,this.set)}}function mf(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function On(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof Pe&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:H.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof Pe&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class gf{cursor(e=0){return new qr(this,e)}getChild(e,t=null,i=null){let r=wa(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return wa(this,e,t,i)}resolve(e,t=0){return On(this,e,t,!1)}resolveInner(e,t=0){return On(this,e,t,!0)}matchContext(e){return go(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class Pe extends gf{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(mf(r,i,f,f+c.length)){if(c instanceof Vt){if(s&H.ExcludeBuffers)continue;let O=c.findChild(0,c.buffer.length,t,i-f,r);if(O>-1)return new at(new Mp(o,c,e,f),null,O)}else if(s&H.IncludeAnonymous||!c.type.isAnonymous||Pl(c)){let O;if(!(s&H.IgnoreMounts)&&(O=fn.get(c))&&!O.overlay)return new Pe(O.tree,f,e,o);let u=new Pe(c,f,e,o);return s&H.IncludeAnonymous||!u.type.isAnonymous?u:u.nextChild(t<0?c.children.length-1:0,t,i,r)}}}if(s&H.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&H.IgnoreOverlays)&&(r=fn.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new Pe(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function wa(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function go(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Mp{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class at extends gf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new at(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&H.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new at(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new at(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new at(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),t.push(0)}return new G(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Qf(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof Pe&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new Ep(r,t)}class Ep{constructor(e,t){this.heads=e,this.node=t}get next(){return Qf(this.heads)}}function Wp(n,e,t){let i=n.resolveInner(e,t),r=null;for(let s=i instanceof Pe?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,t)),s=o}else{let o=fn.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new Pe(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(On(l,e,t,!1))}}return r?Qf(r):i}class qr{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Pe)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof Pe?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&H.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&H.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&H.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&H.IncludeAnonymous||l instanceof Vt||!l.type.isAnonymous||Pl(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)t=new at(this.buffer,t,this.stack[r]);return this.bufferNode=new at(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return go(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return go(this._tree,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Pl(n){return n.children.some(e=>e instanceof Vt||!e.type.isAnonymous||Pl(e))}function Vp(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=pf,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new wl(t,t.length):t,a=i.types,h=0,c=0;function f(y,w,$,E,q,L){let{id:V,start:A,end:z,size:_}=l,Y=c,he=h;for(;_<0;)if(l.next(),_==-1){let pe=s[V];$.push(pe),E.push(A-y);return}else if(_==-3){h=V;return}else if(_==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${_}`);let Oe=a[V],ye,I,oe=A-y;if(z-A<=r&&(I=g(l.pos-w,q))){let pe=new Uint16Array(I.size-I.skip),xe=l.pos-I.size,tt=pe.length;for(;l.pos>xe;)tt=Q(I.start,pe,tt);ye=new Vt(pe,z-I.start,i),oe=I.start-y}else{let pe=l.pos-_;l.next();let xe=[],tt=[],Nt=V>=o?V:-1,fi=0,Bn=z;for(;l.pos>pe;)Nt>=0&&l.id==Nt&&l.size>=0?(l.end<=Bn-r&&(p(xe,tt,A,fi,l.end,Bn,Nt,Y,he),fi=xe.length,Bn=l.end),l.next()):L>2500?O(A,pe,xe,tt):f(A,pe,xe,tt,Nt,L+1);if(Nt>=0&&fi>0&&fi<xe.length&&p(xe,tt,A,fi,A,Bn,Nt,Y,he),xe.reverse(),tt.reverse(),Nt>-1&&fi>0){let xa=u(Oe,he);ye=$l(Oe,xe,tt,0,xe.length,0,z-A,xa,xa)}else ye=m(Oe,xe,tt,z-A,Y-z,he)}$.push(ye),E.push(oe)}function O(y,w,$,E){let q=[],L=0,V=-1;for(;l.pos>w;){let{id:A,start:z,end:_,size:Y}=l;if(Y>4)l.next();else{if(V>-1&&z<V)break;V<0&&(V=_-r),q.push(A,z,_),L++,l.next()}}if(L){let A=new Uint16Array(L*4),z=q[q.length-2];for(let _=q.length-3,Y=0;_>=0;_-=3)A[Y++]=q[_],A[Y++]=q[_+1]-z,A[Y++]=q[_+2]-z,A[Y++]=Y;$.push(new Vt(A,q[2]-z,i)),E.push(z-y)}}function u(y,w){return($,E,q)=>{let L=0,V=$.length-1,A,z;if(V>=0&&(A=$[V])instanceof G){if(!V&&A.type==y&&A.length==q)return A;(z=A.prop(M.lookAhead))&&(L=E[V]+A.length+z)}return m(y,$,E,q,L,w)}}function p(y,w,$,E,q,L,V,A,z){let _=[],Y=[];for(;y.length>E;)_.push(y.pop()),Y.push(w.pop()+$-q);y.push(m(i.types[V],_,Y,L-q,A-L,z)),w.push(q-$)}function m(y,w,$,E,q,L,V){if(L){let A=[M.contextHash,L];V=V?[A].concat(V):[A]}if(q>25){let A=[M.lookAhead,q];V=V?[A].concat(V):[A]}return new G(y,w,$,E,V)}function g(y,w){let $=l.fork(),E=0,q=0,L=0,V=$.end-r,A={size:0,start:0,skip:0};e:for(let z=$.pos-y;$.pos>z;){let _=$.size;if($.id==w&&_>=0){A.size=E,A.start=q,A.skip=L,L+=4,E+=4,$.next();continue}let Y=$.pos-_;if(_<0||Y<z||$.start<V)break;let he=$.id>=o?4:0,Oe=$.start;for($.next();$.pos>Y;){if($.size<0)if($.size==-3)he+=4;else break e;else $.id>=o&&(he+=4);$.next()}q=Oe,E+=_,L+=he}return(w<0||E==y)&&(A.size=E,A.start=q,A.skip=L),A.size>4?A:void 0}function Q(y,w,$){let{id:E,start:q,end:L,size:V}=l;if(l.next(),V>=0&&E<o){let A=$;if(V>4){let z=l.pos-(V-4);for(;l.pos>z;)$=Q(y,w,$)}w[--$]=A,w[--$]=L-y,w[--$]=q-y,w[--$]=E}else V==-3?h=E:V==-4&&(c=E);return $}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let k=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new G(a[n.topID],S.reverse(),x.reverse(),k)}const Pa=new WeakMap;function gr(n,e){if(!n.isAnonymous||e instanceof Vt||e.type!=n)return 1;let t=Pa.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof G)){t=1;break}t+=gr(n,i)}Pa.set(e,t)}return t}function $l(n,e,t,i,r,s,o,l,a){let h=0;for(let p=i;p<r;p++)h+=gr(n,e[p]);let c=Math.ceil(h*1.5/8),f=[],O=[];function u(p,m,g,Q,S){for(let x=g;x<Q;){let k=x,y=m[x],w=gr(n,p[x]);for(x++;x<Q;x++){let $=gr(n,p[x]);if(w+$>=c)break;w+=$}if(x==k+1){if(w>c){let $=p[k];u($.children,$.positions,0,$.children.length,m[k]+S);continue}f.push(p[k])}else{let $=m[x-1]+p[x-1].length-y;f.push($l(n,p,m,k,x,y,$,null,a))}O.push(y+S-s)}}return u(e,t,i,r,0),(l||a)(f,O,o)}class vl{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof at?this.setBuffer(e.context.buffer,e.index,t):e instanceof Pe&&this.map.set(e.tree,t)}get(e){return e instanceof at?this.getBuffer(e.context.buffer,e.index):e instanceof Pe?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class wt{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new wt(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l<t.length?t[l]:null,f=c?c.fromA:1e9;if(f-a>=i)for(;o&&o.from<f;){let O=o;if(a>=O.from||f<=O.to||h){let u=Math.max(O.from,a)-h,p=Math.min(O.to,f)-h;O=u>=p?null:new wt(u,p,O.tree,O.offset+h,l>0,!!c)}if(O&&r.push(O),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,h=c.toA-c.toB}return r}}class Tl{startParse(e,t,i){return typeof e=="string"&&(e=new zp(e)),i=i?i.length?i.map(r=>new Ue(r.from,r.to)):[new Ue(0,0)]:[new Ue(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class zp{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Sf(n){return(e,t,i,r)=>new Lp(e,n,t,i,r)}class $a{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.from=s}}function va(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class _p{constructor(e,t,i,r,s,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const Qo=new M({perNode:!0});class Lp{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new G(i.type,i.children,i.positions,i.length,i.propValues.concat([[Qo,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[M.mounted.id]=new fn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new Up(this.fragments),t=null,i=null,r=new qr(new Pe(this.baseTree,this.ranges[0].from,0,null),H.IncludeAnonymous|H.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,O=c.to+h.pos;f>=r.from&&O<=r.to&&!t.ranges.some(u=>u.from<O&&u.to>f)&&t.ranges.push({from:f,to:O})}}l=!1}else if(i&&(o=jp(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||Dp(r);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")t=new _p(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,t);else{let c=Ca(this.ranges,s.overlay||(r.from<r.to?[new Ue(r.from,r.to)]:[]));c.length&&va(c),(c.length||!s.overlay)&&this.inner.push(new $a(s.parser,c.length?s.parser.startParse(this.input,Xa(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new Ue(f.from-r.from,f.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new Ue(r.from,r.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=Ca(this.ranges,t.ranges);h.length&&(va(h),this.inner.splice(t.index,0,new $a(t.parser,t.parser.startParse(this.input,Xa(t.mounts,h),h),t.ranges.map(c=>new Ue(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function jp(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Ta(n,e,t,i,r,s){if(e<t){let o=n.buffer[e+1];i.push(n.slice(e,t,o)),r.push(o-s)}}function Dp(n){let{node:e}=n,t=[],i=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let r=n.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,a=[s];function h(c,f,O,u,p,m){let g=t[m],Q=[],S=[];Ta(o,c,g,Q,S,u);let x=l[g+1],k=l[g+2];a.push(Q.length);let y=m?h(g+4,l[g+3],o.set.types[l[g]],x,k-x,m-1):e.toTree();return Q.push(y),S.push(x-u),Ta(o,l[g+3],f,Q,S,u),new G(O,Q,S,p)}r.children[s]=h(0,l.length,fe.none,0,o.length,t.length-1);for(let c of a){let f=n.tree.children[c],O=n.tree.positions[c];n.yield(new Pe(f,O+n.from,c,n._tree))}}class Za{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(H.IncludeAnonymous|H.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,H.IgnoreOverlays|H.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof G)t=t.children[0];else break}return!1}}let Up=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(Qo))!==null&&t!==void 0?t:i.to,this.inner=new Za(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Qo))!==null&&e!==void 0?e:t.to,this.inner=new Za(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(M.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:o})}}}return r}};function Ca(n,e){let t=null,i=e;for(let r=1,s=0;r<n.length;r++){let o=n[r-1].to,l=n[r].from;for(;s<i.length;s++){let a=i[s];if(a.from>=l)break;a.to<=o||(t||(i=t=e.slice()),a.from<o?(t[s]=new Ue(a.from,o),a.to>l&&t.splice(s+1,0,new Ue(l,a.to))):a.to>l?t[s--]=new Ue(l,a.to):t.splice(s--,1))}}return i}function Bp(n,e,t,i){let r=0,s=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=r==n.length?1e9:o?n[r].to:n[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let O=Math.max(a,t),u=Math.min(c,f,i);O<u&&h.push(new Ue(O,u))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,r++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return h}function Xa(n,e){let t=[];for(let{pos:i,mount:r,frag:s}of n){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,a=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let c=r.overlay.map(O=>new Ue(O.from+i,O.to+i)),f=Bp(e,c,a,h);for(let O=0,u=a;;O++){let p=O==f.length,m=p?h:f[O].from;if(m>u&&t.push(new wt(u,m,r.tree,-o,s.from>=u||s.openStart,s.to<=m||s.openEnd)),p)break;u=f[O].to}}else t.push(new wt(a,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}var Ra={};class Ar{constructor(e,t,i,r,s,o,l,a,h,c=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=r,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=h,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let r=e.parser.context;return new Ar(e,[],t,i,i,0,[],0,r?new qa(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,r=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let l=s.dynamicPrecedence(r);if(l&&(this.score+=l),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(r,this.reducePos);return}let a=this.stack.length-(i-1)*3-(e&262144?6:0),h=a?this.stack[a-2]:this.p.ranges[0].from,c=this.reducePos-h;c>=2e3&&!(!((t=this.p.parser.nodeSet.types[r])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=c));let f=a?this.stack[a-1]:0,O=this.bufferBase+this.buffer.length-f;if(r<s.minRepeatTerm||e&131072){let u=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,h,u,O+4,!0)}if(e&262144)this.state=this.stack[a];else{let u=this.stack[a-3];this.state=s.getGoto(u,r,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(r,h)}storeNode(e,t,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,t,i,r);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>i;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=r}}shift(e,t,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;(r>this.pos||t<=o.maxNode)&&(this.pos=r,o.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(t,i),t<=o.maxNode&&this.buffer.push(t,i,r,4)}else this.pos=r,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,r,4)}apply(e,t,i,r){e&65536?this.reduce(e):this.shift(e,t,i,r)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new Ar(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Yp(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if((i&65536)==0)return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&r.push(t[s],o);if(this.stack.length<120)for(let s=0;r.length<8&&s<t.length;s+=2){let o=t[s+1];r.some((l,a)=>a&1&&l==o)||r.push(t[s],o)}t=r}let i=[];for(let r=0;r<t.length&&i.length<4;r+=2){let s=t[r+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[r],this.pos),o.reducePos=this.pos,o.score-=200,i.push(o)}return i}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let i=t>>19,r=t&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(r,s)=>{if(!t.includes(r))return t.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let a=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,s+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new qa(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class qa{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class Yp{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class Mr{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Mr(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Mr(this.stack,this.pos,this.index)}}function Hi(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,r=0;i<n.length;){let s=0;for(;;){let o=n.charCodeAt(i++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}t?t[r++]=s:t=new e(s)}return t}class Qr{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Aa=new Qr;class Gp{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Aa,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let o=this.ranges[--r];s-=i.from-o.to,i=o}for(;t<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,r;if(t>=0&&t<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=i;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Aa,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return i}}class Qi{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;bf(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Qi.prototype.contextual=Qi.prototype.fallback=Qi.prototype.extend=!1;class Er{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?Hi(e):e}token(e,t){let i=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(bf(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}Er.prototype.contextual=Qi.prototype.fallback=Qi.prototype.extend=!1;class $e{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function bf(n,e,t,i,r,s){let o=0,l=1<<i,{dialect:a}=t.p.parser;e:for(;(l&n[o])!=0;){let h=n[o+1];for(let u=o+3;u<h;u+=2)if((n[u+1]&l)>0){let p=n[u];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||Ip(p,e.token.value,r,s))){e.acceptToken(p);break}}let c=e.next,f=0,O=n[o+2];if(e.next<0&&O>f&&n[h+O*3-3]==65535){o=n[h+O*3-1];continue e}for(;f<O;){let u=f+O>>1,p=h+u+(u<<1),m=n[p],g=n[p+1]||65536;if(c<m)O=u;else if(c>=g)f=u+1;else{o=n[p+2],e.advance();continue e}}break}}function Ma(n,e,t){for(let i=e,r;(r=n[i])!=65535;i++)if(r==t)return i-e;return-1}function Ip(n,e,t,i){let r=Ma(t,i,e);return r<0||Ma(t,i,n)<r}const Me=typeof process<"u"&&Ra&&/\bparse\b/.test(Ra.LOG);let Ps=null;function Ea(n,e,t){let i=n.cursor(H.IncludeAnonymous);for(i.moveTo(e);;)if(!(t<0?i.childBefore(e):i.childAfter(e)))for(;;){if((t<0?i.to<e:i.from>e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}let Np=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ea(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ea(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],r=this.index[t];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],o=this.start[t]+i.positions[r];if(o>e)return this.nextStart=o,null;if(s instanceof G){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let a=s.prop(M.lookAhead);if(!a||l+a<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}};class Fp{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Qr)}getActions(e){let t=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let h=0;h<s.length;h++){if((1<<h&o)==0)continue;let c=s[h],f=this.tokens[h];if(!(i&&!c.fallback)&&((c.contextual||f.start!=e.pos||f.mask!=o||f.context!=l)&&(this.updateCachedToken(f,c,e),f.mask=o,f.context=l),f.lookAhead>f.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let O=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(i=f,t>O))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Qr,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Qr,{pos:i,p:r}=e;return t.start=i,t.end=Math.min(i+1,r.stream.end),t.value=i==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,i){let r=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),i);if(l>=0&&i.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=i,r}addActions(e,t,i,r){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let a=0;a<2;a++)for(let h=o.stateSlot(s,a?2:1);;h+=3){if(l[h]==65535)if(l[h+1]==1)h=kt(l,h+2);else{r==0&&l[h+1]==2&&(r=this.putAction(kt(l,h+2),t,i,r));break}l[h]==t&&(r=this.putAction(kt(l,h+1),t,i,r))}return r}}class Hp{constructor(e,t,i,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Gp(t,r),this.tokens=new Fp(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[Ar.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new Np(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>t)i.push(l);else{if(this.advanceStack(l,i,e))continue;{r||(r=[],s=[]),r.push(l);let a=this.tokens.getMainToken(l);s.push(a.value,a.end)}}break}}if(!i.length){let o=r&&Kp(r);if(o)return Me&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Me&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(o)return Me&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o<i.length-1;o++){let l=i[o];for(let a=o+1;a<i.length;a++){let h=i[a];if(l.sameState(h)||l.buffer.length>500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o<i.length;o++)i[o].pos<this.minStackPos&&(this.minStackPos=i[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let r=e.pos,{parser:s}=this,o=Me?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let O=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(O>-1&&f.length&&(!h||(f.prop(M.contextHash)||0)==c))return e.useNode(f,O),Me&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof G)||f.children.length==0||f.positions[0]>0)break;let u=f.children[0];if(u instanceof G&&f.positions[0]==0)f=u;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Me&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;h<a.length;){let c=a[h++],f=a[h++],O=a[h++],u=h==a.length||!i,p=u?e:e.split(),m=this.tokens.mainToken;if(p.apply(c,f,m?m.start:p.pos,O),Me&&console.log(o+this.stackID(p)+` (via ${(c&65536)==0?"shift":`reduce of ${s.getName(c&65535)}`} for ${s.getName(f)} @ ${r}${p==e?"":", split"})`),u)return!0;p.pos>r?t.push(p):i.push(p)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Wa(e,t),!0}}runRecovery(e,t,i){let r=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],a=t[o<<1],h=t[(o<<1)+1],c=Me?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Me&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),O=c;for(let u=0;f.forceReduce()&&u<10&&(Me&&console.log(O+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));u++)Me&&(O=this.stackID(f)+" -> ");for(let u of l.recoverByInsert(a))Me&&console.log(c+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,i);this.stream.end>l.pos?(h==l.pos&&(h++,a=0),l.recoverByDelete(a,h),Me&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Wa(l,i)):(!r||r.score<l.score)&&(r=l)}return r}stackToTree(e){return e.close(),G.build({buffer:Mr.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Ps||(Ps=new WeakMap)).get(e);return t||Ps.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Wa(n,e){for(let t=0;t<e.length;t++){let i=e[t];if(i.pos==n.pos&&i.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class Jp{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}const $s=n=>n;class Zl{constructor(e){this.start=e.start,this.shift=e.shift||$s,this.reduce=e.reduce||$s,this.reuse=e.reuse||$s,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class zt extends Tl{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;l<e.repeatNodeCount;l++)t.push("");let i=Object.keys(e.topRules).map(l=>e.topRules[l][1]),r=[];for(let l=0;l<t.length;l++)r.push([]);function s(l,a,h){r[l].push([a,a.deserialize(String(h))])}if(e.nodeProps)for(let l of e.nodeProps){let a=l[0];typeof a=="string"&&(a=M[a]);for(let h=1;h<l.length;){let c=l[h++];if(c>=0)s(c,a,l[h++]);else{let f=l[h+-c];for(let O=-c;O>0;O--)s(l[h++],a,f);h++}}}this.nodeSet=new Mn(t.map((l,a)=>fe.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:r[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=pf;let o=Hi(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(Va),this.states=Hi(e.states,Uint32Array),this.data=Hi(e.stateData),this.goto=Hi(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Qi(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let r=new Hp(this,e,t,i);for(let s of this.wrappers)r=s(r,e,t,i);return r}getGoto(e,t,i=!1){let r=this.goto;if(t>=r[0])return-1;for(let s=r[t+1];;){let o=r[s++],l=o&1,a=r[s++];if(l&&i)return a;for(let h=s+(o>>1);s<h;s++)if(r[s]==e)return a;if(l)return-1}}hasAction(e,t){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),o;;s+=3){if((o=i[s])==65535)if(i[s+1]==1)o=i[s=kt(i,s+2)];else{if(i[s+1]==2)return kt(i,s+2);break}if(o==t||o==0)return kt(i,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),r=i?t(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=kt(this.data,s+2);else break;r=t(kt(this.data,s+1))}return r}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=kt(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];t.some((s,o)=>o&1&&s==r)||t.push(this.data[i],r)}}return t}configure(e){let t=Object.assign(Object.create(zt.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(l=>l.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[r]=Va(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(i[o]=!0)}let r=null;for(let s=0;s<t.length;s++)if(!i[s])for(let o=this.dialects[t[s]],l;(l=this.data[o++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[l]=1;return new Jp(e,i,r)}static deserialize(e){return new zt(e)}}function kt(n,e){return n[e]|n[e+1]<<16}function Kp(n){let e=null;for(let t of n){let i=t.p.stoppedAt;(t.pos==t.p.stream.end||i!=null&&t.pos>i)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Va(n){if(n.external){let e=n.extend?1:0;return(t,i)=>n.external(t,i)<<1|e}return n.get}let em=0;class ze{constructor(e,t,i,r){this.name=e,this.set=t,this.base=i,this.modified=r,this.id=em++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof ze&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let r=new ze(i,[],null,[]);if(r.set.push(r),t)for(let s of t.set)r.set.push(s);return r}static defineModifier(e){let t=new Wr(e);return i=>i.modified.indexOf(t)>-1?i:Wr.get(i.base||i,i.modified.concat(t).sort((r,s)=>r.id-s.id))}}let tm=0;class Wr{constructor(e){this.name=e,this.instances=[],this.id=tm++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&im(t,l.modified));if(i)return i;let r=[],s=new ze(e.name,r,e,t);for(let l of t)l.instances.push(s);let o=nm(t);for(let l of e.set)if(!l.modified.length)for(let a of o)r.push(Wr.get(l,a));return s}}function im(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function nm(n){let e=[[]];for(let t=0;t<n.length;t++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(n[t]));return e.sort((t,i)=>i.length-t.length)}function Yt(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let r of t.split(" "))if(r){let s=[],o=2,l=r;for(let f=0;;){if(l=="..."&&f>0&&f+3==r.length){o=1;break}let O=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!O)throw new RangeError("Invalid path: "+r);if(s.push(O[0]=="*"?"":O[0][0]=='"'?JSON.parse(O[0]):O[0]),f+=O[0].length,f==r.length)break;let u=r[f++];if(f==r.length&&u=="!"){o=0;break}if(u!="/")throw new RangeError("Invalid path: "+r);l=r.slice(f)}let a=s.length-1,h=s[a];if(!h)throw new RangeError("Invalid path: "+r);let c=new Vr(i,o,a>0?s.slice(0,a):null);e[h]=c.sort(e[h])}}return yf.add(e)}const yf=new M;class Vr{constructor(e,t,i,r){this.tags=e,this.mode=t,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Vr.empty=new Vr([],2,null);function xf(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:i,all:r=null}=e||{};return{style:s=>{let o=r;for(let l of s)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function rm(n,e){let t=null;for(let i of n){let r=i.style(e);r&&(t=t?t+" "+r:r)}return t}function sm(n,e,t,i=0,r=n.length){let s=new om(i,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),i,r,"",s.highlighters),s.flush(r)}class om{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,r,s){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(s=this.highlighters.filter(u=>!u.scope||u.scope(o)));let h=r,c=lm(e)||Vr.empty,f=rm(s,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(t,l),h),c.opaque)return;let O=e.tree&&e.tree.prop(M.mounted);if(O&&O.overlay){let u=e.node.enter(O.overlay[0].from+l,1),p=this.highlighters.filter(g=>!g.scope||g.scope(O.tree.type)),m=e.firstChild();for(let g=0,Q=l;;g++){let S=g<O.overlay.length?O.overlay[g]:null,x=S?S.from+l:a,k=Math.max(t,Q),y=Math.min(i,x);if(k<y&&m)for(;e.from<y&&(this.highlightRange(e,k,y,r,s),this.startSpan(Math.min(y,e.to),h),!(e.to>=x||!e.nextSibling())););if(!S||x>i)break;Q=S.to+l,Q>t&&(this.highlightRange(u.cursor(),Math.max(t,S.from+l),Math.min(i,Q),"",p),this.startSpan(Math.min(i,Q),h))}m&&e.parent()}else if(e.firstChild()){O&&(r="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,r,s),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function lm(n){let e=n.type.prop(yf);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const v=ze.define,Gn=v(),Zt=v(),za=v(Zt),_a=v(Zt),Ct=v(),In=v(Ct),vs=v(Ct),st=v(),Ft=v(st),it=v(),nt=v(),So=v(),ji=v(So),Nn=v(),d={comment:Gn,lineComment:v(Gn),blockComment:v(Gn),docComment:v(Gn),name:Zt,variableName:v(Zt),typeName:za,tagName:v(za),propertyName:_a,attributeName:v(_a),className:v(Zt),labelName:v(Zt),namespace:v(Zt),macroName:v(Zt),literal:Ct,string:In,docString:v(In),character:v(In),attributeValue:v(In),number:vs,integer:v(vs),float:v(vs),bool:v(Ct),regexp:v(Ct),escape:v(Ct),color:v(Ct),url:v(Ct),keyword:it,self:v(it),null:v(it),atom:v(it),unit:v(it),modifier:v(it),operatorKeyword:v(it),controlKeyword:v(it),definitionKeyword:v(it),moduleKeyword:v(it),operator:nt,derefOperator:v(nt),arithmeticOperator:v(nt),logicOperator:v(nt),bitwiseOperator:v(nt),compareOperator:v(nt),updateOperator:v(nt),definitionOperator:v(nt),typeOperator:v(nt),controlOperator:v(nt),punctuation:So,separator:v(So),bracket:ji,angleBracket:v(ji),squareBracket:v(ji),paren:v(ji),brace:v(ji),content:st,heading:Ft,heading1:v(Ft),heading2:v(Ft),heading3:v(Ft),heading4:v(Ft),heading5:v(Ft),heading6:v(Ft),contentSeparator:v(st),list:v(st),quote:v(st),emphasis:v(st),strong:v(st),link:v(st),monospace:v(st),strikethrough:v(st),inserted:v(),deleted:v(),changed:v(),invalid:v(),meta:Nn,documentMeta:v(Nn),annotation:v(Nn),processingInstruction:v(Nn),definition:ze.defineModifier("definition"),constant:ze.defineModifier("constant"),function:ze.defineModifier("function"),standard:ze.defineModifier("standard"),local:ze.defineModifier("local"),special:ze.defineModifier("special")};for(let n in d){let e=d[n];e instanceof ze&&(e.name=n)}xf([{tag:d.link,class:"tok-link"},{tag:d.heading,class:"tok-heading"},{tag:d.emphasis,class:"tok-emphasis"},{tag:d.strong,class:"tok-strong"},{tag:d.keyword,class:"tok-keyword"},{tag:d.atom,class:"tok-atom"},{tag:d.bool,class:"tok-bool"},{tag:d.url,class:"tok-url"},{tag:d.labelName,class:"tok-labelName"},{tag:d.inserted,class:"tok-inserted"},{tag:d.deleted,class:"tok-deleted"},{tag:d.literal,class:"tok-literal"},{tag:d.string,class:"tok-string"},{tag:d.number,class:"tok-number"},{tag:[d.regexp,d.escape,d.special(d.string)],class:"tok-string2"},{tag:d.variableName,class:"tok-variableName"},{tag:d.local(d.variableName),class:"tok-variableName tok-local"},{tag:d.definition(d.variableName),class:"tok-variableName tok-definition"},{tag:d.special(d.variableName),class:"tok-variableName2"},{tag:d.definition(d.propertyName),class:"tok-propertyName tok-definition"},{tag:d.typeName,class:"tok-typeName"},{tag:d.namespace,class:"tok-namespace"},{tag:d.className,class:"tok-className"},{tag:d.macroName,class:"tok-macroName"},{tag:d.propertyName,class:"tok-propertyName"},{tag:d.operator,class:"tok-operator"},{tag:d.comment,class:"tok-comment"},{tag:d.meta,class:"tok-meta"},{tag:d.invalid,class:"tok-invalid"},{tag:d.punctuation,class:"tok-punctuation"}]);const am=Yt({String:d.string,Number:d.number,"True False":d.bool,PropertyName:d.propertyName,Null:d.null,",":d.separator,"[ ]":d.squareBracket,"{ }":d.brace}),hm=zt.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[am],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});class B{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=$i(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),ot.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=$i(this,e,t);let i=[];return this.decompose(e,t,i,0),ot.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new rn(this),s=new rn(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new rn(this,e)}iterRange(e,t=this.length){return new kf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new wf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?B.empty:e.length<=32?new re(e):ot.from(re.split(e,[]))}}class re extends B{constructor(e,t=cm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new fm(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new re(La(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=Sr(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new re(l,o.length+s.length));else{let a=l.length>>1;i.push(new re(l.slice(0,a)),new re(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof re))return super.replace(e,t,i);[e,t]=$i(this,e,t);let r=Sr(this.text,Sr(i.text,La(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new re(r,s):ot.from(re.split(r,[]),s)}sliceString(e,t=this.length,i=`
1
+ import{r as Te,j as Rp}from"./vendor-tanstack-CWDKYA_B.js";const pf=1024;let qp=0,Ue=class{constructor(e,t){this.from=e,this.to=t}};class M{constructor(e={}){this.id=qp++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=fe.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}M.closedBy=new M({deserialize:n=>n.split(" ")});M.openedBy=new M({deserialize:n=>n.split(" ")});M.group=new M({deserialize:n=>n.split(" ")});M.isolate=new M({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});M.contextHash=new M({perNode:!0});M.lookAhead=new M({perNode:!0});M.mounted=new M({perNode:!0});class fn{constructor(e,t,i){this.tree=e,this.overlay=t,this.parser=i}static get(e){return e&&e.props&&e.props[M.mounted.id]}}const Ap=Object.create(null);class fe{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Ap,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new fe(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(M.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(M.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}fe.none=new fe("",Object.create(null),0,8);class Mn{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);o&&(r||(r=Object.assign({},i.props)),r[o[0].id]=o[1])}t.push(r?new fe(i.name,r,i.id,i.flags):i)}return new Mn(t)}}const Yn=new WeakMap,ka=new WeakMap;var H;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(H||(H={}));class G{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=fn.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new qr(this.topNode,e)}cursorAt(e,t=0,i=0){let r=Yn.get(this)||this.topNode,s=new qr(r);return s.moveTo(e,t),Yn.set(this,s._tree),s}get topNode(){return new Pe(this,0,0,null)}resolve(e,t=0){let i=On(Yn.get(this)||this.topNode,e,t,!1);return Yn.set(this,i),i}resolveInner(e,t=0){let i=On(ka.get(this)||this.topNode,e,t,!0);return ka.set(this,i),i}resolveStack(e,t=0){return Wp(this,e,t)}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&H.IncludeAnonymous)>0;for(let a=this.cursor(o|H.IncludeAnonymous);;){let h=!1;if(a.from<=s&&a.to>=r&&(!l&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;h=!0}for(;h&&i&&(l||!a.type.isAnonymous)&&i(a),!a.nextSibling();){if(!a.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:$l(fe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new G(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new G(fe.none,t,i,r)))}static build(e){return Vp(e)}}G.empty=new G(fe.none,[],[],0);class wl{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new wl(this.buffer,this.index)}}class Vt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return fe.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(mf(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i){let r=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,a=0;l<t;){s[a++]=r[l++],s[a++]=r[l++]-i;let h=s[a++]=r[l++]-i;s[a++]=r[l++]-e,o=Math.max(o,h)}return new Vt(s,o,this.set)}}function mf(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function On(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof Pe&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:H.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof Pe&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class gf{cursor(e=0){return new qr(this,e)}getChild(e,t=null,i=null){let r=wa(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return wa(this,e,t,i)}resolve(e,t=0){return On(this,e,t,!1)}resolveInner(e,t=0){return On(this,e,t,!0)}matchContext(e){return go(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),i=this;for(;t;){let r=t.lastChild;if(!r||r.to!=t.to)break;r.type.isError&&r.from==r.to?(i=t,t=r.prevSibling):t=r}return i}get node(){return this}get next(){return this.parent}}class Pe extends gf{constructor(e,t,i,r){super(),this._tree=e,this.from=t,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let c=l[e],f=a[e]+o.from;if(mf(r,i,f,f+c.length)){if(c instanceof Vt){if(s&H.ExcludeBuffers)continue;let O=c.findChild(0,c.buffer.length,t,i-f,r);if(O>-1)return new at(new Mp(o,c,e,f),null,O)}else if(s&H.IncludeAnonymous||!c.type.isAnonymous||Pl(c)){let O;if(!(s&H.IgnoreMounts)&&(O=fn.get(c))&&!O.overlay)return new Pe(O.tree,f,e,o);let u=new Pe(c,f,e,o);return s&H.IncludeAnonymous||!u.type.isAnonymous?u:u.nextChild(t<0?c.children.length-1:0,t,i,r)}}}if(s&H.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&H.IgnoreOverlays)&&(r=fn.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new Pe(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function wa(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=r.type.is(t),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function go(n,e,t=e.length-1){for(let i=n;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Mp{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class at extends gf{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,i){super(),this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new at(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&H.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new at(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new at(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new at(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),t.push(0)}return new G(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Qf(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let i=t instanceof Pe&&t.index<0?null:t.parent,r=n.slice();return i?r[e]=i:r.splice(e,1),new Ep(r,t)}class Ep{constructor(e,t){this.heads=e,this.node=t}get next(){return Qf(this.heads)}}function Wp(n,e,t){let i=n.resolveInner(e,t),r=null;for(let s=i instanceof Pe?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,t)),s=o}else{let o=fn.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new Pe(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(On(l,e,t,!1))}}return r?Qf(r):i}class qr{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Pe)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof Pe?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&H.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&H.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&H.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&H.IncludeAnonymous||l instanceof Vt||!l.type.isAnonymous||Pl(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)t=new at(this.buffer,t,this.stack[r]);return this.bufferNode=new at(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return go(this.node.parent,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return go(this._tree,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Pl(n){return n.children.some(e=>e instanceof Vt||!e.type.isAnonymous||Pl(e))}function Vp(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=pf,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new wl(t,t.length):t,a=i.types,h=0,c=0;function f(y,w,$,E,q,L){let{id:V,start:A,end:z,size:_}=l,Y=c,he=h;for(;_<0;)if(l.next(),_==-1){let pe=s[V];$.push(pe),E.push(A-y);return}else if(_==-3){h=V;return}else if(_==-4){c=V;return}else throw new RangeError(`Unrecognized record size: ${_}`);let Oe=a[V],ye,I,oe=A-y;if(z-A<=r&&(I=g(l.pos-w,q))){let pe=new Uint16Array(I.size-I.skip),xe=l.pos-I.size,tt=pe.length;for(;l.pos>xe;)tt=Q(I.start,pe,tt);ye=new Vt(pe,z-I.start,i),oe=I.start-y}else{let pe=l.pos-_;l.next();let xe=[],tt=[],Nt=V>=o?V:-1,fi=0,Bn=z;for(;l.pos>pe;)Nt>=0&&l.id==Nt&&l.size>=0?(l.end<=Bn-r&&(p(xe,tt,A,fi,l.end,Bn,Nt,Y,he),fi=xe.length,Bn=l.end),l.next()):L>2500?O(A,pe,xe,tt):f(A,pe,xe,tt,Nt,L+1);if(Nt>=0&&fi>0&&fi<xe.length&&p(xe,tt,A,fi,A,Bn,Nt,Y,he),xe.reverse(),tt.reverse(),Nt>-1&&fi>0){let xa=u(Oe,he);ye=$l(Oe,xe,tt,0,xe.length,0,z-A,xa,xa)}else ye=m(Oe,xe,tt,z-A,Y-z,he)}$.push(ye),E.push(oe)}function O(y,w,$,E){let q=[],L=0,V=-1;for(;l.pos>w;){let{id:A,start:z,end:_,size:Y}=l;if(Y>4)l.next();else{if(V>-1&&z<V)break;V<0&&(V=_-r),q.push(A,z,_),L++,l.next()}}if(L){let A=new Uint16Array(L*4),z=q[q.length-2];for(let _=q.length-3,Y=0;_>=0;_-=3)A[Y++]=q[_],A[Y++]=q[_+1]-z,A[Y++]=q[_+2]-z,A[Y++]=Y;$.push(new Vt(A,q[2]-z,i)),E.push(z-y)}}function u(y,w){return($,E,q)=>{let L=0,V=$.length-1,A,z;if(V>=0&&(A=$[V])instanceof G){if(!V&&A.type==y&&A.length==q)return A;(z=A.prop(M.lookAhead))&&(L=E[V]+A.length+z)}return m(y,$,E,q,L,w)}}function p(y,w,$,E,q,L,V,A,z){let _=[],Y=[];for(;y.length>E;)_.push(y.pop()),Y.push(w.pop()+$-q);y.push(m(i.types[V],_,Y,L-q,A-L,z)),w.push(q-$)}function m(y,w,$,E,q,L,V){if(L){let A=[M.contextHash,L];V=V?[A].concat(V):[A]}if(q>25){let A=[M.lookAhead,q];V=V?[A].concat(V):[A]}return new G(y,w,$,E,V)}function g(y,w){let $=l.fork(),E=0,q=0,L=0,V=$.end-r,A={size:0,start:0,skip:0};e:for(let z=$.pos-y;$.pos>z;){let _=$.size;if($.id==w&&_>=0){A.size=E,A.start=q,A.skip=L,L+=4,E+=4,$.next();continue}let Y=$.pos-_;if(_<0||Y<z||$.start<V)break;let he=$.id>=o?4:0,Oe=$.start;for($.next();$.pos>Y;){if($.size<0)if($.size==-3)he+=4;else break e;else $.id>=o&&(he+=4);$.next()}q=Oe,E+=_,L+=he}return(w<0||E==y)&&(A.size=E,A.start=q,A.skip=L),A.size>4?A:void 0}function Q(y,w,$){let{id:E,start:q,end:L,size:V}=l;if(l.next(),V>=0&&E<o){let A=$;if(V>4){let z=l.pos-(V-4);for(;l.pos>z;)$=Q(y,w,$)}w[--$]=A,w[--$]=L-y,w[--$]=q-y,w[--$]=E}else V==-3?h=E:V==-4&&(c=E);return $}let S=[],x=[];for(;l.pos>0;)f(n.start||0,n.bufferStart||0,S,x,-1,0);let k=(e=n.length)!==null&&e!==void 0?e:S.length?x[0]+S[0].length:0;return new G(a[n.topID],S.reverse(),x.reverse(),k)}const Pa=new WeakMap;function gr(n,e){if(!n.isAnonymous||e instanceof Vt||e.type!=n)return 1;let t=Pa.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof G)){t=1;break}t+=gr(n,i)}Pa.set(e,t)}return t}function $l(n,e,t,i,r,s,o,l,a){let h=0;for(let p=i;p<r;p++)h+=gr(n,e[p]);let c=Math.ceil(h*1.5/8),f=[],O=[];function u(p,m,g,Q,S){for(let x=g;x<Q;){let k=x,y=m[x],w=gr(n,p[x]);for(x++;x<Q;x++){let $=gr(n,p[x]);if(w+$>=c)break;w+=$}if(x==k+1){if(w>c){let $=p[k];u($.children,$.positions,0,$.children.length,m[k]+S);continue}f.push(p[k])}else{let $=m[x-1]+p[x-1].length-y;f.push($l(n,p,m,k,x,y,$,null,a))}O.push(y+S-s)}}return u(e,t,i,r,0),(l||a)(f,O,o)}class vl{constructor(){this.map=new WeakMap}setBuffer(e,t,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,i)}getBuffer(e,t){let i=this.map.get(e);return i&&i.get(t)}set(e,t){e instanceof at?this.setBuffer(e.context.buffer,e.index,t):e instanceof Pe&&this.map.set(e.tree,t)}get(e){return e instanceof at?this.getBuffer(e.context.buffer,e.index):e instanceof Pe?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class wt{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new wt(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let c=l<t.length?t[l]:null,f=c?c.fromA:1e9;if(f-a>=i)for(;o&&o.from<f;){let O=o;if(a>=O.from||f<=O.to||h){let u=Math.max(O.from,a)-h,p=Math.min(O.to,f)-h;O=u>=p?null:new wt(u,p,O.tree,O.offset+h,l>0,!!c)}if(O&&r.push(O),o.to>f)break;o=s<e.length?e[s++]:null}if(!c)break;a=c.toA,h=c.toA-c.toB}return r}}class Tl{startParse(e,t,i){return typeof e=="string"&&(e=new zp(e)),i=i?i.length?i.map(r=>new Ue(r.from,r.to)):[new Ue(0,0)]:[new Ue(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class zp{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Sf(n){return(e,t,i,r)=>new Lp(e,n,t,i,r)}class $a{constructor(e,t,i,r,s){this.parser=e,this.parse=t,this.overlay=i,this.target=r,this.from=s}}function va(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class _p{constructor(e,t,i,r,s,o,l){this.parser=e,this.predicate=t,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const Qo=new M({perNode:!0});class Lp{constructor(e,t,i,r,s){this.nest=t,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new G(i.type,i.children,i.positions,i.length,i.propValues.concat([[Qo,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[M.mounted.id]=new fn(t,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new Up(this.fragments),t=null,i=null,r=new qr(new Pe(this.baseTree,this.ranges[0].from,0,null),H.IncludeAnonymous|H.IgnoreMounts);e:for(let s,o;;){let l=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(t){let h=t.mounts.find(c=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(h)for(let c of h.mount.overlay){let f=c.from+h.pos,O=c.to+h.pos;f>=r.from&&O<=r.to&&!t.ranges.some(u=>u.from<O&&u.to>f)&&t.ranges.push({from:f,to:O})}}l=!1}else if(i&&(o=jp(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||Dp(r);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")t=new _p(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,t);else{let c=Ca(this.ranges,s.overlay||(r.from<r.to?[new Ue(r.from,r.to)]:[]));c.length&&va(c),(c.length||!s.overlay)&&this.inner.push(new $a(s.parser,c.length?s.parser.startParse(this.input,Xa(h,c),c):s.parser.startParse(""),s.overlay?s.overlay.map(f=>new Ue(f.from-r.from,f.to-r.from)):null,r.tree,c.length?c[0].from:r.from)),s.overlay?c.length&&(i={ranges:c,depth:0,prev:i}):l=!1}}else if(t&&(a=t.predicate(r))&&(a===!0&&(a=new Ue(r.from,r.to)),a.from<a.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==a.from?t.ranges[h]={from:t.ranges[h].from,to:a.to}:t.ranges.push(a)}if(l&&r.firstChild())t&&t.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(t&&!--t.depth){let h=Ca(this.ranges,t.ranges);h.length&&(va(h),this.inner.splice(t.index,0,new $a(t.parser,t.parser.startParse(this.input,Xa(t.mounts,h),h),t.ranges.map(c=>new Ue(c.from-t.start,c.to-t.start)),t.target,h[0].from))),t=t.prev}i&&!--i.depth&&(i=i.prev)}}}}function jp(n,e,t){for(let i of n){if(i.from>=t)break;if(i.to>e)return i.from<=e&&i.to>=t?2:1}return 0}function Ta(n,e,t,i,r,s){if(e<t){let o=n.buffer[e+1];i.push(n.slice(e,t,o)),r.push(o-s)}}function Dp(n){let{node:e}=n,t=[],i=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let r=n.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,a=[s];function h(c,f,O,u,p,m){let g=t[m],Q=[],S=[];Ta(o,c,g,Q,S,u);let x=l[g+1],k=l[g+2];a.push(Q.length);let y=m?h(g+4,l[g+3],o.set.types[l[g]],x,k-x,m-1):e.toTree();return Q.push(y),S.push(x-u),Ta(o,l[g+3],f,Q,S,u),new G(O,Q,S,p)}r.children[s]=h(0,l.length,fe.none,0,o.length,t.length-1);for(let c of a){let f=n.tree.children[c],O=n.tree.positions[c];n.yield(new Pe(f,O+n.from,c,n._tree))}}class Za{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(H.IncludeAnonymous|H.IgnoreMounts)}moveTo(e){let{cursor:t}=this,i=e-this.offset;for(;!this.done&&t.from<i;)t.to>=e&&t.enter(i,1,H.IgnoreOverlays|H.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof G)t=t.children[0];else break}return!1}}let Up=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(t=i.tree.prop(Qo))!==null&&t!==void 0?t:i.to,this.inner=new Za(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(Qo))!==null&&e!==void 0?e:t.to,this.inner=new Za(t.tree,-t.offset)}}findMounts(e,t){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(M.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let a=this.fragments[l];if(a.from>=s.to)break;a.tree==this.curFrag.tree&&r.push({frag:a,pos:s.from-a.offset,mount:o})}}}return r}};function Ca(n,e){let t=null,i=e;for(let r=1,s=0;r<n.length;r++){let o=n[r-1].to,l=n[r].from;for(;s<i.length;s++){let a=i[s];if(a.from>=l)break;a.to<=o||(t||(i=t=e.slice()),a.from<o?(t[s]=new Ue(a.from,o),a.to>l&&t.splice(s+1,0,new Ue(l,a.to))):a.to>l?t[s--]=new Ue(l,a.to):t.splice(s--,1))}}return i}function Bp(n,e,t,i){let r=0,s=0,o=!1,l=!1,a=-1e9,h=[];for(;;){let c=r==n.length?1e9:o?n[r].to:n[r].from,f=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let O=Math.max(a,t),u=Math.min(c,f,i);O<u&&h.push(new Ue(O,u))}if(a=Math.min(c,f),a==1e9)break;c==a&&(o?(o=!1,r++):o=!0),f==a&&(l?(l=!1,s++):l=!0)}return h}function Xa(n,e){let t=[];for(let{pos:i,mount:r,frag:s}of n){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,a=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let c=r.overlay.map(O=>new Ue(O.from+i,O.to+i)),f=Bp(e,c,a,h);for(let O=0,u=a;;O++){let p=O==f.length,m=p?h:f[O].from;if(m>u&&t.push(new wt(u,m,r.tree,-o,s.from>=u||s.openStart,s.to<=m||s.openEnd)),p)break;u=f[O].to}}else t.push(new wt(a,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}var Ra={};class Ar{constructor(e,t,i,r,s,o,l,a,h,c=0,f){this.p=e,this.stack=t,this.state=i,this.reducePos=r,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=a,this.curContext=h,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,i=0){let r=e.parser.context;return new Ar(e,[],t,i,i,0,[],0,r?new qa(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let i=e>>19,r=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let l=s.dynamicPrecedence(r);if(l&&(this.score+=l),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(r,this.reducePos);return}let a=this.stack.length-(i-1)*3-(e&262144?6:0),h=a?this.stack[a-2]:this.p.ranges[0].from,c=this.reducePos-h;c>=2e3&&!(!((t=this.p.parser.nodeSet.types[r])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=c));let f=a?this.stack[a-1]:0,O=this.bufferBase+this.buffer.length-f;if(r<s.minRepeatTerm||e&131072){let u=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,h,u,O+4,!0)}if(e&262144)this.state=this.stack[a];else{let u=this.stack[a-3];this.state=s.getGoto(u,r,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(r,h)}storeNode(e,t,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==i)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,t,i,r);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let l=!1;for(let a=o;a>0&&this.buffer[a-2]>i;a-=4)if(this.buffer[a-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=i,this.buffer[o+3]=r}}shift(e,t,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;(r>this.pos||t<=o.maxNode)&&(this.pos=r,o.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(t,i),t<=o.maxNode&&this.buffer.push(t,i,r,4)}else this.pos=r,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,r,4)}apply(e,t,i,r){e&65536?this.reduce(e):this.shift(e,t,i,r)}useNode(e,t){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let i=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new Ar(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,i?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Yp(this);;){let i=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(i==0)return!1;if((i&65536)==0)return!0;t.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&r.push(t[s],o);if(this.stack.length<120)for(let s=0;r.length<8&&s<t.length;s+=2){let o=t[s+1];r.some((l,a)=>a&1&&l==o)||r.push(t[s],o)}t=r}let i=[];for(let r=0;r<t.length&&i.length<4;r+=2){let s=t[r+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[r],this.pos),o.reducePos=this.pos,o.score-=200,i.push(o)}return i}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let i=t>>19,r=t&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],i=(r,s)=>{if(!t.includes(r))return t.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let a=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],a,!1)>=0)return l<<19|65536|a}}else{let l=i(o,s+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new qa(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class qa{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class Yp{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class Mr{constructor(e,t,i){this.stack=e,this.pos=t,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Mr(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Mr(this.stack,this.pos,this.index)}}function Hi(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let i=0,r=0;i<n.length;){let s=0;for(;;){let o=n.charCodeAt(i++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let a=o-32;if(a>=46&&(a-=46,l=!0),s+=a,l)break;s*=46}t?t[r++]=s:t=new e(s)}return t}class Qr{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Aa=new Qr;class Gp{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Aa,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let o=this.ranges[--r];s-=i.from-o.to,i=o}for(;t<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,i,r;if(t>=0&&t<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=i;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,t=0){let i=t?this.resolveOffset(t,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Aa,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let i="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return i}}class Qi{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:i}=t.p;bf(this.data,e,t,this.id,i.data,i.tokenPrecTable)}}Qi.prototype.contextual=Qi.prototype.fallback=Qi.prototype.extend=!1;class Er{constructor(e,t,i){this.precTable=t,this.elseToken=i,this.data=typeof e=="string"?Hi(e):e}token(e,t){let i=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(bf(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}Er.prototype.contextual=Qi.prototype.fallback=Qi.prototype.extend=!1;class $e{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function bf(n,e,t,i,r,s){let o=0,l=1<<i,{dialect:a}=t.p.parser;e:for(;(l&n[o])!=0;){let h=n[o+1];for(let u=o+3;u<h;u+=2)if((n[u+1]&l)>0){let p=n[u];if(a.allows(p)&&(e.token.value==-1||e.token.value==p||Ip(p,e.token.value,r,s))){e.acceptToken(p);break}}let c=e.next,f=0,O=n[o+2];if(e.next<0&&O>f&&n[h+O*3-3]==65535){o=n[h+O*3-1];continue e}for(;f<O;){let u=f+O>>1,p=h+u+(u<<1),m=n[p],g=n[p+1]||65536;if(c<m)O=u;else if(c>=g)f=u+1;else{o=n[p+2],e.advance();continue e}}break}}function Ma(n,e,t){for(let i=e,r;(r=n[i])!=65535;i++)if(r==t)return i-e;return-1}function Ip(n,e,t,i){let r=Ma(t,i,e);return r<0||Ma(t,i,n)<r}const Me=typeof process<"u"&&Ra&&/\bparse\b/.test(Ra.LOG);let Ps=null;function Ea(n,e,t){let i=n.cursor(H.IncludeAnonymous);for(i.moveTo(e);;)if(!(t<0?i.childBefore(e):i.childAfter(e)))for(;;){if((t<0?i.to<e:i.from>e)&&!i.type.isError)return t<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(n.length,Math.max(i.from+1,e+25));if(t<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return t<0?0:n.length}}let Np=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ea(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ea(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let i=this.trees[t],r=this.index[t];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],o=this.start[t]+i.positions[r];if(o>e)return this.nextStart=o,null;if(s instanceof G){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let a=s.prop(M.lookAhead);if(!a||l+a<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}};class Fp{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Qr)}getActions(e){let t=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,a=0;for(let h=0;h<s.length;h++){if((1<<h&o)==0)continue;let c=s[h],f=this.tokens[h];if(!(i&&!c.fallback)&&((c.contextual||f.start!=e.pos||f.mask!=o||f.context!=l)&&(this.updateCachedToken(f,c,e),f.mask=o,f.context=l),f.lookAhead>f.end+25&&(a=Math.max(f.lookAhead,a)),f.value!=0)){let O=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(i=f,t>O))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),!i&&e.pos==this.stream.end&&(i=new Qr,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,t=this.addActions(e,i.value,i.end,t)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Qr,{pos:i,p:r}=e;return t.start=i,t.end=Math.min(i+1,r.stream.end),t.value=i==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,i){let r=this.stream.clipPos(i.pos);if(t.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),i);if(l>=0&&i.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=i,r}addActions(e,t,i,r){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let a=0;a<2;a++)for(let h=o.stateSlot(s,a?2:1);;h+=3){if(l[h]==65535)if(l[h+1]==1)h=kt(l,h+2);else{r==0&&l[h+1]==2&&(r=this.putAction(kt(l,h+2),t,i,r));break}l[h]==t&&(r=this.putAction(kt(l,h+1),t,i,r))}return r}}class Hp{constructor(e,t,i,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Gp(t,r),this.tokens=new Fp(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[Ar.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new Np(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>t)i.push(l);else{if(this.advanceStack(l,i,e))continue;{r||(r=[],s=[]),r.push(l);let a=this.tokens.getMainToken(l);s.push(a.value,a.end)}}break}}if(!i.length){let o=r&&Kp(r);if(o)return Me&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw Me&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(o)return Me&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,a)=>a.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>t)&&this.recovering--}else if(i.length>1){e:for(let o=0;o<i.length-1;o++){let l=i[o];for(let a=o+1;a<i.length;a++){let h=i[a];if(l.sameState(h)||l.buffer.length>500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(a--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o<i.length;o++)i[o].pos<this.minStackPos&&(this.minStackPos=i[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,i){let r=e.pos,{parser:s}=this,o=Me?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,c=h?e.curContext.hash:0;for(let f=this.fragments.nodeAt(r);f;){let O=this.parser.nodeSet.types[f.type.id]==f.type?s.getGoto(e.state,f.type.id):-1;if(O>-1&&f.length&&(!h||(f.prop(M.contextHash)||0)==c))return e.useNode(f,O),Me&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(f.type.id)})`),!0;if(!(f instanceof G)||f.children.length==0||f.positions[0]>0)break;let u=f.children[0];if(u instanceof G&&f.positions[0]==0)f=u;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Me&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let h=0;h<a.length;){let c=a[h++],f=a[h++],O=a[h++],u=h==a.length||!i,p=u?e:e.split(),m=this.tokens.mainToken;if(p.apply(c,f,m?m.start:p.pos,O),Me&&console.log(o+this.stackID(p)+` (via ${(c&65536)==0?"shift":`reduce of ${s.getName(c&65535)}`} for ${s.getName(f)} @ ${r}${p==e?"":", split"})`),u)return!0;p.pos>r?t.push(p):i.push(p)}return!1}advanceFully(e,t){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return Wa(e,t),!0}}runRecovery(e,t,i){let r=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],a=t[o<<1],h=t[(o<<1)+1],c=Me?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Me&&console.log(c+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let f=l.split(),O=c;for(let u=0;f.forceReduce()&&u<10&&(Me&&console.log(O+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));u++)Me&&(O=this.stackID(f)+" -> ");for(let u of l.recoverByInsert(a))Me&&console.log(c+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,i);this.stream.end>l.pos?(h==l.pos&&(h++,a=0),l.recoverByDelete(a,h),Me&&console.log(c+this.stackID(l)+` (via recover-delete ${this.parser.getName(a)})`),Wa(l,i)):(!r||r.score<l.score)&&(r=l)}return r}stackToTree(e){return e.close(),G.build({buffer:Mr.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Ps||(Ps=new WeakMap)).get(e);return t||Ps.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function Wa(n,e){for(let t=0;t<e.length;t++){let i=e[t];if(i.pos==n.pos&&i.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class Jp{constructor(e,t,i){this.source=e,this.flags=t,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}const $s=n=>n;class Zl{constructor(e){this.start=e.start,this.shift=e.shift||$s,this.reduce=e.reduce||$s,this.reuse=e.reuse||$s,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class zt extends Tl{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;l<e.repeatNodeCount;l++)t.push("");let i=Object.keys(e.topRules).map(l=>e.topRules[l][1]),r=[];for(let l=0;l<t.length;l++)r.push([]);function s(l,a,h){r[l].push([a,a.deserialize(String(h))])}if(e.nodeProps)for(let l of e.nodeProps){let a=l[0];typeof a=="string"&&(a=M[a]);for(let h=1;h<l.length;){let c=l[h++];if(c>=0)s(c,a,l[h++]);else{let f=l[h+-c];for(let O=-c;O>0;O--)s(l[h++],a,f);h++}}}this.nodeSet=new Mn(t.map((l,a)=>fe.define({name:a>=this.minRepeatTerm?void 0:l,id:a,props:r[a],top:i.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=pf;let o=Hi(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(Va),this.states=Hi(e.states,Uint32Array),this.data=Hi(e.stateData),this.goto=Hi(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Qi(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,i){let r=new Hp(this,e,t,i);for(let s of this.wrappers)r=s(r,e,t,i);return r}getGoto(e,t,i=!1){let r=this.goto;if(t>=r[0])return-1;for(let s=r[t+1];;){let o=r[s++],l=o&1,a=r[s++];if(l&&i)return a;for(let h=s+(o>>1);s<h;s++)if(r[s]==e)return a;if(l)return-1}}hasAction(e,t){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),o;;s+=3){if((o=i[s])==65535)if(i[s+1]==1)o=i[s=kt(i,s+2)];else{if(i[s+1]==2)return kt(i,s+2);break}if(o==t||o==0)return kt(i,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,i=>i==t?!0:null)}allActions(e,t){let i=this.stateSlot(e,4),r=i?t(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=kt(this.data,s+2);else break;r=t(kt(this.data,s+1))}return r}nextStates(e){let t=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=kt(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];t.some((s,o)=>o&1&&s==r)||t.push(this.data[i],r)}}return t}configure(e){let t=Object.assign(Object.create(zt.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=i}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(l=>l.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return t.specializers[r]=Va(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),i=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(i[o]=!0)}let r=null;for(let s=0;s<t.length;s++)if(!i[s])for(let o=this.dialects[t[s]],l;(l=this.data[o++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[l]=1;return new Jp(e,i,r)}static deserialize(e){return new zt(e)}}function kt(n,e){return n[e]|n[e+1]<<16}function Kp(n){let e=null;for(let t of n){let i=t.p.stoppedAt;(t.pos==t.p.stream.end||i!=null&&t.pos>i)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Va(n){if(n.external){let e=n.extend?1:0;return(t,i)=>n.external(t,i)<<1|e}return n.get}let em=0;class ze{constructor(e,t,i,r){this.name=e,this.set=t,this.base=i,this.modified=r,this.id=em++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let i=typeof e=="string"?e:"?";if(e instanceof ze&&(t=e),t?.base)throw new Error("Can not derive from a modified tag");let r=new ze(i,[],null,[]);if(r.set.push(r),t)for(let s of t.set)r.set.push(s);return r}static defineModifier(e){let t=new Wr(e);return i=>i.modified.indexOf(t)>-1?i:Wr.get(i.base||i,i.modified.concat(t).sort((r,s)=>r.id-s.id))}}let tm=0;class Wr{constructor(e){this.name=e,this.instances=[],this.id=tm++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&im(t,l.modified));if(i)return i;let r=[],s=new ze(e.name,r,e,t);for(let l of t)l.instances.push(s);let o=nm(t);for(let l of e.set)if(!l.modified.length)for(let a of o)r.push(Wr.get(l,a));return s}}function im(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function nm(n){let e=[[]];for(let t=0;t<n.length;t++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(n[t]));return e.sort((t,i)=>i.length-t.length)}function Yt(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let r of t.split(" "))if(r){let s=[],o=2,l=r;for(let f=0;;){if(l=="..."&&f>0&&f+3==r.length){o=1;break}let O=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!O)throw new RangeError("Invalid path: "+r);if(s.push(O[0]=="*"?"":O[0][0]=='"'?JSON.parse(O[0]):O[0]),f+=O[0].length,f==r.length)break;let u=r[f++];if(f==r.length&&u=="!"){o=0;break}if(u!="/")throw new RangeError("Invalid path: "+r);l=r.slice(f)}let a=s.length-1,h=s[a];if(!h)throw new RangeError("Invalid path: "+r);let c=new Vr(i,o,a>0?s.slice(0,a):null);e[h]=c.sort(e[h])}}return yf.add(e)}const yf=new M;class Vr{constructor(e,t,i,r){this.tags=e,this.mode=t,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Vr.empty=new Vr([],2,null);function xf(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:i,all:r=null}=e||{};return{style:s=>{let o=r;for(let l of s)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function rm(n,e){let t=null;for(let i of n){let r=i.style(e);r&&(t=t?t+" "+r:r)}return t}function sm(n,e,t,i=0,r=n.length){let s=new om(i,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),i,r,"",s.highlighters),s.flush(r)}class om{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,r,s){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(s=this.highlighters.filter(u=>!u.scope||u.scope(o)));let h=r,c=lm(e)||Vr.empty,f=rm(s,c.tags);if(f&&(h&&(h+=" "),h+=f,c.mode==1&&(r+=(r?" ":"")+f)),this.startSpan(Math.max(t,l),h),c.opaque)return;let O=e.tree&&e.tree.prop(M.mounted);if(O&&O.overlay){let u=e.node.enter(O.overlay[0].from+l,1),p=this.highlighters.filter(g=>!g.scope||g.scope(O.tree.type)),m=e.firstChild();for(let g=0,Q=l;;g++){let S=g<O.overlay.length?O.overlay[g]:null,x=S?S.from+l:a,k=Math.max(t,Q),y=Math.min(i,x);if(k<y&&m)for(;e.from<y&&(this.highlightRange(e,k,y,r,s),this.startSpan(Math.min(y,e.to),h),!(e.to>=x||!e.nextSibling())););if(!S||x>i)break;Q=S.to+l,Q>t&&(this.highlightRange(u.cursor(),Math.max(t,S.from+l),Math.min(i,Q),"",p),this.startSpan(Math.min(i,Q),h))}m&&e.parent()}else if(e.firstChild()){O&&(r="");do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,r,s),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function lm(n){let e=n.type.prop(yf);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const v=ze.define,Gn=v(),Zt=v(),za=v(Zt),_a=v(Zt),Ct=v(),In=v(Ct),vs=v(Ct),st=v(),Ft=v(st),it=v(),nt=v(),So=v(),ji=v(So),Nn=v(),d={comment:Gn,lineComment:v(Gn),blockComment:v(Gn),docComment:v(Gn),name:Zt,variableName:v(Zt),typeName:za,tagName:v(za),propertyName:_a,attributeName:v(_a),className:v(Zt),labelName:v(Zt),namespace:v(Zt),macroName:v(Zt),literal:Ct,string:In,docString:v(In),character:v(In),attributeValue:v(In),number:vs,integer:v(vs),float:v(vs),bool:v(Ct),regexp:v(Ct),escape:v(Ct),color:v(Ct),url:v(Ct),keyword:it,self:v(it),null:v(it),atom:v(it),unit:v(it),modifier:v(it),operatorKeyword:v(it),controlKeyword:v(it),definitionKeyword:v(it),moduleKeyword:v(it),operator:nt,derefOperator:v(nt),arithmeticOperator:v(nt),logicOperator:v(nt),bitwiseOperator:v(nt),compareOperator:v(nt),updateOperator:v(nt),definitionOperator:v(nt),typeOperator:v(nt),controlOperator:v(nt),punctuation:So,separator:v(So),bracket:ji,angleBracket:v(ji),squareBracket:v(ji),paren:v(ji),brace:v(ji),content:st,heading:Ft,heading1:v(Ft),heading2:v(Ft),heading3:v(Ft),heading4:v(Ft),heading5:v(Ft),heading6:v(Ft),contentSeparator:v(st),list:v(st),quote:v(st),emphasis:v(st),strong:v(st),link:v(st),monospace:v(st),strikethrough:v(st),inserted:v(),deleted:v(),changed:v(),invalid:v(),meta:Nn,documentMeta:v(Nn),annotation:v(Nn),processingInstruction:v(Nn),definition:ze.defineModifier("definition"),constant:ze.defineModifier("constant"),function:ze.defineModifier("function"),standard:ze.defineModifier("standard"),local:ze.defineModifier("local"),special:ze.defineModifier("special")};for(let n in d){let e=d[n];e instanceof ze&&(e.name=n)}xf([{tag:d.link,class:"tok-link"},{tag:d.heading,class:"tok-heading"},{tag:d.emphasis,class:"tok-emphasis"},{tag:d.strong,class:"tok-strong"},{tag:d.keyword,class:"tok-keyword"},{tag:d.atom,class:"tok-atom"},{tag:d.bool,class:"tok-bool"},{tag:d.url,class:"tok-url"},{tag:d.labelName,class:"tok-labelName"},{tag:d.inserted,class:"tok-inserted"},{tag:d.deleted,class:"tok-deleted"},{tag:d.literal,class:"tok-literal"},{tag:d.string,class:"tok-string"},{tag:d.number,class:"tok-number"},{tag:[d.regexp,d.escape,d.special(d.string)],class:"tok-string2"},{tag:d.variableName,class:"tok-variableName"},{tag:d.local(d.variableName),class:"tok-variableName tok-local"},{tag:d.definition(d.variableName),class:"tok-variableName tok-definition"},{tag:d.special(d.variableName),class:"tok-variableName2"},{tag:d.definition(d.propertyName),class:"tok-propertyName tok-definition"},{tag:d.typeName,class:"tok-typeName"},{tag:d.namespace,class:"tok-namespace"},{tag:d.className,class:"tok-className"},{tag:d.macroName,class:"tok-macroName"},{tag:d.propertyName,class:"tok-propertyName"},{tag:d.operator,class:"tok-operator"},{tag:d.comment,class:"tok-comment"},{tag:d.meta,class:"tok-meta"},{tag:d.invalid,class:"tok-invalid"},{tag:d.punctuation,class:"tok-punctuation"}]);const am=Yt({String:d.string,Number:d.number,"True False":d.bool,PropertyName:d.propertyName,Null:d.null,",":d.separator,"[ ]":d.squareBracket,"{ }":d.brace}),hm=zt.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[am],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});class B{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=$i(this,e,t);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),ot.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=$i(this,e,t);let i=[];return this.decompose(e,t,i,0),ot.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new rn(this),s=new rn(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new rn(this,e)}iterRange(e,t=this.length){return new kf(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new wf(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?B.empty:e.length<=32?new re(e):ot.from(re.split(e,[]))}}class re extends B{constructor(e,t=cm(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new fm(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new re(La(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=Sr(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new re(l,o.length+s.length));else{let a=l.length>>1;i.push(new re(l.slice(0,a)),new re(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof re))return super.replace(e,t,i);[e,t]=$i(this,e,t);let r=Sr(this.text,Sr(i.text,La(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new re(r,s):ot.from(re.split(r,[]),s)}sliceString(e,t=this.length,i=`
2
2
  `){[e,t]=$i(this,e,t);let r="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(r+=i),e<a&&t>s&&(r+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new re(i,r)),i=[],r=-1);return r>-1&&t.push(new re(i,r)),t}}class ot extends B{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.children[s],l=r+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,r);r=l+1,i=a+1}}decompose(e,t,i,r){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let h=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=$i(this,e,t),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[r]=a,new ot(c,this.length-(t-e)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
3
3
  `){[e,t]=$i(this,e,t);let r="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(r+=i),e<a&&t>o&&(r+=l.sliceString(e-o,t-o,i)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ot))return 0;let i=0,[r,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==o||s==l)return i;let a=this.children[r],h=e.children[s];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let u of e)i+=u.lines;if(i<32){let u=[];for(let p of e)p.flatten(u);return new re(u,t)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,l=[],a=0,h=-1,c=[];function f(u){let p;if(u.lines>s&&u instanceof ot)for(let m of u.children)f(m);else u.lines>o&&(a>o||!a)?(O(),l.push(u)):u instanceof re&&a&&(p=c[c.length-1])instanceof re&&u.lines+p.lines<=32?(a+=u.lines,h+=u.length+1,c[c.length-1]=new re(p.text.concat(u.text),p.length+1+u.length)):(a+u.lines>r&&O(),a+=u.lines,h+=u.length+1,c.push(u))}function O(){a!=0&&(l.push(c.length==1?c[0]:ot.from(c,h)),h=-1,a=c.length=0)}for(let u of e)f(u);return O(),l.length==1?l[0]:new ot(l,t)}}B.empty=new re([""],0);function cm(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Sr(n,e,t=0,i=1e9){for(let r=0,s=0,o=!0;s<n.length&&r<=i;s++){let l=n[s],a=r+l.length;a>=t&&(a>i&&(l=l.slice(0,i-r)),r<t&&(l=l.slice(t-r)),o?(e[e.length-1]+=l,o=!1):e.push(l)),r=a+1}return e}function La(n,e,t){return Sr(n,[""],e,t)}class rn{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof re?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,l=r instanceof re?r.text.length:r.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
4
4
  `,this;e--}else if(r instanceof re){let a=r.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof re?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class kf{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new rn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class wf{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(B.prototype[Symbol.iterator]=function(){return this.iter()},rn.prototype[Symbol.iterator]=kf.prototype[Symbol.iterator]=wf.prototype[Symbol.iterator]=function(){return this});let fm=class{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}};function $i(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}let Si="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<Si.length;n++)Si[n]+=Si[n-1];function Om(n){for(let e=1;e<Si.length;e+=2)if(Si[e]>n)return Si[e-1]<=n;return!1}function ja(n){return n>=127462&&n<=127487}const Da=8205;function be(n,e,t=!0,i=!0){return(t?Pf:um)(n,e,i)}function Pf(n,e,t){if(e==n.length)return e;e&&$f(n.charCodeAt(e))&&vf(n.charCodeAt(e-1))&&e--;let i=ge(n,e);for(e+=De(i);e<n.length;){let r=ge(n,e);if(i==Da||r==Da||t&&Om(r))e+=De(r),i=r;else if(ja(r)){let s=0,o=e-2;for(;o>=0&&ja(ge(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function um(n,e,t){for(;e>0;){let i=Pf(n,e-2,t);if(i<e)return i;e--}return 0}function $f(n){return n>=56320&&n<57344}function vf(n){return n>=55296&&n<56320}function ge(n,e){let t=n.charCodeAt(e);if(!vf(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return $f(i)?(t-55296<<10)+(i-56320)+65536:t}function Cl(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function De(n){return n<65536?1:2}const bo=/\r\n?|\n/;var Se=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(Se||(Se={}));class ft{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,t=!1){yo(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new ft(e)}composeDesc(e){return this.empty?e:e.empty?this:Tf(this,e)}mapDesc(e,t=!1){return e.empty?this:xo(this,e,t)}mapPos(e,t=-1,i=Se.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=r+l;if(a<0){if(h>e)return s+(e-r);s+=l}else{if(i!=Se.Simple&&h>=e&&(i==Se.TrackDel&&r<e&&h>e||i==Se.TrackBefore&&r<e||i==Se.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==r||t<0?s:s+a;s+=a}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let s=this.sections[i++],o=this.sections[i++],l=r+s;if(o>=0&&r<=t&&l>=e)return r<e&&l>t?"cover":!0;r=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new ft(e)}static create(e){return new ft(e)}}class ce extends ft{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return yo(this,(t,i,r,s,o)=>e=e.replace(r,r+(i-t),o),!1),e}mapDesc(e,t=!1){return xo(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r<t.length;r+=2){let o=t[r],l=t[r+1];if(l>=0){t[r]=l,t[r+1]=o;let a=r>>1;for(;i.length<a;)i.push(B.empty);i.push(o?e.slice(s,s+o):B.empty)}s+=o}return new ce(t,i)}compose(e){return this.empty?e:e.empty?this:Tf(this,e,!0)}map(e,t=!1){return e.empty?this:xo(this,e,t,!0)}iterChanges(e,t=!1){yo(this,e,t)}get desc(){return ft.create(this.sections)}filter(e){let t=[],i=[],r=[],s=new un(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let c=Math.min(s.len,a-l);ke(r,c,-1);let f=s.ins==-1?-1:s.off==0?s.ins:0;ke(t,c,f),f>0&&qt(i,t,s.text),s.forward(c),l+=c}let h=e[o++];for(;l<h;){if(s.done)break e;let c=Math.min(s.len,h-l);ke(t,c,-1),ke(r,c,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(c),l+=c}}return{changes:new ce(t,i),filtered:ft.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],r=this.sections[t+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],o=0,l=null;function a(c=!1){if(!c&&!r.length)return;o<t&&ke(r,t-o,-1);let f=new ce(r,s);l=l?l.compose(f.map(l)):f,r=[],s=[],o=0}function h(c){if(Array.isArray(c))for(let f of c)h(f);else if(c instanceof ce){if(c.length!=t)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);a(),l=l?l.compose(c.map(l)):c}else{let{from:f,to:O=f,insert:u}=c;if(f>O||f<0||O>t)throw new RangeError(`Invalid change range ${f} to ${O} (in doc of length ${t})`);let p=u?typeof u=="string"?B.of(u.split(i||bo)):u:B.empty,m=p.length;if(f==O&&m==0)return;f<o&&a(),f>o&&ke(r,f-o,-1),ke(r,O-f,m),qt(s,r,p),o=O}}return h(e),a(!l),l}static empty(e){return new ce(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<r;)i.push(B.empty);i[r]=B.of(s.slice(1)),t.push(s[0],i[r].length)}}}return new ce(t,i)}static createSet(e,t){return new ce(e,t)}}function ke(n,e,t,i=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function qt(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(B.empty);n.push(t)}}function yo(n,e,t){let i=n.inserted;for(let r=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)r+=l,s+=l;else{let h=r,c=s,f=B.empty;for(;h+=l,c+=a,a&&i&&(f=f.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(r,h,s,c,f),r=h,s=c}}}function xo(n,e,t,i=!1){let r=[],s=i?[]:null,o=new un(n),l=new un(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);ke(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(ke(r,l.ins,-1);h;){let c=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=c&&(ke(r,0,o.ins),s&&qt(s,r,o.text),a=o.i),o.forward(c),h-=c}l.next()}else if(o.ins>=0){let h=0,c=o.len;for(;c;)if(l.ins==-1){let f=Math.min(c,l.len);h+=f,c-=f,l.forward(f)}else if(l.ins==0&&l.len<c)c-=l.len,l.next();else break;ke(r,h,a<o.i?o.ins:0),s&&a<o.i&&qt(s,r,o.text),a=o.i,o.forward(o.len-c)}else{if(o.done&&l.done)return s?ce.createSet(r,s):ft.create(r);throw new Error("Mismatched change set lengths")}}function Tf(n,e,t=!1){let i=[],r=t?[]:null,s=new un(n),o=new un(e);for(let l=!1;;){if(s.done&&o.done)return r?ce.createSet(i,r):ft.create(i);if(s.ins==0)ke(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)ke(i,0,o.ins,l),r&&qt(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),h=i.length;if(s.ins==-1){let c=o.ins==-1?-1:o.off?0:o.ins;ke(i,a,c,l),r&&c&&qt(r,i,o.text)}else o.ins==-1?(ke(i,s.off?0:s.len,a,l),r&&qt(r,i,s.textBit(a))):(ke(i,s.off?0:s.len,o.off?0:o.ins,l),r&&!o.off&&qt(r,i,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),s.forward2(a),o.forward(a)}}}}class un{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?B.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?B.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class ei{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new ei(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return b.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return b.range(this.anchor,i)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return b.range(e.anchor,e.head)}static create(e,t,i){return new ei(e,t,i)}}class b{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:b.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new b([this.main],0)}addRange(e,t=!0){return b.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,b.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new b(e.ranges.map(t=>ei.fromJSON(t)),e.main)}static single(e,t=e){return new b([b.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return b.normalized(e.slice(),t);i=s.to}return new b(e,t)}static cursor(e,t=0,i,r){return ei.create(e,e,(t==0?0:t<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,t,i,r){let s=(i??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?ei.create(t,e,48|s):ei.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);r<=t&&t--,e.splice(--r,2,s.anchor>s.head?b.range(a,l):b.range(l,a))}}return new b(e,t)}}function Zf(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Xl=0;class Z{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=Xl++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Z(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:Rl),!!e.static,e.enables)}of(e){return new br([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new br(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new br(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function Rl(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class br{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=Xl++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,h=!1,c=[];for(let f of this.dependencies)f=="doc"?a=!0:f=="selection"?h=!0:(((t=e[f.id])!==null&&t!==void 0?t:1)&1)==0&&c.push(e[f.id]);return{create(f){return f.values[o]=i(f),1},update(f,O){if(a&&O.docChanged||h&&(O.docChanged||O.selection)||ko(f,c)){let u=i(f);if(l?!Ua(u,f.values[o],r):!r(u,f.values[o]))return f.values[o]=u,1}return 0},reconfigure:(f,O)=>{let u,p=O.config.address[s];if(p!=null){let m=_r(O,p);if(this.dependencies.every(g=>g instanceof Z?O.facet(g)===f.facet(g):g instanceof de?O.field(g,!1)==f.field(g,!1):!0)||(l?Ua(u=i(f),m,r):r(u=i(f),m)))return f.values[o]=m,0}else u=i(f);return f.values[o]=u,1}}}}function Ua(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function ko(n,e){let t=!1;for(let i of e)sn(n,i)&1&&(t=!0);return t}function dm(n,e,t){let i=t.map(a=>n[a.id]),r=t.map(a=>a.type),s=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let c=0;c<i.length;c++){let f=_r(a,i[c]);if(r[c]==2)for(let O of f)h.push(O);else h.push(f)}return e.combine(h)}return{create(a){for(let h of i)sn(a,h);return a.values[o]=l(a),1},update(a,h){if(!ko(a,s))return 0;let c=l(a);return e.compare(c,a.values[o])?0:(a.values[o]=c,1)},reconfigure(a,h){let c=ko(a,i),f=h.config.facets[e.id],O=h.facet(e);if(f&&!c&&Rl(t,f))return a.values[o]=O,0;let u=l(a);return e.compare(u,O)?(a.values[o]=O,0):(a.values[o]=u,1)}}}const Ba=Z.define({static:!0});class de{constructor(e,t,i,r,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let t=new de(Xl++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Ba).find(i=>i.field==this);return(t?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[t]=o,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,Ba.of({field:this,create:e})]}get extension(){return this}}const Jt={lowest:4,low:3,default:2,high:1,highest:0};function Di(n){return e=>new Cf(e,n)}const Tt={highest:Di(Jt.highest),high:Di(Jt.high),default:Di(Jt.default),low:Di(Jt.low),lowest:Di(Jt.lowest)};class Cf{constructor(e,t){this.inner=e,this.prec=t}}class fs{of(e){return new wo(this,e)}reconfigure(e){return fs.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class wo{constructor(e,t){this.compartment=e,this.inner=t}}class zr{constructor(e,t,i,r,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let r=[],s=Object.create(null),o=new Map;for(let O of pm(e,t,o))O instanceof de?r.push(O):(s[O.facet.id]||(s[O.facet.id]=[])).push(O);let l=Object.create(null),a=[],h=[];for(let O of r)l[O.id]=h.length<<1,h.push(u=>O.slot(u));let c=i?.config.facets;for(let O in s){let u=s[O],p=u[0].facet,m=c&&c[O]||[];if(u.every(g=>g.type==0))if(l[p.id]=a.length<<1|1,Rl(m,u))a.push(i.facet(p));else{let g=p.combine(u.map(Q=>Q.value));a.push(i&&p.compare(g,i.facet(p))?i.facet(p):g)}else{for(let g of u)g.type==0?(l[g.id]=a.length<<1|1,a.push(g.value)):(l[g.id]=h.length<<1,h.push(Q=>g.dynamicSlot(Q)));l[p.id]=h.length<<1,h.push(g=>dm(g,p,u))}}let f=h.map(O=>O(l));return new zr(e,o,f,l,a,s)}}function pm(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(o,l){let a=r.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof wo&&t.delete(o.compartment)}if(r.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof wo){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),s(h,l)}else if(o instanceof Cf)s(o.inner,o.prec);else if(o instanceof de)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof br)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,Jt.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(n,Jt.default),i.reduce((o,l)=>o.concat(l))}function sn(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function _r(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const Xf=Z.define(),Po=Z.define({combine:n=>n.some(e=>e),static:!0}),Rf=Z.define({combine:n=>n.length?n[0]:void 0,static:!0}),qf=Z.define(),Af=Z.define(),Mf=Z.define(),Ef=Z.define({combine:n=>n.length?n[0]:!1});class dt{constructor(e,t){this.type=e,this.value=t}static define(){return new mm}}class mm{of(e){return new dt(this,e)}}class gm{constructor(e){this.map=e}of(e){return new W(this,e)}}class W{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new W(this.type,t)}is(e){return this.type==e}static define(e={}){return new gm(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}W.reconfigure=W.define();W.appendConfig=W.define();class ae{constructor(e,t,i,r,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Zf(i,t.newLength),s.some(l=>l.type==ae.time)||(this.annotations=s.concat(ae.time.of(Date.now())))}static create(e,t,i,r,s,o){return new ae(e,t,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ae.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}ae.time=dt.define();ae.userEvent=dt.define();ae.addToHistory=dt.define();ae.remote=dt.define();function Qm(n,e){let t=[];for(let i=0,r=0;;){let s,o;if(i<n.length&&(r==e.length||e[r]>=n[i]))s=n[i++],o=n[i++];else if(r<e.length)s=e[r++],o=e[r++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Wf(n,e,t){var i;let r,s,o;return t?(r=e.changes,s=ce.empty(e.changes.length),o=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=n.selection)===null||i===void 0?void 0:i.map(r),effects:W.mapEffects(n.effects,r).concat(W.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function $o(n,e,t){let i=e.selection,r=bi(e.annotations);return e.userEvent&&(r=r.concat(ae.userEvent.of(e.userEvent))),{changes:e.changes instanceof ce?e.changes:ce.of(e.changes||[],t,n.facet(Rf)),selection:i&&(i instanceof b?i:b.single(i.anchor,i.head)),effects:bi(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function Vf(n,e,t){let i=$o(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=Wf(i,$o(n,e[s],o?i.changes.newLength:n.doc.length),o)}let r=ae.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return bm(t?Sm(r):r)}function Sm(n){let e=n.startState,t=!0;for(let r of e.facet(qf)){let s=r(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:Qm(t,s))}if(t!==!0){let r,s;if(t===!1)s=n.changes.invertedDesc,r=ce.empty(e.doc.length);else{let o=n.changes.filter(t);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=ae.create(e,r,n.selection&&n.selection.map(s),W.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let i=e.facet(Af);for(let r=i.length-1;r>=0;r--){let s=i[r](n);s instanceof ae?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof ae?n=s[0]:n=Vf(e,bi(s),!1)}return n}function bm(n){let e=n.startState,t=e.facet(Mf),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=Wf(i,$o(e,s,n.changes.newLength),!0))}return i==n?n:ae.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const ym=[];function bi(n){return n==null?ym:Array.isArray(n)?n:[n]}var ie=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(ie||(ie={}));const xm=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let vo;try{vo=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function km(n){if(vo)return vo.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||xm.test(t)))return!0}return!1}function wm(n){return e=>{if(!/\S/.test(e))return ie.Space;if(km(e))return ie.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return ie.Word;return ie.Other}}class j{constructor(e,t,i,r,s,o){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)sn(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return sn(this,i),_r(this,i)}update(...e){return Vf(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:r}=t;for(let l of e.effects)l.is(fs.reconfigure)?(t&&(r=new Map,t.compartments.forEach((a,h)=>r.set(h,a)),t=null),r.set(l.value.compartment,l.value.extension)):l.is(W.reconfigure)?(t=null,i=l.value):l.is(W.appendConfig)&&(t=null,i=bi(i).concat(l.value));let s;t?s=e.startState.values.slice():(t=zr.resolve(i,r,this),s=new j(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,h)=>h.reconfigure(a,this),null).values);let o=e.startState.facet(Po)?e.newSelection:e.newSelection.asSingle();new j(t,e.newDoc,o,s,(l,a)=>a.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:b.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],o=bi(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),h=this.changes(a.changes),c=h.map(r);for(let O=0;O<l;O++)s[O]=s[O].map(c);let f=r.mapDesc(h,!0);s.push(a.range.map(f)),r=r.compose(c),o=W.mapEffects(o,c).concat(W.mapEffects(bi(a.effects),f))}return{changes:r,selection:b.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof ce?e:ce.of(e,this.doc.length,this.facet(j.lineSeparator))}toText(e){return B.of(e.split(this.facet(j.lineSeparator)||bo))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(sn(this,t),_r(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof de&&this.config.address[r.id]!=null&&(t[i]=r.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];r.push(o.init(a=>o.spec.fromJSON(l,a)))}}return j.create({doc:e.doc,selection:b.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=zr.resolve(e.extensions||[],new Map),i=e.doc instanceof B?e.doc:B.of((e.doc||"").split(t.staticFacet(j.lineSeparator)||bo)),r=e.selection?e.selection instanceof b?e.selection:b.single(e.selection.anchor,e.selection.head):b.single(0);return Zf(r,i.length),t.staticFacet(Po)||(r=r.asSingle()),new j(t,i,r,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(j.tabSize)}get lineBreak(){return this.facet(j.lineSeparator)||`
@@ -29,4 +29,4 @@ import{r as Te,j as Rp}from"./vendor-tanstack-CLpbOGYv.js";const pf=1024;let qp=
29
29
  \${}
30
30
  }
31
31
  }`,{label:"class",detail:"definition",type:"keyword"}),ne('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),ne('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],zw=ap.concat([ne("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),ne("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),ne("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),lf=new vl,hp=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Ni(n){return(e,t)=>{let i=e.node.getChild("VariableDefinition");return i&&t(i,n),!0}}const _w=["FunctionDeclaration"],Lw={FunctionDeclaration:Ni("function"),ClassDeclaration:Ni("class"),ClassExpression:()=>!0,EnumDeclaration:Ni("constant"),TypeAliasDeclaration:Ni("type"),NamespaceDeclaration:Ni("namespace"),VariableDefinition(n,e){n.matchContext(_w)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function cp(n,e){let t=lf.get(e);if(t)return t;let i=[],r=!0;function s(o,l){let a=n.sliceString(o.from,o.to);i.push({label:a,type:l})}return e.cursor(H.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let l=Lw[o.name];if(l&&l(o,s)||hp.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of cp(n,o.node))i.push(l);return!1}}),lf.set(e,i),i}const af=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,fp=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function jw(n){let e=N(n.state).resolveInner(n.pos,-1);if(fp.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&af.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let i=[];for(let r=e;r;r=r.parent)hp.has(r.name)&&(i=i.concat(cp(n.state.doc,r)));return{options:i,from:t?e.from:n.pos,validFor:af}}const Ot=Ut.define({name:"javascript",parser:Vw.configure({props:[ci.add({IfStatement:ki({except:/^\s*({|else\b)/}),TryStatement:ki({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:pQ,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:i?1:2)*n.unit},Block:vr({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":ki({except:/^{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Gt.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":ms,BlockComment(n){return{from:n.from+2,to:n.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Op={test:n=>/^JSX/.test(n.name),facet:Bl({commentTokens:{block:{open:"{/*",close:"*/}"}}})},up=Ot.configure({dialect:"ts"},"typescript"),dp=Ot.configure({dialect:"jsx",props:[Yl.add(n=>n.isTop?[Op]:void 0)]}),pp=Ot.configure({dialect:"jsx ts",props:[Yl.add(n=>n.isTop?[Op]:void 0)]},"typescript");let mp=n=>({label:n,type:"keyword"});const gp="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(mp),Dw=gp.concat(["declare","implements","private","protected","public"].map(mp));function Uw(n={}){let e=n.jsx?n.typescript?pp:dp:n.typescript?up:Ot,t=n.typescript?zw.concat(Dw):ap.concat(gp);return new li(e,[Ot.data.of({autocomplete:Ku(fp,na(t))}),Ot.data.of({autocomplete:jw}),n.jsx?Gw:[]])}function Bw(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function hf(n,e,t=n.length){for(let i=e?.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return n.sliceString(i.from,Math.min(i.to,t));return""}const Yw=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Gw=T.inputHandler.of((n,e,t,i,r)=>{if((Yw?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||i!=">"&&i!="/"||!Ot.isActiveAt(n.state,e,-1))return!1;let s=r(),{state:o}=s,l=o.changeByRange(a=>{var h;let{head:c}=a,f=N(o).resolveInner(c-1,-1),O;if(f.name=="JSXStartTag"&&(f=f.parent),!(o.doc.sliceString(c-1,c)!=i||f.name=="JSXAttributeValue"&&f.to>c)){if(i==">"&&f.name=="JSXFragmentTag")return{range:a,changes:{from:c,insert:"</>"}};if(i=="/"&&f.name=="JSXStartCloseTag"){let u=f.parent,p=u.parent;if(p&&u.from==c-2&&((O=hf(o.doc,p.firstChild,c))||((h=p.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let m=`${O}>`;return{range:b.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(i==">"){let u=Bw(f);if(u&&u.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(c,c+2))&&(O=hf(o.doc,u,c)))return{range:a,changes:{from:c,insert:`</${O}>`}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Fi=["_blank","_self","_top","_parent"],co=["ascii","utf-8","utf-16","latin1","latin1"],fo=["get","post","put","delete"],Oo=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],We=["true","false"],X={},Iw={a:{attrs:{href:null,ping:null,type:null,media:null,target:Fi,hreflang:null}},abbr:X,address:X,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:X,aside:X,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:X,base:{attrs:{href:null,target:Fi}},bdi:X,bdo:X,blockquote:{attrs:{cite:null}},body:X,br:X,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Oo,formmethod:fo,formnovalidate:["novalidate"],formtarget:Fi,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:X,center:X,cite:X,code:X,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:X,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:X,div:X,dl:X,dt:X,em:X,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:X,figure:X,footer:X,form:{attrs:{action:null,name:null,"accept-charset":co,autocomplete:["on","off"],enctype:Oo,method:fo,novalidate:["novalidate"],target:Fi}},h1:X,h2:X,h3:X,h4:X,h5:X,h6:X,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:X,hgroup:X,hr:X,html:{attrs:{manifest:null}},i:X,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Oo,formmethod:fo,formnovalidate:["novalidate"],formtarget:Fi,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:X,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:X,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:X,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:co,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:X,noscript:X,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:X,param:{attrs:{name:null,value:null}},pre:X,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:X,rt:X,ruby:X,samp:X,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:co}},section:X,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:X,source:{attrs:{src:null,type:null,media:null}},span:X,strong:X,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:X,summary:X,sup:X,table:X,tbody:X,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:X,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:X,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:X,time:{attrs:{datetime:null}},title:X,tr:X,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:X,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:X},Qp={accesskey:null,class:null,contenteditable:We,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:We,autocorrect:We,autocapitalize:We,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":We,"aria-autocomplete":["inline","list","both","none"],"aria-busy":We,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":We,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":We,"aria-hidden":We,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":We,"aria-multiselectable":We,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":We,"aria-relevant":null,"aria-required":We,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Sp="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of Sp)Qp[n]=null;class An{constructor(e,t){this.tags=Object.assign(Object.assign({},Iw),e),this.globalAttrs=Object.assign(Object.assign({},Qp),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}An.default=new An;function Mi(n,e,t=n.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?n.sliceString(r.from,Math.min(r.to,t)):""}function Ei(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function bp(n,e,t){let i=t.tags[Mi(n,Ei(e))];return i?.children||t.allTags}function Sa(n,e){let t=[];for(let i=Ei(e);i&&!i.type.isTop;i=Ei(i.parent)){let r=Mi(n,i);if(r&&i.lastChild.name=="CloseTag")break;r&&t.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&t.push(r)}return t}const yp=/^[:\-\.\w\u00b7-\uffff]*$/;function cf(n,e,t,i,r){let s=/\s*>/.test(n.sliceDoc(r,r+5))?"":">",o=Ei(t,!0);return{from:i,to:r,options:bp(n.doc,o,e).map(l=>({label:l,type:"type"})).concat(Sa(n.doc,t).map((l,a)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-a}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function ff(n,e,t,i){let r=/\s*>/.test(n.sliceDoc(i,i+5))?"":">";return{from:t,to:i,options:Sa(n.doc,e).map((s,o)=>({label:s,apply:s+r,type:"type",boost:99-o})),validFor:yp}}function Nw(n,e,t,i){let r=[],s=0;for(let o of bp(n.doc,t,e))r.push({label:"<"+o,type:"type"});for(let o of Sa(n.doc,t))r.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Fw(n,e,t,i,r){let s=Ei(t),o=s?e.tags[Mi(n.doc,s)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],a=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:a.map(h=>({label:h,type:"property"})),validFor:yp}}function Hw(n,e,t,i,r){var s;let o=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],a;if(o){let h=n.sliceDoc(o.from,o.to),c=e.globalAttrs[h];if(!c){let f=Ei(t),O=f?e.tags[Mi(n.doc,f)]:null;c=O?.attrs&&O.attrs[h]}if(c){let f=n.sliceDoc(i,r).toLowerCase(),O='"',u='"';/^['"]/.test(f)?(a=f[0]=='"'?/^[^"]*$/:/^[^']*$/,O="",u=n.sliceDoc(r,r+1)==f[0]?"":f[0],f=f.slice(1),i++):a=/^[^\s<>='"]*$/;for(let p of c)l.push({label:p,apply:O+p+u,type:"constant"})}}return{from:i,to:r,options:l,validFor:a}}function xp(n,e){let{state:t,pos:i}=e,r=N(t).resolveInner(i,-1),s=r.resolve(i);for(let o=i,l;s==r&&(l=r.childBefore(o));){let a=l.lastChild;if(!a||!a.type.isError||a.from<a.to)break;s=r=l,o=a.from}return r.name=="TagName"?r.parent&&/CloseTag$/.test(r.parent.name)?ff(t,r,r.from,i):cf(t,n,r,r.from,i):r.name=="StartTag"?cf(t,n,r,i,i):r.name=="StartCloseTag"||r.name=="IncompleteCloseTag"?ff(t,r,i,i):r.name=="OpenTag"||r.name=="SelfClosingTag"||r.name=="AttributeName"?Fw(t,n,r,r.name=="AttributeName"?r.from:i,i):r.name=="Is"||r.name=="AttributeValue"||r.name=="UnquotedAttributeValue"?Hw(t,n,r,r.name=="Is"?i:r.from,i):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Nw(t,n,r,i):null}function Jw(n){return xp(An.default,n)}function Kw(n){let{extraTags:e,extraGlobalAttributes:t}=n,i=t||e?new An(e,t):An.default;return r=>xp(i,r)}const eP=Ot.parser.configure({top:"SingleExpression"}),kp=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:up.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:dp.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:pp.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:eP},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:Ot.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:hs.parser}],wp=[{name:"style",parser:hs.parser.configure({top:"Styles"})}].concat(Sp.map(n=>({name:n,parser:Ot.parser}))),Pp=Ut.define({name:"html",parser:Rk.configure({props:[ci.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let i=n.node;;){let r=i.lastChild;if(!r||r.name!="Element"||r.to!=i.to)break;e=i=r}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),Gt.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),cu.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Rr=Pp.configure({wrap:ip(kp,wp)});function tP(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=ip((n.nestedLanguages||[]).concat(kp),(n.nestedAttributes||[]).concat(wp)));let i=t?Pp.configure({wrap:t,dialect:e}):e?Rr.configure({dialect:e}):Rr;return new li(i,[Rr.data.of({autocomplete:Kw(n)}),n.autoCloseTags!==!1?iP:[],Uw().support,lw().support])}const Of=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),iP=T.inputHandler.of((n,e,t,i,r)=>{if(n.composing||n.state.readOnly||e!=t||i!=">"&&i!="/"||!Rr.isActiveAt(n.state,e,-1))return!1;let s=r(),{state:o}=s,l=o.changeByRange(a=>{var h,c,f;let O=o.doc.sliceString(a.from-1,a.to)==i,{head:u}=a,p=N(o).resolveInner(u,-1),m;if(O&&i==">"&&p.name=="EndTag"){let g=p.parent;if(((c=(h=g.parent)===null||h===void 0?void 0:h.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(m=Mi(o.doc,g.parent,u))&&!Of.has(m)){let Q=u+(o.doc.sliceString(u,u+1)===">"?1:0),S=`</${m}>`;return{range:a,changes:{from:u,to:Q,insert:S}}}}else if(O&&i=="/"&&p.name=="IncompleteCloseTag"){let g=p.parent;if(p.from==u-2&&((f=g.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(m=Mi(o.doc,g,u))&&!Of.has(m)){let Q=u+(o.doc.sliceString(u,u+1)===">"?1:0),S=`${m}>`;return{range:b.cursor(u+S.length,-1),changes:{from:u,to:Q,insert:S}}}}return{range:a}});return l.changes.empty?!1:(n.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),$p=Bl({commentTokens:{block:{open:"<!--",close:"-->"}}}),vp=new M,Tp=Mx.configure({props:[Gt.add(n=>!n.is("Block")||n.is("Document")||kl(n)!=null||nP(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),vp.add(kl),ci.add({Document:()=>null}),ti.add({Document:$p})]});function kl(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function nP(n){return n.name=="OrderedList"||n.name=="BulletList"}function rP(n,e){let t=n;for(;;){let i=t.nextSibling,r;if(!i||(r=kl(i.type))!=null&&r<=e)break;t=i}return t.to}const sP=HO.of((n,e,t)=>{for(let i=N(n).resolveInner(t,-1);i&&!(i.from<e);i=i.parent){let r=i.type.prop(vp);if(r==null)continue;let s=rP(i,r);if(s>t)return{from:t,to:s}}return null});function ba(n){return new Be($p,n,[],"markdown")}const oP=ba(Tp),lP=Tp.configure([Yx,Ix,Gx,Nx,{props:[Gt.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),cs=ba(lP);function aP(n,e){return t=>{if(t&&n){let i=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?i=n(t):i=Gr.matchLanguageName(n,t,!0),i instanceof Gr)return i.support?i.support.language.parser:xn.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class uo{constructor(e,t,i,r,s,o,l){this.node=e,this.from=t,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=o,this.item=l}blank(e,t=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length<e;)i+=" ";return i}else{for(let r=this.to-this.from-i.length-this.spaceAfter.length;r>0;r--)i+=" ";return i+(t?this.spaceAfter:"")}}marker(e,t){let i=this.node.name=="OrderedList"?String(+Cp(this.item,e)[2]+t):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function Zp(n,e){let t=[],i=[];for(let r=n;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&t.push(r)}for(let r=t.length-1;r>=0;r--){let s=t[r],o,l=e.lineAt(s.from),a=s.from-l.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(l.text.slice(a))))i.push(new uo(s,a,a+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(l.text.slice(a)))){let h=o[3],c=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),c-=4),i.push(new uo(s.parent,a,a+c,o[1],h,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(a)))){let h=o[4],c=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),c-=4);let f=o[2];o[3]&&(f+=o[3].replace(/[xX]/," ")),i.push(new uo(s.parent,a,a+c,o[1],h,f,s))}}return i}function Cp(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function po(n,e,t,i=0){for(let r=-1,s=n;;){if(s.name=="ListItem"){let l=Cp(s,e),a=+l[2];if(r>=0){if(a!=r+1)return;t.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(r+2+i)})}r=a}let o=s.nextSibling;if(!o)break;s=o}}function ya(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(Vi)!=" ")return n;let i=He(n,4,t),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+n.slice(t)}const hP=(n={})=>({state:e,dispatch:t})=>{let i=N(e),{doc:r}=e,s=null,o=e.changeByRange(l=>{if(!l.empty||!cs.isActiveAt(e,l.from,-1)&&!cs.isActiveAt(e,l.from,1))return s={range:l};let a=l.from,h=r.lineAt(a),c=Zp(i.resolveInner(a,-1),r);for(;c.length&&c[c.length-1].from>a-h.from;)c.pop();if(!c.length)return s={range:l};let f=c[c.length-1];if(f.to-f.spaceAfter.length>a-h.from)return s={range:l};let O=a>=f.to-f.spaceAfter.length&&!/\S/.test(h.text.slice(f.to));if(f.item&&O){let Q=f.node.firstChild,S=f.node.getChild("ListItem","ListItem");if(Q.to>=a||S&&S.to<a||h.from>0&&!/[^\s>]/.test(r.lineAt(h.from-1).text)||n.nonTightLists===!1){let x=c.length>1?c[c.length-2]:null,k,y="";x&&x.item?(k=h.from+x.from,y=x.marker(r,1)):k=h.from+(x?x.to:0);let w=[{from:k,to:a,insert:y}];return f.node.name=="OrderedList"&&po(f.item,r,w,-2),x&&x.node.name=="OrderedList"&&po(x.item,r,w),{range:b.cursor(k+y.length),changes:w}}else{let x=df(c,e,h);return{range:b.cursor(a+x.length+1),changes:{from:h.from,insert:x+e.lineBreak}}}}if(f.node.name=="Blockquote"&&O&&h.from){let Q=r.lineAt(h.from-1),S=/>\s*$/.exec(Q.text);if(S&&S.index==f.from){let x=e.changes([{from:Q.from+S.index,to:Q.to},{from:h.from+f.from,to:h.to}]);return{range:l.map(x),changes:x}}}let u=[];f.node.name=="OrderedList"&&po(f.item,r,u);let p=f.item&&f.item.from<h.from,m="";if(!p||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=f.to)for(let Q=0,S=c.length-1;Q<=S;Q++)m+=Q==S&&!p?c[Q].marker(r,1):c[Q].blank(Q<S?He(h.text,4,c[Q+1].from)-m.length:null);let g=a;for(;g>h.from&&/\s/.test(h.text.charAt(g-h.from-1));)g--;return m=ya(m,e),fP(f.node,e.doc)&&(m=df(c,e,h)+e.lineBreak+m),u.push({from:g,to:a,insert:e.lineBreak+m}),{range:b.cursor(g+m.length+1),changes:u}});return s?!1:(t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},cP=hP();function uf(n){return n.name=="QuoteMark"||n.name=="ListMark"}function fP(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,i=n.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(t.to),s=e.lineAt(i.from),o=/^[\s>]*$/.test(r.text);return r.number+(o?0:1)<s.number}function df(n,e,t){let i="";for(let r=0,s=n.length-2;r<=s;r++)i+=n[r].blank(r<s?He(t.text,4,n[r+1].from)-i.length:null,r<s);return ya(i,e)}function OP(n,e){let t=n.resolveInner(e,-1),i=e;uf(t)&&(i=t.from,t=t.parent);for(let r;r=t.childBefore(i);)if(uf(r))i=r.from;else if(r.name=="OrderedList"||r.name=="BulletList")t=r.lastChild,i=t.to;else break;return t}const uP=({state:n,dispatch:e})=>{let t=N(n),i=null,r=n.changeByRange(s=>{let o=s.from,{doc:l}=n;if(s.empty&&cs.isActiveAt(n,s.from)){let a=l.lineAt(o),h=Zp(OP(t,o),l);if(h.length){let c=h[h.length-1],f=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(o-a.from>f&&!/\S/.test(a.text.slice(f,o-a.from)))return{range:b.cursor(a.from+f),changes:{from:a.from+f,to:o}};if(o-a.from==f&&(!c.item||a.from<=c.item.from||!/\S/.test(a.text.slice(0,c.to)))){let O=a.from+c.from;if(c.item&&c.node.from<c.item.from&&/\S/.test(a.text.slice(c.from,c.to))){let u=c.blank(He(a.text,4,c.to)-He(a.text,4,c.from));return O==a.from&&(u=ya(u,n)),{range:b.cursor(O+u.length),changes:{from:O,to:a.from+c.to,insert:u}}}if(O<o)return{range:b.cursor(O),changes:{from:O,to:o}}}}}return i={range:s}});return i?!1:(e(n.update(r,{scrollIntoView:!0,userEvent:"delete"})),!0)},dP=[{key:"Enter",run:cP},{key:"Backspace",run:uP}],Xp=tP({matchClosingTags:!1});function ZP(n={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:i=!0,base:{parser:r}=oP,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:l=Xp}=n;if(!(r instanceof ws))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let a=n.extensions?[n.extensions]:[],h=[l.support,sP],c;o&&h.push(QP),t instanceof li?(h.push(t.support),c=t.language):t&&(c=t);let f=e||c?aP(e,c):void 0;a.push(Wx({codeParser:f,htmlParser:l.language.parser})),i&&h.push(Tt.high(Wi.of(dP)));let O=ba(r.configure(a));return s&&h.push(O.data.of({autocomplete:pP})),new li(O,h)}function pP(n){let{state:e,pos:t}=n,i=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!i)return null;let r=N(e).resolveInner(t,-1);for(;r&&!r.type.isTop;){if(r.name=="CodeBlock"||r.name=="FencedCode"||r.name=="ProcessingInstructionBlock"||r.name=="CommentBlock"||r.name=="Link"||r.name=="Image")return null;r=r.parent}return{from:t-i[0].length,to:t,options:mP(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let mo=null;function mP(){if(mo)return mo;let n=Jw(new ia(j.create({extensions:Xp}),0,!0));return mo=n?n.options:[]}const gP=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,QP=T.domEventHandlers({paste:(n,e)=>{var t;let{main:i}=e.state.selection;if(i.empty)return!1;let r=(t=n.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!cs.isActiveAt(e.state,i.from,1)))return!1;let s=N(e.state),o=!1;return s.iterate({from:i.from,to:i.to,enter:l=>{(l.from>i.from||gP.test(l.name))&&(o=!0)},leave:l=>{l.to<i.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:i.from,insert:"["},{from:i.to,insert:`](${r})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});export{T as E,$P as j,ZP as m,vP as p,sy as u};
32
- //# sourceMappingURL=vendor-codemirror-Dn73yRFx.js.map
32
+ //# sourceMappingURL=vendor-codemirror-OTxfneaa.js.map