dmart 1.4.40.post33__py3-none-any.whl → 1.4.41.post34__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 (290) hide show
  1. dmart/alembic/__pycache__/__init__.cpython-314.pyc +0 -0
  2. dmart/alembic/__pycache__/env.cpython-314.pyc +0 -0
  3. dmart/alembic/versions/__pycache__/0f3d2b1a7c21_add_authz_materialized_views.cpython-314.pyc +0 -0
  4. dmart/alembic/versions/__pycache__/10d2041b94d4_last_checksum_history.cpython-314.pyc +0 -0
  5. dmart/alembic/versions/__pycache__/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.cpython-314.pyc +0 -0
  6. dmart/alembic/versions/__pycache__/26bfe19b49d4_rm_failedloginattempts.cpython-314.pyc +0 -0
  7. dmart/alembic/versions/__pycache__/3c8bca2219cc_add_otp_table.cpython-314.pyc +0 -0
  8. dmart/alembic/versions/__pycache__/6675fd9dfe42_remove_unique_from_sessions_table.cpython-314.pyc +0 -0
  9. dmart/alembic/versions/__pycache__/71bc1df82e6a_adding_user_last_login_at.cpython-314.pyc +0 -0
  10. dmart/alembic/versions/__pycache__/74288ccbd3b5_initial.cpython-314.pyc +0 -0
  11. dmart/alembic/versions/__pycache__/7520a89a8467_rm_activesession_table.cpython-314.pyc +0 -0
  12. dmart/alembic/versions/__pycache__/848b623755a4_make_created_nd_updated_at_required.cpython-314.pyc +0 -0
  13. dmart/alembic/versions/__pycache__/8640dcbebf85_add_notes_to_users.cpython-314.pyc +0 -0
  14. dmart/alembic/versions/__pycache__/91c94250232a_adding_fk_on_owner_shortname.cpython-314.pyc +0 -0
  15. dmart/alembic/versions/__pycache__/98ecd6f56f9a_ext_meta_with_owner_group_shortname.cpython-314.pyc +0 -0
  16. dmart/alembic/versions/__pycache__/9aae9138c4ef_indexing_created_at_updated_at.cpython-314.pyc +0 -0
  17. dmart/alembic/versions/__pycache__/b53f916b3f6d_json_to_jsonb.cpython-314.pyc +0 -0
  18. dmart/alembic/versions/__pycache__/eb5f1ec65156_adding_user_locked_to_device.cpython-314.pyc +0 -0
  19. dmart/alembic/versions/__pycache__/f7a4949eed19_adding_query_policies_to_meta.cpython-314.pyc +0 -0
  20. dmart/api/managed/utils.py +2 -2
  21. dmart/api/user/router.py +1 -1
  22. dmart/config.env.sample +5 -22
  23. dmart/cxb/assets/@codemirror-prKQ1WbH.js +10 -0
  24. dmart/cxb/assets/@edraj-D-9hi9vU.js +1 -0
  25. dmart/cxb/assets/@jsonquerylang-CFfSvstT.js +12 -0
  26. dmart/cxb/assets/@lezer-Bz8YN7GE.js +1 -0
  27. dmart/cxb/assets/{@replit--ERk53eB.js → @replit-27NbNvJz.js} +1 -1
  28. dmart/cxb/assets/{@roxi-CGMFK4i8.js → @roxi-Bw7qXphd.js} +1 -1
  29. dmart/cxb/assets/{@zerodevx-BlBZjKxu.js → @zerodevx-z992vLW9.js} +1 -1
  30. dmart/cxb/assets/{BreadCrumbLite-ClLCZ5eT.js → BreadCrumbLite-28-Sst8b.js} +1 -1
  31. dmart/cxb/assets/{EntryRenderer-9GXyhIWz.js → EntryRenderer-gOGY0M8V.js} +1 -1
  32. dmart/cxb/assets/{ListView-DZFUWyVb.js → ListView-Ctq2bVYW.js} +2 -2
  33. dmart/cxb/assets/{Prism--hMplq-p.js → Prism-DbpuKlij.js} +1 -1
  34. dmart/cxb/assets/Table2Cols-IRZ18UvF.js +1 -0
  35. dmart/cxb/assets/{_...404_-fuLH_rX9.js → _...404_-lSd1jtj4.js} +1 -1
  36. dmart/cxb/assets/_...fallback_-De94gS6U.js +1 -0
  37. dmart/cxb/assets/{_module-BwgDn_st.js → _module-CPGJEbyo.js} +1 -1
  38. dmart/cxb/assets/{_module-BTyKyzwE.js → _module-CRNnKJ_Y.js} +3 -3
  39. dmart/cxb/assets/{_module-DBPRg0LH.js → _module-ziANIEpM.js} +1 -1
  40. dmart/cxb/assets/{codemirror-wrapped-line-indent-DPhKvljI.js → codemirror-wrapped-line-indent-CCR8a-tt.js} +1 -1
  41. dmart/cxb/assets/{compare-C3AjiGFR.js → compare-C3mJz3fJ.js} +1 -1
  42. dmart/cxb/assets/{dmart_services-AL6-IdDE.js → dmart_services-BTWOtb9Z.js} +1 -1
  43. dmart/cxb/assets/export-C-4WE2nV.js +1 -0
  44. dmart/cxb/assets/flowbite-svelte-Caf58qKG.js +1 -0
  45. dmart/cxb/assets/{flowbite-svelte-icons-D8uFOOjS.js → flowbite-svelte-icons-DXemwXNH.js} +1 -1
  46. dmart/cxb/assets/{global-igKv-1g9.js → global-CF7LWRdS.js} +1 -1
  47. dmart/cxb/assets/import-BMOPDoXp.js +1 -0
  48. dmart/cxb/assets/{index-DtiCmB4o.js → index-BAsZYsRz.js} +1 -1
  49. dmart/cxb/assets/{index-CC-A1ipE.js → index-BBCAZYiv.js} +1 -1
  50. dmart/cxb/assets/{index-BWN92sjI.js → index-BJ8k452_.js} +4 -4
  51. dmart/cxb/assets/{index-xuuZoPt8.js → index-BUIZc0eo.js} +1 -1
  52. dmart/cxb/assets/{index-BejgdGl7.js → index-Ba1QyM6b.js} +1 -1
  53. dmart/cxb/assets/{index-Du1Yp_ew.js → index-BhRFcH0w.js} +1 -1
  54. dmart/cxb/assets/{index-UMAHQJV7.js → index-C2qX9HoV.js} +1 -1
  55. dmart/cxb/assets/{index-DTfhnhwd.js → index-CDaVHY1H.js} +1 -1
  56. dmart/cxb/assets/{index-BdeNM69f.js → index-C_qmKy7R.js} +1 -1
  57. dmart/cxb/assets/index-CbbMUQaM.css +2 -0
  58. dmart/cxb/assets/{index-CJk5Ul2Q.js → index-CsFEfUT6.js} +1 -1
  59. dmart/cxb/assets/{index-CIUfy6RC.js → index-DVbd0rhr.js} +1 -1
  60. dmart/cxb/assets/index-DtR8jRRM.js +1 -0
  61. dmart/cxb/assets/{index-DQmwVe-X.js → index-Eaqb7YHm.js} +1 -1
  62. dmart/cxb/assets/{info-Dd-l-jS9.js → info-B3CPbnSo.js} +1 -1
  63. dmart/cxb/assets/{jsonrepair-B30Dx381.js → jsonrepair-DJT3kRBj.js} +6 -6
  64. dmart/cxb/assets/{pagination-svelte-D5CyoiE_.js → pagination-svelte-D8AVMXcz.js} +1 -1
  65. dmart/cxb/assets/{profile-BUf-tKMe.js → profile-uY5zsYbu.js} +1 -1
  66. dmart/cxb/assets/{query-BSLdkT80.js → query-Ck7rjPsV.js} +1 -1
  67. dmart/cxb/assets/spaces-5QYuv6aM.js +1 -0
  68. dmart/cxb/assets/svelte-B9Ye91X-.js +4 -0
  69. dmart/cxb/assets/{svelte-awesome-DhnMA6Q_.js → svelte-awesome-DpV9QpGy.js} +1 -1
  70. dmart/cxb/assets/{svelte-datatables-net-CY7LBj6I.js → svelte-datatables-net-PrmrsOQE.js} +1 -1
  71. dmart/cxb/assets/{svelte-floating-ui-BlS3sOAQ.js → svelte-floating-ui-BWukrOq5.js} +1 -1
  72. dmart/cxb/assets/{svelte-i18n-CT2KkQaN.js → svelte-i18n-CZ4cFDVx.js} +1 -1
  73. dmart/cxb/assets/{svelte-jsoneditor-BzfX6Usi.css → svelte-jsoneditor-6jH6h6zi.css} +1 -1
  74. dmart/cxb/assets/{svelte-jsoneditor-CUGSvWId.js → svelte-jsoneditor-BdDDhQGI.js} +1 -1
  75. dmart/cxb/assets/{svelte-select-CjHAt_85.js → svelte-select-BDtNxMKN.js} +2 -2
  76. dmart/cxb/assets/toast-nP_bUL2P.js +1 -0
  77. dmart/cxb/assets/{typewriter-editor-DkTVIJdm.js → typewriter-editor-Do-KAaNp.js} +1 -1
  78. dmart/cxb/assets/{user-DeK_NB5v.js → user-BQpJ6b6h.js} +1 -1
  79. dmart/cxb/config.json +1 -2
  80. dmart/cxb/index.html +6 -6
  81. dmart/data_adapters/sql/adapter.py +19 -2
  82. dmart/dmart.py +1 -1
  83. dmart/fast.py +6 -0
  84. dmart/info.json +1 -1
  85. dmart/my.py +11 -0
  86. dmart/publish.sh +2 -2
  87. dmart/sample/spaces/applications/.dm/meta.space.json +24 -29
  88. dmart/sample/spaces/applications/api/.dm/meta.folder.json +18 -1
  89. dmart/sample/spaces/applications/api/.dm/query_all_applications/meta.content.json +17 -1
  90. dmart/sample/spaces/applications/api/.dm/test_by_saad/attachments.media/meta.warframe.json +16 -1
  91. dmart/sample/spaces/applications/api/.dm/test_by_saad/meta.content.json +16 -1
  92. dmart/sample/spaces/applications/api/.dm/user_profile/meta.content.json +17 -1
  93. dmart/sample/spaces/applications/api/applications/.dm/create_log/meta.content.json +15 -1
  94. dmart/sample/spaces/applications/api/applications/.dm/create_public_logs/meta.content.json +15 -1
  95. dmart/sample/spaces/applications/api/applications/.dm/meta.folder.json +15 -1
  96. dmart/sample/spaces/applications/api/applications/.dm/query_all_translated_data/meta.content.json +15 -1
  97. dmart/sample/spaces/applications/api/applications/.dm/query_logs/meta.content.json +15 -1
  98. dmart/sample/spaces/applications/api/applications/.dm/query_translated_enums/meta.content.json +15 -1
  99. dmart/sample/spaces/applications/api/applications/.dm/query_translated_others/meta.content.json +15 -1
  100. dmart/sample/spaces/applications/api/applications/.dm/query_translated_resolution/meta.content.json +15 -1
  101. dmart/sample/spaces/applications/api/applications/create_log.json +46 -1
  102. dmart/sample/spaces/applications/api/applications/create_public_logs.json +22 -1
  103. dmart/sample/spaces/applications/api/applications/query_all_translated_data.json +14 -1
  104. dmart/sample/spaces/applications/api/applications/query_logs.json +11 -1
  105. dmart/sample/spaces/applications/api/applications/query_translated_enums.json +14 -1
  106. dmart/sample/spaces/applications/api/applications/query_translated_others.json +14 -1
  107. dmart/sample/spaces/applications/api/applications/query_translated_resolution.json +13 -1
  108. dmart/sample/spaces/applications/api/applications.json +16 -1
  109. dmart/sample/spaces/applications/api/management/.dm/create_subaccount/meta.content.json +15 -1
  110. dmart/sample/spaces/applications/api/management/.dm/meta.folder.json +15 -1
  111. dmart/sample/spaces/applications/api/management/.dm/update_password/meta.content.json +15 -1
  112. dmart/sample/spaces/applications/api/management/create_subaccount.json +29 -29
  113. dmart/sample/spaces/applications/api/management/update_password.json +19 -1
  114. dmart/sample/spaces/applications/api/management.json +16 -1
  115. dmart/sample/spaces/applications/api/query_all_applications.json +5 -6
  116. dmart/sample/spaces/applications/api/test_by_saad.json +4 -1
  117. dmart/sample/spaces/applications/api/user/.dm/meta.folder.json +9 -1
  118. dmart/sample/spaces/applications/api/user/.dm/test_by_saad/meta.content.json +16 -1
  119. dmart/sample/spaces/applications/api/user/.dm/user_profile/meta.content.json +17 -1
  120. dmart/sample/spaces/applications/api/user/test_by_saad.json +4 -1
  121. dmart/sample/spaces/applications/api/user/user_profile.json +4 -1
  122. dmart/sample/spaces/applications/api/user_profile.json +4 -1
  123. dmart/sample/spaces/applications/api.json +33 -1
  124. dmart/sample/spaces/applications/collections/.dm/meta.folder.json +11 -10
  125. dmart/sample/spaces/applications/collections.json +20 -1
  126. dmart/sample/spaces/applications/configurations/.dm/meta.folder.json +17 -1
  127. dmart/sample/spaces/applications/configurations.json +8 -8
  128. dmart/sample/spaces/applications/logs/.dm/meta.folder.json +12 -1
  129. dmart/sample/spaces/applications/queries/.dm/meta.folder.json +15 -1
  130. dmart/sample/spaces/applications/queries/.dm/order/meta.content.json +17 -1
  131. dmart/sample/spaces/applications/queries/order.json +15 -1
  132. dmart/sample/spaces/applications/queries.json +16 -1
  133. dmart/sample/spaces/applications/schema/.dm/api/meta.schema.json +17 -1
  134. dmart/sample/spaces/applications/schema/.dm/configuration/meta.schema.json +14 -1
  135. dmart/sample/spaces/applications/schema/.dm/error/meta.schema.json +14 -1
  136. dmart/sample/spaces/applications/schema/.dm/log/meta.schema.json +15 -1
  137. dmart/sample/spaces/applications/schema/.dm/meta.folder.json +15 -1
  138. dmart/sample/spaces/applications/schema/.dm/query/meta.schema.json +15 -14
  139. dmart/sample/spaces/applications/schema/.dm/translation/meta.schema.json +14 -1
  140. dmart/sample/spaces/applications/schema/api.json +24 -18
  141. dmart/sample/spaces/applications/schema/configuration.json +26 -1
  142. dmart/sample/spaces/applications/schema/error.json +22 -22
  143. dmart/sample/spaces/applications/schema/log.json +57 -1
  144. dmart/sample/spaces/applications/schema/query.json +56 -58
  145. dmart/sample/spaces/applications/schema/translation.json +4 -4
  146. dmart/sample/spaces/applications/schema.json +16 -1
  147. dmart/sample/spaces/applications/translations/.dm/meta.folder.json +15 -1
  148. dmart/sample/spaces/applications/translations.json +22 -1
  149. dmart/sample/spaces/archive/.dm/meta.space.json +19 -26
  150. dmart/sample/spaces/custom_plugins/dummy/__pycache__/plugin.cpython-314.pyc +0 -0
  151. dmart/sample/spaces/custom_plugins/own_changed_notification/__pycache__/plugin.cpython-314.pyc +0 -0
  152. dmart/sample/spaces/dummy/.dm/myfolder/history.jsonl +3 -0
  153. dmart/sample/spaces/dummy/.dm/posts/history.jsonl +3 -0
  154. dmart/sample/spaces/dummy/.dm/workflows/history.jsonl +3 -0
  155. dmart/sample/spaces/dummy/myfolder/.dm/an_example/history.jsonl +4 -0
  156. dmart/sample/spaces/dummy/myfolder/.dm/buyer_123/history.jsonl +2 -0
  157. dmart/sample/spaces/dummy/posts/.dm/97326c47/history.jsonl +3 -0
  158. dmart/sample/spaces/dummymyfolder/.dm/an_example/history.jsonl +2 -0
  159. dmart/sample/spaces/dummymyfolder/.dm/buyer_123/history.jsonl +2 -0
  160. dmart/sample/spaces/dummymyfolder/buyer_123/.dm/receipt/history.jsonl +2 -0
  161. dmart/sample/spaces/dummyschema/.dm/test_schema/history.jsonl +2 -0
  162. dmart/sample/spaces/dummyschema/.dm/ticket_workflows/history.jsonl +2 -0
  163. dmart/sample/spaces/dummyworkflows/.dm/myworkflow/history.jsonl +2 -0
  164. dmart/sample/spaces/management/.dm/meta.space.json +24 -27
  165. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/admin.json +31 -32
  166. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.admin.json +15 -1
  167. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.system.json +15 -1
  168. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/system.json +27 -28
  169. dmart/sample/spaces/management/collections/.dm/meta.folder.json +15 -1
  170. dmart/sample/spaces/management/collections.json +26 -1
  171. dmart/sample/spaces/management/groups/.dm/meta.folder.json +15 -1
  172. dmart/sample/spaces/management/groups.json +14 -1
  173. dmart/sample/spaces/management/health_check/.dm/meta.folder.json +15 -1
  174. dmart/sample/spaces/management/health_check.json +13 -1
  175. dmart/sample/spaces/management/notifications/.dm/meta.folder.json +15 -1
  176. dmart/sample/spaces/management/notifications/admin/.dm/meta.folder.json +6 -6
  177. dmart/sample/spaces/management/notifications/system/.dm/meta.folder.json +6 -6
  178. dmart/sample/spaces/management/notifications.json +46 -1
  179. dmart/sample/spaces/management/permissions/.dm/access_applications/meta.permission.json +4 -5
  180. dmart/sample/spaces/management/permissions/.dm/access_applications_world/meta.permission.json +23 -24
  181. dmart/sample/spaces/management/permissions/.dm/access_messages/meta.permission.json +14 -8
  182. dmart/sample/spaces/management/permissions/.dm/access_personal/meta.permission.json +12 -7
  183. dmart/sample/spaces/management/permissions/.dm/access_protected/meta.permission.json +12 -8
  184. dmart/sample/spaces/management/permissions/.dm/access_public/meta.permission.json +12 -8
  185. dmart/sample/spaces/management/permissions/.dm/browse_all_folders/meta.permission.json +5 -6
  186. dmart/sample/spaces/management/permissions/.dm/create_log/meta.permission.json +9 -8
  187. dmart/sample/spaces/management/permissions/.dm/interviewer/meta.permission.json +34 -1
  188. dmart/sample/spaces/management/permissions/.dm/manage_applications/meta.permission.json +35 -1
  189. dmart/sample/spaces/management/permissions/.dm/manage_debug/meta.permission.json +9 -7
  190. dmart/sample/spaces/management/permissions/.dm/manage_spaces/meta.permission.json +5 -6
  191. dmart/sample/spaces/management/permissions/.dm/meta.folder.json +15 -1
  192. dmart/sample/spaces/management/permissions/.dm/rules_management_default/meta.permission.json +10 -7
  193. dmart/sample/spaces/management/permissions/.dm/super_manager/meta.permission.json +4 -7
  194. dmart/sample/spaces/management/permissions/.dm/view_activity_log/meta.permission.json +10 -7
  195. dmart/sample/spaces/management/permissions/.dm/view_collections/meta.permission.json +6 -6
  196. dmart/sample/spaces/management/permissions/.dm/view_logs/meta.permission.json +9 -8
  197. dmart/sample/spaces/management/permissions/.dm/view_roles/meta.permission.json +10 -11
  198. dmart/sample/spaces/management/permissions/.dm/view_users/meta.permission.json +10 -7
  199. dmart/sample/spaces/management/permissions/.dm/view_world/meta.permission.json +10 -12
  200. dmart/sample/spaces/management/permissions/.dm/world/meta.permission.json +15 -10
  201. dmart/sample/spaces/management/permissions.json +10 -1
  202. dmart/sample/spaces/management/roles/.dm/dummy/meta.role.json +6 -6
  203. dmart/sample/spaces/management/roles/.dm/logged_in/meta.role.json +7 -7
  204. dmart/sample/spaces/management/roles/.dm/manager/meta.role.json +7 -7
  205. dmart/sample/spaces/management/roles/.dm/meta.folder.json +15 -1
  206. dmart/sample/spaces/management/roles/.dm/moderator/meta.role.json +7 -7
  207. dmart/sample/spaces/management/roles/.dm/super_admin/meta.role.json +7 -7
  208. dmart/sample/spaces/management/roles/.dm/test_role/meta.role.json +7 -7
  209. dmart/sample/spaces/management/roles/.dm/world/meta.role.json +7 -7
  210. dmart/sample/spaces/management/roles.json +11 -1
  211. dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/meta.ui_schema.json +15 -9
  212. dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/ui_schema.json +4 -4
  213. dmart/sample/spaces/management/schema/.dm/admin_notification_request/meta.schema.json +17 -1
  214. dmart/sample/spaces/management/schema/.dm/api/meta.schema.json +15 -1
  215. dmart/sample/spaces/management/schema/.dm/folder_rendering/meta.schema.json +17 -1
  216. dmart/sample/spaces/management/schema/.dm/health_check/meta.schema.json +8 -8
  217. dmart/sample/spaces/management/schema/.dm/meta.folder.json +15 -1
  218. dmart/sample/spaces/management/schema/.dm/meta_schema/meta.schema.json +14 -1
  219. dmart/sample/spaces/management/schema/.dm/metafile/meta.schema.json +14 -13
  220. dmart/sample/spaces/management/schema/.dm/notification/meta.schema.json +17 -1
  221. dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/meta.ui_schema.json +15 -9
  222. dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/ui_schema.json +1 -1
  223. dmart/sample/spaces/management/schema/.dm/system_notification_request/meta.schema.json +17 -1
  224. dmart/sample/spaces/management/schema/.dm/view/meta.schema.json +17 -1
  225. dmart/sample/spaces/management/schema/.dm/workflow/meta.schema.json +17 -1
  226. dmart/sample/spaces/management/schema/admin_notification_request.json +85 -88
  227. dmart/sample/spaces/management/schema/api.json +35 -1
  228. dmart/sample/spaces/management/schema/folder_rendering.json +166 -174
  229. dmart/sample/spaces/management/schema/health_check.json +1 -4
  230. dmart/sample/spaces/management/schema/meta_schema.json +48 -48
  231. dmart/sample/spaces/management/schema/metafile.json +73 -76
  232. dmart/sample/spaces/management/schema/notification.json +15 -10
  233. dmart/sample/spaces/management/schema/system_notification_request.json +49 -38
  234. dmart/sample/spaces/management/schema/view.json +11 -11
  235. dmart/sample/spaces/management/schema/workflow.json +51 -53
  236. dmart/sample/spaces/management/schema.json +16 -1
  237. dmart/sample/spaces/management/users/.dm/alibaba/meta.user.json +14 -15
  238. dmart/sample/spaces/management/users/.dm/anonymous/meta.user.json +17 -17
  239. dmart/sample/spaces/management/users/.dm/distributor/history.jsonl +6 -0
  240. dmart/sample/spaces/management/users/.dm/dmart/meta.user.json +30 -18
  241. dmart/sample/spaces/management/users/.dm/meta.folder.json +7 -7
  242. dmart/sample/spaces/management/workflows/.dm/channel/meta.content.json +16 -1
  243. dmart/sample/spaces/management/workflows/.dm/meta.folder.json +17 -1
  244. dmart/sample/spaces/management/workflows/channel.json +40 -40
  245. dmart/sample/spaces/management/workflows.json +13 -1
  246. dmart/sample/spaces/managementusers/.dm/distributor/history.jsonl +3 -0
  247. dmart/sample/spaces/managementusers/.dm/dmart/history.jsonl +11 -0
  248. dmart/sample/spaces/maqola/.dm/meta.space.json +19 -23
  249. dmart/sample/spaces/personal/.dm/meta.space.json +24 -18
  250. dmart/sample/spaces/personal/people/.dm/meta.folder.json +9 -1
  251. dmart/sample/spaces/personal/people/distributor/.dm/meta.folder.json +9 -0
  252. dmart/sample/spaces/personal/people/distributor/inbox/.dm/meta.folder.json +9 -0
  253. dmart/sample/spaces/personal/people/distributor/notifications/.dm/meta.folder.json +9 -0
  254. dmart/sample/spaces/personal/people/distributor/private/.dm/meta.folder.json +9 -0
  255. dmart/sample/spaces/personal/people/distributor/protected/.dm/meta.folder.json +9 -0
  256. dmart/sample/spaces/personal/people/distributor/public/.dm/meta.folder.json +9 -0
  257. dmart/sample/spaces/personal/people/dmart/.dm/meta.folder.json +9 -1
  258. dmart/sample/spaces/personal/people/dmart/messages/.dm/0b5f7e7f/meta.content.json +14 -1
  259. dmart/sample/spaces/personal/people/dmart/messages/.dm/meta.folder.json +9 -1
  260. dmart/sample/spaces/personal/people/dmart/messages/.dm/mytest/meta.content.json +14 -1
  261. dmart/sample/spaces/personal/people/dmart/messages/0b5f7e7f.json +3 -1
  262. dmart/sample/spaces/personal/people/dmart/messages/mytest.json +4 -1
  263. dmart/sample/spaces/personal/people/dmart/notifications/.dm/meta.folder.json +9 -1
  264. dmart/sample/spaces/personal/people/dmart/private/.dm/inner/meta.content.json +14 -1
  265. dmart/sample/spaces/personal/people/dmart/private/.dm/meta.folder.json +9 -1
  266. dmart/sample/spaces/personal/people/dmart/private/inner.json +3 -1
  267. dmart/sample/spaces/personal/people/dmart/protected/.dm/avatar/meta.content.json +14 -1
  268. dmart/sample/spaces/personal/people/dmart/protected/.dm/meta.folder.json +9 -1
  269. dmart/sample/spaces/personal/people/dmart/public/.dm/meta.folder.json +9 -1
  270. dmart/sample/test/.gitignore +0 -1
  271. {dmart-1.4.40.post33.dist-info → dmart-1.4.41.post34.dist-info}/METADATA +1 -1
  272. {dmart-1.4.40.post33.dist-info → dmart-1.4.41.post34.dist-info}/RECORD +275 -234
  273. dmart/cxb/assets/@codemirror-Rn7_6DkE.js +0 -10
  274. dmart/cxb/assets/@edraj-CS4NwVbD.js +0 -1
  275. dmart/cxb/assets/@jsonquerylang-laKNoFFq.js +0 -12
  276. dmart/cxb/assets/@lezer-za4Q-8Ew.js +0 -1
  277. dmart/cxb/assets/Table2Cols-BsbwicQm.js +0 -1
  278. dmart/cxb/assets/_...fallback_-Ba_NLmAE.js +0 -1
  279. dmart/cxb/assets/export-OF_rTiXu.js +0 -1
  280. dmart/cxb/assets/flowbite-svelte-BLvjb-sa.js +0 -1
  281. dmart/cxb/assets/import-BiJTp7Zs.js +0 -1
  282. dmart/cxb/assets/index-DOCBh6PM.js +0 -1
  283. dmart/cxb/assets/index-NBrXBlLA.css +0 -2
  284. dmart/cxb/assets/spaces-0oyGvpii.js +0 -1
  285. dmart/cxb/assets/svelte-B2XmcTi_.js +0 -4
  286. dmart/cxb/assets/toast-B9WDyfyI.js +0 -1
  287. dmart/sample/spaces/management/.dm/events.jsonl +0 -32
  288. {dmart-1.4.40.post33.dist-info → dmart-1.4.41.post34.dist-info}/WHEEL +0 -0
  289. {dmart-1.4.40.post33.dist-info → dmart-1.4.41.post34.dist-info}/entry_points.txt +0 -0
  290. {dmart-1.4.40.post33.dist-info → dmart-1.4.41.post34.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- var p=(t=>(t.success="success",t.failed="failed",t))(p||{}),i=(t=>(t.managed="managed",t.public="public",t))(i||{});let o={"Content-type":"application/json",Authorization:""};var h=(t=>(t.aggregation="aggregation",t.search="search",t.subpath="subpath",t.events="events",t.history="history",t.tags="tags",t.spaces="spaces",t.counters="counters",t.reports="reports",t.attachments="attachments",t.attachments_aggregation="attachments_aggregation",t))(h||{}),m=(t=>(t.ascending="ascending",t.descending="descending",t))(m||{}),g=(t=>(t.create="create",t.update="update",t.replace="replace",t.delete="delete",t.move="move",t.updateACL="update_acl",t.assign="assign",t))(g||{}),f=(t=>(t.json="json",t.comment="comment",t.media="media",t.relationship="relationship",t.alteration="alteration",t.csv="csv",t.parquet="parquet",t.jsonl="jsonl",t.sqlite="sqlite",t))(f||{}),w=(t=>(t.user="user",t.group="group",t.folder="folder",t.schema="schema",t.content="content",t.acl="acl",t.comment="comment",t.reaction="reaction",t.media="media",t.locator="locator",t.relationship="relationship",t.alteration="alteration",t.history="history",t.space="space",t.branch="branch",t.permission="permission",t.role="role",t.ticket="ticket",t.json="json",t.post="post",t.plugin_wrapper="plugin_wrapper",t.notification="notification",t.jsonl="jsonl",t.csv="csv",t.sqlite="sqlite",t.parquet="parquet",t))(w||{}),u=(t=>(t.text="text",t.html="html",t.markdown="markdown",t.json="json",t.image="image",t.python="python",t.pdf="pdf",t.audio="audio",t.video="video",t.jsonl="jsonl",t.apk="apk",t.csv="csv",t.sqlite="sqlite",t.parquet="parquet",t))(u||{});class n{static setAxiosInstance(a){n.axiosDmartInstance=a}static getAxiosInstance(){if(!n.axiosDmartInstance)throw new Error("Axios instance is not set. Please set it using setAxiosInstance method.");return n.axiosDmartInstance}static getHeaders(){return o}static setHeaders(a){Object.assign(o,a)}static getBaseURL(){return n.axiosDmartInstance.defaults.baseURL}static set setBaseURL(a){n.axiosDmartInstance.defaults.baseURL=a}static getToken(){return o.Authorization?o.Authorization.replace("Bearer ",""):null}static setToken(a){o.Authorization=`Bearer ${a}`}static async login(a,s){var c;const e=(await n.axiosDmartInstance.post("user/login",{shortname:a,password:s},{headers:o})).data;return e.status==p.success&&e.records.length>0&&(o.Authorization="Bearer "+((c=e.records[0])==null?void 0:c.attributes.access_token)),e}static async loginBy(a,s){var r;try{const c=(await n.axiosDmartInstance.post("user/login",{...a,password:s},{headers:o})).data;return c.status==p.success&&c.records.length>0&&(o.Authorization="Bearer "+((r=c.records[0])==null?void 0:r.attributes.access_token)),c}catch(e){throw e}}static async logout(){try{const{data:a}=await n.axiosDmartInstance.post("user/logout",{},{headers:o});return a}catch(a){throw a}}static async createUser(a){try{const{data:s}=await n.axiosDmartInstance.post("user/create",a,{headers:o});return s}catch(s){throw s}}static async updateUser(a){try{const{data:s}=await n.axiosDmartInstance.post("user/profile",a,{headers:o});return s}catch(s){throw s}}static async checkExisting(a,s){try{const{data:r}=await n.axiosDmartInstance.get(`user/check-existing?${a}=${s}`,{headers:o});return r}catch(r){throw r}}static async getProfile(){var a,s,r;try{const{data:e}=await n.axiosDmartInstance.get("user/profile",{headers:o});return typeof localStorage<"u"&&e.status==="success"&&(localStorage.setItem("permissions",JSON.stringify((a=((e==null?void 0:e.records)??[{}])[0])==null?void 0:a.attributes.permissions)),localStorage.setItem("roles",JSON.stringify((r=(s=((e==null?void 0:e.records)??[{}])[0])==null?void 0:s.attributes)==null?void 0:r.roles))),e}catch(e){throw e}}static async query(a,s=i.managed){try{a.type!=h.spaces&&(a.sort_type=a.sort_type||m.ascending,a.sort_by=a.sort_by||"created_at"),a.subpath=a.subpath.replace(/\/+/g,"/");const{data:r}=await n.axiosDmartInstance.post(`${s}/query`,a,{headers:o});return r}catch(r){throw r}}static async csv(a){try{a.sort_type=a.sort_type||m.ascending,a.sort_by="created_at",a.subpath=a.subpath.replace(/\/+/g,"/");const{data:s}=await n.axiosDmartInstance.post("managed/csv",a,{headers:o});return s}catch(s){throw s}}static async resourcesFromCsv(a){try{let s=`/managed/resources_from_csv/${a.resourceType}/${a.space_name}/${a.subpath}`;const r={};a.schema&&(s+=`/${a.schema}`);let e=new FormData;e.append("resources_file",a.payload),a.isUpdate&&(r.is_update=a.isUpdate);const c={"Content-Type":"multipart/form-data"},{data:l}=await n.axiosDmartInstance.post(s,e,{headers:c,params:r});return l}catch(s){return s}}static async request(a){const s=await n.axiosDmartInstance.post("managed/request",a,{headers:o});return s==null?void 0:s.data}static async retrieveEntry(a,s=i.managed){try{a.validate_schema===null&&(a.validate_schema=!0),(!a.subpath||a.subpath=="/")&&(a.subpath="__root__");const r=`${s}/entry/${a.resource_type}/${a.space_name}/${a.subpath}/${a.shortname}?retrieve_json_payload=${a.retrieve_json_payload}&retrieve_attachments=${a.retrieve_attachments}&validate_schema=${a.validate_schema}`,{data:e}=await n.axiosDmartInstance.get(`${r.replace(/\/+/g,"/")}`,{headers:o});return e}catch(r){throw r}}static async uploadWithPayload(a,s=i.managed){const r={resource_type:a.resource_type,subpath:a.subpath,shortname:a.shortname,attributes:a.attributes};a.attributes!==null&&Object.keys(a.attributes).length===0?r.attributes={is_active:!0,payload:{body:{}}}:Object.keys(a.attributes).includes("is_active")||(r.attributes.is_active=!0);const e=new Blob([JSON.stringify(r)],{type:"application/json"}),c=new FormData;c.append("space_name",a.space_name),c.append("request_record",e),c.append("payload_file",a.payload_file);const l={...o,"Content-Type":"multipart/form-data"};try{const{data:d}=await n.axiosDmartInstance.post(`${s}/resource_with_payload`,c,{headers:l});return d}catch(d){throw d}}static async fetchDataAsset(a){try{const{data:s}=await n.axiosDmartInstance.post("managed/data-asset",{space_name:a.spaceName,resource_type:a.resourceType,data_asset_type:a.dataAssetType,subpath:a.subpath,shortname:a.shortname,query_string:a.query_string??"SELECT * FROM file",filter_data_assets:a.filter_data_assets},{headers:o});return s}catch(s){throw s}}static async getSpaces(){return await this.query({type:h.spaces,space_name:"management",subpath:"/",search:"",limit:100})}static async getChildren(a){return a.limit===null&&(a.limit=20),a.offset===null&&(a.offset=0),a.restrict_types===null&&(a.restrict_types=[]),await this.query({type:h.search,space_name:a.space_name,subpath:a.subpath,filter_types:a.restrict_types,exact_subpath:!0,search:a.search,limit:a.limit,offset:a.offset})}static getAttachmentUrl(a,s=i.managed){const r=a.subpath.replace(/\/+$/,"");return`${n.axiosDmartInstance.defaults.baseURL}`+`/${s}/payload/${a.resource_type}/${a.space_name}/${r}/${a.parent_shortname}/${a.shortname}${a.ext===null?"":`.${a.ext}`}`.replaceAll("//","/")}static async getSpaceHealth(a){try{const{data:s}=await n.axiosDmartInstance.get(`managed/health/${a}`,{headers:o});return s}catch(s){throw s}}static async getPayload(a,s=i.managed){try{let r=`${s}/payload/${a.resource_type}/${a.space_name}/${a.subpath}/${a.shortname}`;a.schemaShortname&&(r+=`.${a.schemaShortname}`),r+=`.${a.ext}`;const{data:e}=await n.axiosDmartInstance.get(r,{headers:o});return e}catch(r){throw r}}static async progressTicket(a){try{const s={};a.resolution&&(s.resolution=a.resolution),a.comment&&(s.comment=a.comment);const{data:r}=await n.axiosDmartInstance.put(`managed/progress-ticket/${a.space_name}/${a.subpath}/${a.shortname}/${a.action}`,s,{headers:o});return r}catch(s){throw s}}static async submit(a){try{var s=`public/submit/${a.spaceName}`;a.resourceType&&(s+=`/${a.resourceType}`),a.workflowShortname&&(s+=`/${a.workflowShortname}`),s+=`/${a.schemaShortname}/${a.subpath}`;const{data:r}=await n.axiosDmartInstance.post(s,a.record,{headers:o});return r}catch(r){throw r}}static async getManifest(){try{const{data:a}=await n.axiosDmartInstance.get("info/manifest",{headers:o});return a}catch(a){throw a}}static async getSettings(){try{const{data:a}=await n.axiosDmartInstance.get("info/settings",{headers:o});return a}catch(a){throw a}}static async otpRequest(a,s=null){try{const r={...o};s&&(r["Accept-Language"]=s);const{data:e}=await n.axiosDmartInstance.post("user/otp-request",a,{headers:r});return e}catch(r){throw r}}static async otpRequestLogin(a,s=null){try{const r={...o};s&&(r["Accept-Language"]=s);const{data:e}=await n.axiosDmartInstance.post("user/otp-request-login",a,{headers:r});return e}catch(r){throw r}}static async passwordResetRequest(a){try{const{data:s}=await n.axiosDmartInstance.post("user/password-reset-request",a,{headers:o});return s}catch(s){throw s}}static async confirmOtp(a){try{const{data:s}=await n.axiosDmartInstance.post("user/otp-confirm",a,{headers:o});return s}catch(s){throw s}}static async userReset(a){try{const{data:s}=await n.axiosDmartInstance.post("user/reset",{shortname:a},{headers:o});return s}catch(s){throw s}}static async validatePassword(a){try{const{data:s}=await n.axiosDmartInstance.post("user/validate_password",{password:a},{headers:o});return s}catch(s){throw s}}}export{u as C,n as D,h as Q,w as R,m as S,g as a,f as b,o as h};
@@ -1,12 +0,0 @@
1
- const k=e=>Array.isArray(e),ne=e=>e!==null&&typeof e=="object"&&!k(e),te=e=>typeof e=="string",E=(e,n)=>e===n?!0:e!==null&&n!==null&&typeof e=="object"&&typeof n=="object"&&Object.keys(e).length===Object.keys(n).length&&Object.entries(e).every(([t,r])=>E(r,n[t])),F=(e,n)=>{const t=e==null?void 0:e[n];if(t!==void 0){if(!Object.hasOwn(e,n)||Array.isArray(e)&&!/^\d+$/.test(n)||typeof e!="object")throw new TypeError(`Unsupported property "${n}"`);return t}};function d(e){return(...n)=>{const t=n.map(s=>g(s)),r=t[0],o=t[1];return t.length===1?s=>e(r(s)):t.length===2?s=>e(r(s),o(s)):s=>e(...t.map(y=>y(s)))}}const B={boolean:0,number:1,string:2},G=3,L=(e,n)=>typeof e==typeof n&&typeof e in B?e>n:!1,re=(e,n)=>E(e,n)||L(e,n),Q=(e,n)=>typeof e==typeof n&&typeof e in B?e<n:!1,oe=(e,n)=>E(e,n)||Q(e,n),_={pipe:(...e)=>{const n=e.map(t=>g(t));return t=>n.reduce((r,o)=>o(r),t)},object:e=>{const n=Object.keys(e).map(t=>[t,g(e[t])]);return t=>{const r={};for(const[o,s]of n)r[o]=s(t);return r}},array:(...e)=>{const n=e.map(t=>g(t));return t=>n.map(r=>r(t))},get:(...e)=>{if(e.length===0)return n=>n??null;if(e.length===1){const n=e[0];return t=>F(t,n)??null}return n=>{let t=n;for(const r of e)t=F(t,r);return t??null}},map:e=>{const n=g(e);return t=>t.map(n)},mapObject:e=>{const n=g(e);return t=>{const r={};for(const o of Object.keys(t)){const s=n({key:o,value:t[o]});r[s.key]=s.value}return r}},mapKeys:e=>{const n=g(e);return t=>{const r={};for(const o of Object.keys(t)){const s=n(o);r[s]=t[o]}return r}},mapValues:e=>{const n=g(e);return t=>{const r={};for(const o of Object.keys(t))r[o]=n(t[o]);return r}},filter:e=>{const n=g(e);return t=>t.filter(r=>D(n(r)))},sort:(e=["get"],n)=>{const t=g(e),r=n==="desc"?-1:1;function o(s,y){const i=t(s),v=t(y);if(typeof i!=typeof v){const I=B[typeof i]??G,A=B[typeof v]??G;return I>A?r:I<A?-r:0}return typeof i in B?i>v?r:i<v?-r:0:0}return s=>s.slice().sort(o)},reverse:()=>e=>e.toReversed(),pick:(...e)=>{const n=e.map(([r,...o])=>[o[o.length-1],_.get(...o)]),t=(r,o)=>{const s={};for(const[y,i]of o)s[y]=i(r);return s};return r=>k(r)?r.map(o=>t(o,n)):t(r,n)},groupBy:e=>{const n=g(e);return t=>{const r={};for(const o of t){const s=n(o);r[s]?r[s].push(o):r[s]=[o]}return r}},keyBy:e=>{const n=g(e);return t=>{const r={};for(const o of t){const s=n(o);s in r||(r[s]=o)}return r}},flatten:()=>e=>e.flat(),join:(e="")=>n=>n.join(e),split:d((e,n)=>n!==void 0?e.split(n):e.trim().split(/\s+/)),substring:d((e,n,t)=>e.slice(Math.max(n,0),t)),uniq:()=>e=>{const n=[];for(const t of e)n.findIndex(r=>E(r,t))===-1&&n.push(t);return n},uniqBy:e=>n=>Object.values(_.keyBy(e)(n)),limit:e=>n=>n.slice(0,Math.max(e,0)),size:()=>e=>e.length,keys:()=>Object.keys,values:()=>Object.values,prod:()=>e=>z(e,(n,t)=>n*t),sum:()=>e=>k(e)?e.reduce((n,t)=>n+t,0):K(),average:()=>e=>k(e)?e.length>0?e.reduce((n,t)=>n+t)/e.length:null:K(),min:()=>e=>z(e,(n,t)=>Math.min(n,t)),max:()=>e=>z(e,(n,t)=>Math.max(n,t)),and:d((...e)=>z(e,(n,t)=>!!(n&&t))),or:d((...e)=>z(e,(n,t)=>!!(n||t))),not:d(e=>!e),exists:e=>{const n=e.slice(1),t=n.pop(),r=_.get(...n);return o=>{const s=r(o);return!!s&&Object.hasOwnProperty.call(s,t)}},if:(e,n,t)=>{const r=g(e),o=g(n),s=g(t);return y=>D(r(y))?o(y):s(y)},in:(e,n)=>{const t=g(e),r=g(n);return o=>{const s=t(o);return r(o).findIndex(y=>E(y,s))!==-1}},"not in":(e,n)=>{const t=_.in(e,n);return r=>!t(r)},regex:(e,n,t)=>{const r=new RegExp(n,t),o=g(e);return s=>r.test(o(s))},match:(e,n,t)=>{const r=new RegExp(n,t),o=g(e);return s=>{const y=o(s).match(r);return y?H(y):null}},matchAll:(e,n,t)=>{const r=new RegExp(n,`${t??""}g`),o=g(e);return s=>Array.from(o(s).matchAll(r)).map(H)},eq:d(E),gt:d(L),gte:d(re),lt:d(Q),lte:d(oe),ne:d((e,n)=>!E(e,n)),add:d((e,n)=>e+n),subtract:d((e,n)=>e-n),multiply:d((e,n)=>e*n),divide:d((e,n)=>e/n),mod:d((e,n)=>e%n),pow:d((e,n)=>e**n),abs:d(Math.abs),round:d((e,n=0)=>+`${Math.round(+`${e}e${n}`)}e${-n}`),number:d(e=>{const n=Number(e);return Number.isNaN(Number(e))?null:n}),string:d(String)},D=e=>e!==null&&e!==0&&e!==!1,z=(e,n)=>(k(e)||K(),e.length===0?null:e.reduce(n)),H=e=>{const[n,...t]=e,r=e.groups;return t.length?r?{value:n,groups:t,namedGroups:r}:{value:n,groups:t}:{value:n}},K=()=>{P("Array expected")},P=e=>{throw new TypeError(e)},Z=[];function g(e,n){Z.unshift({..._,...Z[0]});try{const t=k(e)?se(e,Z[0]):ne(e)?P(`Function notation ["object", {...}] expected but got ${JSON.stringify(e)}`):()=>e;return r=>{try{return t(r)}catch(o){throw o.jsonquery=[{data:r,query:e},...o.jsonquery??[]],o}}}finally{Z.shift()}}function se(e,n){const[t,...r]=e,o=n[t];return o||P(`Unknown function '${t}'`),o(...r)}const W=[{pow:"^"},{multiply:"*",divide:"/",mod:"%"},{add:"+",subtract:"-"},{gt:">",gte:">=",lt:"<",lte:"<=",in:"in","not in":"not in"},{eq:"==",ne:"!="},{and:"and"},{or:"or"},{pipe:"|"}],ce=["|","and","or"],X=["|","and","or","*","/","%","+","-"];function Y(e,n){if(!k(n))throw new Error("Invalid custom operators");return n.reduce(ue,e)}function ue(e,{name:n,op:t,at:r,after:o,before:s}){if(r)return e.map(v=>Object.values(v).includes(r)?{...v,[n]:t}:v);const y=o??s,i=e.findIndex(v=>Object.values(v).includes(y));if(i!==-1)return e.toSpliced(i+(o?1:0),0,{[n]:t});throw new Error("Invalid custom operator")}const ie=/^[a-zA-Z_$][a-zA-Z\d_$]*$/,le=/^[a-zA-Z_$][a-zA-Z\d_$]*/,ae=/^"(?:[^"\\]|\\.)*"/,fe=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,pe=/^(0|[1-9][0-9]*)/,de=/^(true|false|null)/,ge=/^[ \n\t\r]+/;function ye(e,n){const t=[],r=Y(W,t),o=Object.assign({},...r),s=ce.concat(t.filter(c=>c.vararg).map(c=>c.op)),y=X.concat(t.filter(c=>c.leftAssociative).map(c=>c.op)),i=(c=r.length-1)=>{const p=r[c];if(!p)return I();const h=e[u]==="(";let m=i(c-1);for(;;){if(f(),e[u]==="."&&"pipe"in p){const C=A();m=m[0]==="pipe"?[...m,C]:["pipe",m,C];continue}const q=u,M=v(p);if(!M)break;const T=i(c-1),ee=m[0],V=M===ee&&!h;if(V&&!y.includes(o[M])){u=q;break}m=V&&s.includes(o[M])?[...m,T]:[M,m,T]}return m},v=c=>{const p=Object.keys(c).sort((h,m)=>m.length-h.length);for(const h of p){const m=c[h];if(e.substring(u,u+m.length)===m)return u+=m.length,f(),h}},I=()=>{if(f(),e[u]==="("){u++;const c=i();return O(")"),c}return A()},A=()=>{if(e[u]==="."){const c=[];for(;e[u]===".";)u++,c.push(l()??b()??j()??S("Property expected")),f();return["get",...c]}return R()},R=()=>{const c=u,p=b();if(f(),!p||e[u]!=="(")return u=c,J();u++,f();const h=e[u]!==")"?[i()]:[];for(;u<e.length&&e[u]!==")";)f(),O(","),h.push(i());return O(")"),[p,...h]},J=()=>{if(e[u]==="{"){u++,f();const c={};let p=!0;for(;u<e.length&&e[u]!=="}";){p?p=!1:(O(","),f());const h=l()??b()??j()??S("Key expected");f(),O(":"),c[h]=i()}return O("}"),["object",c]}return a()},a=()=>{if(e[u]==="["){u++,f();const c=[];let p=!0;for(;u<e.length&&e[u]!=="]";)p?p=!1:(O(","),f()),c.push(i());return O("]"),["array",...c]}return l()??$()??x()},l=()=>w(ae,JSON.parse),b=()=>w(le,c=>c),$=()=>w(fe,JSON.parse),j=()=>w(pe,JSON.parse),x=()=>{const c=w(de,JSON.parse);if(c!==void 0)return c;S("Value expected")},N=()=>{f(),u<e.length&&S(`Unexpected part '${e.substring(u)}'`)},w=(c,p)=>{const h=e.substring(u).match(c);if(h)return u+=h[0].length,p(h[0])},f=()=>w(ge,c=>c),O=c=>{e[u]!==c&&S(`Character '${c}' expected`),u++},S=(c,p=u)=>{throw new SyntaxError(`${c} (pos: ${p})`)};let u=0;const U=i();return N(),U}const he=40,me=" ",be=(e,n)=>{const t=me,r=[],o=Y(W,r),s=Object.assign({},...o),y=X.concat(r.filter(a=>a.leftAssociative).map(a=>a.op)),i=(a,l,b=!1)=>k(a)?v(a,l,b):JSON.stringify(a),v=(a,l,b)=>{const[$,...j]=a;if($==="get"&&j.length>0)return A(j);if($==="object")return I(j[0],l);if($==="array"){const f=j.map(O=>i(O,l));return J(f,["[",", ","]"],[`[
2
- ${l+t}`,`,
3
- ${l+t}`,`
4
- ${l}]`])}const x=s[$];if(x){const f=b?"(":"",O=b?")":"",S=j.map((u,U)=>{const c=u==null?void 0:u[0],p=o.findIndex(q=>$ in q),h=o.findIndex(q=>c in q),m=p<h||p===h&&U>0||$===c&&!y.includes(x);return i(u,l+t,m)});return J(S,[f,` ${x} `,O],[f,`
5
- ${l+t}${x} `,O])}const N=j.length===1?l:l+t,w=j.map(f=>i(f,N));return J(w,[`${$}(`,", ",")"],j.length===1?[`${$}(`,`,
6
- ${l}`,")"]:[`${$}(
7
- ${N}`,`,
8
- ${N}`,`
9
- ${l})`])},I=(a,l)=>{const b=l+t,$=Object.entries(a).map(([j,x])=>`${R(j)}: ${i(x,b)}`);return J($,["{ ",", "," }"],[`{
10
- ${b}`,`,
11
- ${b}`,`
12
- ${l}}`])},A=a=>a.map(l=>`.${R(l)}`).join(""),R=a=>ie.test(a)?a:JSON.stringify(a),J=(a,[l,b,$],[j,x,N])=>l.length+a.reduce((w,f)=>w+f.length+b.length,0)-b.length+$.length<=he?l+a.join(b)+$:j+a.join(x)+N;return i(e,"")};function $e(e,n,t){return g(te(n)?ye(n):n)(e)}export{be as O,$e as b,ye as m};
@@ -1 +0,0 @@
1
- let Ht=0;class Ot{constructor(t,e){this.from=t,this.to=e}}class O{constructor(t={}){this.id=Ht++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=t.combine||null}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof t!="function"&&(t=$.match(t)),e=>{let i=t(e);return i===void 0?null:[this,i]}}}O.closedBy=new O({deserialize:l=>l.split(" ")});O.openedBy=new O({deserialize:l=>l.split(" ")});O.group=new O({deserialize:l=>l.split(" ")});O.isolate=new O({deserialize:l=>{if(l&&l!="rtl"&&l!="ltr"&&l!="auto")throw new RangeError("Invalid value for isolate: "+l);return l||"auto"}});O.contextHash=new O({perNode:!0});O.lookAhead=new O({perNode:!0});O.mounted=new O({perNode:!0});class ht{constructor(t,e,i,s=!1){this.tree=t,this.overlay=e,this.parser=i,this.bracketed=s}static get(t){return t&&t.props&&t.props[O.mounted.id]}}const Jt=Object.create(null);class ${constructor(t,e,i,s=0){this.name=t,this.props=e,this.id=i,this.flags=s}static define(t){let e=t.props&&t.props.length?Object.create(null):Jt,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),s=new $(t.name||"",e,t.id,i);if(t.props){for(let r of t.props)if(Array.isArray(r)||(r=r(s)),r){if(r[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[r[0].id]=r[1]}}return s}prop(t){return this.props[t.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(t){if(typeof t=="string"){if(this.name==t)return!0;let e=this.prop(O.group);return e?e.indexOf(t)>-1:!1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let s of i.split(" "))e[s]=t[i];return i=>{for(let s=i.prop(O.group),r=-1;r<(s?s.length:0);r++){let n=e[r<0?i.name:s[r]];if(n)return n}}}}$.none=new $("",Object.create(null),0,8);class Tt{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let i of this.types){let s=null;for(let r of t){let n=r(i);if(n){s||(s=Object.assign({},i.props));let h=n[1],o=n[0];o.combine&&o.id in s&&(h=o.combine(s[o.id],h)),s[o.id]=h}}e.push(s?new $(i.name,s,i.id,i.flags):i)}return new Tt(e)}}const ut=new WeakMap,_t=new WeakMap;var T;(function(l){l[l.ExcludeBuffers=1]="ExcludeBuffers",l[l.IncludeAnonymous=2]="IncludeAnonymous",l[l.IgnoreMounts=4]="IgnoreMounts",l[l.IgnoreOverlays=8]="IgnoreOverlays",l[l.EnterBracketed=16]="EnterBracketed"})(T||(T={}));class B{constructor(t,e,i,s,r){if(this.type=t,this.children=e,this.positions=i,this.length=s,this.props=null,r&&r.length){this.props=Object.create(null);for(let[n,h]of r)this.props[typeof n=="number"?n:n.id]=h}}toString(){let t=ht.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let i of this.children){let s=i.toString();s&&(e&&(e+=","),e+=s)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new Ct(this.topNode,t)}cursorAt(t,e=0,i=0){let s=ut.get(this)||this.topNode,r=new Ct(s);return r.moveTo(t,e),ut.set(this,r._tree),r}get topNode(){return new M(this,0,0,null)}resolve(t,e=0){let i=lt(ut.get(this)||this.topNode,t,e,!1);return ut.set(this,i),i}resolveInner(t,e=0){let i=lt(_t.get(this)||this.topNode,t,e,!0);return _t.set(this,i),i}resolveStack(t,e=0){return ee(this,t,e)}iterate(t){let{enter:e,leave:i,from:s=0,to:r=this.length}=t,n=t.mode||0,h=(n&T.IncludeAnonymous)>0;for(let o=this.cursor(n|T.IncludeAnonymous);;){let a=!1;if(o.from<=r&&o.to>=s&&(!h&&o.type.isAnonymous||e(o)!==!1)){if(o.firstChild())continue;a=!0}for(;a&&i&&(h||!o.type.isAnonymous)&&i(o),!o.nextSibling();){if(!o.parent())return;a=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:Bt($.none,this.children,this.positions,0,this.children.length,0,this.length,(e,i,s)=>new B(this.type,e,i,s,this.propValues),t.makeTree||((e,i,s)=>new B($.none,e,i,s)))}static build(t){return ie(t)}}B.empty=new B($.none,[],[],0);class Rt{constructor(t,e){this.buffer=t,this.index=e}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 Rt(this.buffer,this.index)}}class J{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return $.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],i=this.buffer[t+3],s=this.set.types[e],r=s.name;if(/\W/.test(r)&&!s.isError&&(r=JSON.stringify(r)),t+=4,i==t)return r;let n=[];for(;t<i;)n.push(this.childString(t)),t=this.buffer[t+3];return r+"("+n.join(",")+")"}findChild(t,e,i,s,r){let{buffer:n}=this,h=-1;for(let o=t;o!=e&&!(Xt(r,s,n[o+1],n[o+2])&&(h=o,i>0));o=n[o+3]);return h}slice(t,e,i){let s=this.buffer,r=new Uint16Array(e-t),n=0;for(let h=t,o=0;h<e;){r[o++]=s[h++],r[o++]=s[h++]-i;let a=r[o++]=s[h++]-i;r[o++]=s[h++]-t,n=Math.max(n,a)}return new J(r,n,this.set)}}function Xt(l,t,e,i){switch(l){case-2:return e<t;case-1:return i>=t&&e<t;case 0:return e<t&&i>t;case 1:return e<=t&&i>t;case 2:return i>t;case 4:return!0}}function lt(l,t,e,i){for(var s;l.from==l.to||(e<1?l.from>=t:l.from>t)||(e>-1?l.to<=t:l.to<t);){let n=!i&&l instanceof M&&l.index<0?null:l.parent;if(!n)return l;l=n}let r=i?0:T.IgnoreOverlays;if(i)for(let n=l,h=n.parent;h;n=h,h=n.parent)n instanceof M&&n.index<0&&((s=h.enter(t,e,r))===null||s===void 0?void 0:s.from)!=n.from&&(l=h);for(;;){let n=l.enter(t,e,r);if(!n)return l;l=n}}class Yt{cursor(t=0){return new Ct(this,t)}getChild(t,e=null,i=null){let s=Et(this,t,e,i);return s.length?s[0]:null}getChildren(t,e=null,i=null){return Et(this,t,e,i)}resolve(t,e=0){return lt(this,t,e,!1)}resolveInner(t,e=0){return lt(this,t,e,!0)}matchContext(t){return vt(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),i=this;for(;e;){let s=e.lastChild;if(!s||s.to!=e.to)break;s.type.isError&&s.from==s.to?(i=e,e=s.prevSibling):e=s}return i}get node(){return this}get next(){return this.parent}}class M extends Yt{constructor(t,e,i,s){super(),this._tree=t,this.from=e,this.index=i,this._parent=s}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,i,s,r=0){var n;for(let h=this;;){for(let{children:o,positions:a}=h._tree,p=e>0?o.length:-1;t!=p;t+=e){let f=o[t],c=a[t]+h.from;if(!(!(r&T.EnterBracketed&&f instanceof B&&((n=ht.get(f))===null||n===void 0?void 0:n.overlay)===null&&(c>=i||c+f.length<=i))&&!Xt(s,i,c,c+f.length))){if(f instanceof J){if(r&T.ExcludeBuffers)continue;let d=f.findChild(0,f.buffer.length,e,i-c,s);if(d>-1)return new H(new Kt(h,f,t,c),null,d)}else if(r&T.IncludeAnonymous||!f.type.isAnonymous||zt(f)){let d;if(!(r&T.IgnoreMounts)&&(d=ht.get(f))&&!d.overlay)return new M(d.tree,c,t,h);let x=new M(f,c,t,h);return r&T.IncludeAnonymous||!x.type.isAnonymous?x:x.nextChild(e<0?f.children.length-1:0,e,i,s,r)}}}if(r&T.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?t=h.index+e:t=e<0?-1:h._parent._tree.children.length,h=h._parent,!h))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(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}prop(t){return this._tree.prop(t)}enter(t,e,i=0){let s;if(!(i&T.IgnoreOverlays)&&(s=ht.get(this._tree))&&s.overlay){let r=t-this.from,n=i&T.EnterBracketed&&s.bracketed;for(let{from:h,to:o}of s.overlay)if((e>0||n?h<=r:h<r)&&(e<0||n?o>=r:o>r))return new M(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}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 Et(l,t,e,i){let s=l.cursor(),r=[];if(!s.firstChild())return r;if(e!=null){for(let n=!1;!n;)if(n=s.type.is(e),!s.nextSibling())return r}for(;;){if(i!=null&&s.type.is(i))return r;if(s.type.is(t)&&r.push(s.node),!s.nextSibling())return i==null?r:[]}}function vt(l,t,e=t.length-1){for(let i=l;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[e]&&t[e]!=i.name)return!1;e--}}return!0}class Kt{constructor(t,e,i,s){this.parent=t,this.buffer=e,this.index=i,this.start=s}}class H extends Yt{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(t,e,i){super(),this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,e,i){let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t,e-this.context.start,i);return r<0?null:new H(this.context,this,r)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}prop(t){return this.type.prop(t)}enter(t,e,i=0){if(i&T.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return r<0?null:new H(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new H(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new H(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,s=this.index+4,r=i.buffer[this.index+3];if(r>s){let n=i.buffer[this.index+1];t.push(i.slice(s,r,n)),e.push(0)}return new B(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ut(l){if(!l.length)return null;let t=0,e=l[0];for(let r=1;r<l.length;r++){let n=l[r];(n.from>e.from||n.to<e.to)&&(e=n,t=r)}let i=e instanceof M&&e.index<0?null:e.parent,s=l.slice();return i?s[t]=i:s.splice(t,1),new te(s,e)}class te{constructor(t,e){this.heads=t,this.node=e}get next(){return Ut(this.heads)}}function ee(l,t,e){let i=l.resolveInner(t,e),s=null;for(let r=i instanceof M?i:i.context.parent;r;r=r.parent)if(r.index<0){let n=r.parent;(s||(s=[i])).push(n.resolve(t,e)),r=n}else{let n=ht.get(r.tree);if(n&&n.overlay&&n.overlay[0].from<=t&&n.overlay[n.overlay.length-1].to>=t){let h=new M(n.tree,n.overlay[0].from+r.from,-1,r);(s||(s=[i])).push(lt(h,t,e,!1))}}return s?Ut(s):i}class Ct{get name(){return this.type.name}constructor(t,e=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=e&~T.EnterBracketed,t instanceof M)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let i=t._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return t?(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0):!1}yieldBuf(t,e){this.index=t;let{start:i,buffer:s}=this.buffer;return this.type=e||s.set.types[s.buffer[t]],this.from=i+s.buffer[t+1],this.to=i+s.buffer[t+2],!0}yield(t){return t?t instanceof M?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,i,this.mode));let{buffer:s}=this.buffer,r=s.findChild(this.index+4,s.buffer[this.index+3],t,e-this.buffer.start,i);return r<0?!1:(this.stack.push(this.index),this.yieldBuf(r))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=this.mode){return this.buffer?i&T.ExcludeBuffers?!1:this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&T.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&T.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode)):!1;let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let s=i<0?0:this.stack[i]+4;if(this.index!=s)return this.yieldBuf(e.findChild(s,this.index,-1,0,4))}else{let s=e.buffer[this.index+3];if(s<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(s)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:s}=this;if(s){if(t>0){if(this.index<s.buffer.buffer.length)return!1}else for(let r=0;r<this.index;r++)if(s.buffer.buffer[r+3]<this.index)return!1;({index:e,parent:i}=s)}else({index:e,_parent:i}=this._tree);for(;i;{index:e,_parent:i}=i)if(e>-1)for(let r=e+t,n=t<0?-1:i._tree.children.length;r!=n;r+=t){let h=i._tree.children[r];if(this.mode&T.IncludeAnonymous||h instanceof J||!h.type.isAnonymous||zt(h))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,i=0;if(t&&t.context==this.buffer)t:for(let s=this.index,r=this.stack.length;r>=0;){for(let n=t;n;n=n._parent)if(n.index==s){if(s==this.index)return n;e=n,i=r+1;break t}s=this.stack[--r]}for(let s=i;s<this.stack.length;s++)e=new H(this.buffer,e,this.stack[s]);return this.bufferNode=new H(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let i=0;;){let s=!1;if(this.type.isAnonymous||t(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(s=!0)}for(;;){if(s&&e&&e(this),s=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,s=!0}}}matchContext(t){if(!this.buffer)return vt(this.node.parent,t);let{buffer:e}=this.buffer,{types:i}=e.set;for(let s=t.length-1,r=this.stack.length-1;s>=0;r--){if(r<0)return vt(this._tree,t,s);let n=i[e.buffer[this.stack[r]]];if(!n.isAnonymous){if(t[s]&&t[s]!=n.name)return!1;s--}}return!0}}function zt(l){return l.children.some(t=>t instanceof J||!t.type.isAnonymous||zt(t))}function ie(l){var t;let{buffer:e,nodeSet:i,maxBufferLength:s=1024,reused:r=[],minRepeatType:n=i.types.length}=l,h=Array.isArray(e)?new Rt(e,e.length):e,o=i.types,a=0,p=0;function f(y,P,g,C,w,A){let{id:b,start:k,end:S,size:v}=h,R=p,Y=a;if(v<0)if(h.next(),v==-1){let Z=r[b];g.push(Z),C.push(k-y);return}else if(v==-3){a=b;return}else if(v==-4){p=b;return}else throw new RangeError(`Unrecognized record size: ${v}`);let rt=o[b],at,K,It=k-y;if(S-k<=s&&(K=_(h.pos-P,w))){let Z=new Uint16Array(K.size-K.skip),E=h.pos-K.size,L=Z.length;for(;h.pos>E;)L=j(K.start,Z,L);at=new J(Z,S-K.start,i),It=K.start-y}else{let Z=h.pos-v;h.next();let E=[],L=[],tt=b>=n?b:-1,it=0,ft=S;for(;h.pos>Z;)tt>=0&&h.id==tt&&h.size>=0?(h.end<=ft-s&&(x(E,L,k,it,h.end,ft,tt,R,Y),it=E.length,ft=h.end),h.next()):A>2500?c(k,Z,E,L):f(k,Z,E,L,tt,A+1);if(tt>=0&&it>0&&it<E.length&&x(E,L,k,it,k,ft,tt,R,Y),E.reverse(),L.reverse(),tt>-1&&it>0){let Qt=d(rt,Y);at=Bt(rt,E,L,0,E.length,0,S-k,Qt,Qt)}else at=z(rt,E,L,S-k,R-S,Y)}g.push(at),C.push(It)}function c(y,P,g,C){let w=[],A=0,b=-1;for(;h.pos>P;){let{id:k,start:S,end:v,size:R}=h;if(R>4)h.next();else{if(b>-1&&S<b)break;b<0&&(b=v-s),w.push(k,S,v),A++,h.next()}}if(A){let k=new Uint16Array(A*4),S=w[w.length-2];for(let v=w.length-3,R=0;v>=0;v-=3)k[R++]=w[v],k[R++]=w[v+1]-S,k[R++]=w[v+2]-S,k[R++]=R;g.push(new J(k,w[2]-S,i)),C.push(S-y)}}function d(y,P){return(g,C,w)=>{let A=0,b=g.length-1,k,S;if(b>=0&&(k=g[b])instanceof B){if(!b&&k.type==y&&k.length==w)return k;(S=k.prop(O.lookAhead))&&(A=C[b]+k.length+S)}return z(y,g,C,w,A,P)}}function x(y,P,g,C,w,A,b,k,S){let v=[],R=[];for(;y.length>C;)v.push(y.pop()),R.push(P.pop()+g-w);y.push(z(i.types[b],v,R,A-w,k-A,S)),P.push(w-g)}function z(y,P,g,C,w,A,b){if(A){let k=[O.contextHash,A];b=b?[k].concat(b):[k]}if(w>25){let k=[O.lookAhead,w];b=b?[k].concat(b):[k]}return new B(y,P,g,C,b)}function _(y,P){let g=h.fork(),C=0,w=0,A=0,b=g.end-s,k={size:0,start:0,skip:0};t:for(let S=g.pos-y;g.pos>S;){let v=g.size;if(g.id==P&&v>=0){k.size=C,k.start=w,k.skip=A,A+=4,C+=4,g.next();continue}let R=g.pos-v;if(v<0||R<S||g.start<b)break;let Y=g.id>=n?4:0,rt=g.start;for(g.next();g.pos>R;){if(g.size<0)if(g.size==-3||g.size==-4)Y+=4;else break t;else g.id>=n&&(Y+=4);g.next()}w=rt,C+=v,A+=Y}return(P<0||C==y)&&(k.size=C,k.start=w,k.skip=A),k.size>4?k:void 0}function j(y,P,g){let{id:C,start:w,end:A,size:b}=h;if(h.next(),b>=0&&C<n){let k=g;if(b>4){let S=h.pos-(b-4);for(;h.pos>S;)g=j(y,P,g)}P[--g]=k,P[--g]=A-y,P[--g]=w-y,P[--g]=C}else b==-3?a=C:b==-4&&(p=C);return g}let I=[],N=[];for(;h.pos>0;)f(l.start||0,l.bufferStart||0,I,N,-1,0);let F=(t=l.length)!==null&&t!==void 0?t:I.length?N[0]+I[0].length:0;return new B(o[l.topID],I.reverse(),N.reverse(),F)}const Dt=new WeakMap;function mt(l,t){if(!l.isAnonymous||t instanceof J||t.type!=l)return 1;let e=Dt.get(t);if(e==null){e=1;for(let i of t.children){if(i.type!=l||!(i instanceof B)){e=1;break}e+=mt(l,i)}Dt.set(t,e)}return e}function Bt(l,t,e,i,s,r,n,h,o){let a=0;for(let x=i;x<s;x++)a+=mt(l,t[x]);let p=Math.ceil(a*1.5/8),f=[],c=[];function d(x,z,_,j,I){for(let N=_;N<j;){let F=N,y=z[N],P=mt(l,x[N]);for(N++;N<j;N++){let g=mt(l,x[N]);if(P+g>=p)break;P+=g}if(N==F+1){if(P>p){let g=x[F];d(g.children,g.positions,0,g.children.length,z[F]+I);continue}f.push(x[F])}else{let g=z[N-1]+x[N-1].length-y;f.push(Bt(l,x,z,F,N,y,g,null,o))}c.push(y+I-r)}}return d(t,e,i,s,0),(h||o)(f,c,n)}class At{constructor(t,e,i,s,r=!1,n=!1){this.from=t,this.to=e,this.tree=i,this.offset=s,this.open=(r?1:0)|(n?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,e=[],i=!1){let s=[new At(0,t.length,t,0,!1,i)];for(let r of e)r.to>t.length&&s.push(r);return s}static applyChanges(t,e,i=128){if(!e.length)return t;let s=[],r=1,n=t.length?t[0]:null;for(let h=0,o=0,a=0;;h++){let p=h<e.length?e[h]:null,f=p?p.fromA:1e9;if(f-o>=i)for(;n&&n.from<f;){let c=n;if(o>=c.from||f<=c.to||a){let d=Math.max(c.from,o)-a,x=Math.min(c.to,f)-a;c=d>=x?null:new At(d,x,c.tree,c.offset+a,h>0,!!p)}if(c&&s.push(c),n.to>f)break;n=r<t.length?t[r++]:null}if(!p)break;o=p.toA,a=p.toA-p.toB}return s}}class se{startParse(t,e,i){return typeof t=="string"&&(t=new re(t)),i=i?i.length?i.map(s=>new Ot(s.from,s.to)):[new Ot(0,0)]:[new Ot(0,t.length)],this.createParse(t,e||[],i)}parse(t,e,i){let s=this.startParse(t,e,i);for(;;){let r=s.advance();if(r)return r}}}class re{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}new O({perNode:!0});let ne=0;class D{constructor(t,e,i,s){this.name=t,this.set=e,this.base=i,this.modified=s,this.id=ne++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let i=typeof t=="string"?t:"?";if(t instanceof D&&(e=t),e!=null&&e.base)throw new Error("Can not derive from a modified tag");let s=new D(i,[],null,[]);if(s.set.push(s),e)for(let r of e.set)s.set.push(r);return s}static defineModifier(t){let e=new xt(t);return i=>i.modified.indexOf(e)>-1?i:xt.get(i.base||i,i.modified.concat(e).sort((s,r)=>s.id-r.id))}}let he=0;class xt{constructor(t){this.name=t,this.instances=[],this.id=he++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find(h=>h.base==t&&le(e,h.modified));if(i)return i;let s=[],r=new D(t.name,s,t,e);for(let h of e)h.instances.push(r);let n=oe(e);for(let h of t.set)if(!h.modified.length)for(let o of n)s.push(xt.get(h,o));return r}}function le(l,t){return l.length==t.length&&l.every((e,i)=>e==t[i])}function oe(l){let t=[[]];for(let e=0;e<l.length;e++)for(let i=0,s=t.length;i<s;i++)t.push(t[i].concat(l[e]));return t.sort((e,i)=>i.length-e.length)}function ae(l){let t=Object.create(null);for(let e in l){let i=l[e];Array.isArray(i)||(i=[i]);for(let s of e.split(" "))if(s){let r=[],n=2,h=s;for(let f=0;;){if(h=="..."&&f>0&&f+3==s.length){n=1;break}let c=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(h);if(!c)throw new RangeError("Invalid path: "+s);if(r.push(c[0]=="*"?"":c[0][0]=='"'?JSON.parse(c[0]):c[0]),f+=c[0].length,f==s.length)break;let d=s[f++];if(f==s.length&&d=="!"){n=0;break}if(d!="/")throw new RangeError("Invalid path: "+s);h=s.slice(f)}let o=r.length-1,a=r[o];if(!a)throw new RangeError("Invalid path: "+s);let p=new ot(i,n,o>0?r.slice(0,o):null);t[a]=p.sort(t[a])}}return qt.add(t)}const qt=new O({combine(l,t){let e,i,s;for(;l||t;){if(!l||t&&l.depth>=t.depth?(s=t,t=t.next):(s=l,l=l.next),e&&e.mode==s.mode&&!s.context&&!e.context)continue;let r=new ot(s.tags,s.mode,s.context);e?e.next=r:i=r,e=r}return i}});class ot{constructor(t,e,i,s){this.tags=t,this.mode=e,this.context=i,this.next=s}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}ot.empty=new ot([],2,null);function fe(l,t){let e=Object.create(null);for(let r of l)if(!Array.isArray(r.tag))e[r.tag.id]=r.class;else for(let n of r.tag)e[n.id]=r.class;let{scope:i,all:s=null}=t||{};return{style:r=>{let n=s;for(let h of r)for(let o of h.set){let a=e[o.id];if(a){n=n?n+" "+a:a;break}}return n},scope:i}}function ue(l,t){let e=null;for(let i of l){let s=i.style(t);s&&(e=e?e+" "+s:s)}return e}function Pe(l,t,e,i=0,s=l.length){let r=new ce(i,Array.isArray(t)?t:[t],e);r.highlightRange(l.cursor(),i,s,"",r.highlighters),r.flush(s)}class ce{constructor(t,e,i){this.at=t,this.highlighters=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,s,r){let{type:n,from:h,to:o}=t;if(h>=i||o<=e)return;n.isTop&&(r=this.highlighters.filter(d=>!d.scope||d.scope(n)));let a=s,p=pe(t)||ot.empty,f=ue(r,p.tags);if(f&&(a&&(a+=" "),a+=f,p.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(e,h),a),p.opaque)return;let c=t.tree&&t.tree.prop(O.mounted);if(c&&c.overlay){let d=t.node.enter(c.overlay[0].from+h,1),x=this.highlighters.filter(_=>!_.scope||_.scope(c.tree.type)),z=t.firstChild();for(let _=0,j=h;;_++){let I=_<c.overlay.length?c.overlay[_]:null,N=I?I.from+h:o,F=Math.max(e,j),y=Math.min(i,N);if(F<y&&z)for(;t.from<y&&(this.highlightRange(t,F,y,s,r),this.startSpan(Math.min(y,t.to),a),!(t.to>=N||!t.nextSibling())););if(!I||N>i)break;j=I.to+h,j>e&&(this.highlightRange(d.cursor(),Math.max(e,I.from+h),Math.min(i,j),"",x),this.startSpan(Math.min(i,j),a))}z&&t.parent()}else if(t.firstChild()){c&&(s="");do if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,s,r),this.startSpan(Math.min(i,t.to),a)}while(t.nextSibling());t.parent()}}}function pe(l){let t=l.type.prop(qt);for(;t&&t.context&&!l.matchContext(t.context);)t=t.next;return t||null}const u=D.define,ct=u(),U=u(),Mt=u(U),jt=u(U),q=u(),pt=u(q),St=u(q),G=u(),et=u(G),W=u(),V=u(),Nt=u(),nt=u(Nt),dt=u(),m={comment:ct,lineComment:u(ct),blockComment:u(ct),docComment:u(ct),name:U,variableName:u(U),typeName:Mt,tagName:u(Mt),propertyName:jt,attributeName:u(jt),className:u(U),labelName:u(U),namespace:u(U),macroName:u(U),literal:q,string:pt,docString:u(pt),character:u(pt),attributeValue:u(pt),number:St,integer:u(St),float:u(St),bool:u(q),regexp:u(q),escape:u(q),color:u(q),url:u(q),keyword:W,self:u(W),null:u(W),atom:u(W),unit:u(W),modifier:u(W),operatorKeyword:u(W),controlKeyword:u(W),definitionKeyword:u(W),moduleKeyword:u(W),operator:V,derefOperator:u(V),arithmeticOperator:u(V),logicOperator:u(V),bitwiseOperator:u(V),compareOperator:u(V),updateOperator:u(V),definitionOperator:u(V),typeOperator:u(V),controlOperator:u(V),punctuation:Nt,separator:u(Nt),bracket:nt,angleBracket:u(nt),squareBracket:u(nt),paren:u(nt),brace:u(nt),content:G,heading:et,heading1:u(et),heading2:u(et),heading3:u(et),heading4:u(et),heading5:u(et),heading6:u(et),contentSeparator:u(G),list:u(G),quote:u(G),emphasis:u(G),strong:u(G),link:u(G),monospace:u(G),strikethrough:u(G),inserted:u(),deleted:u(),changed:u(),invalid:u(),meta:dt,documentMeta:u(dt),annotation:u(dt),processingInstruction:u(dt),definition:D.defineModifier("definition"),constant:D.defineModifier("constant"),function:D.defineModifier("function"),standard:D.defineModifier("standard"),local:D.defineModifier("local"),special:D.defineModifier("special")};for(let l in m){let t=m[l];t instanceof D&&(t.name=l)}fe([{tag:m.link,class:"tok-link"},{tag:m.heading,class:"tok-heading"},{tag:m.emphasis,class:"tok-emphasis"},{tag:m.strong,class:"tok-strong"},{tag:m.keyword,class:"tok-keyword"},{tag:m.atom,class:"tok-atom"},{tag:m.bool,class:"tok-bool"},{tag:m.url,class:"tok-url"},{tag:m.labelName,class:"tok-labelName"},{tag:m.inserted,class:"tok-inserted"},{tag:m.deleted,class:"tok-deleted"},{tag:m.literal,class:"tok-literal"},{tag:m.string,class:"tok-string"},{tag:m.number,class:"tok-number"},{tag:[m.regexp,m.escape,m.special(m.string)],class:"tok-string2"},{tag:m.variableName,class:"tok-variableName"},{tag:m.local(m.variableName),class:"tok-variableName tok-local"},{tag:m.definition(m.variableName),class:"tok-variableName tok-definition"},{tag:m.special(m.variableName),class:"tok-variableName2"},{tag:m.definition(m.propertyName),class:"tok-propertyName tok-definition"},{tag:m.typeName,class:"tok-typeName"},{tag:m.namespace,class:"tok-namespace"},{tag:m.className,class:"tok-className"},{tag:m.macroName,class:"tok-macroName"},{tag:m.propertyName,class:"tok-propertyName"},{tag:m.operator,class:"tok-operator"},{tag:m.comment,class:"tok-comment"},{tag:m.meta,class:"tok-meta"},{tag:m.invalid,class:"tok-invalid"},{tag:m.punctuation,class:"tok-punctuation"}]);var $t={};class bt{constructor(t,e,i,s,r,n,h,o,a,p=0,f){this.p=t,this.stack=e,this.state=i,this.reducePos=s,this.pos=r,this.score=n,this.buffer=h,this.bufferBase=o,this.curContext=a,this.lookAhead=p,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let s=t.parser.context;return new bt(t,[],e,i,i,0,[],0,s?new Ft(s,s.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let i=t>>19,s=t&65535,{parser:r}=this.p,n=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),h=r.dynamicPrecedence(s);if(h&&(this.score+=h),i==0){this.pushState(r.getGoto(this.state,s,!0),this.reducePos),s<r.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,n?8:4,!0),this.reduceContext(s,this.reducePos);return}let o=this.stack.length-(i-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,p=this.reducePos-a;p>=2e3&&!(!((e=this.p.parser.nodeSet.types[s])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=p):this.p.lastBigReductionSize<p&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=p));let f=o?this.stack[o-1]:0,c=this.bufferBase+this.buffer.length-f;if(s<r.minRepeatTerm||t&131072){let d=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,a,d,c+4,!0)}if(t&262144)this.state=this.stack[o];else{let d=this.stack[o-3];this.state=r.getGoto(d,s,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(s,a)}storeNode(t,e,i,s=4,r=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let n=this,h=this.buffer.length;if(h==0&&n.parent&&(h=n.bufferBase-n.parent.bufferBase,n=n.parent),h>0&&n.buffer[h-4]==0&&n.buffer[h-1]>-1){if(e==i)return;if(n.buffer[h-2]>=e){n.buffer[h-2]=i;return}}}if(!r||this.pos==i)this.buffer.push(t,e,i,s);else{let n=this.buffer.length;if(n>0&&(this.buffer[n-4]!=0||this.buffer[n-1]<0)){let h=!1;for(let o=n;o>0&&this.buffer[o-2]>i;o-=4)if(this.buffer[o-1]>=0){h=!0;break}if(h)for(;n>0&&this.buffer[n-2]>i;)this.buffer[n]=this.buffer[n-4],this.buffer[n+1]=this.buffer[n-3],this.buffer[n+2]=this.buffer[n-2],this.buffer[n+3]=this.buffer[n-1],n-=4,s>4&&(s-=4)}this.buffer[n]=t,this.buffer[n+1]=e,this.buffer[n+2]=i,this.buffer[n+3]=s}}shift(t,e,i,s){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let r=t,{parser:n}=this.p;this.pos=s,!n.stateFlag(r,1)&&(s>i||e<=n.maxNode)&&(this.reducePos=s),this.pushState(r,Math.min(i,this.reducePos)),this.shiftContext(e,i),e<=n.maxNode&&this.buffer.push(e,i,s,4)}else this.pos=s,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,s,4)}apply(t,e,i,s){t&65536?this.reduce(t):this.shift(t,e,i,s)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let s=this.pos;this.reducePos=this.pos=s+t.length,this.pushState(e,s),this.buffer.push(i,s,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),s=t.bufferBase+e;for(;t&&s==t.bufferBase;)t=t.parent;return new bt(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,s,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new de(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(i==0)return!1;if((i&65536)==0)return!0;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let s=[];for(let r=0,n;r<e.length;r+=2)(n=e[r+1])!=this.state&&this.p.parser.hasAction(n,t)&&s.push(e[r],n);if(this.stack.length<120)for(let r=0;s.length<8&&r<e.length;r+=2){let n=e[r+1];s.some((h,o)=>o&1&&h==n)||s.push(e[r],n)}e=s}let i=[];for(let s=0;s<e.length&&i.length<4;s+=2){let r=e[s+1];if(r==this.state)continue;let n=this.split();n.pushState(r,this.pos),n.storeNode(0,n.pos,n.pos,4,!0),n.shiftContext(e[s],this.pos),n.reducePos=this.pos,n.score-=200,i.push(n)}return i}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let i=e>>19,s=e&65535,r=this.stack.length-i*3;if(r<0||t.getGoto(this.stack[r],s,!1)<0){let n=this.findForcedReduction();if(n==null)return!1;e=n}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],i=(s,r)=>{if(!e.includes(s))return e.push(s),t.allActions(s,n=>{if(!(n&393216))if(n&65536){let h=(n>>19)-r;if(h>1){let o=n&65535,a=this.stack.length-h*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return h<<19|65536|o}}else{let h=i(n,r+1);if(h!=null)return h}})};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:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new Ft(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ft{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class de{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,i=t>>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 s=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=s}}class yt{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new yt(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.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 yt(this.stack,this.pos,this.index)}}function gt(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let i=0,s=0;i<l.length;){let r=0;for(;;){let n=l.charCodeAt(i++),h=!1;if(n==126){r=65535;break}n>=92&&n--,n>=34&&n--;let o=n-32;if(o>=46&&(o-=46,h=!0),r+=o,h)break;r*=46}e?e[s++]=r:e=new t(r)}return e}class kt{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Lt=new kt;class ge{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Lt,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,s=this.rangeIndex,r=this.pos+t;for(;r<i.from;){if(!s)return null;let n=this.ranges[--s];r-=i.from-n.to,i=n}for(;e<0?r>i.to:r>=i.to;){if(s==this.ranges.length-1)return null;let n=this.ranges[++s];r+=n.from-i.to,i=n}return r}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,i,s;if(e>=0&&e<this.chunk.length)i=this.pos+t,s=this.chunk.charCodeAt(e);else{let r=this.resolveOffset(t,1);if(r==null)return-1;if(i=r,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let n=this.rangeIndex,h=this.range;for(;h.to<=i;)h=this.ranges[++n];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>h.to&&(this.chunk2=this.chunk2.slice(0,h.to-i)),s=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),s}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=i}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,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(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,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(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=Lt,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let s of this.ranges){if(s.from>=e)break;s.to>t&&(i+=this.input.read(Math.max(s.from,t),Math.min(s.to,e)))}return i}}class st{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:i}=e.p;me(this.data,t,e,this.id,i.data,i.tokenPrecTable)}}st.prototype.contextual=st.prototype.fallback=st.prototype.extend=!1;st.prototype.fallback=st.prototype.extend=!1;function me(l,t,e,i,s,r){let n=0,h=1<<i,{dialect:o}=e.p.parser;t:for(;(h&l[n])!=0;){let a=l[n+1];for(let d=n+3;d<a;d+=2)if((l[d+1]&h)>0){let x=l[d];if(o.allows(x)&&(t.token.value==-1||t.token.value==x||ke(x,t.token.value,s,r))){t.acceptToken(x);break}}let p=t.next,f=0,c=l[n+2];if(t.next<0&&c>f&&l[a+c*3-3]==65535){n=l[a+c*3-1];continue t}for(;f<c;){let d=f+c>>1,x=a+d+(d<<1),z=l[x],_=l[x+1]||65536;if(p<z)c=d;else if(p>=_)f=d+1;else{n=l[x+2],t.advance();continue t}}break}}function Wt(l,t,e){for(let i=t,s;(s=l[i])!=65535;i++)if(s==e)return i-t;return-1}function ke(l,t,e,i){let s=Wt(e,i,t);return s<0||Wt(e,i,l)<s}const Q=typeof process<"u"&&$t&&/\bparse\b/.test($t.LOG);let Pt=null;function Vt(l,t,e){let i=l.cursor(T.IncludeAnonymous);for(i.moveTo(t);;)if(!(e<0?i.childBefore(t):i.childAfter(t)))for(;;){if((e<0?i.to<t:i.from>t)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(l.length,Math.max(i.from+1,t+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:l.length}}class xe{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?Vt(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?Vt(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let i=this.trees[e],s=this.index[e];if(s==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let r=i.children[s],n=this.start[e]+i.positions[s];if(n>t)return this.nextStart=n,null;if(r instanceof B){if(n==t){if(n<this.safeFrom)return null;let h=n+r.length;if(h<=this.safeTo){let o=r.prop(O.lookAhead);if(!o||h+o<this.fragment.to)return r}}this.index[e]++,n+r.length>=Math.max(this.safeFrom,t)&&(this.trees.push(r),this.start.push(n),this.index.push(0))}else this.index[e]++,this.nextStart=n+r.length}}}class be{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(i=>new kt)}getActions(t){let e=0,i=null,{parser:s}=t.p,{tokenizers:r}=s,n=s.stateSlot(t.state,3),h=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<r.length;a++){if((1<<a&n)==0)continue;let p=r[a],f=this.tokens[a];if(!(i&&!p.fallback)&&((p.contextual||f.start!=t.pos||f.mask!=n||f.context!=h)&&(this.updateCachedToken(f,p,t),f.mask=n,f.context=h),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let c=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!p.extend&&(i=f,e>c))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!i&&t.pos==this.stream.end&&(i=new kt,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new kt,{pos:i,p:s}=t;return e.start=i,e.end=Math.min(i+1,s.stream.end),e.value=i==s.stream.end?s.parser.eofTerm:0,e}updateCachedToken(t,e,i){let s=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(s,t),i),t.value>-1){let{parser:r}=i.p;for(let n=0;n<r.specialized.length;n++)if(r.specialized[n]==t.value){let h=r.specializers[n](this.stream.read(t.start,t.end),i);if(h>=0&&i.p.parser.dialect.allows(h>>1)){(h&1)==0?t.value=h>>1:t.extended=h>>1;break}}}else t.value=0,t.end=this.stream.clipPos(s+1)}putAction(t,e,i,s){for(let r=0;r<s;r+=3)if(this.actions[r]==t)return s;return this.actions[s++]=t,this.actions[s++]=e,this.actions[s++]=i,s}addActions(t,e,i,s){let{state:r}=t,{parser:n}=t.p,{data:h}=n;for(let o=0;o<2;o++)for(let a=n.stateSlot(r,o?2:1);;a+=3){if(h[a]==65535)if(h[a+1]==1)a=X(h,a+2);else{s==0&&h[a+1]==2&&(s=this.putAction(X(h,a+2),e,i,s));break}h[a]==e&&(s=this.putAction(X(h,a+1),e,i,s))}return s}}class ye{constructor(t,e,i,s){this.parser=t,this.input=e,this.ranges=s,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 ge(e,s),this.tokens=new be(t,this.stream),this.topTerm=t.top[1];let{from:r}=s[0];this.stacks=[bt.start(this,t.top[0],r)],this.fragments=i.length&&this.stream.end-r>t.bufferLength*4?new xe(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,i=this.stacks=[],s,r;if(this.bigReductionCount>300&&t.length==1){let[n]=t;for(;n.forceReduce()&&n.stack.length&&n.stack[n.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let n=0;n<t.length;n++){let h=t[n];for(;;){if(this.tokens.mainToken=null,h.pos>e)i.push(h);else{if(this.advanceStack(h,i,t))continue;{s||(s=[],r=[]),s.push(h);let o=this.tokens.getMainToken(h);r.push(o.value,o.end)}}break}}if(!i.length){let n=s&&Oe(s);if(n)return Q&&console.log("Finish with "+this.stackID(n)),this.stackToTree(n);if(this.parser.strict)throw Q&&s&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&s){let n=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,r,i);if(n)return Q&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let n=this.recovering==1?1:this.recovering*3;if(i.length>n)for(i.sort((h,o)=>o.score-h.score);i.length>n;)i.pop();i.some(h=>h.reducePos>e)&&this.recovering--}else if(i.length>1){t:for(let n=0;n<i.length-1;n++){let h=i[n];for(let o=n+1;o<i.length;o++){let a=i[o];if(h.sameState(a)||h.buffer.length>500&&a.buffer.length>500)if((h.score-a.score||h.buffer.length-a.buffer.length)>0)i.splice(o--,1);else{i.splice(n--,1);continue t}}}i.length>12&&(i.sort((n,h)=>h.score-n.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let n=1;n<i.length;n++)i[n].pos<this.minStackPos&&(this.minStackPos=i[n].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,i){let s=t.pos,{parser:r}=this,n=Q?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&s>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,p=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let c=this.parser.nodeSet.types[f.type.id]==f.type?r.getGoto(t.state,f.type.id):-1;if(c>-1&&f.length&&(!a||(f.prop(O.contextHash)||0)==p))return t.useNode(f,c),Q&&console.log(n+this.stackID(t)+` (via reuse of ${r.getName(f.type.id)})`),!0;if(!(f instanceof B)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof B&&f.positions[0]==0)f=d;else break}}let h=r.stateSlot(t.state,4);if(h>0)return t.reduce(h),Q&&console.log(n+this.stackID(t)+` (via always-reduce ${r.getName(h&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let p=o[a++],f=o[a++],c=o[a++],d=a==o.length||!i,x=d?t:t.split(),z=this.tokens.mainToken;if(x.apply(p,f,z?z.start:x.pos,c),Q&&console.log(n+this.stackID(x)+` (via ${(p&65536)==0?"shift":`reduce of ${r.getName(p&65535)}`} for ${r.getName(f)} @ ${s}${x==t?"":", split"})`),d)return!0;x.pos>s?e.push(x):i.push(x)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return Gt(t,e),!0}}runRecovery(t,e,i){let s=null,r=!1;for(let n=0;n<t.length;n++){let h=t[n],o=e[n<<1],a=e[(n<<1)+1],p=Q?this.stackID(h)+" -> ":"";if(h.deadEnd&&(r||(r=!0,h.restart(),Q&&console.log(p+this.stackID(h)+" (restarted)"),this.advanceFully(h,i))))continue;let f=h.split(),c=p;for(let d=0;d<10&&f.forceReduce()&&(Q&&console.log(c+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));d++)Q&&(c=this.stackID(f)+" -> ");for(let d of h.recoverByInsert(o))Q&&console.log(p+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,i);this.stream.end>h.pos?(a==h.pos&&(a++,o=0),h.recoverByDelete(o,a),Q&&console.log(p+this.stackID(h)+` (via recover-delete ${this.parser.getName(o)})`),Gt(h,i)):(!s||s.score<f.score)&&(s=f)}return s}stackToTree(t){return t.close(),B.build({buffer:yt.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(Pt||(Pt=new WeakMap)).get(t);return e||Pt.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function Gt(l,t){for(let e=0;e<t.length;e++){let i=t[e];if(i.pos==l.pos&&i.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class we{constructor(t,e,i){this.source=t,this.flags=e,this.disabled=i}allows(t){return!this.disabled||this.disabled[t]==0}}class wt extends se{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let h=0;h<t.repeatNodeCount;h++)e.push("");let i=Object.keys(t.topRules).map(h=>t.topRules[h][1]),s=[];for(let h=0;h<e.length;h++)s.push([]);function r(h,o,a){s[h].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let h of t.nodeProps){let o=h[0];typeof o=="string"&&(o=O[o]);for(let a=1;a<h.length;){let p=h[a++];if(p>=0)r(p,o,h[a++]);else{let f=h[a+-p];for(let c=-p;c>0;c--)r(h[a++],o,f);a++}}}this.nodeSet=new Tt(e.map((h,o)=>$.define({name:o>=this.minRepeatTerm?void 0:h,id:o,props:s[o],top:i.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=1024;let n=gt(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let h=0;h<this.specializerSpecs.length;h++)this.specialized[h]=this.specializerSpecs[h].term;this.specializers=this.specializerSpecs.map(Zt),this.states=gt(t.states,Uint32Array),this.data=gt(t.stateData),this.goto=gt(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(h=>typeof h=="number"?new st(n,h):h),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,i){let s=new ye(this,t,e,i);for(let r of this.wrappers)s=r(s,t,e,i);return s}getGoto(t,e,i=!1){let s=this.goto;if(e>=s[0])return-1;for(let r=s[e+1];;){let n=s[r++],h=n&1,o=s[r++];if(h&&i)return o;for(let a=r+(n>>1);r<a;r++)if(s[r]==t)return o;if(h)return-1}}hasAction(t,e){let i=this.data;for(let s=0;s<2;s++)for(let r=this.stateSlot(t,s?2:1),n;;r+=3){if((n=i[r])==65535)if(i[r+1]==1)n=i[r=X(i,r+2)];else{if(i[r+1]==2)return X(i,r+2);break}if(n==e||n==0)return X(i,r+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,i=>i==e?!0:null)}allActions(t,e){let i=this.stateSlot(t,4),s=i?e(i):void 0;for(let r=this.stateSlot(t,1);s==null;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=X(this.data,r+2);else break;s=e(X(this.data,r+1))}return s}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=X(this.data,i+2);else break;if((this.data[i+2]&1)==0){let s=this.data[i+1];e.some((r,n)=>n&1&&r==s)||e.push(this.data[i],s)}}return e}configure(t){let e=Object.assign(Object.create(wt.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=i}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(i=>{let s=t.tokenizers.find(r=>r.from==i);return s?s.to:i})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((i,s)=>{let r=t.specializers.find(h=>h.from==i.external);if(!r)return i;let n=Object.assign(Object.assign({},i),{external:r.to});return e.specializers[s]=Zt(n),n})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map(()=>!1);if(t)for(let r of t.split(" ")){let n=e.indexOf(r);n>=0&&(i[n]=!0)}let s=null;for(let r=0;r<e.length;r++)if(!i[r])for(let n=this.dialects[e[r]],h;(h=this.data[n++])!=65535;)(s||(s=new Uint8Array(this.maxTerm+1)))[h]=1;return new we(t,i,s)}static deserialize(t){return new wt(t)}}function X(l,t){return l[t]|l[t+1]<<16}function Oe(l){let t=null;for(let e of l){let i=e.p.stoppedAt;(e.pos==e.p.stream.end||i!=null&&e.pos>i)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function Zt(l){if(l.external){let t=l.extend?1:0;return(e,i)=>l.external(e,i)<<1|t}return l.get}const Se=ae({String:m.string,Number:m.number,"True False":m.bool,PropertyName:m.propertyName,Null:m.null,", :":m.separator,"[ ]":m.squareBracket,"{ }":m.brace}),ve=wt.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!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,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[Se],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~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#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!]~$zO]~~$}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~&yO[~~'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});export{T as I,O as N,se as P,B as T,m as a,At as b,$ as c,Pe as h,ve as p,ae as s,fe as t};
@@ -1 +0,0 @@
1
- import{p as F,b as G,i as J,B as f,h as o,aj as h,k as e,F as m,f as j,O as W,R as q,W as z,al as D,y as B,t as O,E as I,l as L,a6 as M,c as b}from"./svelte-B2XmcTi_.js";import{o as Q,E as S,G as C,J as U,K as X,N}from"./flowbite-svelte-BLvjb-sa.js";var Y=f("<!> <!>",1),Z=f("<!> <!>",1),ee=f("<!> <!>",1),te=f('<div class="h-full" style="overflow-y: auto;"><!></div>');function se(w,y){F(y,!1);let n=G(y,"entry",24,()=>({}));function E(t){let a="<ul class='mx-5'>";return Object.entries(t).map(([d,u])=>{a+="<li>",a+=`<b>${d}: </b>`,a+=x(u),a+="</li>"}),a+="</ul>"}function x(t){return t===null?"N/A":typeof t=="object"?E(t):t}J();var P=te(),H=I(P);Q(H,{class:"h-full",striped:!0,children:(t,a)=>{var d=ee(),u=o(d);S(u,{children:(v,R)=>{var s=Y(),$=o(s);C($,{children:(r,_)=>{var i=h("Key");e(r,i)},$$slots:{default:!0}});var c=m($,2);C(c,{children:(r,_)=>{var i=h("Value");e(r,i)},$$slots:{default:!0}}),e(v,s)},$$slots:{default:!0}});var K=m(u,2);U(K,{children:(v,R)=>{var s=j(),$=o(s);W($,1,()=>(O(n()),B(()=>Object.keys(n()))),D,(c,r)=>{X(c,{children:(_,i)=>{var T=Z(),g=o(T);N(g,{children:(p,k)=>{var l=h();q(()=>M(l,b(r))),e(p,l)},$$slots:{default:!0}});var V=m(g,2);N(V,{children:(p,k)=>{var l=j(),A=o(l);z(A,()=>(O(n()),b(r),B(()=>x(n()[b(r)])))),e(p,l)},$$slots:{default:!0}}),e(_,T)},$$slots:{default:!0}})}),e(v,s)},$$slots:{default:!0}}),e(t,d)},$$slots:{default:!0}}),e(w,P),L()}export{se as T};
@@ -1 +0,0 @@
1
- import"./svelte-B2XmcTi_.js";import"./clsx-B-dksMZM.js";import"./esm-env-rsSWfq8L.js";function _(o){}export{_ as default};
@@ -1 +0,0 @@
1
- import{p as mt,a8 as d,a9 as B,A as vt,e as n,a7 as _t,c as t,B as $,h as D,aj as S,R as f,L as ft,a6 as h,k as i,E as u,F as m,f as ht,O as M,al as N,j as $t,l as bt,H as yt}from"./svelte-B2XmcTi_.js";import{b as xt}from"./svelte-i18n-CT2KkQaN.js";import{d as gt}from"./downloadFile-D08i0YDh.js";import{s as O,L as G}from"./toast-B9WDyfyI.js";import{D as q,Q as J,h as wt}from"./@edraj-CS4NwVbD.js";import{b as K}from"./dmart_services-AL6-IdDE.js";import{C as Pt,L as U,k as V,B as W}from"./flowbite-svelte-BLvjb-sa.js";import{P as St}from"./Prism--hMplq-p.js";import{c as X}from"./queryHelpers-C9iBWwqe.js";import"./clsx-B-dksMZM.js";import"./esm-env-rsSWfq8L.js";import"./deepmerge-rn4rBaHU.js";import"./ajv-Cpj98o6Y.js";import"./intl-messageformat-Dc5UU-HB.js";import"./tslib-pJfR_DrR.js";import"./@formatjs-yKEsAtjs.js";import"./@zerodevx-BlBZjKxu.js";import"./spaces-0oyGvpii.js";import"./@floating-ui-BwwcF-xh.js";import"./tailwind-variants-Cj20BoQ3.js";import"./tailwind-merge-CJvxXMcu.js";import"./prismjs-DTUiLGJu.js";var jt=$("<option> </option>"),kt=$("<option> </option>"),Lt=$("<option>/</option> <!>",1),Bt=$('<div class="space-y-4"><div class="grid grid-cols-1 md:grid-cols-12 gap-4 mb-4"><div class="md:col-span-4"><!> <!></div> <div class="md:col-span-4"><!> <!></div></div> <div class="md:col-span-4 mx-auto flex items-end justify-end"><!> <!></div></div>'),Dt=$('<p class="text-gray-500 text-center">No response yet.</p>'),qt=$('<div class="min-w-11/12 m-6"><!></div> <!>',1);function te(Y,Z){mt(Z,!0);const x=()=>ft(xt,"$_",tt),[tt,et]=yt();let z=d(B([])),o=d(""),v=d("/"),g=d(null),C=d(null),j=d(B([])),k=d(B([]));vt(()=>{async function e(){n(z,(await q.getSpaces()).records,!0)}e()});async function Q(e,l){for(const c of l.records)if(c.resource_type==="folder"){const w=await K(t(o),c.shortname);await Q(`${e}/${c.shortname}`,w),t(j).push(`${e}/${c.shortname}`)}}async function at(){if(!t(o)||!t(v))return;const e={type:J.search,exact_subpath:!1,...X({space_name:t(o),subpath:t(v),search:"",offset:0,limit:1e6,retrieve_json_payload:!0,retrieve_attachments:!0})};n(g,await q.query(e),!0)}async function st(){const e={type:J.search,exact_subpath:!1,...X({space_name:t(o),subpath:t(v),search:"",offset:0,limit:1e6,retrieve_json_payload:!0,retrieve_attachments:!0})};try{const l=await q.axiosDmartInstance.post("managed/export",e,{headers:wt,responseType:"arraybuffer"});l.status!==200?O(G.warn):gt(l.data,`${t(o)}/${t(v)}.zip`,"application/zip")}catch{O(G.warn)}}_t(()=>{t(o)&&t(C)!==t(o)&&(async()=>{n(k,[],!0),n(j,[],!0);const e=await K(t(o),"/");await Q("",e),n(k,[...t(j).reverse()],!0),n(C,`${t(o)}`)})()});var T=qt(),E=D(T),rt=u(E);Pt(rt,{class:"min-w-full p-4",children:(e,l)=>{var c=Bt(),w=u(c),F=u(w),R=u(F);U(R,{for:"space_name",class:"mb-2",children:(s,b)=>{var a=S();f(r=>h(a,r),[()=>x()("space_name")]),i(s,a)},$$slots:{default:!0}});var nt=m(R,2);V(nt,{id:"space_name",get value(){return t(o)},set value(s){n(o,s,!0)},children:(s,b)=>{var a=ht(),r=D(a);M(r,17,()=>t(z),N,(L,y)=>{var p=jt(),_=u(p),P={};f(()=>{h(_,t(y).shortname),P!==(P=t(y).shortname)&&(p.value=(p.__value=t(y).shortname)??"")}),i(L,p)}),i(s,a)},$$slots:{default:!0}});var pt=m(F,2),A=u(pt);U(A,{for:"subpath",class:"mb-2",children:(s,b)=>{var a=S();f(r=>h(a,r),[()=>x()("subpath")]),i(s,a)},$$slots:{default:!0}});var ut=m(A,2);V(ut,{id:"subpath",get value(){return t(v)},set value(s){n(v,s,!0)},children:(s,b)=>{var a=Lt(),r=D(a);r.value=r.__value="/";var L=m(r,2);M(L,17,()=>t(k),N,(y,p)=>{var _=kt(),P=u(_),I={};f(()=>{h(P,t(p)),I!==(I=t(p))&&(_.value=(_.__value=t(p))??"")}),i(y,_)}),i(s,a)},$$slots:{default:!0}});var ct=m(w,2),H=u(ct);W(H,{onclick:at,color:"blue",children:(s,b)=>{var a=S();f(r=>h(a,r),[()=>x()("submit")]),i(s,a)},$$slots:{default:!0}});var dt=m(H,2);W(dt,{class:"mx-5",color:"blue",outline:!0,onclick:st,children:(s,b)=>{var a=S();f(r=>h(a,r),[()=>x()("download_zip")]),i(s,a)},$$slots:{default:!0}}),i(e,c)},$$slots:{default:!0}});var ot=m(E,2);{var it=e=>{var l=Dt();i(e,l)},lt=e=>{St(e,{get code(){return t(g)},set code(l){n(g,l,!0)}})};$t(ot,e=>{t(g)===null?e(it):e(lt,!1)})}i(Y,T),bt(),et()}export{te as default};