dmart 1.4.40.post32__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 (292) 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 +106 -46
  83. dmart/fast.py +6 -0
  84. dmart/info.json +1 -1
  85. dmart/main.py +5 -0
  86. dmart/my.py +11 -0
  87. dmart/publish.sh +2 -2
  88. dmart/sample/spaces/applications/.dm/meta.space.json +24 -29
  89. dmart/sample/spaces/applications/api/.dm/meta.folder.json +18 -1
  90. dmart/sample/spaces/applications/api/.dm/query_all_applications/meta.content.json +17 -1
  91. dmart/sample/spaces/applications/api/.dm/test_by_saad/attachments.media/meta.warframe.json +16 -1
  92. dmart/sample/spaces/applications/api/.dm/test_by_saad/meta.content.json +16 -1
  93. dmart/sample/spaces/applications/api/.dm/user_profile/meta.content.json +17 -1
  94. dmart/sample/spaces/applications/api/applications/.dm/create_log/meta.content.json +15 -1
  95. dmart/sample/spaces/applications/api/applications/.dm/create_public_logs/meta.content.json +15 -1
  96. dmart/sample/spaces/applications/api/applications/.dm/meta.folder.json +15 -1
  97. dmart/sample/spaces/applications/api/applications/.dm/query_all_translated_data/meta.content.json +15 -1
  98. dmart/sample/spaces/applications/api/applications/.dm/query_logs/meta.content.json +15 -1
  99. dmart/sample/spaces/applications/api/applications/.dm/query_translated_enums/meta.content.json +15 -1
  100. dmart/sample/spaces/applications/api/applications/.dm/query_translated_others/meta.content.json +15 -1
  101. dmart/sample/spaces/applications/api/applications/.dm/query_translated_resolution/meta.content.json +15 -1
  102. dmart/sample/spaces/applications/api/applications/create_log.json +46 -1
  103. dmart/sample/spaces/applications/api/applications/create_public_logs.json +22 -1
  104. dmart/sample/spaces/applications/api/applications/query_all_translated_data.json +14 -1
  105. dmart/sample/spaces/applications/api/applications/query_logs.json +11 -1
  106. dmart/sample/spaces/applications/api/applications/query_translated_enums.json +14 -1
  107. dmart/sample/spaces/applications/api/applications/query_translated_others.json +14 -1
  108. dmart/sample/spaces/applications/api/applications/query_translated_resolution.json +13 -1
  109. dmart/sample/spaces/applications/api/applications.json +16 -1
  110. dmart/sample/spaces/applications/api/management/.dm/create_subaccount/meta.content.json +15 -1
  111. dmart/sample/spaces/applications/api/management/.dm/meta.folder.json +15 -1
  112. dmart/sample/spaces/applications/api/management/.dm/update_password/meta.content.json +15 -1
  113. dmart/sample/spaces/applications/api/management/create_subaccount.json +29 -29
  114. dmart/sample/spaces/applications/api/management/update_password.json +19 -1
  115. dmart/sample/spaces/applications/api/management.json +16 -1
  116. dmart/sample/spaces/applications/api/query_all_applications.json +5 -6
  117. dmart/sample/spaces/applications/api/test_by_saad.json +4 -1
  118. dmart/sample/spaces/applications/api/user/.dm/meta.folder.json +9 -1
  119. dmart/sample/spaces/applications/api/user/.dm/test_by_saad/meta.content.json +16 -1
  120. dmart/sample/spaces/applications/api/user/.dm/user_profile/meta.content.json +17 -1
  121. dmart/sample/spaces/applications/api/user/test_by_saad.json +4 -1
  122. dmart/sample/spaces/applications/api/user/user_profile.json +4 -1
  123. dmart/sample/spaces/applications/api/user_profile.json +4 -1
  124. dmart/sample/spaces/applications/api.json +33 -1
  125. dmart/sample/spaces/applications/collections/.dm/meta.folder.json +11 -10
  126. dmart/sample/spaces/applications/collections.json +20 -1
  127. dmart/sample/spaces/applications/configurations/.dm/meta.folder.json +17 -1
  128. dmart/sample/spaces/applications/configurations.json +8 -8
  129. dmart/sample/spaces/applications/logs/.dm/meta.folder.json +12 -1
  130. dmart/sample/spaces/applications/queries/.dm/meta.folder.json +15 -1
  131. dmart/sample/spaces/applications/queries/.dm/order/meta.content.json +17 -1
  132. dmart/sample/spaces/applications/queries/order.json +15 -1
  133. dmart/sample/spaces/applications/queries.json +16 -1
  134. dmart/sample/spaces/applications/schema/.dm/api/meta.schema.json +17 -1
  135. dmart/sample/spaces/applications/schema/.dm/configuration/meta.schema.json +14 -1
  136. dmart/sample/spaces/applications/schema/.dm/error/meta.schema.json +14 -1
  137. dmart/sample/spaces/applications/schema/.dm/log/meta.schema.json +15 -1
  138. dmart/sample/spaces/applications/schema/.dm/meta.folder.json +15 -1
  139. dmart/sample/spaces/applications/schema/.dm/query/meta.schema.json +15 -14
  140. dmart/sample/spaces/applications/schema/.dm/translation/meta.schema.json +14 -1
  141. dmart/sample/spaces/applications/schema/api.json +24 -18
  142. dmart/sample/spaces/applications/schema/configuration.json +26 -1
  143. dmart/sample/spaces/applications/schema/error.json +22 -22
  144. dmart/sample/spaces/applications/schema/log.json +57 -1
  145. dmart/sample/spaces/applications/schema/query.json +56 -58
  146. dmart/sample/spaces/applications/schema/translation.json +4 -4
  147. dmart/sample/spaces/applications/schema.json +16 -1
  148. dmart/sample/spaces/applications/translations/.dm/meta.folder.json +15 -1
  149. dmart/sample/spaces/applications/translations.json +22 -1
  150. dmart/sample/spaces/archive/.dm/meta.space.json +19 -26
  151. dmart/sample/spaces/custom_plugins/dummy/__pycache__/plugin.cpython-314.pyc +0 -0
  152. dmart/sample/spaces/custom_plugins/own_changed_notification/__pycache__/plugin.cpython-314.pyc +0 -0
  153. dmart/sample/spaces/dummy/.dm/myfolder/history.jsonl +3 -0
  154. dmart/sample/spaces/dummy/.dm/posts/history.jsonl +3 -0
  155. dmart/sample/spaces/dummy/.dm/workflows/history.jsonl +3 -0
  156. dmart/sample/spaces/dummy/myfolder/.dm/an_example/history.jsonl +4 -0
  157. dmart/sample/spaces/dummy/myfolder/.dm/buyer_123/history.jsonl +2 -0
  158. dmart/sample/spaces/dummy/posts/.dm/97326c47/history.jsonl +3 -0
  159. dmart/sample/spaces/dummymyfolder/.dm/an_example/history.jsonl +2 -0
  160. dmart/sample/spaces/dummymyfolder/.dm/buyer_123/history.jsonl +2 -0
  161. dmart/sample/spaces/dummymyfolder/buyer_123/.dm/receipt/history.jsonl +2 -0
  162. dmart/sample/spaces/dummyschema/.dm/test_schema/history.jsonl +2 -0
  163. dmart/sample/spaces/dummyschema/.dm/ticket_workflows/history.jsonl +2 -0
  164. dmart/sample/spaces/dummyworkflows/.dm/myworkflow/history.jsonl +2 -0
  165. dmart/sample/spaces/management/.dm/meta.space.json +24 -27
  166. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/admin.json +31 -32
  167. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.admin.json +15 -1
  168. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/meta.system.json +15 -1
  169. dmart/sample/spaces/management/.dm/notifications/attachments.view.json/system.json +27 -28
  170. dmart/sample/spaces/management/collections/.dm/meta.folder.json +15 -1
  171. dmart/sample/spaces/management/collections.json +26 -1
  172. dmart/sample/spaces/management/groups/.dm/meta.folder.json +15 -1
  173. dmart/sample/spaces/management/groups.json +14 -1
  174. dmart/sample/spaces/management/health_check/.dm/meta.folder.json +15 -1
  175. dmart/sample/spaces/management/health_check.json +13 -1
  176. dmart/sample/spaces/management/notifications/.dm/meta.folder.json +15 -1
  177. dmart/sample/spaces/management/notifications/admin/.dm/meta.folder.json +6 -6
  178. dmart/sample/spaces/management/notifications/system/.dm/meta.folder.json +6 -6
  179. dmart/sample/spaces/management/notifications.json +46 -1
  180. dmart/sample/spaces/management/permissions/.dm/access_applications/meta.permission.json +4 -5
  181. dmart/sample/spaces/management/permissions/.dm/access_applications_world/meta.permission.json +23 -24
  182. dmart/sample/spaces/management/permissions/.dm/access_messages/meta.permission.json +14 -8
  183. dmart/sample/spaces/management/permissions/.dm/access_personal/meta.permission.json +12 -7
  184. dmart/sample/spaces/management/permissions/.dm/access_protected/meta.permission.json +12 -8
  185. dmart/sample/spaces/management/permissions/.dm/access_public/meta.permission.json +12 -8
  186. dmart/sample/spaces/management/permissions/.dm/browse_all_folders/meta.permission.json +5 -6
  187. dmart/sample/spaces/management/permissions/.dm/create_log/meta.permission.json +9 -8
  188. dmart/sample/spaces/management/permissions/.dm/interviewer/meta.permission.json +34 -1
  189. dmart/sample/spaces/management/permissions/.dm/manage_applications/meta.permission.json +35 -1
  190. dmart/sample/spaces/management/permissions/.dm/manage_debug/meta.permission.json +9 -7
  191. dmart/sample/spaces/management/permissions/.dm/manage_spaces/meta.permission.json +5 -6
  192. dmart/sample/spaces/management/permissions/.dm/meta.folder.json +15 -1
  193. dmart/sample/spaces/management/permissions/.dm/rules_management_default/meta.permission.json +10 -7
  194. dmart/sample/spaces/management/permissions/.dm/super_manager/meta.permission.json +4 -7
  195. dmart/sample/spaces/management/permissions/.dm/view_activity_log/meta.permission.json +10 -7
  196. dmart/sample/spaces/management/permissions/.dm/view_collections/meta.permission.json +6 -6
  197. dmart/sample/spaces/management/permissions/.dm/view_logs/meta.permission.json +9 -8
  198. dmart/sample/spaces/management/permissions/.dm/view_roles/meta.permission.json +10 -11
  199. dmart/sample/spaces/management/permissions/.dm/view_users/meta.permission.json +10 -7
  200. dmart/sample/spaces/management/permissions/.dm/view_world/meta.permission.json +10 -12
  201. dmart/sample/spaces/management/permissions/.dm/world/meta.permission.json +15 -10
  202. dmart/sample/spaces/management/permissions.json +10 -1
  203. dmart/sample/spaces/management/roles/.dm/dummy/meta.role.json +6 -6
  204. dmart/sample/spaces/management/roles/.dm/logged_in/meta.role.json +7 -7
  205. dmart/sample/spaces/management/roles/.dm/manager/meta.role.json +7 -7
  206. dmart/sample/spaces/management/roles/.dm/meta.folder.json +15 -1
  207. dmart/sample/spaces/management/roles/.dm/moderator/meta.role.json +7 -7
  208. dmart/sample/spaces/management/roles/.dm/super_admin/meta.role.json +7 -7
  209. dmart/sample/spaces/management/roles/.dm/test_role/meta.role.json +7 -7
  210. dmart/sample/spaces/management/roles/.dm/world/meta.role.json +7 -7
  211. dmart/sample/spaces/management/roles.json +11 -1
  212. dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/meta.ui_schema.json +15 -9
  213. dmart/sample/spaces/management/schema/.dm/admin_notification_request/attachments.media/ui_schema.json +4 -4
  214. dmart/sample/spaces/management/schema/.dm/admin_notification_request/meta.schema.json +17 -1
  215. dmart/sample/spaces/management/schema/.dm/api/meta.schema.json +15 -1
  216. dmart/sample/spaces/management/schema/.dm/folder_rendering/meta.schema.json +17 -1
  217. dmart/sample/spaces/management/schema/.dm/health_check/meta.schema.json +8 -8
  218. dmart/sample/spaces/management/schema/.dm/meta.folder.json +15 -1
  219. dmart/sample/spaces/management/schema/.dm/meta_schema/meta.schema.json +14 -1
  220. dmart/sample/spaces/management/schema/.dm/metafile/meta.schema.json +14 -13
  221. dmart/sample/spaces/management/schema/.dm/notification/meta.schema.json +17 -1
  222. dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/meta.ui_schema.json +15 -9
  223. dmart/sample/spaces/management/schema/.dm/system_notification_request/attachments.media/ui_schema.json +1 -1
  224. dmart/sample/spaces/management/schema/.dm/system_notification_request/meta.schema.json +17 -1
  225. dmart/sample/spaces/management/schema/.dm/view/meta.schema.json +17 -1
  226. dmart/sample/spaces/management/schema/.dm/workflow/meta.schema.json +17 -1
  227. dmart/sample/spaces/management/schema/admin_notification_request.json +85 -88
  228. dmart/sample/spaces/management/schema/api.json +35 -1
  229. dmart/sample/spaces/management/schema/folder_rendering.json +166 -174
  230. dmart/sample/spaces/management/schema/health_check.json +1 -4
  231. dmart/sample/spaces/management/schema/meta_schema.json +48 -48
  232. dmart/sample/spaces/management/schema/metafile.json +73 -76
  233. dmart/sample/spaces/management/schema/notification.json +15 -10
  234. dmart/sample/spaces/management/schema/system_notification_request.json +49 -38
  235. dmart/sample/spaces/management/schema/view.json +11 -11
  236. dmart/sample/spaces/management/schema/workflow.json +51 -53
  237. dmart/sample/spaces/management/schema.json +16 -1
  238. dmart/sample/spaces/management/users/.dm/alibaba/meta.user.json +14 -15
  239. dmart/sample/spaces/management/users/.dm/anonymous/meta.user.json +17 -17
  240. dmart/sample/spaces/management/users/.dm/distributor/history.jsonl +6 -0
  241. dmart/sample/spaces/management/users/.dm/dmart/meta.user.json +30 -18
  242. dmart/sample/spaces/management/users/.dm/meta.folder.json +7 -7
  243. dmart/sample/spaces/management/workflows/.dm/channel/meta.content.json +16 -1
  244. dmart/sample/spaces/management/workflows/.dm/meta.folder.json +17 -1
  245. dmart/sample/spaces/management/workflows/channel.json +40 -40
  246. dmart/sample/spaces/management/workflows.json +13 -1
  247. dmart/sample/spaces/managementusers/.dm/distributor/history.jsonl +3 -0
  248. dmart/sample/spaces/managementusers/.dm/dmart/history.jsonl +11 -0
  249. dmart/sample/spaces/maqola/.dm/meta.space.json +19 -23
  250. dmart/sample/spaces/personal/.dm/meta.space.json +24 -18
  251. dmart/sample/spaces/personal/people/.dm/meta.folder.json +9 -1
  252. dmart/sample/spaces/personal/people/distributor/.dm/meta.folder.json +9 -0
  253. dmart/sample/spaces/personal/people/distributor/inbox/.dm/meta.folder.json +9 -0
  254. dmart/sample/spaces/personal/people/distributor/notifications/.dm/meta.folder.json +9 -0
  255. dmart/sample/spaces/personal/people/distributor/private/.dm/meta.folder.json +9 -0
  256. dmart/sample/spaces/personal/people/distributor/protected/.dm/meta.folder.json +9 -0
  257. dmart/sample/spaces/personal/people/distributor/public/.dm/meta.folder.json +9 -0
  258. dmart/sample/spaces/personal/people/dmart/.dm/meta.folder.json +9 -1
  259. dmart/sample/spaces/personal/people/dmart/messages/.dm/0b5f7e7f/meta.content.json +14 -1
  260. dmart/sample/spaces/personal/people/dmart/messages/.dm/meta.folder.json +9 -1
  261. dmart/sample/spaces/personal/people/dmart/messages/.dm/mytest/meta.content.json +14 -1
  262. dmart/sample/spaces/personal/people/dmart/messages/0b5f7e7f.json +3 -1
  263. dmart/sample/spaces/personal/people/dmart/messages/mytest.json +4 -1
  264. dmart/sample/spaces/personal/people/dmart/notifications/.dm/meta.folder.json +9 -1
  265. dmart/sample/spaces/personal/people/dmart/private/.dm/inner/meta.content.json +14 -1
  266. dmart/sample/spaces/personal/people/dmart/private/.dm/meta.folder.json +9 -1
  267. dmart/sample/spaces/personal/people/dmart/private/inner.json +3 -1
  268. dmart/sample/spaces/personal/people/dmart/protected/.dm/avatar/meta.content.json +14 -1
  269. dmart/sample/spaces/personal/people/dmart/protected/.dm/meta.folder.json +9 -1
  270. dmart/sample/spaces/personal/people/dmart/public/.dm/meta.folder.json +9 -1
  271. dmart/sample/test/.gitignore +0 -1
  272. dmart/utils/settings.py +0 -31
  273. {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/METADATA +1 -1
  274. {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/RECORD +277 -236
  275. dmart/cxb/assets/@codemirror-Rn7_6DkE.js +0 -10
  276. dmart/cxb/assets/@edraj-CS4NwVbD.js +0 -1
  277. dmart/cxb/assets/@jsonquerylang-laKNoFFq.js +0 -12
  278. dmart/cxb/assets/@lezer-za4Q-8Ew.js +0 -1
  279. dmart/cxb/assets/Table2Cols-BsbwicQm.js +0 -1
  280. dmart/cxb/assets/_...fallback_-Ba_NLmAE.js +0 -1
  281. dmart/cxb/assets/export-OF_rTiXu.js +0 -1
  282. dmart/cxb/assets/flowbite-svelte-BLvjb-sa.js +0 -1
  283. dmart/cxb/assets/import-BiJTp7Zs.js +0 -1
  284. dmart/cxb/assets/index-DOCBh6PM.js +0 -1
  285. dmart/cxb/assets/index-NBrXBlLA.css +0 -2
  286. dmart/cxb/assets/spaces-0oyGvpii.js +0 -1
  287. dmart/cxb/assets/svelte-B2XmcTi_.js +0 -4
  288. dmart/cxb/assets/toast-B9WDyfyI.js +0 -1
  289. dmart/sample/spaces/management/.dm/events.jsonl +0 -32
  290. {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/WHEEL +0 -0
  291. {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/entry_points.txt +0 -0
  292. {dmart-1.4.40.post32.dist-info → dmart-1.4.41.post34.dist-info}/top_level.txt +0 -0
@@ -0,0 +1 @@
1
+ var p=(t=>(t.success="success",t.failed="failed",t))(p||{}),i=(t=>(t.managed="managed",t.public="public",t))(i||{});let e={"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 e}static setHeaders(a){Object.assign(e,a)}static getBaseURL(){return n.axiosDmartInstance.defaults.baseURL}static set setBaseURL(a){n.axiosDmartInstance.defaults.baseURL=a}static getToken(){return e.Authorization?e.Authorization.replace("Bearer ",""):null}static setToken(a){e.Authorization=`Bearer ${a}`}static async login(a,s){var c;const o=(await n.axiosDmartInstance.post("user/login",{shortname:a,password:s},{headers:e})).data;return o.status==p.success&&o.records.length>0&&(e.Authorization="Bearer "+((c=o.records[0])==null?void 0:c.attributes.access_token)),o}static async loginBy(a,s){var r;try{const c=(await n.axiosDmartInstance.post("user/login",{...a,password:s},{headers:e})).data;return c.status==p.success&&c.records.length>0&&(e.Authorization="Bearer "+((r=c.records[0])==null?void 0:r.attributes.access_token)),c}catch(o){throw o}}static async logout(){try{const{data:a}=await n.axiosDmartInstance.post("user/logout",{},{headers:e});return a}catch(a){throw a}}static async createUser(a){try{const{data:s}=await n.axiosDmartInstance.post("user/create",a,{headers:e});return s}catch(s){throw s}}static async updateUser(a){try{const{data:s}=await n.axiosDmartInstance.post("user/profile",a,{headers:e});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:e});return r}catch(r){throw r}}static async getProfile(){var a,s,r;try{const{data:o}=await n.axiosDmartInstance.get("user/profile",{headers:e});return typeof localStorage<"u"&&o.status==="success"&&(localStorage.setItem("permissions",JSON.stringify((a=((o==null?void 0:o.records)??[{}])[0])==null?void 0:a.attributes.permissions)),localStorage.setItem("roles",JSON.stringify((r=(s=((o==null?void 0:o.records)??[{}])[0])==null?void 0:s.attributes)==null?void 0:r.roles))),o}catch(o){throw o}}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:e});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:e});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 o=new FormData;o.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,o,{headers:c,params:r});return l}catch(s){return s}}static async request(a){const s=await n.axiosDmartInstance.post("managed/request",a,{headers:e});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:o}=await n.axiosDmartInstance.get(`${r.replace(/\/+/g,"/")}`,{headers:e});return o}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 o=new Blob([JSON.stringify(r)],{type:"application/json"}),c=new FormData;c.append("space_name",a.space_name),c.append("request_record",o),c.append("payload_file",a.payload_file);const l={"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:e});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:e});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:o}=await n.axiosDmartInstance.get(r,{headers:e});return o}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:e});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:e});return r}catch(r){throw r}}static async getManifest(){try{const{data:a}=await n.axiosDmartInstance.get("info/manifest",{headers:e});return a}catch(a){throw a}}static async getSettings(){try{const{data:a}=await n.axiosDmartInstance.get("info/settings",{headers:e});return a}catch(a){throw a}}static async otpRequest(a,s=null){try{const r={...e};s&&(r["Accept-Language"]=s);const{data:o}=await n.axiosDmartInstance.post("user/otp-request",a,{headers:r});return o}catch(r){throw r}}static async otpRequestLogin(a,s=null){try{const r={...e};s&&(r["Accept-Language"]=s);const{data:o}=await n.axiosDmartInstance.post("user/otp-request-login",a,{headers:r});return o}catch(r){throw r}}static async passwordResetRequest(a){try{const{data:s}=await n.axiosDmartInstance.post("user/password-reset-request",a,{headers:e});return s}catch(s){throw s}}static async confirmOtp(a){try{const{data:s}=await n.axiosDmartInstance.post("user/otp-confirm",a,{headers:e});return s}catch(s){throw s}}static async userReset(a){try{const{data:s}=await n.axiosDmartInstance.post("user/reset",{shortname:a},{headers:e});return s}catch(s){throw s}}static async validatePassword(a){try{const{data:s}=await n.axiosDmartInstance.post("user/validate_password",{password:a},{headers:e});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,e as h};
@@ -0,0 +1,12 @@
1
+ const w=e=>Array.isArray(e),X=e=>e!==null&&typeof e=="object"&&!w(e),Y=e=>typeof e=="string",A=(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])=>A(r,n[t]));function p(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(h=>h(s)))}}const B={boolean:0,number:1,string:2},F=3,T=(e,n)=>typeof e==typeof n&&typeof e in B?e>n:!1,ee=(e,n)=>A(e,n)||T(e,n),D=(e,n)=>typeof e==typeof n&&typeof e in B?e<n:!1,ne=(e,n)=>A(e,n)||D(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=>(t==null?void 0:t[n])??null}return n=>{let t=n;for(const r of e)t=t==null?void 0: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=>L(n(r)))},sort:(e=["get"],n)=>{const t=g(e),r=n==="desc"?-1:1;function o(s,h){const i=t(s),j=t(h);if(typeof i!=typeof j){const I=B[typeof i]??F,q=B[typeof j]??F;return I>q?r:I<q?-r:0}return typeof i in B?i>j?r:i<j?-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[h,i]of o)s[h]=i(r);return s};return r=>w(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:p((e,n)=>n!==void 0?e.split(n):e.trim().split(/\s+/)),substring:p((e,n,t)=>e.slice(Math.max(n,0),t)),uniq:()=>e=>{const n=[];for(const t of e)n.findIndex(r=>A(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=>w(e)?e.reduce((n,t)=>n+t,0):R(),average:()=>e=>w(e)?e.length>0?e.reduce((n,t)=>n+t)/e.length:null:R(),min:()=>e=>z(e,(n,t)=>Math.min(n,t)),max:()=>e=>z(e,(n,t)=>Math.max(n,t)),and:p((...e)=>z(e,(n,t)=>!!(n&&t))),or:p((...e)=>z(e,(n,t)=>!!(n||t))),not:p(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 h=>L(r(h))?o(h):s(h)},in:(e,n)=>{const t=g(e),r=g(n);return o=>{const s=t(o);return r(o).findIndex(h=>A(h,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))},eq:p(A),gt:p(T),gte:p(ee),lt:p(D),lte:p(ne),ne:p((e,n)=>!A(e,n)),add:p((e,n)=>e+n),subtract:p((e,n)=>e-n),multiply:p((e,n)=>e*n),divide:p((e,n)=>e/n),mod:p((e,n)=>e%n),pow:p((e,n)=>e**n),abs:p(Math.abs),round:p((e,n=0)=>+`${Math.round(+`${e}e${n}`)}e${-n}`),number:p(e=>{const n=Number(e);return Number.isNaN(Number(e))?null:n}),string:p(String)},L=e=>e!==null&&e!==0&&e!==!1,z=(e,n)=>(w(e)||R(),e.length===0?null:e.reduce(n)),R=()=>{U("Array expected")},U=e=>{throw new TypeError(e)},K=[];function g(e,n){K.unshift({..._,...K[0]});try{const t=w(e)?te(e,K[0]):X(e)?U(`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{K.shift()}}function te(e,n){const[t,...r]=e,o=n[t];return o||U(`Unknown function '${t}'`),o(...r)}const G=[{pow:"^"},{multiply:"*",divide:"/",mod:"%"},{add:"+",subtract:"-"},{gt:">",gte:">=",lt:"<",lte:"<=",in:"in","not in":"not in"},{eq:"==",ne:"!="},{and:"and"},{or:"or"},{pipe:"|"}],re=["|","and","or"],H=["|","and","or","*","/","%","+","-"];function Q(e,n){if(!w(n))throw new Error("Invalid custom operators");return n.reduce(oe,e)}function oe(e,{name:n,op:t,at:r,after:o,before:s}){if(r)return e.map(j=>Object.values(j).includes(r)?{...j,[n]:t}:j);const h=o??s,i=e.findIndex(j=>Object.values(j).includes(h));if(i!==-1)return e.toSpliced(i+(o?1:0),0,{[n]:t});throw new Error("Invalid custom operator")}const se=/^[a-zA-Z_$][a-zA-Z\d_$]*$/,ce=/^[a-zA-Z_$][a-zA-Z\d_$]*/,ue=/^"(?:[^"\\]|\\.)*"/,ie=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,ae=/^(0|[1-9][0-9]*)/,le=/^(true|false|null)/,fe=/^[ \n\t\r]+/;function pe(e,n){const t=[],r=Q(G,t),o=Object.assign({},...r),s=re.concat(t.filter(c=>c.vararg).map(c=>c.op)),h=H.concat(t.filter(c=>c.leftAssociative).map(c=>c.op)),i=(c=r.length-1)=>{const d=r[c];if(!d)return I();const y=e[u]==="(";let v=i(c-1);for(;;){f();const J=u,M=j(d);if(!M)break;const V=i(c-1),W=v[0],C=M===W&&!y;if(C&&!h.includes(o[M])){u=J;break}v=C&&s.includes(o[M])?[...v,V]:[M,v,V]}return v},j=c=>{const d=Object.keys(c).sort((y,v)=>v.length-y.length);for(const y of d){const v=c[y];if(e.substring(u,u+v.length)===v)return u+=v.length,f(),y}},I=()=>{if(f(),e[u]==="("){u++;const c=i();return O(")"),c}return q()},q=()=>{if(e[u]==="."){const c=[];for(;e[u]===".";)u++,c.push(a()??m()??$()??S("Property expected"));return["get",...c]}return Z()},Z=()=>{const c=u,d=m();if(f(),!d||e[u]!=="(")return u=c,E();u++,f();const y=e[u]!==")"?[i()]:[];for(;u<e.length&&e[u]!==")";)f(),O(","),y.push(i());return O(")"),[d,...y]},E=()=>{if(e[u]==="{"){u++,f();const c={};let d=!0;for(;u<e.length&&e[u]!=="}";){d?d=!1:(O(","),f());const y=a()??m()??$()??S("Key expected");f(),O(":"),c[y]=i()}return O("}"),["object",c]}return l()},l=()=>{if(e[u]==="["){u++,f();const c=[];let d=!0;for(;u<e.length&&e[u]!=="]";)d?d=!1:(O(","),f()),c.push(i());return O("]"),["array",...c]}return a()??b()??x()},a=()=>k(ue,JSON.parse),m=()=>k(ce,c=>c),b=()=>k(ie,JSON.parse),$=()=>k(ae,JSON.parse),x=()=>{const c=k(le,JSON.parse);if(c!==void 0)return c;S("Value expected")},N=()=>{f(),u<e.length&&S(`Unexpected part '${e.substring(u)}'`)},k=(c,d)=>{const y=e.substring(u).match(c);if(y)return u+=y[0].length,d(y[0])},f=()=>k(fe,c=>c),O=c=>{e[u]!==c&&S(`Character '${c}' expected`),u++},S=(c,d=u)=>{throw new SyntaxError(`${c} (pos: ${d})`)};let u=0;const P=i();return N(),P}const de=40,ge=" ",ye=(e,n)=>{const t=ge,r=[],o=Q(G,r),s=Object.assign({},...o),h=H.concat(r.filter(l=>l.leftAssociative).map(l=>l.op)),i=(l,a,m=!1)=>w(l)?j(l,a,m):JSON.stringify(l),j=(l,a,m)=>{const[b,...$]=l;if(b==="get"&&$.length>0)return q($);if(b==="object")return I($[0],a);if(b==="array"){const f=$.map(O=>i(O,a));return E(f,["[",", ","]"],[`[
2
+ ${a+t}`,`,
3
+ ${a+t}`,`
4
+ ${a}]`])}const x=s[b];if(x){const f=m?"(":"",O=m?")":"",S=$.map((u,P)=>{const c=u==null?void 0:u[0],d=o.findIndex(J=>b in J),y=o.findIndex(J=>c in J),v=d<y||d===y&&P>0||b===c&&!h.includes(x);return i(u,a+t,v)});return E(S,[f,` ${x} `,O],[f,`
5
+ ${a+t}${x} `,O])}const N=$.length===1?a:a+t,k=$.map(f=>i(f,N));return E(k,[`${b}(`,", ",")"],$.length===1?[`${b}(`,`,
6
+ ${a}`,")"]:[`${b}(
7
+ ${N}`,`,
8
+ ${N}`,`
9
+ ${a})`])},I=(l,a)=>{const m=a+t,b=Object.entries(l).map(([$,x])=>`${Z($)}: ${i(x,m)}`);return E(b,["{ ",", "," }"],[`{
10
+ ${m}`,`,
11
+ ${m}`,`
12
+ ${a}}`])},q=l=>l.map(a=>`.${Z(a)}`).join(""),Z=l=>se.test(l)?l:JSON.stringify(l),E=(l,[a,m,b],[$,x,N])=>a.length+l.reduce((k,f)=>k+f.length+m.length,0)-m.length+b.length<=de?a+l.join(m)+b:$+l.join(x)+N;return i(e,"")};function he(e,n,t){return g(Y(n)?pe(n):n)(e)}export{he as d,ye as m,pe as p};
@@ -0,0 +1 @@
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 kt{constructor(t,e,i){this.tree=t,this.overlay=e,this.parser=i}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 n of t.props)if(Array.isArray(n)||(n=n(s)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[n[0].id]=n[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),n=-1;n<(s?s.length:0);n++){let r=e[n<0?i.name:s[n]];if(r)return r}}}}$.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 n of t){let r=n(i);if(r){s||(s=Object.assign({},i.props));let h=r[1],o=r[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 ft=new WeakMap,_t=new WeakMap;var R;(function(l){l[l.ExcludeBuffers=1]="ExcludeBuffers",l[l.IncludeAnonymous=2]="IncludeAnonymous",l[l.IgnoreMounts=4]="IgnoreMounts",l[l.IgnoreOverlays=8]="IgnoreOverlays"})(R||(R={}));class I{constructor(t,e,i,s,n){if(this.type=t,this.children=e,this.positions=i,this.length=s,this.props=null,n&&n.length){this.props=Object.create(null);for(let[r,h]of n)this.props[typeof r=="number"?r:r.id]=h}}toString(){let t=kt.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=ft.get(this)||this.topNode,n=new Ct(s);return n.moveTo(t,e),ft.set(this,n._tree),n}get topNode(){return new E(this,0,0,null)}resolve(t,e=0){let i=ht(ft.get(this)||this.topNode,t,e,!1);return ft.set(this,i),i}resolveInner(t,e=0){let i=ht(_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:n=this.length}=t,r=t.mode||0,h=(r&R.IncludeAnonymous)>0;for(let o=this.cursor(r|R.IncludeAnonymous);;){let a=!1;if(o.from<=n&&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:It($.none,this.children,this.positions,0,this.children.length,0,this.length,(e,i,s)=>new I(this.type,e,i,s,this.propValues),t.makeTree||((e,i,s)=>new I($.none,e,i,s)))}static build(t){return ie(t)}}I.empty=new I($.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],n=s.name;if(/\W/.test(n)&&!s.isError&&(n=JSON.stringify(n)),t+=4,i==t)return n;let r=[];for(;t<i;)r.push(this.childString(t)),t=this.buffer[t+3];return n+"("+r.join(",")+")"}findChild(t,e,i,s,n){let{buffer:r}=this,h=-1;for(let o=t;o!=e&&!(Xt(n,s,r[o+1],r[o+2])&&(h=o,i>0));o=r[o+3]);return h}slice(t,e,i){let s=this.buffer,n=new Uint16Array(e-t),r=0;for(let h=t,o=0;h<e;){n[o++]=s[h++],n[o++]=s[h++]-i;let a=n[o++]=s[h++]-i;n[o++]=s[h++]-t,r=Math.max(r,a)}return new J(n,r,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 ht(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 r=!i&&l instanceof E&&l.index<0?null:l.parent;if(!r)return l;l=r}let n=i?0:R.IgnoreOverlays;if(i)for(let r=l,h=r.parent;h;r=h,h=r.parent)r instanceof E&&r.index<0&&((s=h.enter(t,e,n))===null||s===void 0?void 0:s.from)!=r.from&&(l=h);for(;;){let r=l.enter(t,e,n);if(!r)return l;l=r}}class Yt{cursor(t=0){return new Ct(this,t)}getChild(t,e=null,i=null){let s=Dt(this,t,e,i);return s.length?s[0]:null}getChildren(t,e=null,i=null){return Dt(this,t,e,i)}resolve(t,e=0){return ht(this,t,e,!1)}resolveInner(t,e=0){return ht(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 E 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,n=0){for(let r=this;;){for(let{children:h,positions:o}=r._tree,a=e>0?h.length:-1;t!=a;t+=e){let c=h[t],f=o[t]+r.from;if(Xt(s,i,f,f+c.length)){if(c instanceof J){if(n&R.ExcludeBuffers)continue;let p=c.findChild(0,c.buffer.length,e,i-f,s);if(p>-1)return new H(new Kt(r,c,t,f),null,p)}else if(n&R.IncludeAnonymous||!c.type.isAnonymous||zt(c)){let p;if(!(n&R.IgnoreMounts)&&(p=kt.get(c))&&!p.overlay)return new E(p.tree,f,t,r);let m=new E(c,f,t,r);return n&R.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?c.children.length-1:0,e,i,s)}}}if(n&R.IncludeAnonymous||!r.type.isAnonymous||(r.index>=0?t=r.index+e:t=e<0?-1:r._parent._tree.children.length,r=r._parent,!r))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&R.IgnoreOverlays)&&(s=kt.get(this._tree))&&s.overlay){let n=t-this.from;for(let{from:r,to:h}of s.overlay)if((e>0?r<=n:r<n)&&(e<0?h>=n:h>n))return new E(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 Dt(l,t,e,i){let s=l.cursor(),n=[];if(!s.firstChild())return n;if(e!=null){for(let r=!1;!r;)if(r=s.type.is(e),!s.nextSibling())return n}for(;;){if(i!=null&&s.type.is(i))return n;if(s.type.is(t)&&n.push(s.node),!s.nextSibling())return i==null?n:[]}}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,n=s.findChild(this.index+4,s.buffer[this.index+3],t,e-this.context.start,i);return n<0?null:new H(this.context,this,n)}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&R.ExcludeBuffers)return null;let{buffer:s}=this.context,n=s.findChild(this.index+4,s.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return n<0?null:new H(this.context,this,n)}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,n=i.buffer[this.index+3];if(n>s){let r=i.buffer[this.index+1];t.push(i.slice(s,n,r)),e.push(0)}return new I(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 n=1;n<l.length;n++){let r=l[n];(r.from>e.from||r.to<e.to)&&(e=r,t=n)}let i=e instanceof E&&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 n=i instanceof E?i:i.context.parent;n;n=n.parent)if(n.index<0){let r=n.parent;(s||(s=[i])).push(r.resolve(t,e)),n=r}else{let r=kt.get(n.tree);if(r&&r.overlay&&r.overlay[0].from<=t&&r.overlay[r.overlay.length-1].to>=t){let h=new E(r.tree,r.overlay[0].from+n.from,-1,n);(s||(s=[i])).push(ht(h,t,e,!1))}}return s?Ut(s):i}class Ct{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof E)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 E?(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,n=s.findChild(this.index+4,s.buffer[this.index+3],t,e-this.buffer.start,i);return n<0?!1:(this.stack.push(this.index),this.yieldBuf(n))}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&R.ExcludeBuffers?!1:this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&R.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&R.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 n=0;n<this.index;n++)if(s.buffer.buffer[n+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 n=e+t,r=t<0?-1:i._tree.children.length;n!=r;n+=t){let h=i._tree.children[n];if(this.mode&R.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,n=this.stack.length;n>=0;){for(let r=t;r;r=r._parent)if(r.index==s){if(s==this.index)return r;e=r,i=n+1;break t}s=this.stack[--n]}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,n=this.stack.length-1;s>=0;n--){if(n<0)return vt(this._tree,t,s);let r=i[e.buffer[this.stack[n]]];if(!r.isAnonymous){if(t[s]&&t[s]!=r.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:n=[],minRepeatType:r=i.types.length}=l,h=Array.isArray(e)?new Rt(e,e.length):e,o=i.types,a=0,c=0;function f(y,P,d,C,w,A){let{id:b,start:k,end:S,size:v}=h,T=c,Y=a;if(v<0)if(h.next(),v==-1){let Z=n[b];d.push(Z),C.push(k-y);return}else if(v==-3){a=b;return}else if(v==-4){c=b;return}else throw new RangeError(`Unrecognized record size: ${v}`);let rt=o[b],ot,K,Bt=k-y;if(S-k<=s&&(K=_(h.pos-P,w))){let Z=new Uint16Array(K.size-K.skip),D=h.pos-K.size,L=Z.length;for(;h.pos>D;)L=j(K.start,Z,L);ot=new J(Z,S-K.start,i),Bt=K.start-y}else{let Z=h.pos-v;h.next();let D=[],L=[],tt=b>=r?b:-1,it=0,at=S;for(;h.pos>Z;)tt>=0&&h.id==tt&&h.size>=0?(h.end<=at-s&&(x(D,L,k,it,h.end,at,tt,T,Y),it=D.length,at=h.end),h.next()):A>2500?p(k,Z,D,L):f(k,Z,D,L,tt,A+1);if(tt>=0&&it>0&&it<D.length&&x(D,L,k,it,k,at,tt,T,Y),D.reverse(),L.reverse(),tt>-1&&it>0){let Qt=m(rt,Y);ot=It(rt,D,L,0,D.length,0,S-k,Qt,Qt)}else ot=z(rt,D,L,S-k,T-S,Y)}d.push(ot),C.push(Bt)}function p(y,P,d,C){let w=[],A=0,b=-1;for(;h.pos>P;){let{id:k,start:S,end:v,size:T}=h;if(T>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,T=0;v>=0;v-=3)k[T++]=w[v],k[T++]=w[v+1]-S,k[T++]=w[v+2]-S,k[T++]=T;d.push(new J(k,w[2]-S,i)),C.push(S-y)}}function m(y,P){return(d,C,w)=>{let A=0,b=d.length-1,k,S;if(b>=0&&(k=d[b])instanceof I){if(!b&&k.type==y&&k.length==w)return k;(S=k.prop(O.lookAhead))&&(A=C[b]+k.length+S)}return z(y,d,C,w,A,P)}}function x(y,P,d,C,w,A,b,k,S){let v=[],T=[];for(;y.length>C;)v.push(y.pop()),T.push(P.pop()+d-w);y.push(z(i.types[b],v,T,A-w,k-A,S)),P.push(w-d)}function z(y,P,d,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 I(y,P,d,C,b)}function _(y,P){let d=h.fork(),C=0,w=0,A=0,b=d.end-s,k={size:0,start:0,skip:0};t:for(let S=d.pos-y;d.pos>S;){let v=d.size;if(d.id==P&&v>=0){k.size=C,k.start=w,k.skip=A,A+=4,C+=4,d.next();continue}let T=d.pos-v;if(v<0||T<S||d.start<b)break;let Y=d.id>=r?4:0,rt=d.start;for(d.next();d.pos>T;){if(d.size<0)if(d.size==-3||d.size==-4)Y+=4;else break t;else d.id>=r&&(Y+=4);d.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,d){let{id:C,start:w,end:A,size:b}=h;if(h.next(),b>=0&&C<r){let k=d;if(b>4){let S=h.pos-(b-4);for(;h.pos>S;)d=j(y,P,d)}P[--d]=k,P[--d]=A-y,P[--d]=w-y,P[--d]=C}else b==-3?a=C:b==-4&&(c=C);return d}let B=[],N=[];for(;h.pos>0;)f(l.start||0,l.bufferStart||0,B,N,-1,0);let F=(t=l.length)!==null&&t!==void 0?t:B.length?N[0]+B[0].length:0;return new I(o[l.topID],B.reverse(),N.reverse(),F)}const Mt=new WeakMap;function gt(l,t){if(!l.isAnonymous||t instanceof J||t.type!=l)return 1;let e=Mt.get(t);if(e==null){e=1;for(let i of t.children){if(i.type!=l||!(i instanceof I)){e=1;break}e+=gt(l,i)}Mt.set(t,e)}return e}function It(l,t,e,i,s,n,r,h,o){let a=0;for(let x=i;x<s;x++)a+=gt(l,t[x]);let c=Math.ceil(a*1.5/8),f=[],p=[];function m(x,z,_,j,B){for(let N=_;N<j;){let F=N,y=z[N],P=gt(l,x[N]);for(N++;N<j;N++){let d=gt(l,x[N]);if(P+d>=c)break;P+=d}if(N==F+1){if(P>c){let d=x[F];m(d.children,d.positions,0,d.children.length,z[F]+B);continue}f.push(x[F])}else{let d=z[N-1]+x[N-1].length-y;f.push(It(l,x,z,F,N,y,d,null,o))}p.push(y+B-n)}}return m(t,e,i,s,0),(h||o)(f,p,r)}class At{constructor(t,e,i,s,n=!1,r=!1){this.from=t,this.to=e,this.tree=i,this.offset=s,this.open=(n?1:0)|(r?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 n of e)n.to>t.length&&s.push(n);return s}static applyChanges(t,e,i=128){if(!e.length)return t;let s=[],n=1,r=t.length?t[0]:null;for(let h=0,o=0,a=0;;h++){let c=h<e.length?e[h]:null,f=c?c.fromA:1e9;if(f-o>=i)for(;r&&r.from<f;){let p=r;if(o>=p.from||f<=p.to||a){let m=Math.max(p.from,o)-a,x=Math.min(p.to,f)-a;p=m>=x?null:new At(m,x,p.tree,p.offset+a,h>0,!!c)}if(p&&s.push(p),r.to>f)break;r=n<t.length?t[n++]:null}if(!c)break;o=c.toA,a=c.toA-c.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 n=s.advance();if(n)return n}}}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 M{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 M&&(e=t),e!=null&&e.base)throw new Error("Can not derive from a modified tag");let s=new M(i,[],null,[]);if(s.set.push(s),e)for(let n of e.set)s.set.push(n);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,n)=>s.id-n.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=[],n=new M(t.name,s,t,e);for(let h of e)h.instances.push(n);let r=oe(e);for(let h of t.set)if(!h.modified.length)for(let o of r)s.push(xt.get(h,o));return n}}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 n=[],r=2,h=s;for(let f=0;;){if(h=="..."&&f>0&&f+3==s.length){r=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(h);if(!p)throw new RangeError("Invalid path: "+s);if(n.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),f+=p[0].length,f==s.length)break;let m=s[f++];if(f==s.length&&m=="!"){r=0;break}if(m!="/")throw new RangeError("Invalid path: "+s);h=s.slice(f)}let o=n.length-1,a=n[o];if(!a)throw new RangeError("Invalid path: "+s);let c=new lt(i,r,o>0?n.slice(0,o):null);t[a]=c.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 n=new lt(s.tags,s.mode,s.context);e?e.next=n:i=n,e=n}return i}});class lt{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}}lt.empty=new lt([],2,null);function fe(l,t){let e=Object.create(null);for(let n of l)if(!Array.isArray(n.tag))e[n.tag.id]=n.class;else for(let r of n.tag)e[r.id]=n.class;let{scope:i,all:s=null}=t||{};return{style:n=>{let r=s;for(let h of n)for(let o of h.set){let a=e[o.id];if(a){r=r?r+" "+a:a;break}}return r},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 n=new ce(i,Array.isArray(t)?t:[t],e);n.highlightRange(l.cursor(),i,s,"",n.highlighters),n.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,n){let{type:r,from:h,to:o}=t;if(h>=i||o<=e)return;r.isTop&&(n=this.highlighters.filter(m=>!m.scope||m.scope(r)));let a=s,c=pe(t)||lt.empty,f=ue(n,c.tags);if(f&&(a&&(a+=" "),a+=f,c.mode==1&&(s+=(s?" ":"")+f)),this.startSpan(Math.max(e,h),a),c.opaque)return;let p=t.tree&&t.tree.prop(O.mounted);if(p&&p.overlay){let m=t.node.enter(p.overlay[0].from+h,1),x=this.highlighters.filter(_=>!_.scope||_.scope(p.tree.type)),z=t.firstChild();for(let _=0,j=h;;_++){let B=_<p.overlay.length?p.overlay[_]:null,N=B?B.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,n),this.startSpan(Math.min(y,t.to),a),!(t.to>=N||!t.nextSibling())););if(!B||N>i)break;j=B.to+h,j>e&&(this.highlightRange(m.cursor(),Math.max(e,B.from+h),Math.min(i,j),"",x),this.startSpan(Math.min(i,j),a))}z&&t.parent()}else if(t.firstChild()){p&&(s="");do if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,s,n),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=M.define,ut=u(),U=u(),Et=u(U),jt=u(U),q=u(),ct=u(q),St=u(q),G=u(),et=u(G),W=u(),V=u(),Nt=u(),nt=u(Nt),pt=u(),g={comment:ut,lineComment:u(ut),blockComment:u(ut),docComment:u(ut),name:U,variableName:u(U),typeName:Et,tagName:u(Et),propertyName:jt,attributeName:u(jt),className:u(U),labelName:u(U),namespace:u(U),macroName:u(U),literal:q,string:ct,docString:u(ct),character:u(ct),attributeValue:u(ct),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:pt,documentMeta:u(pt),annotation:u(pt),processingInstruction:u(pt),definition:M.defineModifier("definition"),constant:M.defineModifier("constant"),function:M.defineModifier("function"),standard:M.defineModifier("standard"),local:M.defineModifier("local"),special:M.defineModifier("special")};for(let l in g){let t=g[l];t instanceof M&&(t.name=l)}fe([{tag:g.link,class:"tok-link"},{tag:g.heading,class:"tok-heading"},{tag:g.emphasis,class:"tok-emphasis"},{tag:g.strong,class:"tok-strong"},{tag:g.keyword,class:"tok-keyword"},{tag:g.atom,class:"tok-atom"},{tag:g.bool,class:"tok-bool"},{tag:g.url,class:"tok-url"},{tag:g.labelName,class:"tok-labelName"},{tag:g.inserted,class:"tok-inserted"},{tag:g.deleted,class:"tok-deleted"},{tag:g.literal,class:"tok-literal"},{tag:g.string,class:"tok-string"},{tag:g.number,class:"tok-number"},{tag:[g.regexp,g.escape,g.special(g.string)],class:"tok-string2"},{tag:g.variableName,class:"tok-variableName"},{tag:g.local(g.variableName),class:"tok-variableName tok-local"},{tag:g.definition(g.variableName),class:"tok-variableName tok-definition"},{tag:g.special(g.variableName),class:"tok-variableName2"},{tag:g.definition(g.propertyName),class:"tok-propertyName tok-definition"},{tag:g.typeName,class:"tok-typeName"},{tag:g.namespace,class:"tok-namespace"},{tag:g.className,class:"tok-className"},{tag:g.macroName,class:"tok-macroName"},{tag:g.propertyName,class:"tok-propertyName"},{tag:g.operator,class:"tok-operator"},{tag:g.comment,class:"tok-comment"},{tag:g.meta,class:"tok-meta"},{tag:g.invalid,class:"tok-invalid"},{tag:g.punctuation,class:"tok-punctuation"}]);var $t={};class bt{constructor(t,e,i,s,n,r,h,o,a,c=0,f){this.p=t,this.stack=e,this.state=i,this.reducePos=s,this.pos=n,this.score=r,this.buffer=h,this.bufferBase=o,this.curContext=a,this.lookAhead=c,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:n}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),h=n.dynamicPrecedence(s);if(h&&(this.score+=h),i==0){this.pushState(n.getGoto(this.state,s,!0),this.reducePos),s<n.minRepeatTerm&&this.storeNode(s,this.reducePos,this.reducePos,r?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,c=this.reducePos-a;c>=2e3&&!(!((e=this.p.parser.nodeSet.types[s])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=c));let f=o?this.stack[o-1]:0,p=this.bufferBase+this.buffer.length-f;if(s<n.minRepeatTerm||t&131072){let m=n.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(s,a,m,p+4,!0)}if(t&262144)this.state=this.stack[o];else{let m=this.stack[o-3];this.state=n.getGoto(m,s,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(s,a)}storeNode(t,e,i,s=4,n=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,h=this.buffer.length;if(h==0&&r.parent&&(h=r.bufferBase-r.parent.bufferBase,r=r.parent),h>0&&r.buffer[h-4]==0&&r.buffer[h-1]>-1){if(e==i)return;if(r.buffer[h-2]>=e){r.buffer[h-2]=i;return}}}if(!n||this.pos==i)this.buffer.push(t,e,i,s);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let h=!1;for(let o=r;o>0&&this.buffer[o-2]>i;o-=4)if(this.buffer[o-1]>=0){h=!0;break}if(h)for(;r>0&&this.buffer[r-2]>i;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,s>4&&(s-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=i,this.buffer[r+3]=s}}shift(t,e,i,s){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let n=t,{parser:r}=this.p;(s>this.pos||e<=r.maxNode)&&(this.pos=s,r.stateFlag(n,1)||(this.reducePos=s)),this.pushState(n,i),this.shiftContext(e,i),e<=r.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 n=0,r;n<e.length;n+=2)(r=e[n+1])!=this.state&&this.p.parser.hasAction(r,t)&&s.push(e[n],r);if(this.stack.length<120)for(let n=0;s.length<8&&n<e.length;n+=2){let r=e[n+1];s.some((h,o)=>o&1&&h==r)||s.push(e[n],r)}e=s}let i=[];for(let s=0;s<e.length&&i.length<4;s+=2){let n=e[s+1];if(n==this.state)continue;let r=this.split();r.pushState(n,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[s],this.pos),r.reducePos=this.pos,r.score-=200,i.push(r)}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,n=this.stack.length-i*3;if(n<0||t.getGoto(this.stack[n],s,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}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,n)=>{if(!e.includes(s))return e.push(s),t.allActions(s,r=>{if(!(r&393216))if(r&65536){let h=(r>>19)-n;if(h>1){let o=r&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(r,n+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 dt(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let i=0,s=0;i<l.length;){let n=0;for(;;){let r=l.charCodeAt(i++),h=!1;if(r==126){n=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,h=!0),n+=o,h)break;n*=46}e?e[s++]=n:e=new t(n)}return e}class mt{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 mt;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,n=this.pos+t;for(;n<i.from;){if(!s)return null;let r=this.ranges[--s];n-=i.from-r.to,i=r}for(;e<0?n>i.to:n>=i.to;){if(s==this.ranges.length-1)return null;let r=this.ranges[++s];n+=r.from-i.to,i=r}return n}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 n=this.resolveOffset(t,1);if(n==null)return-1;if(i=n,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)s=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let r=this.rangeIndex,h=this.range;for(;h.to<=i;)h=this.ranges[++r];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,n){let r=0,h=1<<i,{dialect:o}=e.p.parser;t:for(;(h&l[r])!=0;){let a=l[r+1];for(let m=r+3;m<a;m+=2)if((l[m+1]&h)>0){let x=l[m];if(o.allows(x)&&(t.token.value==-1||t.token.value==x||ke(x,t.token.value,s,n))){t.acceptToken(x);break}}let c=t.next,f=0,p=l[r+2];if(t.next<0&&p>f&&l[a+p*3-3]==65535){r=l[a+p*3-1];continue t}for(;f<p;){let m=f+p>>1,x=a+m+(m<<1),z=l[x],_=l[x+1]||65536;if(c<z)p=m;else if(c>=_)f=m+1;else{r=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(R.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 n=i.children[s],r=this.start[e]+i.positions[s];if(r>t)return this.nextStart=r,null;if(n instanceof I){if(r==t){if(r<this.safeFrom)return null;let h=r+n.length;if(h<=this.safeTo){let o=n.prop(O.lookAhead);if(!o||h+o<this.fragment.to)return n}}this.index[e]++,r+n.length>=Math.max(this.safeFrom,t)&&(this.trees.push(n),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+n.length}}}class be{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(i=>new mt)}getActions(t){let e=0,i=null,{parser:s}=t.p,{tokenizers:n}=s,r=s.stateSlot(t.state,3),h=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<n.length;a++){if((1<<a&r)==0)continue;let c=n[a],f=this.tokens[a];if(!(i&&!c.fallback)&&((c.contextual||f.start!=t.pos||f.mask!=r||f.context!=h)&&(this.updateCachedToken(f,c,t),f.mask=r,f.context=h),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let p=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!c.extend&&(i=f,e>p))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!i&&t.pos==this.stream.end&&(i=new mt,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 mt,{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:n}=i.p;for(let r=0;r<n.specialized.length;r++)if(n.specialized[r]==t.value){let h=n.specializers[r](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 n=0;n<s;n+=3)if(this.actions[n]==t)return s;return this.actions[s++]=t,this.actions[s++]=e,this.actions[s++]=i,s}addActions(t,e,i,s){let{state:n}=t,{parser:r}=t.p,{data:h}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(n,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:n}=s[0];this.stacks=[bt.start(this,t.top[0],n)],this.fragments=i.length&&this.stream.end-n>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,n;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let h=t[r];for(;;){if(this.tokens.mainToken=null,h.pos>e)i.push(h);else{if(this.advanceStack(h,i,t))continue;{s||(s=[],n=[]),s.push(h);let o=this.tokens.getMainToken(h);n.push(o.value,o.end)}}break}}if(!i.length){let r=s&&Oe(s);if(r)return Q&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);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 r=this.stoppedAt!=null&&s[0].pos>this.stoppedAt?s[0]:this.runRecovery(s,n,i);if(r)return Q&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(i.length>r)for(i.sort((h,o)=>o.score-h.score);i.length>r;)i.pop();i.some(h=>h.reducePos>e)&&this.recovering--}else if(i.length>1){t:for(let r=0;r<i.length-1;r++){let h=i[r];for(let o=r+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(r--,1);continue t}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let r=1;r<i.length;r++)i[r].pos<this.minStackPos&&(this.minStackPos=i[r].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:n}=this,r=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,c=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(s);f;){let p=this.parser.nodeSet.types[f.type.id]==f.type?n.getGoto(t.state,f.type.id):-1;if(p>-1&&f.length&&(!a||(f.prop(O.contextHash)||0)==c))return t.useNode(f,p),Q&&console.log(r+this.stackID(t)+` (via reuse of ${n.getName(f.type.id)})`),!0;if(!(f instanceof I)||f.children.length==0||f.positions[0]>0)break;let m=f.children[0];if(m instanceof I&&f.positions[0]==0)f=m;else break}}let h=n.stateSlot(t.state,4);if(h>0)return t.reduce(h),Q&&console.log(r+this.stackID(t)+` (via always-reduce ${n.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 c=o[a++],f=o[a++],p=o[a++],m=a==o.length||!i,x=m?t:t.split(),z=this.tokens.mainToken;if(x.apply(c,f,z?z.start:x.pos,p),Q&&console.log(r+this.stackID(x)+` (via ${(c&65536)==0?"shift":`reduce of ${n.getName(c&65535)}`} for ${n.getName(f)} @ ${s}${x==t?"":", split"})`),m)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,n=!1;for(let r=0;r<t.length;r++){let h=t[r],o=e[r<<1],a=e[(r<<1)+1],c=Q?this.stackID(h)+" -> ":"";if(h.deadEnd&&(n||(n=!0,h.restart(),Q&&console.log(c+this.stackID(h)+" (restarted)"),this.advanceFully(h,i))))continue;let f=h.split(),p=c;for(let m=0;m<10&&f.forceReduce()&&(Q&&console.log(p+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,i));m++)Q&&(p=this.stackID(f)+" -> ");for(let m of h.recoverByInsert(o))Q&&console.log(c+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,i);this.stream.end>h.pos?(a==h.pos&&(a++,o=0),h.recoverByDelete(o,a),Q&&console.log(c+this.stackID(h)+` (via recover-delete ${this.parser.getName(o)})`),Gt(h,i)):(!s||s.score<h.score)&&(s=h)}return s}stackToTree(t){return t.close(),I.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 n(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 c=h[a++];if(c>=0)n(c,o,h[a++]);else{let f=h[a+-c];for(let p=-c;p>0;p--)n(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 r=dt(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=dt(t.states,Uint32Array),this.data=dt(t.stateData),this.goto=dt(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(h=>typeof h=="number"?new st(r,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 n of this.wrappers)s=n(s,t,e,i);return s}getGoto(t,e,i=!1){let s=this.goto;if(e>=s[0])return-1;for(let n=s[e+1];;){let r=s[n++],h=r&1,o=s[n++];if(h&&i)return o;for(let a=n+(r>>1);n<a;n++)if(s[n]==t)return o;if(h)return-1}}hasAction(t,e){let i=this.data;for(let s=0;s<2;s++)for(let n=this.stateSlot(t,s?2:1),r;;n+=3){if((r=i[n])==65535)if(i[n+1]==1)r=i[n=X(i,n+2)];else{if(i[n+1]==2)return X(i,n+2);break}if(r==e||r==0)return X(i,n+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 n=this.stateSlot(t,1);s==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=X(this.data,n+2);else break;s=e(X(this.data,n+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((n,r)=>r&1&&n==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(n=>n.from==i);return s?s.to:i})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((i,s)=>{let n=t.specializers.find(h=>h.from==i.external);if(!n)return i;let r=Object.assign(Object.assign({},i),{external:n.to});return e.specializers[s]=Zt(r),r})),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 n of t.split(" ")){let r=e.indexOf(n);r>=0&&(i[r]=!0)}let s=null;for(let n=0;n<e.length;n++)if(!i[n])for(let r=this.dialects[e[n]],h;(h=this.data[r++])!=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:g.string,Number:g.number,"True False":g.bool,PropertyName:g.propertyName,Null:g.null,", :":g.separator,"[ ]":g.squareBracket,"{ }":g.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{R as I,O as N,se as P,I as T,g as a,At as b,$ as c,Pe as h,ve as p,ae as s,fe as t};
@@ -1 +1 @@
1
- import{F as b,V as p,c as k,E as y,g as d,R as x,D as C}from"./@codemirror-Rn7_6DkE.js";function A(r,t=r.state){const e=new Set;for(const{from:i,to:s}of r.visibleRanges){let n=i;for(;n<=s;){const o=t.doc.lineAt(n);e.has(o)||e.add(o),n=o.to+1}}return e}function m(r){const t=r.selection.main.head;return r.doc.lineAt(t)}function g(r,t){let e=0;t:for(let i=0;i<r.length;i++)switch(r[i]){case" ":case" ":{e+=1;continue t}case" ":{e+=t-e%t;continue t}case"\r":continue t;default:break t}return e}const f=b.define({combine(r){return k(r,{highlightActiveBlock:!0,hideFirstIndent:!1,markerType:"fullScope",thickness:1})}});class E{constructor(t,e,i,s){this.lines=t,this.state=e,this.map=new Map,this.unitWidth=i,this.markerType=s;for(const n of this.lines)this.add(n);this.state.facet(f).highlightActiveBlock&&this.findAndSetActiveLines()}has(t){return this.map.has(typeof t=="number"?t:t.number)}get(t){const e=this.map.get(typeof t=="number"?t:t.number);if(!e)throw new Error("Line not found in indentation map");return e}set(t,e,i){const s=!t.text.trim().length,n={line:t,col:e,level:i,empty:s};return this.map.set(n.line.number,n),n}add(t){if(this.has(t))return this.get(t);if(!t.length||!t.text.trim().length){if(t.number===1)return this.set(t,0,0);if(t.number===this.state.doc.lines){const o=this.closestNonEmpty(t,-1);return this.set(t,0,o.level)}const s=this.closestNonEmpty(t,-1),n=this.closestNonEmpty(t,1);return s.level>=n.level&&this.markerType!=="codeOnly"?this.set(t,0,s.level):s.empty&&s.level===0&&n.level!==0?this.set(t,0,0):n.level>s.level?this.set(t,0,s.level+1):this.set(t,0,n.level)}const e=g(t.text,this.state.tabSize),i=Math.floor(e/this.unitWidth);return this.set(t,e,i)}closestNonEmpty(t,e){let i=t.number+e;for(;e===-1?i>=1:i<=this.state.doc.lines;){if(this.has(i)){const o=this.get(i);if(!o.empty)return o}const n=this.state.doc.line(i);if(n.text.trim().length){const o=g(n.text,this.state.tabSize),a=Math.floor(o/this.unitWidth);return this.set(n,o,a)}i+=e}const s=this.state.doc.line(e===-1?1:this.state.doc.lines);return this.set(s,0,0)}findAndSetActiveLines(){const t=m(this.state);if(!this.has(t))return;let e=this.get(t);if(this.has(e.line.number+1)){const n=this.get(e.line.number+1);n.level>e.level&&(e=n)}if(this.has(e.line.number-1)){const n=this.get(e.line.number-1);n.level>e.level&&(e=n)}if(e.level===0)return;e.active=e.level;let i,s;for(i=e.line.number;i>1;i--){if(!this.has(i-1))continue;const n=this.get(i-1);if(n.level<e.level)break;n.active=e.level}for(s=e.line.number;s<this.state.doc.lines;s++){if(!this.has(s+1))continue;const n=this.get(s+1);if(n.level<e.level)break;n.active=e.level}}}function L(r){const t={light:"#F0F1F2",dark:"#2B3245",activeLight:"#E4E5E6",activeDark:"#3C445C"};let e=t;return r&&(e=Object.assign(Object.assign({},t),r)),y.baseTheme({"&light":{"--indent-marker-bg-color":e.light,"--indent-marker-active-bg-color":e.activeLight},"&dark":{"--indent-marker-bg-color":e.dark,"--indent-marker-active-bg-color":e.activeDark},".cm-line":{position:"relative"},".cm-indent-markers::before":{content:'""',position:"absolute",top:0,left:"2px",right:0,bottom:0,background:"var(--indent-markers)",pointerEvents:"none",zIndex:"-1"}})}function u(r,t,e,i,s){return`${`repeating-linear-gradient(to right, var(${r}) 0 ${t}px, transparent ${t}px ${e}ch)`} ${i*e}.5ch/calc(${e*s}ch - 1px) no-repeat`}function w(r,t,e,i,s){const{level:n,active:o}=r;if(s=s??i,e&&n===0)return[];const a=e?1:0,c=[];if(o!==void 0){const l=o-a-1;l>0&&c.push(u("--indent-marker-bg-color",i,t,a,l)),c.push(u("--indent-marker-active-bg-color",s,t,o-1,1)),o!==n&&c.push(u("--indent-marker-bg-color",i,t,o,n-o))}else c.push(u("--indent-marker-bg-color",i,t,a,n-a));return c.join(",")}class N{constructor(t){this.view=t,this.unitWidth=d(t.state),this.currentLineNumber=m(t.state).number,this.generate(t.state)}update(t){const e=d(t.state),i=e!==this.unitWidth;i&&(this.unitWidth=e);const s=m(t.state).number,n=s!==this.currentLineNumber;this.currentLineNumber=s;const o=t.state.facet(f).highlightActiveBlock&&n;(t.docChanged||t.viewportChanged||i||o)&&this.generate(t.state)}generate(t){const e=new x,i=A(this.view,t),{hideFirstIndent:s,markerType:n,thickness:o,activeThickness:a}=t.facet(f),c=new E(i,t,this.unitWidth,n);for(const l of i){const h=c.get(l.number);if(!(h!=null&&h.level))continue;const v=w(h,this.unitWidth,s,o,a);e.add(l.from,l.from,C.line({class:"cm-indent-markers",attributes:{style:`--indent-markers: ${v}`}}))}this.decorations=e.finish()}}function S(r={}){return[f.of(r),L(r.colors),p.fromClass(N,{decorations:t=>t.decorations})]}export{S as i};
1
+ import{F as b,V as p,c as k,E as y,g as d,R as x,D as C}from"./@codemirror-prKQ1WbH.js";function A(r,t=r.state){const e=new Set;for(const{from:i,to:s}of r.visibleRanges){let n=i;for(;n<=s;){const o=t.doc.lineAt(n);e.has(o)||e.add(o),n=o.to+1}}return e}function m(r){const t=r.selection.main.head;return r.doc.lineAt(t)}function g(r,t){let e=0;t:for(let i=0;i<r.length;i++)switch(r[i]){case" ":case" ":{e+=1;continue t}case" ":{e+=t-e%t;continue t}case"\r":continue t;default:break t}return e}const f=b.define({combine(r){return k(r,{highlightActiveBlock:!0,hideFirstIndent:!1,markerType:"fullScope",thickness:1})}});class E{constructor(t,e,i,s){this.lines=t,this.state=e,this.map=new Map,this.unitWidth=i,this.markerType=s;for(const n of this.lines)this.add(n);this.state.facet(f).highlightActiveBlock&&this.findAndSetActiveLines()}has(t){return this.map.has(typeof t=="number"?t:t.number)}get(t){const e=this.map.get(typeof t=="number"?t:t.number);if(!e)throw new Error("Line not found in indentation map");return e}set(t,e,i){const s=!t.text.trim().length,n={line:t,col:e,level:i,empty:s};return this.map.set(n.line.number,n),n}add(t){if(this.has(t))return this.get(t);if(!t.length||!t.text.trim().length){if(t.number===1)return this.set(t,0,0);if(t.number===this.state.doc.lines){const o=this.closestNonEmpty(t,-1);return this.set(t,0,o.level)}const s=this.closestNonEmpty(t,-1),n=this.closestNonEmpty(t,1);return s.level>=n.level&&this.markerType!=="codeOnly"?this.set(t,0,s.level):s.empty&&s.level===0&&n.level!==0?this.set(t,0,0):n.level>s.level?this.set(t,0,s.level+1):this.set(t,0,n.level)}const e=g(t.text,this.state.tabSize),i=Math.floor(e/this.unitWidth);return this.set(t,e,i)}closestNonEmpty(t,e){let i=t.number+e;for(;e===-1?i>=1:i<=this.state.doc.lines;){if(this.has(i)){const o=this.get(i);if(!o.empty)return o}const n=this.state.doc.line(i);if(n.text.trim().length){const o=g(n.text,this.state.tabSize),a=Math.floor(o/this.unitWidth);return this.set(n,o,a)}i+=e}const s=this.state.doc.line(e===-1?1:this.state.doc.lines);return this.set(s,0,0)}findAndSetActiveLines(){const t=m(this.state);if(!this.has(t))return;let e=this.get(t);if(this.has(e.line.number+1)){const n=this.get(e.line.number+1);n.level>e.level&&(e=n)}if(this.has(e.line.number-1)){const n=this.get(e.line.number-1);n.level>e.level&&(e=n)}if(e.level===0)return;e.active=e.level;let i,s;for(i=e.line.number;i>1;i--){if(!this.has(i-1))continue;const n=this.get(i-1);if(n.level<e.level)break;n.active=e.level}for(s=e.line.number;s<this.state.doc.lines;s++){if(!this.has(s+1))continue;const n=this.get(s+1);if(n.level<e.level)break;n.active=e.level}}}function L(r){const t={light:"#F0F1F2",dark:"#2B3245",activeLight:"#E4E5E6",activeDark:"#3C445C"};let e=t;return r&&(e=Object.assign(Object.assign({},t),r)),y.baseTheme({"&light":{"--indent-marker-bg-color":e.light,"--indent-marker-active-bg-color":e.activeLight},"&dark":{"--indent-marker-bg-color":e.dark,"--indent-marker-active-bg-color":e.activeDark},".cm-line":{position:"relative"},".cm-indent-markers::before":{content:'""',position:"absolute",top:0,left:"2px",right:0,bottom:0,background:"var(--indent-markers)",pointerEvents:"none",zIndex:"-1"}})}function u(r,t,e,i,s){return`${`repeating-linear-gradient(to right, var(${r}) 0 ${t}px, transparent ${t}px ${e}ch)`} ${i*e}.5ch/calc(${e*s}ch - 1px) no-repeat`}function w(r,t,e,i,s){const{level:n,active:o}=r;if(s=s??i,e&&n===0)return[];const a=e?1:0,c=[];if(o!==void 0){const l=o-a-1;l>0&&c.push(u("--indent-marker-bg-color",i,t,a,l)),c.push(u("--indent-marker-active-bg-color",s,t,o-1,1)),o!==n&&c.push(u("--indent-marker-bg-color",i,t,o,n-o))}else c.push(u("--indent-marker-bg-color",i,t,a,n-a));return c.join(",")}class N{constructor(t){this.view=t,this.unitWidth=d(t.state),this.currentLineNumber=m(t.state).number,this.generate(t.state)}update(t){const e=d(t.state),i=e!==this.unitWidth;i&&(this.unitWidth=e);const s=m(t.state).number,n=s!==this.currentLineNumber;this.currentLineNumber=s;const o=t.state.facet(f).highlightActiveBlock&&n;(t.docChanged||t.viewportChanged||i||o)&&this.generate(t.state)}generate(t){const e=new x,i=A(this.view,t),{hideFirstIndent:s,markerType:n,thickness:o,activeThickness:a}=t.facet(f),c=new E(i,t,this.unitWidth,n);for(const l of i){const h=c.get(l.number);if(!(h!=null&&h.level))continue;const v=w(h,this.unitWidth,s,o,a);e.add(l.from,l.from,C.line({class:"cm-indent-markers",attributes:{style:`--indent-markers: ${v}`}}))}this.decorations=e.finish()}}function S(r={}){return[f.of(r),L(r.colors),p.fromClass(N,{decorations:t=>t.decorations})]}export{S as i};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/scroll-into-view-if-needed-KR58zyjF.js","assets/compute-scroll-into-view-Bl8rNFhg.js"])))=>i.map(i=>d[i]);
2
- var xt=Object.defineProperty;var Ct=(r,e,t)=>e in r?xt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var h=(r,e,t)=>Ct(r,typeof e!="symbol"?e+"":e,t);import{g as _t,w as M,s as St,a as S,d as de,p as te,b as R,m as O,c,e as L,i as re,f as D,h as U,j as Z,k as A,l as se,n as pe,o as Ne,q as ee,r as W,t as N,u as Re,v as Et,x as Ye,y as oe,z as He,A as Pt,B as ne,C as Ce,D as _e,E as At,F as me,G as Pe,H as Ue,I as It,J as Nt,K as Ut,L as he,M as Y,N as Ft,O as kt,P as Se}from"./svelte-B2XmcTi_.js";import{c as X,a as Lt,b as Dt}from"./hookar-BMRD9G9H.js";import{c as Ot}from"./consolite-DlCuI0F9.js";var ge={};const ae=Ot("[rf3]");ae.register("verbose",console.log);ae.levels.verbose=5;const Tt=()=>(Object.assign(ae,Bt()),new Proxy(ae,{get:(r,e)=>r[e.toString()],set:(r,e,t)=>(r[e.toString()]=t,Ht(ae),!0)})),Bt=()=>{if(typeof window>"u"){const r=ge.DEBUG_LEVEL,e=ge.DEBUG_FILTER;return{level:r,filter:e}}else return JSON.parse(localStorage.getItem("__routify.logState")||"{}")},Ht=r=>{const{level:e,filter:t}=r;typeof window>"u"?(ge.DEBUG_LEVEL=e,ge.DEBUG_FILTER=t):localStorage.setItem("__routify.logState",JSON.stringify({filter:t,level:e}))},Me=(r,e)=>((...t)=>{const s=r(...t);return ae.debug(e,{params:t,result:s}),s}),je=r=>({toRouter:(t,s)=>{const n=s.name?`${s.name}/(.+?)`:"(.+?)",a=new RegExp(`(^|;)${n}(;|$)`),o=t.match(a);return o?o[2]:"/"},toBrowser:t=>t.filter(s=>s.url.external()!==""||!s.name).map(s=>(s.name?`${s.name}`:"")+s.url.external()).join(";")});class Mt{constructor(){h(this,"instances",[]);h(this,"routeMaps",{});h(this,"browserAdapter",je());h(this,"urlFromBrowser",e=>Me?Me(this.browserAdapter.toRouter,"calling browserAdapter.toRouter")(ve(),e):this.browserAdapter.toRouter(ve(),e));globalThis.__routify=this,this.log=Tt()}get routers(){return[].concat(...this.instances.map(e=>e.routers))}reset(){this.instances=[],this.routeMaps={},this.browserAdapter=je()}register(e){return this.instances.push(e),this}}const ie=new Mt,Ze="routify-fragment-context",ye=r=>{try{return _t(Ze)}catch(e){if(e.message.includes("lifecycle_outside_component")||e.message.includes("Function called outside component initialization")){if(globalThis._routify_suppress_life_cycle_warning||r)return;console.error(`Routify: Unable to access context.
2
+ var xt=Object.defineProperty;var Ct=(r,e,t)=>e in r?xt(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var h=(r,e,t)=>Ct(r,typeof e!="symbol"?e+"":e,t);import{g as _t,w as M,s as St,a as S,d as de,p as te,b as R,m as O,c,e as L,i as re,f as D,h as U,j as Z,k as A,l as se,n as pe,o as Ne,q as ee,r as W,t as N,u as Re,v as Et,x as Ye,y as oe,z as He,A as Pt,B as ne,C as Ce,D as _e,E as At,F as me,G as Pe,H as Ue,I as It,J as Nt,K as Ut,L as he,M as Y,N as Ft,O as kt,P as Se}from"./svelte-B9Ye91X-.js";import{c as X,a as Lt,b as Dt}from"./hookar-BMRD9G9H.js";import{c as Ot}from"./consolite-DlCuI0F9.js";var ge={};const ae=Ot("[rf3]");ae.register("verbose",console.log);ae.levels.verbose=5;const Tt=()=>(Object.assign(ae,Bt()),new Proxy(ae,{get:(r,e)=>r[e.toString()],set:(r,e,t)=>(r[e.toString()]=t,Ht(ae),!0)})),Bt=()=>{if(typeof window>"u"){const r=ge.DEBUG_LEVEL,e=ge.DEBUG_FILTER;return{level:r,filter:e}}else return JSON.parse(localStorage.getItem("__routify.logState")||"{}")},Ht=r=>{const{level:e,filter:t}=r;typeof window>"u"?(ge.DEBUG_LEVEL=e,ge.DEBUG_FILTER=t):localStorage.setItem("__routify.logState",JSON.stringify({filter:t,level:e}))},Me=(r,e)=>((...t)=>{const s=r(...t);return ae.debug(e,{params:t,result:s}),s}),je=r=>({toRouter:(t,s)=>{const n=s.name?`${s.name}/(.+?)`:"(.+?)",a=new RegExp(`(^|;)${n}(;|$)`),o=t.match(a);return o?o[2]:"/"},toBrowser:t=>t.filter(s=>s.url.external()!==""||!s.name).map(s=>(s.name?`${s.name}`:"")+s.url.external()).join(";")});class Mt{constructor(){h(this,"instances",[]);h(this,"routeMaps",{});h(this,"browserAdapter",je());h(this,"urlFromBrowser",e=>Me?Me(this.browserAdapter.toRouter,"calling browserAdapter.toRouter")(ve(),e):this.browserAdapter.toRouter(ve(),e));globalThis.__routify=this,this.log=Tt()}get routers(){return[].concat(...this.instances.map(e=>e.routers))}reset(){this.instances=[],this.routeMaps={},this.browserAdapter=je()}register(e){return this.instances.push(e),this}}const ie=new Mt,Ze="routify-fragment-context",ye=r=>{try{return _t(Ze)}catch(e){if(e.message.includes("lifecycle_outside_component")||e.message.includes("Function called outside component initialization")){if(globalThis._routify_suppress_life_cycle_warning||r)return;console.error(`Routify: Unable to access context.
3
3
  If you're using Svelte 5, ensure $ helpers are accessed at the root level of your component.`)}else throw e}},jt=()=>ye(!0),et=r=>St(Ze,r),qt=r=>r.ctrlKey||r.metaKey||r.altKey||r.shiftKey||r.button||r.key&&r.key!=="Enter"||r.defaultPrevented,Wt=r=>{try{return JSON.parse(r)}catch{return r}},Vt=r=>{const e={};for(let t in r.dataset)if(t.startsWith("routifyRouteState")){const s=t.replace("routifyRouteState",""),n=s.charAt(0).toLowerCase()+s.slice(1);e[n]=Wt(r.dataset[t])}return e},qe=r=>{const e=r.target.closest("a"),t=e&&e.href;if(!t||e.target||e.host!==location.host)return{};const s=new URL(t);return r.preventDefault(),{url:s.pathname+s.search+s.hash,state:Vt(e)}},Jt=r=>[...r].reduce((e,[t,s])=>(e[t]=s,e),{}),tt=(r,e,t)=>{const s={};Object.entries(e).forEach(([a,o],i)=>{const d=new RegExp(`\\[(...)?${a}\\]|\\:${a}`);if(r.match(d)){const f=Array.isArray(o)?o.join("/"):o;r=r.replace(d,encodeURI(f))}else s[a]=o});const n=t(s);return{path:r,query:n}},ve=()=>(({pathname:r,search:e,hash:t})=>r+e+t)(window.location),We=()=>{globalThis._routify_suppress_helper_warning||console.log("Using helpers outside router context is not supported. Use at own risk.");const r=ie.routers[0],e=r.activeRoute.get()||r.pendingRoute.get();return{elem:null,anchorLocation:null,options:null,childFragments:M(e.allFragments),node:r.rootNode,fragment:e.allFragments[0],isActive:M(!1),isVisible:M(!1),inline:null,router:r,route:e,parentContext:null,onDestroy:null,decorators:[],scrollLock:null,isInline:null,mounted:null}},we={get router(){return(ye()||We()).router},get fragment(){return ye()||We()}},Ve=(r,e)=>{const t=M(r,e);return Object.assign(t,{get:()=>S(t)})},zt=(...r)=>r.map(e=>JSON.stringify([e==null?void 0:e.allFragments,e==null?void 0:e.url])).reduce((e,t)=>e===t&&t),rt=r=>typeof r=="function"&&!r.prototype,st=(r,e)=>rt(r)?r(...e):r,Kt=(r,e)=>{const t=rt(e);e=t||Array.isArray(e)?e:[e];const s=t?e([...r]):[...r,...e];if(!Array.isArray(s))throw new Error("anonymous callback did not return array");return s},nt=(r,e)=>new Promise((t,s)=>{try{const n=r.subscribe(a=>{e(a)&&(t(a),setTimeout(()=>n))})}catch(n){s(n)}}),ot=()=>{let r,e;const t=new Promise((s,n)=>{r=s,e=n});return Object.assign(t,{resolve:r,reject:e})},Gt=r=>"/"+r.replace(/^\/+/,""),Qt=(r,e)=>{console.warn("Failed to rebuild routes",{context:r,childContexts:e});const t="Infinite loop detected while trying to compose components. This is likely an error in Routify.";throw new Error(t)},at=(r,e)=>{const t=[r,...r.ancestors],s=[e,...e.ancestors],n=t.find(f=>s.includes(f)),a=t.indexOf(n),o=s.indexOf(n),i=t.slice(0,a).reverse(),d=s.slice(0,o).reverse();return{mrca:n,index1:a,index2:o,lineage1:t,lineage2:s,descendants1:i,descendants2:d}},$t=(r,e)=>{const{index1:t,index2:s,lineage2:n}=at(r,e),a=t,o=a?"../".repeat(a):"",i=s,d=n.slice(0,i).reverse().map(f=>f.name).join("/");return o+d},Xt={subscribe:(r,e)=>{const{router:t}=we;return de(Yt,s=>(n,a,o)=>{o={...{mode:"push",state:{}},...o};const d=s(n,a,o);return t.url[o.mode](d,o.state),""}).subscribe(r,e)}},Yt={subscribe:(r,e)=>{const{fragment:t,router:s}=we;return de(t.params,n=>(a,o,i)=>{const d=it(s,t.fragment);if(!(globalThis.HTMLElement&&a instanceof HTMLElement))return d(a,o,i);const f=a.getAttribute("href");a.setAttribute("href",d(f,n,i))}).subscribe(r,e)}},it=(r,e)=>(t,s={},n={})=>{let a=typeof t=="string"?t:t===null?"$leaf":t==null?void 0:t.path;e=e||r.activeRoute.get().leaf;const o=e.route;n.strict=n.strict??!0;const i=r.rootNode.traverse(e.node.path);r.rootNode.path!=="/"&&a.startsWith(r.rootNode.path)&&(a=a.substring(r.rootNode.path.length));const d=o==null?void 0:o.leaf.node.path,f=a.replace("$leaf",d||e.node.path),u=((f.startsWith("/")?r.rootNode.path:"")+f).replace(/^\/+/,"/"),m=!u.startsWith("/")&&!u.startsWith(".");let p,w={};if(m)p=i.root.instance.nodeIndex.find(I=>I.meta.name===P);else{const I=i.getChainTo(u,{...n,allowDynamic:!n.strict});w=Object.assign({},...I.map(T=>T.params)||[]),p=I.pop().node}if(!p){console.error("could not find destination node",f);return}const E=at(p,r.rootNode).mrca,P=("/"+$t(E,p)).replace(/\/index$/,"/"),g={...w,...Zt(p,o||r.activeRoute.get()),...s},v=g["#"];delete g["#"];const x=tt(P,g,I=>r.queryHandler.stringify(I,o)),F=r.getExternalUrl(x.path+x.query).replace(/\/$/,"")||"/";return v?F+"#"+v:F},Zt=(r,e)=>{const t=e.allFragments.map(s=>s.node.getChainToNode(r)&&s.params);return Object.assign({},...t)},er={subscribe:(r,e)=>we.router.params.subscribe(r,e)},tr=r=>Object.fromEntries(Object.entries(r).filter(([,e])=>e!==void 0)),rr=de(Xt,r=>e=>r("$leaf",tr(e)));de([rr,er],([r,e])=>t=>r(t({...e})));const ms={subscribe:r=>we.router.activeRoute.subscribe(r)},sr=r=>r instanceof Array?r.map(decodeURI):decodeURI(r),lt=r=>Object.entries(r).reduce((e,[t,s])=>({...e,[t]:sr(s)}),{});class nr{constructor(){this.map=new Map}async fetch(e,t){return this.map.has(e)||this.map.set(e,t.hydrate()),this._handlePromise(e,t),this.map.get(e)}async _handlePromise(e,t){var a;const s=await this.map.get(e),n=(a=t.clear)==null?void 0:a.call(t,s);typeof n=="number"?setTimeout(()=>this.map.delete(e),n):n&&this.map.delete(e)}}class Ae{constructor(e,t,s="",n={}){this.route=e,this.node=t,this.load=void 0,this.urlFragment=s,this.params=n,this.renderContext=ot(),Object.defineProperty(this,"route",{enumerable:!1}),this.params=lt({...this.node.meta.isDefault,...n})}}const or=["pushState","replaceState","popState"],ar=new nr;let ir=0;class lr{constructor(e,t,s,n={}){h(this,"allFragments",[]);h(this,"fragments",[]);h(this,"load",{status:200,error:null,maxage:null,props:{},redirect:null});h(this,"prevRoute");h(this,"nextRoute");if(this.sourceUrl=typeof t=="string"?new URL(t,"http://localhost"):t,this.router=e,this.mode=s,this.state=n,this.state.createdAt=new Date,this.state.id=this.state.id??Date.now()+"-"+ir++,!e.rootNode){const a=new Error("Can't navigate without a rootNode. Have you imported routes?");throw Object.assign(a,{routify:{router:e}}),a}if(!or.includes(s))throw new Error("url.mode must be pushState, replaceState or popState");this.allFragments=this._createFragments(this.sourceUrl.pathname),this.params={...this.queryParams,...this.fragmentParams},this.fragments=this.router.transformFragments.run(this.allFragments),this.url=this._createUrl(),this.rendered=Promise.all(this.fragments.map(a=>a.renderContext)),this.log=e.log.createChild("[route]"),this.log.debug("created",this)}get fragmentParams(){return this.allFragments.reduce((e,t)=>({...e,...t.params}),{})}get queryParams(){return this.router.queryHandler.parse(this.sourceUrl.search,this)}get leaf(){return[...this.fragments].pop()}get isPendingOrPrefetch(){return this===this.router.pendingRoute.get()||this.state.prefetch}get isActive(){return this.router.activeRoute.get()===this}async loadRoute(){const e=[this.runBeforeUrlChangeHooks,this.loadComponents,this.runPreloads];for(const t of e){const s=await t.bind(this)();if(!this.isPendingOrPrefetch||!s)return!1}return this.log.debug("loaded route",this),!0}async loadComponents(){this.log.debug("load components",this);const e=this.fragments.map(s=>s.node),t=e.map(s=>s.children.find(n=>n.meta.isDecorator||n.meta.isInlineWrapper)).filter(Boolean);return await Promise.all([...e,...t].map(s=>s.loadModule())),!0}async runPreloads(){var t;this.log.debug("run preloads",this);const e=this.router.activeRoute.get();for(const[s,n]of this.fragments.entries()){if(!this.isPendingOrPrefetch)return!1;const a=e==null?void 0:e.fragments[s],o=n.node===(a==null?void 0:a.node),i={route:this,url:it(this.router,n),prevRoute:e,isNew:!o,fetch,fragment:n};if((t=n.node.module)!=null&&t.load){const d=JSON.stringify([this.params,n.node.id]),f=await ar.fetch(d,{hydrate:()=>n.node.module.load(i),clear:l=>(l==null?void 0:l.expire)||!this.state.prefetch});if(n.load={...o&&a.load,...f},Object.assign(this.load,n.load),this.load.redirect&&!this.state.prefetch)return this.router.url.replace(this.load.redirect,{redirectedBy:this})}}return this}async runBeforeUrlChangeHooks(){return await this.router.beforeUrlChange.run({route:this})}get meta(){return this.fragments.reduce((e,t)=>({...e,...t.node.meta}),{})}createFragment(e,t="",s={}){return new Ae(this,e,t,s)}_createFragments(e){const t=this.router.rootNode;return this.router.rootNode.getChainTo(e,{rootNode:t,allowDynamic:!0,includeIndex:!0,navigableChildrenOnly:!0}).map(a=>this.createFragment(a.node,a.fragment,a.params))}_createUrl(){const e=o=>this.router.queryHandler.stringify(o,this),t=this.allFragments.map((o,i)=>i?o.node.name:"").join("/"),s=tt(t,this.params,e),a=this.router.options.trailingSlash==="always"||this.router.options.trailingSlash==="preserve"&&this.sourceUrl.pathname.endsWith("/")||this.router.options.trailingSlash==="contextual"&&[...this.allFragments].pop().node.name==="index"?"/":"";return s.path.replace(/\/index$/,"")+a+s.query+this.sourceUrl.hash}}class ct{constructor(e,t){this.router=e,this.log=this.router.log}install(){}uninstall(){}reflect(){}}const cr=(r,e,t)=>new Promise(s=>{let n;n=r.subscribe(a=>{n&&(typeof e>"u"||a===e||a==e||typeof e=="function"&&e(a))&&s(a)})}),Je=(r,e)=>JSON.stringify(S(r))!==JSON.stringify(e)&&r.set(e),ur=r=>JSON.parse(JSON.stringify(r)),hr=(r,e)=>{const t=new Map,s=(n,a)=>{const o=r();t.has(n)||t.set(n,new Map);const i=t.get(n);return i.has(o)||i.set(o,n.bind(e||a||void 0)()),i.get(o)};return s.storage=t,s},dr=r=>{const{subscribe:e,set:t,update:s}=M(r);return{subscribe:e,set:t,update:s,get:()=>S({subscribe:e})}};class fr{constructor(e,t,s){h(this,"parent");h(this,"meta",{});h(this,"id");this.instance=s,this.name=e||"",s.nodeIndex.push(this),this.module=t,this._cacheByName=hr(()=>this.name,this),Object.defineProperty(this,"_cacheByName",{enumerable:!1}),Object.defineProperty(this,"instance",{enumerable:!1}),Object.defineProperty(this,"parent",{enumerable:!1})}appendChild(e){e.instance&&(e.parent=this)}createChild(e,t){const s=this.instance.createNode(e,t);return this.appendChild(s),s}clone(){var t;const e=this.instance.createNode(this.name,this.module);return(t=this.parent)==null||t.appendChild(e),Object.assign(e,this),e.meta={...this.meta},e}deepClone(){const e=this.clone();return this.children.forEach(t=>e.appendChild(t.deepClone())),e}get descendants(){return this.instance.nodeIndex.filter(e=>e.ancestors.find(t=>t===this))}remove(){const{nodeIndex:e}=this.instance,t=e.findIndex(s=>s===this);e.splice(t,1)}get ancestors(){let e=this;const t=[];for(;e=e.parent;)t.push(e);return t}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get isRoot(){return this===this.root}get children(){return this.instance.nodeIndex.filter(e=>e.parent===this).sort((e,t)=>(e.meta.order||0)-(t.meta.order||0))}get navigableChildren(){return this.children.filter(e=>!e.meta.noRoute)}get linkableChildren(){return this.navigableChildren.filter(e=>e.meta.order!=!1)}get level(){var e;return(((e=this.parent)==null?void 0:e.level)||0)+1}_getRegex(){return this.instance.utils.getRegexFromName(this.name)}get regex(){return this._cacheByName(this._getRegex)}_getParamKeys(){return this.instance.utils.getFieldsFromName(this.name)}get paramKeys(){return this._cacheByName(this._getParamKeys)}_getSpecificity(){return[this.name.replace(/\[.+?\]/g,"").length,this.paramKeys.length]}get specificity(){return this._cacheByName(this._getSpecificity)}getParams(e){if(e.match(/^\.+$/))return{};const t=this.instance.utils.getValuesFromPath(this.regex,e);return this.instance.utils.mapFieldsWithValues(this.paramKeys,t)}traverse(e,t){var n;return!e.startsWith("/")&&!e.startsWith(".")?this.root.instance.nodeIndex.find(a=>a.meta.name===e):(n=this.getChainTo(e,t))==null?void 0:n.pop().node}getChainTo(e,t){t={allowDynamic:!1,includeIndex:!1,navigableChildrenOnly:!1,silent:!1,...t};const s=t.navigableChildrenOnly?"navigableChildren":"children",n=e.startsWith("/")?t.rootNode||this.root:this,a=e.split("/").filter(l=>l!==".").filter(Boolean);let o={node:n,stepsToLeaf:a,params:{},fragment:""};const i=[o];let d=!1,f=!1;for(;o.stepsToLeaf.length;){const[l,...u]=o.stepsToLeaf,m=l===".."?o.node.parent:!d&&o.node[s].find(p=>p.name===l)||t.allowDynamic&&!f&&[...o.node[s]].sort((p,w)=>w.specificity[0]-p.specificity[0]||w.specificity[1]-p.specificity[1]).filter(({meta:p})=>p.dynamic&&!p.dynamicSpread).find(p=>p.regex.test(l))||t.allowDynamic&&o.node[s].find(p=>p.meta.dynamicSpread);if(m){const p={node:m,params:m.meta.dynamicSpread?[l]:m.meta.dynamic?m.getParams(l):{},stepsToLeaf:u,fragment:l};o=p,i.push(p)}else if(t.allowDynamic)if(o.node.meta.dynamicSpread)o.params.push(l),o.fragment+=`/${l}`,o.stepsToLeaf.shift(),f=!1,d=!1;else{if(i.pop(),o=[...i].pop(),f=d,d=!0,!o&&t.silent)return null;if(!o&&!t.silent)throw new Error(`Could not find path "${e}" from ${this.name}`)}else{if(!t.silent||t.silent==="report"){const p=i.map(E=>E.node.name||"root").join("/"),w=new Error(`${p} could not travel to ${l}`);if(w.name="404",t.silent==="report")console.error(w);else throw w}return null}}try{t.includeIndex&&o.node.getDefaults().forEach(l=>{const u={node:l,params:{},stepsToLeaf:[],fragment:""};i.push(u)})}catch{}return i.forEach(l=>{l.params=Array.isArray(l.params)?{[l.node.name.replace(/\[\.\.\.(.+)\]/,"$1")]:l.params}:l.params}),i}getChainToNode(e){const t=[];do if(t.unshift(e),e===this)return t;while(e=e.parent)}getDefaults(e="children"){const t=this[e].find(s=>s.meta.isDefault||s.name==="index");return t?[t,...t.getDefaults(e)]:[]}toJSON(){return{...this,children:[...this.children]}}get path(){return"/"+[this,...this.ancestors].reverse().map(e=>e.name).filter(Boolean).join("/")}}function mr(r,e){var l;te(e,!1);let t=R(e,"node",8),s=R(e,"passthrough",8);const n={...ye(),node:t()};et(n);let a=O((l=t().module)==null?void 0:l.default);!c(a)&&t().asyncModule&&t().asyncModule().then(u=>L(a,u.default)),re();var o=D(),i=U(o);{var d=u=>{var m=D(),p=U(m);pe(p,()=>c(a),(w,E)=>{E(w,Ne(s,{get context(){return n},children:(P,g)=>{var v=D(),y=U(v);ee(y,e,"default",{},null),A(P,v)},$$slots:{default:!0}}))}),A(u,m)},f=u=>{var m=D(),p=U(m);ee(p,e,"default",{},null),A(u,m)};Z(i,u=>{c(a)?u(d):u(f,!1)})}A(r,o),se()}function Fe(r,e){let t=R(e,"context",8,null),s=R(e,"Parent",8,null);t(),s();var n=D(),a=U(n);ee(a,e,"default",{},null),A(r,n)}const pr=Object.freeze(Object.defineProperty({__proto__:null,default:Fe},Symbol.toStringTag,{value:"Module"}));class ut extends fr{constructor(t,s,n,a){super(t,s,n);h(this,"asyncModule");h(this,"module");h(this,"importTree",t=>{const s=[[this,t]];for(;s.length;){const[n,a]=s.pop(),{children:o,...i}=a;Object.assign(n,i);for(const d of o){const f=n.createChild(a.name||a.rootName||"");s.push([f,d])}}return this});this.module=s,this.asyncModule=a,!s&&!a&&(this.meta.isNoop=!0)}get pages(){return console.log("DEPRECATED node.pages: use .linkableChildren instead"),this.pagesWithIndex.filter(t=>t.name!=="index")}get title(){const t=()=>this.name.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase());return this.meta.title||t()}get pagesWithIndex(){return console.log("DEPRECATED node.pagesWithIndex: use .linkableChildren instead"),this.children.filter(t=>!t.meta.fallback).filter(t=>!t.name.startsWith("_")).filter(t=>!t.name.includes("[")).filter(t=>{var s;return((s=t.meta)==null?void 0:s.order)!==!1})}get hasComponent(){return!!(this.module||this.asyncModule)}async getRawComponent(){const t=await this.loadModule();return t==null?void 0:t.default}async asyncLoadModule(){let t=[];return(this.meta.bundle||typeof window>"u")&&(t=this.children.map(s=>s.loadModule())),[this.module]=await Promise.all([this.asyncModule(),...t]),this.module}loadModule(){return!this.module&&!this.asyncModule&&(this.module=pr),this.module||this.asyncLoadModule()}get component(){const t=this;return function(s){return s.props={...s.props,passthrough:s.props,node:t},new mr({...s})}}get _fallback(){var t;return this.children.find(s=>s.meta.fallback)||((t=this.parent)==null?void 0:t._fallback)}}const gr=/\[(.+?)\]/gm;class yr{constructor(e=gr){h(this,"getFieldsFromName",e=>[...e.matchAll(this.RE)].map(t=>t[1]));h(this,"getRegexFromName",e=>new RegExp("^"+e.replace(this.RE,"(.+)")+"$"));h(this,"getValuesFromPath",(e,t)=>(t.match(e)||[]).slice(1));h(this,"mapFieldsWithValues",(e,t)=>this.haveEqualLength(e,t)&&e.reduce((s,n,a)=>(s[n]=t[a],s),{}));h(this,"haveEqualLength",(e,t)=>{if(e.length!==t.length)throw new Error(`fields and values should be of same length
4
4
  fields: ${JSON.stringify(e)}
5
5
  values: ${JSON.stringify(t)}`);return!0});this.RE=e}}class vr{constructor(){h(this,"NodeConstructor");h(this,"NodeType");h(this,"nodeIndex",[]);h(this,"rootNodes",{});h(this,"utils",new yr)}createNode(e,t){return new this.NodeConstructor(e,t,this)}}class Rr extends vr{constructor(t){super();h(this,"NodeConstructor",ut);h(this,"mode","runtime");h(this,"routers",[]);h(this,"rootNodes",{});this.options=t,t.routes&&(this.rootNodes[t.routes.rootName||"unnamed"]=this.createNode(t.routes.rootName).importTree(t.routes)),this.global=ie.register(this),Object.defineProperty(this,"routers",{enumerable:!1}),this.log=this.global.log}}let Ee=!1;const wr={interceptHistory:!0};class br extends ct{constructor(t,s){super(t);h(this,"_reflect",()=>{const{mode:t}=S(this.router.activeRoute),s=t!="popState"?this._getRouterUrl():null,n=this._createState(),a=t==="popState"?"replaceState":t;this.log.debug("pushing internal state to browser history",{mode:t,url:s,state:n,currentBrowserUrl:ve(),currentInternalUrl:this.router.url.internal()}),history[`${a}Native`](n,"",s)});const{instance:n,urlRewrites:a}=t,{urlFromBrowser:o,browserAdapter:i}=n.global;s={...wr,...s},history.onPushstate||(this.log.debug("polyfill history hooks"),xr());const d=f=>function(l,u,m){var E;if(!((l==null?void 0:l.useRoutify)??s.interceptHistory))return history[`${f}StateNative`](l,u,m);const w=((E=l==null?void 0:l.routify)==null?void 0:E.router)??!1;if(w===!1)m=i.toRouter(m,t);else if(w!==t.name)return!1;for(const P of a)m=P.toInternal(m,{router:t});t.url[f](m)};this.absorb=()=>{var l,u,m;const f=(m=(u=(l=history.state)==null?void 0:l.routify)==null?void 0:u.router)==null?void 0:m[t.name];t.url.replace(o(t),f||{})},this._pushstateHandler=d("push"),this._replacestateHandler=d("replace"),this._popstateHandler=f=>{var l,u;return t.url.pop(o(t),(u=(l=f.state)==null?void 0:l.routify)==null?void 0:u.router[t.name])}}install(){this.hooks=[history.onPushstate(this._pushstateHandler),history.onReplacestate(this._replacestateHandler),history.onPopstate(this._popstateHandler)],this.router.activeRoute.get()?this.reflect():this.absorb()}uninstall(){this.hooks.forEach(t=>t()),setTimeout(()=>this.reflect())}reflect(){Ee||(Ee=!0,setTimeout(()=>{Ee=!1,this._reflect()}))}_getRouterUrl(){const{routers:t,browserAdapter:s}=this.router.instance.global,n=i=>i.urlReflector instanceof this.constructor,a=t.filter(n);let o=s.toBrowser(a);return Gt(o)}_createState(){var n,a;const t={...(n=this.router.activeRoute.get())==null?void 0:n.state};t.redirectedBy=(a=t.redirectedBy)==null?void 0:a.url;const s={...history.state};return s.routify=s.routify||{router:{}},s.routify.router[this.router.name]=t,s}}function xr(){const r={onPushstate:X(),onReplacestate:X(),onPopstate:X()};Object.assign(history,r);const{pushState:e,replaceState:t}=history;return history.pushStateNative=e,history.replaceStateNative=t,history.pushState=r.onPushstate.run,history.replaceState=r.onReplacestate.run,window.addEventListener("popstate",r.onPopstate.run),!0}class Cr extends ct{install(){this.router.url.replace("/")}}const _r=r=>{const e=r.match(/^(.+?)(\+)?$/),[,t,s]=e;return{name:t,prepend:s}},Sr=(r,e)=>{const t=n=>r.indexOf(n),s={boolean(n,a){const o=t(a);return s.number(o,a)},number(n,a){const i=r.indexOf(a)-n;r.splice(i,n)},string(n,a){const o=t(a),i=r.slice(0,o+1);let d;const{name:f,prepend:l}=_r(n);for(;i.length;){d=i.pop();const u=d.node.children.find(m=>m.meta.moduleName===f);u&&(l||r.splice(0,t(a)),r.unshift(e.createFragment(u)),i.splice(0))}}};return s},Er=r=>e=>{const{reset:t}=e.node.meta;t&&r[typeof t](t,e)},Pr=()=>({transformFragments:r=>{const{route:e}=r[0],t=[...r],s=Sr(t,e);return r.forEach(Er(s)),t}}),Ar=()=>({urlRewrite:[{toExternal:r=>r.replace(/\/index(?=$|\?|#)/,""),toInternal:r=>r}]}),ht=r=>{const e=r.parentElement;return e?e.dataset.hasOwnProperty("routifyScrollLock")?e:ht(e):null};function Ir(r){let e=0,t=null;return new Promise(s=>{requestAnimationFrame(n);function n(){const{top:a,left:o}=r.getBoundingClientRect(),i=a+"/"+o;e++,i===t&&e>2?s():(t=i,requestAnimationFrame(n))}})}const Nr=(r,e,t)=>{r(),new ResizeObserver(()=>{});const s=new MutationObserver(n=>{n.some(o=>o.type==="childList"||o.type==="characterData")&&r()});return s.observe(document.body,{childList:!0,subtree:!0,characterData:!0}),setTimeout(()=>s.disconnect(),t),s},Ur=r=>{r.oldBehavior=r.oldBehavior||r.style.scrollBehavior},ze=r=>{r.oldBehavior?r.style.scrollBehavior=r.oldBehavior:r.style.removeProperty("scroll-behavior"),delete r.oldBehavior},Fr=r=>{const e=[];let t=r.parentElement;for(;t;)e.push(t),t=t.parentElement;return e};class kr{constructor(e){h(this,"elem");h(this,"ctx");h(this,"isInstant");h(this,"scrollTarget");this.ctx=e,this.route=e.route}async init(){var a,o,i;const{ctx:e}=this,{anchor:t,parent:s}=await nt(e.elem,Boolean);this.scrollTarget=t||s;const n=(a=e.route)==null?void 0:a.sourceUrl.hash.slice(1);this.hashElem=n&&((o=globalThis.document)==null?void 0:o.getElementById(n)),this.elem=this.hashElem||this.scrollTarget,this.isInstant=((i=e.route)==null?void 0:i.state.dontsmoothscroll)||!e.wasVisible,this.scrollLock=await this.getNearestScrollLock()}async getNearestScrollLock(){const e=await st(this.ctx.scrollLock,[this.ctx,this.scrollTarget,this]),t=Array.isArray(e)?[...e]:[e];let s=this.elem.parentElement;for(;s&&!t.includes(s);)s=s.parentElement;return s}async handleScrollInstructions(){return Nr(()=>this.ctx.inline.scrollIntoView(this.elem,this.isInstant,{boundary:this.scrollLock}),!0,300),Ir(this.elem)}}const Lr=(r,e,t)=>t.filter(s=>s.scrollLock===r.scrollLock).pop()===r,Dr=(r,e)=>{let t=r.parentElement;for(;t!=null&&t.scrollTo&&e!==t;){const s=t.style.scrollBehavior;t.style.scrollBehavior="auto",t.scrollTo(0,0),t.style.scrollBehavior=s,t=t.parentElement}};class Or{constructor(){h(this,"queue",[])}async push(e){const t=new kr(e);this.queue.push({scrollCtx:t,promise:t.init()})}async processQueue(e){console.debug("processing scroll queue",this.queue),this.queue=this.queue.filter(({scrollCtx:o})=>o.route===e),await Promise.all(this.queue.map(({promise:o})=>o));const t=this.queue.map(({scrollCtx:o})=>o).filter(o=>o.elem);await new Promise(o=>setTimeout(o,0));const s=o=>!o.ctx.isInline&&!o.hashElem,n=o=>o.ctx.isInline||o.hashElem,a=(o,i,d)=>o.ctx.inline.shouldScroll(o,i,d,Lr);this.processRegularQueue(t.filter(s)),this.processInlineAndHashQueue(t.filter(n).filter(a))}processRegularQueue(e){for(const t of e)console.debug("scroll to top",t.ctx.node.name,t),Dr(t.elem,t.scrollLock)}async processInlineAndHashQueue(e){const t=e.shift();for(const s of e)s.isInstant=!0,await s.handleScrollInstructions();t&&await t.handleScrollInstructions()}}const Ie=new Or,Tr=r=>{const e=[];for(;r;)e.push(r),r=r.parentContext;return e};function Br(r,e){te(e,!1);const t=O();let s=R(e,"context",8);R(e,"isRoot",8)();const a=l=>l.sourceUrl.hash&&l.leaf===s().fragment,o=()=>Tr(s()).every(l=>S(l.isActive)),i=()=>{var l;return((l=s().parentContext)==null?void 0:l.lastActiveChildContext)===s()||s().node.isRoot&&s().route.prevRoute};W(()=>(c(t),N(s())),()=>{(l=>{L(t,l.route)})(s())}),W(()=>(c(t),N(s()),Ie),()=>{if(c(t)&&!c(t).state.dontScroll&&(a(c(t))||o()&&!i())){const{debug:l}=s().router.log;l("scrollQueue.push",s().node.id||"unnamed",s()),Ie.push(s())}}),Re(),re();var d=D(),f=U(d);ee(f,e,"default",{},null),A(r,d),se()}const Hr=()=>({onMount:({context:r})=>{r.decorators.push(Br)},afterRouteRendered:r=>!r.route.state.dontScroll&&Ie.processQueue(r.route)}),dt=(r,e)=>{e=e||{name:"",beforeRouterInit:[],afterRouterInit:[],urlRewrite:[],beforeUrlChange:[],afterUrlChange:[],afterRouteRendered:[],transformFragments:[],onMount:[],onDestroy:[]};const{plugins:t,...s}=r;return[...t||[],s].forEach(a=>{var o;(o=a.plugins)==null||o.forEach(i=>dt(i,e)),delete a.plugins,Object.entries(a).forEach(([i,d])=>{Array.isArray(e[i])?e[i].push(...[d].flat().filter(Boolean)):e[i]=d||e[i]})}),e},Mr=r=>Object.fromEntries(Object.entries(r).filter(([e,t])=>t!=null)),jr=[Pr(),Hr(),Ar()];class ke{constructor(e){h(this,"pendingRoute",Ve(null));h(this,"activeRoute",Ve(null));h(this,"_urlReflector",null);h(this,"_claimed",!1);h(this,"urlRewrites",[]);h(this,"context");h(this,"beforeRouterInit",X());h(this,"afterRouterInit",X());h(this,"beforeUrlChange",Lt());h(this,"afterUrlChange",X());h(this,"afterRouteRendered",X());h(this,"transformFragments",Dt());h(this,"onMount",X());h(this,"onDestroy",X());h(this,"parentElem",null);h(this,"queryHandler",{parse:(e,t)=>lt(Jt(new URLSearchParams(e))),stringify:(e,t)=>{const s=new URLSearchParams(e).toString();return s?`?${s}`:""}});h(this,"clickHandler",{});h(this,"url",{internal:()=>this.url.getPending()||this.url.getActive(),external:()=>this.getExternalUrl(),getActive:()=>{var e;return(e=S(this.activeRoute))==null?void 0:e.url},getPending:()=>{var e;return(e=S(this.pendingRoute))==null?void 0:e.url},toString:()=>this.url.internal(),set:this._setUrl.bind(this),push:(e,t={})=>this._setUrl(e,"pushState",!1,t),replace:(e,t={})=>this._setUrl(e,"replaceState",!1,t),pop:(e,t={})=>this._setUrl(e,"popState",!1,t)});h(this,"ready",async()=>!this.pendingRoute.get()&&this.activeRoute.get()||cr(this.activeRoute,e=>!!e));h(this,"rendered",async()=>{await this.ready(),await this.activeRoute.get().rendered});h(this,"history",new Map);h(this,"setParentElem",e=>{this.parentElem=e});h(this,"getExternalUrl",e=>{const t=S(this.pendingRoute)||S(this.activeRoute);return e=e||(t==null?void 0:t.url),this.urlRewrites.reduce((n,a)=>a.toExternal(n,{router:this}),e).replace(/\/index$/,"")});h(this,"getInternalUrl",e=>this.urlRewrites.reduce((t,s)=>s.toInternal(t,{router:this}),e));h(this,"lastRoute");var n,a,o;if(this.parentCmpCtx=jt(),this.instance=e.instance||((o=(a=(n=this.parentCmpCtx)==null?void 0:n.route)==null?void 0:a.router)==null?void 0:o.instance)||ie.instances[0]||new Rr({}),this.log=this.instance.log.createChild(this.name||"[unnamed instance]"),this.log.debug("initiated router"),e.rootNode&&(this.log.warn("rootNode is deprecated. Use routes instead"),e.routes=e.rootNode),!e.routes)throw new Error("Router must be initiated with routes prop");const{subscribe:t,set:s}=M(this);this.subscribe=t,this.triggerStore=()=>s(this),this.init(e),this.params=de(this.activeRoute,i=>i.params),this.afterRouteRendered.next(()=>{this._urlReflector.reflect(),this.afterUrlChange(()=>this._urlReflector.reflect())}),this.onDestroy(()=>this._urlReflector.reflect()),this.activeRoute.get=()=>S(this.activeRoute),this.pendingRoute.get=()=>S(this.pendingRoute)}init(e){var k;const t=!this.options;e.plugins=[...jr,...e.plugins||[]].filter(Boolean),e=Mr(e),this.options=dt({...this.options,...e});let{instance:s,rootNode:n,name:a,routes:o,urlRewrite:i,urlReflector:d,url:f,passthrough:l,beforeUrlChange:u,afterUrlChange:m,afterRouteRendered:p,transformFragments:w,onMount:E,onDestroy:P,beforeRouterInit:g,afterRouterInit:v,queryHandler:y,clickHandler:x,anchor:F}=this.options;y&&(this.queryHandler=y),x&&(this.clickHandler=x),u.forEach(this.beforeUrlChange),w.forEach(this.transformFragments),m.forEach(this.afterUrlChange),p.forEach(this.afterRouteRendered),E.forEach(this.onMount),P.forEach(this.onDestroy),g.forEach(this.beforeRouterInit),v.forEach(this.afterRouterInit),this.anchor=F||"wrapper",this.beforeRouterInit.run({router:this,firstInit:t}),this.name=a??this.name,this.urlRewrites=i??this.urlRewrites,l&&!(l instanceof ke)&&(l=((k=this.parentCmpCtx)==null?void 0:k.route.router)||l),this.passthrough=l||this.passthrough,ie.instances.forEach(B=>{const b=B.routers.indexOf(this);b!==-1&&B.routers.splice(b,1)}),this.instance.routers.push(this),o&&!this.rootNode&&this.importRoutes(o),this.rootNode=n??this.rootNode??this.instance.rootNodes[this.name||"default"],this.url.getActive()&&(this.log.debug("router was created with activeUrl"),this._setUrl(this.url.getActive(),"pushState",!0));const I=Array.isArray(d)?d[0]:d;(!this.urlReflector||d&&!(this.urlReflector instanceof I))&&(d=d||(typeof window<"u"?br:Cr),this.setUrlReflector(d)),f&&this.url.replace(f),this.triggerStore(),this.afterRouterInit.run({router:this,firstInit:t})}importRoutes(e){this.rootNode=e instanceof ut?e:this.instance.createNode().importTree(e),this.instance.rootNodes[e.rootName||e.name||"unnamed"]=this.rootNode}async _setUrl(e,t,s,n={}){s||(e=this.getInternalUrl(e)),e=e||"/",n=n||{};const a=this.history.get(n.id);if(a!=null&&a.meta.history)return a.mode="popState",a.state.cached=!0,this.setActiveRoute(a,null),!0;this.log.debug("set url",{url:e,mode:t,prev:this.url.internal(),browserOld:globalThis.document&&ve(),state:n});const o=this.pendingRoute.get()||this.activeRoute.get();!this.rootNode&&this.instance.global.routeMaps[this.name]&&this.importRoutes(await this.instance.global.routeMaps[this.name]());const i=new lr(this,e,t,n),d=i.loadRoute();if(!n.prefetch){if(zt(o,i))return this.log.debug("current route is identical - skip",o,i),!1;{i.log.debug("set pending route",i),this.pendingRoute.set(i);const f=await d;return this.pendingRoute.get()===i&&this.pendingRoute.set(null),f&&this.setActiveRoute(i,a),await new Promise(l=>setTimeout(l)),!0}}}setActiveRoute(e,t){this.log.debug("set active route",this),this.history.set(e.state.id,e),this.history.size>100&&this.history.delete([...this.history.keys()][0]),this.lastRoute=this.activeRoute.get(),e.mode!=="popState"&&this.lastRoute?(this.lastRoute.nextRoute=e,e.prevRoute=this.lastRoute):t&&(e.nextRoute=t.nextRoute,e.prevRoute=t.prevRoute),this.activeRoute.set(e),this.afterUrlChange.run({route:e,history:[...this.history.values()].reverse()});const s=qr(e.fragments.map(n=>n.renderContext.then(a=>a.mounted)));if(typeof window<"u"){const n=setTimeout(()=>{var i;if(!e.isActive)return;const a=s.findIndex(d=>!d.isResolved),o=`Failed to render ${e.fragments[a].node.name} (${(i=e.fragments[a].node.file)==null?void 0:i.path}) within 5s. Ensure the parent component renders a <slot />`;console.warn(o)},5e3);Promise.all(s).then(()=>{clearTimeout(n),this.afterRouteRendered.run({route:e})})}this.log.debug("unset pending route",this)}destroy(){this.log.debug("destroying router"),this.instance.routers=this.instance.routers.filter(e=>e!==this),this.onDestroy.run({router:this})}get urlReflector(){return this._urlReflector}setUrlReflector(e){var n;const[t,s]=Array.isArray(e)?e:[e,{}];(n=this._urlReflector)==null||n.uninstall(),this._urlReflector=new t(this,s),this._urlReflector.install(),this.triggerStore()}goBack(){this.go(-1)}goForward(){this.go(1)}go(e){const t=e>0?"nextRoute":"prevRoute";let s=this.activeRoute.get();for(;e;)s=s[t],e+=e>0?-1:1;s&&this._setUrl(s.url,"popState",!1,s.state)}}function qr(r){return r.map(e=>(e.isResolved=!1,e.then(()=>e.isResolved=!0),e))}const Wr=r=>{r.name=r.name||r.routes.name.replace(/^_+/,"");const e=ie.routers.find(t=>t.name==(r.name||""));if(e){if(!e._claimed)return e.init(r),e;e.destroy(),console.error(`Router with name "${r.name}" already exists`,ie.routers)}return new ke(r)};function ft(r,e){var l;te(e,!1);let t=R(e,"decorators",12,null),s=R(e,"isRoot",8,!0),n=R(e,"context",8);t(t()||n().decorators);const a=[...t()].sort((u,m)=>(u.order||0)-(m.order||0));let o=O(a[0]),i=O(a.slice(1));for(;c(o)&&!((l=c(o))!=null&&l.shouldRender({context:n(),isRoot:s(),decorators:t()}));)(u=>{var m=Et(u);L(o,m[0]),L(i,m.slice(1))})([...c(i)]);s()&&Ye(()=>n().onDestroy.run()),re();var d=D(),f=U(d);pe(f,()=>c(o)?c(o).component:Fe,(u,m)=>{m(u,Ne({get context(){return n()},get isRoot(){return s()}},()=>{var p;return(p=c(o))==null?void 0:p.props},{children:(p,w)=>{var E=D(),P=U(E);{var g=y=>{var x=D(),F=U(x);ft(F,{get decorators(){return c(i)},get context(){return n()},isRoot:!1,children:(I,T)=>{var k=D(),B=U(k);ee(B,e,"default",{},null),A(I,k)},$$slots:{default:!0}}),A(y,x)},v=y=>{var x=D(),F=U(x);ee(F,e,"default",{},null),A(y,x)};Z(P,y=>{c(i),oe(()=>c(i).length)?y(g):y(v,!1)})}A(p,E)},$$slots:{default:!0}}))}),A(r,d),se()}const Vr="modulepreload",Jr=function(r){return"/cxb/"+r},Ke={},zr=function(e,t,s){let n=Promise.resolve();if(t&&t.length>0){let o=function(f){return Promise.all(f.map(l=>Promise.resolve(l).then(u=>({status:"fulfilled",value:u}),u=>({status:"rejected",reason:u}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),d=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));n=o(t.map(f=>{if(f=Jr(f),f in Ke)return;Ke[f]=!0;const l=f.endsWith(".css"),u=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${u}`))return;const m=document.createElement("link");if(m.rel=l?"stylesheet":Vr,l||(m.as="script"),m.crossOrigin="",m.href=f,d&&m.setAttribute("nonce",d),document.head.appendChild(m),l)return new Promise((p,w)=>{m.addEventListener("load",p),m.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function a(o){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=o,window.dispatchEvent(i),!i.defaultPrevented)throw o}return n.then(o=>{for(const i of o||[])i.status==="rejected"&&a(i.reason);return e().catch(a)})},Ge=r=>typeof r>"u"?{}:{isInline:()=>!!r,...r},Kr=(r,e,t)=>{const s=Fr(r);return s.forEach(Ur),e&&s.forEach(n=>n.style.scrollBehavior="auto"),t.boundary?zr(()=>import("./scroll-into-view-if-needed-KR58zyjF.js"),__vite__mapDeps([0,1])).then(n=>(setTimeout(()=>s.forEach(ze),0),n.default(r,{scrollMode:"if-needed",...t}))):(setTimeout(()=>s.forEach(ze),0),r.scrollIntoView(t))},Gr=r=>({isInline:()=>!1,scrollIntoView:Kr,context:"browser",params:{},...r,wrapper:void 0,shouldScroll:typeof r.shouldScroll=="function"?r.shouldScroll:typeof r.shouldScroll>"u"?(e,t,s,n)=>n(e,t,s):()=>!!r.shouldScroll}),Qe={recursive:!0,shouldRender:()=>!0,order:0},$e={recursive:!1,shouldRender:({context:r})=>r.isInline},mt=r=>"component"in r?{...Qe,...r}:{...Qe,component:r},pt=r=>"component"in r?{...$e,...r}:{...$e,component:r},Qr=r=>e=>r.node===e.node&&Object.entries(r.params).every(([t,s])=>e.fragment.params[t]===s),Xe=r=>r.navigableChildren.find(e=>e.meta.isDefault),$r=(r,e)=>{var n;const t=(n=e.node)==null?void 0:n.children.find(a=>a.meta.isDecorator),s=()=>{const a=t.module.decorator||{};r.push({component:t.module.default,recursive:a.recursive??t.meta.recursive??!0,order:t.meta.order||0,shouldRender:a.shouldRender??t.meta.shouldRender??(()=>!0),props:a.props||{}})};if(t)return t.module?s():(console.warn(`Dynamic import of "${t.id}" may cause issues.`),t.loadModule().then(s))},Xr=(r,e)=>{var n;const t=(n=e.node)==null?void 0:n.children.find(a=>a.meta.isInlineWrapper),s=()=>r.push(pt(t.module.default));if(t)if(t.module)s();else return console.warn(`Dynamic import of "${t.id}" may cause issues.`),t.loadModule().then(s)};function gt(r){return r?r.isInline?r:gt(r.parentContext):null}const Yr=(r,e,t)=>{var s,n;return[!r.isInline&&((n=S((s=gt(r))==null?void 0:s.elem))==null?void 0:n.parent),ht(t.elem)]},Zr=(r,e)=>r.find(Qr(e))||r.find(t=>t.node===(e==null?void 0:e.node)),es=(r,e)=>{const t={};return r.paramKeys.forEach(s=>{e&&s in e&&(t[s]=e[s].shift())}),t};class yt{constructor({router:e}){h(this,"childContexts",M([]));h(this,"childFragments",M([]));h(this,"activeChildContext",M(null));h(this,"lastActiveChildContext",null);h(this,"decorators",[]);h(this,"anchorLocation");this.router=e,this.route=e.activeRoute.get(),this.anchorLocation=e.anchor}get descendants(){return S(this.childContexts).reduce((e,t)=>[...e,...t.descendants],S(this.childContexts))}buildChildContexts(e,t){var E;const{childFragments:s}=this,{inline:n,decorator:a,props:o,anchor:i,options:d,scrollLock:f=Yr}=e,l=(E=S(s)[0])==null?void 0:E.node,u=(this==null?void 0:this.node)||l.parent,m=[...(u==null?void 0:u.navigableChildren)||[]];l&&!m.includes(l)&&m.unshift(l);const p=ur((n==null?void 0:n.params)||{});Object.entries(p).forEach(([P,g])=>{const v=m.findIndex(x=>x.paramKeys.includes(P)),y=new Array(g.length-1).fill(m[v]);m.splice(v+1,0,...y)});const w=m.map(P=>new be({node:P,paramsPool:p,rawInlineInputFromSlot:n,parentContext:this,newDecorators:t,contextOptions:d,scrollLock:f,anchorLocation:i,props:o}));this.childContexts.set(w)}updateChildren(){const e=S(this.activeChildContext);S(this.childContexts).forEach(t=>t.update(e))}}class be extends yt{constructor({node:t,paramsPool:s,rawInlineInputFromSlot:n,parentContext:a,newDecorators:o,contextOptions:i,scrollLock:d,anchorLocation:f,router:l,props:u}){super({router:l||a.router});h(this,"node");h(this,"isActive",M(!1));h(this,"isVisible",M(!1));h(this,"wasVisible",!1);h(this,"isInline",!1);h(this,"inline");h(this,"elem",dr(null));h(this,"route");h(this,"childContexts",M([]));h(this,"onDestroy",X());h(this,"mounted",ot());h(this,"routerContext");this.anchorLocation=f||"parent",this.node=t,this.props=u,t||console.trace("node");const m=es(t,s);this.fragment=new Ae(null,t,null,m),this.childFragments=M(Xe(t)?[new Ae(null,Xe(t))]:[]),this.params=M({}),this.inline=Gr({...Ge(n),...Ge(t.meta.inline)}),a instanceof be?(this.routerContext=a.routerContext,this.parentContext=a):this.routerContext=a,this.decorators=o,this.options=i||{},this.scrollLock=d,this._resetCounter=M(0)}get parentOrRouterContext(){return this.parentContext||this.routerContext}get ancestors(){const t=[];let s=this.parentContext;for(;s;)t.push(s),s=s.parentContext;return t}get allProps(){var t;return Object.assign({},(t=this.parentContext)==null?void 0:t.allProps,this.props)}reset(){this._resetCounter.update(t=>t+1)}setToActive(){const t=this.parentOrRouterContext,[s,...n]=S(t.childFragments);this.fragment=s,this.childFragments.set(n),this.route=t.route,s.renderContext.resolve(this),t.lastActiveChildContext=S(t.activeChildContext),t.activeChildContext.set(this),this.isInline=this.inline.isInline(this.node,this)}update(t){this.router.log.verbose("updating renderContext",this.node.name);const s=typeof window<"u"?"browser":"ssr";this.isInline=this.inline.isInline(this.node,t);const n=t&&!t.isInline,a=["always",s].includes(this.inline.context),o=this.isInline&&!n&&a,i=!t&&this.node.name==="index";this.wasVisible=S(this.isVisible),Je(this.isActive,this===t||!t&&this.node.meta.isDefault),Je(this.isVisible,S(this.isActive)||o||i),S(this.isVisible)||this.elem.set(null),this.updateParams()}updateParams(){let t=this;const s=[];for(;t;)s.push(t),t=t.parentContext;s.reverse(),this.params.set(Object.assign({},...s.map(n=>n.fragment.params)))}}var ts=ne("<div><!></div>"),rs=ne("<div></div> <!>",1),ss=ne("<div></div>"),ns=ne('<div class="anchor-backstop" data-routify-anchor-backstop=""></div>'),os=ne("<!> <!> <!>",1);function vt(r,e){const t=He(e,["children","$$slots","$$events","$$legacy"]),s=He(t,["context","onMount"]);te(e,!1);let n=R(e,"context",8);const a=n().anchorLocation;let o=R(e,"onMount",8,g=>g);const i=typeof window<"u";let d=O(),f=O(!1);const l=n()instanceof be?n().node.name||"unnamed":n().router.name||"defaultRouter",u=g=>{const v=g.nextElementSibling;if("routifyAnchorBackstop"in v.dataset)throw console.warn("found no children in",g.parentElement),new Error("AnchorLocation is set to firstChild, but no children were found");return v&&"routifyAnchorLocator"in v.dataset?u(v):v},m={wrapper:g=>{g.dataset.routifyAnchorWrapper=l,o()(g)},parent:g=>{g.dataset.routifyAnchorParent=l,o()(g.parentElement)},header:g=>{g.dataset.routifyAnchorHeader=l,o()(g.parentElement,g)},firstChild:g=>{const v=u(g);v.dataset.routifyAnchorNextSibling=l,o()(g.parentElement,v)},custom:g=>{const v=a(g);v.dataset.routifyAnchorCustom=l,v.dataset.hasOwnProperty("routifyAnchorLocator")&&(n().node||n().router).log.warn(`Selected anchor element is an anchor locator. Use '!elem.dataset.hasOwnProperty("routifyAnchorLocator")' to ensure a valid selection.`),o()(g.parentElement,v)}};Pt(()=>{if(c(f))return;const g=typeof a=="function"?"custom":a;if(!m[g])throw new Error(`Anchor location "${g}" is not valid. Wrapper options: 'wrapper', 'parent', 'header', 'firstChild', or a function that returns a valid element.`);const v=m[g];v(c(d)),L(f,!0)}),re();var p=D(),w=U(p);{var E=g=>{var v=ts();Ce(v,()=>({"data-routify-anchor-wrapper":l,...s}));var y=At(v);ee(y,e,"default",{},null),_e(v,x=>L(d,x),()=>c(d)),A(g,v)},P=g=>{var v=D(),y=U(v);{var x=I=>{var T=rs(),k=U(T);Ce(k,()=>({"data-routify-anchor-header":l,...s})),_e(k,b=>L(d,b),()=>c(d));var B=me(k,2);ee(B,e,"default",{},null),A(I,T)},F=I=>{var T=os(),k=U(T);{var B=H=>{var V=ss();Ce(V,()=>({"data-routify-anchor-locator":!0,class:"anchor",...s})),_e(V,Q=>L(d,Q),()=>c(d)),A(H,V)};Z(k,H=>{!c(f)&&i&&H(B)})}var b=me(k,2);ee(b,e,"default",{},null);var j=me(b,2);{var C=H=>{var V=ns();A(H,V)};Z(j,H=>{!c(f)&&i&&H(C)})}A(I,T)};Z(y,I=>{a==="header"?I(x):I(F,!1)},!0)}A(g,v)};Z(w,g=>{a==="wrapper"?g(E):g(P,!1)})}A(r,p),se()}var as=ne("<div></div>"),is=ne("<!> <!>",1);function ls(r,e){te(e,!1);const t=()=>he(c(d),"$_resetCounter",n),s=()=>he(c(o),"$childFragments",n),[n,a]=Ue(),o=O(),i=O(),d=O(),f=O(),l=O();let u=R(e,"context",8);const m=typeof window<"u";let p=O(!1);et(u());const w=(y,x)=>{var F;return y&&(y.__routify_meta={...y&&y.__routify_meta,renderContext:{...(F=y.__routify_meta)==null?void 0:F.renderContext,...x}}),y},E=async(y,x)=>{u().parentContext&&await nt(u().parentContext.elem,Boolean),u().elem.set({anchor:x,parent:y}),y=w(y,{parent:u()}),x&&(x=w(x,{anchor:u()}))},P=y=>{L(p,!0),u().mounted.resolve(u()),u().router.log.verbose("render",u().node.path,u())};W(()=>(c(o),c(i),c(d),N(u())),()=>{(y=>{Pe(L(o,y.childFragments),"$childFragments",n),L(i,y.fragment),Pe(L(d,y._resetCounter),"$_resetCounter",n)})(u())}),W(()=>N(u()),()=>{L(f,u().node.navigableChildren.some(y=>y.meta.inline))}),W(()=>(c(i),N(u())),()=>{var y;L(l,{...c(i).params,...(y=c(i).load)==null?void 0:y.props,...u().props})}),Re(),re();var g=D(),v=U(g);pe(v,()=>u().decorators.length?ft:Fe,(y,x)=>{x(y,{get context(){return u()},children:(F,I)=>{var T=D(),k=U(T);It(k,()=>(N(u()),oe(()=>u().node.loadModule())),null,B=>{var b=D(),j=U(b);Nt(j,()=>(c(i),t(),oe(()=>(c(i).node.meta["param-is-page"]&&JSON.stringify(c(i).params))+t().toString())),C=>{vt(C,{get context(){return u()},onMount:E,children:(H,V)=>{var Q=is(),_=U(Q);pe(_,()=>u().node.module.default,(q,$)=>{$(q,Ne(()=>c(l),{get context(){return u()},children:Ut,$$slots:{default:(z,K)=>{const le=Y(()=>K.props),ce=Y(()=>K.inline),ue=Y(()=>K.multi),Le=Y(()=>K.decorator),De=Y(()=>K.anchor),Oe=Y(()=>K.options),Te=Y(()=>K.scrollLock);var Be=D(),wt=U(Be);{var bt=xe=>{{let fe=Y(()=>(N(c(ce)),N(c(ue)),N(c(Le)),N(c(le)),N(c(Oe)),N(c(Te)),N(c(De)),N(u()),oe(()=>({inline:c(ce)||c(ue),decorator:c(Le),props:c(le),options:c(Oe),scrollLock:c(Te),anchor:c(De)||u().anchorLocation}))));Rt(xe,{get options(){return c(fe)},get context(){return u()}})}};Z(wt,xe=>{s(),c(f),N(c(ce)),N(c(ue)),oe(()=>{var fe;return s().length||(c(f)||c(ce)||c(ue))&&!((fe=c(ce)||c(ue))!=null&&fe.single)})&&xe(bt)})}A(z,Be)}}}))});var J=me(_,2);{var G=q=>{var $=as();Ft($,z=>P==null?void 0:P()),A(q,$)};Z(J,q=>{!c(p)&&m&&q(G)})}A(H,Q)},$$slots:{default:!0}})}),A(B,b)}),A(F,T)},$$slots:{default:!0}})}),A(r,g),se(),a()}function Rt(r,e){var T,k,B;te(e,!1);const t=()=>he(l,"$childFragments",n),s=()=>he(v,"$childContexts",n),[n,a]=Ue();let o=R(e,"context",8),i=R(e,"options",8),d=O(null),f=O(1);const{childFragments:l}=o(),{decorator:u}=i(),m=((T=i().inline)==null?void 0:T.wrapper)&&pt(i().inline.wrapper),p=o().decorators.filter(b=>b.recursive),w=Kt(p,[u,m]).filter(Boolean).map(mt);let E=O(!((k=$r(w,o()))!=null&&k.then(()=>{L(E,!0)}))),P=O(!((B=Xr(w,o()))!=null&&B.then(()=>{L(P,!0)})));const g=()=>o().buildChildContexts(i(),w),{childContexts:v}=o(),y=b=>{o().router.log.verbose("handle children",b);const j=C=>C.renderContext.then(H=>H.isActive.set(!1));b.length&&o().route?x(o()):b.forEach(j),o().updateChildren()},x=(b,j)=>{const[C,...H]=S(b.childFragments),V=S(b.childContexts),Q=Zr(V,C);if(!Q)return j&&Qt(b,V),b.buildChildContexts(i(),w),x(b,!0);Q.setToActive(),b.childContexts.set(V)};W(()=>(N(i()),c(f),c(d)),()=>{const{props:b,...j}=i(),C=JSON.stringify(j);L(f,C!==c(d)?c(f)+1:c(f)),L(d,C)}),W(()=>c(f),()=>{c(f)&&g()}),W(()=>(c(f),t()),()=>{y(c(f)&&t())}),Re(),re();var F=D(),I=U(F);kt(I,1,()=>(s(),c(E),c(P),N(S),oe(()=>s().filter(b=>c(E)&&c(P)&&S(b.isVisible)))),b=>b,(b,j,C,H)=>{ls(b,{get context(){return c(j)}})}),A(r,F),se(),a()}function ps(r,e){te(e,!1);const t=()=>he(c(a),"$activeRoute",s),[s,n]=Ue(),a=O();let o=R(e,"router",12,null),i=R(e,"routes",8,null),d=R(e,"decorator",8,null),f=R(e,"urlReflector",8,null),l=R(e,"instance",8,null),u=R(e,"urlRewrite",8,null),m=R(e,"url",8,null),p=R(e,"name",8,null),w=R(e,"rootNode",8,null),E=R(e,"passthrough",8,null),P=R(e,"beforeRouterInit",8,null),g=R(e,"afterRouterInit",8,null),v=R(e,"beforeUrlChange",8,null),y=R(e,"afterUrlChange",8,null),x=R(e,"transformFragments",8,null),F=R(e,"onDestroy",8,null),I=R(e,"plugins",8,null),T=R(e,"queryHandler",8,null),k=R(e,"anchor",8,"wrapper"),B=R(e,"clickHandler",24,()=>({})),b=R(e,"props",24,()=>({}));const j={instance:l(),rootNode:w(),name:p(),routes:i(),urlRewrite:u(),urlReflector:f(),passthrough:E(),beforeRouterInit:P(),afterRouterInit:g(),beforeUrlChange:v(),afterUrlChange:y(),transformFragments:x(),onDestroy:F(),plugins:I(),queryHandler:T(),clickHandler:B(),anchor:k()};o(o()||Wr(j)),o(o()._claimed=!0,!0);const C=O(new yt({router:o()}));o(o().context=c(C),!0),Se(C,c(C).anchorLocation=k()),o().onMount.run({context:c(C),router:o()}),Se(C,c(C).decorators=c(C).decorators.map(mt));const H=_=>{var G;_=o().anchor==="parent"||o().anchor==="wrapper"?_:_.parentElement,o().setParentElem(_),_.__routify_meta={..._.__routify_meta,router:o()};let J=st(((G=o().clickHandler)==null?void 0:G.elem)||_,[_]);o().passthrough||(J.addEventListener("click",Q),J.addEventListener("keydown",Q),J.addEventListener("mouseover",V))},V=_=>{var z,K,le;const{url:J,state:G}=qe(_),q=((K=(z=o().clickHandler).callback)==null?void 0:K.call(z,_,J))??J;typeof q=="string"&&((le=_.target.closest("[data-routify-prefetch-data]"))==null?void 0:le.dataset.routifyPrefetchData)==="hover"&&o().url.push(q,{prefetch:!0,...G})},Q=_=>{var $,z;if(qt(_))return;const{url:J,state:G}=qe(_),q=((z=($=o().clickHandler).callback)==null?void 0:z.call($,_,J))??J;typeof q=="string"&&o().url.push(q,G)};typeof window<"u"&&Ye(()=>o().destroy()),W(()=>(N(m()),N(o())),()=>{m()&&m()!==o().url.internal()&&o().url.replace(m())}),W(()=>N(o()),()=>{Pe(L(a,o().activeRoute),"$activeRoute",s)}),W(()=>(c(C),t()),()=>{var _;c(C).childFragments.set(((_=t())==null?void 0:_.fragments)||[])}),W(()=>t(),()=>{Se(C,c(C).route=t())}),W(()=>(N(o()),c(C)),()=>{var _;(_=o().log)==null||_.debug("before render",S(c(C).childFragments))}),Re(),re(),vt(r,{onMount:H,style:"display: contents",get context(){return c(C)},children:(_,J)=>{var G=D(),q=U(G);{var $=z=>{{let K=Y(()=>({decorator:d(),props:b()}));Rt(z,{get context(){return c(C)},get options(){return c(K)}})}};Z(q,z=>{t()&&z($)})}A(_,G)},$$slots:{default:!0}}),se(),n()}const cs=()=>{var r=console.warn;console.warn=function(){var e=Array.prototype.slice.call(arguments);if(!(typeof e[0]=="string"&&(e[0].match(/<.+> was created with unknown prop 'context'/)||e[0].match(/<.+> was created with unknown prop 'isRoot'/)||e[0].match(/<.+> received an unexpected slot "default"\./)))){var t=new Error().stack,s=t.split(`
@@ -1 +1 @@
1
- import{w as oe,p as W,b as L,m as k,c as i,Q as re,A as ie,x as le,r as w,e as b,L as X,t as _,u as Y,i as Z,B as I,j as K,R as q,S as T,k as x,l as z,H as G,T as ce,y as j,E as M,F as Q,U as O,V as ue,f as R,h as U,n as fe,o as pe,W as de,O as ve,X as V,Y as _e,Z as me,_ as ge,$ as be,a0 as he,a1 as xe}from"./svelte-B2XmcTi_.js";const ye={duration:4e3,initial:1,next:0,pausable:!1,dismissable:!0,reversed:!1,intro:{x:256}};function $e(){const{subscribe:y,update:d}=oe(new Array),l={};let h=0;function g(n){return n instanceof Object}function e(n="default",s={}){return l[n]=s,l}function c(n,s){const o={target:"default",...g(n)?n:{...s,msg:n}},t=l[o.target]||{},u={...ye,...t,...o,theme:{...t.theme,...o.theme},classes:[...t.classes||[],...o.classes||[]],id:++h};return d(f=>u.reversed?[...f,u]:[u,...f]),h}function m(n){d(s=>{if(!s.length||n===0)return[];if(typeof n=="function")return s.filter(t=>n(t));if(g(n))return s.filter(t=>t.target!==n.target);const o=n||Math.max(...s.map(t=>t.id));return s.filter(t=>t.id!==o)})}function v(n,s){const o=g(n)?n:{...s,id:n};d(t=>{const u=t.findIndex(f=>f.id===o.id);return u>-1&&(t[u]={...t[u],...o}),t})}return{subscribe:y,push:c,pop:m,set:v,_init:e}}const S=$e();var ke=I('<div class="_toastBtn pe svelte-1irx82o" role="button" tabindex="0"></div>'),we=I('<div role="status"><div><!></div> <!> <progress class="_toastBar svelte-1irx82o"></progress></div>');function je(y,d){W(d,!1);const l=()=>X(t,"$progress",h),[h,g]=G();let e=L(d,"item",12),c=k(e().initial),m=k(i(c)),v=k(!1),n=k({}),s,o;const t=re(e().initial,{duration:e().duration,easing:ce});function u(a){a&&(o=a),S.pop(e().id)}function f(){(l()===1||l()===0)&&u()}function E(){!i(v)&&l()!==i(c)&&(t.set(l(),{duration:0}),b(v,!0))}function A(){if(i(v)){const a=e().duration,r=a-a*((l()-i(m))/(i(c)-i(m)));t.set(i(c),{duration:r}).then(f),b(v,!1)}}function C(a,r="undefined"){return typeof a===r}function J(a=document){if(C(a.hidden))return;const r=()=>a.hidden?E():A(),p="visibilitychange";a.addEventListener(p,r),s=()=>a.removeEventListener(p,r),r()}ie(J),le(()=>{e().onpop&&e().onpop(e().id,{event:o}),s&&s()}),w(()=>(i(c),_(e()),l()),()=>{i(c)!==e().next&&(b(c,e().next),b(m,l()),b(v,!1),t.set(i(c)).then(f))}),w(()=>_(e()),()=>{if(e().component){const{props:a={},sendIdTo:r}=e().component;b(n,{...a,...r&&{[r]:e().id}})}}),w(()=>_(e()),()=>{C(e().progress)||e(e().next=e().progress,!0)}),Y(),Z();var $=we();let D;var B=M($);let F;var N=M(B);{var P=a=>{var r=R(),p=U(r);fe(p,()=>e().component.src,(ae,ne)=>{ne(ae,pe(()=>i(n)))}),x(a,r)},ee=a=>{var r=R(),p=U(r);de(p,()=>(_(e()),j(()=>e().msg))),x(a,r)};K(N,a=>{_(e()),j(()=>e().component)?a(P):a(ee,!1)})}var H=Q(B,2);{var te=a=>{var r=ke();T("click",r,p=>u(p)),T("keydown",r,p=>{p instanceof KeyboardEvent&&["Enter"," "].includes(p.key)&&u(p)}),x(a,r)};K(H,a=>{_(e()),j(()=>e().dismissable)&&a(te)})}var se=Q(H,2);q(()=>{D=O($,1,"_toastItem svelte-1irx82o",null,D,{pe:e().pausable}),F=O(B,1,"_toastMsg svelte-1irx82o",null,F,{pe:e().component}),ue(se,l())}),T("mouseenter",$,()=>{e().pausable&&E()}),T("mouseleave",$,A),x(y,$),z(),g()}var Ee=I("<li><!></li>"),Te=I('<ul class="_toastContainer svelte-1dwp7pi"></ul>');function Be(y,d){W(d,!1);const l=()=>X(S,"$toast",h),[h,g]=G();let e=L(d,"options",24,()=>({})),c=L(d,"target",8,"default"),m=k([]);function v(s){return s?Object.keys(s).reduce((o,t)=>`${o}${t}:${s[t]};`,""):void 0}w(()=>(_(c()),_(e())),()=>{S._init(c(),e())}),w(()=>(l(),_(c())),()=>{b(m,l().filter(s=>s.target===c()))}),Y(),Z();var n=Te();ve(n,13,()=>i(m),s=>s.id,(s,o)=>{var t=Ee(),u=M(t);je(u,{get item(){return i(o)}}),q((f,E)=>{O(t,1,f,"svelte-1dwp7pi"),ge(t,E)},[()=>me((i(o),j(()=>{var f;return(f=i(o).classes)==null?void 0:f.join(" ")}))),()=>(i(o),j(()=>v(i(o).theme)))]),V(1,t,()=>be,()=>i(o).intro),V(2,t,()=>he),_e(t,()=>xe,()=>({duration:200})),x(s,t)}),x(y,n),z(),g()}export{Be as S,S as t};
1
+ import{w as oe,p as W,b as L,m as k,c as i,Q as re,A as ie,x as le,r as w,e as b,L as X,t as _,u as Y,i as Z,B as I,j as K,R as q,S as T,k as x,l as z,H as G,T as ce,y as j,E as M,F as Q,U as O,V as ue,f as R,h as U,n as fe,o as pe,W as de,O as ve,X as V,Y as _e,Z as me,_ as ge,$ as be,a0 as he,a1 as xe}from"./svelte-B9Ye91X-.js";const ye={duration:4e3,initial:1,next:0,pausable:!1,dismissable:!0,reversed:!1,intro:{x:256}};function $e(){const{subscribe:y,update:d}=oe(new Array),l={};let h=0;function g(n){return n instanceof Object}function e(n="default",s={}){return l[n]=s,l}function c(n,s){const o={target:"default",...g(n)?n:{...s,msg:n}},t=l[o.target]||{},u={...ye,...t,...o,theme:{...t.theme,...o.theme},classes:[...t.classes||[],...o.classes||[]],id:++h};return d(f=>u.reversed?[...f,u]:[u,...f]),h}function m(n){d(s=>{if(!s.length||n===0)return[];if(typeof n=="function")return s.filter(t=>n(t));if(g(n))return s.filter(t=>t.target!==n.target);const o=n||Math.max(...s.map(t=>t.id));return s.filter(t=>t.id!==o)})}function v(n,s){const o=g(n)?n:{...s,id:n};d(t=>{const u=t.findIndex(f=>f.id===o.id);return u>-1&&(t[u]={...t[u],...o}),t})}return{subscribe:y,push:c,pop:m,set:v,_init:e}}const S=$e();var ke=I('<div class="_toastBtn pe svelte-1irx82o" role="button" tabindex="0"></div>'),we=I('<div role="status"><div><!></div> <!> <progress class="_toastBar svelte-1irx82o"></progress></div>');function je(y,d){W(d,!1);const l=()=>X(t,"$progress",h),[h,g]=G();let e=L(d,"item",12),c=k(e().initial),m=k(i(c)),v=k(!1),n=k({}),s,o;const t=re(e().initial,{duration:e().duration,easing:ce});function u(a){a&&(o=a),S.pop(e().id)}function f(){(l()===1||l()===0)&&u()}function E(){!i(v)&&l()!==i(c)&&(t.set(l(),{duration:0}),b(v,!0))}function A(){if(i(v)){const a=e().duration,r=a-a*((l()-i(m))/(i(c)-i(m)));t.set(i(c),{duration:r}).then(f),b(v,!1)}}function C(a,r="undefined"){return typeof a===r}function J(a=document){if(C(a.hidden))return;const r=()=>a.hidden?E():A(),p="visibilitychange";a.addEventListener(p,r),s=()=>a.removeEventListener(p,r),r()}ie(J),le(()=>{e().onpop&&e().onpop(e().id,{event:o}),s&&s()}),w(()=>(i(c),_(e()),l()),()=>{i(c)!==e().next&&(b(c,e().next),b(m,l()),b(v,!1),t.set(i(c)).then(f))}),w(()=>_(e()),()=>{if(e().component){const{props:a={},sendIdTo:r}=e().component;b(n,{...a,...r&&{[r]:e().id}})}}),w(()=>_(e()),()=>{C(e().progress)||e(e().next=e().progress,!0)}),Y(),Z();var $=we();let D;var B=M($);let F;var N=M(B);{var P=a=>{var r=R(),p=U(r);fe(p,()=>e().component.src,(ae,ne)=>{ne(ae,pe(()=>i(n)))}),x(a,r)},ee=a=>{var r=R(),p=U(r);de(p,()=>(_(e()),j(()=>e().msg))),x(a,r)};K(N,a=>{_(e()),j(()=>e().component)?a(P):a(ee,!1)})}var H=Q(B,2);{var te=a=>{var r=ke();T("click",r,p=>u(p)),T("keydown",r,p=>{p instanceof KeyboardEvent&&["Enter"," "].includes(p.key)&&u(p)}),x(a,r)};K(H,a=>{_(e()),j(()=>e().dismissable)&&a(te)})}var se=Q(H,2);q(()=>{D=O($,1,"_toastItem svelte-1irx82o",null,D,{pe:e().pausable}),F=O(B,1,"_toastMsg svelte-1irx82o",null,F,{pe:e().component}),ue(se,l())}),T("mouseenter",$,()=>{e().pausable&&E()}),T("mouseleave",$,A),x(y,$),z(),g()}var Ee=I("<li><!></li>"),Te=I('<ul class="_toastContainer svelte-1dwp7pi"></ul>');function Be(y,d){W(d,!1);const l=()=>X(S,"$toast",h),[h,g]=G();let e=L(d,"options",24,()=>({})),c=L(d,"target",8,"default"),m=k([]);function v(s){return s?Object.keys(s).reduce((o,t)=>`${o}${t}:${s[t]};`,""):void 0}w(()=>(_(c()),_(e())),()=>{S._init(c(),e())}),w(()=>(l(),_(c())),()=>{b(m,l().filter(s=>s.target===c()))}),Y(),Z();var n=Te();ve(n,13,()=>i(m),s=>s.id,(s,o)=>{var t=Ee(),u=M(t);je(u,{get item(){return i(o)}}),q((f,E)=>{O(t,1,f,"svelte-1dwp7pi"),ge(t,E)},[()=>me((i(o),j(()=>{var f;return(f=i(o).classes)==null?void 0:f.join(" ")}))),()=>(i(o),j(()=>v(i(o).theme)))]),V(1,t,()=>be,()=>i(o).intro),V(2,t,()=>he),_e(t,()=>xe,()=>({duration:200})),x(s,t)}),x(y,n),z(),g()}export{Be as S,S as t};
@@ -1 +1 @@
1
- import{p as w,L as D,a8 as E,a9 as H,A as I,e as M,B as j,h as P,aj as h,R as m,k as n,c as v,a2 as G,F as u,O as J,a6 as c,j as x,l as K,H as N,E as Q}from"./svelte-B2XmcTi_.js";import{R}from"./@edraj-CS4NwVbD.js";import{g as U}from"./@roxi-CGMFK4i8.js";import{p as V,q as b}from"./flowbite-svelte-BLvjb-sa.js";import{z as W,f as X}from"./flowbite-svelte-icons-D8uFOOjS.js";var Y=j("<strong> </strong> <!><!>&nbsp;)",1),Z=j("<!> <!> <!>",1);function oe(A,e){w(e,!0);const y=()=>D(U,"$goto",T),[T,z]=N();y();let k=E(H([]));I(()=>{const d=e.subpath.split("/");M(k,d.filter(_=>_!=="").map((_,p)=>({text:`/${_}`.replaceAll("//","/"),action:()=>y()("/management/content/[space_name]/[subpath]",{space_name:e.space_name,subpath:d.slice(0,p+1).join("/").replaceAll("/","-")})})),!0)}),V(A,{"aria-label":"Solid background breadcrumb example",class:"px-5 py-3 dark:bg-gray-900",children:(d,_)=>{var p=Z(),$=P(p);{const t=l=>{X(l,{size:"md",class:"text-gray-500",style:"transform: rotate(180deg);"})};let s=G(()=>`/management/content/${e.space_name}`);b($,{get href(){return v(s)},home:!0,icon:t,children:(l,a)=>{var o=h();m(()=>c(o,e.space_name)),n(l,o)},$$slots:{icon:!0,default:!0}})}var B=u($,2);J(B,17,()=>v(k),t=>t.text,(t,s)=>{b(t,{get onclick(){return v(s).action},class:"cursor-pointer",icon:a=>{W(a,{class:" dark:text-white"})},children:(a,o)=>{var f=h();m(g=>c(f,g),[()=>v(s).text.replace("/","")]),n(a,f)},$$slots:{icon:!0,default:!0}})});var F=u(B,2);{var L=t=>{b(t,{children:(s,l)=>{var a=Y(),o=P(a),f=Q(o),g=u(o),C=u(g);{var O=r=>{var i=h();m(()=>c(i,`| ${e.payloadContentType}`)),n(r,i)};x(C,r=>{e.payloadContentType&&r(O)})}var S=u(C);{var q=r=>{var i=h();m(()=>c(i,`:${e.schema_name??""}`)),n(r,i)};x(S,r=>{e.schema_name&&r(q)})}m(()=>{c(f,e.shortname),c(g,` ( ${e.resource_type??""} `)}),n(s,a)},$$slots:{default:!0}})};x(F,t=>{[R.folder,R.space].includes(e.resource_type)||t(L)})}n(d,p)},$$slots:{default:!0}}),K(),z()}export{oe as B};
1
+ import{p as w,L as D,a8 as E,a9 as H,A as I,e as M,B as A,h as P,ai as h,R as m,k as n,c as v,a2 as G,F as u,O as J,a6 as c,j as x,l as K,H as N,E as Q}from"./svelte-B9Ye91X-.js";import{R}from"./@edraj-D-9hi9vU.js";import{g as U}from"./@roxi-Bw7qXphd.js";import{p as V,q as b}from"./flowbite-svelte-Caf58qKG.js";import{z as W,f as X}from"./flowbite-svelte-icons-DXemwXNH.js";var Y=A("<strong> </strong> <!><!>&nbsp;)",1),Z=A("<!> <!> <!>",1);function oe(T,e){w(e,!0);const y=()=>D(U,"$goto",j),[j,z]=N();y();let k=E(H([]));I(()=>{const d=e.subpath.split("/");M(k,d.filter(_=>_!=="").map((_,p)=>({text:`/${_}`.replaceAll("//","/"),action:()=>y()("/management/content/[space_name]/[subpath]",{space_name:e.space_name,subpath:d.slice(0,p+1).join("/").replaceAll("/","-")})})),!0)}),V(T,{"aria-label":"Solid background breadcrumb example",class:"px-5 py-3 dark:bg-gray-900",children:(d,_)=>{var p=Z(),$=P(p);{const t=l=>{X(l,{size:"md",class:"text-gray-500",style:"transform: rotate(180deg);"})};let s=G(()=>`/management/content/${e.space_name}`);b($,{get href(){return v(s)},home:!0,icon:t,children:(l,a)=>{var o=h();m(()=>c(o,e.space_name)),n(l,o)},$$slots:{icon:!0,default:!0}})}var B=u($,2);J(B,17,()=>v(k),t=>t.text,(t,s)=>{b(t,{get onclick(){return v(s).action},class:"cursor-pointer",icon:a=>{W(a,{class:" dark:text-white"})},children:(a,o)=>{var f=h();m(g=>c(f,g),[()=>v(s).text.replace("/","")]),n(a,f)},$$slots:{icon:!0,default:!0}})});var F=u(B,2);{var L=t=>{b(t,{children:(s,l)=>{var a=Y(),o=P(a),f=Q(o),g=u(o),C=u(g);{var O=r=>{var i=h();m(()=>c(i,`| ${e.payloadContentType}`)),n(r,i)};x(C,r=>{e.payloadContentType&&r(O)})}var S=u(C);{var q=r=>{var i=h();m(()=>c(i,`:${e.schema_name??""}`)),n(r,i)};x(S,r=>{e.schema_name&&r(q)})}m(()=>{c(f,e.shortname),c(g,` ( ${e.resource_type??""} `)}),n(s,a)},$$slots:{default:!0}})};x(F,t=>{[R.folder,R.space].includes(e.resource_type)||t(L)})}n(d,p)},$$slots:{default:!0}}),K(),z()}export{oe as B};