@kaanbiryol/crate-server 0.0.0-stage → 0.17.9

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 (213) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +73 -2
  3. package/THIRD_PARTY_NOTICES.md +3664 -0
  4. package/assets/coordinator.mjs +116 -0
  5. package/assets/credential-revocation.mjs +18 -0
  6. package/assets/database-upgrade-rules.mjs +42 -0
  7. package/assets/migrations/README.md +19 -0
  8. package/assets/qrcode.mjs +1638 -0
  9. package/assets/schema.sql +368 -0
  10. package/assets/server-release.json +6 -0
  11. package/assets/worker-runtime.json +12 -0
  12. package/assets/worker.mjs +1458 -0
  13. package/npm-shrinkwrap.json +939 -0
  14. package/package.json +38 -4
  15. package/scripts/assets.mjs +33 -0
  16. package/scripts/commands/data.mjs +80 -0
  17. package/scripts/commands/devices.mjs +100 -0
  18. package/scripts/commands/doctor.mjs +127 -0
  19. package/scripts/commands/service.mjs +19 -0
  20. package/scripts/commands/setup.mjs +194 -0
  21. package/scripts/commands/start.mjs +171 -0
  22. package/scripts/commands/status.mjs +49 -0
  23. package/scripts/commands/update.mjs +138 -0
  24. package/scripts/crate-server.mjs +11 -0
  25. package/scripts/deployment-fingerprint.mjs +13 -0
  26. package/scripts/local-server-alerts.mjs +53 -0
  27. package/scripts/local-server-backup-schedule.mjs +153 -0
  28. package/scripts/local-server-backup.mjs +275 -0
  29. package/scripts/local-server-cloudflared.mjs +93 -0
  30. package/scripts/local-server-control.mjs +150 -0
  31. package/scripts/local-server-devices.mjs +71 -0
  32. package/scripts/local-server-host-status.mjs +72 -0
  33. package/scripts/local-server-http.mjs +120 -0
  34. package/scripts/local-server-install.mjs +22 -0
  35. package/scripts/local-server-lifecycle.mjs +54 -0
  36. package/scripts/local-server-lock.mjs +217 -0
  37. package/scripts/local-server-migrations.mjs +43 -0
  38. package/scripts/local-server-options.mjs +134 -0
  39. package/scripts/local-server-pairing.mjs +47 -0
  40. package/scripts/local-server-process.mjs +77 -0
  41. package/scripts/local-server-qr.mjs +34 -0
  42. package/scripts/local-server-quick.mjs +116 -0
  43. package/scripts/local-server-readiness.mjs +48 -0
  44. package/scripts/local-server-runtime.mjs +460 -0
  45. package/scripts/local-server-service.mjs +209 -0
  46. package/scripts/local-server-style.mjs +12 -0
  47. package/scripts/local-server-tailscale.mjs +122 -0
  48. package/scripts/local-server-tunnel.mjs +212 -0
  49. package/scripts/local-server-watchdog.mjs +37 -0
  50. package/scripts/local-server-wizard.mjs +100 -0
  51. package/scripts/local-server.mjs +100 -0
  52. package/vendor/miniflare/LICENSE +25 -0
  53. package/vendor/miniflare/dist/local-explorer-ui/assets/ArrowClockwise.es-Cs0EHtoR.js +1 -0
  54. package/vendor/miniflare/dist/local-explorer-ui/assets/Breadcrumbs-BlzUUgNz.js +1 -0
  55. package/vendor/miniflare/dist/local-explorer-ui/assets/CaretDown.es-r8EMGhHM.js +1 -0
  56. package/vendor/miniflare/dist/local-explorer-ui/assets/CaretLeft.es-CCxvlwgr.js +1 -0
  57. package/vendor/miniflare/dist/local-explorer-ui/assets/CaretRight.es-CWeeOO8C.js +1 -0
  58. package/vendor/miniflare/dist/local-explorer-ui/assets/CaretUpDown.es-Bp73BWZN.js +1 -0
  59. package/vendor/miniflare/dist/local-explorer-ui/assets/Check.es-B3dV_aVM.js +1 -0
  60. package/vendor/miniflare/dist/local-explorer-ui/assets/Copy.es-DUyM7PbX.js +1 -0
  61. package/vendor/miniflare/dist/local-explorer-ui/assets/CopyButton-DdMFsAgv.js +1 -0
  62. package/vendor/miniflare/dist/local-explorer-ui/assets/CronTriggersContext-CtoQyHCH.js +1 -0
  63. package/vendor/miniflare/dist/local-explorer-ui/assets/CronTriggersPage-BC2FvZf5.js +1 -0
  64. package/vendor/miniflare/dist/local-explorer-ui/assets/DotsThree.es-B9u_qIrH.js +1 -0
  65. package/vendor/miniflare/dist/local-explorer-ui/assets/Download.es-v8YTKdZh.js +1 -0
  66. package/vendor/miniflare/dist/local-explorer-ui/assets/List.es-GlowdvL8.js +1 -0
  67. package/vendor/miniflare/dist/local-explorer-ui/assets/ListBullets.es-DrJsrtCL.js +1 -0
  68. package/vendor/miniflare/dist/local-explorer-ui/assets/MagnifyingGlass.es-BzOo3pru.js +1 -0
  69. package/vendor/miniflare/dist/local-explorer-ui/assets/PaperPlaneTilt.es-DTLdWOnM.js +1 -0
  70. package/vendor/miniflare/dist/local-explorer-ui/assets/Paperclip.es-6Ysj3lly.js +1 -0
  71. package/vendor/miniflare/dist/local-explorer-ui/assets/Pencil.es-CDpuGAys.js +1 -0
  72. package/vendor/miniflare/dist/local-explorer-ui/assets/Plus.es-xOjOjCs5.js +1 -0
  73. package/vendor/miniflare/dist/local-explorer-ui/assets/ResourceError-DNadec0F.js +1 -0
  74. package/vendor/miniflare/dist/local-explorer-ui/assets/Spinner.es-oqUPe-aY.js +1 -0
  75. package/vendor/miniflare/dist/local-explorer-ui/assets/TableSelect-DgjN53ZF.js +25 -0
  76. package/vendor/miniflare/dist/local-explorer-ui/assets/Trash.es-DTqwcb2_.js +1 -0
  77. package/vendor/miniflare/dist/local-explorer-ui/assets/Warning.es-CLa-n7LD.js +1 -0
  78. package/vendor/miniflare/dist/local-explorer-ui/assets/X.es-BiJFnG31.js +1 -0
  79. package/vendor/miniflare/dist/local-explorer-ui/assets/_appId-Cow8QNw6.js +1 -0
  80. package/vendor/miniflare/dist/local-explorer-ui/assets/_appId-TnuOHwOA.js +5 -0
  81. package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-Cow8QNw6.js +1 -0
  82. package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-DMGTgdaZ.js +1 -0
  83. package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-Daanvg3W.js +1 -0
  84. package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-DqCj-aYZ.js +1 -0
  85. package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-uYCS7veQ.js +1 -0
  86. package/vendor/miniflare/dist/local-explorer-ui/assets/_captureId-Cb6ggQGG.js +1 -0
  87. package/vendor/miniflare/dist/local-explorer-ui/assets/_captureId-Cow8QNw6.js +1 -0
  88. package/vendor/miniflare/dist/local-explorer-ui/assets/_captureId-Daanvg3W.js +1 -0
  89. package/vendor/miniflare/dist/local-explorer-ui/assets/_className-BW1__nAw.js +1 -0
  90. package/vendor/miniflare/dist/local-explorer-ui/assets/_className-Cow8QNw6.js +1 -0
  91. package/vendor/miniflare/dist/local-explorer-ui/assets/_className-DCj9M_Uf.js +1 -0
  92. package/vendor/miniflare/dist/local-explorer-ui/assets/_className-DMGTgdaZ.js +1 -0
  93. package/vendor/miniflare/dist/local-explorer-ui/assets/_className-Daanvg3W.js +1 -0
  94. package/vendor/miniflare/dist/local-explorer-ui/assets/_className-uYCS7veQ.js +1 -0
  95. package/vendor/miniflare/dist/local-explorer-ui/assets/_databaseId-BEh2sOY5.js +1 -0
  96. package/vendor/miniflare/dist/local-explorer-ui/assets/_databaseId-Cow8QNw6.js +1 -0
  97. package/vendor/miniflare/dist/local-explorer-ui/assets/_instanceId-Cow8QNw6.js +1 -0
  98. package/vendor/miniflare/dist/local-explorer-ui/assets/_instanceId-CxJm9jpK.js +1 -0
  99. package/vendor/miniflare/dist/local-explorer-ui/assets/_instanceId-Daanvg3W.js +1 -0
  100. package/vendor/miniflare/dist/local-explorer-ui/assets/_namespaceId-Cow8QNw6.js +1 -0
  101. package/vendor/miniflare/dist/local-explorer-ui/assets/_namespaceId-HT9g0tMq.js +1 -0
  102. package/vendor/miniflare/dist/local-explorer-ui/assets/_objectId-Cow8QNw6.js +1 -0
  103. package/vendor/miniflare/dist/local-explorer-ui/assets/_objectId-Daanvg3W.js +1 -0
  104. package/vendor/miniflare/dist/local-explorer-ui/assets/_objectId-DdmD-NV1.js +1 -0
  105. package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-Cow8QNw6.js +1 -0
  106. package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-DMGTgdaZ.js +1 -0
  107. package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-Daanvg3W.js +1 -0
  108. package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-WgIBBs_w.js +1 -0
  109. package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-uYCS7veQ.js +1 -0
  110. package/vendor/miniflare/dist/local-explorer-ui/assets/ad-hoc-B9HL0oNk.js +1 -0
  111. package/vendor/miniflare/dist/local-explorer-ui/assets/async-t2_zA-v_.js +1 -0
  112. package/vendor/miniflare/dist/local-explorer-ui/assets/button-cdxnqcgzwko8ooha-CjoTKpgy.js +1 -0
  113. package/vendor/miniflare/dist/local-explorer-ui/assets/checkbox-kt1uojk2f9e0d0h1-D923QL-G.js +1 -0
  114. package/vendor/miniflare/dist/local-explorer-ui/assets/clipboard-text-vcbvmtne4zjk4b18-CEoJIuMe.js +1 -0
  115. package/vendor/miniflare/dist/local-explorer-ui/assets/configured-BGeRrlYf.js +1 -0
  116. package/vendor/miniflare/dist/local-explorer-ui/assets/cron-triggers-ZP5ClwAa.js +1 -0
  117. package/vendor/miniflare/dist/local-explorer-ui/assets/dialog-oqh8l3l3zutpibxx-nho54TMC.js +1 -0
  118. package/vendor/miniflare/dist/local-explorer-ui/assets/dropdown-ncwhcd912vmone8k-BAT0p_ep.js +1 -0
  119. package/vendor/miniflare/dist/local-explorer-ui/assets/email-B-IveBKB.js +1 -0
  120. package/vendor/miniflare/dist/local-explorer-ui/assets/events-ClnoiyGH.js +1 -0
  121. package/vendor/miniflare/dist/local-explorer-ui/assets/events-Cow8QNw6.js +1 -0
  122. package/vendor/miniflare/dist/local-explorer-ui/assets/field-krp6z6vfbkrvufz2-DsLUBjzS.js +1 -0
  123. package/vendor/miniflare/dist/local-explorer-ui/assets/format-CjQ0gyEW.js +1 -0
  124. package/vendor/miniflare/dist/local-explorer-ui/assets/helpers-Bz2sloWm.js +1 -0
  125. package/vendor/miniflare/dist/local-explorer-ui/assets/index-BHW_FKpE.js +30 -0
  126. package/vendor/miniflare/dist/local-explorer-ui/assets/index-CiXL10aq.css +2 -0
  127. package/vendor/miniflare/dist/local-explorer-ui/assets/input-area-no30c09udyjxshu5-T786oEMj.js +1 -0
  128. package/vendor/miniflare/dist/local-explorer-ui/assets/input-group-lxdd09p60cf27pe1-BqVz8A4J.js +1 -0
  129. package/vendor/miniflare/dist/local-explorer-ui/assets/input-h48k3uagzrgb98au-BF-hE08e.js +1 -0
  130. package/vendor/miniflare/dist/local-explorer-ui/assets/label-latndvb1ngem7we8-mWoel0Kk.js +1 -0
  131. package/vendor/miniflare/dist/local-explorer-ui/assets/link-DadJAPnd.js +1 -0
  132. package/vendor/miniflare/dist/local-explorer-ui/assets/link-provider-mn2voeohon7cj9o4-CNosc_Ni.js +13 -0
  133. package/vendor/miniflare/dist/local-explorer-ui/assets/matchContext-C1eKDtty.js +1 -0
  134. package/vendor/miniflare/dist/local-explorer-ui/assets/object._-Cow8QNw6.js +1 -0
  135. package/vendor/miniflare/dist/local-explorer-ui/assets/object._-DDwO6NT7.js +1 -0
  136. package/vendor/miniflare/dist/local-explorer-ui/assets/object._-Daanvg3W.js +1 -0
  137. package/vendor/miniflare/dist/local-explorer-ui/assets/observability-CC1mP6Xo.js +15 -0
  138. package/vendor/miniflare/dist/local-explorer-ui/assets/observability-CX-6-j6d.js +1 -0
  139. package/vendor/miniflare/dist/local-explorer-ui/assets/observability-Cow8QNw6.js +1 -0
  140. package/vendor/miniflare/dist/local-explorer-ui/assets/react-BZY8YNV6.js +1 -0
  141. package/vendor/miniflare/dist/local-explorer-ui/assets/redirect-CckYXsV1.js +1 -0
  142. package/vendor/miniflare/dist/local-explorer-ui/assets/routes-BlOyav-b.js +1 -0
  143. package/vendor/miniflare/dist/local-explorer-ui/assets/routing-CVthjHxr.js +2 -0
  144. package/vendor/miniflare/dist/local-explorer-ui/assets/routing-Cow8QNw6.js +1 -0
  145. package/vendor/miniflare/dist/local-explorer-ui/assets/routing-DMGTgdaZ.js +1 -0
  146. package/vendor/miniflare/dist/local-explorer-ui/assets/routing-uYCS7veQ.js +1 -0
  147. package/vendor/miniflare/dist/local-explorer-ui/assets/select-kva5ru5f673kah1m-DQuxH2_G.js +1 -0
  148. package/vendor/miniflare/dist/local-explorer-ui/assets/sending-BPjb3S3Y.js +1 -0
  149. package/vendor/miniflare/dist/local-explorer-ui/assets/sending-Cow8QNw6.js +1 -0
  150. package/vendor/miniflare/dist/local-explorer-ui/assets/switch-ihaydbzem62bey4p-C9M-MPNS.js +1 -0
  151. package/vendor/miniflare/dist/local-explorer-ui/assets/table-inweecadl3her7pd-UWLv9e8D.js +1 -0
  152. package/vendor/miniflare/dist/local-explorer-ui/assets/text-nmyi1rkwdj37f30f-BLzIhmEO.js +1 -0
  153. package/vendor/miniflare/dist/local-explorer-ui/assets/types-DTx0hLYz.js +1 -0
  154. package/vendor/miniflare/dist/local-explorer-ui/assets/useCursorPaginatedList-BGUINn38.js +1 -0
  155. package/vendor/miniflare/dist/local-explorer-ui/assets/useRouterState-BLq6Ai_6.js +1 -0
  156. package/vendor/miniflare/dist/local-explorer-ui/favicon.svg +3 -0
  157. package/vendor/miniflare/dist/local-explorer-ui/index.html +27 -0
  158. package/vendor/miniflare/dist/src/index.d.ts +14183 -0
  159. package/vendor/miniflare/dist/src/index.js +123738 -0
  160. package/vendor/miniflare/dist/src/mdream_edge_bg.wasm +0 -0
  161. package/vendor/miniflare/dist/src/plugins/artifacts/git-sidecar.js +21071 -0
  162. package/vendor/miniflare/dist/src/workers/access/access-identity.worker.js +10 -0
  163. package/vendor/miniflare/dist/src/workers/analytics-engine/analytics-engine.worker.js +21 -0
  164. package/vendor/miniflare/dist/src/workers/analytics-engine/remote.worker.js +2578 -0
  165. package/vendor/miniflare/dist/src/workers/artifacts/binding.worker.js +903 -0
  166. package/vendor/miniflare/dist/src/workers/artifacts/wrapped-binding.worker.js +52 -0
  167. package/vendor/miniflare/dist/src/workers/assets/assets-kv.worker.js +27 -0
  168. package/vendor/miniflare/dist/src/workers/assets/assets.worker.js +1525 -0
  169. package/vendor/miniflare/dist/src/workers/assets/router.worker.js +1883 -0
  170. package/vendor/miniflare/dist/src/workers/assets/rpc-proxy.worker.js +55 -0
  171. package/vendor/miniflare/dist/src/workers/browser-rendering/binding.worker.js +453 -0
  172. package/vendor/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js +18 -0
  173. package/vendor/miniflare/dist/src/workers/cache/cache-entry.worker.js +24 -0
  174. package/vendor/miniflare/dist/src/workers/cache/cache.worker.js +652 -0
  175. package/vendor/miniflare/dist/src/workers/core/dev-control.worker.js +52 -0
  176. package/vendor/miniflare/dist/src/workers/core/dev-registry-proxy.worker.js +371 -0
  177. package/vendor/miniflare/dist/src/workers/core/do-wrapper.worker.js +67 -0
  178. package/vendor/miniflare/dist/src/workers/core/entry.worker.js +5516 -0
  179. package/vendor/miniflare/dist/src/workers/core/outbound.worker.js +147 -0
  180. package/vendor/miniflare/dist/src/workers/d1/database.worker.js +298 -0
  181. package/vendor/miniflare/dist/src/workers/d1/entry.worker.js +143 -0
  182. package/vendor/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace-proxy.worker.js +2574 -0
  183. package/vendor/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace.worker.js +11 -0
  184. package/vendor/miniflare/dist/src/workers/email/email-store.worker.js +606 -0
  185. package/vendor/miniflare/dist/src/workers/email/email.worker.js +26 -0
  186. package/vendor/miniflare/dist/src/workers/email/send_email.worker.js +3703 -0
  187. package/vendor/miniflare/dist/src/workers/flagship/binding.worker.js +394 -0
  188. package/vendor/miniflare/dist/src/workers/flagship/object.worker.js +349 -0
  189. package/vendor/miniflare/dist/src/workers/hello-world/binding.worker.js +18 -0
  190. package/vendor/miniflare/dist/src/workers/hello-world/object.worker.js +13 -0
  191. package/vendor/miniflare/dist/src/workers/images/images.worker.js +450 -0
  192. package/vendor/miniflare/dist/src/workers/k2/binding.worker.js +2583 -0
  193. package/vendor/miniflare/dist/src/workers/kv/namespace.worker.js +323 -0
  194. package/vendor/miniflare/dist/src/workers/kv/sites.worker.js +148 -0
  195. package/vendor/miniflare/dist/src/workers/local-explorer/explorer.worker.js +17275 -0
  196. package/vendor/miniflare/dist/src/workers/observability/collector.worker.js +725 -0
  197. package/vendor/miniflare/dist/src/workers/pipelines/pipeline.worker.js +9 -0
  198. package/vendor/miniflare/dist/src/workers/queues/broker.worker.js +391 -0
  199. package/vendor/miniflare/dist/src/workers/r2/bucket.worker.js +1171 -0
  200. package/vendor/miniflare/dist/src/workers/r2/public.worker.js +1319 -0
  201. package/vendor/miniflare/dist/src/workers/r2/s3/index.worker.js +11128 -0
  202. package/vendor/miniflare/dist/src/workers/ratelimit/ratelimit-object.worker.js +55 -0
  203. package/vendor/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js +69 -0
  204. package/vendor/miniflare/dist/src/workers/secrets-store/secret.worker.js +64 -0
  205. package/vendor/miniflare/dist/src/workers/shared/index.worker.js +730 -0
  206. package/vendor/miniflare/dist/src/workers/shared/object-entry.worker.js +33 -0
  207. package/vendor/miniflare/dist/src/workers/shared/remote-proxy-client.worker.js +2698 -0
  208. package/vendor/miniflare/dist/src/workers/shared/zod.worker.js +15459 -0
  209. package/vendor/miniflare/dist/src/workers/stream/binding.worker.js +282 -0
  210. package/vendor/miniflare/dist/src/workers/stream/object.worker.js +479 -0
  211. package/vendor/miniflare/dist/src/workers/workflows/binding.worker.js +5137 -0
  212. package/vendor/miniflare/dist/src/workers/workflows/wrapped-binding.worker.js +111 -0
  213. package/vendor/miniflare/package.json +135 -0
@@ -0,0 +1,30 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/email-B-IveBKB.js","assets/react-BZY8YNV6.js","assets/cron-triggers-ZP5ClwAa.js","assets/useRouterState-BLq6Ai_6.js","assets/CronTriggersContext-CtoQyHCH.js","assets/routes-BlOyav-b.js","assets/button-cdxnqcgzwko8ooha-CjoTKpgy.js","assets/link-provider-mn2voeohon7cj9o4-CNosc_Ni.js","assets/Copy.es-DUyM7PbX.js","assets/observability-CX-6-j6d.js","assets/CaretDown.es-r8EMGhHM.js","assets/CaretRight.es-CWeeOO8C.js","assets/observability-CC1mP6Xo.js","assets/label-latndvb1ngem7we8-mWoel0Kk.js","assets/Plus.es-xOjOjCs5.js","assets/Trash.es-DTqwcb2_.js","assets/X.es-BiJFnG31.js","assets/clipboard-text-vcbvmtne4zjk4b18-CEoJIuMe.js","assets/Check.es-B3dV_aVM.js","assets/input-h48k3uagzrgb98au-BF-hE08e.js","assets/field-krp6z6vfbkrvufz2-DsLUBjzS.js","assets/dialog-oqh8l3l3zutpibxx-nho54TMC.js","assets/select-kva5ru5f673kah1m-DQuxH2_G.js","assets/CaretUpDown.es-Bp73BWZN.js","assets/ListBullets.es-DrJsrtCL.js","assets/MagnifyingGlass.es-BzOo3pru.js","assets/Warning.es-CLa-n7LD.js","assets/input-group-lxdd09p60cf27pe1-BqVz8A4J.js","assets/observability-Cow8QNw6.js","assets/ResourceError-DNadec0F.js","assets/link-DadJAPnd.js","assets/_workflowName-DMGTgdaZ.js","assets/_workflowName-Cow8QNw6.js","assets/_bucketName-DMGTgdaZ.js","assets/_bucketName-Cow8QNw6.js","assets/events-ClnoiyGH.js","assets/events-Cow8QNw6.js","assets/_namespaceId-HT9g0tMq.js","assets/DotsThree.es-B9u_qIrH.js","assets/Pencil.es-CDpuGAys.js","assets/dropdown-ncwhcd912vmone8k-BAT0p_ep.js","assets/table-inweecadl3her7pd-UWLv9e8D.js","assets/checkbox-kt1uojk2f9e0d0h1-D923QL-G.js","assets/Breadcrumbs-BlzUUgNz.js","assets/CopyButton-DdMFsAgv.js","assets/_namespaceId-Cow8QNw6.js","assets/_appId-TnuOHwOA.js","assets/input-area-no30c09udyjxshu5-T786oEMj.js","assets/switch-ihaydbzem62bey4p-C9M-MPNS.js","assets/helpers-Bz2sloWm.js","assets/_appId-Cow8QNw6.js","assets/sending-BPjb3S3Y.js","assets/Paperclip.es-6Ysj3lly.js","assets/format-CjQ0gyEW.js","assets/useCursorPaginatedList-BGUINn38.js","assets/async-t2_zA-v_.js","assets/sending-Cow8QNw6.js","assets/routing-DMGTgdaZ.js","assets/routing-Cow8QNw6.js","assets/_className-DMGTgdaZ.js","assets/_className-Cow8QNw6.js","assets/_databaseId-BEh2sOY5.js","assets/TableSelect-DgjN53ZF.js","assets/CaretLeft.es-CCxvlwgr.js","assets/Spinner.es-oqUPe-aY.js","assets/text-nmyi1rkwdj37f30f-BLzIhmEO.js","assets/_databaseId-Cow8QNw6.js","assets/configured-BGeRrlYf.js","assets/CronTriggersPage-BC2FvZf5.js","assets/ad-hoc-B9HL0oNk.js","assets/_workflowName-WgIBBs_w.js","assets/ArrowClockwise.es-Cs0EHtoR.js","assets/types-DTx0hLYz.js","assets/List.es-GlowdvL8.js","assets/PaperPlaneTilt.es-DTLdWOnM.js","assets/_workflowName-uYCS7veQ.js","assets/_bucketName-DqCj-aYZ.js","assets/Download.es-v8YTKdZh.js","assets/_bucketName-uYCS7veQ.js","assets/routing-CVthjHxr.js","assets/routing-uYCS7veQ.js","assets/_className-BW1__nAw.js","assets/_className-uYCS7veQ.js","assets/_instanceId-CxJm9jpK.js","assets/_instanceId-Cow8QNw6.js","assets/_captureId-Cb6ggQGG.js","assets/_captureId-Cow8QNw6.js","assets/_objectId-Cow8QNw6.js","assets/_objectId-DdmD-NV1.js","assets/object._-DDwO6NT7.js","assets/object._-Cow8QNw6.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,n as t,r as n,t as r}from"./react-BZY8YNV6.js";import{A as i,C as a,D as o,E as s,F as c,M as l,N as u,O as d,P as f,S as p,T as m,_ as h,a as g,b as _,c as v,d as y,g as b,h as x,i as S,j as ee,k as te,m as ne,n as C,p as re,r as ie,s as ae,t as oe,u as se,v as ce,x as le,y as w}from"./useRouterState-BLq6Ai_6.js";import{a as T,i as ue,n as de,r as fe,t as pe}from"./redirect-CckYXsV1.js";import{a as me,i as he,r as ge,t as _e}from"./link-DadJAPnd.js";import{n as ve,t as ye}from"./matchContext-C1eKDtty.js";import{Bt as be,Ct as xe,D as Se,Ht as Ce,J as we,K as Te,Rt as Ee,S as De,Vt as E,_ as Oe,at as ke,b as Ae,d as je,g as Me,i as Ne,it as Pe,lt as Fe,n as Ie,r as Le,rt as Re,t as ze,vt as Be,wt as Ve,x as He,zt as Ue}from"./link-provider-mn2voeohon7cj9o4-CNosc_Ni.js";import{r as We}from"./button-cdxnqcgzwko8ooha-CjoTKpgy.js";import{t as Ge}from"./CaretLeft.es-CCxvlwgr.js";import{t as Ke}from"./CaretRight.es-CWeeOO8C.js";import{t as qe}from"./CaretUpDown.es-Bp73BWZN.js";import{t as Je}from"./Check.es-B3dV_aVM.js";import{t as Ye}from"./MagnifyingGlass.es-BzOo3pru.js";import{t as Xe}from"./Warning.es-CLa-n7LD.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ze=new WeakMap,Qe=new WeakMap,$e={current:[]},et=!1,tt=0,nt=new Set,rt=new Map;function it(e){for(let t of e){if($e.current.includes(t))continue;$e.current.push(t),t.recompute();let e=Qe.get(t);if(e)for(let t of e){let e=Ze.get(t);e?.length&&it(e)}}}function at(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function ot(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function st(e){if(tt>0&&!rt.has(e)&&rt.set(e,e.prevState),nt.add(e),!(tt>0)&&!et)try{for(et=!0;nt.size>0;){let e=Array.from(nt);nt.clear();for(let t of e)t.prevState=rt.get(t)??t.prevState,at(t);for(let t of e){let e=Ze.get(t);e&&($e.current.push(t),it(e))}for(let t of e){let e=Ze.get(t);if(e)for(let t of e)ot(t)}}}finally{et=!1,$e.current=[],rt.clear()}}function ct(e){tt++;try{e()}finally{if(tt--,tt===0){let e=nt.values().next().value;e&&st(e)}}}function lt(e){return typeof e==`function`}var ut=class{constructor(e,t){this.listeners=new Set,this.subscribe=e=>{var t;this.listeners.add(e);let n=((t=this.options)?.onSubscribe)?.call(t,e,this);return()=>{this.listeners.delete(e),n?.()}},this.prevState=e,this.state=e,this.options=t}setState(e){var t,n;this.prevState=this.state,this.state=this.options?.updateFn?this.options.updateFn(this.prevState)(e):lt(e)?e(this.prevState):e,(n=(t=this.options)?.onUpdate)==null||n.call(t),st(this)}},dt=`__TSR_index`,ft=`popstate`,pt=`beforeunload`;function mt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=vt(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[dt];i=ht(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[dt];i=ht(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[dt]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function ht(e,t){t||={};let n=yt();return{...t,key:n,__TSR_key:n,[dt]:e}}function gt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>vt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=yt();t.history.replaceState({[dt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(ee._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),ee._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=vt(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),ee.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[dt]-l.state[dt],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),ee.notify(u);return}}}l=c(),ee.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},ee=mt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(pt,S,{capture:!0}),t.removeEventListener(ft,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(pt,S,{capture:!0}),t.addEventListener(ft,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return ee._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return ee._ignoreSubscribers||b(`REPLACE`),n},ee}function _t(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function vt(e,t){let n=_t(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=yt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[dt]:0,key:a,__TSR_key:a}}}function yt(){return(Math.random()+1).toString(36).substring(7)}function bt(e){let t;return ct(()=>{t=e()}),t}function xt(){try{if(typeof window<`u`&&typeof window.sessionStorage==`object`)return window.sessionStorage}catch{}}var St=`tsr-scroll-restoration-v1_3`,Ct=(e,t)=>{let n;return(...r)=>{n||=setTimeout(()=>{e(...r),n=null},t)}};function wt(){let e=xt();if(!e)return null;let t=e.getItem(St),n=t?JSON.parse(t):{};return{state:n,set:t=>{n=i(t,n)||n;try{e.setItem(St,JSON.stringify(n))}catch{console.warn(`[ts-router] Could not persist scroll restoration state to sessionStorage.`)}}}}var Tt=wt(),Et=e=>e.state.__TSR_key||e.href;function Dt(e){let t=[],n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(` > `)}`.toLowerCase()}var Ot=!1;function kt({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:a}){let o;try{o=JSON.parse(sessionStorage.getItem(e)||`{}`)}catch(e){console.error(e);return}let s=t||window.history.state?.__TSR_key,c=o[s];Ot=!0;scroll:{if(r&&c&&Object.keys(c).length>0){for(let e in c){let t=c[e];if(e===`window`)window.scrollTo({top:t.scrollY,left:t.scrollX,behavior:n});else if(e){let n=document.querySelector(e);n&&(n.scrollLeft=t.scrollX,n.scrollTop=t.scrollY)}}break scroll}let e=(a??window.location).hash.split(`#`,2)[1];if(e){let t=window.history.state?.__hashScrollIntoViewOptions??!0;if(t){let n=document.getElementById(e);n&&n.scrollIntoView(t)}break scroll}let t={top:0,left:0,behavior:n};if(window.scrollTo(t),i)for(let e of i){if(e===`window`)continue;let n=typeof e==`function`?e():document.querySelector(e);n&&n.scrollTo(t)}}Ot=!1}function At(e,t){if(!Tt||((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Tt))return;e.isScrollRestorationSetup=!0,Ot=!1;let n=e.options.getScrollRestorationKey||Et;window.history.scrollRestoration=`manual`,typeof document<`u`&&document.addEventListener(`scroll`,Ct(t=>{if(Ot||!e.isScrollRestoring)return;let r=``;if(t.target===document||t.target===window)r=`window`;else{let e=t.target.getAttribute(`data-scroll-restoration-id`);r=e?`[data-scroll-restoration-id="${e}"]`:Dt(t.target)}let i=n(e.state.location);Tt.set(e=>{let t=e[i]||={},n=t[r]||={};if(r===`window`)n.scrollX=window.scrollX||0,n.scrollY=window.scrollY||0;else if(r){let e=document.querySelector(r);e&&(n.scrollX=e.scrollLeft||0,n.scrollY=e.scrollTop||0)}return e})},100),!0),e.subscribe(`onRendered`,t=>{let r=n(t.toLocation);e.resetNextScroll?(typeof e.options.scrollRestoration!=`function`||e.options.scrollRestoration({location:e.latestLocation}))&&(kt({storageKey:St,key:r,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Tt.set(e=>(e[r]||={},e))):e.resetNextScroll=!0})}function jt(e){if(typeof document<`u`&&document.querySelector){let t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==``){let n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function Mt(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Nt(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Pt(e){let t=new URLSearchParams(e),n={};for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Nt(r):Array.isArray(t)?t.push(Nt(r)):n[e]=[t,Nt(r)]}return n}var Ft=Lt(JSON.parse),It=Rt(JSON.stringify,JSON.parse);function Lt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Pt(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Rt(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Mt(e,r);return t?`?${t}`:``}}var zt=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Bt=(e,t)=>!(!e.preload||e.router.state.matches.some(e=>e.id===t)),Vt=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Ht=(e,t)=>{let n=e.router.routesById[t.routeId??``]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),a(n.options.notFoundComponent,`No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router.`);let r=e.matches.find(e=>e.routeId===n.id);a(r,`Could not find match for route: `+n.id),e.updateMatch(r.id,e=>({...e,status:`notFound`,error:t,isFetching:!1})),t.routerCode===`BEFORE_LOAD`&&n.parentRoute&&(t.routeId=n.parentRoute.id,Ht(e,t))},Ut=(e,t,n)=>{if(pe(n)||ue(n)){if(pe(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;let r=pe(n)?`redirected`:`notFound`;t._nonReactive.error=n,e.updateMatch(t.id,i=>({...i,status:r,context:Vt(e,t.index),isFetching:!1,error:n})),ue(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw pe(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(Ht(e,n),n)}},Wt=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Gt=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Ut(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,Ut(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},Kt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Bt(e,t)&&(n.options.loader||n.options.beforeLoad||nn(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{zt(e)},i);r._nonReactive.pendingTimeout=t}},qt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Kt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&Ut(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Jt=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=m(()=>{a?.resolve()});let{paramsError:o,searchError:s}=i;o&&Gt(e,n,o,`PARSE_PARAMS`),s&&Gt(e,n,s,`VALIDATE_SEARCH`),Kt(e,t,r,i);let c=new AbortController,l=!1,d=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},f=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){bt(()=>{d(),f()});return}i._nonReactive.beforeLoadPromise=m();let p={...Vt(e,n,!1),...i.__routeContext},{search:h,params:g,cause:_}=i,v=Bt(e,t),y={search:h,abortController:c,params:g,preload:v,context:p,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{r===void 0?bt(()=>{d(),f()}):((pe(r)||ue(r))&&(d(),Gt(e,n,r,`BEFORE_LOAD`)),bt(()=>{d(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),f()}))},x;try{if(x=r.options.beforeLoad(y),u(x))return d(),x.catch(t=>{Gt(e,n,t,`BEFORE_LOAD`)}).then(b)}catch(t){d(),Gt(e,n,t,`BEFORE_LOAD`)}b(x)},Yt=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Jt(e,n,t,i),s=()=>{if(Wt(e,n))return;let t=qt(e,n,i);return u(t)?t.then(o):o()};return a()},Xt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Zt=(e,t,n,r)=>{let i=e.matchPromises[n-1],{params:a,loaderDeps:o,abortController:s,cause:c}=e.router.getMatch(t),l=Vt(e,n),u=Bt(e,t);return{params:a,deps:o,preload:!!u,parentMatchPromise:i,abortController:s,context:l,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:u?`preload`:c,route:r,...e.router.options.additionalContext}},Qt=async(e,t,n,r)=>{try{let i=e.router.getMatch(t);try{tn(r);let a=r.options.loader?.(Zt(e,t,n,r)),o=r.options.loader&&u(a);if((o||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,e=>({...e,isFetching:`loader`})),r.options.loader){let n=o?await a:a;Ut(e,e.router.getMatch(t),n),n!==void 0&&e.updateMatch(t,e=>({...e,loaderData:n}))}r._lazyPromise&&await r._lazyPromise;let s=i._nonReactive.minPendingPromise;s&&await s,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,t=>({...t,error:void 0,context:Vt(e,n),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(a){let o=a;if(o?.name===`AbortError`){if(i.abortController.signal.aborted){i._nonReactive.loaderPromise?.resolve(),i._nonReactive.loaderPromise=void 0;return}e.updateMatch(t,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:Vt(e,n)}));return}let s=i._nonReactive.minPendingPromise;s&&await s,ue(a)&&await r.options.notFoundComponent?.preload?.(),Ut(e,e.router.getMatch(t),a);try{r.options.onError?.(a)}catch(n){o=n,Ut(e,e.router.getMatch(t),n)}e.updateMatch(t,t=>({...t,error:o,context:Vt(e,n),status:`error`,isFetching:!1}))}}catch(n){let r=e.router.getMatch(t);r&&(r._nonReactive.loaderPromise=void 0),Ut(e,r,n)}},$t=async(e,t)=>{async function n(n,i,s,c){let l=Date.now()-i.updatedAt,u=n?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,d=c.options.shouldReload,f=typeof d==`function`?d(Zt(e,r,t,c)):d,{status:p,invalid:m}=s;a=p===`success`&&(m||(f??l>u)),n&&c.options.preload===!1||(a&&!e.sync?(o=!0,(async()=>{try{await Qt(e,r,t,c);let n=e.router.getMatch(r);n._nonReactive.loaderPromise?.resolve(),n._nonReactive.loadPromise?.resolve(),n._nonReactive.loaderPromise=void 0}catch(t){pe(t)&&await e.router.navigate(t.options)}})()):(p!==`success`||a&&e.sync)&&await Qt(e,r,t,c))}let{id:r,routeId:i}=e.matches[t],a=!1,o=!1,s=e.router.looseRoutesById[i];if(!Wt(e,r)){let t=e.router.getMatch(r),i=Bt(e,r);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload)return t;await t._nonReactive.loaderPromise;let a=e.router.getMatch(r),o=a._nonReactive.error||a.error;o&&Ut(e,a,o),a.status===`pending`&&await n(i,t,a,s)}else{let a=i&&!e.router.state.matches.some(e=>e.id===r),o=e.router.getMatch(r);o._nonReactive.loaderPromise=m(),a!==o.preload&&e.updateMatch(r,e=>({...e,preload:a})),await n(i,t,o,s)}}let c=e.router.getMatch(r);o||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,o||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;let l=o?c.isFetching:!1;return l!==c.isFetching||c.invalid!==!1?(e.updateMatch(r,e=>({...e,isFetching:l,invalid:!1})),e.router.getMatch(r)):c};async function en(e){let t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(e=>e._forcePending)&&zt(t);try{for(let e=0;e<t.matches.length;e++){let n=Yt(t,e);u(n)&&await n}let e=t.firstBadMatchIndex??t.matches.length;for(let n=0;n<e;n++)t.matchPromises.push($t(t,n));let n=(await Promise.allSettled(t.matchPromises)).filter(e=>e.status===`rejected`).map(e=>e.reason),r;for(let e of n){if(pe(e))throw e;!r&&ue(e)&&(r=e)}for(let e of t.matches){let{id:n,routeId:r}=e,i=t.router.looseRoutesById[r];try{let e=Xt(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}if(r)throw r;let i=zt(t);u(i)&&await i}catch(e){if(ue(e)&&!t.preload){let n=zt(t);throw u(n)&&await n,e}if(pe(e))throw e}return t.matches}async function tn(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){let t=()=>{let t=[];for(let n of rn){let r=e.options[n]?.preload;r&&t.push(r())}if(t.length)return Promise.all(t).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function nn(e){for(let t of rn)if(e.options[t]?.preload)return!0;return!1}var rn=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function an(e){return{input:({url:t})=>{for(let n of e)t=sn(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=cn(e[n],t);return t}}}function on(e){let t=ne(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=y([`/`,t,e.pathname]),e)}}function sn(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function cn(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ln(e){let t=e.resolvedLocation,n=e.location;return{fromLocation:t,toLocation:n,pathChanged:t?.pathname!==n.pathname,hrefChanged:t?.href!==n.href,hashChanged:t?.hash!==n.hash}}var un=class{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{e.notFoundRoute&&console.warn(`The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.`);let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=v(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:gt()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=p(1e3),e=this.buildRouteTree(),this.setRoutes(e)}!this.__store&&this.latestLocation&&(this.__store=new ut(pn(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(e=>![`redirected`].includes(e.status))}}}),At(this));let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=ne(o);t&&t!==`/`&&e.push(on({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:an(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a)`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=le(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&_(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let o=this.options.parseSearch(n),l=this.options.stringifySearch(o);return{href:e+l+r,publicHref:i,pathname:s(e).path,external:!1,searchStr:l,search:c(t?.search,o),hash:s(r.slice(1)).path,state:c(t?.state,a)}}let o=new URL(i,this.origin),l=sn(this.rewrite,o),u=this.options.parseSearch(l.search),d=this.options.stringifySearch(u);return l.search=d,{href:l.href.replace(l.origin,``),publicHref:i,pathname:s(l.pathname).path,external:!!this.rewrite&&l.origin!==this.origin,searchStr:d,search:c(t?.search,u),hash:s(l.hash.slice(1)).path,state:c(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>re({base:e,to:ae(t),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>hn({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{let e=this.state.matches.filter(e=>e.status===`pending`),t=this.state.matches.filter(e=>e.isFetching===`loader`);new Set([...this.state.pendingMatches??[],...e,...t]).forEach(e=>{this.cancelMatch(e.id)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let a=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,o=this.resolvePathWithBase(a,`.`),l=r.search,u={...r.params},f=t.to?this.resolvePathWithBase(o,`${t.to}`):this.resolvePathWithBase(o,`.`),p=t.params===!1||t.params===null?{}:(t.params??!0)===!0?u:Object.assign(u,i(t.params,u)),m=se({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath,h=this.getMatchedRoutes(m),g=h.matchedRoutes;(h.foundRoute?h.foundRoute.path!==`/`&&h.routeParams[`**`]:b(m))&&this.options.notFoundRoute&&(g=[...g,this.options.notFoundRoute]);let _=!1;if(Object.keys(p).length>0)for(let e of g){let t=e.options.params?.stringify??e.options.stringifyParams;t&&(_=!0,Object.assign(p,t(p)))}let v=e.leaveParams?f:s(_?se({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath:m).path,y=l;if(e._includeValidateSearch&&this.options.search?.strict){let e={};g.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,mn(t.options.validateSearch,{...e,...y}))}catch{}}),y=e}y=gn({search:y,dest:t,destRoutes:g,_includeValidateSearch:e._includeValidateSearch}),y=c(l,y);let x=this.options.stringifySearch(y),S=t.hash===!0?n.hash:t.hash?i(t.hash,n.hash):void 0,ee=S?`#${S}`:``,te=t.state===!0?n.state:t.state?i(t.state,n.state):{};te=c(n.state,te);let ne=`${v}${x}${ee}`,C,re,ie=!1;if(this.rewrite){let e=new URL(ne,this.origin),t=cn(this.rewrite,e);C=e.href.replace(e.origin,``),t.origin===this.origin?re=t.pathname+t.search+t.hash:(re=t.href,ie=!0)}else C=d(ne),re=C;return{publicHref:re,href:C,pathname:v,search:y,searchStr:x,state:te,hash:S??``,external:ie,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let a=t(n),o=r?t(r):void 0;if(!o){let n={};if(this.options.routeMasks){let s=h(a.pathname,this.processedTree);if(s){Object.assign(n,s.rawParams);let{from:a,params:c,...l}=s.route,u=c===!1||c===null?{}:(c??!0)===!0?n:Object.assign(n,i(c,n));r={from:e.from,...l,params:u},o=t(r)}}}return o&&(a.maskedLocation=o),a};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=o(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},i=b(this.latestLocation.href)===b(n.href),a=this.commitLocationPromise;if(this.commitLocationPromise=m(()=>{a?.resolve()}),i&&r())this.load();else{let{maskedLocation:r,hashScrollIntoView:i,...a}=n;r&&(a={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=i??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=vt(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=sn(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(ee(t))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation);this.__store.setState(t=>({...t,status:`pending`,statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:e,cachedMatches:t.cachedMatches.filter(t=>!e.some(e=>e.id===t.id))}))},this.load=async e=>{let t,n,r;for(r=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=this.state.resolvedLocation;this.state.redirect||this.emit({type:`onBeforeNavigate`,...ln({resolvedLocation:n,location:t})}),this.emit({type:`onBeforeLoad`,...ln({resolvedLocation:n,location:t})}),await en({router:this,sync:e?.sync,matches:this.state.pendingMatches,location:t,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=[],t=[],n=[];bt(()=>{this.__store.setState(r=>{let i=r.matches,a=r.pendingMatches||r.matches;return e=i.filter(e=>!a.some(t=>t.id===e.id)),t=a.filter(e=>!i.some(t=>t.id===e.id)),n=a.filter(e=>i.some(t=>t.id===e.id)),{...r,isLoading:!1,loadedAt:Date.now(),matches:a,pendingMatches:void 0,cachedMatches:[...r.cachedMatches,...e.filter(e=>e.status!==`error`&&e.status!==`notFound`)]}}),this.clearExpiredCache()}),[[e,`onLeave`],[t,`onEnter`],[n,`onStay`]].forEach(([e,t])=>{e.forEach(e=>{this.looseRoutesById[e.routeId].options[t]?.(e)})})})})}})}catch(e){pe(e)?(t=e,this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):ue(e)&&(n=e),this.__store.setState(e=>({...e,statusCode:t?t.status:n?404:e.matches.some(e=>e.status===`error`)?500:200,redirect:t}))}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(e=>e.status===`error`)&&(i=500),i!==void 0&&this.__store.setState(e=>({...e,statusCode:i}))},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.state.resolvedLocation,a=typeof t.types==`function`?t.types(ln({resolvedLocation:i,location:r})):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.state.pendingMatches?.some(t=>t.id===e)?`pendingMatches`:this.state.matches.some(t=>t.id===e)?`matches`:this.state.cachedMatches.some(t=>t.id===e)?`cachedMatches`:``;n&&this.__store.setState(r=>({...r,[n]:r[n]?.map(n=>n.id===e?t(n):n)}))})},this.getMatch=e=>{let t=t=>t.id===e;return this.state.cachedMatches.find(t)??this.state.pendingMatches?.find(t)??this.state.matches.find(t)},this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.__store.setState(e=>({...e,matches:e.matches.map(t),cachedMatches:e.cachedMatches.map(t),pendingMatches:e.pendingMatches?.map(t)})),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.__store.setState(e=>({...e,cachedMatches:[]})):this.__store.setState(e=>({...e,cachedMatches:e.cachedMatches.filter(e=>!t(e))}))},this.clearExpiredCache=()=>{this.clearCache({filter:e=>{let t=this.looseRoutesById[e.routeId];if(!t.options.loader)return!0;let n=(e.preload?t.options.preloadGcTime??this.options.defaultPreloadGcTime:t.options.gcTime??this.options.defaultGcTime)??3e5;return e.status===`error`||Date.now()-e.updatedAt>=n}})},this.loadRouteChunk=tn,this.preloadRoute=async e=>{let t=this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(e=>e.id)),i=new Set([...r,...this.state.cachedMatches.map(e=>e.id)]);bt(()=>{n.forEach(e=>{i.has(e.id)||this.__store.setState(t=>({...t,cachedMatches:[...t.cachedMatches,e]}))})});try{return n=await en({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(pe(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});ue(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.state.status!==`pending`)return!1;let i=(t?.pending===void 0?!this.state.isLoading:t.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,a=w(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!o(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?o(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(e=>e.status===`notFound`||e.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??It,parseSearch:e.parseSearch??Ft}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:a}=n,{matchedRoutes:o}=n,s=!1;(r?r.path!==`/`&&i[`**`]:b(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:s=!0);let l=s?vn(this.options.notFoundMode,o):void 0,u=Array(o.length),d=new Map(this.state.matches.map(e=>[e.routeId,e]));for(let n=0;n<o.length;n++){let r=o[n],s=u[n-1],f,p,h;{let n=s?.search??e.search,i=s?._strictSearch??void 0;try{let e=mn(r.options.validateSearch,{...n})??void 0;f={...n,...e},p={...i,...e},h=void 0}catch(e){let r=e;if(e instanceof dn||(r=new dn(e.message,{cause:e})),t?.throwOnError)throw r;f=n,p={},h=r}}let g=r.options.loaderDeps?.({search:f})??``,_=g?JSON.stringify(g):``,{interpolatedPath:v,usedParams:y}=se({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),b=r.id+v+_,x=this.getMatch(b),S=d.get(r.id),ee=x?._strictParams??y,te;if(!x)try{yn(r,y,a,ee)}catch(e){if(te=ue(e)||pe(e)?e:new fn(e.message,{cause:e}),t?.throwOnError)throw te}Object.assign(i,ee);let ne=S?`stay`:`enter`,C;if(x)C={...x,cause:ne,params:S?.params??i,_strictParams:ee,search:c(S?S.search:x.search,f),_strictSearch:p};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||nn(r)?`pending`:`success`;C={id:b,ssr:r.options.ssr,index:n,routeId:r.id,params:S?.params??i,_strictParams:ee,pathname:v,updatedAt:Date.now(),search:S?c(S.search,f):f,_strictSearch:p,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:te,__routeContext:void 0,_nonReactive:{loadPromise:m()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ne,loaderDeps:S?c(S.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(C.globalNotFound=l===r.id),C.searchError=h;let re=this.getParentContext(s);C.context={...re,...C.__routeContext,...C.__beforeLoadContext},u[n]=C}for(let t=0;t<u.length;t++){let n=u[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=d.get(n.routeId);if(n.params=o?c(o.params,i):i,!a){let i=u[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:u,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return u}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=f(t),a={...e.search};for(let e of t)try{Object.assign(a,mn(e.options.validateSearch,a))}catch{}let o=f(this.state.matches),s=o&&o.routeId===i.id&&e.pathname===this.state.location.pathname,c;if(s)c=o.params;else{let e={...n};for(let i of t)try{yn(i,n,r??{},e)}catch{}c=e}return{matchedRoutes:t,fullPath:i.fullPath,search:a,params:c}}},dn=class extends Error{},fn=class extends Error{};function pn(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function mn(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new dn(`Async validation not supported`);if(n.issues)throw new dn(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function hn({pathname:e,routesById:t,processedTree:n}){let r={},i=b(e),a,o,s=ce(i,n,!0);return s&&(a=s.route,Object.assign(r,s.rawParams),o=Object.assign({},s.parsedParams)),{matchedRoutes:s?.branch||[t.__root__],routeParams:r,foundRoute:a,parsedParams:o}}function gn({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return _n(n)(e,t,r??!1)}function _n(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...mn(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:i(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function vn(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return fe}function yn(e,t,n,r){let i=e.options.params?.parse??e.options.parseParams;if(i){if(e.options.skipRouteOnParseError)for(let e in t)e in n&&(r[e]=n[e]);else{let e=i(r);Object.assign(r,e)}}}var bn=class{constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=fe:this.parentRoute||a(!1,`Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);let r=n?fe:t?.path;r&&r!==`/`&&(r=x(r));let i=t?.id||r,o=n?fe:y([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),o!==`__root__`&&(o=y([`/`,o]));let s=o===`__root__`?`/`:y([this.parentRoute.fullPath,r]);this._path=r,this._id=o,this._fullPath=s,this._to=b(s)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>de({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}},xn=class{constructor({id:e}){this.notFound=e=>T({routeId:this.id,...e}),this.redirect=e=>de({from:this.id,...e}),this.id=e}},Sn=class extends bn{constructor(e){super(e)}},D=t(),O=e(r(),1);function Cn(e){let t=e.errorComponent??Tn;return(0,D.jsx)(wn,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?O.createElement(t,{error:n,reset:r}):e.children})}var wn=class extends O.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey===this.props.getResetKey()?this.state.error:null,reset:()=>{this.reset()}})}};function Tn({error:e}){let[t,n]=O.useState(!1);return(0,D.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,D.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,D.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,D.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,D.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,D.jsx)(`div`,{children:(0,D.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,D.jsx)(`code`,{children:e.message}):null})}):null]})}function En(e){let t=O.useContext(e.from?ye:ve);return oe({select:n=>{let r=n.matches.find(n=>e.from?e.from===n.routeId:n.id===t);if(a(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:`a nearest match!`}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function Dn(e){return En({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function On(e){let{select:t,...n}=e;return En({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function kn(e){return En({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function An(e){return En({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function jn(e){let t=C();return O.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Mn(e){return new Nn({id:e})}var Nn=class extends xn{constructor({id:e}){super({id:e}),this.useMatch=e=>En({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>En({from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>An({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>kn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>On({...e,from:this.id,strict:!1}),this.useLoaderData=e=>Dn({...e,from:this.id,strict:!1}),this.useNavigate=()=>jn({from:C().routesById[this.id].fullPath}),this.notFound=e=>T({routeId:this.id,...e}),this.Link=O.forwardRef((e,t)=>{let n=C().routesById[this.id].fullPath;return(0,D.jsx)(_e,{ref:t,from:n,...e})})}},Pn=class extends bn{constructor(e){super(e),this.useMatch=e=>En({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>En({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>An({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>kn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>On({...e,from:this.id}),this.useLoaderData=e=>Dn({...e,from:this.id}),this.useNavigate=()=>jn({from:this.fullPath}),this.Link=O.forwardRef((e,t)=>(0,D.jsx)(_e,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function Fn(e){return new Pn(e)}var In=class extends Sn{constructor(e){super(e),this.useMatch=e=>En({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>En({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>An({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>kn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>On({...e,from:this.id}),this.useLoaderData=e=>Dn({...e,from:this.id}),this.useNavigate=()=>jn({from:this.fullPath}),this.Link=O.forwardRef((e,t)=>(0,D.jsx)(_e,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function Ln(e){return new In(e)}function Rn(e){return typeof e==`object`?new zn(e,{silent:!0}).createRoute(e):new zn(e,{silent:!0}).createRoute}var zn=class{constructor(e,t){this.path=e,this.createRoute=e=>{S(this.silent,`FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.`);let t=Fn(e);return t.isRoot=!1,t},this.silent=t?.silent}},Bn=class{constructor(e){this.useMatch=e=>En({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>En({from:this.options.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>An({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>kn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>On({...e,from:this.options.id}),this.useLoaderData=e=>Dn({...e,from:this.options.id}),this.useNavigate=()=>jn({from:C().routesById[this.options.id].fullPath}),this.options=e,this.$$typeof=Symbol.for(`react.memo`)}};function Vn(e){return typeof e==`object`?new Bn(e):t=>new Bn({id:e,...t})}function k(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,l(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r){if(ge)ge(o());else throw o()}return O.createElement(r,e)};return s.preload=o,s}function Hn(){let e=C(),t=O.useRef({router:e,mounted:!1}),[n,r]=O.useState(!1),{hasPendingMatches:i,isLoading:a}=oe({select:e=>({isLoading:e.isLoading,hasPendingMatches:e.matches.some(e=>e.status===`pending`)}),structuralSharing:!0}),o=me(a),s=a||n||i,c=me(s),l=a||i,u=me(l);return e.startTransition=e=>{r(!0),O.startTransition(()=>{e(),r(!1)})},O.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return b(e.latestLocation.publicHref)!==b(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),he(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),he(()=>{o&&!a&&e.emit({type:`onLoad`,...ln(e.state)})},[o,e,a]),he(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...ln(e.state)})},[l,u,e]),he(()=>{if(c&&!s){let t=ln(e.state);e.emit({type:`onResolved`,...t}),e.__store.setState(e=>({...e,status:`idle`,resolvedLocation:e.location})),t.hrefChanged&&jt(e)}},[s,c,e]),null}function Un(e){let t=oe({select:e=>`not-found-${e.location.pathname}-${e.status}`});return(0,D.jsx)(Cn,{getResetKey:()=>t,onCatch:(t,n)=>{if(ue(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(ue(t))return e.fallback?.(t);throw t},children:e.children})}function Wn(){return(0,D.jsx)(`p`,{children:`Not Found`})}function Gn(e){return(0,D.jsx)(D.Fragment,{children:e.children})}function Kn(e,t,n){return t.options.notFoundComponent?(0,D.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,D.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,D.jsx)(Wn,{})}function qn({children:e}){return C(),null}function Jn(){let e=C();if(!e.isScrollRestoring||1)return null;let t=(e.options.getScrollRestorationKey||Et)(e.latestLocation),n=t===Et(e.latestLocation)?void 0:t,r={storageKey:St,shouldScrollRestoration:!0};return n&&(r.key=n),(0,D.jsx)(qn,{children:`(${kt.toString()})(${te(JSON.stringify(r))})`})}var Yn=O.memo(function({matchId:e}){let t=C(),n=oe({select:t=>{let n=t.matches.findIndex(t=>t.id===e),r=t.matches[n];return a(r,`Could not find match for matchId "${e}". Please file an issue!`),{routeId:r.routeId,ssr:r.ssr,_displayPending:r._displayPending,resetKey:t.loadedAt,parentRouteId:t.matches[n-1]?.routeId}},structuralSharing:!0}),r=t.routesById[n.routeId],i=r.options.pendingComponent??t.options.defaultPendingComponent,o=i?(0,D.jsx)(i,{}):null,s=r.options.errorComponent??t.options.defaultErrorComponent,c=r.options.onCatch??t.options.defaultOnCatch,l=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,u=n.ssr===!1||n.ssr===`data-only`,d=(!r.isRoot||r.options.wrapInSuspense||u)&&(r.options.wrapInSuspense??i??(r.options.errorComponent?.preload||u))?O.Suspense:Gn,f=s?Cn:Gn,p=l?Un:Gn,m=r.isRoot?r.options.shellComponent??Gn:Gn;return(0,D.jsxs)(m,{children:[(0,D.jsx)(ve.Provider,{value:e,children:(0,D.jsx)(d,{fallback:o,children:(0,D.jsx)(f,{getResetKey:()=>n.resetKey,errorComponent:s||Tn,onCatch:(t,n)=>{if(ue(t))throw t;S(!1,`Error in route match: ${e}`),c?.(t,n)},children:(0,D.jsx)(p,{fallback:e=>{if(!l||e.routeId&&e.routeId!==n.routeId||!e.routeId&&!r.isRoot)throw e;return O.createElement(l,e)},children:u||n._displayPending?(0,D.jsx)(g,{fallback:o,children:(0,D.jsx)(Zn,{matchId:e})}):(0,D.jsx)(Zn,{matchId:e})})})})}),n.parentRouteId===`__root__`&&t.options.scrollRestoration?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Xn,{}),(0,D.jsx)(Jn,{})]}):null]})});function Xn(){let e=C(),t=O.useRef(void 0);return(0,D.jsx)(`script`,{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:`onRendered`,...ln(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var Zn=O.memo(function({matchId:e}){let t=C(),{match:n,key:r,routeId:i}=oe({select:n=>{let r=n.matches.find(t=>t.id===e),i=r.routeId,a=(t.routesById[i].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:i,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return{key:a?JSON.stringify(a):void 0,routeId:i,match:{id:r.id,status:r.status,error:r.error,invalid:r.invalid,_forcePending:r._forcePending,_displayPending:r._displayPending}}},structuralSharing:!0}),o=t.routesById[i],s=O.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,D.jsx)(e,{},r):(0,D.jsx)(Qn,{})},[r,o.options.component,t.options.defaultComponent]);if(n._displayPending)throw t.getMatch(n.id)?._nonReactive.displayPendingPromise;if(n._forcePending)throw t.getMatch(n.id)?._nonReactive.minPendingPromise;if(n.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let r=t.getMatch(n.id);if(r&&!r._nonReactive.minPendingPromise){let t=m();r._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),r._nonReactive.minPendingPromise=void 0},e)}}throw t.getMatch(n.id)?._nonReactive.loadPromise}if(n.status===`notFound`)return a(ue(n.error),`Expected a notFound error`),Kn(t,o,n.error);if(n.status===`redirected`)throw a(pe(n.error),`Expected a redirect error`),t.getMatch(n.id)?._nonReactive.loadPromise;if(n.status===`error`)throw n.error;return s}),Qn=O.memo(function(){let e=C(),t=O.useContext(ve),n=oe({select:e=>e.matches.find(e=>e.id===t)?.routeId}),r=e.routesById[n],i=oe({select:e=>{let n=e.matches.find(e=>e.id===t);return a(n,`Could not find parent match for matchId "${t}"`),n.globalNotFound}}),o=oe({select:e=>{let n=e.matches;return n[n.findIndex(e=>e.id===t)+1]?.id}}),s=e.options.defaultPendingComponent?(0,D.jsx)(e.options.defaultPendingComponent,{}):null;if(i)return Kn(e,r,void 0);if(!o)return null;let c=(0,D.jsx)(Yn,{matchId:o});return n===`__root__`?(0,D.jsx)(O.Suspense,{fallback:s,children:c}):c});function $n(){let e=C(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,D.jsx)(t,{}):null,r=typeof document<`u`&&e.ssr?Gn:O.Suspense,i=(0,D.jsxs)(r,{fallback:n,children:[(0,D.jsx)(Hn,{}),(0,D.jsx)(er,{})]});return e.options.InnerWrap?(0,D.jsx)(e.options.InnerWrap,{children:i}):i}function er(){let e=C(),t=oe({select:e=>e.matches[0]?.id}),n=oe({select:e=>e.loadedAt}),r=t?(0,D.jsx)(Yn,{matchId:t}):null;return(0,D.jsx)(ve.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,D.jsx)(Cn,{getResetKey:()=>n,errorComponent:Tn,onCatch:e=>{S(!1,`The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`),S(!1,e.message||e.toString())},children:r})})}function tr(){let e=C();return oe({select:e=>[e.location.href,e.resolvedLocation?.href,e.status],structuralSharing:!0}),O.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e])}var nr=e=>new rr(e),rr=class extends un{constructor(e){super(e)}};typeof globalThis<`u`?(globalThis.createFileRoute=Rn,globalThis.createLazyFileRoute=Vn):typeof window<`u`&&(window.createFileRoute=Rn,window.createLazyFileRoute=Vn);function ir({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=ie(),i=(0,D.jsx)(r.Provider,{value:e,children:t});return e.options.Wrap?(0,D.jsx)(e.options.Wrap,{children:i}):i}function ar({router:e,...t}){return(0,D.jsx)(ir,{router:e,...t,children:(0,D.jsx)($n,{})})}var or=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}}var S=!1,ee=-1,te=5,ne=-1;function C(){return g?!0:!(e.unstable_now()-ne<te)}function re(){if(g=!1,S){var t=e.unstable_now();ne=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(ee),ee=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&C());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():S=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){ee=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):te=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ee),ee=-1):h=!0,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ie()))),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),sr=n(((e,t)=>{t.exports=or()})),cr=n((e=>{var t=sr(),n=r(),i=Ce();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),ne=Symbol.for(`react.memo`),C=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.memo_cache_sentinel`),ae=Symbol.iterator;function oe(e){return typeof e!=`object`||!e?null:(e=ae&&e[ae]||e[`@@iterator`],typeof e==`function`?e:null)}var se=Symbol.for(`react.client.reference`);function ce(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case ee:return`Suspense`;case te:return`SuspenseList`;case re:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ne:return t=e.displayName||null,t===null?ce(e.type)||`Memo`:t;case C:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var le=Array.isArray,w=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},de=[],fe=-1;function pe(e){return{current:e}}function me(e){0>fe||(e.current=de[fe],de[fe]=null,fe--)}function he(e,t){fe++,de[fe]=e.current,e.current=t}var ge=pe(null),_e=pe(null),ve=pe(null),ye=pe(null);function be(e,t){switch(he(ve,t),he(_e,e),he(ge,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}me(ge),he(ge,e)}function xe(){me(ge),me(_e),me(ve)}function Se(e){e.memoizedState!==null&&he(ye,e);var t=ge.current,n=Gd(t,e.type);t!==n&&(he(_e,e),he(ge,n))}function we(e){_e.current===e&&(me(ge),me(_e)),ye.current===e&&(me(ye),tp._currentValue=ue)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+Te+e+Ee}var E=!1;function Oe(e,t){if(!e||E)return``;E=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{E=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return Oe(e.type,!1);case 11:return Oe(e.type.render,!1);case 1:return Oe(e.type,!0);case 31:return De(`Activity`);default:return``}}function Ae(e){try{var t=``,n=null;do t+=ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var je=Object.prototype.hasOwnProperty,Me=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,Pe=t.unstable_shouldYield,Fe=t.unstable_requestPaint,Ie=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,He=t.unstable_IdlePriority,Ue=t.log,We=t.unstable_setDisableYieldValue,Ge=null,Ke=null;function qe(e){if(typeof Ue==`function`&&We(e),Ke&&typeof Ke.setStrictMode==`function`)try{Ke.setStrictMode(Ge,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function at(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function ot(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ct(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&lt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function lt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ut(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function dt(e,t){var n=t&-t;return n=n&42?1:ft(n),(n&(e.suspendedLanes|t))===0?n:0}function ft(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function pt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function mt(){var e=T.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function ht(e,t){var n=T.p;try{return T.p=e,t()}finally{T.p=n}}var gt=Math.random().toString(36).slice(2),_t=`__reactFiber$`+gt,vt=`__reactProps$`+gt,yt=`__reactContainer$`+gt,bt=`__reactEvents$`+gt,xt=`__reactListeners$`+gt,St=`__reactHandles$`+gt,Ct=`__reactResources$`+gt,wt=`__reactMarker$`+gt;function Tt(e){delete e[_t],delete e[vt],delete e[bt],delete e[xt],delete e[St]}function Et(e){var t=e[_t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[_t])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function Dt(e){if(e=e[_t]||e[yt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function kt(e){var t=e[Ct];return t||=e[Ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function At(e){e[wt]=!0}var jt=new Set,Mt={};function Nt(e,t){Pt(e,t),Pt(e+`Capture`,t)}function Pt(e,t){for(Mt[e]=t,e=0;e<t.length;e++)jt.add(t[e])}var Ft=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),It={},Lt={};function Rt(e){return je.call(Lt,e)?!0:je.call(It,e)?!1:Ft.test(e)?Lt[e]=!0:(It[e]=!0,!1)}function zt(e,t,n){if(Rt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Bt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Vt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ht(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ut(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Wt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gt(e){if(!e._valueTracker){var t=Ut(e)?`checked`:`value`;e._valueTracker=Wt(e,t,``+e[t])}}function Kt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ut(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function qt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Jt=/[\n"\\]/g;function Yt(e){return e.replace(Jt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Xt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ht(t)):e.value!==``+Ht(t)&&(e.value=``+Ht(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Qt(e,o,Ht(n)):Qt(e,o,Ht(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ht(s):e.removeAttribute(`name`)}function Zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Gt(e);return}n=n==null?``:``+Ht(n),t=t==null?n:``+Ht(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Gt(e)}function Qt(e,t,n){t===`number`&&qt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function $t(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ht(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function en(e,t,n){t!=null&&(t=``+Ht(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Ht(n)}function tn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(le(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Ht(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Gt(e)}function nn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function an(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||rn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function on(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&an(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&an(e,o,t[o])}function sn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var cn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),ln=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function un(e){return ln.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function dn(){}var fn=null;function pn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mn=null,hn=null;function gn(e){var t=Dt(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Xt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Yt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[vt]||null;if(!i)throw Error(a(90));Xt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Kt(r)}break a;case`textarea`:en(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&$t(e,!!n.multiple,t,!1)}}}var _n=!1;function vn(e,t,n){if(_n)return e(t,n);_n=!0;try{return e(t)}finally{if(_n=!1,(mn!==null||hn!==null)&&(Cu(),mn&&(t=mn,e=hn,hn=mn=null,gn(t),e)))for(t=0;t<e.length;t++)gn(e[t])}}function yn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[vt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var bn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,xn=!1;if(bn)try{var Sn={};Object.defineProperty(Sn,"passive",{get:function(){xn=!0}}),window.addEventListener(`test`,Sn,Sn),window.removeEventListener(`test`,Sn,Sn)}catch{xn=!1}var D=null,O=null,Cn=null;function wn(){if(Cn)return Cn;var e,t=O,n=t.length,r,i=`value`in D?D.value:D.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Cn=i.slice(e,1<r?1-r:void 0)}function Tn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function En(){return!0}function Dn(){return!1}function On(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?En:Dn,this.isPropagationStopped=Dn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=En)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=En)},persist:function(){},isPersistent:En}),t}var kn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},An=On(kn),jn=p({},kn,{view:0,detail:0}),Mn=On(jn),Nn,Pn,Fn,In=p({},jn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Fn&&(Fn&&e.type===`mousemove`?(Nn=e.screenX-Fn.screenX,Pn=e.screenY-Fn.screenY):Pn=Nn=0,Fn=e),Nn)},movementY:function(e){return`movementY`in e?e.movementY:Pn}}),Ln=On(In),Rn=On(p({},In,{dataTransfer:0})),zn=On(p({},jn,{relatedTarget:0})),Bn=On(p({},kn,{animationName:0,elapsedTime:0,pseudoElement:0})),Vn=On(p({},kn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),k=On(p({},kn,{data:0})),Hn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Un={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Wn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wn[e])?!!t[e]:!1}function Kn(){return Gn}var qn=On(p({},jn,{key:function(e){if(e.key){var t=Hn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Tn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Un[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kn,charCode:function(e){return e.type===`keypress`?Tn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Tn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Jn=On(p({},In,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Yn=On(p({},jn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kn})),Xn=On(p({},kn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Zn=On(p({},In,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Qn=On(p({},kn,{newState:0,oldState:0})),$n=[9,13,27,32],er=bn&&`CompositionEvent`in window,tr=null;bn&&`documentMode`in document&&(tr=document.documentMode);var nr=bn&&`TextEvent`in window&&!tr,rr=bn&&(!er||tr&&8<tr&&11>=tr),ir=` `,ar=!1;function or(e,t){switch(e){case`keyup`:return $n.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var lr=!1;function ur(e,t){switch(e){case`compositionend`:return cr(t);case`keypress`:return t.which===32?(ar=!0,ir):null;case`textInput`:return e=t.data,e===ir&&ar?null:e;default:return null}}function dr(e,t){if(lr)return e===`compositionend`||!er&&or(e,t)?(e=wn(),Cn=O=D=null,lr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return rr&&t.locale!==`ko`?null:t.data;default:return null}}var fr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!fr[e.type]:t===`textarea`}function mr(e,t,n,r){mn?hn?hn.push(r):hn=[r]:mn=r,t=Od(t,`onChange`),0<t.length&&(n=new An(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var hr=null,gr=null;function _r(e){xd(e,0)}function vr(e){if(Kt(Ot(e)))return e}function yr(e,t){if(e===`change`)return t}var br=!1;if(bn){var xr;if(bn){var Sr=`oninput`in document;if(!Sr){var Cr=document.createElement(`div`);Cr.setAttribute(`oninput`,`return;`),Sr=typeof Cr.oninput==`function`}xr=Sr}else xr=!1;br=xr&&(!document.documentMode||9<document.documentMode)}function wr(){hr&&(hr.detachEvent(`onpropertychange`,Tr),gr=hr=null)}function Tr(e){if(e.propertyName===`value`&&vr(gr)){var t=[];mr(t,gr,e,pn(e)),vn(_r,t)}}function Er(e,t,n){e===`focusin`?(wr(),hr=t,gr=n,hr.attachEvent(`onpropertychange`,Tr)):e===`focusout`&&wr()}function Dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return vr(gr)}function Or(e,t){if(e===`click`)return vr(t)}function kr(e,t){if(e===`input`||e===`change`)return vr(t)}function Ar(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var jr=typeof Object.is==`function`?Object.is:Ar;function Mr(e,t){if(jr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!je.call(t,i)||!jr(e[i],t[i]))return!1}return!0}function Nr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pr(e,t){var n=Nr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Nr(n)}}function Fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ir(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=qt(e.document)}return t}function Lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Rr=bn&&`documentMode`in document&&11>=document.documentMode,zr=null,Br=null,Vr=null,Hr=!1;function Ur(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||zr==null||zr!==qt(r)||(r=zr,`selectionStart`in r&&Lr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&Mr(Vr,r)||(Vr=r,r=Od(Br,`onSelect`),0<r.length&&(t=new An(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=zr)))}function Wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Gr={animationend:Wr(`Animation`,`AnimationEnd`),animationiteration:Wr(`Animation`,`AnimationIteration`),animationstart:Wr(`Animation`,`AnimationStart`),transitionrun:Wr(`Transition`,`TransitionRun`),transitionstart:Wr(`Transition`,`TransitionStart`),transitioncancel:Wr(`Transition`,`TransitionCancel`),transitionend:Wr(`Transition`,`TransitionEnd`)},Kr={},qr={};bn&&(qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),`TransitionEvent`in window||delete Gr.transitionend.transition);function Jr(e){if(Kr[e])return Kr[e];if(!Gr[e])return e;var t=Gr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qr)return Kr[e]=t[n];return e}var Yr=Jr(`animationend`),Xr=Jr(`animationiteration`),Zr=Jr(`animationstart`),Qr=Jr(`transitionrun`),$r=Jr(`transitionstart`),ei=Jr(`transitioncancel`),ti=Jr(`transitionend`),ni=new Map,ri=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ri.push(`scrollEnd`);function ii(e,t){ni.set(e,t),Nt(t,[e])}var ai=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},oi=[],si=0,ci=0;function li(){for(var e=si,t=ci=si=0;t<e;){var n=oi[t];oi[t++]=null;var r=oi[t];oi[t++]=null;var i=oi[t];oi[t++]=null;var a=oi[t];if(oi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&pi(n,i,a)}}function ui(e,t,n,r){oi[si++]=e,oi[si++]=t,oi[si++]=n,oi[si++]=r,ci|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function di(e,t,n,r){return ui(e,t,n,r),mi(e)}function fi(e,t){return ui(e,null,null,t),mi(e)}function pi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function mi(e){if(50<mu)throw mu=0,hu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hi={};function gi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _i(e,t,n,r){return new gi(e,t,n,r)}function vi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yi(e,t){var n=e.alternate;return n===null?(n=_i(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function bi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function xi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)vi(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,ge.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case re:return e=_i(31,n,t,i),e.elementType=re,e.lanes=o,e;case _:return Si(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=_i(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case ee:return e=_i(13,n,t,i),e.elementType=ee,e.lanes=o,e;case te:return e=_i(19,n,t,i),e.elementType=te,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case ne:s=14;break a;case C:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=_i(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Si(e,t,n,r){return e=_i(7,e,r,t),e.lanes=n,e}function Ci(e,t,n){return e=_i(6,e,null,t),e.lanes=n,e}function wi(e){var t=_i(18,null,null,0);return t.stateNode=e,t}function Ti(e,t,n){return t=_i(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ei=new WeakMap;function Di(e,t){if(typeof e==`object`&&e){var n=Ei.get(e);return n===void 0?(t={value:e,source:t,stack:Ae(t)},Ei.set(e,t),t):n}return{value:e,source:t,stack:Ae(t)}}var Oi=[],ki=0,Ai=null,ji=0,Mi=[],Ni=0,Pi=null,Fi=1,Ii=``;function Li(e,t){Oi[ki++]=ji,Oi[ki++]=Ai,Ai=e,ji=t}function Ri(e,t,n){Mi[Ni++]=Fi,Mi[Ni++]=Ii,Mi[Ni++]=Pi,Pi=e;var r=Fi;e=Ii;var i=32-Je(r)-1;r&=~(1<<i),n+=1;var a=32-Je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Fi=1<<32-Je(t)+i|n<<i|r,Ii=a+e}else Fi=1<<a|n<<i|r,Ii=e}function zi(e){e.return!==null&&(Li(e,1),Ri(e,1,0))}function Bi(e){for(;e===Ai;)Ai=Oi[--ki],Oi[ki]=null,ji=Oi[--ki],Oi[ki]=null;for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Ii=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null}function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Ii,Mi[Ni++]=Pi,Fi=t.id,Ii=t.overflow,Pi=e}var Hi=null,Ui=null,A=!1,Wi=null,Gi=!1,Ki=Error(a(519));function qi(e){throw $i(Di(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ki}function Ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[_t]=e,t[vt]=r,n){case`dialog`:X(`cancel`,t),X(`close`,t);break;case`iframe`:case`object`:case`embed`:X(`load`,t);break;case`video`:case`audio`:for(n=0;n<yd.length;n++)X(yd[n],t);break;case`source`:X(`error`,t);break;case`img`:case`image`:case`link`:X(`error`,t),X(`load`,t);break;case`details`:X(`toggle`,t);break;case`input`:X(`invalid`,t),Zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:X(`invalid`,t);break;case`textarea`:X(`invalid`,t),tn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Pd(t.textContent,n)?(r.popover!=null&&(X(`beforetoggle`,t),X(`toggle`,t)),r.onScroll!=null&&X(`scroll`,t),r.onScrollEnd!=null&&X(`scrollend`,t),r.onClick!=null&&(t.onclick=dn),t=!0):t=!1,t||qi(e,!0)}function Yi(e){for(Hi=e.return;Hi;)switch(Hi.tag){case 5:case 31:case 13:Gi=!1;return;case 27:case 3:Gi=!0;return;default:Hi=Hi.return}}function Xi(e){if(e!==Hi)return!1;if(!A)return Yi(e),A=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Kd(e.type,e.memoizedProps)),n=!n),n&&Ui&&qi(e),Yi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ui=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ui=pf(e)}else t===27?(t=Ui,ef(e.type)?(e=ff,ff=null,Ui=e):Ui=t):Ui=Hi?df(e.stateNode.nextSibling):null;return!0}function Zi(){Ui=Hi=null,A=!1}function Qi(){var e=Wi;return e!==null&&(tu===null?tu=e:tu.push.apply(tu,e),Wi=null),e}function $i(e){Wi===null?Wi=[e]:Wi.push(e)}var ea=pe(null),j=null,ta=null;function na(e,t,n){he(ea,t._currentValue),t._currentValue=n}function ra(e){e._currentValue=ea.current,me(ea)}function ia(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function aa(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ia(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ia(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function oa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;jr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===ye.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}i=i.return}e!==null&&aa(t,e,n,r),t.flags|=262144}function sa(e){for(e=e.firstContext;e!==null;){if(!jr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ca(e){j=e,ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function la(e){return da(j,e)}function ua(e,t){return j===null&&ca(e),da(e,t)}function da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ta===null){if(e===null)throw Error(a(308));ta=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ta=ta.next=t;return n}var fa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},pa=t.unstable_scheduleCallback,ma=t.unstable_NormalPriority,ha={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ga(){return{controller:new fa,data:new Map,refCount:0}}function _a(e){e.refCount--,e.refCount===0&&pa(ma,function(){e.controller.abort()})}var va=null,ya=0,ba=0,xa=null;function Sa(e,t){if(va===null){var n=va=[];ya=0,ba=pd(),xa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ya++,t.then(Ca,Ca),t}function Ca(){if(--ya===0&&va!==null){xa!==null&&(xa.status=`fulfilled`);var e=va;va=null,ba=0,xa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function wa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ta=w.S;w.S=function(e,t){iu=Ie(),typeof t==`object`&&t&&typeof t.then==`function`&&Sa(e,t),Ta!==null&&Ta(e,t)};var Ea=pe(null);function Da(){var e=Ea.current;return e===null?U.pooledCache:e}function M(e,t){t===null?he(Ea,Ea.current):he(Ea,t.pool)}function Oa(){var e=Da();return e===null?null:{parent:ha._currentValue,pool:e}}var ka=Error(a(460)),Aa=Error(a(474)),ja=Error(a(542)),Ma={then:function(){}};function Na(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Pa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(dn,dn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ra(e),e;default:if(typeof t.status==`string`)t.then(dn,dn);else{if(e=U,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ra(e),e}throw Ia=t,ka}}function Fa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ia=e,ka):e}}var Ia=null;function La(){if(Ia===null)throw Error(a(459));var e=Ia;return Ia=null,e}function Ra(e){if(e===ka||e===ja)throw Error(a(483))}var za=null,Ba=0;function Va(e){var t=Ba;return Ba+=1,za===null&&(za=[]),Pa(za,e,t)}function Ha(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ua(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Wa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=yi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Ci(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===C&&Fa(a)===t.type)?(t=i(t,n.props),Ha(t,n),t.return=e,t):(t=xi(n.type,n.key,n.props,null,e.mode,r),Ha(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ti(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Si(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Ci(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=xi(t.type,t.key,t.props,null,e.mode,n),Ha(n,t),n.return=e,n;case g:return t=Ti(t,e.mode,n),t.return=e,t;case C:return t=Fa(t),f(e,t,n)}if(le(t)||oe(t))return t=Si(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Va(t),n);if(t.$$typeof===x)return f(e,ua(e,t),n);Ua(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case C:return n=Fa(n),p(e,t,n,r)}if(le(n)||oe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Va(n),r);if(n.$$typeof===x)return p(e,t,ua(e,n),r);Ua(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case C:return r=Fa(r),m(e,t,n,r,i)}if(le(r)||oe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Va(r),i);if(r.$$typeof===x)return m(e,t,n,ua(t,r),i);Ua(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),A&&Li(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return A&&Li(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),A&&Li(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),A&&Li(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return A&&Li(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),A&&Li(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===C&&Fa(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ha(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===_?(c=Si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=xi(o.type,o.key,o.props,null,e.mode,c),Ha(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ti(o,e.mode,c),c.return=e,e=c}return s(e);case C:return o=Fa(o),b(e,r,o,c)}if(le(o))return v(e,r,o,c);if(oe(o)){if(l=oe(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Va(o),c);if(o.$$typeof===x)return b(e,r,ua(e,o),c);Ua(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ba=0;var i=b(e,t,n,r);return za=null,i}catch(t){if(t===ka||t===ja)throw t;var a=_i(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ga=Wa(!0),Ka=Wa(!1),qa=!1;function Ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ya(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=mi(e),pi(e,null,n),t}return ui(e,r,t,n),mi(e)}function Qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}function $a(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var eo=!1;function to(){if(eo){var e=xa;if(e!==null)throw e}}function no(e,t,n,r){eo=!1;var i=e.updateQueue;qa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(G&f)===f:(r&f)===f){f!==0&&f===ba&&(eo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:qa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Yl|=o,e.lanes=o,e.memoizedState=d}}function ro(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function io(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ro(n[e],t)}var ao=pe(null),oo=pe(0);function so(e,t){e=ql,he(oo,e),he(ao,t),ql=e|t.baseLanes}function co(){he(oo,ql),he(ao,ao.current)}function lo(){ql=oo.current,me(ao),me(oo)}var uo=pe(null),fo=null;function po(e){var t=e.alternate;he(vo,vo.current&1),he(uo,e),fo===null&&(t===null||ao.current!==null||t.memoizedState!==null)&&(fo=e)}function mo(e){he(vo,vo.current),he(uo,e),fo===null&&(fo=e)}function ho(e){e.tag===22?(he(vo,vo.current),he(uo,e),fo===null&&(fo=e)):go(e)}function go(){he(vo,vo.current),he(uo,uo.current)}function _o(e){me(uo),fo===e&&(fo=null),me(vo)}var vo=pe(0);function yo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var bo=0,N=null,xo=null,So=null,Co=!1,wo=!1,To=!1,Eo=0,Do=0,Oo=null,ko=0;function Ao(){throw Error(a(321))}function jo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jr(e[n],t[n]))return!1;return!0}function Mo(e,t,n,r,i,a){return bo=a,N=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?qs:Js,To=!1,a=n(r,i),To=!1,wo&&(a=Po(t,n,r,i)),No(e),a}function No(e){w.H=Ks;var t=xo!==null&&xo.next!==null;if(bo=0,So=xo=N=null,Co=!1,Do=0,Oo=null,t)throw Error(a(300));e===null||uc||(e=e.dependencies,e!==null&&sa(e)&&(uc=!0))}function Po(e,t,n,r){N=e;var i=0;do{if(wo&&(Oo=null),Do=0,wo=!1,25<=i)throw Error(a(301));if(i+=1,So=xo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}w.H=Ys,o=t(n,r)}while(wo);return o}function Fo(){var e=w.H,t=e.useState()[0];return t=typeof t.then==`function`?Ho(t):t,e=e.useState()[0],(xo===null?null:xo.memoizedState)!==e&&(N.flags|=1024),t}function Io(){var e=Eo!==0;return Eo=0,e}function Lo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ro(e){if(Co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Co=!1}bo=0,So=xo=N=null,wo=!1,Do=Eo=0,Oo=null}function zo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return So===null?N.memoizedState=So=e:So=So.next=e,So}function Bo(){if(xo===null){var e=N.alternate;e=e===null?null:e.memoizedState}else e=xo.next;var t=So===null?N.memoizedState:So.next;if(t!==null)So=t,xo=e;else{if(e===null)throw N.alternate===null?Error(a(467)):Error(a(310));xo=e,e={memoizedState:xo.memoizedState,baseState:xo.baseState,baseQueue:xo.baseQueue,queue:xo.queue,next:null},So===null?N.memoizedState=So=e:So=So.next=e}return So}function Vo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ho(e){var t=Do;return Do+=1,Oo===null&&(Oo=[]),e=Pa(Oo,e,t),t=N,(So===null?t.memoizedState:So.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?qs:Js),e}function Uo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ho(e);if(e.$$typeof===x)return la(e)}throw Error(a(438,String(e)))}function Wo(e){var t=null,n=N.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=N.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Vo(),N.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ie;return t.index++,n}function Go(e,t){return typeof t==`function`?t(e):t}function P(e){return Ko(Bo(),xo,e)}function Ko(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(bo&f)===f:(G&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ba&&(d=!0);else if((bo&p)===p){u=u.next,p===ba&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,N.lanes|=p,Yl|=p;f=u.action,To&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,N.lanes|=f,Yl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!jr(o,e.memoizedState)&&(uc=!0,d&&(n=xa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function qo(e){var t=Bo(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);jr(o,t.memoizedState)||(uc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Jo(e,t,n){var r=N,i=Bo(),o=A;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!jr((xo||i).memoizedState,n);if(s&&(i.memoizedState=n,uc=!0),i=i.queue,vs(Zo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||So!==null&&So.memoizedState.tag&1){if(r.flags|=2048,ms(9,{destroy:void 0},Xo.bind(null,r,i,n,t),null),U===null)throw Error(a(349));o||bo&127||Yo(r,t,n)}return n}function Yo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=N.updateQueue,t===null?(t=Vo(),N.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xo(e,t,n,r){t.value=n,t.getSnapshot=r,Qo(t)&&$o(e)}function Zo(e,t,n){return n(function(){Qo(t)&&$o(e)})}function Qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jr(e,n)}catch{return!0}}function $o(e){var t=fi(e,2);t!==null&&vu(t,e,2)}function es(e){var t=zo();if(typeof e==`function`){var n=e;if(e=n(),To){qe(!0);try{n()}finally{qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:e},t}function ts(e,t,n,r){return e.baseState=n,Ko(e,xo,typeof r==`function`?r:Go)}function ns(e,t,n,r,i){if(Us(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};w.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,rs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function rs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=w.T,o={};w.T=o;try{var s=n(i,r),c=w.S;c!==null&&c(o,s),is(e,t,s)}catch(n){os(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),w.T=a}}else try{a=n(i,r),is(e,t,a)}catch(n){os(e,t,n)}}function is(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){as(e,t,n)},function(n){return os(e,t,n)}):as(e,t,n)}function as(e,t,n){t.status=`fulfilled`,t.value=n,ss(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,rs(e,n)))}function os(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ss(t),t=t.next;while(t!==r)}e.action=null}function ss(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function cs(e,t){return t}function ls(e,t){if(A){var n=U.formState;if(n!==null){a:{var r=N;if(A){if(Ui){b:{for(var i=Ui,a=Gi;i.nodeType!==8;)if(!a||(i=df(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ui=df(i.nextSibling),r=i.data===`F!`;break a}}qi(r)}r=!1}r&&(t=n[0])}}return n=zo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:t},n.queue=r,n=Bs.bind(null,N,r),r.dispatch=n,r=es(!1),a=Hs.bind(null,N,!1,r.queue),r=zo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ns.bind(null,N,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function us(e){return ds(Bo(),xo,e)}function ds(e,t,n){if(t=Ko(e,t,cs)[0],e=P(Go)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ho(t)}catch(e){throw e===ka?ja:e}else r=t;t=Bo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(N.flags|=2048,ms(9,{destroy:void 0},fs.bind(null,i,n),null)),[r,a,e]}function fs(e,t){e.action=t}function ps(e){var t=Bo(),n=xo;if(n!==null)return ds(t,n,e);Bo(),t=t.memoizedState,n=Bo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ms(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=N.updateQueue,t===null&&(t=Vo(),N.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function hs(){return Bo().memoizedState}function F(e,t,n,r){var i=zo();N.flags|=e,i.memoizedState=ms(1|t,{destroy:void 0},n,r===void 0?null:r)}function gs(e,t,n,r){var i=Bo();r=r===void 0?null:r;var a=i.memoizedState.inst;xo!==null&&r!==null&&jo(r,xo.memoizedState.deps)?i.memoizedState=ms(t,a,n,r):(N.flags|=e,i.memoizedState=ms(1|t,a,n,r))}function _s(e,t){F(8390656,8,e,t)}function vs(e,t){gs(2048,8,e,t)}function ys(e){N.flags|=4;var t=N.updateQueue;if(t===null)t=Vo(),N.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function bs(e){var t=Bo().memoizedState;return ys({ref:t,nextImpl:e}),function(){if(H&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function xs(e,t){return gs(4,2,e,t)}function Ss(e,t){return gs(4,4,e,t)}function Cs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ws(e,t,n){n=n==null?null:n.concat([e]),gs(4,4,Cs.bind(null,t,e),n)}function Ts(){}function Es(e,t){var n=Bo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&jo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ds(e,t){var n=Bo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&jo(t,r[1]))return r[0];if(r=e(),To){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r}function Os(e,t,n){return n===void 0||bo&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=n,e=_u(),N.lanes|=e,Yl|=e,n)}function ks(e,t,n,r){return jr(n,t)?n:ao.current===null?!(bo&42)||bo&1073741824&&!(G&261930)?(uc=!0,e.memoizedState=n):(e=_u(),N.lanes|=e,Yl|=e,t):(e=Os(e,n,r),jr(e,t)||(uc=!0),e)}function As(e,t,n,r,i){var a=T.p;T.p=a!==0&&8>a?a:8;var o=w.T,s={};w.T=s,Hs(e,!1,t,n);try{var c=i(),l=w.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Vs(e,t,wa(c,r),gu(e)):Vs(e,t,r,gu(e))}catch(n){Vs(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{T.p=a,o!==null&&s.types!==null&&(o.types=s.types),w.T=o}}function js(){}function Ms(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Ns(e).queue;As(e,i,t,ue,n===null?js:function(){return Ps(e),n(r)})}function Ns(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:ue},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ps(e){var t=Ns(e);t.next===null&&(t=e.alternate.memoizedState),Vs(e,t.next.queue,{},gu())}function Fs(){return la(tp)}function Is(){return Bo().memoizedState}function Ls(){return Bo().memoizedState}function Rs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=Xa(n);var r=Za(t,e,n);r!==null&&(vu(r,t,n),Qa(r,t,n)),t={cache:ga()},e.payload=t;return}t=t.return}}function zs(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Us(e)?Ws(t,n):(n=di(e,t,n,r),n!==null&&(vu(n,e,r),Gs(n,t,r)))}function Bs(e,t,n){Vs(e,t,n,gu())}function Vs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Us(e))Ws(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,jr(s,o))return ui(e,t,i,0),U===null&&li(),!1}catch{}if(n=di(e,t,i,r),n!==null)return vu(n,e,r),Gs(n,t,r),!0}return!1}function Hs(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Us(e)){if(t)throw Error(a(479))}else t=di(e,n,r,2),t!==null&&vu(t,e,2)}function Us(e){var t=e.alternate;return e===N||t!==null&&t===N}function Ws(e,t){wo=Co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}var Ks={readContext:la,use:Uo,useCallback:Ao,useContext:Ao,useEffect:Ao,useImperativeHandle:Ao,useLayoutEffect:Ao,useInsertionEffect:Ao,useMemo:Ao,useReducer:Ao,useRef:Ao,useState:Ao,useDebugValue:Ao,useDeferredValue:Ao,useTransition:Ao,useSyncExternalStore:Ao,useId:Ao,useHostTransitionStatus:Ao,useFormState:Ao,useActionState:Ao,useOptimistic:Ao,useMemoCache:Ao,useCacheRefresh:Ao};Ks.useEffectEvent=Ao;var qs={readContext:la,use:Uo,useCallback:function(e,t){return zo().memoizedState=[e,t===void 0?null:t],e},useContext:la,useEffect:_s,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),F(4194308,4,Cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return F(4194308,4,e,t)},useInsertionEffect:function(e,t){F(4,2,e,t)},useMemo:function(e,t){var n=zo();t=t===void 0?null:t;var r=e();if(To){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=zo();if(n!==void 0){var i=n(t);if(To){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=zs.bind(null,N,e),[r.memoizedState,e]},useRef:function(e){var t=zo();return e={current:e},t.memoizedState=e},useState:function(e){e=es(e);var t=e.queue,n=Bs.bind(null,N,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ts,useDeferredValue:function(e,t){return Os(zo(),e,t)},useTransition:function(){var e=es(!1);return e=As.bind(null,N,e.queue,!0,!1),zo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=N,i=zo();if(A){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),U===null)throw Error(a(349));G&127||Yo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,_s(Zo.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,{destroy:void 0},Xo.bind(null,r,o,n,t),null),n},useId:function(){var e=zo(),t=U.identifierPrefix;if(A){var n=Ii,r=Fi;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Eo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ko++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Fs,useFormState:ls,useActionState:ls,useOptimistic:function(e){var t=zo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Hs.bind(null,N,!0,n),n.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return zo().memoizedState=Rs.bind(null,N)},useEffectEvent:function(e){var t=zo(),n={impl:e};return t.memoizedState=n,function(){if(H&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Js={readContext:la,use:Uo,useCallback:Es,useContext:la,useEffect:vs,useImperativeHandle:ws,useInsertionEffect:xs,useLayoutEffect:Ss,useMemo:Ds,useReducer:P,useRef:hs,useState:function(){return P(Go)},useDebugValue:Ts,useDeferredValue:function(e,t){return ks(Bo(),xo.memoizedState,e,t)},useTransition:function(){var e=P(Go)[0],t=Bo().memoizedState;return[typeof e==`boolean`?e:Ho(e),t]},useSyncExternalStore:Jo,useId:Is,useHostTransitionStatus:Fs,useFormState:us,useActionState:us,useOptimistic:function(e,t){return ts(Bo(),xo,e,t)},useMemoCache:Wo,useCacheRefresh:Ls};Js.useEffectEvent=bs;var Ys={readContext:la,use:Uo,useCallback:Es,useContext:la,useEffect:vs,useImperativeHandle:ws,useInsertionEffect:xs,useLayoutEffect:Ss,useMemo:Ds,useReducer:qo,useRef:hs,useState:function(){return qo(Go)},useDebugValue:Ts,useDeferredValue:function(e,t){var n=Bo();return xo===null?Os(n,e,t):ks(n,xo.memoizedState,e,t)},useTransition:function(){var e=qo(Go)[0],t=Bo().memoizedState;return[typeof e==`boolean`?e:Ho(e),t]},useSyncExternalStore:Jo,useId:Is,useHostTransitionStatus:Fs,useFormState:ps,useActionState:ps,useOptimistic:function(e,t){var n=Bo();return xo===null?(n.baseState=e,[e,n.queue.dispatch]):ts(n,xo,e,t)},useMemoCache:Wo,useCacheRefresh:Ls};Ys.useEffectEvent=bs;function Xs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Xa(r);i.payload=t,n!=null&&(i.callback=n),t=Za(e,i,r),t!==null&&(vu(t,e,r),Qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Xa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Za(e,i,r),t!==null&&(vu(t,e,r),Qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gu(),r=Xa(n);r.tag=2,t!=null&&(r.callback=t),t=Za(e,r,n),t!==null&&(vu(t,e,n),Qa(t,e,n))}};function Qs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Mr(n,r)||!Mr(i,a):!0}function $s(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Zs.enqueueReplaceState(t,t.state,null)}function ec(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function tc(e){ai(e)}function nc(e){console.error(e)}function rc(e){ai(e)}function I(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function ic(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function ac(e,t,n){return n=Xa(n),n.tag=3,n.payload={element:null},n.callback=function(){I(e,t)},n}function oc(e){return e=Xa(e),e.tag=3,e}function sc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){ic(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){ic(t,n,r),typeof i!=`function`&&(ou===null?ou=new Set([this]):ou.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function cc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&oa(t,n,i,!0),n=uo.current,n!==null){switch(n.tag){case 31:case 13:return fo===null?Au():n.alternate===null&&Jl===0&&(Jl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ma?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ju(e,r,i)),!1;case 22:return n.flags|=65536,r===Ma?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ju(e,r,i)),!1}throw Error(a(435,n.tag))}return Ju(e,r,i),Au(),!1}if(A)return t=uo.current,t===null?(r!==Ki&&(t=Error(a(423),{cause:r}),$i(Di(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Di(r,n),i=ac(e.stateNode,r,i),$a(e,i),Jl!==4&&(Jl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ki&&(e=Error(a(422),{cause:r}),$i(Di(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=Di(o,n),eu===null?eu=[o]:eu.push(o),Jl!==4&&(Jl=2),t===null)return!0;r=Di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=ac(n.stateNode,r,e),$a(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ou===null||!ou.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=oc(i),sc(i,e,n,r),$a(n,i),!1}n=n.return}while(n!==null);return!1}var lc=Error(a(461)),uc=!1;function dc(e,t,n,r){t.child=e===null?Ka(t,null,n,r):Ga(t,e.child,n,r)}function fc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ca(t),r=Mo(e,t,n,o,a,i),s=Io(),e!==null&&!uc?(Lo(e,t,i),Pc(e,t,i)):(A&&s&&zi(t),t.flags|=1,dc(e,t,r,i),t.child)}function pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!vi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,mc(e,t,a,r,i)):(e=xi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Fc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Mr:n,n(o,r)&&e.ref===t.ref)return Pc(e,t,i)}return t.flags|=1,e=yi(a,r),e.ref=t.ref,e.return=t,t.child=e}function mc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Mr(a,r)&&e.ref===t.ref){if(uc=!1,t.pendingProps=r=a,Fc(e,i))e.flags&131072&&(uc=!0);else return t.lanes=e.lanes,Pc(e,t,i)}}return Sc(e,t,n,r,i)}function hc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return _c(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&M(t,a===null?null:a.cachePool),a===null?co():so(t,a),ho(t);else return r=t.lanes=536870912,_c(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&M(t,null),co(),go(t)):(M(t,a.cachePool),so(t,a),go(t),t.memoizedState=null);return dc(e,t,i,n),t.child}function gc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function _c(e,t,n,r,i){var a=Da();return a=a===null?null:{parent:ha._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&M(t,null),co(),ho(t),e!==null&&oa(e,t,r,!0),t.childLanes=i,null}function vc(e,t){return t=L({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function yc(e,t,n){return Ga(t,e.child,null,n),e=vc(t,t.pendingProps),e.flags|=2,_o(t),t.memoizedState=null,e}function bc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(A){if(r.mode===`hidden`)return e=vc(t,r),t.lanes=536870912,gc(null,e);if(mo(t),(e=Ui)?(e=sf(e,Gi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pi===null?null:{id:Fi,overflow:Ii},retryLane:536870912,hydrationErrors:null},n=wi(e),n.return=t,t.child=n,Hi=t,Ui=null)):e=null,e===null)throw qi(t);return t.lanes=536870912,null}return vc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(mo(t),i){if(t.flags&256)t.flags&=-257,t=yc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558))}else if(uc||oa(e,t,n,!1),i=(n&e.childLanes)!==0,uc||i){if(r=U,r!==null&&(s=dt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,fi(e,s),vu(r,e,s),lc;Au(),t=yc(e,t,n)}else e=o.treeContext,Ui=df(s.nextSibling),Hi=t,A=!0,Wi=null,Gi=!1,e!==null&&Vi(t,e),t=vc(t,r),t.flags|=4096;return t}return e=yi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Sc(e,t,n,r,i){return ca(t),n=Mo(e,t,n,r,void 0,i),r=Io(),e!==null&&!uc?(Lo(e,t,i),Pc(e,t,i)):(A&&r&&zi(t),t.flags|=1,dc(e,t,n,i),t.child)}function Cc(e,t,n,r,i,a){return ca(t),t.updateQueue=null,n=Po(t,r,n,i),No(e),r=Io(),e!==null&&!uc?(Lo(e,t,a),Pc(e,t,a)):(A&&r&&zi(t),t.flags|=1,dc(e,t,n,a),t.child)}function wc(e,t,n,r,i){if(ca(t),t.stateNode===null){var a=hi,o=n.contextType;typeof o==`object`&&o&&(a=la(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ja(t),o=n.contextType,a.context=typeof o==`object`&&o?la(o):hi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Xs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Zs.enqueueReplaceState(a,a.state,null),no(t,r,a,i),to(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=ec(n,s);a.props=c;var l=a.context,u=n.contextType;o=hi,typeof u==`object`&&u&&(o=la(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&$s(t,a,r,o),qa=!1;var f=t.memoizedState;a.state=f,no(t,r,a,i),to(),l=t.memoizedState,s||f!==l||qa?(typeof d==`function`&&(Xs(t,n,d,r),l=t.memoizedState),(c=qa||Qs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ya(e,t),o=t.memoizedProps,u=ec(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=hi,typeof l==`object`&&l&&(c=la(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&$s(t,a,r,c),qa=!1,f=t.memoizedState,a.state=f,no(t,r,a,i),to();var p=t.memoizedState;o!==d||f!==p||qa||e!==null&&e.dependencies!==null&&sa(e.dependencies)?(typeof s==`function`&&(Xs(t,n,s,r),p=t.memoizedState),(u=qa||Qs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&sa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,xc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ga(t,e.child,null,i),t.child=Ga(t,null,n,i)):dc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Pc(e,t,i),e}function Tc(e,t,n,r){return Zi(),t.flags|=256,dc(e,t,n,r),t.child}var Ec={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dc(e){return{baseLanes:e,cachePool:Oa()}}function Oc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Ql),e}function kc(e,t,n){var r=t.pendingProps,i=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(vo.current&2)),s&&(i=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(A){if(i?po(t):go(t),(e=Ui)?(e=sf(e,Gi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pi===null?null:{id:Fi,overflow:Ii},retryLane:536870912,hydrationErrors:null},n=wi(e),n.return=t,t.child=n,Hi=t,Ui=null)):e=null,e===null)throw qi(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(go(t),i=t.mode,c=L({mode:`hidden`,children:c},i),r=Si(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Dc(n),r.childLanes=Oc(e,s,n),t.memoizedState=Ec,gc(null,r)):(po(t),Ac(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(po(t),t.flags&=-257,t=jc(e,t,n)):t.memoizedState===null?(go(t),c=r.fallback,i=t.mode,r=L({mode:`visible`,children:r.children},i),c=Si(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ga(t,e.child,null,n),r=t.child,r.memoizedState=Dc(n),r.childLanes=Oc(e,s,n),t.memoizedState=Ec,t=gc(null,r)):(go(t),t.child=e.child,t.flags|=128,t=null);else if(po(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,$i({value:r,source:null,stack:null}),t=jc(e,t,n)}else if(uc||oa(e,t,n,!1),s=(n&e.childLanes)!==0,uc||s){if(s=U,s!==null&&(r=dt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,fi(e,r),vu(s,e,r),lc;cf(c)||Au(),t=jc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ui=df(c.nextSibling),Hi=t,A=!0,Wi=null,Gi=!1,e!==null&&Vi(t,e),t=Ac(t,r.children),t.flags|=4096);return t}return i?(go(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=yi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Si(c,i,n,null),c.flags|=2):c=yi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,gc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Dc(n):(i=c.cachePool,i===null?i=Oa():(l=ha._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Oc(e,s,n),t.memoizedState=Ec,gc(e.child,r)):(po(t),n=e.child,e=n.sibling,n=yi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Ac(e,t){return t=L({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function L(e,t){return e=_i(22,e,null,t),e.lanes=0,e}function jc(e,t,n){return Ga(t,e.child,null,n),e=Ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ia(e.return,t,n)}function R(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Nc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=vo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,he(vo,o),dc(e,t,r,n),r=A?ji:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mc(e,n,t);else if(e.tag===19)Mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&yo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),R(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&yo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}R(t,!0,n,null,a,r);break;case`together`:R(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(oa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=yi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=yi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&sa(e)))}function Ic(e,t,n){switch(t.tag){case 3:be(t,t.stateNode.containerInfo),na(t,ha,e.memoizedState.cache),Zi();break;case 27:case 5:Se(t);break;case 4:be(t,t.stateNode.containerInfo);break;case 10:na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(po(t),e=Pc(e,t,n),e===null?null:e.sibling):kc(e,t,n):(po(t),t.flags|=128,null);po(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(oa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Nc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),he(vo,vo.current),r)break;return null;case 22:return t.lanes=0,hc(e,t,n,t.pendingProps);case 24:na(t,ha,e.memoizedState.cache)}return Pc(e,t,n)}function Lc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)uc=!0;else{if(!Fc(e,n)&&!(t.flags&128))return uc=!1,Ic(e,t,n);uc=!!(e.flags&131072)}}else uc=!1,A&&t.flags&1048576&&Ri(t,ji,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Fa(t.elementType),t.type=e,typeof e==`function`)vi(e)?(r=ec(e,r),t.tag=1,t=wc(null,t,e,r,n)):(t.tag=0,t=Sc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=fc(null,t,e,r,n);break a}if(i===ne){t.tag=14,t=pc(null,t,e,r,n);break a}}throw t=ce(e)||e,Error(a(306,t,``))}}return t;case 0:return Sc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=ec(r,t.pendingProps),wc(e,t,r,i,n);case 3:a:{if(be(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Ya(e,t),no(t,r,null,n);var s=t.memoizedState;if(r=s.cache,na(t,ha,r),r!==o.cache&&aa(t,[ha],n,!0),to(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Tc(e,t,r,n);break a}if(r!==i){i=Di(Error(a(424)),t),$i(i),t=Tc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ui=df(e.firstChild),Hi=t,A=!0,Wi=null,Gi=!0,n=Ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Zi(),r===i){t=Pc(e,t,n);break a}dc(e,t,r,n)}t=t.child}return t;case 26:return xc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:A||(n=t.type,e=t.pendingProps,r=Ud(ve.current).createElement(n),r[_t]=t,r[vt]=e,Ld(r,n,e),At(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Se(t),e===null&&A&&(r=t.stateNode=hf(t.type,t.pendingProps,ve.current),Hi=t,Gi=!0,i=Ui,ef(t.type)?(ff=i,Ui=df(r.firstChild)):Ui=i),dc(e,t,t.pendingProps.children,n),xc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&A&&((i=r=Ui)&&(r=af(r,t.type,t.pendingProps,Gi),r===null?i=!1:(t.stateNode=r,Hi=t,Ui=df(r.firstChild),Gi=!1,i=!0)),i||qi(t)),Se(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(i,o)?r=null:s!==null&&Kd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Mo(e,t,Fo,null,null,n),tp._currentValue=i),xc(e,t),dc(e,t,r,n),t.child;case 6:return e===null&&A&&((e=n=Ui)&&(n=of(n,t.pendingProps,Gi),n===null?e=!1:(t.stateNode=n,Hi=t,Ui=null,e=!0)),e||qi(t)),null;case 13:return kc(e,t,n);case 4:return be(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ga(t,null,r,n):dc(e,t,r,n),t.child;case 11:return fc(e,t,t.type,t.pendingProps,n);case 7:return dc(e,t,t.pendingProps,n),t.child;case 8:return dc(e,t,t.pendingProps.children,n),t.child;case 12:return dc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,na(t,t.type,r.value),dc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ca(t),i=la(i),r=r(i),t.flags|=1,dc(e,t,r,n),t.child;case 14:return pc(e,t,t.type,t.pendingProps,n);case 15:return mc(e,t,t.type,t.pendingProps,n);case 19:return Nc(e,t,n);case 31:return bc(e,t,n);case 22:return hc(e,t,n,t.pendingProps);case 24:return ca(t),r=la(ha),e===null?(i=Da(),i===null&&(i=U,o=ga(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ja(t),na(t,ha,i)):((e.lanes&n)!==0&&(Ya(e,t),no(t,null,null,n),to()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,na(t,ha,r),r!==i.cache&&aa(t,[ha],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),na(t,ha,r))),dc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Rc(e){e.flags|=4}function zc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Du())e.flags|=8192;else throw Ia=Ma,Aa}}else e.flags&=-16777217}function Bc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t)){if(Du())e.flags|=8192;else throw Ia=Ma,Aa}}function Vc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:at(),e.lanes|=t,$l|=t)}function Hc(e,t){if(!A)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Uc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wc(e,t,n){var r=t.pendingProps;switch(Bi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Uc(t),null;case 1:return Uc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ra(ha),xe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Xi(t)?Rc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qi())),Uc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Rc(t),o===null?(Uc(t),zc(t,i,null,r,n)):(Uc(t),Bc(t,o))):o?o===e.memoizedState?(Uc(t),t.flags&=-16777217):(Rc(t),Uc(t),Bc(t,o)):(e=e.memoizedProps,e!==r&&Rc(t),Uc(t),zc(t,i,e,r,n)),null;case 27:if(we(t),n=ve.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Uc(t),null}e=ge.current,Xi(t)?Ji(t,e):(e=hf(i,r,n),t.stateNode=e,Rc(t))}return Uc(t),null;case 5:if(we(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Uc(t),null}if(o=ge.current,Xi(t))Ji(t,o);else{var s=Ud(ve.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[_t]=t,o[vt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ve.current,Xi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Hi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[_t]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||qi(t,!0)}else e=Ud(e).createTextNode(r),e[_t]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Xi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[_t]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(_o(t),t):(_o(t),null);if(t.flags&128)throw Error(a(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Xi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[_t]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),i=!1}else i=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(_o(t),t):(_o(t),null)}return _o(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),Uc(t),null);case 4:return xe(),e===null&&wd(t.stateNode.containerInfo),Uc(t),null;case 10:return ra(t.type),Uc(t),null;case 19:if(me(vo),r=t.memoizedState,r===null)return Uc(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)Hc(r,!1);else{if(Jl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=yo(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)bi(n,e),n=n.sibling;return he(vo,vo.current&1|2),A&&Li(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ie()>au&&(t.flags|=128,i=!0,Hc(r,!1),t.lanes=4194304)}}else{if(!i){if(e=yo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!A)return Uc(t),null}else 2*Ie()-r.renderingStartTime>au&&n!==536870912&&(t.flags|=128,i=!0,Hc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ie(),e.sibling=null,n=vo.current,he(vo,i?n&1|2:n&1),A&&Li(t,r.treeForkCount),e);case 22:case 23:return _o(t),lo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&me(Ea),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ra(ha),Uc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Gc(e,t){switch(Bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ra(ha),xe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(_o(t),t.alternate===null)throw Error(a(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_o(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(vo),null;case 4:return xe(),null;case 10:return ra(t.type),null;case 22:case 23:return _o(t),lo(),e!==null&&me(Ea),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ra(ha),null;case 25:return null;default:return null}}function Kc(e,t){switch(Bi(t),t.tag){case 3:ra(ha),xe();break;case 26:case 27:case 5:we(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&_o(t);break;case 13:_o(t);break;case 19:me(vo);break;case 10:ra(t.type);break;case 22:case 23:_o(t),lo(),e!==null&&me(Ea);break;case 24:ra(ha)}}function qc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){J(t,t.return,e)}}function Jc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){J(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){J(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{io(t,n)}catch(t){J(e,e.return,t)}}}function Xc(e,t,n){n.props=ec(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){J(e,t,n)}}function Zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){J(e,t,n)}}function Qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){J(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){J(e,t,n)}else n.current=null}}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){J(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[vt]=t}catch(t){J(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dn));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[_t]=e,t[vt]=n}catch(t){J(e,e.return,t)}}var z=!1,B=!1,ol=!1,sl=typeof WeakSet==`function`?WeakSet:Set,cl=null;function ll(e,t){if(e=e.containerInfo,Vd=up,e=Ir(e),Lr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},up=!1,cl=t;cl!==null;)if(t=cl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,cl=e;else for(;cl!==null;){switch(t=cl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=ec(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){J(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,cl=e;break}cl=t.return}}function ul(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Tl(e,n),r&4&&qc(5,n);break;case 1:if(Tl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){J(n,n.return,e)}else{var i=ec(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){J(n,n.return,e)}}}r&64&&Yc(n),r&512&&Zc(n,n.return);break;case 3:if(Tl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{io(e,t)}catch(e){J(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:Tl(e,n),t===null&&r&4&&$c(n),r&512&&Zc(n,n.return);break;case 12:Tl(e,n);break;case 31:Tl(e,n),r&4&&gl(e,n);break;case 13:Tl(e,n),r&4&&_l(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Zu.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||z,!r){t=t!==null&&t.memoizedState!==null||B,i=z;var a=B;z=r,(B=t)&&!a?El(e,n,!!(n.subtreeFlags&8772)):Tl(e,n),z=i,B=a}break;case 30:break;default:Tl(e,n)}}function dl(e){var t=e.alternate;t!==null&&(e.alternate=null,dl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var fl=null,pl=!1;function ml(e,t,n){for(n=n.child;n!==null;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(Ke&&typeof Ke.onCommitFiberUnmount==`function`)try{Ke.onCommitFiberUnmount(Ge,n)}catch{}switch(n.tag){case 26:B||Qc(n,t),ml(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:B||Qc(n,t);var r=fl,i=pl;ef(n.type)&&(fl=n.stateNode,pl=!1),ml(e,t,n),gf(n.stateNode),fl=r,pl=i;break;case 5:B||Qc(n,t);case 6:if(r=fl,i=pl,fl=null,ml(e,t,n),fl=r,pl=i,fl!==null){if(pl)try{(fl.nodeType===9?fl.body:fl.nodeName===`HTML`?fl.ownerDocument.body:fl).removeChild(n.stateNode)}catch(e){J(n,t,e)}else try{fl.removeChild(n.stateNode)}catch(e){J(n,t,e)}}break;case 18:fl!==null&&(pl?(e=fl,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):tf(fl,n.stateNode));break;case 4:r=fl,i=pl,fl=n.stateNode.containerInfo,pl=!0,ml(e,t,n),fl=r,pl=i;break;case 0:case 11:case 14:case 15:Jc(2,n,t),B||Jc(4,n,t),ml(e,t,n);break;case 1:B||(Qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Xc(n,t,r)),ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:B=(r=B)||n.memoizedState!==null,ml(e,t,n),B=r;break;default:ml(e,t,n)}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){J(t,t.return,e)}}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){J(t,t.return,e)}}function vl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sl),t;default:throw Error(a(435,e.tag))}}function yl(e,t){var n=vl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Qu.bind(null,e,t);t.then(r,r)}})}function bl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ef(c.type)){fl=c.stateNode,pl=!1;break a}break;case 5:fl=c.stateNode,pl=!1;break a;case 3:case 4:fl=c.stateNode.containerInfo,pl=!0;break a}c=c.return}if(fl===null)throw Error(a(160));hl(o,s,i),fl=null,pl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sl(t,e),t=t.sibling}var xl=null;function Sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bl(t,e),Cl(e),r&4&&(Jc(3,e,e.return),qc(3,e),Jc(5,e,e.return));break;case 1:bl(t,e),Cl(e),r&512&&(B||n===null||Qc(n,n.return)),r&64&&z&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=xl;if(bl(t,e),Cl(e),r&512&&(B||n===null||Qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[wt]||o[_t]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Ld(o,r,n),o[_t]=e,At(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Ld(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Ld(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[_t]=e,At(o),r=o}e.stateNode=r}else Gf(i,e.type,e.stateNode)}else e.stateNode=zf(i,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(i,e.type,e.stateNode):zf(i,r,e.memoizedProps))}break;case 27:bl(t,e),Cl(e),r&512&&(B||n===null||Qc(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(bl(t,e),Cl(e),r&512&&(B||n===null||Qc(n,n.return)),e.flags&32){i=e.stateNode;try{nn(i,``)}catch(t){J(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,el(e,i,n===null?i:n.memoizedProps)),r&1024&&(ol=!0);break;case 6:if(bl(t,e),Cl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){J(e,e.return,t)}}break;case 3:if(Uf=null,i=xl,xl=yf(t.containerInfo),bl(t,e),xl=i,Cl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){J(e,e.return,t)}ol&&(ol=!1,wl(e));break;case 4:r=xl,xl=yf(e.stateNode.containerInfo),bl(t,e),Cl(e),xl=r;break;case 12:bl(t,e),Cl(e);break;case 31:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 13:bl(t,e),Cl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ru=Ie()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=z,d=B;if(z=u||i,B=d||l,bl(t,e),B=d,z=u,Cl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||z||B||V(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){J(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){J(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?nf(m,!0):nf(l.stateNode,!1)}catch(e){J(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,yl(e,n))));break;case 19:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 30:break;case 21:break;default:bl(t,e),Cl(e)}}function Cl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;il(e,nl(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(nn(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(a(161))}}catch(t){J(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ul(e,t.alternate,t),t=t.sibling}function V(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jc(4,t,t.return),V(t);break;case 1:Qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Xc(t,t.return,n),V(t);break;case 27:gf(t.stateNode);case 26:case 5:Qc(t,t.return),V(t);break;case 22:t.memoizedState===null&&V(t);break;case 30:V(t);break;default:V(t)}e=e.sibling}}function El(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:El(i,a,n),qc(4,a);break;case 1:if(El(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){J(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)ro(c[i],s)}catch(e){J(r,r.return,e)}}n&&o&64&&Yc(a),Zc(a,a.return);break;case 27:al(a);case 26:case 5:El(i,a,n),n&&r===null&&o&4&&$c(a),Zc(a,a.return);break;case 12:El(i,a,n);break;case 31:El(i,a,n),n&&o&4&&gl(i,a);break;case 13:El(i,a,n),n&&o&4&&_l(i,a);break;case 22:a.memoizedState===null&&El(i,a,n),Zc(a,a.return);break;case 30:break;default:El(i,a,n)}t=t.sibling}}function Dl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&_a(n))}function Ol(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e))}function kl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Al(e,t,n,r),t=t.sibling}function Al(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kl(e,t,n,r),i&2048&&qc(9,t);break;case 1:kl(e,t,n,r);break;case 3:kl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_a(e)));break;case 12:if(i&2048){kl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){J(t,t.return,e)}}else kl(e,t,n,r);break;case 31:kl(e,t,n,r);break;case 13:kl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?kl(e,t,n,r):(a._visibility|=2,jl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?kl(e,t,n,r):Ml(e,t),i&2048&&Dl(o,t);break;case 24:kl(e,t,n,r),i&2048&&Ol(t.alternate,t);break;default:kl(e,t,n,r)}}function jl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:jl(a,o,s,c,i),qc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,jl(a,o,s,c,i)):u._visibility&2?jl(a,o,s,c,i):Ml(a,o),i&&l&2048&&Dl(o.alternate,o);break;case 24:jl(a,o,s,c,i),i&&l&2048&&Ol(o.alternate,o);break;default:jl(a,o,s,c,i)}t=t.sibling}}function Ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ml(n,r),i&2048&&Dl(r.alternate,r);break;case 24:Ml(n,r),i&2048&&Ol(r.alternate,r);break;default:Ml(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&Jf(n,xl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=xl;xl=yf(e.stateNode.containerInfo),Pl(e,t,n),xl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Jc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;cl!==null;){var n=cl;switch(n.tag){case 0:case 11:case 15:Jc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:_a(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cl=r;else a:for(n=e;cl!==null;){r=cl;var i=r.sibling,a=r.return;if(dl(r),r===n){cl=null;break a}if(i!==null){i.return=a,cl=i;break a}cl=a}}}var Vl={getCacheForType:function(e){var t=la(ha),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return la(ha).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,H=0,U=null,W=null,G=0,K=0,Ul=null,Wl=!1,Gl=!1,Kl=!1,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=0,eu=null,tu=null,nu=!1,ru=0,iu=0,au=1/0,q=null,ou=null,su=0,cu=null,lu=null,uu=0,du=0,fu=null,pu=null,mu=0,hu=null;function gu(){return H&2&&G!==0?G&-G:w.T===null?mt():pd()}function _u(){if(Ql===0){if(!(G&536870912)||A){var e=$e;$e<<=1,!($e&3932160)&&($e=262144),Ql=e}else Ql=536870912}return e=uo.current,e!==null&&(e.flags|=32),Ql}function vu(e,t,n){(e===U&&(K===2||K===9)||e.cancelPendingCommit!==null)&&(Tu(e,0),Su(e,G,Ql,!1)),st(e,n),(!(H&2)||e!==U)&&(e===U&&(!(H&2)&&(Xl|=n),Jl===4&&Su(e,G,Ql,!1)),ad(e))}function yu(e,t,n){if(H&6)throw Error(a(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||rt(e,t),i=r?Nu(e,t):ju(e,t,!0),o=r;do{if(i===0){Gl&&!r&&Su(e,t,0,!1);break}if(n=e.current.alternate,o&&!xu(n))i=ju(e,t,!1),o=!1;else{if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=eu;var l=c.current.memoizedState.isDehydrated;if(l&&(Tu(c,s).flags|=256),s=ju(c,s,!1),s!==2){if(Kl&&!l){c.errorRecoveryDisabledLanes|=o,Xl|=o,i=4;break a}o=tu,tu=i,o!==null&&(tu===null?tu=o:tu.push.apply(tu,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Tu(e,0),Su(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:Su(r,t,Ql,!Wl);break a;case 2:tu=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=ru+300-Ie(),10<i)){if(Su(r,t,Ql,!Wl),nt(r,0,!0)!==0)break a;uu=t,r.timeoutHandle=Yd(bu.bind(null,r,n,tu,q,nu,t,Ql,Xl,$l,Wl,o,`Throttled`,-0,0),i);break a}bu(r,n,tu,q,nu,t,Ql,Xl,$l,Wl,o,null,-0,0)}break}}while(1);ad(e)}function bu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:dn},Fl(t,a,d);var m=(a&62914560)===a?ru-Ie():(a&4194048)===a?iu-Ie():0;if(m=Xf(d,m),m!==null){uu=a,e.cancelPendingCommit=m(Bu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Su(e,a,o,!l);return}}Bu(e,t,a,n,r,i,o,s,c)}function xu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!jr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Su(e,t,n,r){t&=~Zl,t&=~Xl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&lt(e,n,t)}function Cu(){return H&6?!0:(od(0,!1),!1)}function wu(){if(W!==null){if(K===0)var e=W.return;else e=W,ta=j=null,Ro(e),za=null,Ba=0,e=W;for(;e!==null;)Kc(e.alternate,e),e=e.return;W=null}}function Tu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),uu=0,wu(),U=e,W=n=yi(e.current,null),G=t,K=0,Ul=null,Wl=!1,Gl=rt(e,t),Kl=!1,$l=Ql=Zl=Xl=Yl=Jl=0,tu=eu=null,nu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Je(r),a=1<<i;t|=e[i],r&=~a}return ql=t,li(),n}function Eu(e,t){N=null,w.H=Ks,t===ka||t===ja?(t=La(),K=3):t===Aa?(t=La(),K=4):K=t===lc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ul=t,W===null&&(Jl=1,I(e,Di(t,e.current)))}function Du(){var e=uo.current;return e===null?!0:(G&4194048)===G?fo===null:(G&62914560)===G||G&536870912?e===fo:!1}function Ou(){var e=w.H;return w.H=Ks,e===null?Ks:e}function ku(){var e=w.A;return w.A=Vl,e}function Au(){Jl=4,Wl||(G&4194048)!==G&&uo.current!==null||(Gl=!0),!(Yl&134217727)&&!(Xl&134217727)||U===null||Su(U,G,Ql,!1)}function ju(e,t,n){var r=H;H|=2;var i=Ou(),a=ku();(U!==e||G!==t)&&(q=null,Tu(e,t)),t=!1;var o=Jl;a:do try{if(K!==0&&W!==null){var s=W,c=Ul;switch(K){case 8:wu(),o=6;break a;case 3:case 2:case 9:case 6:uo.current===null&&(t=!0);var l=K;if(K=0,Ul=null,Lu(e,s,c,l),n&&Gl){o=0;break a}break;default:l=K,K=0,Ul=null,Lu(e,s,c,l)}}Mu(),o=Jl;break}catch(t){Eu(e,t)}while(1);return t&&e.shellSuspendCounter++,ta=j=null,H=r,w.H=i,w.A=a,W===null&&(U=null,G=0,li()),o}function Mu(){for(;W!==null;)Fu(W)}function Nu(e,t){var n=H;H|=2;var r=Ou(),i=ku();U!==e||G!==t?(q=null,au=Ie()+500,Tu(e,t)):Gl=rt(e,t);a:do try{if(K!==0&&W!==null){t=W;var o=Ul;b:switch(K){case 1:K=0,Ul=null,Lu(e,t,o,1);break;case 2:case 9:if(Na(o)){K=0,Ul=null,Iu(t);break}t=function(){K!==2&&K!==9||U!==e||(K=7),ad(e)},o.then(t,t);break a;case 3:K=7;break a;case 4:K=5;break a;case 7:Na(o)?(K=0,Ul=null,Iu(t)):(K=0,Ul=null,Lu(e,t,o,7));break;case 5:var s=null;switch(W.tag){case 26:s=W.memoizedState;case 5:case 27:var c=W;if(s?qf(s):c.stateNode.complete){K=0,Ul=null;var l=c.sibling;if(l!==null)W=l;else{var u=c.return;u===null?W=null:(W=u,Ru(u))}break b}}K=0,Ul=null,Lu(e,t,o,5);break;case 6:K=0,Ul=null,Lu(e,t,o,6);break;case 8:wu(),Jl=6;break a;default:throw Error(a(462))}}Pu();break}catch(t){Eu(e,t)}while(1);return ta=j=null,w.H=r,w.A=i,H=n,W===null?(U=null,G=0,li(),Jl):0}function Pu(){for(;W!==null&&!Pe();)Fu(W)}function Fu(e){var t=Lc(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?Ru(e):W=t}function Iu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Cc(n,t,t.pendingProps,t.type,void 0,G);break;case 11:t=Cc(n,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:Ro(t);default:Kc(n,t),t=W=bi(t,ql),t=Lc(n,t,ql)}e.memoizedProps=e.pendingProps,t===null?Ru(e):W=t}function Lu(e,t,n,r){ta=j=null,Ro(t),za=null,Ba=0;var i=t.return;try{if(cc(e,i,t,n,G)){Jl=1,I(e,Di(n,e.current)),W=null;return}}catch(t){if(i!==null)throw W=i,t;Jl=1,I(e,Di(n,e.current)),W=null;return}t.flags&32768?(A||r===1?e=!0:Gl||G&536870912?e=!1:(Wl=e=!0,(r===2||r===9||r===3||r===6)&&(r=uo.current,r!==null&&r.tag===13&&(r.flags|=16384))),zu(t,e)):Ru(t)}function Ru(e){var t=e;do{if(t.flags&32768){zu(t,Wl);return}e=t.return;var n=Wc(t.alternate,t,ql);if(n!==null){W=n;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);Jl===0&&(Jl=5)}function zu(e,t){do{var n=Gc(e.alternate,e);if(n!==null){n.flags&=32767,W=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){W=e;return}W=e=n}while(e!==null);Jl=6,W=null}function Bu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Gu();while(su!==0);if(H&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ci,ct(e,n,o,s,c,l),e===U&&(W=U=null,G=0),lu=t,cu=e,uu=n,du=o,fu=i,pu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,$u(Be,function(){return Ku(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=w.T,w.T=null,i=T.p,T.p=2,s=H,H|=4;try{ll(e,t,n)}finally{H=s,T.p=i,w.T=r}}su=1,Vu(),Hu(),Uu()}}function Vu(){if(su===1){su=0;var e=cu,t=lu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=w.T,w.T=null;var r=T.p;T.p=2;var i=H;H|=4;try{Sl(t,e);var a=Hd,o=Ir(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Fr(s.ownerDocument.documentElement,s)){if(c!==null&&Lr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Pr(s,h),v=Pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}up=!!Vd,Hd=Vd=null}finally{H=i,T.p=r,w.T=n}}e.current=t,su=2}}function Hu(){if(su===2){su=0;var e=cu,t=lu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=w.T,w.T=null;var r=T.p;T.p=2;var i=H;H|=4;try{ul(e,t.alternate,t)}finally{H=i,T.p=r,w.T=n}}su=3}}function Uu(){if(su===4||su===3){su=0,Fe();var e=cu,t=lu,n=uu,r=pu;t.subtreeFlags&10256||t.flags&10256?su=5:(su=0,lu=cu=null,Wu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ou=null),pt(n),t=t.stateNode,Ke&&typeof Ke.onCommitFiberRoot==`function`)try{Ke.onCommitFiberRoot(Ge,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=w.T,i=T.p,T.p=2,w.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{w.T=t,T.p=i}}uu&3&&Gu(),ad(e),i=e.pendingLanes,n&261930&&i&42?e===hu?mu++:(mu=0,hu=e):mu=0,od(0,!1)}}function Wu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_a(t)))}function Gu(){return Vu(),Hu(),Uu(),Ku()}function Ku(){if(su!==5)return!1;var e=cu,t=du;du=0;var n=pt(uu),r=w.T,i=T.p;try{T.p=32>n?32:n,w.T=null,n=fu,fu=null;var o=cu,s=uu;if(su=0,lu=cu=null,uu=0,H&6)throw Error(a(331));var c=H;if(H|=4,Rl(o.current),Al(o,o.current,s,n),H=c,od(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot==`function`)try{Ke.onPostCommitFiberRoot(Ge,o)}catch{}return!0}finally{T.p=i,w.T=r,Wu(e,t)}}function qu(e,t,n){t=Di(n,t),t=ac(e.stateNode,t,2),e=Za(e,t,2),e!==null&&(st(e,2),ad(e))}function J(e,t,n){if(e.tag===3)qu(e,e,n);else for(;t!==null;){if(t.tag===3){qu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ou===null||!ou.has(r))){e=Di(n,e),n=oc(2),r=Za(t,n,2),r!==null&&(sc(n,r,t,e),st(r,2),ad(r));break}}t=t.return}}function Ju(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Kl=!0,i.add(n),e=Yu.bind(null,e,t,n),t.then(e,e))}function Yu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,U===e&&(G&n)===n&&(Jl===4||Jl===3&&(G&62914560)===G&&300>Ie()-ru?!(H&2)&&Tu(e,0):Zl|=n,$l===G&&($l=0)),ad(e)}function Xu(e,t){t===0&&(t=at()),e=fi(e,t),e!==null&&(st(e,t),ad(e))}function Zu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xu(e,n)}function Qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Xu(e,n)}function $u(e,t){return Me(e,t)}var ed=null,td=null,nd=!1,rd=!1,id=!1,Y=0;function ad(e){e!==td&&e.next===null&&(td===null?ed=td=e:td=td.next=e),rd=!0,nd||(nd=!0,fd())}function od(e,t){if(!id&&rd){id=!0;do for(var n=!1,r=ed;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=G,a=nt(r,r===U?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,dd(r,a))}r=r.next}while(n);id=!1}}function sd(){cd()}function cd(){rd=nd=!1;var e=0;Y!==0&&Jd()&&(e=Y);for(var t=Ie(),n=null,r=ed;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?ed=i:n.next=i,i===null&&(td=n)):(n=r,(e!==0||a&3)&&(rd=!0)),r=i}su!==0&&su!==5||od(e,!1),Y!==0&&(Y=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=it(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=U,n=G,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(K===2||K===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ne(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ne(r),pt(n)){case 2:case 8:n=ze;break;case 32:n=Be;break;case 268435456:n=He;break;default:n=Be}return r=ud.bind(null,e),n=Me(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ne(r),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(su!==0&&su!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Gu()&&e.callbackNode!==n)return null;var r=G;return r=nt(e,e===U?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(yu(e,r,t),ld(e,Ie()),e.callbackNode!=null&&e.callbackNode===n?ud.bind(null,e):null)}function dd(e,t){if(Gu())return null;yu(e,t,!0)}function fd(){Qd(function(){H&6?Me(Re,sd):cd()})}function pd(){if(Y===0){var e=ba;e===0&&(e=Qe,Qe<<=1,!(Qe&261888)&&(Qe=256)),Y=e}return Y}function md(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:un(``+e)}function hd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function gd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=md((i[vt]||null).action),o=r.submitter;o&&(t=(t=o[vt]||null)?md(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new An(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Y!==0){var e=o?hd(i,o):new FormData(i);Ms(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?hd(i,o):new FormData(i),Ms(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var _d=0;_d<ri.length;_d++){var vd=ri[_d];ii(vd.toLowerCase(),`on`+(vd[0].toUpperCase()+vd.slice(1)))}ii(Yr,`onAnimationEnd`),ii(Xr,`onAnimationIteration`),ii(Zr,`onAnimationStart`),ii(`dblclick`,`onDoubleClick`),ii(`focusin`,`onFocus`),ii(`focusout`,`onBlur`),ii(Qr,`onTransitionRun`),ii($r,`onTransitionStart`),ii(ei,`onTransitionCancel`),ii(ti,`onTransitionEnd`),Pt(`onMouseEnter`,[`mouseout`,`mouseover`]),Pt(`onMouseLeave`,[`mouseout`,`mouseover`]),Pt(`onPointerEnter`,[`pointerout`,`pointerover`]),Pt(`onPointerLeave`,[`pointerout`,`pointerover`]),Nt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Nt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Nt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Nt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var yd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),bd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(yd));function xd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ai(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){ai(e)}i.currentTarget=null,a=c}}}}function X(e,t){var n=t[bt];n===void 0&&(n=t[bt]=new Set);var r=e+`__bubble`;n.has(r)||(Td(t,e,2,!1),n.add(r))}function Sd(e,t,n){var r=0;t&&(r|=4),Td(n,e,r,t)}var Cd=`_reactListening`+Math.random().toString(36).slice(2);function wd(e){if(!e[Cd]){e[Cd]=!0,jt.forEach(function(t){t!==`selectionchange`&&(bd.has(t)||Sd(t,!1,e),Sd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cd]||(t[Cd]=!0,Sd(`selectionchange`,!1,t))}}function Td(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!xn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ed(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Et(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}vn(function(){var r=a,i=pn(n),o=[];a:{var c=ni.get(e);if(c!==void 0){var l=An,u=e;switch(e){case`keypress`:if(Tn(n)===0)break a;case`keydown`:case`keyup`:l=qn;break;case`focusin`:u=`focus`,l=zn;break;case`focusout`:u=`blur`,l=zn;break;case`beforeblur`:case`afterblur`:l=zn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Ln;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Rn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Yn;break;case Yr:case Xr:case Zr:l=Bn;break;case ti:l=Xn;break;case`scroll`:case`scrollend`:l=Mn;break;case`wheel`:l=Zn;break;case`copy`:case`cut`:case`paste`:l=Vn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Jn;break;case`toggle`:case`beforetoggle`:l=Qn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=yn(m,p),g!=null&&d.push(Dd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==fn&&(u=n.relatedTarget||n.fromElement)&&(Et(u)||u[yt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Et(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Ln,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Jn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Ot(l),h=u==null?c:Ot(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Et(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=kd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ad(o,c,l,d,!1),u!==null&&f!==null&&Ad(o,f,u,d,!0)}}a:{if(c=r?Ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=yr;else if(pr(c)){if(br)v=kr;else{v=Dr;var y=Er}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&sn(r.elementType)&&(v=yr):v=Or;if(v&&=v(e,r)){mr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Qt(c,`number`,c.value)}switch(y=r?Ot(r):window,e){case`focusin`:(pr(y)||y.contentEditable===`true`)&&(zr=y,Br=r,Vr=null);break;case`focusout`:Vr=Br=zr=null;break;case`mousedown`:Hr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Hr=!1,Ur(o,n,i);break;case`selectionchange`:if(Rr)break;case`keydown`:case`keyup`:Ur(o,n,i)}var b;if(er)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else lr?or(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(rr&&n.locale!==`ko`&&(lr||x!==`onCompositionStart`?x===`onCompositionEnd`&&lr&&(b=wn()):(D=i,O=`value`in D?D.value:D.textContent,lr=!0)),y=Od(r,x),0<y.length&&(x=new k(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=cr(n),b!==null&&(x.data=b)))),(b=nr?ur(e,n):dr(e,n))&&(x=Od(r,`onBeforeInput`),0<x.length&&(y=new k(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),gd(o,e,r,n,i)}xd(o,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Od(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=yn(e,n),i!=null&&r.unshift(Dd(e,i,a)),i=yn(e,t),i!=null&&r.push(Dd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function kd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ad(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=yn(n,a),l!=null&&o.unshift(Dd(n,l,c))):i||(l=yn(n,a),l!=null&&o.push(Dd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jd=/\r\n?/g,Md=/\u0000|\uFFFD/g;function Nd(e){return(typeof e==`string`?e:``+e).replace(jd,`
10
+ `).replace(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&nn(e,``+r);break;case`className`:Bt(e,`class`,r);break;case`tabIndex`:Bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Bt(e,n,r);break;case`style`:on(e,r,o);break;case`data`:if(t!==`object`){Bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Fd(e,t,`name`,i.name,i,null),Fd(e,t,`formEncType`,i.formEncType,i,null),Fd(e,t,`formMethod`,i.formMethod,i,null),Fd(e,t,`formTarget`,i.formTarget,i,null)):(Fd(e,t,`encType`,i.encType,i,null),Fd(e,t,`method`,i.method,i,null),Fd(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=un(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=un(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:X(`beforetoggle`,e),X(`toggle`,e),zt(e,`popover`,r);break;case`xlinkActuate`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Vt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Vt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:zt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=cn.get(n)||n,zt(e,n,r))}}function Id(e,t,n,r,i,o){switch(n){case`style`:on(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?nn(e,r):(typeof r==`number`||typeof r==`bigint`)&&nn(e,``+r);break;case`onScroll`:r!=null&&X(`scroll`,e);break;case`onScrollEnd`:r!=null&&X(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=dn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[vt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):zt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:X(`error`,e),X(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Fd(e,t,o,s,n,null)}}i&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:X(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Fd(e,t,r,d,n,null)}}Zt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in X(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Fd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&$t(e,!!r,n,!0):$t(e,!!r,t,!1);return;case`textarea`:for(s in X(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Fd(e,t,s,c,n,null)}tn(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Fd(e,t,l,r,n,null)}return;case`dialog`:X(`beforetoggle`,e),X(`toggle`,e),X(`cancel`,e),X(`close`,e);break;case`iframe`:case`object`:X(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)X(yd[r],e);break;case`image`:X(`error`,e),X(`load`,e);break;case`details`:X(`toggle`,e);break;case`embed`:case`source`:case`link`:X(`error`,e),X(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Fd(e,t,u,r,n,null)}return;default:if(sn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Fd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Fd(e,t,p,m,r,f)}}Xt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Fd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Fd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?$t(e,!!n,n?[]:``,!1):$t(e,!!n,t,!0)):$t(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Fd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Fd(e,t,s,i,r,o)}en(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Fd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Fd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Fd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Fd(e,t,u,p,r,m)}return;default:if(sn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Gd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Kd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e!==qd&&(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[wt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body)}n=i}while(n);Ip(t)}function nf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rf(n),Tt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[wt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tt(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=T.d;T.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=Cu();return e||t}function Sf(e){var t=Dt(e);t!==null&&t.tag===5&&t.type===`form`?Ps(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),At(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),At(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=p({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),At(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=kt(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);At(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=kt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),At(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=kt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),At(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var i=(i=ve.current)?yf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=kt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=kt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=kt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Nf(e){return`href="`+Yt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ld(t,`link`,n),At(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Yt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,At(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),At(r),Ld(r,`style`,i),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Nf(n.href);var o=e.querySelector(Pf(i));if(o)return t.state.loading|=4,t.instance=o,At(o),o;r=Ff(n),(i=_f.get(i))&&Vf(r,i),o=(e.ownerDocument||e).createElement(`link`),At(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(i=e.querySelector(Rf(o)))?(t.instance=i,At(i),i):(r=n,(i=_f.get(o))&&(r=p({},n),Hf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),At(i),Ld(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[wt]||a[_t]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,At(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),At(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:x,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ot(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ot(0),this.hiddenUpdates=ot(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=_i(3,null,null,t),e.current=a,a.stateNode=e,t=ga(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ja(a),e}function ip(e){return e?(e=hi,e):hi}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Xa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Za(e,r,t),n!==null&&(vu(n,e,t),Qa(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=fi(e,67108864);t!==null&&vu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=gu();t=ft(t);var n=fi(e,t);n!==null&&vu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=w.T;w.T=null;var a=T.p;try{T.p=2,pp(e,t,n,r)}finally{T.p=a,w.T=i}}function fp(e,t,n,r){var i=w.T;w.T=null;var a=T.p;try{T.p=8,pp(e,t,n,r)}finally{T.p=a,w.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Ed(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=Dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=tt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Je(o);s.entanglements[1]|=c,o&=~c}ad(a),!(H&6)&&(au=Ie()+500,od(0,!1))}}break;case 31:case 13:s=fi(a,2),s!==null&&vu(s,a,2),Cu(),sp(a,2)}if(a=mp(r),a===null&&Ed(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function mp(e){return e=pn(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=Et(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Le()){case Re:return 2;case ze:return 8;case Be:case Ve:return 32;case He:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Dt(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=Et(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,ht(e.priority,function(){lp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,ht(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);fn=r,n.target.dispatchEvent(r),fn=null}else return t=Dt(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=Dt(n);a!==null&&(e.splice(t,3),t-=3,Ms(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[vt]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[vt]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;ap(n,gu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),Cu(),t[yt]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=mt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.4`)throw Error(a(527,Bp,`19.2.4`));T.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:w,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Ge=Hp.inject(Vp),Ke=Hp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=tc,s=nc,c=rc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,i,s,c,Lp),e[yt]=t.current,wd(e),new Rp(t)}})),lr=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=cr()}))(),ur=`inline-flex w-fit flex-none shrink-0 items-center justify-self-start rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap`,dr={variant:{primary:{classes:`bg-kumo-badge-inverted text-kumo-badge-inverted`,description:`Primary badge`},secondary:{classes:`bg-kumo-fill text-kumo-badge-neutral-subtle`,description:`Secondary badge`},error:{classes:`bg-kumo-danger-tint/60 text-kumo-danger`,description:`Error badge`},warning:{classes:`bg-kumo-warning-tint/70 text-kumo-warning`,description:`Warning badge`},success:{classes:`bg-kumo-success-tint/70 text-kumo-success`,description:`Success badge`},destructive:{classes:`bg-kumo-badge-red text-white`,description:`Deprecated. Use red instead.`},info:{classes:`bg-kumo-info-tint/70 text-kumo-info`,description:`Info badge`},beta:{classes:`border border-dashed border-kumo-brand bg-transparent text-kumo-link`,description:`Indicates beta or experimental features`},outline:{classes:`border border-kumo-fill bg-transparent text-kumo-default`,description:`Bordered badge with transparent background`},red:{classes:`bg-kumo-badge-red text-white`,description:`Red badge`},green:{classes:`bg-kumo-badge-green text-white`,description:`Green badge`},neutral:{classes:`bg-kumo-badge-neutral text-white`,description:`Neutral badge`},orange:{classes:`bg-kumo-badge-orange text-black`,description:`Orange badge`},purple:{classes:`bg-kumo-badge-purple text-white`,description:`Purple badge`},teal:{classes:`bg-kumo-badge-teal text-white`,description:`Teal badge`},"teal-subtle":{classes:`bg-kumo-badge-teal-subtle text-kumo-badge-teal-subtle`,description:`Subtle teal badge`},blue:{classes:`bg-kumo-badge-blue text-white`,description:`Blue badge`}}},fr={variant:`primary`};function pr({variant:e=fr.variant}={}){let t=dr.variant[e];return E(ur,t?.classes??dr.variant[fr.variant].classes)}function mr({variant:e=fr.variant,className:t,children:n}){return(0,D.jsx)(`span`,{className:E(pr({variant:e}),t),children:n})}var hr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M236,137A108.13,108.13,0,1,1,119,20,12,12,0,0,1,121,44,84.12,84.12,0,1,0,212,135,12,12,0,1,1,236,137ZM116,76v52a12,12,0,0,0,12,12h52a12,12,0,0,0,0-24H140V76a12,12,0,0,0-24,0Zm92,20a16,16,0,1,0-16-16A16,16,0,0,0,208,96ZM176,64a16,16,0,1,0-16-16A16,16,0,0,0,176,64Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M232,136.66A104.12,104.12,0,1,1,119.34,24,8,8,0,0,1,120.66,40,88.12,88.12,0,1,0,216,135.34,8,8,0,0,1,232,136.66ZM120,72v56a8,8,0,0,0,8,8h56a8,8,0,0,0,0-16H136V72a8,8,0,0,0-16,0Zm40-24a12,12,0,1,0-12-12A12,12,0,0,0,160,48Zm36,24a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm24,36a12,12,0,1,0-12-12A12,12,0,0,0,220,108Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,96a12,12,0,1,1,12,12A12,12,0,0,1,208,96ZM196,72a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm28.66,56a8,8,0,0,0-8.63,7.31A88.12,88.12,0,1,1,120.66,40,8,8,0,0,0,119.34,24,104.12,104.12,0,1,0,232,136.66,8,8,0,0,0,224.66,128ZM128,56a72,72,0,1,1-72,72A72.08,72.08,0,0,1,128,56Zm-8,72a8,8,0,0,0,8,8h48a8,8,0,0,0,0-16H136V80a8,8,0,0,0-16,0Zm40-80a12,12,0,1,0-12-12A12,12,0,0,0,160,48Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M230,136.49A102.12,102.12,0,1,1,119.51,26a6,6,0,0,1,1,12A90.13,90.13,0,1,0,218,135.51a6,6,0,1,1,12,1ZM122,72v56a6,6,0,0,0,6,6h56a6,6,0,0,0,0-12H134V72a6,6,0,0,0-12,0Zm38-26a10,10,0,1,0-10-10A10,10,0,0,0,160,46Zm36,24a10,10,0,1,0-10-10A10,10,0,0,0,196,70Zm24,36a10,10,0,1,0-10-10A10,10,0,0,0,220,106Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M232,136.66A104.12,104.12,0,1,1,119.34,24,8,8,0,0,1,120.66,40,88.12,88.12,0,1,0,216,135.34,8,8,0,0,1,232,136.66ZM120,72v56a8,8,0,0,0,8,8h56a8,8,0,0,0,0-16H136V72a8,8,0,0,0-16,0Zm40-24a12,12,0,1,0-12-12A12,12,0,0,0,160,48Zm36,24a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm24,36a12,12,0,1,0-12-12A12,12,0,0,0,220,108Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M228,136.33A100.13,100.13,0,1,1,119.67,28a4,4,0,1,1,.66,8A92.13,92.13,0,1,0,220,135.67a4,4,0,1,1,8,.66ZM128,132h56a4,4,0,0,0,0-8H132V72a4,4,0,0,0-8,0v56A4,4,0,0,0,128,132Zm32-88a8,8,0,1,0-8-8A8,8,0,0,0,160,44Zm36,24a8,8,0,1,0-8-8A8,8,0,0,0,196,68Zm24,36a8,8,0,1,0-8-8A8,8,0,0,0,220,104Z`}))]]),gr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM193.15,68,128,127.72,62.85,68ZM44,188V83.28l75.89,69.57a12,12,0,0,0,16.22,0L212,83.28V188Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,56l-96,88L32,56Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48Zm-8,144H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM208.58,62,128,135.86,47.42,62ZM216,194H40a2,2,0,0,1-2-2V69.64l86,78.78a6,6,0,0,0,8.1,0L218,69.64V192A2,2,0,0,1,216,194Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52Zm-10.28,8L128,138.57,42.28,60ZM216,196H40a4,4,0,0,1-4-4V65.09L125.3,147a4,4,0,0,0,5.4,0L220,65.09V192A4,4,0,0,1,216,196Z`}))]]),_r=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M242.15,49.59A12,12,0,0,0,232,44H40a12,12,0,0,0-8.48,20.49L71,104,31.52,143.51A12,12,0,0,0,40,164H167.28l-26.11,54.84a12,12,0,1,0,21.66,10.32l80-168A12,12,0,0,0,242.15,49.59ZM178.71,140H69l27.52-27.52a12,12,0,0,0,0-17L69,68H213Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M232,56l-45.71,96H40l48-48L40,56Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M238.76,51.73A8,8,0,0,0,232,48H40a8,8,0,0,0-5.66,13.66L76.69,104,34.34,146.34A8,8,0,0,0,40,160H173.62l-28.84,60.56a8,8,0,1,0,14.44,6.88l80-168A8,8,0,0,0,238.76,51.73ZM181.23,144H59.31l34.35-34.34a8,8,0,0,0,0-11.32L59.31,64h160Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M239.22,59.44l-45.63,95.82a3.54,3.54,0,0,1-.16.34l-34.21,71.84a8,8,0,1,1-14.44-6.88L173.62,160H40a8,8,0,0,1-5.66-13.66L76.69,104,34.34,61.66A8,8,0,0,1,40,48H232a8,8,0,0,1,7.22,11.44Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M237.07,52.8A6,6,0,0,0,232,50H40a6,6,0,0,0-4.24,10.24L79.51,104,35.76,147.76A6,6,0,0,0,40,158H176.78l-30.2,63.42a6,6,0,0,0,10.84,5.16l80-168A6,6,0,0,0,237.07,52.8ZM182.5,146h-128l37.75-37.76a6,6,0,0,0,0-8.48L54.49,62h168Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M238.76,51.73A8,8,0,0,0,232,48H40a8,8,0,0,0-5.66,13.66L76.69,104,34.34,146.34A8,8,0,0,0,40,160H173.62l-28.84,60.56a8,8,0,1,0,14.44,6.88l80-168A8,8,0,0,0,238.76,51.73ZM181.23,144H59.31l34.35-34.34a8,8,0,0,0,0-11.32L59.31,64h160Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M235.38,53.86A4,4,0,0,0,232,52H40a4,4,0,0,0-2.83,6.83L82.34,104,37.17,149.17A4,4,0,0,0,40,156H180l-31.56,66.28a4,4,0,0,0,1.89,5.33A3.92,3.92,0,0,0,152,228a4,4,0,0,0,3.61-2.28l80-168A4,4,0,0,0,235.38,53.86ZM183.76,148H49.66l41.17-41.17a4,4,0,0,0,0-5.66L49.66,60h176Z`}))]]),vr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64ZM160,216H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Z`}))]]),yr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),br=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M96,40l33.52,88H56Zm104,88H129.52L160,208Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z`}))]]),xr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z`}))]]),Sr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M248,160a40,40,0,1,0-52.64,37.94A28,28,0,0,1,168,220H144a28,28,0,0,1-28-28V154.9c31.73-5.78,56-34.09,56-67.73V40a12,12,0,0,0-12-12H136a12,12,0,0,0,0,24h12V87.17c0,24.4-19.47,44.52-43.41,44.83A44,44,0,0,1,60,88V52H72a12,12,0,0,0,0-24H48A12,12,0,0,0,36,40V88a68,68,0,0,0,56,66.93V192a52.06,52.06,0,0,0,52,52h24a52.06,52.06,0,0,0,51.61-45.72A40.08,40.08,0,0,0,248,160Zm-40,16a16,16,0,1,1,16-16A16,16,0,0,1,208,176Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M240,160a32,32,0,1,1-32-32A32,32,0,0,1,240,160Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M220,160a12,12,0,1,1-12-12A12,12,0,0,1,220,160Zm-4.55,39.29A48.08,48.08,0,0,1,168,240H144a48.05,48.05,0,0,1-48-48V151.49A64,64,0,0,1,40,88V40a8,8,0,0,1,8-8H72a8,8,0,0,1,0,16H56V88a48,48,0,0,0,48.64,48c26.11-.34,47.36-22.25,47.36-48.83V48H136a8,8,0,0,1,0-16h24a8,8,0,0,1,8,8V87.17c0,32.84-24.53,60.29-56,64.31V192a32,32,0,0,0,32,32h24a32.06,32.06,0,0,0,31.22-25,40,40,0,1,1,16.23.27ZM232,160a24,24,0,1,0-24,24A24,24,0,0,0,232,160Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M240,160a32,32,0,1,0-39.93,31,8,8,0,0,0-.07,1,32,32,0,0,1-32,32H144a32,32,0,0,1-32-32V151.48c31.47-4,56-31.47,56-64.31V40a8,8,0,0,0-8-8H136a8,8,0,0,0,0,16h16V87.17c0,26.58-21.25,48.49-47.36,48.83A48,48,0,0,1,56,88V48H72a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V88a64,64,0,0,0,56,63.49V192a48.05,48.05,0,0,0,48,48h24a48.05,48.05,0,0,0,48-48,8,8,0,0,0-.07-1A32,32,0,0,0,240,160Zm-32,8a8,8,0,1,1,8-8A8,8,0,0,1,208,168Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M218,160a10,10,0,1,1-10-10A10,10,0,0,1,218,160Zm-4.35,37.58A46.05,46.05,0,0,1,168,238H144a46.06,46.06,0,0,1-46-46V149.71A62,62,0,0,1,42,88V40a6,6,0,0,1,6-6H72a6,6,0,0,1,0,12H54V88a50,50,0,0,0,50,50h.67c27.2-.36,49.33-23.16,49.33-50.83V46H136a6,6,0,0,1,0-12h24a6,6,0,0,1,6,6V87.17c0,32.43-24.68,59.44-56,62.52V192a34,34,0,0,0,34,34h24a34.05,34.05,0,0,0,33.56-28.56,38,38,0,1,1,12.09.14ZM234,160a26,26,0,1,0-26,26A26,26,0,0,0,234,160Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M220,160a12,12,0,1,1-12-12A12,12,0,0,1,220,160Zm-4.55,39.29A48.08,48.08,0,0,1,168,240H144a48.05,48.05,0,0,1-48-48V151.49A64,64,0,0,1,40,88V40a8,8,0,0,1,8-8H72a8,8,0,0,1,0,16H56V88a48,48,0,0,0,48.64,48c26.11-.34,47.36-22.25,47.36-48.83V48H136a8,8,0,0,1,0-16h24a8,8,0,0,1,8,8V87.17c0,32.84-24.53,60.29-56,64.31V192a32,32,0,0,0,32,32h24a32.06,32.06,0,0,0,31.22-25,40,40,0,1,1,16.23.27ZM232,160a24,24,0,1,0-24,24A24,24,0,0,0,232,160Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,160a8,8,0,1,1-8-8A8,8,0,0,1,216,160Zm-4.17,35.79A44.06,44.06,0,0,1,168,236H144a44.05,44.05,0,0,1-44-44V147.85A60,60,0,0,1,44,88V40a4,4,0,0,1,4-4H72a4,4,0,0,1,0,8H52V88a52,52,0,0,0,52.69,52C133,139.63,156,115.93,156,87.17V44H136a4,4,0,0,1,0-8h24a4,4,0,0,1,4,4V87.17c0,32-24.84,58.59-56,60.69V192a36,36,0,0,0,36,36h24a36.05,36.05,0,0,0,35.8-32.25,36,36,0,1,1,8,0ZM236,160a28,28,0,1,0-28,28A28,28,0,0,0,236,160Z`}))]]),Cr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),wr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,44H32A12,12,0,0,0,20,56V192a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A12,12,0,0,0,224,44ZM44,116H76v24H44Zm56,0H212v24H100ZM212,68V92H44V68ZM44,164H76v24H44Zm56,24V164H212v24Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M88,104v96H32V104Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM216,64V96H40V64ZM40,160H80v32H40Zm176,32H96V160H216v32Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM40,160H80v32H40Zm176,32H96V160H216v32Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,50H32a6,6,0,0,0-6,6V192a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A6,6,0,0,0,224,50ZM38,110H82v36H38Zm56,0H218v36H94ZM218,62V98H38V62ZM38,192V158H82v36H40A2,2,0,0,1,38,192Zm178,2H94V158H218v34A2,2,0,0,1,216,194Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM40,112H80v32H40Zm56,0H216v32H96ZM216,64V96H40V64ZM40,160H80v32H40Zm176,32H96V160H216v32Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,52H32a4,4,0,0,0-4,4V192a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A4,4,0,0,0,224,52ZM36,108H84v40H36Zm56,0H220v40H92ZM220,60v40H36V60ZM36,192V156H84v40H40A4,4,0,0,1,36,192Zm180,4H92V156H220v36A4,4,0,0,1,216,196Z`}))]]),Tr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M120,137,48,201A12,12,0,1,1,32,183l61.91-55L32,73A12,12,0,1,1,48,55l72,64A12,12,0,0,1,120,137Zm96,43H120a12,12,0,0,0,0,24h96a12,12,0,0,0,0-24Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,80V192H40V64H200A16,16,0,0,1,216,80Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM77.66,173.66a8,8,0,0,1-11.32-11.32L100.69,128,66.34,93.66A8,8,0,0,1,77.66,82.34l40,40a8,8,0,0,1,0,11.32ZM192,176H128a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M116,132.48l-72,64a6,6,0,0,1-8-9L103,128,36,68.49a6,6,0,0,1,8-9l72,64a6,6,0,0,1,0,9ZM216,186H120a6,6,0,0,0,0,12h96a6,6,0,0,0,0-12Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M116,128a4,4,0,0,1-1.34,3l-72,64a4,4,0,1,1-5.32-6L106,128,37.34,67a4,4,0,0,1,5.32-6l72,64A4,4,0,0,1,116,128Zm100,60H120a4,4,0,0,0,0,8h96a4,4,0,0,0,0-8Z`}))]]),Er=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:hr}));Er.displayName=`ClockCountdownIcon`;var Dr=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:gr}));Dr.displayName=`EnvelopeSimpleIcon`;var Or=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:_r}));Or.displayName=`FlagBannerIcon`;var kr=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:vr}));kr.displayName=`MonitorIcon`;var Ar=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:yr}));Ar.displayName=`MoonIcon`;var jr=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:br}));jr.displayName=`PulseIcon`;var Mr=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:xr}));Mr.displayName=`SidebarSimpleIcon`;var Nr=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:Sr}));Nr.displayName=`StethoscopeIcon`;var Pr=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:Cr}));Pr.displayName=`SunIcon`;var Fr=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:wr}));Fr.displayName=`TableIcon`;var Ir=O.forwardRef((e,t)=>O.createElement(be,{ref:t,...e,weights:Tr}));Ir.displayName=`TerminalIcon`;function Lr(e={}){return E(`flex w-full flex-col overflow-hidden rounded-lg bg-kumo-elevated text-base ring ring-kumo-line`)}function Rr({children:e,className:t}){return(0,D.jsx)(`div`,{className:E(Lr(),t),children:e})}function zr({children:e,className:t}){return(0,D.jsx)(`div`,{className:E(`flex items-center gap-2 p-4 text-base font-medium text-kumo-strong -my-2 bg-kumo-elevated`,t),children:e})}function Br({children:e,className:t}){return(0,D.jsx)(`div`,{className:E(`relative flex flex-col gap-2 overflow-hidden rounded-lg bg-kumo-base p-4 pr-3 text-inherit no-underline ring ring-kumo-fill`,t),children:e})}var Vr=Object.assign(Rr,{Primary:Br,Secondary:zr}),Hr=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Ur=(e,t)=>(Math.random()*(t-e)+e).toFixed(2),Wr=({minWidth:e=30,maxWidth:t=100,minDuration:n=1.3,maxDuration:r=1.7,minDelay:i=0,maxDelay:a=.5,blockHeight:o,className:s})=>{let{width:c,duration:l,delay:u}=(0,O.useMemo)(()=>({width:Hr(e,t),duration:Ur(n,r),delay:Ur(i,a)}),[e,t,n,r,i,a]),d={"--skeleton-width":`${c}%`,"--shimmer-duration":`${l}s`,"--shimmer-delay":`${u}s`},f=(0,D.jsx)(`div`,{className:E(`skeleton-line`,s),style:d});if(o!==void 0){let e=typeof o==`number`?`${o}px`:o;return(0,D.jsx)(`div`,{className:`flex items-center`,style:{height:e},children:f})}return f},Gr=O.forwardRef((e,t)=>{let{alt:n,color:r=`currentColor`,size:i=`1em`,weight:a=`regular`,mirrored:o=!1,children:s,weights:c,...l}=e;return O.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i,height:i,fill:r,viewBox:`0 0 256 256`,transform:o?`scale(-1, 1)`:void 0,...l},!!n&&O.createElement(`title`,null,n),s,c.get(a))});Gr.displayName=`SSRBase`;var Kr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),qr=O.forwardRef((e,t)=>O.createElement(Gr,{ref:t,...e,weights:Kr}));qr.displayName=`CheckCircleIcon`;var Jr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),Yr=O.forwardRef((e,t)=>O.createElement(Gr,{ref:t,...e,weights:Jr}));Yr.displayName=`InfoIcon`;var Xr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z`}))]]),Zr=O.forwardRef((e,t)=>O.createElement(Gr,{ref:t,...e,weights:Xr}));Zr.displayName=`WarningIcon`;var Qr=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M116,132V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0ZM236,91.55v72.9a19.86,19.86,0,0,1-5.86,14.14l-51.55,51.55A19.85,19.85,0,0,1,164.45,236H91.55a19.85,19.85,0,0,1-14.14-5.86L25.86,178.59A19.86,19.86,0,0,1,20,164.45V91.55a19.86,19.86,0,0,1,5.86-14.14L77.41,25.86A19.85,19.85,0,0,1,91.55,20h72.9a19.85,19.85,0,0,1,14.14,5.86l51.55,51.55A19.86,19.86,0,0,1,236,91.55Zm-24,1.66L162.79,44H93.21L44,93.21v69.58L93.21,212h69.58L212,162.79ZM128,156a16,16,0,1,0,16,16A16,16,0,0,0,128,156Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M224,91.55v72.9a8,8,0,0,1-2.34,5.66l-51.55,51.55a8,8,0,0,1-5.66,2.34H91.55a8,8,0,0,1-5.66-2.34L34.34,170.11A8,8,0,0,1,32,164.45V91.55a8,8,0,0,1,2.34-5.66L85.89,34.34A8,8,0,0,1,91.55,32h72.9a8,8,0,0,1,5.66,2.34l51.55,51.55A8,8,0,0,1,224,91.55Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M227.31,80.23,175.77,28.69A16.13,16.13,0,0,0,164.45,24H91.55a16.13,16.13,0,0,0-11.32,4.69L28.69,80.23A16.13,16.13,0,0,0,24,91.55v72.9a16.13,16.13,0,0,0,4.69,11.32l51.54,51.54A16.13,16.13,0,0,0,91.55,232h72.9a16.13,16.13,0,0,0,11.32-4.69l51.54-51.54A16.13,16.13,0,0,0,232,164.45V91.55A16.13,16.13,0,0,0,227.31,80.23ZM120,80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M122,136V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0ZM230,91.55v72.9a13.92,13.92,0,0,1-4.1,9.9L174.35,225.9a13.92,13.92,0,0,1-9.9,4.1H91.55a13.92,13.92,0,0,1-9.9-4.1L30.1,174.35a13.92,13.92,0,0,1-4.1-9.9V91.55a13.92,13.92,0,0,1,4.1-9.9L81.65,30.1a13.92,13.92,0,0,1,9.9-4.1h72.9a13.92,13.92,0,0,1,9.9,4.1L225.9,81.65A13.92,13.92,0,0,1,230,91.55Zm-12,0a2,2,0,0,0-.59-1.42L165.87,38.59a2,2,0,0,0-1.42-.59H91.55a2,2,0,0,0-1.41.59L38.58,90.13A2,2,0,0,0,38,91.55v72.9a2,2,0,0,0,.59,1.42l51.54,51.54a2,2,0,0,0,1.42.59h72.9a2,2,0,0,0,1.41-.59l51.56-51.54a2,2,0,0,0,.58-1.42ZM128,162a10,10,0,1,0,10,10A10,10,0,0,0,128,162Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M124,136V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0ZM228,91.55v72.9a12,12,0,0,1-3.51,8.49l-51.55,51.55a12,12,0,0,1-8.49,3.51H91.55a12,12,0,0,1-8.49-3.51L31.51,172.94A12,12,0,0,1,28,164.45V91.55a12,12,0,0,1,3.51-8.49L83.06,31.51A12,12,0,0,1,91.55,28h72.9a12,12,0,0,1,8.49,3.51l51.55,51.55A12,12,0,0,1,228,91.55Zm-8,0a4,4,0,0,0-1.17-2.83L167.28,37.17A4.06,4.06,0,0,0,164.45,36H91.55a4.06,4.06,0,0,0-2.83,1.17L37.17,88.72A4,4,0,0,0,36,91.55v72.9a4,4,0,0,0,1.17,2.83l51.55,51.55A4.06,4.06,0,0,0,91.55,220h72.9a4.06,4.06,0,0,0,2.83-1.17l51.55-51.55a4,4,0,0,0,1.17-2.83ZM128,164a8,8,0,1,0,8,8A8,8,0,0,0,128,164Z`}))]]),$r=O.forwardRef((e,t)=>O.createElement(Gr,{ref:t,...e,weights:Qr}));$r.displayName=`WarningOctagonIcon`;var ei=new Map([[`bold`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),O.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,O.createElement(O.Fragment,null,O.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),ti=O.forwardRef((e,t)=>O.createElement(Gr,{ref:t,...e,weights:ei}));ti.displayName=`XIcon`;var ni={variant:{default:{classes:`border-kumo-fill bg-kumo-base`,description:`Default toast style`},success:{classes:`ring-[0.3px] ring-kumo-success bg-kumo-base [&_[data-toast-icon]]:text-kumo-success [&_[data-toast-title]]:text-kumo-success`,description:`Success toast for confirmations and positive outcomes`,icon:qr},error:{classes:`ring-[0.3px] ring-kumo-danger bg-kumo-base [&_[data-toast-icon]]:text-kumo-danger [&_[data-toast-title]]:text-kumo-danger`,description:`Error toast for critical issues`,icon:$r},warning:{classes:`ring-[0.3px] ring-kumo-warning bg-kumo-base [&_[data-toast-icon]]:text-kumo-warning [&_[data-toast-title]]:text-kumo-warning`,description:`Warning toast for cautionary messages`,icon:Zr},info:{classes:`ring-[0.3px] ring-kumo-info bg-kumo-control [&_[data-toast-icon]]:text-kumo-info [&_[data-toast-title]]:text-kumo-info`,description:`Info toast for neutral informational messages`,icon:Yr}}},ri={variant:`default`};function ii({variant:e=ri.variant}={}){return E(`rounded-xl ring ring-kumo-hairline bg-clip-padding p-4 shadow-lg`,ni.variant[e].classes)}function ai(e){return{...e,add:t=>{if(t.id){let n=e.toasts;if(n){let r=n.find(e=>e.id===t.id);if(r&&r.transitionStatus!==`ending`)return e.update(t.id,{bump:!1}),requestAnimationFrame(()=>{e.update(t.id,{bump:!0,...t.timeout!==void 0&&{timeout:t.timeout}})}),t.id;if(r&&r.transitionStatus===`ending`)return t.id}}return e.add({...t})},update:(t,n)=>e.update(t,{...n}),promise:(t,n)=>e.promise(t,{loading:{...n.loading},success:typeof n.success==`function`?e=>({...n.success(e)}):{...n.success},error:typeof n.error==`function`?e=>({...n.error(e)}):{...n.error}})}}var oi=()=>{let e=Se();return{...ai(e),toasts:e.toasts}};function si({children:e,container:t}){let n=Ue();return(0,D.jsxs)(Be,{children:[e,(0,D.jsx)(Me,{container:t??n??void 0,children:(0,D.jsx)(xe,{className:`fixed top-auto right-4 bottom-4 z-1 mx-auto flex w-[calc(100%-2rem)] sm:right-8 sm:bottom-8 sm:w-[340px]`,children:(0,D.jsx)(ci,{})})})]})}function ci(){let{toasts:e}=oi();return e.map(e=>(0,D.jsxs)(Ve,{toast:e,className:E(`absolute right-0 bottom-0 left-auto z-[calc(1000-var(--toast-index))] mr-0 h-[var(--height)] w-full origin-bottom select-none`,ii({variant:e.variant}),`[--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))]`,`[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s]`,`after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']`,`data-[ending-style]:opacity-0 data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--offset-y)))] data-[limited]:opacity-0 data-[starting-style]:[transform:translateY(150%)]`,`data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+150%))]`,`data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))]`,`data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-[expanded]:data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))]`,`data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))] data-[expanded]:data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y)-150%))]`,`[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(150%)]`,e.bump&&`animate-toast-bump`),children:[(0,D.jsx)(ui,{variant:e.variant}),(0,D.jsxs)(Re,{className:`isolate flex flex-col gap-1 transition-opacity [transition-duration:250ms] data-[behind]:pointer-events-none data-[behind]:opacity-0 data-[expanded]:pointer-events-auto data-[expanded]:opacity-100`,children:[e.content??(0,D.jsx)(D.Fragment,{children:(0,D.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,D.jsx)(di,{variant:e.variant}),(0,D.jsxs)(`div`,{className:`flex flex-col gap-1 overflow-hidden`,children:[(0,D.jsx)(we,{"data-toast-title":!0,className:`text-[0.975rem] leading-5 font-medium text-kumo-default`}),(0,D.jsx)(Te,{className:`text-[0.925rem] leading-5 text-kumo-subtle`}),!!e.actions&&(0,D.jsx)(`div`,{className:`mt-2 flex min-w-0 flex-nowrap gap-2 overflow-x-auto p-px`,children:e.actions.map((e,t)=>(0,D.jsx)(We,{...e},t))})]})]})}),(0,D.jsx)(Fe,{className:`absolute top-2 right-2 flex h-4 w-4 items-center justify-center rounded border-none bg-transparent text-current/50 hover:bg-kumo-contrast/10 hover:text-current`,"aria-label":`Close`,children:(0,D.jsx)(ti,{className:`h-3 w-3`})})]})]},e.id))}var li={success:`bg-kumo-success/5`,error:`bg-kumo-danger/5`,warning:`bg-kumo-warning/5`,info:`bg-kumo-info/5`};function ui({variant:e}){let t=e&&li[e];return(0,D.jsx)(`div`,{className:E(`absolute inset-0 rounded-[11px] bg-kumo-base/90`,t)})}function di({variant:e}){if(!e||e==="default")return null;let t=ni.variant[e];if(!(`icon`in t))return null;let n=t.icon;return(0,D.jsx)(n,{"data-toast-icon":!0,className:`mt-0.5 h-4 w-4 shrink-0`,weight:`fill`})}var fi=`#F48120`,pi=`#FAAD3F`,mi=`0 0 49 22`,hi=`0 0 101.4 33.5`,gi={variant:`full`,color:`color`},_i=(0,O.forwardRef)(({variant:e=gi.variant,color:t=gi.color,className:n,...r},i)=>{let a=e===`glyph`,o=t===`color`?fi:`currentColor`,s=t===`color`?pi:`currentColor`;return a?(0,D.jsxs)(`svg`,{ref:i,viewBox:mi,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,role:`img`,"aria-label":`Cloudflare logo`,className:E(t===`white`&&`text-white`,t===`black`&&`text-black`,n),...r,children:[(0,D.jsx)(`path`,{d:`M33.204 20.4C33.3649 19.9741 33.4217 19.5159 33.3695 19.0636C33.3173 18.6113 33.1577 18.1781 32.904 17.8C32.6435 17.4876 32.3239 17.2297 31.9636 17.0409C31.6032 16.8522 31.2092 16.7363 30.804 16.7L13.404 16.5C13.304 16.5 13.204 16.4 13.104 16.4C13.0808 16.3825 13.0618 16.3599 13.0488 16.3339C13.0358 16.3078 13.029 16.2791 13.029 16.25C13.029 16.2209 13.0358 16.1922 13.0488 16.1662C13.0618 16.1401 13.0808 16.1175 13.104 16.1C13.204 15.9 13.304 15.8 13.504 15.8L31.004 15.6C32.115 15.4767 33.1731 15.0597 34.0695 14.3918C34.9659 13.7239 35.6681 12.8293 36.104 11.8L37.104 9.20002C37.104 9.10002 37.204 9.00001 37.104 8.90001C36.5604 6.47843 35.2411 4.30052 33.3466 2.69721C31.4521 1.09391 29.086 0.152865 26.6079 0.0170769C24.1298 -0.118712 21.675 0.558179 19.6167 1.94489C17.5584 3.33161 16.009 5.35233 15.204 7.70002C14.159 6.95365 12.8843 6.59957 11.604 6.70002C10.4291 6.83102 9.33369 7.35777 8.49774 8.19372C7.66179 9.02966 7.13505 10.1251 7.00404 11.3C6.93745 11.9014 6.97125 12.5097 7.10404 13.1C5.20298 13.1526 3.39743 13.9448 2.07147 15.3081C0.745511 16.6714 0.00377461 18.4982 0.00403983 20.4C-0.0123708 20.7695 0.0212659 21.1395 0.104038 21.5C0.10863 21.5781 0.141713 21.6517 0.19701 21.707C0.252307 21.7623 0.325975 21.7954 0.404041 21.8H32.504C32.704 21.8 32.904 21.7 32.904 21.5L33.204 20.4Z`,fill:o}),(0,D.jsx)(`path`,{d:`M38.704 9.20002H38.204C38.104 9.20002 38.004 9.30001 37.904 9.40001L37.204 11.8C37.0431 12.2259 36.9864 12.6841 37.0386 13.1364C37.0908 13.5887 37.2504 14.0219 37.504 14.4C37.7646 14.7124 38.0842 14.9704 38.4445 15.1591C38.8049 15.3479 39.1989 15.4637 39.604 15.5L43.304 15.7C43.404 15.7 43.504 15.8 43.604 15.8C43.6273 15.8175 43.6462 15.8401 43.6592 15.8662C43.6723 15.8922 43.679 15.9209 43.679 15.95C43.679 15.9791 43.6723 16.0078 43.6592 16.0339C43.6462 16.0599 43.6273 16.0826 43.604 16.1C43.504 16.3 43.404 16.4 43.204 16.4L39.404 16.6C38.293 16.7233 37.2349 17.1403 36.3386 17.8082C35.4422 18.4761 34.74 19.3707 34.304 20.4L34.104 21.3C34.004 21.4 34.104 21.6 34.304 21.6H47.504C47.5448 21.6058 47.5863 21.6021 47.6254 21.5891C47.6644 21.5761 47.6999 21.5541 47.729 21.525C47.7581 21.4959 47.7801 21.4604 47.7931 21.4214C47.8061 21.3823 47.8099 21.3408 47.804 21.3C48.0421 20.4527 48.1764 19.5797 48.204 18.7C48.1882 16.1854 47.1822 13.7782 45.404 12C43.6259 10.2218 41.2187 9.21587 38.704 9.20002Z`,fill:s})]}):(0,D.jsxs)(`svg`,{ref:i,viewBox:hi,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,role:`img`,"aria-label":`Cloudflare logo`,className:E(t===`color`&&`text-kumo-default`,t===`white`&&`text-white`,t===`black`&&`text-black`,n),...r,children:[(0,D.jsx)(`path`,{d:`M84.2,20.4a2.85546,2.85546,0,0,0-.3-2.6,3.09428,3.09428,0,0,0-2.1-1.1l-17.4-.2c-.1,0-.2-.1-.3-.1a.1875.1875,0,0,1,0-.3c.1-.2.2-.3.4-.3L82,15.6a6.29223,6.29223,0,0,0,5.1-3.8l1-2.6c0-.1.1-.2,0-.3A11.39646,11.39646,0,0,0,66.2,7.7a5.45941,5.45941,0,0,0-3.6-1A5.20936,5.20936,0,0,0,58,11.3a5.46262,5.46262,0,0,0,.1,1.8A7.30177,7.30177,0,0,0,51,20.4a4.102,4.102,0,0,0,.1,1.1.3193.3193,0,0,0,.3.3H83.5c.2,0,.4-.1.4-.3Z`,fill:o}),(0,D.jsx)(`path`,{d:`M89.7,9.2h-.5c-.1,0-.2.1-.3.2l-.7,2.4a2.85546,2.85546,0,0,0,.3,2.6,3.09428,3.09428,0,0,0,2.1,1.1l3.7.2c.1,0,.2.1.3.1a.1875.1875,0,0,1,0,.3c-.1.2-.2.3-.4.3l-3.8.2a6.29223,6.29223,0,0,0-5.1,3.8l-.2.9c-.1.1,0,.3.2.3H98.5a.26517.26517,0,0,0,.3-.3,10.87184,10.87184,0,0,0,.4-2.6,9.56045,9.56045,0,0,0-9.5-9.5`,fill:s}),(0,D.jsx)(`path`,{d:`M100.5,27.2a.9.9,0,1,1,.9-.9.89626.89626,0,0,1-.9.9m0-1.6a.7.7,0,1,0,.7.7.68354.68354,0,0,0-.7-.7m.4,1.2h-.2l-.2-.3h-.2v.3h-.2v-.9h.5a.26517.26517,0,0,1,.3.3c0,.1-.1.2-.2.3l.2.3Zm-.3-.5c.1,0,.1,0,.1-.1a.09794.09794,0,0,0-.1-.1h-.3v.3h.3Zm-89.7-.9h2.2v6h3.8v1.9h-6Zm8.3,3.9a4.10491,4.10491,0,0,1,4.3-4.1,4.02,4.02,0,0,1,4.2,4.1,4.10491,4.10491,0,0,1-4.3,4.1,4.07888,4.07888,0,0,1-4.2-4.1m6.3,0a2.05565,2.05565,0,0,0-2-2.2,2.1025,2.1025,0,0,0,0,4.2c1.2.2,2-.8,2-2m4.9.5V25.4h2.2v4.4c0,1.1.6,1.7,1.5,1.7a1.39926,1.39926,0,0,0,1.5-1.6V25.4h2.2v4.4c0,2.6-1.5,3.7-3.7,3.7-2.3-.1-3.7-1.2-3.7-3.7m10.7-4.4h3.1c2.8,0,4.5,1.6,4.5,3.9s-1.7,4-4.5,4h-3V25.4Zm3.1,5.9a2.00909,2.00909,0,1,0,0-4h-.9v4Zm7.6-5.9h6.3v1.9H54v1.3h3.7v1.8H54v2.9H51.8Zm9.4,0h2.2v6h3.8v1.9h-6Zm11.7-.1h2.2l3.4,8H76.1l-.6-1.4H72.4l-.6,1.4H69.5Zm2,4.9L74,28l-.9,2.2Zm6.4-4.8H85a3.41818,3.41818,0,0,1,2.6.9,2.62373,2.62373,0,0,1-.9,4.2l1.9,2.8H86.1l-1.6-2.4h-1v2.4H81.3Zm3.6,3.8c.7,0,1.2-.4,1.2-.9,0-.6-.5-.9-1.2-.9H83.5v1.9h1.4Zm6.5-3.8h6.4v1.8H93.6v1.2h3.8v1.8H93.6v1.2h4.3v1.9H91.4ZM6.1,30.3a1.97548,1.97548,0,0,1-1.8,1.2,2.1025,2.1025,0,0,1,0-4.2,2.0977,2.0977,0,0,1,1.9,1.3H8.5a4.13459,4.13459,0,0,0-4.2-3.3A4.1651,4.1651,0,0,0,0,29.4a4.07888,4.07888,0,0,0,4.2,4.1,4.31812,4.31812,0,0,0,4.2-3.2Z`,fill:`currentColor`})]})});_i.displayName=`CloudflareLogo`;var vi=(0,O.forwardRef)(({color:e=`color`,href:t=`https://www.cloudflare.com`,className:n,...r},i)=>(0,D.jsxs)(`a`,{ref:i,href:t,target:`_blank`,rel:`noopener noreferrer`,className:E(`inline-flex items-center gap-2 rounded-lg py-2 pl-2.5 pr-3 text-sm font-medium`,`ring-1 ring-inset transition-all hover:shadow-sm`,e===`color`&&`bg-kumo-base text-kumo-default ring-kumo-line`,e===`black`&&`bg-white text-black ring-black/20`,e===`white`&&`bg-black text-white ring-white/20`,n),...r,children:[(0,D.jsx)(_i,{variant:`glyph`,color:e,className:`h-4 w-auto`}),(0,D.jsxs)(`span`,{children:[`Powered by `,(0,D.jsx)(`span`,{className:`font-semibold`,children:`Cloudflare`})]})]}));vi.displayName=`PoweredByCloudflare`;var yi={variant:`sidebar`,collapsible:`icon`,side:`left`},bi=`16rem`,xi=`3rem`;function Si(){let[e,t]=(0,O.useState)(!1);return(0,O.useEffect)(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>t(e.matches);return e.addEventListener(`change`,n),t(e.matches),()=>e.removeEventListener(`change`,n)},[]),e}var Ci=(0,O.createContext)(null);function wi(){let e=(0,O.useContext)(Ci);if(!e)throw Error(`useSidebar must be used within a Sidebar.Provider`);return e}var Ti=256,Ei=200,Di=480;function Oi({defaultOpen:e=!0,open:t,onOpenChange:n,variant:r=yi.variant,side:i=yi.side,collapsible:a=yi.collapsible,resizable:o=!1,defaultWidth:s=Ti,minWidth:c=Ei,maxWidth:l=Di,onWidthChange:u,children:d,className:f,style:p}){let m=Si(),[h,g]=(0,O.useState)(!1),[_,v]=(0,O.useState)(s),[y,b]=(0,O.useState)(!1),x=(0,O.useCallback)(e=>{let t=Math.min(l,Math.max(c,e));v(t),u?.(t)},[c,l,u]),[S,ee]=(0,O.useState)(e),te=t??S,ne=(0,O.useCallback)(e=>{let t=typeof e==`function`?e(te):e;n?.(t),ee(t)},[n,te]),C=(0,O.useCallback)(()=>{m?g(e=>!e):ne(e=>!e)},[m,ne]),re=te?`expanded`:`collapsed`,ie=o?`${_}px`:bi,ae=(0,O.useMemo)(()=>({state:re,open:te,setOpen:ne,openMobile:h,setOpenMobile:g,isMobile:m,toggleSidebar:C,variant:r,side:i,collapsible:a,width:_,resizable:o,minWidth:c,maxWidth:l,isResizing:y,setIsResizing:b,setWidth:x}),[re,te,ne,h,g,m,C,r,i,a,_,o,c,l,y,b,x]);return(0,D.jsx)(Ci.Provider,{value:ae,children:(0,D.jsx)(`div`,{"data-sidebar-wrapper":``,"data-state":re,"data-side":i,style:{"--sidebar-width":ie,"--sidebar-width-icon":xi,...p},className:E(`group/sidebar-wrapper flex min-h-svh w-full`,`has-data-[variant=inset]:bg-kumo-recessed`,y&&`select-none`,f),children:d})})}Oi.displayName=`Sidebar.Provider`;var ki=(0,O.forwardRef)(({className:e,children:t,...n},r)=>{let{state:i,isMobile:a,openMobile:o,setOpenMobile:s,side:c,variant:l,collapsible:u,isResizing:d,resizable:f,width:p}=wi();if(u===`none`)return(0,D.jsx)(`aside`,{ref:r,"data-state":`expanded`,"data-side":c,"data-variant":l,"data-sidebar":`sidebar`,style:{width:`var(--sidebar-width)`,minWidth:`var(--sidebar-width)`,maxWidth:`var(--sidebar-width)`},className:E(`relative flex h-full shrink-0 grow-0 flex-col overflow-hidden bg-kumo-base text-kumo-default`,l===`sidebar`&&(c===`left`?`border-r border-kumo-line`:`border-l border-kumo-line`),l===`floating`&&`m-2 rounded-lg border border-kumo-line shadow-lg`,e),...n,children:t});if(a)return(0,D.jsx)(De,{open:o,onOpenChange:s,children:(0,D.jsxs)(Ae,{children:[(0,D.jsx)(Ne,{className:`fixed inset-0 z-50 bg-black/50 transition-opacity duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0`}),(0,D.jsx)(je,{className:E(`fixed inset-y-0 z-50 flex w-[--sidebar-width] flex-col bg-kumo-base p-0`,`duration-200 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0`,c===`left`&&`left-0 data-[ending-style]:-translate-x-full data-[starting-style]:-translate-x-full`,c===`right`&&`right-0 data-[ending-style]:translate-x-full data-[starting-style]:translate-x-full`),style:{"--sidebar-width":bi,transitionProperty:`transform, opacity`,transitionTimingFunction:`var(--default-transition-timing-function)`},children:(0,D.jsx)(`div`,{"data-sidebar":`sidebar`,"data-mobile":`true`,className:E(`flex h-full w-full flex-col bg-kumo-base text-kumo-default`,e),children:t})})]})});let m=u===`icon`?`var(--sidebar-width-icon)`:`0px`,h=f?`${p}px`:`var(--sidebar-width)`;return(0,D.jsx)(`aside`,{ref:r,"data-state":i,"data-side":c,"data-variant":l,"data-collapsible":u,"data-sidebar":`sidebar`,style:{width:i===`expanded`?h:m},className:E(`group/sidebar relative flex h-full shrink-0 grow-0 flex-col`,`min-w-0 overflow-hidden whitespace-nowrap`,`bg-kumo-base text-kumo-default`,`transition-[width] duration-250 ease-[cubic-bezier(0.77,0,0.175,1)] will-change-[width]`,`motion-reduce:transition-none`,d&&`transition-none!`,l===`sidebar`&&(c===`left`?`border-r border-kumo-line`:`border-l border-kumo-line`),l===`floating`&&`m-2 rounded-lg border border-kumo-line shadow-lg`,e),...n,children:(0,D.jsx)(Ie,{children:t})})});ki.displayName=`Sidebar`;var Ai=(0,O.forwardRef)(({className:e,...t},n)=>(0,D.jsx)(`div`,{ref:n,"data-sidebar":`header`,className:E(`flex items-center gap-2 border-b border-kumo-line px-2 py-3`,`overflow-hidden`,`group-data-[state=collapsed]/sidebar:border-b-0`,e),...t}));Ai.displayName=`Sidebar.Header`;var ji=(0,O.forwardRef)(({className:e,...t},n)=>(0,D.jsx)(`div`,{ref:n,"data-sidebar":`content`,className:E(`flex min-w-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden px-2 py-2`,`group-data-[state=collapsed]/sidebar:gap-0 group-data-[state=collapsed]/sidebar:py-0`,`group-data-[state=collapsed]/sidebar:overflow-x-hidden`,e),...t}));ji.displayName=`Sidebar.Content`;var Mi=(0,O.forwardRef)(({className:e,...t},n)=>(0,D.jsx)(`div`,{ref:n,"data-sidebar":`footer`,className:E(`flex min-w-0 flex-col gap-2 border-t border-kumo-line px-2 py-2`,`group-data-[state=collapsed]/sidebar:border-t-0 group-data-[state=collapsed]/sidebar:py-1`,e),...t}));Mi.displayName=`Sidebar.Footer`;var Ni=(0,O.createContext)({isCollapsible:!1,isOpen:!0}),Pi=(0,O.forwardRef)(({className:e,collapsible:t=!1,defaultOpen:n=!0,open:r,onOpenChange:i,children:a,...o},s)=>{let[c,l]=(0,O.useState)(n),u=r??c,d=(0,O.useCallback)(e=>{l(e),i?.(e)},[i]),f=(0,O.useMemo)(()=>({isCollapsible:t,isOpen:u}),[t,u]),p=(0,D.jsx)(`div`,{ref:s,"data-sidebar":`group`,className:E(`flex min-w-0 flex-col gap-0.5`,`group-data-[state=collapsed]/sidebar:gap-0`,e),...o,children:a});return t?(0,D.jsx)(Ni.Provider,{value:f,children:(0,D.jsx)(Ee,{defaultOpen:n,open:r,onOpenChange:d,className:`min-w-0`,children:p})}):(0,D.jsx)(Ni.Provider,{value:f,children:p})});Pi.displayName=`Sidebar.Group`;var Fi=(0,O.forwardRef)(({className:e,children:t,...n},r)=>{let{isCollapsible:i}=(0,O.useContext)(Ni);return i?(0,D.jsxs)(He,{ref:r,"data-sidebar":`group-label`,className:E(`group/group-label flex w-full cursor-pointer items-center px-3 py-1 text-xs font-medium text-kumo-subtle`,`group-data-[state=collapsed]/sidebar:hidden`,e),...n,children:[(0,D.jsx)(`span`,{className:`flex-1 truncate text-left`,children:t}),(0,D.jsx)(Ke,{className:E(`ml-auto size-3 shrink-0 text-kumo-subtle transition-transform duration-200`,`group-data-[panel-open]/group-label:rotate-90`)})]}):(0,D.jsx)(`div`,{ref:r,"data-sidebar":`group-label`,className:E(`truncate px-3 py-1 text-xs font-medium text-kumo-subtle`,`group-data-[state=collapsed]/sidebar:hidden`,e),...n,children:t})});Fi.displayName=`Sidebar.GroupLabel`;var Ii=(0,O.forwardRef)(({className:e,children:t,...n},r)=>{let{isCollapsible:i,isOpen:a}=(0,O.useContext)(Ni);return i?(0,D.jsx)(`div`,{ref:r,"data-sidebar":`group-content`,className:E(`grid`,`transition-[grid-template-rows] duration-250 ease-[cubic-bezier(0.77,0,0.175,1)]`,`motion-reduce:transition-none`,`grid-rows-[0fr]`,a?`group-data-[state=expanded]/sidebar:grid-rows-[1fr]`:`group-data-[state=expanded]/sidebar:grid-rows-[0fr]`,e),...n,children:(0,D.jsx)(`div`,{className:`overflow-hidden`,children:t})}):(0,D.jsx)(`div`,{ref:r,"data-sidebar":`group-content`,className:E(`flex flex-col`,e),...n,children:t})});Ii.displayName=`Sidebar.GroupContent`;var Li=(0,O.createContext)(!1),Ri=(0,O.createContext)(!1),zi=(0,O.forwardRef)(({className:e,...t},n)=>(0,D.jsx)(`ul`,{ref:n,"data-sidebar":`menu`,className:E(`m-0 flex min-w-0 list-none flex-col gap-0.5 p-0`,`group-data-[state=collapsed]/sidebar:gap-0`,e),...t}));zi.displayName=`Sidebar.Menu`;var Bi=(0,O.forwardRef)(({className:e,children:t,...n},r)=>(0,D.jsx)(Li.Provider,{value:!0,children:(0,D.jsx)(`li`,{ref:r,"data-sidebar":`menu-item`,className:E(`relative`,e),...n,children:t})}));Bi.displayName=`Sidebar.MenuItem`;var Vi=(0,O.forwardRef)(({className:e,icon:t,active:n=!1,size:r=`base`,href:i,tooltip:a,children:o,...s},c)=>{let{state:l}=wi(),u=ze(),d=(0,O.useContext)(Li),f=t?O.isValidElement(t)?t:(0,D.jsx)(t,{className:E(`shrink-0`,r===`base`?`size-4`:`size-3.5`)}):null,p=(0,D.jsxs)(D.Fragment,{children:[f,(0,D.jsx)(`span`,{className:E(`flex flex-1 items-center min-w-0 text-left overflow-hidden`,`group-data-[state=collapsed]/sidebar:hidden`),children:o})]}),m=E(`group/menu-button flex w-full min-w-0 items-center gap-2 rounded-lg outline-none cursor-pointer`,r===`base`&&`min-h-[34px] px-3 py-1.5 text-sm font-medium`,r===`sm`&&`min-h-[28px] px-2 py-1 text-sm`,`text-kumo-default`,`transition-[color,background-color,padding] duration-0 ease-[cubic-bezier(0.77,0,0.175,1)]`,`[&>svg]:text-kumo-subtle`,!n&&`hover:bg-kumo-tint`,n&&`bg-kumo-tint`,`has-[[data-active]]:bg-transparent has-[[data-active]]:hover:bg-kumo-tint`,`focus-visible:ring-1 focus-visible:ring-kumo-hairline`,`group-data-[state=collapsed]/sidebar:px-2`,e),h;return h=i?(0,D.jsx)(u,{ref:c,className:E(m,`no-underline!`),href:i,to:i,"data-active":n||void 0,"data-sidebar":`menu-button`,"data-size":r,onClick:s.onClick,children:p}):(0,D.jsx)(`button`,{ref:c,type:`button`,className:m,"data-active":n||void 0,"data-sidebar":`menu-button`,"data-size":r,...s,children:p}),l===`collapsed`&&a&&(h=(0,D.jsx)(Le,{content:a,side:`right`,asChild:!0,children:h})),d?h:(0,D.jsx)(`li`,{"data-sidebar":`menu-item`,className:`relative`,children:h})});Vi.displayName=`Sidebar.MenuButton`;var Hi=(0,O.forwardRef)(({className:e,...t},n)=>(0,D.jsx)(`button`,{ref:n,type:`button`,"data-sidebar":`menu-action`,className:E(`absolute right-1.5 top-1/2 flex -translate-y-1/2 items-center justify-center rounded-md p-1`,`text-kumo-strong hover:bg-kumo-overlay`,`transition-colors duration-150`,`group-data-[state=collapsed]/sidebar:hidden`,e),...t}));Hi.displayName=`Sidebar.MenuAction`;var Ui=(0,O.forwardRef)(({className:e,...t},n)=>(0,D.jsx)(`span`,{ref:n,"data-sidebar":`menu-badge`,className:E(`inline-flex shrink-0 items-center rounded-full border border-dashed border-kumo-line`,`select-none px-1.5 py-0.5 text-[11px]/none font-medium text-kumo-strong`,`group-data-[state=collapsed]/sidebar:hidden`,e),...t}));Ui.displayName=`Sidebar.MenuBadge`;var A=(0,O.forwardRef)(({className:e,...t},n)=>(0,D.jsx)(`ul`,{ref:n,"data-sidebar":`menu-sub`,className:E(`m-0 ml-3.5 flex min-w-0 list-none flex-col gap-0.5 border-l border-kumo-line p-0 pl-2.5`,`group-data-[state=collapsed]/sidebar:hidden`,e),...t}));A.displayName=`Sidebar.MenuSub`;var Wi=(0,O.forwardRef)(({className:e,children:t,...n},r)=>(0,D.jsx)(Ri.Provider,{value:!0,children:(0,D.jsx)(`li`,{ref:r,"data-sidebar":`menu-sub-item`,className:E(`relative`,e),...n,children:t})}));Wi.displayName=`Sidebar.MenuSubItem`;var Gi=(0,O.forwardRef)(({className:e,active:t=!1,href:n,children:r,...i},a)=>{let o=ze(),s=(0,O.useContext)(Ri),c=E(`flex w-full min-w-0 items-center gap-2 rounded-lg min-h-[34px] px-3 py-1 text-sm font-medium outline-none`,`text-kumo-default transition-colors duration-150`,!t&&`hover:bg-kumo-tint`,t&&`bg-kumo-tint`,`focus-visible:ring-1 focus-visible:ring-kumo-hairline`,e),l=(0,D.jsx)(`span`,{className:`flex-1 truncate text-left`,children:r}),u;return u=n?(0,D.jsx)(o,{ref:a,className:E(c,`no-underline!`),href:n,to:n,"data-active":t||void 0,"data-sidebar":`menu-sub-button`,onClick:i.onClick,children:l}):(0,D.jsx)(`button`,{ref:a,type:`button`,className:c,"data-active":t||void 0,"data-sidebar":`menu-sub-button`,...i,children:l}),s?u:(0,D.jsx)(`li`,{"data-sidebar":`menu-sub-item`,className:`relative`,children:u})});Gi.displayName=`Sidebar.MenuSubButton`;var Ki=(0,O.forwardRef)(({className:e,...t},n)=>(0,D.jsx)(`hr`,{ref:n,"data-sidebar":`separator`,className:E(`mx-2 min-h-px h-px border-0 bg-kumo-line`,e),...t}));Ki.displayName=`Sidebar.Separator`;var qi=(0,O.forwardRef)(({className:e,placeholder:t=`Search...`,shortcut:n,children:r,...i},a)=>(0,D.jsxs)(`button`,{ref:a,type:`button`,"data-sidebar":`input`,className:E(`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm`,`bg-kumo-base text-kumo-subtle ring ring-kumo-line`,`transition-[color,background-color,padding,box-shadow] duration-250 ease-[cubic-bezier(0.77,0,0.175,1)]`,`hover:bg-kumo-overlay`,`group-data-[state=collapsed]/sidebar:px-2 group-data-[state=collapsed]/sidebar:ring-0`,e),...i,children:[(0,D.jsx)(Ye,{className:`size-4 shrink-0 text-kumo-subtle`}),(0,D.jsx)(`span`,{className:`flex-1 truncate text-left group-data-[state=collapsed]/sidebar:hidden`,children:r??t}),n&&(0,D.jsx)(`kbd`,{className:`ml-auto font-sans text-xs text-kumo-subtle group-data-[state=collapsed]/sidebar:hidden`,children:n})]}));qi.displayName=`Sidebar.Input`;var Ji=(0,O.forwardRef)(({className:e,children:t,onClick:n,...r},i)=>{let{toggleSidebar:a}=wi();return(0,D.jsx)(`button`,{ref:i,type:`button`,"data-sidebar":`trigger`,"aria-label":`Toggle sidebar`,className:E(`flex items-center rounded-md p-1.5`,`text-kumo-subtle hover:text-kumo-strong hover:bg-kumo-overlay`,`transition-colors duration-150`,e),onClick:e=>{n?.(e),a()},...r,children:t??(0,D.jsx)(Mr,{className:`size-5`})})});Ji.displayName=`Sidebar.Trigger`;var Yi=(0,O.forwardRef)(({className:e,...t},n)=>{let{toggleSidebar:r}=wi();return(0,D.jsx)(`button`,{ref:n,type:`button`,"data-sidebar":`rail`,"aria-label":`Toggle sidebar`,tabIndex:-1,className:E(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 cursor-pointer transition-all`,`after:absolute after:inset-y-0 after:left-1/2 after:w-0.5`,`hover:after:bg-kumo-brand/20`,`group-data-[side=left]/sidebar-wrapper:right-0`,`group-data-[side=right]/sidebar-wrapper:left-0`,`sm:flex`,e),onClick:r,...t})});Yi.displayName=`Sidebar.Rail`;var Xi=(0,O.forwardRef)(({className:e,...t},n)=>{let{side:r,resizable:i,setIsResizing:a,setWidth:o,setOpen:s,open:c,minWidth:l}=wi(),u=(0,O.useRef)(0),d=(0,O.useRef)(0),f=(0,O.useRef)(!1);return i?(0,D.jsx)(`div`,{ref:n,"data-sidebar":`resize-handle`,className:E(`absolute inset-y-0 z-20 hidden w-1 cursor-col-resize transition-colors sm:block`,`hover:bg-kumo-brand/30 active:bg-kumo-brand/50`,r===`left`&&`right-0`,r===`right`&&`left-0`,e),onPointerDown:e=>{e.preventDefault(),a(!0),u.current=e.clientX,f.current=!c;let t=e.currentTarget.closest(`[data-sidebar-wrapper]`)?.querySelector(`[data-sidebar='sidebar']`);d.current=t?.getBoundingClientRect().width??0;let n=()=>{a(!1),document.removeEventListener(`pointermove`,i),document.removeEventListener(`pointerup`,p)},i=e=>{let t=r===`left`?e.clientX-u.current:u.current-e.clientX,n=d.current+t;f.current?n>=l&&(f.current=!1,s(!0),o(n)):n<l?(s(!1),f.current=!0):o(n)},p=()=>{n()};document.addEventListener(`pointermove`,i),document.addEventListener(`pointerup`,p)},...t}):null});Xi.displayName=`Sidebar.ResizeHandle`;function Zi({className:e}){return(0,D.jsx)(Ke,{className:E(`ml-auto size-4 shrink-0 text-kumo-subtle transition-transform duration-200`,`group-data-[panel-open]/menu-button:rotate-90`,`group-data-[state=collapsed]/sidebar:hidden`,e)})}Zi.displayName=`Sidebar.MenuChevron`;var Qi=Ee,$i=He,ea=(0,O.forwardRef)(({className:e,keepMounted:t=!0,...n},r)=>(0,D.jsx)(ke,{ref:r,keepMounted:t,className:E(`overflow-hidden`,`h-[var(--collapsible-panel-height)]`,`transition-[height] duration-250 ease-[cubic-bezier(0.77,0,0.175,1)]`,`motion-reduce:transition-none`,`data-[closed]:h-0 data-[starting-style]:h-0 data-[ending-style]:h-0`,e),...n}));ea.displayName=`Sidebar.CollapsibleContent`;var j=Object.assign(ki,{Provider:Oi,Header:Ai,Content:ji,Footer:Mi,Group:Pi,GroupLabel:Fi,GroupContent:Ii,Menu:zi,MenuItem:Bi,MenuButton:Vi,MenuAction:Hi,MenuBadge:Ui,MenuSub:A,MenuSubItem:Wi,MenuSubButton:Gi,Separator:Ki,Input:qi,Trigger:Ji,Rail:Yi,ResizeHandle:Xi,MenuChevron:Zi,Collapsible:Qi,CollapsibleTrigger:$i,CollapsibleContent:ea}),ta=e=>({...e,baseUrl:`/cdn-cgi/local/explorer/api`,throwOnError:!0}),na={bodySerializer:e=>JSON.stringify(e,(e,t)=>typeof t==`bigint`?t.toString():t)};Object.entries({$body_:`body`,$headers_:`headers`,$path_:`path`,$query_:`query`});var ra=({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:i,sseDefaultRetryDelay:a,sseMaxRetryAttempts:o,sseMaxRetryDelay:s,sseSleepFn:c,url:l,...u})=>{let d,f=c??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let c=a??3e3,p=0,m=u.signal??new AbortController().signal;for(;!m.aborted;){p++;let a=u.headers instanceof Headers?u.headers:new Headers(u.headers);d!==void 0&&a.set(`Last-Event-ID`,d);try{let t={redirect:`follow`,...u,body:u.serializedBody,headers:a,signal:m},o=new Request(l,t);e&&(o=await e(l,t));let s=await(u.fetch??globalThis.fetch)(o);if(!s.ok)throw Error(`SSE failed: ${s.status} ${s.statusText}`);if(!s.body)throw Error(`No body in SSE response`);let f=s.body.pipeThrough(new TextDecoderStream).getReader(),p=``,h=()=>{try{f.cancel()}catch{}};m.addEventListener(`abort`,h);try{for(;;){let{done:e,value:t}=await f.read();if(e)break;p+=t,p=p.replace(/\r\n/g,`
11
+ `).replace(/\r/g,`
12
+ `);let a=p.split(`
13
+
14
+ `);p=a.pop()??``;for(let e of a){let t=e.split(`
15
+ `),a=[],o;for(let e of t)if(e.startsWith(`data:`))a.push(e.replace(/^data:\s*/,``));else if(e.startsWith(`event:`))o=e.replace(/^event:\s*/,``);else if(e.startsWith(`id:`))d=e.replace(/^id:\s*/,``);else if(e.startsWith(`retry:`)){let t=Number.parseInt(e.replace(/^retry:\s*/,``),10);Number.isNaN(t)||(c=t)}let s,l=!1;if(a.length){let e=a.join(`
16
+ `);try{s=JSON.parse(e),l=!0}catch{s=e}}l&&(i&&await i(s),r&&(s=await r(s))),n?.({data:s,event:o,id:d,retry:c}),a.length&&(yield s)}}}finally{m.removeEventListener(`abort`,h),f.releaseLock()}break}catch(e){if(t?.(e),o!==void 0&&p>=o)break;let n=Math.min(c*2**(p-1),s??3e4);await f(n)}}}()}},ia=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},aa=e=>{switch(e){case`form`:return`,`;case`pipeDelimited`:return`|`;case`spaceDelimited`:return`%20`;default:return`,`}},oa=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},sa=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let t=(e?i:i.map(e=>encodeURIComponent(e))).join(aa(r));switch(r){case`label`:return`.${t}`;case`matrix`:return`;${n}=${t}`;case`simple`:return t;default:return`${n}=${t}`}}let a=ia(r),o=i.map(t=>r===`label`||r===`simple`?e?t:encodeURIComponent(t):ca({allowReserved:e,name:n,value:t})).join(a);return r===`label`||r===`matrix`?a+o:o},ca=({allowReserved:e,name:t,value:n})=>{if(n==null)return``;if(typeof n==`object`)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},la=({allowReserved:e,explode:t,name:n,style:r,value:i,valueOnly:a})=>{if(i instanceof Date)return a?i.toISOString():`${n}=${i.toISOString()}`;if(r!==`deepObject`&&!t){let t=[];Object.entries(i).forEach(([n,r])=>{t=[...t,n,e?r:encodeURIComponent(r)]});let a=t.join(`,`);switch(r){case`form`:return`${n}=${a}`;case`label`:return`.${a}`;case`matrix`:return`;${n}=${a}`;default:return a}}let o=oa(r),s=Object.entries(i).map(([t,i])=>ca({allowReserved:e,name:r===`deepObject`?`${n}[${t}]`:t,value:i})).join(o);return r===`label`||r===`matrix`?o+s:s},ua=/\{[^{}]+\}/g,da=({path:e,url:t})=>{let n=t,r=t.match(ua);if(r)for(let t of r){let r=!1,i=t.substring(1,t.length-1),a=`simple`;i.endsWith(`*`)&&(r=!0,i=i.substring(0,i.length-1)),i.startsWith(`.`)?(i=i.substring(1),a=`label`):i.startsWith(`;`)&&(i=i.substring(1),a=`matrix`);let o=e[i];if(o==null)continue;if(Array.isArray(o)){n=n.replace(t,sa({explode:r,name:i,style:a,value:o}));continue}if(typeof o==`object`){n=n.replace(t,la({explode:r,name:i,style:a,value:o,valueOnly:!0}));continue}if(a===`matrix`){n=n.replace(t,`;${ca({name:i,value:o})}`);continue}let s=encodeURIComponent(a===`label`?`.${o}`:o);n=n.replace(t,s)}return n},fa=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let a=i.startsWith(`/`)?i:`/${i}`,o=(e??``)+a;t&&(o=da({path:t,url:o}));let s=n?r(n):``;return s.startsWith(`?`)&&(s=s.substring(1)),s&&(o+=`?${s}`),o};function pa(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return`serializedBody`in e?e.serializedBody!==void 0&&e.serializedBody!==``?e.serializedBody:null:e.body===``?null:e.body;if(t)return e.body}var ma=async(e,t)=>{let n=typeof t==`function`?await t(e):t;if(n)return e.scheme===`bearer`?`Bearer ${n}`:e.scheme===`basic`?`Basic ${btoa(n)}`:n},ha=({parameters:e={},...t}={})=>n=>{let r=[];if(n&&typeof n==`object`)for(let i in n){let a=n[i];if(a==null)continue;let o=e[i]||t;if(Array.isArray(a)){let e=sa({allowReserved:o.allowReserved,explode:!0,name:i,style:`form`,value:a,...o.array});e&&r.push(e)}else if(typeof a==`object`){let e=la({allowReserved:o.allowReserved,explode:!0,name:i,style:`deepObject`,value:a,...o.object});e&&r.push(e)}else{let e=ca({allowReserved:o.allowReserved,name:i,value:a});e&&r.push(e)}}return r.join(`&`)},ga=e=>{if(!e)return`stream`;let t=e.split(`;`)[0]?.trim();if(t){if(t.startsWith(`application/json`)||t.endsWith(`+json`))return`json`;if(t===`multipart/form-data`)return`formData`;if([`application/`,`audio/`,`image/`,`video/`].some(e=>t.startsWith(e)))return`blob`;if(t.startsWith(`text/`))return`text`}},_a=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get(`Cookie`)?.includes(`${t}=`)):!1,va=async({security:e,...t})=>{for(let n of e){if(_a(t,n.name))continue;let e=await ma(n,t.auth);if(!e)continue;let r=n.name??`Authorization`;switch(n.in){case`query`:t.query||={},t.query[r]=e;break;case`cookie`:t.headers.append(`Cookie`,`${r}=${e}`);break;default:t.headers.set(r,e)}}},ya=e=>fa({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer==`function`?e.querySerializer:ha(e.querySerializer),url:e.url}),ba=(e,t)=>{let n={...e,...t};return n.baseUrl?.endsWith(`/`)&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=Sa(e.headers,t.headers),n},xa=e=>{let t=[];return e.forEach((e,n)=>{t.push([n,e])}),t},Sa=(...e)=>{let t=new Headers;for(let n of e){if(!n)continue;let e=n instanceof Headers?xa(n):Object.entries(n);for(let[n,r]of e)if(r===null)t.delete(n);else if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,typeof r==`object`?JSON.stringify(r):r)}return t},Ca=class{fns=[];clear(){this.fns=[]}eject(e){let t=this.getInterceptorIndex(e);this.fns[t]&&(this.fns[t]=null)}exists(e){let t=this.getInterceptorIndex(e);return!!this.fns[t]}getInterceptorIndex(e){return typeof e==`number`?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,t){let n=this.getInterceptorIndex(e);return this.fns[n]?(this.fns[n]=t,e):!1}use(e){return this.fns.push(e),this.fns.length-1}},wa=()=>({error:new Ca,request:new Ca,response:new Ca}),Ta=ha({allowReserved:!1,array:{explode:!0,style:`form`},object:{explode:!0,style:`deepObject`}}),Ea={"Content-Type":`application/json`},Da=(e={})=>({...na,headers:Ea,parseAs:`auto`,querySerializer:Ta,...e}),M=((e={})=>{let t=ba(Da(),e),n=()=>({...t}),r=e=>(t=ba(t,e),n()),i=wa(),a=async e=>{let n={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:Sa(t.headers,e.headers),serializedBody:void 0};return n.security&&await va({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody===``)&&n.headers.delete(`Content-Type`),{opts:n,url:ya(n)}},o=async e=>{let{opts:t,url:n}=await a(e),r={redirect:`follow`,...t,body:pa(t)},o=new Request(n,r);for(let e of i.request.fns)e&&(o=await e(o,t));let s=t.fetch,c;try{c=await s(o)}catch(e){let n=e;for(let r of i.error.fns)r&&(n=await r(e,void 0,o,t));if(n||={},t.throwOnError)throw n;return t.responseStyle===`data`?void 0:{error:n,request:o,response:void 0}}for(let e of i.response.fns)e&&(c=await e(c,o,t));let l={request:o,response:c};if(c.ok){let e=(t.parseAs===`auto`?ga(c.headers.get(`Content-Type`)):t.parseAs)??`json`;if(c.status===204||c.headers.get(`Content-Length`)===`0`){let n;switch(e){case`arrayBuffer`:case`blob`:case`text`:n=await c[e]();break;case`formData`:n=new FormData;break;case`stream`:n=c.body;break;default:n={}}return t.responseStyle===`data`?n:{data:n,...l}}let n;switch(e){case`arrayBuffer`:case`blob`:case`formData`:case`text`:n=await c[e]();break;case`json`:{let e=await c.text();n=e?JSON.parse(e):{};break}case`stream`:return t.responseStyle===`data`?c.body:{data:c.body,...l}}return e===`json`&&(t.responseValidator&&await t.responseValidator(n),t.responseTransformer&&(n=await t.responseTransformer(n))),t.responseStyle===`data`?n:{data:n,...l}}let u=await c.text(),d;try{d=JSON.parse(u)}catch{}let f=d??u,p=f;for(let e of i.error.fns)e&&(p=await e(f,c,o,t));if(p||={},t.throwOnError)throw p;return t.responseStyle===`data`?void 0:{error:p,...l}},s=e=>t=>o({...t,method:e}),c=e=>async t=>{let{opts:n,url:r}=await a(t);return ra({...n,body:n.body,headers:n.headers,method:e,onRequest:async(e,t)=>{let r=new Request(e,t);for(let e of i.request.fns)e&&(r=await e(r,n));return r},serializedBody:pa(n),url:r})};return{buildUrl:e=>ya({...t,...e}),connect:s(`CONNECT`),delete:s(`DELETE`),get:s(`GET`),getConfig:n,head:s(`HEAD`),interceptors:i,options:s(`OPTIONS`),patch:s(`PATCH`),post:s(`POST`),put:s(`PUT`),request:o,setConfig:r,sse:{connect:c(`CONNECT`),delete:c(`DELETE`),get:c(`GET`),head:c(`HEAD`),options:c(`OPTIONS`),patch:c(`PATCH`),post:c(`POST`),put:c(`PUT`),trace:c(`TRACE`)},trace:s(`TRACE`)}})(ta(Da({baseUrl:`/cdn-cgi/local/explorer/api`}))),Oa=e=>(e.client??M).get({url:`/storage/kv/namespaces/{namespace_id}/keys`,...e}),ka=e=>(e.client??M).delete({url:`/storage/kv/namespaces/{namespace_id}/values/{key_name}`,...e}),Aa=e=>(e.client??M).get({url:`/storage/kv/namespaces/{namespace_id}/values/{key_name}`,...e}),ja=e=>(e.client??M).put({bodySerializer:null,url:`/storage/kv/namespaces/{namespace_id}/values/{key_name}`,...e,headers:{"Content-Type":`application/octet-stream`,...e.headers}}),Ma=e=>(e.client??M).post({url:`/d1/database/{database_id}/raw`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Na=e=>(e.client??M).patch({url:`/workflows/{workflow_name}/instances/{instance_id}/status`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Pa=e=>(e?.client??M).get({url:`/workers/durable_objects/namespaces`,...e}),Fa=e=>(e.client??M).get({url:`/workers/durable_objects/namespaces/{id}/objects`,...e}),Ia=e=>(e.client??M).get({url:`/flagship/apps/{app_id}/flags`,...e}),La=e=>(e.client??M).post({url:`/flagship/apps/{app_id}/flags`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ra=e=>(e.client??M).delete({url:`/flagship/apps/{app_id}/flags/{flag_key}`,...e}),za=e=>(e.client??M).patch({url:`/flagship/apps/{app_id}/flags/{flag_key}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ba=e=>(e.client??M).put({url:`/flagship/apps/{app_id}/flags/{flag_key}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Va=e=>(e.client??M).post({url:`/flagship/apps/{app_id}/evaluate`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ha=e=>(e.client??M).delete({url:`/r2/buckets/{bucket_name}/objects`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ua=e=>(e.client??M).get({url:`/r2/buckets/{bucket_name}/objects`,...e}),Wa=e=>(e.client??M).get({url:`/r2/buckets/{bucket_name}/objects/{object_key}`,...e}),Ga=e=>(e.client??M).put({bodySerializer:null,url:`/r2/buckets/{bucket_name}/objects/{object_key}`,...e,headers:{"content-type":`application/octet-stream`,...e.headers}}),Ka=e=>(e.client??M).post({url:`/workers/durable_objects/namespaces/{namespace_id}/query`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),qa=e=>(e?.client??M).get({url:`/local/workers`,...e}),Ja=e=>(e?.client??M).get({url:`/local/email/routing`,...e}),Ya=e=>(e.client??M).post({url:`/local/email/routing/resend`,...e}),Xa=e=>(e.client??M).get({url:`/local/email/routing/resend/draft`,...e}),Za=e=>(e.client??M).post({url:`/local/email/routing/send`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Qa=e=>(e?.client??M).get({url:`/local/email/sending`,...e}),$a=e=>(e.client??M).delete({url:`/workflows/{workflow_name}`,...e}),eo=e=>(e.client??M).get({url:`/workflows/{workflow_name}/instances`,...e}),to=e=>(e.client??M).post({url:`/workflows/{workflow_name}/instances`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),no=e=>(e.client??M).delete({url:`/workflows/{workflow_name}/instances/{instance_id}`,...e}),ro=e=>(e.client??M).get({url:`/workflows/{workflow_name}/instances/{instance_id}`,...e}),io=e=>(e.client??M).post({url:`/workflows/{workflow_name}/instances/{instance_id}/events/{event_type}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ao=e=>(e.client??M).post({url:`/local/observability/query`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),oo=e=>(e?.client??M).post({url:`/local/observability/clear`,...e});function so(e){return(0,D.jsxs)(`div`,{className:`text-text-secondary flex flex-1 flex-col items-center justify-center space-y-4 p-12 text-center`,children:[(0,D.jsx)(`h2`,{className:`text-text text-3xl font-bold`,children:`Page not found`}),(0,D.jsx)(`p`,{className:`text-text-secondary text-sm font-light`,children:`The resource you're looking for doesn't exist or has been removed.`}),(0,D.jsx)(_e,{to:`/`,children:(0,D.jsx)(We,{variant:`secondary`,children:`Go home`})})]})}var co=e=>(0,D.jsx)(`svg`,{width:16,height:16,viewBox:`-4 -2 73 68`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,D.jsx)(`path`,{fill:`currentColor`,d:`m23.6 22.2 3.03 1.75v3.5L23.6 29.2l-3.03-1.75v-3.5zM20.06 49l3.54-3.54L27.14 49l-3.54 3.54zm3.54-14.7c.593 0 1.17.176 1.67.506.493.33.878.798 1.1 1.35a3 3 0 0 1-.65 3.27c-.42.42-.954.705-1.54.821a3 3 0 0 1-1.73-.171 3.04 3.04 0 0 1-1.35-1.1 3 3 0 0 1-.506-1.67c0-.796.316-1.56.879-2.12a3 3 0 0 1 2.12-.879zM10.3 11.2l6.42-4.89 1.21-.37h29l1.19.39 6.61 4.89.82 1.61v38L55 52.21l-4.83 5.11-1.46.63h-31.7l-1.37-.54-5.48-5.11-.64-1.47v-38zm3.21 25.4 4.47 4.94h.056v4h-1.83l-2.7-3v7.39l4.26 4h30l3.7-3.91V42.3l-3.67 3.24h-18.6v-4h17.2l5.19-4.61v-7.44l-3.67 3.25h-18.7v-4h17.2l5.19-4.6v-6.92l-3.67 3.26h-31.6l-2.74-2.8v6.12l4.47 4.94h.056v4h-1.83l-2.7-3zm32.7-26.7h-27.6l-4.07 3.11 3.4 3.48h28.4l4-3.56z`})}),lo=e=>(0,D.jsx)(`svg`,{width:16,height:16,viewBox:`-4 -2 72 68`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:(0,D.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M32.214 6h-.202a26 26 0 1 0 .327 52q.266 0 .527-.014A26 26 0 0 0 58.012 32 26 26 0 0 0 32.865 6.014a10 10 0 0 0-.65-.013m-9.503 6.063A22 22 0 0 0 10.104 30h7.804q.068-1.79.252-3.51l3.998.24A46 46 0 0 0 21.91 30H30V10.519c-1.784.81-3.475 2.582-4.9 5.41q-.139.278-.274.567l-3.873-1.145q.276-.627.575-1.221c.363-.72.757-1.412 1.182-2.067M30 34h-8.09c.226 5.584 1.392 10.5 3.19 14.071 1.425 2.829 3.116 4.6 4.9 5.41zm-7.29 17.937a22 22 0 0 1-1.182-2.067c-2.131-4.233-3.393-9.795-3.62-15.87h-7.806A22 22 0 0 0 22.71 51.937m19.554-.472A22 22 0 0 0 53.921 34h-7.15a51 51 0 0 1-.26 3.589l-3.998-.24q.185-1.627.255-3.349H34v19.742c2.032-.641 3.973-2.486 5.577-5.671q.129-.255.252-.517l3.874 1.145q-.267.6-.553 1.171a23 23 0 0 1-.885 1.595M42.768 30H34V10.258c2.032.641 3.973 2.486 5.577 5.671 1.799 3.572 2.965 8.487 3.191 14.071m4.003 0c-.227-6.075-1.49-11.637-3.621-15.87a22 22 0 0 0-.885-1.595A22 22 0 0 1 53.921 30z`})}),uo=e=>(0,D.jsxs)(`svg`,{width:16,height:16,viewBox:`-4 -2 72 68`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,D.jsx)(`path`,{fill:`currentColor`,d:`M22 44.95h-7v-4h7zm-7-8h7v-4h-7zm7-8h-7v-4h7zm4 16h23v-4H26zm23-8H26v-4h23zm-23-8h23v-4H26z`}),(0,D.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`m6 12 2-2h19l1.675.907 3.408 5.225H56l2 2V52l-2 2H8l-2-2zm4 2v36h44V20.132H31l-1.675-.908L25.917 14z`})]}),fo=e=>(0,D.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:20,height:20,viewBox:`0 0 40 40`,fill:`none`,...e,children:(0,D.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M30.289 6.423c-2.43-.813-5.958-1.362-9.977-1.362-4.018 0-7.545.549-9.976 1.362-1.228.41-2.033.842-2.48 1.195q-.14.111-.204.18c.052.171.196.395.562.67.524.394 1.372.783 2.563 1.119 2.368.666 5.731 1.023 9.536 1.023s7.167-.357 9.535-1.023c1.191-.336 2.04-.725 2.563-1.119.366-.275.51-.499.562-.67a2 2 0 0 0-.204-.18c-.447-.353-1.252-.784-2.48-1.195m-20.24 5.624c-.885-.25-1.71-.552-2.424-.922v4.393c0 .196.097.514.625.941.535.433 1.391.869 2.576 1.252 2.36.764 5.71 1.222 9.486 1.222 3.778 0 7.128-.458 9.487-1.222 1.185-.383 2.041-.82 2.576-1.252.528-.427.625-.745.625-.94v-4.394c-.715.37-1.539.673-2.424.922-2.7.76-6.336 1.124-10.264 1.124s-7.564-.364-10.263-1.124m25.576 3.471V7.622c0-2.829-6.856-5.122-15.313-5.122C11.857 2.5 5 4.793 5 7.622v24.756c0 2.829 6.856 5.122 15.313 5.122 8.456 0 15.312-2.293 15.312-5.122zM33 19.134c-.7.393-1.505.726-2.375 1.008-2.708.877-6.358 1.352-10.313 1.352-3.954 0-7.604-.475-10.312-1.352-.87-.282-1.676-.615-2.375-1.008v4.28c0 .196.097.514.625.942.535.432 1.391.868 2.576 1.252 2.36.763 5.71 1.221 9.486 1.221 3.778 0 7.128-.458 9.487-1.221 1.185-.384 2.041-.82 2.576-1.252.528-.428.625-.746.625-.941v-4.28Zm-23 8.904c-.87-.281-1.676-.615-2.375-1.007v5.143c.044.048.116.117.231.208.447.353 1.252.785 2.48 1.195 2.43.813 5.958 1.362 9.976 1.362s7.546-.549 9.977-1.362c1.228-.41 2.033-.842 2.48-1.195a2 2 0 0 0 .231-.208v-5.143c-.7.392-1.505.726-2.375 1.007-2.708.877-6.358 1.352-10.313 1.352-3.954 0-7.604-.475-10.312-1.352m23.06 4.06-.01.016zm-25.495 0 .01.016zm3.997-15.726c.725 0 1.313-.573 1.313-1.28s-.588-1.281-1.313-1.281c-.724 0-1.312.573-1.312 1.28s.588 1.281 1.313 1.281Zm1.313 6.83c0 .706-.588 1.28-1.313 1.28-.724 0-1.312-.574-1.312-1.28 0-.708.588-1.281 1.313-1.281.724 0 1.312.573 1.312 1.28Zm-1.313 9.176c.725 0 1.313-.573 1.313-1.28s-.588-1.28-1.313-1.28c-.724 0-1.312.572-1.312 1.28 0 .707.588 1.28 1.313 1.28Z`,clipRule:`evenodd`})}),po=e=>(0,D.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 16 17`,fill:`currentColor`,...e,children:(0,D.jsx)(`path`,{d:`m2 11-.5.5v2.75l.5.5h2.75l.5-.5V11.5l-.5-.5H2Zm2.25 2.75H2.5V12h1.75v1.75ZM7.93 2 5.68 4.25 7.93 6.5l2.25-2.25L7.93 2ZM3.76 9.56h8.34v1.14h.98V8.57H8.43v-1.6h-1v1.6H2.78v2.13h.98V9.56ZM12.5 11a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm0 3a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z`})}),mo=`/cdn-cgi/local/explorer`,ho=`${mo}/api`,go=`local-explorer.sidebar.groups.v1`,_o=`local-explorer.sidebar.open.v1`,vo=[`observability`,`d1`,`do`,`kv`,`r2`,`workflows`,`email`,`cron-triggers`,`flagship`],yo={observability:!0,d1:!0,do:!0,kv:!0,r2:!0,workflows:!0,email:!0,"cron-triggers":!0,flagship:!0};function bo(){try{let e=localStorage.getItem(go);if(e===null)return yo;let t=JSON.parse(e);if(typeof t!=`object`||!t||Array.isArray(t))return yo;let n=t,r={...yo};for(let e of vo)typeof n[e]==`boolean`&&(r[e]=n[e]);return r}catch{return yo}}function N(e){try{localStorage.setItem(go,JSON.stringify(e))}catch{}}function xo(){try{let e=localStorage.getItem(_o);if(e===null)return!0;let t=JSON.parse(e);return typeof t!=`boolean`||t}catch{return!0}}function So(e){try{localStorage.setItem(_o,JSON.stringify(e))}catch{}}var Co=`local-explorer.theme.v1`,wo=[`light`,`dark`,`system`];function To(e){return wo[(wo.indexOf(e)+1)%wo.length]??`system`}function Eo(e,t){return e===`system`?t?`dark`:`light`:e}function Do(){try{let e=localStorage.getItem(Co);return e!==null&&Ao(e)?e:`system`}catch{return`system`}}function Oo(e){try{localStorage.setItem(Co,e)}catch{}}function ko(e,t){document.documentElement.dataset.mode=Eo(e,t)}function Ao(e){return wo.includes(e)}function jo({emptyLabel:e,icon:t,items:n,title:r}){let i=n.some(e=>e.isActive);return(0,D.jsxs)(Oe.Root,{children:[(0,D.jsx)(Oe.Trigger,{render:(0,D.jsx)(j.MenuButton,{active:i,icon:t})}),(0,D.jsx)(Oe.Portal,{children:(0,D.jsx)(Oe.Positioner,{align:`start`,className:`z-100`,side:`right`,sideOffset:8,children:(0,D.jsxs)(Oe.Popup,{className:`max-h-72 min-w-48 overflow-y-auto rounded-lg border border-kumo-fill bg-kumo-base shadow-[0_4px_12px_rgba(0,0,0,0.15)] transition-[opacity,transform] duration-150 data-ending-style:-translate-x-1 data-ending-style:opacity-0 data-starting-style:-translate-x-1 data-starting-style:opacity-0`,children:[(0,D.jsx)(`div`,{className:`border-b border-kumo-fill px-3 py-2`,children:(0,D.jsx)(`span`,{className:`text-xs font-medium text-kumo-subtle`,children:r})}),(0,D.jsx)(`div`,{className:`p-1`,children:n.length===0?(0,D.jsx)(`div`,{className:`px-2 py-1.5 text-sm text-kumo-subtle italic`,children:e}):n.map(e=>(0,D.jsx)(_e,{className:`flex w-full items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors outline-none select-none ${e.isActive?`bg-kumo-elevated font-medium text-kumo-default`:`text-kumo-default hover:bg-kumo-elevated`}`,params:e.link.params,search:e.link.search,to:e.link.to,children:(0,D.jsx)(`span`,{className:`truncate`,children:e.label})},e.id))})]})})})]})}var Mo=new Set([`__router-worker__`,`__asset-worker__`,`__vite_proxy_worker__`]);function No(e){return Mo.has(e)}function Po(e){return e.filter(e=>!No(e.name))}function Fo(e,t){let n=Po(e),r=new URLSearchParams(t).get(`worker`),i=n.find(e=>e.isSelf)?.name??n[0]?.name,a=r&&n.some(e=>e.name===r)?r:i;return n.find(e=>e.name===a)}function Io({workers:e,selectedWorker:t,onWorkerChange:n}){let r=wi(),[i,a]=(0,O.useState)(!1),o=e=>{e!==null&&n(e)},s=e.find(e=>e.isSelf),c=(0,D.jsxs)(Pe.Root,{onOpenChange:a,onValueChange:o,open:i,value:t,children:[r.open?(0,D.jsxs)(Pe.Trigger,{className:`flex w-full cursor-pointer items-center justify-between gap-2 rounded-md border border-kumo-fill bg-kumo-base px-3 py-2 text-sm text-kumo-default transition-colors hover:bg-kumo-elevated data-popup-open:border-kumo-brand`,children:[(0,D.jsxs)(`span`,{className:`flex items-center gap-2 truncate`,children:[(0,D.jsx)(Ir,{className:`h-4 w-4 shrink-0 text-kumo-subtle`}),(0,D.jsx)(`span`,{className:`truncate`,children:t})]}),(0,D.jsx)(Pe.Icon,{children:(0,D.jsx)(qe,{className:`h-3.5 w-3.5 shrink-0 text-kumo-subtle`})})]}):(0,D.jsx)(Pe.Trigger,{"aria-label":`Selected worker: ${t}`,className:`flex cursor-pointer items-center justify-center rounded-md p-2 text-kumo-subtle transition-colors hover:bg-kumo-fill hover:text-kumo-default data-popup-open:bg-kumo-fill data-popup-open:text-kumo-default`,children:(0,D.jsx)(Ir,{className:`h-4 w-4 shrink-0`})}),(0,D.jsx)(Pe.Portal,{children:(0,D.jsx)(Pe.Positioner,{align:`start`,alignItemWithTrigger:!1,className:`z-100`,side:r.open?`bottom`:`right`,sideOffset:r.open?4:8,children:(0,D.jsx)(Pe.Popup,{className:`max-h-72 min-w-48 overflow-hidden rounded-lg border border-kumo-fill bg-kumo-base shadow-[0_4px_12px_rgba(0,0,0,0.15)] transition-[opacity,transform] duration-150 data-ending-style:-translate-y-1 data-ending-style:opacity-0 data-starting-style:-translate-y-1 data-starting-style:opacity-0`,children:(0,D.jsx)(Pe.List,{className:`max-h-72 overflow-y-auto p-1`,children:e.map(e=>{let n=t===e.name,r=n?Je:Ir;return(0,D.jsxs)(Pe.Item,{className:`flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm text-kumo-default transition-colors outline-none select-none data-highlighted:bg-kumo-elevated`,value:e.name,children:[(0,D.jsx)(`span`,{className:`flex w-4 items-center`,children:(0,D.jsx)(r,{className:`h-3.5 w-3.5 ${n?``:`text-kumo-subtle`}`})}),(0,D.jsx)(Pe.ItemText,{children:(0,D.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e.name,e.isSelf&&s&&(0,D.jsx)(`span`,{className:`rounded bg-kumo-brand/10 px-1.5 py-0.5 text-[10px] font-medium text-kumo-link`,children:`Host`})]})})]},e.name)})})})})})]});return r.open?(0,D.jsx)(`div`,{className:`px-3`,children:c}):(0,D.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,D.jsx)(Le,{content:t,side:`right`,children:c})})}var Lo={light:{icon:Pr,label:`Light`},dark:{icon:Ar,label:`Dark`},system:{icon:kr,label:`System`}};function Ro({bindings:e,currentPath:t,onCycleTheme:n,onWorkerChange:r,selectedWorker:i,themeMode:a,workers:o}){let s=C(),c=wi(),[l,u]=(0,O.useState)(bo),d=(0,O.useCallback)((e,t)=>{u(n=>{let r={...n,[e]:t};return N(r),r})},[]),f=o.length>1,p=o.length>1?{worker:i}:{},m=[{id:`traces`,isActive:t===`/observability`||t===`/observability/`,label:`Traces`,link:{params:{},search:p,to:`/observability`}},{id:`events`,isActive:t.startsWith(`/observability/events`),label:`Events`,link:{params:{},search:p,to:`/observability/events`}}],h=e?.d1??[],g=(e?.do??[]).filter(e=>e.useSqlite),_=e?.kv??[],v=e?.r2??[],y=e?.workflows??[],b=e?.flagship??[],x=[{emptyLabel:`No databases`,groupId:`d1`,icon:co,items:h.map(e=>({id:e.id,isActive:t===`/d1/${e.id}`,label:e.bindingName,link:{params:{databaseId:e.id},search:{table:void 0,...p},to:`/d1/$databaseId`}})),title:`D1 Databases`},{emptyLabel:`No SQLite namespaces`,groupId:`do`,icon:lo,items:g.map(e=>({id:e.id,isActive:t===`/do/${e.className}`||t.startsWith(`/do/${e.className}/`),label:e.className,link:{params:{className:e.className},search:p,to:`/do/$className`}})),title:`Durable Objects`},{emptyLabel:`No namespaces`,groupId:`kv`,icon:uo,items:_.map(e=>({id:e.id,isActive:t===`/kv/${e.id}`,label:e.bindingName,link:{params:{namespaceId:e.id},search:p,to:`/kv/$namespaceId`}})),title:`KV Namespaces`},{emptyLabel:`No buckets`,groupId:`r2`,icon:fo,items:v.map(e=>({id:e.id,isActive:t===`/r2/${e.id}`||t.startsWith(`/r2/${e.id}/`),label:e.bindingName,link:{params:{bucketName:e.id},search:p,to:`/r2/$bucketName`}})),title:`R2 Buckets`},{emptyLabel:`No workflows`,groupId:`workflows`,icon:po,items:y.map(e=>({id:e.id,isActive:t===`/workflows/${e.id}`||t.startsWith(`/workflows/${e.id}/`),label:e.bindingName,link:{params:{workflowName:e.id},search:p,to:`/workflows/$workflowName`}})),title:`Workflows`},{emptyLabel:`No email`,groupId:`email`,icon:Dr,items:[{id:`sending`,isActive:t===`/email/sending`,label:`Sending`,link:{params:{},search:p,to:`/email/sending`}},{id:`routing`,isActive:t===`/email/routing`||t.startsWith(`/email/routing/`),label:`Routing`,link:{params:{},search:p,to:`/email/routing`}}],title:`Email`},{emptyLabel:``,groupId:`cron-triggers`,icon:Er,items:[{id:`configured-crons`,isActive:t===`/cron-triggers/configured`,label:`Configured Crons`,link:{params:{},search:p,to:`/cron-triggers/configured`}},{id:`ad-hoc-triggers`,isActive:t===`/cron-triggers/ad-hoc`,label:`Ad-Hoc Triggers`,link:{params:{},search:p,to:`/cron-triggers/ad-hoc`}}],title:`Cron Triggers`},{emptyLabel:`No Flagship apps`,groupId:`flagship`,icon:Or,items:b.map(e=>({id:`${e.id}:${e.bindingName}`,isActive:t===`/flagship/${e.id}`,label:e.bindingName,link:{params:{appId:e.id},search:p,to:`/flagship/$appId`}})),title:`Flagship`}];return(0,D.jsxs)(j,{className:`bg-kumo-elevated`,children:[(0,D.jsx)(j.Header,{className:`min-h-14.5 border-b`,children:(0,D.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,D.jsxs)(`a`,{className:`box-border flex items-center gap-2.5 px-1`,href:`${mo}/`,children:[(0,D.jsx)(_i,{className:E(`shrink-0 transition-all duration-200`,c.open?`h-8 w-8`:`h-6 w-6`),variant:`glyph`}),c.open?(0,D.jsxs)(`div`,{className:`flex flex-col gap-px`,children:[(0,D.jsx)(`h3`,{className:`text-text text-sm leading-tight font-semibold`,children:`Local Explorer`}),(0,D.jsx)(`p`,{className:`text-text-secondary text-[9px] font-medium tracking-wide uppercase`,children:`Cloudflare DevTools`})]}):null]}),c.open?(0,D.jsx)(mr,{className:`mr-1`,variant:`beta`,children:`Beta`}):null]})}),(0,D.jsxs)(j.Content,{children:[f&&(0,D.jsx)(Io,{workers:o,selectedWorker:i,onWorkerChange:r}),(0,D.jsx)(j.MenuItem,{className:`space-y-1`,children:c.open?(0,D.jsxs)(j.Collapsible,{open:l.observability,onOpenChange:e=>{d(`observability`,e)},children:[(0,D.jsx)(j.CollapsibleTrigger,{render:(0,D.jsxs)(j.MenuButton,{icon:(0,D.jsx)(jr,{width:20,height:20}),children:[`Observability `,(0,D.jsx)(j.MenuChevron,{})]})}),(0,D.jsx)(j.CollapsibleContent,{children:(0,D.jsx)(j.MenuSub,{className:`mt-1 ml-5.5 space-y-0.5`,children:m.map(e=>(0,D.jsx)(j.MenuSubButton,{active:e.isActive,className:`cursor-pointer`,href:s.buildLocation(e.link).href,children:e.label},e.id))})})]}):(0,D.jsx)(jo,{emptyLabel:``,icon:(0,D.jsx)(jr,{width:20,height:20}),items:m,title:`Observability`})}),c.open?(0,D.jsx)(j.MenuItem,{className:`space-y-1`,children:x.map(e=>(0,D.jsxs)(j.Collapsible,{open:l[e.groupId],onOpenChange:t=>{d(e.groupId,t)},children:[(0,D.jsx)(j.CollapsibleTrigger,{render:(0,D.jsxs)(j.MenuButton,{icon:(0,D.jsx)(e.icon,{width:20,height:20}),children:[e.title,` `,(0,D.jsx)(j.MenuChevron,{})]})}),(0,D.jsx)(j.CollapsibleContent,{children:(0,D.jsx)(j.MenuSub,{className:`mt-1 ml-5.5 space-y-0.5`,children:e.items.length===0?(0,D.jsx)(`div`,{className:`text-text-secondary ml-8 px-2 py-1.5 text-sm italic`,children:e.emptyLabel}):e.items.map(e=>(0,D.jsx)(j.MenuSubButton,{active:e.isActive,className:`cursor-pointer`,href:s.buildLocation(e.link).href,children:e.label},e.id))})})]},e.groupId))}):(0,D.jsx)(j.MenuItem,{className:`space-y-1`,children:x.map(e=>(0,D.jsx)(jo,{emptyLabel:e.emptyLabel,icon:(0,D.jsx)(e.icon,{"aria-label":e.groupId===`email`?e.title:void 0,height:20,width:20}),items:e.items,title:e.title},e.groupId))})]}),(0,D.jsxs)(j.Footer,{className:`gap-1`,children:[(()=>{let{icon:e,label:t}=Lo[a],r=Lo[To(a)].label;return(0,D.jsx)(j.MenuButton,{"aria-label":`Theme: ${t}. Switch to ${r}`,className:`px-2`,icon:(0,D.jsx)(e,{size:18,weight:`bold`}),onClick:n,tooltip:`Theme: ${t}`,type:`button`})})(),(0,D.jsx)(j.Trigger,{className:`cursor-pointer hover:bg-kumo-tint`})]})]})}var zo=Ln({component:Bo,notFoundComponent:so,loader:async({location:e})=>{try{return{bootstrapAuthoritative:!0,workers:(await qa()).data?.result??[]}}catch(t){if(/\/cron-triggers(?:\/.*)?$/.test(e.pathname))return{bootstrapAuthoritative:!1,workers:[]};throw t}}});function Bo(){let e=zo.useLoaderData(),t=oe(),n=t.location.pathname,r=C(),i=tr()({includeSearch:!1,to:`/email/routing/$captureId`}),[a,o]=(0,O.useState)(xo),[s,c]=(0,O.useState)(Do),l=(0,O.useCallback)(e=>{o(e),So(e)},[]),u=(0,O.useCallback)(()=>{let e=To(s);Oo(e),ko(e,window.matchMedia(`(prefers-color-scheme: dark)`).matches),c(e)},[s]),d=(0,O.useMemo)(()=>Po(e.workers),[e.workers]),f=(0,O.useMemo)(()=>Fo(e.workers,t.location.searchStr),[e.workers,t.location.searchStr]),p=f?.name??``,m=(0,O.useCallback)(e=>{if(i){r.navigate({search:t=>({...t,worker:e}),to:`/email/routing`});return}let n=new URLSearchParams(t.location.searchStr);n.set(`worker`,e),r.history.push(`${window.location.pathname}?${n.toString()}`)},[r,t.location.searchStr,i]);return(0,D.jsx)(si,{children:(0,D.jsx)(`div`,{className:`flex h-screen overflow-hidden`,children:(0,D.jsxs)(j.Provider,{onOpenChange:l,open:a,resizable:!0,children:[(0,D.jsx)(Ro,{bindings:f?.bindings,currentPath:n,onCycleTheme:u,onWorkerChange:m,selectedWorker:p,themeMode:s,workers:d}),(0,D.jsx)(`main`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto`,children:(0,D.jsx)(Qn,{})})]})})})}var Vo=`modulepreload`,Ho=function(e){return`/cdn-cgi/local/explorer/`+e},Uo={},Wo=function(e){return e.pathname.endsWith(`.css`)},Go=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},P=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Ho(t,n);let r=s(t),i=Wo(r);return Go(Uo,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Vo,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ko=Rn(`/email`)({component:k(()=>P(()=>import(`./email-B-IveBKB.js`),__vite__mapDeps([0,1])),`component`),validateSearch:e=>({lookup:e.lookup===`message-id`?`message-id`:void 0,worker:typeof e.worker==`string`?e.worker:void 0})}),qo=Rn(`/cron-triggers`)({beforeLoad:({location:e,search:t})=>{if(/\/cron-triggers\/?$/.test(e.pathname))throw de({replace:!0,search:t,to:`/cron-triggers/configured`})},component:k(()=>P(()=>import(`./cron-triggers-ZP5ClwAa.js`),__vite__mapDeps([2,1,3,4])),`component`),validateSearch:e=>({worker:typeof e.worker==`string`&&e.worker!==``?e.worker:void 0})}),Jo=`You have access to local Cloudflare services (KV, R2, D1, Durable Objects, and Workflows) for this app via the Explorer API.
17
+ API endpoint: {{apiEndpoint}}
18
+ Fetch the OpenAPI schema from {{apiEndpoint}} to discover available operations. Use these endpoints to list, query, and manage local resources during development.`;function Yo(e,t){return`${e}${t}`}function Xo(e){return Jo.replaceAll(`{{apiEndpoint}}`,e)}async function Zo(e,t=navigator.clipboard){await t.writeText(e)}var Qo=Rn(`/`)({component:k(()=>P(()=>import(`./routes-BlOyav-b.js`),__vite__mapDeps([5,1,6,7,8])),`component`),loader:()=>({prompt:Xo(Yo(window.location.origin,`/cdn-cgi/local/explorer/api`))})}),$o=Rn(`/observability/`)({component:k(()=>P(()=>import(`./observability-CX-6-j6d.js`),__vite__mapDeps([9,1,7,6,10,11,12,13,14,15,16,17,18,8,19,20,21,22,23,24,25,26,27])),`component`),errorComponent:k(()=>P(()=>import(`./observability-Cow8QNw6.js`),__vite__mapDeps([28,29,1,30,3,7,6,26])),`errorComponent`),validateSearch:e=>({worker:typeof e.worker==`string`?e.worker:void 0,trace:typeof e.trace==`string`?e.trace:void 0,span:typeof e.span==`string`?e.span:void 0})}),es=Rn(`/cron-triggers/`)({beforeLoad:({search:e})=>{throw de({replace:!0,search:e,to:`/cron-triggers/configured`})}}),ts=Rn(`/workflows/$workflowName`)({component:k(()=>P(()=>import(`./_workflowName-DMGTgdaZ.js`),__vite__mapDeps([31,1])),`component`),errorComponent:k(()=>P(()=>import(`./_workflowName-Cow8QNw6.js`),__vite__mapDeps([32,29,1,30,3,7,6,26])),`errorComponent`),loader:async({params:e})=>({workflowName:e.workflowName}),validateSearch:e=>({worker:typeof e.worker==`string`?e.worker:void 0})}),ns=Rn(`/r2/$bucketName`)({component:k(()=>P(()=>import(`./_bucketName-DMGTgdaZ.js`),__vite__mapDeps([33,1])),`component`),errorComponent:k(()=>P(()=>import(`./_bucketName-Cow8QNw6.js`),__vite__mapDeps([34,29,1,30,3,7,6,26])),`errorComponent`),validateSearch:e=>({worker:typeof e.worker==`string`?e.worker:void 0})}),rs=Rn(`/observability/events`)({component:k(()=>P(()=>import(`./events-ClnoiyGH.js`),__vite__mapDeps([35,1,30,3,7,6,8,12,13,14,15,16,17,18,19,20,21,22,23,25,27])),`component`),errorComponent:k(()=>P(()=>import(`./events-Cow8QNw6.js`),__vite__mapDeps([36,29,1,30,3,7,6,26])),`errorComponent`)}),is=Rn(`/kv/$namespaceId`)({component:k(()=>P(()=>import(`./_namespaceId-HT9g0tMq.js`),__vite__mapDeps([37,1,3,7,6,38,39,15,21,40,11,18,41,42,13,43,8,44])),`component`),errorComponent:k(()=>P(()=>import(`./_namespaceId-Cow8QNw6.js`),__vite__mapDeps([45,29,1,30,3,7,6,26])),`errorComponent`),loader:async({params:e})=>{let t=await Oa({path:{namespace_id:e.namespaceId},query:{limit:50}}),n=t.data?.result??[],r=new Map;n.length>0&&(r=await os(e.namespaceId,n));let i=t.data?.result_info?.cursor??null;return{cursor:i,entries:n.map(e=>({key:e,value:r.get(e)??null})),hasMore:!!i}},validateSearch:e=>({worker:typeof e.worker==`string`?e.worker:void 0})});function as(e){if(typeof e!=`object`||!e||!(`errors`in e))return!1;let{errors:t}=e;return t?.some(e=>e.code===10009)??!1}async function os(e,t){let n=new Map;return await Promise.all(t.map(async t=>{try{let r=await Aa({path:{namespace_id:e,key_name:t.name},parseAs:`text`});n.set(t,r.data??null)}catch(e){if(as(e)){n.set(t,null);return}throw e}})),n}var ss=Rn(`/flagship/$appId`)({component:k(()=>P(()=>import(`./_appId-TnuOHwOA.js`),__vite__mapDeps([46,1,3,7,6,10,18,8,38,13,25,47,20,19,14,15,16,21,40,11,27,22,23,48,41,42,43,49,44])),`component`),errorComponent:k(()=>P(()=>import(`./_appId-Cow8QNw6.js`),__vite__mapDeps([50,29,1,30,3,7,6,26])),`errorComponent`),loader:async({params:e})=>{let t=[],n;do{let r=await Ia({path:{app_id:e.appId},query:{cursor:n,limit:200}});t.push(...r.data?.result??[]),n=r.data?.result_info?.cursor??void 0}while(n!==void 0);return{flags:t}},remountDeps:({params:e})=>({appId:e.appId}),validateSearch:e=>({worker:typeof e.worker==`string`?e.worker:void 0})});function cs({disabled:e,hasNext:t,hasPrevious:n,onNext:r,onPrevious:i}){return(0,D.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2`,children:[(0,D.jsx)(We,{"aria-label":`Previous page`,disabled:e||!n,onClick:i,shape:`square`,variant:`secondary`,children:(0,D.jsx)(Ge,{size:18})}),(0,D.jsx)(We,{"aria-label":`Next page`,disabled:e||!t,onClick:r,shape:`square`,variant:`secondary`,children:(0,D.jsx)(Ke,{size:18})})]})}var ls=Rn(`/email/sending`)({component:k(()=>P(()=>import(`./sending-BPjb3S3Y.js`),__vite__mapDeps([51,1,3,52,7,43,6,18,8,53,10,54,26,55,49])),`component`),errorComponent:k(()=>P(()=>import(`./sending-Cow8QNw6.js`),__vite__mapDeps([56,29,1,30,3,7,6,26])),`errorComponent`),loaderDeps:({search:e})=>({worker:e.worker}),loader:async({deps:e})=>{let t=Fo((await qa()).data?.result??[],e.worker===void 0?``:`?worker=${encodeURIComponent(e.worker)}`)?.name,n=await Qa({query:{per_page:24,worker:t},throwOnError:!1});if(n.error||!n.response.ok)throw Error(n.error?.errors?.[0]?.message??`Failed to load sent emails.`);let r=n.data?.result;return{emails:Array.isArray(r)?r:[],worker:t,nextCursor:n.data?.result_info?.has_more?n.data.result_info.cursor:void 0}}}),us=Rn(`/email/routing`)({component:k(()=>P(()=>import(`./routing-DMGTgdaZ.js`),__vite__mapDeps([57,1])),`component`),errorComponent:k(()=>P(()=>import(`./routing-Cow8QNw6.js`),__vite__mapDeps([58,29,1,30,3,7,6,26])),`errorComponent`)}),ds=Rn(`/do/$className`)({component:k(()=>P(()=>import(`./_className-DMGTgdaZ.js`),__vite__mapDeps([59,1])),`component`),errorComponent:k(()=>P(()=>import(`./_className-Cow8QNw6.js`),__vite__mapDeps([60,29,1,30,3,7,6,26])),`errorComponent`),loader:async({params:e})=>{let t=((await Pa()).data?.result??[]).find(t=>t.class===e.className||t.name===e.className||t.id===e.className);if(!t?.id)throw T();return{className:e.className,namespaceId:t.id}},notFoundComponent:k(()=>P(()=>import(`./_className-Daanvg3W.js`),[]),`notFoundComponent`),validateSearch:e=>({worker:typeof e.worker==`string`?e.worker:void 0})});function fs(e,t){if(e===t)return!0;if(e===null||t===null||typeof e!=`object`||typeof t!=`object`||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!fs(e[r],t[r]))return!1;return!0}var ps=1024,ms=0,hs=class{constructor(e,t){this.from=e,this.to=t}},F=class{constructor(e={}){this.id=ms++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=vs.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};F.closedBy=new F({deserialize:e=>e.split(` `)}),F.openedBy=new F({deserialize:e=>e.split(` `)}),F.group=new F({deserialize:e=>e.split(` `)}),F.isolate=new F({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),F.contextHash=new F({perNode:!0}),F.lookAhead=new F({perNode:!0}),F.mounted=new F({perNode:!0});var gs=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[F.mounted.id]}},_s=Object.create(null),vs=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):_s,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(F.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(F.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};vs.none=new vs(``,Object.create(null),0,8);var ys=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new vs(e.name,r,e.id,e.flags):e)}return new e(n)}},bs=new WeakMap,xs=new WeakMap,Ss;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(Ss||={});var Cs=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=gs.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new Ls(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new Ls(bs.get(this)||this.topNode);return r.moveTo(e,t),bs.set(this,r._tree),r}get topNode(){return new ks(this,0,0,null)}resolve(e,t=0){let n=Ds(bs.get(this)||this.topNode,e,t,!1);return bs.set(this,n),n}resolveInner(e,t=0){let n=Ds(xs.get(this)||this.topNode,e,t,!0);return xs.set(this,n),n}resolveStack(e,t=0){return Is(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&Ss.IncludeAnonymous)>0;for(let e=this.cursor(a|Ss.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:Hs(vs.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(vs.none,t,n,r)))}static build(e){return zs(e)}};Cs.empty=new Cs(vs.none,[],[],0);var ws=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},Ts=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return vs.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(Es(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function Es(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Ds(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof ks&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:Ss.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof ks&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var Os=class{cursor(e=0){return new Ls(this,e)}getChild(e,t=null,n=null){let r=As(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return As(this,e,t,n)}resolve(e,t=0){return Ds(this,e,t,!1)}resolveInner(e,t=0){return Ds(this,e,t,!0)}matchContext(e){return js(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},ks=class e extends Os{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&Ss.EnterBracketed&&l instanceof Cs&&(d=gs.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||Es(i,r,u,u+l.length)){if(l instanceof Ts){if(a&Ss.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new Ns(new Ms(o,l,t,u),null,e)}else if(a&Ss.IncludeAnonymous||!l.type.isAnonymous||Rs(l)){let s;if(!(a&Ss.IgnoreMounts)&&(s=gs.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&Ss.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&Ss.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&Ss.IgnoreOverlays)&&(i=gs.get(this._tree))&&i.overlay){let a=t-this.from,o=r&Ss.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function As(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function js(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var Ms=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},Ns=class e extends Os{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&Ss.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new Cs(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function Ps(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof ks&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new Fs(i,n)}var Fs=class{constructor(e,t){this.heads=e,this.node=t}get next(){return Ps(this.heads)}};function Is(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof ks?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=gs.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new ks(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(Ds(o,t,n,!1))}}return i?Ps(i):r}var Ls=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Ss.EnterBracketed,e instanceof ks)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof ks?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&Ss.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ss.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Ss.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&Ss.IncludeAnonymous||e instanceof Ts||!e.type.isAnonymous||Rs(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new Ns(this.buffer,t,this.stack[e]);return this.bufferNode=new Ns(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return js(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return js(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function Rs(e){return e.children.some(e=>e instanceof Ts||!e.type.isAnonymous||Rs(e))}function zs(e){let{buffer:t,nodeSet:n,maxBufferLength:r=ps,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new ws(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:ee,size:te}=o,ne=l,C=c;if(te<0){if(o.next(),te==-1){let t=i[x];_.push(t),v.push(S-e);return}if(te==-3){c=x;return}if(te==-4){l=x;return}throw RangeError(`Unrecognized record size: ${te}`)}let re=s[x],ie,ae,oe=S-e;if(ee-S<=r&&(ae=h(o.pos-t,y))){let t=new Uint16Array(ae.size-ae.skip),r=o.pos-ae.size,i=t.length;for(;o.pos>r;)i=g(ae.start,t,i);ie=new Ts(t,ee-ae.start,n),oe=ae.start-e}else{let e=o.pos-te;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=ee;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,ne,C),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s<t.length&&p(t,n,S,s,S,c,i,ne,C),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(re,C);ie=Hs(re,t,n,0,t.length,0,ee-S,e,e)}else ie=m(re,t,n,ee-S,ne-ee,C)}_.push(ie),v.push(oe)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new Ts(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof Cs){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(F.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[F.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[F.lookAhead,i];o=o?[e].concat(o):[e]}return new Cs(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new Cs(s[e.topID],_.reverse(),v.reverse(),y)}var Bs=new WeakMap;function Vs(e,t){if(!e.isAnonymous||t instanceof Ts||t.type!=e)return 1;let n=Bs.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Cs)){n=1;break}n+=Vs(e,r)}Bs.set(t,n)}return n}function Hs(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=Vs(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=Vs(e,t[s]);for(s++;s<i;s++){let n=Vs(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(Hs(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var Us=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},Ws=class{startParse(e,t,n){return typeof e==`string`&&(e=new Gs(e)),n=n?n.length?n.map(e=>new hs(e.from,e.to)):[new hs(0,0)]:[new hs(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},Gs=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new F({perNode:!0});var Ks=[],qs=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?qs:Ks).push(n+=e[t])})();function Js(e){if(e<768)return!1;for(let t=0,n=Ks.length;;){let r=t+n>>1;if(e<Ks[r])n=r;else if(e>=qs[r])t=r+1;else return!0;if(t==n)return!1}}function Ys(e){return e>=127462&&e<=127487}var Xs=8205;function Zs(e,t,n=!0,r=!0){return(n?Qs:$s)(e,t,r)}function Qs(e,t,n){if(t==e.length)return t;t&&tc(e.charCodeAt(t))&&nc(e.charCodeAt(t-1))&&t--;let r=ec(e,t);for(t+=rc(r);t<e.length;){let i=ec(e,t);if(r==Xs||i==Xs||n&&Js(i))t+=rc(i),r=i;else if(Ys(i)){let n=0,r=t-2;for(;r>=0&&Ys(ec(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function $s(e,t,n){for(;t>0;){let r=Qs(e,t-2,n);if(r<t)return r;t--}return 0}function ec(e,t){let n=e.charCodeAt(t);if(!nc(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return tc(r)?(n-55296<<10)+(r-56320)+65536:n}function tc(e){return e>=56320&&e<57344}function nc(e){return e>=55296&&e<56320}function rc(e){return e<65536?1:2}var I=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=pc(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),ac.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=pc(this,e,t);let n=[];return this.decompose(e,t,n,0),ac.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new lc(this),i=new lc(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new lc(this,e)}iterRange(e,t=this.length){return new uc(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new dc(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new ic(t):ac.from(ic.split(t,[]))}},ic=class e extends I{constructor(e,t=oc(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new fc(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(cc(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=sc(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=pc(this,t,n);let i=sc(this.text,sc(r.text,cc(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):ac.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
19
+ `){[e,t]=pc(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},ac=class e extends I{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=pc(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
20
+ `){[e,t]=pc(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new ic(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof ic&&c&&(n=u[u.length-1])instanceof ic&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new ic(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};I.empty=new ic([``],0);function oc(e){let t=-1;for(let n of e)t+=n.length+1;return t}function sc(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function cc(e,t,n){return sc(e,[``],t,n)}var lc=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof ic?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof ic?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
21
+ `,this;e--}else if(r instanceof ic){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof ic?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},uc=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new lc(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},dc=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(I.prototype[Symbol.iterator]=function(){return this.iter()},lc.prototype[Symbol.iterator]=uc.prototype[Symbol.iterator]=dc.prototype[Symbol.iterator]=function(){return this});var fc=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function pc(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function mc(e,t,n=!0,r=!0){return Zs(e,t,n,r)}function hc(e){return e>=56320&&e<57344}function gc(e){return e>=55296&&e<56320}function _c(e,t){let n=e.charCodeAt(t);if(!gc(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return hc(r)?(n-55296<<10)+(r-56320)+65536:n}function vc(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}function yc(e){return e<65536?1:2}var bc=/\r\n?|\n/,xc=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(xc||={}),Sc=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){Ec(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:Oc(this,e)}mapDesc(e,t=!1){return e.empty?this:Dc(this,e,t)}mapPos(e,t=-1,n=xc.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=xc.Simple&&c>=e&&(n==xc.TrackDel&&r<e&&c>e||n==xc.TrackBefore&&r<e||n==xc.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},Cc=class e extends Sc{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return Ec(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return Dc(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(I.empty);r.push(a?t.slice(i,i+a):I.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:Oc(this,e,!0)}map(e,t=!1){return e.empty?this:Dc(this,e,t,!0)}iterChanges(e,t=!1){Ec(this,e,t)}get desc(){return Sc.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new kc(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);wc(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;wc(n,e,t),t>0&&Tc(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);wc(n,e,-1),wc(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:Sc.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&wc(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?I.of(l.split(r||bc)):l:I.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&wc(i,e-o,-1),wc(i,s-e,d),Tc(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(I.empty);r[e]=I.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function wc(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function Tc(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(I.empty);e.push(n)}}function Ec(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=I.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function Dc(e,t,n,r=!1){let i=[],a=r?[]:null,o=new kc(e),s=new kc(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);wc(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(wc(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(wc(i,0,o.ins),a&&Tc(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;wc(i,t,e<o.i?o.ins:0),a&&e<o.i&&Tc(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?Cc.createSet(i,a):Sc.create(i);else throw Error(`Mismatched change set lengths`)}function Oc(e,t,n=!1){let r=[],i=n?[]:null,a=new kc(e),o=new kc(t);for(let e=!1;;)if(a.done&&o.done)return i?Cc.createSet(r,i):Sc.create(r);else if(a.ins==0)wc(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)wc(r,0,o.ins,e),i&&Tc(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;wc(r,t,n,e),i&&n&&Tc(i,r,o.text)}else o.ins==-1?(wc(r,a.off?0:a.len,t,e),i&&Tc(i,r,a.textBit(t))):(wc(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&Tc(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var kc=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?I.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?I.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Ac=class e{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return L.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return L.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return L.range(e.anchor,e.head)}static create(t,n,r){return new e(t,n,r)}},L=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>Ac.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return Ac.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n))|(r??16777215)<<6)}static range(e,t,n,r){let i=(n??16777215)<<6|(r==null?7:Math.min(6,r));return t<e?Ac.create(t,e,48|i):Ac.create(e,t,(t>e?8:0)|i)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function jc(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var Mc=0,R=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=Mc++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:Nc),!!t.static,t.enables)}of(e){return new Pc([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Pc(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new Pc(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function Nc(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var Pc=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=Mc++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||Ic(e,c)){let r=t(e);if(a?!Fc(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=Yc(o,c);if(this.dependencies.every(t=>t instanceof R?o.facet(t)===e.facet(t):t instanceof zc?o.field(t,!1)==e.field(t,!1):!0)||(a?Fc(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}};function Fc(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Ic(e,t){let n=!1;for(let r of t)Jc(e,r)&1&&(n=!0);return n}function Lc(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=Yc(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)Jc(e,t);return e.values[o]=s(e),1},update(e,n){if(!Ic(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=Ic(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&Nc(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var Rc=R.define({static:!0}),zc=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(Mc++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(Rc).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(Rc),i=n.facet(Rc),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,Rc.of({field:this,create:e})]}get extension(){return this}},Bc={lowest:4,low:3,default:2,high:1,highest:0};function Vc(e){return t=>new Uc(t,e)}var Hc={highest:Vc(Bc.highest),high:Vc(Bc.high),default:Vc(Bc.default),low:Vc(Bc.low),lowest:Vc(Bc.lowest)},Uc=class{constructor(e,t){this.inner=e,this.prec=t}},Wc=class e{of(e){return new Gc(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},Gc=class{constructor(e,t){this.compartment=e,this.inner=t}},Kc=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of qc(t,n,o))e instanceof zc?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,Nc(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>Lc(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function qc(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof Gc&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof Gc){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof Uc)a(e.inner,e.prec);else if(e instanceof zc)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof Pc)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,Bc.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,Bc.default),r.reduce((e,t)=>e.concat(t))}function Jc(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Yc(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var Xc=R.define(),Zc=R.define({combine:e=>e.some(e=>e),static:!0}),Qc=R.define({combine:e=>e.length?e[0]:void 0,static:!0}),$c=R.define(),el=R.define(),tl=R.define(),nl=R.define({combine:e=>e.length?e[0]:!1}),rl=class{constructor(e,t){this.type=e,this.value=t}static define(){return new il}},il=class{of(e){return new rl(this,e)}},al=class{constructor(e){this.map=e}of(e){return new z(this,e)}},z=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new al(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};z.reconfigure=z.define(),z.appendConfig=z.define();var B=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&jc(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};B.time=rl.define(),B.userEvent=rl.define(),B.addToHistory=rl.define(),B.remote=rl.define();function ol(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function sl(e,t,n){let r,i,a;return n?(r=t.changes,i=Cc.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:z.mapEffects(e.effects,r).concat(z.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function cl(e,t,n){let r=t.selection,i=pl(t.annotations);return t.userEvent&&(i=i.concat(B.userEvent.of(t.userEvent))),{changes:t.changes instanceof Cc?t.changes:Cc.of(t.changes||[],n,e.facet(Qc)),selection:r&&(r instanceof L?r:L.single(r.anchor,r.head)),effects:pl(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function ll(e,t,n){let r=cl(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=sl(r,cl(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=B.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return dl(n?ul(i):i)}function ul(e){let t=e.startState,n=!0;for(let r of t.facet($c)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:ol(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=Cc.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=B.create(t,r,e.selection&&e.selection.map(i),z.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(el);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof B?i:Array.isArray(i)&&i.length==1&&i[0]instanceof B?i[0]:ll(t,pl(i),!1)}return e}function dl(e){let t=e.startState,n=t.facet(tl),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=sl(r,cl(t,a,e.changes.newLength),!0))}return r==e?e:B.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var fl=[];function pl(e){return e==null?fl:Array.isArray(e)?e:[e]}var ml=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(ml||={}),hl=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,gl;try{gl=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function _l(e){if(gl)return gl.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>`€`&&(n.toUpperCase()!=n.toLowerCase()||hl.test(n)))return!0}return!1}function vl(e){return t=>{if(!/\S/.test(t))return ml.Space;if(_l(t))return ml.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return ml.Word;return ml.Other}}var yl=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)Jc(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`)}else return Jc(this,n),Yc(this,n)}update(...e){return ll(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(Wc.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(z.reconfigure)?(n=null,r=e.value):e.is(z.appendConfig)&&(n=null,r=pl(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=Kc.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(Zc)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:L.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=pl(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=z.mapEffects(a,c).concat(z.mapEffects(pl(o.effects),l))}return{changes:r,selection:L.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof Cc?t:Cc.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return I.of(t.split(this.facet(e.lineSeparator)||bc))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Jc(this,t),Yc(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof zc&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:L.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=Kc.resolve(t.extensions||[],new Map),r=t.doc instanceof I?t.doc:I.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||bc)),i=t.selection?t.selection instanceof L?t.selection:L.single(t.selection.anchor,t.selection.head):L.single(0);return jc(i,r.length),n.staticFacet(Zc)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
22
+ `}get readOnly(){return this.facet(nl)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Xc))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return vl(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=mc(t,a,!1);if(i(t.slice(e,a))!=ml.Word)break;a=e}for(;o<r;){let e=mc(t,o);if(i(t.slice(o,e))!=ml.Word)break;o=e}return a==o?null:L.range(a+n,o+n)}};yl.allowMultipleSelections=Zc,yl.tabSize=R.define({combine:e=>e.length?e[0]:4}),yl.lineSeparator=Qc,yl.readOnly=nl,yl.phrases=R.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),yl.languageData=Xc,yl.changeFilter=$c,yl.transactionFilter=el,yl.transactionExtender=tl,Wc.reconfigure=z.define();function bl(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(a!==i&&i!==void 0){if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var xl=class{eq(e){return this==e}range(e,t=e){return Cl.create(e,t,this)}};xl.prototype.startSide=xl.prototype.endSide=0,xl.prototype.point=!1,xl.prototype.mapMode=xc.TrackDel;function Sl(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var Cl=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function wl(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var Tl=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n){let r=[],i=[],a=[],o=-1,s=-1;for(let e=0;e<this.value.length;e++){let c=this.value[e],l=this.from[e]+t,u=this.to[e]+t,d,f;if(l==u){let e=n.mapPos(l,c.startSide,c.mapMode);if(e==null||(d=f=e,c.startSide!=c.endSide&&(f=n.mapPos(l,c.endSide),f<d)))continue}else if(d=n.mapPos(l,c.startSide),f=n.mapPos(u,c.endSide),d>f||d==f&&c.startSide>0&&c.endSide<=0)continue;(f-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(s=Math.max(s,f-d)),r.push(c),i.push(d-o),a.push(f-o))}return{mapped:r.length?new e(i,a,r,s):null,pos:o}}},V=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(wl)),this.isEmpty)return n.length?e.of(n):this;let s=new kl(this,null,-1).goto(0),c=0,l=[],u=new Dl;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value)||l.push(Cl.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],o=this.chunk[e],s=t.touchesRange(a,a+o.length);if(s===!1)i=Math.max(i,o.maxPoint),n.push(o),r.push(t.mapPos(a));else if(s===!0){let{mapped:e,pos:s}=o.map(a,t);e&&(i=Math.max(i,e.maxPoint),n.push(e),r.push(s))}}let a=this.nextLayer.map(t);return n.length==0?a:new e(r,n,a||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return Al.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Al.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=Ol(a,o,n),c=new Ml(a,s,i),l=new Ml(o,s,i);n.iterGaps((e,t,n)=>Nl(c,e,l,t,n,r)),n.empty&&n.length==0&&Nl(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=1e9-1;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=Ol(i,a),s=new Ml(i,o,0).goto(n),c=new Ml(a,o,0).goto(n);for(;;){if(s.to!=c.to||!Pl(s.active,c.active)||s.point&&(!c.point||!Sl(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new Ml(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new Dl;for(let r of e instanceof Cl?[e]:t?El(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=t[t.length-1];for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};V.empty=new V([],[],null,-1);function El(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(wl(t,r)>0)return e.slice().sort(wl);t=r}return e}V.empty.nextLayer=V.empty;var Dl=class e{finishChunk(e){this.chunks.push(new Tl(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,n,r){this.addInner(t,n,r)||(this.nextLayer||=new e).add(t,n,r)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(V.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=V.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function Ol(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var kl=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},Al=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new kl(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)jl(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)jl(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),jl(this.heap,0)}}};function jl(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var Ml=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Al.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Fl(this.active,e),Fl(this.activeTo,e),Fl(this.activeRank,e),this.minActive=Ll(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;Il(this.active,t,n),Il(this.activeTo,t,r),Il(this.activeRank,t,i),e&&Il(e,t,this.cursor.from),this.minActive=Ll(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&Fl(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function Nl(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&Sl(e.point,n.point)&&Pl(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&a.boundChange(s),d>s&&!Pl(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function Pl(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!Sl(e[n],t[n]))return!1;return!0}function Fl(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function Il(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function Ll(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function Rl(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=mc(e,i));return r}function zl(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=mc(e,r)}return r===!0?-1:e.length}for(var Bl=`ͼ`,Vl=typeof Symbol>`u`?`__ͼ`:Symbol.for(Bl),Hl=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),H=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},U=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
23
+ `)}static newName(){let e=H[Vl]||1;return H[Vl]=e+1,Bl+e.toString(36)}static mount(e,t,n){let r=e[Hl],i=n&&n.nonce;r?i&&r.setNonce(i):r=new G(e,i),r.mount(Array.isArray(t)?t:[t],e)}},W=new Map,G=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=W.get(n);if(t)return e[Hl]=t;this.sheet=new r.CSSStyleSheet,W.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[Hl]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
24
+ `;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},K={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},Ul={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},Wl=typeof navigator<`u`&&/Mac/.test(navigator.platform),Gl=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Kl=0;Kl<10;Kl++)K[48+Kl]=K[96+Kl]=String(Kl);for(var Kl=1;Kl<=24;Kl++)K[Kl+111]=`F`+Kl;for(var Kl=65;Kl<=90;Kl++)K[Kl]=String.fromCharCode(Kl+32),Ul[Kl]=String.fromCharCode(Kl);for(var ql in K)Ul.hasOwnProperty(ql)||(Ul[ql]=K[ql]);function Jl(e){var t=!(Wl&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||Gl&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?Ul:K)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var Yl=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},Xl=typeof document<`u`?document:{documentElement:{style:{}}},Zl=/Edge\/(\d+)/.exec(Yl.userAgent),Ql=/MSIE \d/.test(Yl.userAgent),$l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Yl.userAgent),eu=!!(Ql||$l||Zl),tu=!eu&&/gecko\/(\d+)/i.test(Yl.userAgent),nu=!eu&&/Chrome\/(\d+)/.exec(Yl.userAgent),ru=`webkitFontSmoothing`in Xl.documentElement.style,iu=!eu&&/Apple Computer/.test(Yl.vendor),au=iu&&(/Mobile\/\w+/.test(Yl.userAgent)||Yl.maxTouchPoints>2),q={mac:au||/Mac/.test(Yl.platform),windows:/Win/.test(Yl.platform),linux:/Linux|X11/.test(Yl.platform),ie:eu,ie_version:Ql?Xl.documentMode||6:$l?+$l[1]:Zl?+Zl[1]:0,gecko:tu,gecko_version:tu?+(/Firefox\/(\d+)/.exec(Yl.userAgent)||[0,0])[1]:0,chrome:!!nu,chrome_version:nu?+nu[1]:0,ios:au,android:/Android\b/.test(Yl.userAgent),webkit:ru,webkit_version:ru?+(/\bAppleWebKit\/(\d+)/.exec(Yl.userAgent)||[0,0])[1]:0,safari:iu,safari_version:iu?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Yl.userAgent)||[0,0])[1]:0,tabSize:Xl.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function ou(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var su=Object.create(null);function cu(e,t,n){if(e==t)return!0;e||=su,t||=su;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function lu(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function uu(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function du(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var fu=class{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},pu=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(pu||={}),mu=class extends xl{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new hu(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new _u(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=vu(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new _u(e,n,r,t,e.widget||null,!0)}static line(e){return new gu(e)}static set(e,t=!1){return V.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};mu.none=V.empty;var hu=class e extends mu{constructor(e){let{start:t,end:n}=vu(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?ou(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||su}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&cu(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};hu.prototype.point=!1;var gu=class e extends mu{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&cu(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};gu.prototype.mapMode=xc.TrackBefore,gu.prototype.point=!0;var _u=class e extends mu{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?xc.TrackBefore:xc.TrackAfter:xc.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?pu.WidgetBefore:pu.WidgetAfter:pu.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&yu(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};_u.prototype.point=!0;function vu(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function yu(e,t){return e==t||!!(e&&t&&e.compare(t))}function bu(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var xu=class e extends xl{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&cu(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||su)}static set(e,t=!1){return V.of(e,t)}};xu.prototype.startSide=xu.prototype.endSide=-1;function Su(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Cu(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function wu(e,t){if(!t.anchorNode)return!1;try{return Cu(e,t.anchorNode)}catch{return!1}}function Tu(e){return e.nodeType==3?Bu(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function Eu(e,t,n,r){return n?ku(e,t,n,r,-1)||ku(e,t,n,r,1):!1}function Du(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function Ou(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function ku(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Au(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=Du(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?Au(e):0}else return!1}}function Au(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function ju(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Mu(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function Nu(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function Pu(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=Mu(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=Nu(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g){if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function Fu(e){let t=e.ownerDocument,n,r;for(let i=e.parentNode;i&&!(i==t.body||n&&r);)if(i.nodeType==1)!r&&i.scrollHeight>i.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}var Iu=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Au(t):0),n,Math.min(e.focusOffset,n?Au(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}},Lu=null;q.safari&&q.safari_version>=26&&(Lu=!1);function Ru(e){if(e.setActive)return e.setActive();if(Lu)return e.focus(Lu);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(Lu==null?{get preventScroll(){return Lu={preventScroll:!0},!0}}:void 0),!Lu){Lu=!1;for(let e=0;e<t.length;){let n=t[e++],r=t[e++],i=t[e++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}var zu;function Bu(e,t,n=t){let r=zu||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function Vu(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function Hu(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function Uu(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,Au(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=Au(n))}else if(n==e)return!0;else r=Du(n),n=n.parentNode}function Wu(e){return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function Gu(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=Au(n)}else if(n.parentNode&&!Ou(n))r=Du(n),n=n.parentNode;else return null}function Ku(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!Ou(n))r=Du(n)+1,n=n.parentNode;else return null}var qu=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,Du(t),n)}static after(t,n){return new e(t.parentNode,Du(t)+1,n)}},J=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(J||={}),Ju=J.LTR,Yu=J.RTL;function Xu(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var Zu=Xu(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),Qu=Xu(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),$u=Object.create(null),ed=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);$u[t]=n,$u[n]=-t}function td(e){return e<=247?Zu[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?Qu[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var nd=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,rd=class{get dir(){return this.level%2?Yu:Ju}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function id(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!id(r.inner,i.inner))return!1}return!0}var Y=[];function ad(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=td(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),Y[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=Y[e];if(i==128)e<s-1&&t==Y[e+1]&&t&24?i=Y[e]=t:Y[e]=256;else if(i==64){let i=e+1;for(;i<s&&Y[i]==64;)i++;let a=e&&t==8||i<n&&Y[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)Y[t]=a;e=i-1}else i==8&&r==1&&(Y[e]=1);t=i,i&7&&(r=i)}}}function od(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=$u[n=e.charCodeAt(t)]){if(r<0){for(let e=s-3;e>=0;e-=3)if(ed[e+1]==-r){let n=ed[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(Y[t]=Y[ed[e]]=r),s=e;break}}else if(ed.length==189)break;else ed[s++]=t,ed[s++]=n,ed[s++]=c}else if((o=Y[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=ed[t+2];if(n&2)break;if(e)ed[t+2]|=2;else{if(n&4)break;ed[t+2]|=4}}}}}function sd(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=Y[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(Y[o]==256)o++;else break;let l=a==1,u=l==((o<t?Y[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),Y[--t]=u;c=o}else a=o,c++}}}function cd(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=Y[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(Y[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new rd(c,m.from,f)),ld(e,m.direction==Ju==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?Y[p]!=s:Y[p]==s))break;else p++;d?cd(e,c,p,r+1,i,d,o):c<p&&o.push(new rd(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=Y[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(Y[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new rd(m.to,c,f)),ld(e,m.direction==Ju==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?Y[p-1]!=s:Y[p-1]==s))break;else p--;d?cd(e,p,c,r+1,i,d,o):p<c&&o.push(new rd(p,c,f)),c=p}}function ld(e,t,n,r,i,a,o){let s=t%2?2:1;ad(e,i,a,r,s),od(e,i,a,r,s),sd(i,a,r,s),cd(e,i,a,t,n,r,o)}function ud(e,t,n){if(!e)return[new rd(0,0,+(t==Yu))];if(t==Ju&&!n.length&&!nd.test(e))return dd(e.length);if(n.length)for(;e.length>Y.length;)Y[Y.length]=256;let r=[],i=t==Ju?0:1;return ld(e,i,i,n,0,e.length,r),r}function dd(e){return[new rd(0,e,0)]}var fd=``;function pd(e,t,n,r,i){let a=r.head-e.from,o=rd.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=mc(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),fd=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!i<s.level?L.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level):L.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function md(e,t,n){for(let r=t;r<n;r++){let t=td(e.charCodeAt(r));if(t==1)return Ju;if(t==2||t==4)return Yu}return Ju}var hd=R.define(),gd=R.define(),_d=R.define(),vd=R.define(),yd=R.define(),bd=R.define(),xd=R.define(),X=R.define(),Sd=R.define(),Cd=R.define({combine:e=>e.some(e=>e)}),wd=R.define({combine:e=>e.some(e=>e)}),Td=R.define(),Ed=class e{constructor(e,t=`nearest`,n=`nearest`,r=5,i=5,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(L.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},Dd=z.define({map:(e,t)=>e.map(t)}),Od=z.define();function kd(e,t,n){let r=e.facet(vd);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var Ad=R.define({combine:e=>!e.length||e[0]}),jd=0,Md=R.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),Nd=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(Md.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Md.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(jd++,t,r,i,e=>{let t=[];return o&&t.push(Ld.of(t=>{let n=t.plugin(e);return n?o(n):mu.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},Pd=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){kd(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(kd(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){kd(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},Fd=R.define(),Id=R.define(),Ld=R.define(),Rd=R.define(),zd=R.define(),Bd=R.define(),Vd=R.define();function Hd(e,t){let n=e.state.facet(Vd);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return V.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=md(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var Ud=R.define();function Wd(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(Ud)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var Gd=R.define(),Kd=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},qd=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Cc.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new Kd(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Jd=[],Yd=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Jd}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&lu(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let n=Du(this.dom),r=this.length?e>0:t>0;return new qu(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Qd)return e;return null}static get(e){return e.cmTile}},Xd=class extends Yd{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=Zd(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=Zd(r);this.length=a}};function Zd(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var Qd=class extends Xd{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=Yd.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof $d)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},$d=class e extends Xd{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},ef=class e extends Xd{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0||n&&nf(a,d)))&&(f>c||d.flags&32)?(a=d,o=c-u):(u<c||d.flags&16&&!d.isHidden)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t){let n=this.resolveInline(e,t,!0);return n?n.tile.coordsIn(Math.max(0,n.offset),t):tf(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new qu(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new qu(e.dom,0);e==n.tile&&(a=!0)}}return new qu(this.dom,0)}};function tf(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=Tu(t);return n[n.length-1]||null}function nf(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var rf=class e extends Xd{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},af=class e extends Yd{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let n=this.dom.nodeValue.length;e>n&&(e=n);let r=e,i=e,a=0;e==0&&t<0||e==n&&t>=0?q.chrome||q.gecko||(e?(r--,a=1):i<n&&(i++,a=-1)):t<0?r--:i<n&&i++;let o=Bu(this.dom,r,i).getClientRects();if(!o.length)return null;let s=o[(a?a<0:t>=0)?0:o.length-1];return q.safari&&!a&&s.width==0&&(s=Array.prototype.find.call(o,e=>e.width)||s),a?ju(s,a<0):s||null}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},of=class e extends Yd{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return ju(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return ju(n,!r)}}get overrideDOMText(){if(!this.length)return I.empty;let{root:e}=this;if(!e)return I.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},sf=class extends Yd{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return I.empty}coordsIn(e){return this.dom.getBoundingClientRect()}},cf=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){if(i==r.length)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(e){let t=Math.min(e,r.length-i);n&&n.skip(r,i,i+t),e-=t,i+=t}else break}else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},lf=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},uf=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new af(a.dom,a.text+e);t.parent=i}else i.append(r||af.of(e,this.cache.find(af)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?bf(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof rf&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(bf(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=Yd.get(n.dom);e&&e.setDOM(bf(n.dom))}let e=rf.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=Yd.get(e.text);i&&this.cache.reused.set(i,2);let a=new af(e.text,e.text.nodeValue);a.flags|=8,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=_f;let n=ef.start(e,t||this.cache.find(ef)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof rf&&a.mark.eq(i))n=a,t--;else{let e=rf.of(i,this.cache.find(rf,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!hf(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(q.ios&&hf(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(Sf,0,32)||new of(Sf.toDOM(),0,Sf,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new lf(e.from,e.to,e.value,e.rank),n=this.wrappers.length;for(;n>0&&(this.wrappers[n-1].rank-t.rank||this.wrappers[n-1].to-t.to)<0;)n--;this.wrappers.splice(n,0,t)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof $d&&n.wrapper.eq(t.wrapper))e=n;else{let n=$d.of(t.wrapper,this.cache.find($d,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(sf,void 0,1);return n&&(n.flags=t),n||new sf(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},df=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},ff=[of,ef,af,rf,sf,$d,Qd];for(let e=0;e<ff.length;e++)ff[e].bucket=e;var pf=class{constructor(e){this.view=e,this.buckets=ff.map(()=>[]),this.index=ff.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=i.length-1;e>=0;e--){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new of(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},mf=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new pf(e),this.text=new df(e.state.doc),this.builder=new uf(this.cache,new Qd(e,e.contentDOM),V.iter(n)),this.cache.reused.set(t,2),this.old=new cf(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=yf(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget()){if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?of.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof sf)this.cache.add(e);else if(e instanceof rf)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof rf&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof rf&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=0,a=V.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof _u){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?xf.block:xf.inline),c=gf(a),l=this.cache.findWidget(i,t-e,c)||of.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=vf(n,a);t>e&&this.text.skip(t-e)},span:(e,t,i,a)=>{for(let o=e;o<t;){let s=this.text.next(Math.min(512,t-o));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),o++):(r.ensureLine(n),r.addText(s,i,o==e?a:i.length),o+=s.length),n=null}}});r.addLineStartIfNotCovered(n),this.openWidget=a>i,this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=Yd.get(r);if(r==this.view.contentDOM)break;e instanceof rf?t.push(e):e?.isLine()?n=e:e instanceof $d||(r.nodeName==`DIV`&&!n&&r!=this.view.contentDOM?n=new ef(r,_f):n||t.push(rf.of(new hu({tagName:r.nodeName.toLowerCase(),attributes:du(r)}),r)))}return{line:n,marks:t}}};function hf(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function gf(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var _f={class:`cm-line`};function vf(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r||(e||={class:`cm-line`},n&&ou(n,e),r&&(e.class+=` `+r)),e}function yf(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof rf&&t.push(r.mark)}return t}function bf(e){let t=Yd.get(e);return t&&t.setDOM(e.cloneNode()),e}var xf=class extends fu{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};xf.inline=new xf(`span`),xf.block=new xf(`div`);var Sf=new class extends fu{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},Cf=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=mu.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Qd(e,e.contentDOM),this.updateInner([new Kd(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!Pf(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?Df(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new Kd(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(q.ie||q.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=Af(i,this.decorations,e.changes);o.length&&(t=Kd.extendWithRanges(t,o));let s=Mf(a,this.blockWrappers,e.changes);return s.length&&(t=Kd.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new mf(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);this.tile=r.run(e,t),wf(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=q.chrome||q.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof Ff&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(Od)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(Ad)||n.tabIndex>-1)&&wu(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),q.gecko&&s.empty&&!this.hasComposition&&Tf(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new qu(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!Eu(c.node,c.offset,u.anchorNode,u.anchorOffset)||!Eu(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{q.android&&q.chrome&&n.contains(u.focusNode)&&Nf(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=Su(this.view.root);if(e){if(s.empty){if(q.gecko){let e=Of(c.node,c.offset);if(e&&e!=3){let t=(e==1?Gu:Ku)(c.node,c.offset);t&&(c=new qu(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new qu(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new qu(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Eu(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Su(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=Au(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!Yd.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(e,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.widget instanceof Ff?null:n.coordsInWidget(r,t,!0):n.coordsIn(r,t)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=mc(e.text,t);if(n==t)return null;let r=Bu(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==J.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof $d)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?Tu(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?J.RTL:J.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=Tu(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=Tu(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(mu.replace({widget:new Ff(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return mu.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Ld).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(zd).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(V.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(Rd).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(Td))try{if(t(this.view,e.range,e))return!0}catch(e){kd(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=Wd(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(Pu(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==J.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);e&&e.dom.scrollIntoView({block:`nearest`})}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){wf(this.tile)}};function wf(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)wf(n,t)}}function Tf(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function Ef(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=Gu(n.focusNode,n.focusOffset),i=Ku(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=Yd.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=Yd.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function Df(e,t,n){let r=Ef(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new Kd(c.mapPos(a),c.mapPos(o),a,o),text:i}}function Of(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var kf=class{constructor(){this.changes=[]}compareRange(e,t){bu(e,t,this.changes)}comparePoint(e,t){bu(e,t,this.changes)}boundChange(e){bu(e,e,this.changes)}};function Af(e,t,n){let r=new kf;return V.compare(e,t,n,r),r.changes}var jf=class{constructor(){this.changes=[]}compareRange(e,t){bu(e,t,this.changes)}comparePoint(){}boundChange(e){bu(e,e,this.changes)}};function Mf(e,t,n){let r=new jf;return V.compare(e,t,n,r),r.changes}function Nf(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function Pf(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var Ff=class extends fu{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function If(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return L.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=mc(i.text,a,!1):s=mc(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=mc(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=mc(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return L.range(o+i.from,s+i.from)}function Lf(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+zl(o,a,e.state.tabSize)}function Rf(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==pu.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function zf(e,t,n,r){let i=Rf(e,t.head,t.assoc||-1),a=!r||i.type!=pu.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==J.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return L.cursor(o,n?-1:1)}return L.cursor(n?i.to:i.from,n?-1:1)}function Bf(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=pd(i,a,o,s,n),l=fd;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
25
+ `,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function Vf(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==ml.Space&&(i=t),i==t}}function Hf(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return L.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,(t.empty?t.assoc:0)||(n?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=r??e.viewState.heightOracle.textHeight>>1,p=qf(e,{x:d,y:s+f*a},!1,a);return L.cursor(p.pos,p.assoc,void 0,o)}function Uf(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function Wf(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=Uf(e,i.from,0);t!=i.from&&(a=L.cursor(t,-1))}else{let t=Uf(e,i.from,-1),n=Uf(e,i.to,1);(t!=i.from||n!=i.to)&&(a=L.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?L.create(n,t.mainIndex):t}function Gf(e,t,n){let r=Uf(e.state.facet(Bd).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:L.cursor(r,r<n.from?1:-1)}var Kf=class{constructor(e,t){this.pos=e,this.assoc=t}};function qf(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new Kf(0,1);if(c>e.viewState.docHeight)return new Kf(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==pu.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==pu.Text){let t=Lf(e,i,l,o,s);return new Kf(t,t==l.from?1:-1)}}if(l.type!=pu.Text)return c<(l.top+l.bottom)/2?new Kf(l.from,1):new Kf(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new Jf(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var Jf=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[rd.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[rd.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t){let n=0,r=e.length-1,i=new Set,a=this.bidiIn(e[0],e[r]),o,s,c=-1,l=1e9,u;search:for(;n<r;){let d=r-n,f=n+r>>1;adjust:if(i.has(f)){let e=n+Math.floor(Math.random()*d);for(let t=0;t<d;t++){if(!i.has(e)){f=e;break adjust}e++,e==r&&(e=n)}break search}i.add(f);let p=t(f);if(p)for(let t=0;t<p.length;t++){let i=p[t],d=0;if(i.bottom<this.y)(!o||o.bottom<i.bottom)&&(o=i),d=1;else if(i.top>this.y)(!s||s.top>i.top)&&(s=i),d=-1;else{let e=i.left>this.x?this.x-i.left:i.right<this.x?this.x-i.right:0,t=Math.abs(e);t<l&&(c=f,l=t,u=i),e&&(d=e<0==(this.baseDir==J.LTR)?-1:1)}d==-1&&(!a||this.baseDirAt(e[f],1))?r=f:d==1&&(!a||this.baseDirAt(e[f+1],-1))&&(n=f+1)}}if(!u){let n=o&&(!s||this.y-o.bottom<s.top-this.y)?o:s;return this.y=(n.top+n.bottom)/2,this.scan(e,t)}let d=(a?this.dirAt(e[c],1):this.baseDir)==J.LTR;return{i:c,after:this.x>(u.left+u.right)/2==d}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=mc(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return Bu(e.dom,i,a).getClientRects()});return r.after?new Kf(n[r.i+1],-1):new Kf(n[r.i],1)}scanTile(e,t){if(!e.length)return new Kf(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:Bu(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Kf(n[r.i+1],-1):new Kf(a,1)}},Yf=`￿`,Xf=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(yl.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Yf}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=Yd.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=Yd.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:Ou(r))||Ou(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!Qf(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=Yd.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(Zf(e,n.node,n.offset)?t:0))}};function Zf(e,t,n){for(;;){if(!t||n<Au(t))return!1;if(t==e)return!0;n=Du(t)+1,t=t.parentNode}}function Qf(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=Yd.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var $f=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},ep=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=tp(e.docView.tile,t,n,0))){let t=i||a?[]:op(e),n=new Xf(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=sp(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!Cu(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!Cu(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),o=e.viewport;if((q.ios||q.chrome)&&e.state.selection.main.empty&&n!=r&&(o.from>0||o.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=o.from-t,s=o.to-i;(a==0||a==1||t==0)&&(s==0||s==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}this.newSel=e.inputState.composing>-1&&e.state.selection.ranges.length>1?e.state.selection.replaceRange(L.range(r,n)):L.single(r,n)}}};function tp(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return tp(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function np(e,t){let n,{newSel:r}=t,i=e.state.selection.main,a=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:o}=t.bounds,s=i.from,c=null;(a===8||q.android&&t.text.length<o-r)&&(s=i.to,c=`end`);let l=ap(e.state.doc.sliceString(r,o,Yf),t.text,s-r,c);l&&(q.chrome&&a==13&&l.toB==l.from+2&&t.text.slice(l.from,l.toB)==`￿￿`&&l.toB--,n={from:r+l.from,to:r+l.toA,insert:I.of(t.text.slice(l.from,l.toB).split(Yf))})}else r&&(!e.hasFocus&&e.state.facet(Ad)||cp(r,i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:(q.mac||q.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=L.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:I.of([n.insert.toString().replace(`.`,` `)])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:e.state.doc.lineAt(i.from).to<i.to&&e.docView.lineHasWidget(i.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:e.state.toText(e.inputState.insertingText)}:q.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
26
+ `&&e.lineWrapping&&(r&&=L.single(r.main.anchor-1,r.main.head-1),n={from:i.from,to:i.to,insert:I.of([` `])}),n)return rp(e,n,r,a);if(r&&!cp(r,i)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=Wf(e.state.facet(Bd).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function rp(e,t,n,r=-1){if(q.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(q.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&Vu(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&Vu(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&Vu(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=ip(e,t,n);return e.state.facet(bd).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function ip(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=Uf(i.facet(Bd).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:L.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&Ef(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?L.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function ap(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function op(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new $f(n,r)),(i!=n||a!=r)&&t.push(new $f(i,a))),t}function sp(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?L.single(n+t,r+t):null}function cp(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var lp=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,q.safari&&e.contentDOM.addEventListener(`input`,()=>null),q.gecko&&Gp(e.contentDOM.ownerDocument)}handleEvent(e){Sp(this.view,e)&&!this.ignoreDuringComposition(e)&&(e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e))))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=dp(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&mp.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),q.android&&q.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return q.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=fp.find(t=>t.keyCode==e.keyCode))&&!e.ctrlKey||pp.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Vu(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:q.safari&&!q.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function up(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){kd(n.state,e)}}}function dp(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(up(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(up(t.value,r))}}for(let e in Cp)n(e).handlers.push(Cp[e]);for(let e in wp)n(e).observers.push(wp[e]);return t}var fp=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],pp=`dthko`,mp=[16,17,18,20,91,92,224,225],hp=6;function gp(e){return Math.max(0,e)*.7+8}function _p(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var vp=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=Fu(e.contentDOM),this.atoms=e.state.facet(Bd).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(yl.allowMultipleSelections)&&yp(e,t),this.dragging=xp(e,t)&&Pp(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&_p(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=Wd(this.view);e.clientX-s.left<=r+hp?t=-gp(r-e.clientX):e.clientX+s.right>=a-hp&&(t=gp(e.clientX-a)),e.clientY-s.top<=i+hp?n=-gp(i-e.clientY):e.clientY+s.bottom>=o-hp&&(n=gp(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=Wf(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function yp(e,t){let n=e.state.facet(hd);return n.length?n[0](t):q.mac?t.metaKey:t.ctrlKey}function bp(e,t){let n=e.state.facet(gd);return n.length?n[0](t):q.mac?!t.altKey:!t.ctrlKey}function xp(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Su(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function Sp(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Yd.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var Cp=Object.create(null),wp=Object.create(null),Tp=q.ie&&q.ie_version<15||q.ios&&q.webkit_version<604;function Ep(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),Op(e,n.value)},50)}function Dp(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function Op(e,t){t=Dp(e.state,X,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(Bp!=null&&n.selection.ranges.every(e=>e.empty)&&Bp==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:L.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:L.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}wp.scroll=e=>{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},Cp.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),wp.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin(`select.pointer`)},wp.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},Cp.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(_d))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=Fp(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new vp(e,t,n,r)),r&&e.observer.ignore(()=>{Ru(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function kp(e,t,n,r){if(r==1)return L.cursor(t,n);if(r==2)return If(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,L.range(a,o)}}var Ap=q.ie&&q.ie_version<=11,jp=null,Mp=0,Np=0;function Pp(e){if(!Ap)return e.detail;let t=jp,n=Np;return jp=e,Np=Date.now(),Mp=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Mp+1)%3:1}function Fp(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=Pp(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=kp(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=kp(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?L.range(i,a):L.range(a,i)}return a?i.replaceRange(i.main.extend(l.from,l.to)):o&&r==1&&i.ranges.length>1&&(c=Ip(i,s.pos))?c:o?i.addRange(l):L.create([l])}}}function Ip(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return L.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}Cp.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=L.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,Dp(e.state,Sd,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},Cp.dragend=e=>(e.inputState.draggedContent=null,!1);function Lp(e,t,n,r){if(n=Dp(e.state,X,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&bp(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}Cp.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&Lp(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData(`Text`);if(n)return Lp(e,t,n,!0),!0}return!1},Cp.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=Tp?null:t.clipboardData;return n?(Op(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(Ep(e),!1)};function Rp(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function zp(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:Dp(e,Sd,t.join(e.lineBreak)),ranges:n,linewise:r}}var Bp=null;Cp.copy=Cp.cut=(e,t)=>{if(!wu(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=zp(e.state);if(!n&&!i)return!1;Bp=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=Tp?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(Rp(e,n),!1)};var Vp=rl.define();function Hp(e,t){let n=[];for(let r of e.facet(xd)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:Vp.of(!0)}):null}function Up(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Hp(e.state,t);n?e.dispatch(n):e.update([])}},10)}wp.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Up(e)},wp.blur=e=>{e.observer.clearSelectionRange(),Up(e)},wp.compositionstart=wp.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},wp.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,q.chrome&&q.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},wp.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},Cp.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return rp(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(q.chrome&&q.android&&(n=fp.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return q.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),q.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>wp.compositionend(e,t),20),!1};var Wp=new Set;function Gp(e){Wp.has(e)||(Wp.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var Kp=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],qp=!1;function Jp(){qp=!1}var Yp=class{constructor(e){this.lineWrapping=e,this.doc=I.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Kp.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=Kp.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o||Math.abs(n-this.charWidth)>.1;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},Xp=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},Zp=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?pu.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof _u?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},Qp=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(Qp||={}),$p=.001,em=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>$p&&(qp=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,Qp.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,Qp.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,Qp.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=lm.build(n.setDoc(a),e,l,u);i=tm(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new im(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r){if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break}else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=0;return t[n-1]==null?(o=1,n--):t[n]??(o=1,r++),new om(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function tm(e,t){return e==t?e:(e.constructor!=t.constructor&&(qp=!0),t)}em.prototype.size=1;var nm=mu.replace({}),rm=class extends em{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new Zp(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new Zp(r,0,n,this.spaceAbove,nm):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,Qp.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},im=class e extends rm{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new Zp(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof am&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof am?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):em.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},am=class e extends em{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new Zp(a.from,a.length,l,c,0)}{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new Zp(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==Qp.ByHeight)return this.blockAt(e,n,r,i);if(t==Qp.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new Zp(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new Zp(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new Zp(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return em.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=$p&&(s=-2);let c=new im(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=em.of(r);return(s<0||Math.abs(c.height-this.height)>=$p||Math.abs(s-this.heightMetrics(t,n).perLine)>=$p)&&(qp=!0),tm(this,c)}return(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}},om=class extends em{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==Qp.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==Qp.ByPosNoHeight?Qp.ByPosNoHeight:Qp.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,Qp.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&sm(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),sm(i,e)}return em.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?em.of(this.break?[e,null,t]:[e,t]):(this.left=tm(this.left,e),this.right=tm(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function sm(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof am&&(r=e[t+1])instanceof am&&e.splice(t-1,3,new am(n.length+1+r.length))}var cm=5,lm=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof im?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new im(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new rm(a,r,n)):(a||i||r>=cm)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new im(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new am(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof im)return e;let t=new im(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof im)&&!this.isCovered?this.nodes.push(new im(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof im&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return V.spans(n,r,i,a,0),a.finish(r)}};function um(e,t,n){let r=new dm;return V.compare(e,t,n,r,0),r.changes}var dm=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&bu(e,t,this.changes,5)}};function fm(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function pm(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function mm(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var hm=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return mu.replace({widget:new gm(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},gm=class extends fu{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},_m=class{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Cm,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=J.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let t=e.facet(Id).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new Yp(t),this.stateDeco=wm(e),this.heightMap=em.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle.setDoc(e.doc),[new Kd(0,0,0,e.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=mu.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new vm(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Cm:new Tm(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Em(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=wm(this.state);let r=e.changedRanges,i=Kd.extendWithRanges(r,um(n,this.stateDeco,e?e.changes:Cc.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);Jp(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||qp)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(wd)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?J.RTL:J.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=Nu(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=f&&(this.scrollAnchorHeight=-1,this.scrollTop=f),this.scrolledToBottom=Wu(e.scrollDOM);let p=(this.printing?mm:fm)(t,this.paddingTop),m=p.top-this.pixelViewport.top,h=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(s=!0)),!this.inView&&!this.scrollTarget&&!pm(e.dom))return 0;let _=o.width;if((this.contentDOMWidth!=_||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(_-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,_/o),t),a&&(e.docView.minWidth=0,c|=16)}m>0&&h>0?l=Math.max(m,h):m<0&&h<0&&(l=Math.min(m,h)),Jp();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?em.empty().applyChanges(this.stateDeco,I.empty,this.heightOracle,[new Kd(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new Xp(n.from,i))}qp&&(c|=2)}let v=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return v&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new vm(r.lineAt(a-n*1e3,Qp.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,Qp.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,Qp.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new vm(r.lineAt(o-500,Qp.ByHeight,i,0,0).from,r.lineAt(o+n+500,Qp.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new vm(this.heightMap.lineAt(n,Qp.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Qp.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Qp.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,Qp.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2e3&&i<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new hm(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=J.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=Sm(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(L.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new hm(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=pu.Text)return;let i=ym(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=xm(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=bm(i,n),l=bm(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=xm(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=bm(i,f),l=bm(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=xm(r,n)-xm(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){hm.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=mu.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];V.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Em(this.heightMap.lineAt(e,Qp.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Em(this.heightMap.lineAt(this.scaler.fromDOM(e),Qp.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Em(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},vm=class{constructor(e,t){this.from=e,this.to=t}};function ym(e,t,n){let r=[],i=e,a=0;return V.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function bm({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function xm(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function Sm(e,t){for(let n of e)if(t(n))return n}var Cm={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function wm(e){let t=e.facet(Ld).filter(e=>typeof e!=`function`),n=e.facet(zd).filter(e=>typeof e!=`function`);return n.length&&t.push(V.join(n)),t}var Tm=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,Qp.ByPos,e,0,0).top,o=t.lineAt(i,Qp.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function Em(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new Zp(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>Em(e,t)):e._content)}var Dm=R.define({combine:e=>e.join(` `)}),Om=R.define({combine:e=>e.indexOf(!0)>-1}),km=U.newName(),Am=U.newName(),jm=U.newName(),Mm={"&light":`.`+Am,"&dark":`.`+jm};function Nm(e,t,n){return new U(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var Pm=Nm(`.`+km,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{backgroundImage:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)`,backgroundPosition:`center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},Mm),Fm={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Im=q.ie&&q.ie_version<=11,Lm=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new Iu,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(q.ie&&q.ie_version<=11||q.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&q.android&&e.constructor.EDIT_CONTEXT!==!1&&!(q.chrome&&q.chrome_version<126)&&(this.editContext=new Vm(e),e.state.facet(Ad)&&(e.contentDOM.editContext=this.editContext.editContext)),Im&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type!=`change`&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Ad)?n.root.activeElement!=this.dom:!wu(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);i&&i.isWidget()&&i.widget.ignoreEvent(e)?t||(this.selectionChanged=!1):(q.ie&&q.ie_version<=11||q.android&&q.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Eu(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Su(e.root);if(!t)return!1;let n=q.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Bm(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=wu(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Uu(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,Fm),Im&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Im&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&Vu(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&wu(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new ep(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=np(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!cp(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=Rm(t,e.previousSibling||e.target.previousSibling,-1),r=Rm(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return e.type==`characterData`?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ad)!=e.state.facet(Ad)&&(e.view.contentDOM.editContext=e.state.facet(Ad)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function Rm(e,t,n){for(;t;){let r=Yd.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function zm(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return Eu(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function Bm(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return zm(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?zm(e,n):null}var Vm=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=ap(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=L.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));cp(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:I.of(n.text.slice(l.from,l.toB).split(`
27
+ `))};if((q.mac||q.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:I.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);rp(e,u,L.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(mu.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:Od.of(mu.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=Su(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to){if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}r=null,this.revertPending(e.state)}if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},Z=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Hu(e.parent)||document,this.viewState=new _m(e.state||yl.create(e)),e.scrollTo&&e.scrollTo.is(Dd)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Md).map(e=>new Pd(e));for(let e of this.plugins)e.update(this);this.observer=new Lm(this),this.inputState=new lp(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Cf(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof B?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let t=!1,n=!1,r,i=this.state;for(let t of e){if(t.startState!=i)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);i=t.state}if(this.destroyed){this.viewState.state=i;return}let a=this.hasFocus,o=0,s=null;e.some(e=>e.annotation(Vp))?(this.inputState.notifiedFocused=a,o=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,s=Hp(i,a),s||(o=1));let c=this.observer.delayedAndroidKey,l=null;if(c?(this.observer.clearDelayedAndroidKey(),l=this.observer.readChange(),(l&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(l=null)):this.observer.clear(),i.facet(yl.phrases)!=this.state.facet(yl.phrases))return this.setState(i);r=qd.create(this,i,e),r.flags|=o;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&=u.map(t.changes),t.scrollIntoView){let{main:e}=t.state.selection;u=new Ed(e.empty?e:L.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Dd)&&(u=e.value.clip(this.state))}this.viewState.update(r,u),this.bidiCache=Wm.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(Gd)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(r.startState.facet(Dm)!=r.state.facet(Dm)&&(this.viewState.mustMeasureContent=!0),(t||n||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!r.empty)for(let e of this.state.facet(yd))try{e(r)}catch(e){kd(this.state,e,`update listener`)}(s||l)&&Promise.resolve().then(()=>{s&&this.state==s.startState&&this.dispatch(s),l&&!np(this,l)&&c.force&&Vu(this.contentDOM,c.key,c.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new _m(e),this.plugins=e.facet(Md).map(e=>new Pd(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new Cf(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Md),n=e.state.facet(Md);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new Pd(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){kd(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:a}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0){if(Wu(n))i=-1,a=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}}this.updateState=1;let o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let s=[];o&4||([this.measureRequests,s]=[s,this.measureRequests]);let c=s.map(e=>{try{return e.read(this)}catch(e){return kd(this.state,e),Um}}),l=qd.create(this,this.state,[]),u=!1;l.flags|=o,t?t.flags|=o:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),u=this.docView.update(l),u&&this.docViewUpdate());for(let e=0;e<s.length;e++)if(c[e]!=Um)try{let t=s[e];t.write&&t.write(c[e],this)}catch(e){kd(this.state,e)}if(u&&this.docView.updateSelection(!0),!l.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-a;if(e>1||e<-1){r+=e,n.scrollTop=r/this.scaleY,a=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(yd))e(t)}get themeClasses(){return km+` `+(this.state.facet(Om)?jm:Am)+` `+this.state.facet(Dm)}updateAttrs(){let e=Gm(this,Fd,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(Ad)?`true`:`false`,class:`cm-content`,style:`${q.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),Gm(this,Id,t);let n=this.observer.ignore(()=>{let n=uu(this.contentDOM,this.contentAttrs,t),r=uu(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Gd);let t=this.state.facet(e.cspNonce);U.mount(this.root,this.styleModules.concat(Pm).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Gf(this,e,Bf(this,e,t,n))}moveByGroup(e,t){return Gf(this,e,Bf(this,e,t,t=>Vf(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return L.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return zf(this,e,t,n)}moveVertically(e,t,n){return Gf(this,e,Hf(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=qf(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),qf(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r),a=i[rd.find(i,e-r.from,-1,t)];return ju(n,a.dir==J.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Cd)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Hm)return dd(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||id(r.isolates,n=Hd(this,e))))return r.order;n||=Hd(this,e);let r=ud(e.text,t,n);return this.bidiCache.push(new Wm(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||q.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Ru(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Dd.of(new Ed(typeof e==`number`?L.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Dd.of(new Ed(L.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Nd.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Nd.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=U.newName(),r=[Dm.of(n),Gd.of(Nm(`.${n}`,e))];return t&&t.dark&&r.push(Om.of(!0)),r}static baseTheme(e){return Hc.lowest(Gd.of(Nm(`.`+km,e,Mm)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&Yd.get(t)||Yd.get(e))?.root?.view||null}};Z.styleModule=Gd,Z.inputHandler=bd,Z.clipboardInputFilter=X,Z.clipboardOutputFilter=Sd,Z.scrollHandler=Td,Z.focusChangeEffect=xd,Z.perLineTextDirection=Cd,Z.exceptionSink=vd,Z.updateListener=yd,Z.editable=Ad,Z.mouseSelectionStyle=_d,Z.dragMovesSelection=gd,Z.clickAddsSelectionRange=hd,Z.decorations=Ld,Z.blockWrappers=Rd,Z.outerDecorations=zd,Z.atomicRanges=Bd,Z.bidiIsolatedRanges=Vd,Z.scrollMargins=Ud,Z.darkTheme=Om,Z.cspNonce=R.define({combine:e=>e.length?e[0]:``}),Z.contentAttributes=Id,Z.editorAttributes=Fd,Z.lineWrapping=Z.contentAttributes.of({class:`cm-lineWrapping`}),Z.announce=z.define();var Hm=4096,Um={},Wm=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:J.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function Gm(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&ou(a,n)}return n}var Km=q.mac?`mac`:q.windows?`win`:q.linux?`linux`:`key`;function qm(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function Jm(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var Ym=Hc.default(Z.domEventHandlers({keydown(e,t){return rh(Qm(t.state),e,t,`editor`)}})),Xm=R.define({enables:Ym}),Zm=new WeakMap;function Qm(e){let t=e.facet(Xm),n=Zm.get(t);return n||Zm.set(t,n=th(t.reduce((e,t)=>e.concat(t),[]))),n}var $m=null,eh=4e3;function th(e,t=Km){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>qm(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=$m={view:t,prefix:n,scope:e};return setTimeout(()=>{$m==r&&($m=null)},eh),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,nh))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var nh=null;function rh(e,t,n,r){nh=t;let i=Jl(t),a=yc(_c(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;$m&&$m.view==n&&$m.scope==r&&(o=$m.prefix+` `,mp.indexOf(t.keyCode)<0&&(c=!0,$m=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+Jm(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(q.windows&&t.ctrlKey&&t.altKey)&&!(q.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=K[t.keyCode])&&p!=i?(d(f[o+Jm(p,t,!0)])||t.shiftKey&&(m=Ul[t.keyCode])!=i&&m!=p&&d(f[o+Jm(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+Jm(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),nh=null,s}/x/.unicode;var ih=class extends fu{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement(`span`);return t.className=`cm-placeholder`,t.style.pointerEvents=`none`,t.appendChild(typeof this.content==`string`?document.createTextNode(this.content):typeof this.content==`function`?this.content(e):this.content.cloneNode(!0)),t.setAttribute(`aria-hidden`,`true`),t}coordsAt(e){let t=e.firstChild?Tu(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=ju(t[0],n.direction!=`rtl`),i=parseInt(n.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}};function ah(e){let t=Nd.fromClass(class{constructor(t){this.view=t,this.placeholder=e?mu.set([mu.widget({widget:new ih(e),side:1}).range(0)]):mu.none}get decorations(){return this.view.state.doc.length?mu.none:this.placeholder}},{decorations:e=>e.decorations});return typeof e==`string`?[t,Z.contentAttributes.of({"aria-placeholder":e})]:t}var oh=`-10000px`,sh=class{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let a=[],o=t?[]:null;for(let n=0;n<i.length;n++){let r=i[n],s=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(s=e)}if(s<0)a[n]=this.createTooltipView(r,n?a[n-1]:null),o&&(o[n]=!!r.above);else{let r=a[n]=this.tooltipViews[s];o&&(o[n]=t[s]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)a.indexOf(e)<0&&(this.removeTooltipView(e),(n=e.destroy)==null||n.call(e));return t&&(o.forEach((e,n)=>t[n]=e),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=a,!0}};function ch(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}var lh=R.define({combine:e=>({position:q.ios?`absolute`:e.find(e=>e.position)?.position||`fixed`,parent:e.find(e=>e.parent)?.parent||null,tooltipSpace:e.find(e=>e.tooltipSpace)?.tooltipSpace||ch})}),uh=new WeakMap,dh=Nd.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(lh);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver==`function`?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new sh(e,hh,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver=typeof IntersectionObserver==`function`?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener(`resize`,this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement(`div`),this.container.style.position=`relative`,this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e,this.above);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(lh);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add(`cm-tooltip`),e.arrow&&!n.dom.querySelector(`.cm-tooltip > .cm-tooltip-arrow`)){let e=document.createElement(`div`);e.className=`cm-tooltip-arrow`,n.dom.appendChild(e)}return n.dom.style.position=this.position,n.dom.style.top=oh,n.dom.style.left=`0px`,this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var e,t,n;this.view.win.removeEventListener(`resize`,this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),(e=t.destroy)==null||e.call(t);this.parent&&this.container.remove(),(t=this.resizeObserver)==null||t.disconnect(),(n=this.intersectionObserver)==null||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if(this.position==`fixed`&&this.manager.tooltipViews.length){let{dom:e}=this.manager.tooltipViews[0];if(q.safari){let t=e.getBoundingClientRect();n=Math.abs(t.top+1e4)>1||Math.abs(t.left)>1}else n=!!e.offsetParent&&e.offsetParent!=this.container.ownerDocument.body}if(n||this.position==`absolute`){if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(e=n.width/this.parent.offsetWidth,t=n.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:t}=this.view.viewState)}let r=this.view.scrollDOM.getBoundingClientRect(),i=Wd(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(lh).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){if(e.makeAbsolute){this.madeAbsolute=!0,this.position=`absolute`;for(let e of this.manager.tooltipViews)e.dom.style.position=`absolute`}let{visible:t,space:n,scaleX:r,scaleY:i}=e,a=[];for(let o=0;o<this.manager.tooltips.length;o++){let s=this.manager.tooltips[o],c=this.manager.tooltipViews[o],{dom:l}=c,u=e.pos[o],d=e.size[o];if(!u||s.clip!==!1&&(u.bottom<=Math.max(t.top,n.top)||u.top>=Math.min(t.bottom,n.bottom)||u.right<Math.max(t.left,n.left)-.1||u.left>Math.min(t.right,n.right)+.1)){l.style.top=oh;continue}let f=s.arrow?c.dom.querySelector(`.cm-tooltip-arrow`):null,p=f?7:0,m=d.right-d.left,h=uh.get(c)??d.bottom-d.top,g=c.offset||mh,_=this.view.textDirection==J.LTR,v=d.width>n.right-n.left?_?n.left:n.right-d.width:_?Math.max(n.left,Math.min(u.left-(f?14:0)+g.x,n.right-m)):Math.min(Math.max(n.left,u.left-m+(f?14:0)-g.x),n.right-m),y=this.above[o];!s.strictSide&&(y?u.top-h-p-g.y<n.top:u.bottom+h+p+g.y>n.bottom)&&y==n.bottom-u.bottom>u.top-n.top&&(y=this.above[o]=!y);let b=(y?u.top-n.top:n.bottom-u.bottom)-p;if(b<h&&c.resize!==!1){if(b<this.view.defaultLineHeight){l.style.top=oh;continue}uh.set(c,h),l.style.height=(h=b)/i+`px`}else l.style.height&&(l.style.height=``);let x=y?u.top-h-p-g.y:u.bottom+p+g.y,S=v+m;if(c.overlap!==!0)for(let e of a)e.left<S&&e.right>v&&e.top<x+h&&e.bottom>x&&(x=y?e.top-h-2-p:e.bottom+p+2);if(this.position==`absolute`?(l.style.top=(x-e.parent.top)/i+`px`,fh(l,(v-e.parent.left)/r)):(l.style.top=x/i+`px`,fh(l,v/r)),f){let e=u.left+(_?g.x:-g.x)-(v+14-7);f.style.left=e/r+`px`}c.overlap!==!0&&a.push({left:v,top:x,right:S,bottom:x+h}),l.classList.toggle(`cm-tooltip-above`,y),l.classList.toggle(`cm-tooltip-below`,!y),c.positioned&&c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top=oh}},{eventObservers:{scroll(){this.maybeMeasure()}}});function fh(e,t){let n=parseInt(e.style.left,10);(isNaN(n)||Math.abs(t-n)>1)&&(e.style.left=t+`px`)}var ph=Z.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:`border-box`},"&light .cm-tooltip":{border:`1px solid #bbb`,backgroundColor:`#f5f5f5`},"&light .cm-tooltip-section:not(:first-child)":{borderTop:`1px solid #bbb`},"&dark .cm-tooltip":{backgroundColor:`#333338`,color:`white`},".cm-tooltip-arrow":{height:`7px`,width:`14px`,position:`absolute`,zIndex:-1,overflow:`hidden`,"&:before, &:after":{content:`''`,position:`absolute`,width:0,height:0,borderLeft:`7px solid transparent`,borderRight:`7px solid transparent`},".cm-tooltip-above &":{bottom:`-7px`,"&:before":{borderTop:`7px solid #bbb`},"&:after":{borderTop:`7px solid #f5f5f5`,bottom:`1px`}},".cm-tooltip-below &":{top:`-7px`,"&:before":{borderBottom:`7px solid #bbb`},"&:after":{borderBottom:`7px solid #f5f5f5`,top:`1px`}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:`#333338`,borderBottomColor:`#333338`},"&:after":{borderTopColor:`transparent`,borderBottomColor:`transparent`}}}),mh={x:0,y:0},hh=R.define({enables:[dh,ph]});function gh(e,t){let n=e.plugin(dh);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}var _h=class extends xl{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};_h.prototype.elementClass=``,_h.prototype.toDOM=void 0,_h.prototype.mapMode=xc.TrackBefore,_h.prototype.startSide=_h.prototype.endSide=-1,_h.prototype.point=!0;var vh=R.define(),yh=R.define(),bh=R.define(),xh=R.define({combine:e=>e.some(e=>e)});function Sh(e){let t=[Ch];return e&&e.fixed===!1&&t.push(xh.of(!0)),t}var Ch=Nd.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(bh).map(t=>new Dh(e,t)),this.fixed=!e.state.facet(xh);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(xh)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=V.iter(this.view.state.facet(vh),this.view.viewport.from),r=[],i=this.gutters.map(e=>new Eh(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==pu.Text&&t){Th(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==pu.Text){Th(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(bh),n=e.state.facet(bh),r=e.docChanged||e.heightChanged||e.viewportChanged||!V.eq(e.startState.facet(vh),e.state.facet(vh),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new Dh(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>Z.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==J.LTR?{left:r,right:i}:{right:r,left:i}})});function wh(e){return Array.isArray(e)?e:[e]}function Th(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var Eh=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=V.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new Oh(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];Th(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;(r.length!=0||a.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(yh)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},Dh=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=wh(t.markers(e)),t.initialSpacer&&(this.spacer=new Oh(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=wh(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!V.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},Oh=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),kh(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function kh(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var Ah=R.define(),jh=R.define(),Mh=R.define({combine(e){return bl(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),Nh=class extends _h{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function Ph(e,t){return e.state.facet(Mh).formatNumber(t,e.state)}var Fh=bh.compute([Mh],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(Ah)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new Nh(Ph(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(jh)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(Mh)!=e.state.facet(Mh),initialSpacer(e){return new Nh(Ph(e,Lh(e.state.doc.lines)))},updateSpacer(e,t){let n=Ph(t.view,Lh(t.view.state.doc.lines));return n==e.number?e:new Nh(n)},domEventHandlers:e.facet(Mh).domEventHandlers,side:`before`}));function Ih(e={}){return[Mh.of(e),Sh(),Fh]}function Lh(e){let t=9;for(;t<e;)t=t*10+9;return t}var Rh=0,zh=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=Rh++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new Vh(e);return e=>e.modified.indexOf(t)>-1?e:Vh.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},Bh=0,Vh=class e{constructor(e){this.name=e,this.instances=[],this.id=Bh++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&Hh(n,e.modified));if(r)return r;let i=[],a=new zh(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=Uh(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function Hh(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function Uh(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function Wh(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new Kh(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return Gh.add(t)}var Gh=new F({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new Kh(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),Kh=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};Kh.empty=new Kh([],2,null);function qh(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function Jh(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function Yh(e,t,n,r=0,i=e.length){let a=new Xh(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var Xh=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=Zh(e)||Kh.empty,u=Jh(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(F.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function Zh(e){let t=e.type.prop(Gh);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var Q=zh.define,Qh=Q(),$h=Q(),eg=Q($h),tg=Q($h),ng=Q(),rg=Q(ng),ig=Q(ng),ag=Q(),og=Q(ag),sg=Q(),cg=Q(),lg=Q(),ug=Q(lg),dg=Q(),$={comment:Qh,lineComment:Q(Qh),blockComment:Q(Qh),docComment:Q(Qh),name:$h,variableName:Q($h),typeName:eg,tagName:Q(eg),propertyName:tg,attributeName:Q(tg),className:Q($h),labelName:Q($h),namespace:Q($h),macroName:Q($h),literal:ng,string:rg,docString:Q(rg),character:Q(rg),attributeValue:Q(rg),number:ig,integer:Q(ig),float:Q(ig),bool:Q(ng),regexp:Q(ng),escape:Q(ng),color:Q(ng),url:Q(ng),keyword:sg,self:Q(sg),null:Q(sg),atom:Q(sg),unit:Q(sg),modifier:Q(sg),operatorKeyword:Q(sg),controlKeyword:Q(sg),definitionKeyword:Q(sg),moduleKeyword:Q(sg),operator:cg,derefOperator:Q(cg),arithmeticOperator:Q(cg),logicOperator:Q(cg),bitwiseOperator:Q(cg),compareOperator:Q(cg),updateOperator:Q(cg),definitionOperator:Q(cg),typeOperator:Q(cg),controlOperator:Q(cg),punctuation:lg,separator:Q(lg),bracket:ug,angleBracket:Q(ug),squareBracket:Q(ug),paren:Q(ug),brace:Q(ug),content:ag,heading:og,heading1:Q(og),heading2:Q(og),heading3:Q(og),heading4:Q(og),heading5:Q(og),heading6:Q(og),contentSeparator:Q(ag),list:Q(ag),quote:Q(ag),emphasis:Q(ag),strong:Q(ag),link:Q(ag),monospace:Q(ag),strikethrough:Q(ag),inserted:Q(),deleted:Q(),changed:Q(),invalid:Q(),meta:dg,documentMeta:Q(dg),annotation:Q(dg),processingInstruction:Q(dg),definition:zh.defineModifier(`definition`),constant:zh.defineModifier(`constant`),function:zh.defineModifier(`function`),standard:zh.defineModifier(`standard`),local:zh.defineModifier(`local`),special:zh.defineModifier(`special`)};for(let e in $){let t=$[e];t instanceof zh&&(t.name=e)}var fg=qh([{tag:$.link,class:`tok-link`},{tag:$.heading,class:`tok-heading`},{tag:$.emphasis,class:`tok-emphasis`},{tag:$.strong,class:`tok-strong`},{tag:$.keyword,class:`tok-keyword`},{tag:$.atom,class:`tok-atom`},{tag:$.bool,class:`tok-bool`},{tag:$.url,class:`tok-url`},{tag:$.labelName,class:`tok-labelName`},{tag:$.inserted,class:`tok-inserted`},{tag:$.deleted,class:`tok-deleted`},{tag:$.literal,class:`tok-literal`},{tag:$.string,class:`tok-string`},{tag:$.number,class:`tok-number`},{tag:[$.regexp,$.escape,$.special($.string)],class:`tok-string2`},{tag:$.variableName,class:`tok-variableName`},{tag:$.local($.variableName),class:`tok-variableName tok-local`},{tag:$.definition($.variableName),class:`tok-variableName tok-definition`},{tag:$.special($.variableName),class:`tok-variableName2`},{tag:$.definition($.propertyName),class:`tok-propertyName tok-definition`},{tag:$.typeName,class:`tok-typeName`},{tag:$.namespace,class:`tok-namespace`},{tag:$.className,class:`tok-className`},{tag:$.macroName,class:`tok-macroName`},{tag:$.propertyName,class:`tok-propertyName`},{tag:$.operator,class:`tok-operator`},{tag:$.comment,class:`tok-comment`},{tag:$.meta,class:`tok-meta`},{tag:$.invalid,class:`tok-invalid`},{tag:$.punctuation,class:`tok-punctuation`}]),pg=new F;function mg(e){return R.define({combine:e?t=>t.concat(e):void 0})}var hg=new F,gg=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,yl.prototype.hasOwnProperty(`tree`)||Object.defineProperty(yl.prototype,"tree",{get(){return yg(this)}}),this.parser=t,this.extension=[Og.of(this),yl.languageData.of((e,t,n)=>{let r=_g(e,t,n),i=r.type.prop(pg);if(!i)return[];let a=e.facet(i),o=r.type.prop(hg);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return _g(e,t,n).type.prop(pg)==this.data}findRegions(e){let t=e.facet(Og);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(pg)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(F.mounted);if(i){if(i.tree.prop(pg)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof Cs&&r(i,e.positions[n]+t)}};return r(yg(e),0),n}get allowsNesting(){return!0}};gg.setState=z.define();function _g(e,t,n){let r=e.facet(Og),i=yg(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,Ss.ExcludeBuffers|Ss.EnterBracketed))e.type.isTop&&(i=e);return i}var vg=class e extends gg{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=mg(t.languageData);return new e(n,t.parser.configure({props:[pg.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function yg(e){let t=e.field(gg.state,!1);return t?t.tree:Cs.empty}var bg=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},xg=null,Sg=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],Cs.empty,0,r,[],null)}startParse(){return this.parser.startParse(new bg(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Cs.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(Us.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Us.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=xg;xg=this;try{return e()}finally{xg=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Cg(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=Us.applyChanges(r,e),i=Cs.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=Cg(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Ws{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=xg;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new Cs(vs.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return xg}};function Cg(e,t,n){return Us.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var wg=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=Sg.create(t.facet(Og).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};gg.state=zc.define({create:wg.init,update(e,t){for(let e of t.effects)if(e.is(gg.setState))return e.value;return t.startState.facet(Og)==t.state.facet(Og)?e.apply(t):wg.init(t.state)}});var Tg=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(Tg=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var Eg=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,Dg=Nd.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(gg.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(gg.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Tg(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(gg.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Eg?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>Eg&&Eg()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:gg.setState.of(new wg(i.context))})),this.chunkBudget>0&&(!s||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>kd(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Og=R.define({combine(e){return e.length?e[0]:null},enables:e=>[gg.state,Dg,Z.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),kg=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},Ag=R.define(),jg=R.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function Mg(e){let t=e.facet(jg);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function Ng(e,t){let n=``,r=e.tabSize,i=e.facet(jg)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function Pg(e,t){e instanceof yl&&(e=new Fg(e));for(let n of e.state.facet(Ag)){let r=n(e,t);if(r!==void 0)return r}let n=yg(e.state);return n.length>=t?Lg(e,n,t):null}var Fg=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=Mg(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Rl(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},Ig=new F;function Lg(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return Rg(r,e,n)}function Rg(e,t,n){for(let r=e;r;r=r.next){let e=Bg(r.node);if(e)return e(Hg.create(t,n,r))}return 0}function zg(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Bg(e){let t=e.type.prop(Ig);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(F.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>Gg(e,!0,1,void 0,n&&!zg(e)?t.from:void 0)}return e.parent==null?Vg:null}function Vg(){return 0}var Hg=class e extends Fg{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Ug(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return Rg(this.context.next,this.base,this.pos)}};function Ug(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function Wg(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function Gg(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?Wg(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}function Kg({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var qg=new F,Jg=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=U.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof gg?e=>e.prop(pg)==a.data:a?e=>e==a:void 0,this.style=qh(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new U(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},Yg=R.define(),Xg=R.define({combine(e){return e.length?[e[0]]:null}});function Zg(e){let t=e.facet(Yg);return t.length?t:e.facet(Xg)}function Qg(e,t){let n=[e_],r;return e instanceof Jg&&(e.module&&n.push(Z.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(Xg.of(e)):r?n.push(Yg.computeN([Z.darkTheme],t=>t.facet(Z.darkTheme)==(r==`dark`)?[e]:[])):n.push(Yg.of(e)),n}var $g=class{constructor(e){this.markCache=Object.create(null),this.tree=yg(e.state),this.decorations=this.buildDeco(e,Zg(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=yg(e.state),n=Zg(e.state),r=n!=Zg(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return mu.none;let n=new Dl;for(let{from:r,to:i}of e.visibleRanges)Yh(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=mu.mark({class:r})))},r,i);return n.finish()}},e_=Hc.high(Nd.fromClass($g,{decorations:e=>e.decorations}));$.meta,$.link,$.heading,$.emphasis,$.strong,$.strikethrough,$.keyword,$.atom,$.bool,$.url,$.contentSeparator,$.labelName,$.literal,$.inserted,$.string,$.deleted,$.regexp,$.escape,$.string,$.variableName,$.variableName,$.typeName,$.namespace,$.className,$.variableName,$.macroName,$.propertyName,$.comment,$.invalid;var t_=1e4,n_=`()[]{}`,r_=new F;function i_(e,t,n){let r=e.prop(t<0?F.openedBy:F.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function a_(e){let t=e.type.prop(r_);return t?t(e.node):e}function o_(e,t,n,r={}){let i=r.maxScanDistance||t_,a=r.brackets||n_,o=yg(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=i_(r.type,n,a);if(i&&r.from<r.to){let o=a_(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return s_(e,t,n,r,o,i,a)}}return c_(e,t,n,o,s.type,i,a)}function s_(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=a_(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(i_(u.type,n,o))l++;else if(i_(u.type,-n,o)){if(l==0){let e=a_(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function c_(e,t,n,r,i,a,o){let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i)){if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var l_=Object.create(null),u_=[vs.none],d_=[],f_=Object.create(null),p_=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])p_[e]=h_(l_,t);function m_(e,t){d_.indexOf(e)>-1||(d_.push(e),console.warn(t))}function h_(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||$[n];r?typeof r==`function`?t.length?t=t.map(r):m_(n,`Modifier ${n} used at start of tag`):t.length?m_(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:m_(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=f_[i];if(a)return a.id;let o=f_[i]=vs.define({id:u_.length,name:r,props:[Wh({[r]:n})]});return u_.push(o),o.id}J.RTL,J.LTR;var g_=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new __(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from,c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,r=this.buffer.length;if(r==0&&e.parent&&(r=e.bufferBase-e.parent.bufferBase,e=e.parent),r>0&&e.buffer[r-4]==0&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t){e.buffer[r-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(;n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new v_(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new __(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},__=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},v_=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},y_=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function b_(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var x_=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},S_=new x_,C_=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=S_,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=S_,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},w_=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;D_(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};w_.prototype.contextual=w_.prototype.fallback=w_.prototype.extend=!1;var T_=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?b_(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(D_(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};T_.prototype.contextual=w_.prototype.fallback=w_.prototype.extend=!1;var E_=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function D_(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||k_(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function O_(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function k_(e,t,n,r){let i=O_(n,r,t);return i<0||O_(n,r,e)<i}var A_=typeof process<`u`&&/\bparse\b/.test({}.LOG),j_=null;function M_(e,t,n){let r=e.cursor(Ss.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var N_=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?M_(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?M_(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof Cs){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(F.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},P_=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new x_)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if((!n||c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new x_,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new x_,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535){if(o[s+1]==1)s=z_(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(z_(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(z_(o,s+1),t,n,r))}return r}},F_=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new C_(t,r),this.tokens=new P_(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[g_.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new N_(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&B_(r);if(e)return A_&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw A_&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return A_&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=A_?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(F.contextHash)||0)==n))return e.useNode(o,r),A_&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof Cs)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof Cs&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),A_&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),A_&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return I_(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=A_?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),A_&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(A_&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)A_&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))A_&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),A_&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),I_(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),Cs.build({buffer:y_.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(j_||=new WeakMap).get(e);return t||j_.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function I_(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var L_=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},R_=class e extends Ws{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=F[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new ys(t.map((t,i)=>vs.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=ps;let a=b_(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(V_),this.states=b_(e.states,Uint32Array),this.data=b_(e.stateData),this.goto=b_(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new w_(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new F_(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535){if(n[i+1]==1)a=n[i=z_(n,i+2)];else if(n[i+1]==2)return z_(n,i+2);else break}if(a==t||a==0)return z_(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=z_(this.data,n+2);else break}r=t(z_(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=z_(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=V_(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new L_(e,n,r)}static deserialize(t){return new e(t)}};function z_(e,t){return e[t]|e[t+1]<<16}function B_(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function V_(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var H_=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=yg(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Y_(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function U_(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function W_(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=U_(t)+U_(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function G_(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:W_(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function K_(e,t){return n=>{for(let t=yg(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var q_=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function J_(e){return e.selection.main.from}function Y_(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var X_=rl.define();function Z_(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:L.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var Q_=new WeakMap;function $_(e){if(!Array.isArray(e))return e;let t=Q_.get(e);return t||Q_.set(e,t=G_(e)),t}var ev=z.define(),tv=z.define(),nv=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=_c(e,t),r=yc(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(_c(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=_c(e,0),i=yc(r),a=i==e.length?0:-100;if(r!=t[0]){if(r==n[0])a+=-200;else return null}return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=_c(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=yc(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,m=-1,h=/[a-z]/.test(e),g=!0;for(let r=0,c=Math.min(e.length,200),_=0;r<c&&u<s;){let c=_c(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),m=r+1,f++):f=0));let v,y=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(v=vc(c))==v.toLowerCase()?v==v.toUpperCase()?0:2:1;(!r||y==1&&h||_==0&&y!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(g=!1)),_=y,r+=yc(c)}return u==s&&a[0]==0&&g?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(g?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?yc(_c(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},rv=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},iv=R.define({combine(e){return bl(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:ov,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>av(e(n),t(n)),optionClass:(e,t)=>n=>av(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function av(e,t){return e?t?e+` `+t:e:t}function ov(e,t,n,r,i,a){let o=e.textDirection==J.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}function sv(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function cv(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}var lv=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(iv);this.optionContent=sv(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=cv(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(iv).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:tv.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=cv(r.length,i,e.state.facet(iv).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=cv(t.options.length,t.selected,this.view.state.facet(iv).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>kd(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&dv(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(iv).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function uv(e,t){return n=>new lv(n,e,t)}function dv(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function fv(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function pv(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(iv);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new q_(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new rv(n):new nv(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new q_(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):fv(e.completion)>fv(c)&&(s[s.length-1]=e),c=e.completion}return s}var mv=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,yv(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=pv(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(iv).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,yv(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:kv,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},hv=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(bv,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(iv),i=(r.override||n.languageDataAt(`autocomplete`,J_(n)).map($_)).map(e=>(this.active.find(t=>t.source==e)||new Sv(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(Tv));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!gv(i,this.active)||o?a=mv.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new Sv(e.source,0):e));for(let e of t.effects)e.is(Ev)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?_v:vv}};function gv(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var _v={"aria-autocomplete":`list`},vv={};function yv(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var bv=[];function xv(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(X_);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var Sv=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=xv(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(ev))i=new e(i.source,1,n.value);else if(n.is(tv))i=new e(i.source,0);else if(n.is(Tv))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(J_(e.state))}},Cv=class e extends Sv{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=J_(t.state);if(o>a||!r||n&2&&(J_(t.startState)==this.from||o<this.limit))return new Sv(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return wv(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new H_(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??J_(t.state)):new Sv(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new e(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new Sv(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function wv(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):Y_(e,!0).test(i)}var Tv=z.define({map(e,t){return e.map(e=>e.map(t))}}),Ev=z.define(),Dv=zc.define({create(){return hv.start()},update(e,t){return e.update(t)},provide:e=>[hh.from(e,e=>e.tooltip),Z.contentAttributes.from(e,e=>e.attrs)]});function Ov(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(Dv).active.find(e=>e.source==t.source);return r instanceof Cv&&(typeof n==`string`?e.dispatch({...Z_(e.state,n,r.from,r.to),annotations:X_.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var kv=uv(Dv,Ov);function Av(e,t=`option`){return n=>{let r=n.state.field(Dv,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(iv).interactionDelay)return!1;let i=1,a;t==`page`&&(a=gh(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:Ev.of(s)}),!0}}var jv=e=>{let t=e.state.field(Dv,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(iv).interactionDelay?!1:Ov(e,t.open.options[t.open.selected])},Mv=e=>e.state.field(Dv,!1)?(e.dispatch({effects:ev.of(!0)}),!0):!1,Nv=e=>{let t=e.state.field(Dv,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:tv.of(null)}),!0)},Pv=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Fv=50,Iv=1e3,Lv=Nd.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(Dv).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(Dv),n=e.state.facet(iv);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Dv)==t)return;let r=e.transactions.some(e=>{let t=xv(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>Fv&&Date.now()-n.time>Iv){for(let e of n.context.abortListeners)try{e()}catch(e){kd(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(ev)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(Dv);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(iv).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new H_(t,J_(t),e.explicit,this.view),r=new Pv(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:tv.of(null)}),kd(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(iv).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(iv),n=this.view.state.field(Dv);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=J_(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new Cv(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new Sv(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Tv.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(Dv,!1);if(t&&t.tooltip&&this.view.state.facet(iv).closeOnBlur){let n=t.open&&gh(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:tv.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:ev.of(!1)}),20),this.composing=0}}}),Rv=typeof navigator==`object`&&/Win/.test(navigator.platform),zv=Hc.highest(Z.domEventHandlers({keydown(e,t){let n=t.state.field(Dv,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Rv&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&Ov(t,r),!1}})),Bv=Z.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Vv=new class extends xl{};Vv.startSide=1,Vv.endSide=-1,typeof navigator==`object`&&navigator.userAgent;function Hv(e={}){return[zv,Dv,iv.of(e),Lv,Wv,Bv]}var Uv=[{key:`Ctrl-Space`,run:Mv},{mac:"Alt-`",run:Mv},{mac:`Alt-i`,run:Mv},{key:`Escape`,run:Nv},{key:`ArrowDown`,run:Av(!0)},{key:`ArrowUp`,run:Av(!1)},{key:`PageDown`,run:Av(!0,`page`)},{key:`PageUp`,run:Av(!1,`page`)},{key:`Enter`,run:jv}],Wv=Hc.highest(Xm.computeN([iv],e=>e.facet(iv).defaultKeymap?[Uv]:[]));function Gv(e){let t=e.field(Dv,!1);return t&&t.active.some(e=>e.isPending)?`pending`:t&&t.active.some(e=>e.state!=0)?`active`:null}var Kv=36,qv=1,Jv=2,Yv=3,Xv=4,Zv=5,Qv=6,$v=7,ey=8,ty=9,ny=10,ry=11,iy=12,ay=13,oy=14,sy=15,cy=16,ly=17,uy=18,dy=19,fy=20,py=21,my=22,hy=23,gy=24;function _y(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function vy(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function yy(e,t,n){for(let r=!1;;){if(e.next<0)return;if(e.next==t&&!r){e.advance();return}r=n&&!r&&e.next==92,e.advance()}}function by(e,t){scan:for(;;){if(e.next<0)return;if(e.next==36){e.advance();for(let n=0;n<t.length;n++){if(e.next!=t.charCodeAt(n))continue scan;e.advance()}if(e.next==36){e.advance();return}}else e.advance()}}function xy(e,t){let n=`[{<(`.indexOf(String.fromCharCode(t)),r=n<0?t:`]}>)`.charCodeAt(n);for(;;){if(e.next<0)return;if(e.next==r&&e.peek(1)==39){e.advance(2);return}e.advance()}}function Sy(e,t){for(;e.next==95||_y(e.next);)t!=null&&(t+=String.fromCharCode(e.next)),e.advance();return t}function Cy(e){if(e.next==39||e.next==34||e.next==96){let t=e.next;e.advance(),yy(e,t,!1)}else Sy(e)}function wy(e,t){for(;e.next==48||e.next==49;)e.advance();t&&e.next==t&&e.advance()}function Ty(e,t){for(;;){if(e.next==46){if(t)break;t=!0}else if(e.next<48||e.next>57)break;e.advance()}if(e.next==69||e.next==101)for(e.advance(),(e.next==43||e.next==45)&&e.advance();e.next>=48&&e.next<=57;)e.advance()}function Ey(e){for(;!(e.next<0||e.next==10);)e.advance()}function Dy(e,t){for(let n=0;n<t.length;n++)if(t.charCodeAt(n)==e)return!0;return!1}var Oy=` \r
28
+ `;function ky(e,t,n){let r=Object.create(null);r.true=r.false=Zv,r.null=r.unknown=Qv;for(let t of e.split(` `))t&&(r[t]=fy);for(let e of t.split(` `))e&&(r[e]=py);for(let e of(n||``).split(` `))e&&(r[e]=gy);return r}var Ay={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:`*+-%<>!=&|~^/`,specialVar:`?`,identifierQuotes:`"`,caseInsensitiveIdentifiers:!1,words:ky(`absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone `,`array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying `)};function jy(e,t,n,r){let i={};for(let t in Ay)i[t]=(e.hasOwnProperty(t)?e:Ay)[t];return t&&(i.words=ky(t,n||``,r)),i}function My(e){return new E_(t=>{let{next:n}=t;if(t.advance(),Dy(n,Oy)){for(;Dy(t.next,Oy);)t.advance();t.acceptToken(Kv)}else if(n==36&&e.doubleDollarQuotedStrings){let e=Sy(t,``);t.next==36&&(t.advance(),by(t,e),t.acceptToken(Yv))}else if(n==39||n==34&&e.doubleQuotedStrings)yy(t,n,e.backslashEscapes),t.acceptToken(Yv);else if(n==35&&e.hashComments||n==47&&t.next==47&&e.slashComments)Ey(t),t.acceptToken(qv);else if(n==45&&t.next==45&&(!e.spaceAfterDashes||t.peek(1)==32))Ey(t),t.acceptToken(qv);else if(n==47&&t.next==42){t.advance();for(let e=1;;){let n=t.next;if(t.next<0)break;if(t.advance(),n==42&&t.next==47){if(e--,t.advance(),!e)break}else n==47&&t.next==42&&(e++,t.advance())}t.acceptToken(Jv)}else if((n==101||n==69)&&t.next==39)t.advance(),yy(t,39,!0),t.acceptToken(Yv);else if((n==110||n==78)&&t.next==39&&e.charSetCasts)t.advance(),yy(t,39,e.backslashEscapes),t.acceptToken(Yv);else if(n==95&&e.charSetCasts)for(let n=0;;n++){if(t.next==39&&n>1){t.advance(),yy(t,39,e.backslashEscapes),t.acceptToken(Yv);break}if(!_y(t.next))break;t.advance()}else if(e.plsqlQuotingMechanism&&(n==113||n==81)&&t.next==39&&t.peek(1)>0&&!Dy(t.peek(1),Oy)){let e=t.peek(1);t.advance(2),xy(t,e),t.acceptToken(Yv)}else if(Dy(n,e.identifierQuotes))yy(t,n==91?93:n,!1),t.acceptToken(dy);else if(n==40)t.acceptToken($v);else if(n==41)t.acceptToken(ey);else if(n==123)t.acceptToken(ty);else if(n==125)t.acceptToken(ny);else if(n==91)t.acceptToken(ry);else if(n==93)t.acceptToken(iy);else if(n==59)t.acceptToken(ay);else if(e.unquotedBitLiterals&&n==48&&t.next==98)t.advance(),wy(t),t.acceptToken(my);else if((n==98||n==66)&&(t.next==39||t.next==34)){let n=t.next;t.advance(),e.treatBitsAsBytes?(yy(t,n,e.backslashEscapes),t.acceptToken(hy)):(wy(t,n),t.acceptToken(my))}else if(n==48&&(t.next==120||t.next==88)||(n==120||n==88)&&t.next==39){let e=t.next==39;for(t.advance();vy(t.next);)t.advance();e&&t.next==39&&t.advance(),t.acceptToken(Xv)}else if(n==46&&t.next>=48&&t.next<=57)Ty(t,!0),t.acceptToken(Xv);else if(n==46)t.acceptToken(oy);else if(n>=48&&n<=57)Ty(t,!1),t.acceptToken(Xv);else if(Dy(n,e.operatorChars)){for(;Dy(t.next,e.operatorChars);)t.advance();t.acceptToken(sy)}else if(Dy(n,e.specialVar))t.next==n&&t.advance(),Cy(t),t.acceptToken(ly);else if(n==58||n==44)t.acceptToken(cy);else if(_y(n)){let r=Sy(t,String.fromCharCode(n));t.acceptToken(t.next==46||t.peek(-r.length-1)==46?uy:e.words[r.toLowerCase()]??uy)}})}var Ny=My(Ay),Py=R_.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:`⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement`,maxTerm:38,nodeProps:[[`isolate`,-4,1,2,3,19,``]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:`RORO`,tokenizers:[0,Ny],topRules:{Script:[0,25]},tokenPrec:0});function Fy(e){let t=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(t.name);)t.moveTo(t.from,-1);return t.node}function Iy(e,t){let n=e.sliceString(t.from,t.to),r=/^([`'"\[])(.*)([`'"\]])$/.exec(n);return r?r[2]:n}function Ly(e){return e&&(e.name==`Identifier`||e.name==`QuotedIdentifier`)}function Ry(e,t){if(t.name==`CompositeIdentifier`){let n=[];for(let r=t.firstChild;r;r=r.nextSibling)Ly(r)&&n.push(Iy(e,r));return n}return[Iy(e,t)]}function zy(e,t){for(let n=[];;){if(!t||t.name!=`.`)return n;let r=Fy(t);if(!Ly(r))return n;n.unshift(Iy(e,r)),t=Fy(r)}}function By(e,t){let n=yg(e).resolveInner(t,-1),r=Hy(e.doc,n);return n.name==`Identifier`||n.name==`QuotedIdentifier`||n.name==`Keyword`?{from:n.from,quoted:n.name==`QuotedIdentifier`?e.doc.sliceString(n.from,n.from+1):null,parents:zy(e.doc,Fy(n)),aliases:r}:n.name==`.`?{from:t,quoted:null,parents:zy(e.doc,n),aliases:r}:{from:t,quoted:null,parents:[],empty:!0,aliases:r}}var Vy=new Set(`where group having order union intersect except all distinct limit offset fetch for`.split(` `));function Hy(e,t){let n;for(let e=t;!n;e=e.parent){if(!e)return null;e.name==`Statement`&&(n=e)}let r=null;for(let t=n.firstChild,i=!1,a=null;t;t=t.nextSibling){let n=t.name==`Keyword`?e.sliceString(t.from,t.to).toLowerCase():null,o=null;if(!i)i=n==`from`;else if(n==`as`&&a&&Ly(t.nextSibling))o=Iy(e,t.nextSibling);else if(n&&Vy.has(n))break;else a&&Ly(t)&&(o=Iy(e,t));o&&(r||=Object.create(null),r[o]=Ry(e,a)),a=/Identifier$/.test(t.name)?t:null}return r}function Uy(e,t,n){return n.map(n=>({...n,label:n.label[0]==e?n.label:e+n.label+t,apply:void 0}))}var Wy=/^\w*$/,Gy=/^[`'"\[]?\w*[`'"\]]?$/;function Ky(e){return e.self&&typeof e.self.label==`string`}var qy=class e{constructor(e,t){this.idQuote=e,this.idCaseInsensitive=t,this.list=[],this.children=void 0}child(t){let n=this.children||=Object.create(null);return n[t]||(t&&!this.list.some(e=>e.label==t)&&this.list.push(Jy(t,`type`,this.idQuote,this.idCaseInsensitive)),n[t]=new e(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let t=this.list.findIndex(t=>t.label==e.label);t>-1?this.list[t]=e:this.list.push(e)}addCompletions(e){for(let t of e)this.addCompletion(typeof t==`string`?Jy(t,`property`,this.idQuote,this.idCaseInsensitive):t)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):Ky(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let t of Object.keys(e)){let n=e[t],r=null,i=t.replace(/\\?\./g,e=>e==`.`?`\0`:e).split(`\0`),a=this;Ky(n)&&(r=n.self,n=n.children);for(let e=0;e<i.length;e++)r&&e==i.length-1&&a.addCompletion(r),a=a.child(i[e].replace(/\\\./g,`.`));a.addNamespace(n)}}};function Jy(e,t,n,r){return RegExp(`^[a-z_][a-z_\\d]*$`,r?`i`:``).test(e)?{label:e,type:t}:{label:e,type:t,apply:n+e+Yy(n)}}function Yy(e){return e===`[`?`]`:e}function Xy(e,t,n,r,i,a){let o=new qy(a?.spec.identifierQuotes?.[0]||`"`,!!a?.spec.caseInsensitiveIdentifiers),s=i?o.child(i):null;return o.addNamespace(e),t&&(s||o).addCompletions(t),n&&o.addCompletions(n),s&&o.addCompletions(s.list),r&&o.addCompletions((s||o).child(r).list),e=>{let{parents:t,from:n,quoted:i,empty:a,aliases:c}=By(e.state,e.pos);if(a&&!e.explicit)return null;c&&t.length==1&&(t=c[t[0]]||t);let l=o;for(let e of t){for(;!l.children||!l.children[e];)if(l==o&&s)l=s;else if(l==s&&r)l=l.child(r);else return null;let t=l.maybeChild(e);if(!t)return null;l=t}let u=l.list;if(l==o&&c&&(u=u.concat(Object.keys(c).map(e=>({label:e,type:`constant`})))),i){let t=i[0],r=Yy(t);return{from:n,to:e.state.sliceDoc(e.pos,e.pos+1)==r?e.pos+1:void 0,options:Uy(t,r,u),validFor:Gy}}return{from:n,options:u,validFor:Wy}}}function Zy(e){return e==py?`type`:e==fy?`keyword`:`variable`}function Qy(e,t,n){return K_([`QuotedIdentifier`,`String`,`LineComment`,`BlockComment`,`.`],G_(Object.keys(e).map(r=>n(t?r.toUpperCase():r,Zy(e[r])))))}var $y=Py.configure({props:[Ig.add({Statement:Kg()}),qg.add({Statement(e,t){return{from:Math.min(e.from+100,t.doc.lineAt(e.from).to),to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}}),Wh({Keyword:$.keyword,Type:$.typeName,Builtin:$.standard($.name),Bits:$.number,Bytes:$.string,Bool:$.bool,Null:$.null,Number:$.number,String:$.string,Identifier:$.name,QuotedIdentifier:$.special($.string),SpecialVar:$.special($.name),LineComment:$.lineComment,BlockComment:$.blockComment,Operator:$.operator,"Semi Punctuation":$.punctuation,"( )":$.paren,"{ }":$.brace,"[ ]":$.squareBracket})]}),eb=class e{constructor(e,t,n){this.dialect=e,this.language=t,this.spec=n}get extension(){return this.language.extension}configureLanguage(t,n){return new e(this.dialect,this.language.configure(t,n),this.spec)}static define(t){let n=jy(t,t.keywords,t.types,t.builtin),r=vg.define({name:`sql`,parser:$y.configure({tokenizers:[{from:Ny,to:My(n)}]}),languageData:{commentTokens:{line:`--`,block:{open:`/*`,close:`*/`}},closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]}}});return new e(n,r,t)}};function tb(e,t){return{label:e,type:t,boost:-1}}function nb(e,t=!1,n){return Qy(e.dialect.words,t,n||tb)}function rb(e){return e.schema?Xy(e.schema,e.tables,e.schemas,e.defaultTable,e.defaultSchema,e.dialect||ob):()=>null}function ib(e){return e.schema?(e.dialect||ob).language.data.of({autocomplete:rb(e)}):[]}function ab(e={}){let t=e.dialect||ob;return new kg(t.language,[ib(e),t.language.data.of({autocomplete:nb(t,e.upperCaseKeywords,e.keywordCompletion)})])}var ob=eb.define({}),sb=`abs.changes.char.coalesce.glob.hex.ifnull.iif.instr.last_insert_rowid.length.like.likelihood.likely.load_extension.lower.ltrim.max.min.random.randomblob.replace.round.rtrim.soundex.sqlite_compileoption_get.sqlite_compileoption_used.sqlite_source_id.sqlite_version.substr.substring.total_changes.trim.typeof.unhex.unicode.unistr_quote.unistr.unlikely.upper.zeroblob.date.datetime.julianday.strftime.time.timediff.unixepoch.avg.count.count.group_concat.max.min.sum.total.acos.asin.atan.atan2.ceil.ceiling.cos.cosh.degrees.exp.floor.ln.log.log10.mod.pi.pow.power.radians.rand.sign.sin.sinh.sqrt.tan.tanh.trunc.json_array_length.json_extract.json_insert.json_patch.json_quote.json_remove.json_replace.json_set.json_type.json_valid.json`.split(`.`),cb=`ABORT.ADD.AFTER.ALL.ALTER.ALWAYS.ANALYZE.AND.AS.ASC.ATTACH.AUTOINCREMENT.BEFORE.BEGIN.BETWEEN.BY.CASCADE.CASE.CAST.CHECK.COLLATE.COLUMN.COMMIT.CONFLICT.CONSTRAINT.CREATE.CROSS.CURRENT_DATE.CURRENT_TIME.CURRENT_TIMESTAMP.DATABASE.DEFAULT.DEFERRABLE.DEFERRED.DELETE.DESC.DETACH.DISTINCT.DROP.EACH.ELSE.ESCAPE.EXCEPT.EXCLUSIVE.EXISTS.EXPLAIN.FAIL.FOR.FOREIGN.FROM.FULL.GENERATED.GLOB.GROUP.HAVING.IF.IGNORE.IMMEDIATE.IN.INDEX.INITIALLY.INNER.INSERT.INSTEAD.INTERSECT.INTO.IS.ISNULL.JOIN.KEY.LEFT.LIKE.LIMIT.MATCH.NATURAL.NOT.NOTNULL.NULL.OF.OFFSET.ON.OR.ORDER.OUTER.PLAN.PRAGMA.PRIMARY.QUERY.RAISE.REFERENCES.REGEXP.REINDEX.RENAME.REPLACE.RESTRICT.RIGHT.ROLLBACK.ROW.SELECT.SET.TABLE.TEMP.TEMPORARY.THEN.TO.TRANSACTION.TRIGGER.UNION.UNIQUE.UPDATE.USING.VACUUM.VALUES.VIEW.VIRTUAL.WHEN.WHERE`.split(`.`),lb=`BIGINT.INT.INT2.INT8.INTEGER.MEDIUMINT.SMALLINT.TINYINT.UNSIGNED BIG INT.CHARACTER.CLOB.NATIVE CHARACTER.NCHAR.NVARCHAR.TEXT.VARCHAR.VARYING CHARACTER.DOUBLE PRECISION.DOUBLE.FLOAT.REAL.BOOLEAN.DATE.DATETIME.DECIMAL.NUMERIC.BLOB`.split(`.`),ub=eb.define({keywords:[...cb,...sb,...lb].join(` `).toLowerCase(),builtin:``,types:``,operatorChars:`*/+-%<>!=~`,doubleQuotedStrings:!0,charSetCasts:!1}),db=/^\s+/,fb=/^(`([^`\n]|``)+`|"([^"\n]|"")+"|\[[^\]\n]+\]|[a-zA-Z_][a-zA-Z0-9_]*)/,pb=/^(?:'(?:[^'\n]|'')*'|"(?:[^"\n]|"")*")/,mb=/^\d+(\.\d+)?/,hb=/^:[a-zA-Z_][a-zA-Z0-9_]*/,gb=/^(--.*|\/\*[\s\S]*?\*\/)/,_b=/^(::|<>|!=|<=|>=|=|<|>|\+|-|\*|\/)/,vb=/^[`,;().]/,yb=[{matchToken:e=>db.exec(e)?.[0]??null,type:`WHITESPACE`},{matchToken:e=>fb.exec(e)?.[0]??null,type:`IDENTIFIER`},{matchToken:e=>pb.exec(e)?.[0]??null,type:`STRING`},{matchToken:e=>mb.exec(e)?.[0]??null,type:`NUMBER`},{matchToken:e=>hb.exec(e)?.[0]??null,type:`PLACEHOLDER`},{matchToken:e=>gb.exec(e)?.[0]??null,type:`COMMENT`},{matchToken:e=>_b.exec(e)?.[0]??null,type:`OPERATOR`},{matchToken:e=>vb.exec(e)?.[0]??null,type:`PUNCTUATION`}];function bb(e,t){try{let t=[],n=e.length,r=0,i=``;for(;r<n;){let n=!1,a=e.substring(r);for(let{type:e,matchToken:o}of yb){let s=o(a);if(s){i!==``&&(t.push({type:`UNKNOWN`,value:i}),i=``),t.push({type:e,value:s}),r+=s.length,n=!0;break}}n||(i+=a[0],r++)}return i!==``&&t.push({type:`UNKNOWN`,value:i}),t}catch{return[{type:`SQL`,value:e}]}}function xb(e,t){let n=bb(e,`sqlite`).filter(e=>e.type!==`WHITESPACE`),r=Sb(n,sb).map(e=>e.value).join(``).trim(),i=bb(r,`sqlite`).filter(e=>e.type!==`WHITESPACE`);if(i.length!==n.length)throw Error(`Fail to format the query`);for(let e=0;e<i.length;e++){let t=n[e],r=i[e];if(t.value!==r.value)throw Error(`Fail to format the query at token #${e}: "${t.value}" -> "${r.value}"`)}return r}function Sb(e,t){let n=[],r=new Set(t.map(e=>e.toUpperCase())),i=[];for(let t=0;t<e.length;t++){let a=e[t],o=t>0?e[t-1]:void 0,s=a.value.toUpperCase();if(a.type===`COMMENT`)Db(n)&&wb(n,i),n.push(a),wb(n,i);else if([`SELECT`,`SET`,`WHERE`].includes(s)){for(;[`SET`,`JOIN`].includes(Cb(i)??``);)i.pop();Db(n)&&wb(n,i),n.push(a),i.push(s),wb(n,i)}else if([`INNER`,`LEFT`,`RIGHT`].includes(s))Cb(i)!==`JOIN`&&i.push(`JOIN`),wb(n,i),n.push(a);else if(s===`FROM`)Cb(i)===`SELECT`&&i.pop(),wb(n,i),n.push(a);else if([`VALUES`,`ORDER`,`GROUP`,`LIMIT`,`OFFSET`,`HAVING`].includes(s))[`SET`,`WHERE`].includes(Cb(i)??``)&&i.pop(),wb(n,i),n.push(a);else if([`AND`,`OR`].includes(s))Cb(i)!==`LPAREN-INLINE`&&wb(n,i),n.push(a);else if(s===`,`)n.push(a),Cb(i)!==`LPAREN-INLINE`&&wb(n,i);else if(s===`(`){let s=!0,c=o?.type===`IDENTIFIER`&&r.has(o?.value.toUpperCase());(c||Eb(e,t,2)===`INTO`||Eb(e,t)===`VALUES`)&&(s=!1),[`TABLE`].includes((Tb(e,t,2)?.value??``).toUpperCase())&&Tb(e,t)?.type===`IDENTIFIER`&&(s=!0),Db(n)&&!c&&n.push({type:`WHITESPACE`,value:` `}),i.push(s?`LPAREN`:`LPAREN-INLINE`),n.push(a),s&&wb(n,i)}else if(s===`)`){for(;i.length>0&&![`LPAREN`,`LPAREN-INLINE`].includes(Cb(i)??``);)i.pop();Cb(i)===`LPAREN`?(i.pop(),wb(n,i)):Cb(i)===`LPAREN-INLINE`&&i.pop(),n.push(a)}else s===`;`?(n.push(a),i=[],wb(n,i),wb(n,i)):([`,`,`.`].includes(s)||Db(n)&&n.push({type:`WHITESPACE`,value:` `}),n.push(a))}return n}function Cb(e,t=1){return e.length-t>=0?e[e.length-t]:void 0}function wb(e,t){let n=t.reduce((e,t)=>t===`LPAREN-INLINE`?e:e+1,0);e.push({type:`WHITESPACE`,value:`
29
+ `+` `.repeat(n)})}function Tb(e,t,n=1){let r=t-n;if(!(t-n<0))return e[r]}function Eb(e,t,n=1){return(Tb(e,t,n)?.value??``).toUpperCase()}function Db(e){if(e.length===0)return!1;let t=e[e.length-1];return t.type!==`WHITESPACE`&&t.value!==`.`&&t.value!==`(`}function Ob(e){try{let t=bb(e,`sqlite`).filter(e=>e.type!==`WHITESPACE`),n=t.findIndex(e=>e.value.toUpperCase()===`FROM`);if(n===-1)return``;let r=t[n+1];return!r||r.type!==`IDENTIFIER`?``:r.value}catch{return``}}function kb(e){if(e instanceof Error)return e.message;if(typeof e==`object`&&e&&`errors`in e){let t=e.errors;if(Array.isArray(t)&&t.length>0&&t[0]?.message)return t[0].message}if(typeof e==`string`)return e;try{let t=String(e);return t===`[object Object]`?JSON.stringify(e):t}catch{return`Unknown error`}}function Ab(e){return e.name.new!==e.name.old||e.columns.some(e=>!fs(e.new,e.old))||e.constraints.some(e=>!fs(e.new,e.old))}function jb(e){return`'${e.replace(/'/g,`''`)}'`}function Mb(e){if(e===void 0)return`DEFAULT`;if(e===null)return`NULL`;if(typeof e==`string`)return jb(e);if(typeof e==`number`||typeof e==`bigint`)return e.toString();throw e instanceof ArrayBuffer||Array.isArray(e)?Error(`Blob escape is not supported yet`):Error(e.toString()+` is unrecognized type of value`)}function Nb({headers:e,rows:t,transformHeader:n,transformValue:r}){let i=new Set,a=e.map((e,t)=>{let r=n(e,t),a=r.name,o=1;for(;i.has(a);)a=`${r.name}_${o++}`;return i.add(a),{...r,name:a}});return{headers:a,rows:t.map(e=>a.reduce((t,n,i)=>(t[n.name]=r?r(e[i],n):e[i],t),{}))}}async function Pb(e,t,n){let r=[],i=[],a=t.length;function o(e,t=!1){n?.({error:t,logs:r,progress:e,total:a})}for(let n=0;n<t.length;n++){let a=t[n],s=a,c={order:n,sql:s,start:Date.now()};r.push(c),o(n+1);try{let t=await e.query(s);if(c.end=Date.now(),c.stats=t.stat,t.stat={...t.stat,requestDurationMs:c.end?c.end-c.start:null},t.headers.length>0){let e=Ob(s);i.push({sql:a,order:n,predictedTableName:e,result:t})}o(n+1)}catch(e){c.end=Date.now(),c.error=kb(e),o(n+1,!0);break}}return{logs:r,result:i}}function Fb({data:e}){let t=e.rows.map(e=>({...e,children:[]})),n=t.reduce((e,t)=>({...e,[t.id]:t}),{});for(let e of t)e.parent&&n[e.parent]?.children.push(e);return t=t.filter(e=>e.parent===0),(0,D.jsx)(`div`,{className:`h-full w-full grow overflow-auto p-8`,children:(0,D.jsx)(`div`,{className:`font-mono text-sm`,children:(0,D.jsx)(Ib,{data:t})})})}function Ib({data:e}){return(0,D.jsx)(D.Fragment,{children:e.map(e=>{let{label:t,performance:n}=Lb(e.detail);return(0,D.jsxs)(O.Fragment,{children:[(0,D.jsxs)(`div`,{className:`flex h-8 items-center gap-2`,children:[(0,D.jsx)(`div`,{className:E(`inline-flex rounded-full border`,{"bg-green-500":n===`fast`,"bg-red-500":n===`slow`,"bg-yellow-500":n===`medium`,"bg-gray-500":n===`neutral`}),style:{width:10,height:10,marginLeft:-5}}),(0,D.jsx)(`div`,{children:t})]}),(0,D.jsx)(`div`,{className:`border-l pl-4`,children:(0,D.jsx)(Ib,{data:e.children})})]},e.id)})})}function Lb(e){return e.startsWith(`SCAN `)?{performance:`slow`,label:(0,D.jsxs)(`div`,{className:`flex items-center`,children:[(0,D.jsx)(`strong`,{children:`SCAN `}),(0,D.jsxs)(`span`,{className:`mx-2 flex items-center gap-2 rounded border border-kumo-fill p-1`,children:[(0,D.jsx)(Fr,{}),e.substring(5)]})]})}:e.startsWith(`CORRELATED `)?{performance:`slow`,label:(0,D.jsxs)(`div`,{children:[(0,D.jsx)(Le,{side:`bottom`,content:(0,D.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,D.jsxs)(`div`,{children:[`This subquery depends on values from the outer query, so it's evaluated once per outer row.`,` `,(0,D.jsx)(`strong`,{className:`text-red-500`,children:`Can be slow on large inputs`}),`.`]}),(0,D.jsx)(`div`,{className:`text-green-500`,children:`Mitigate by indexing the correlated columns or rewriting as a JOIN + aggregate.`})]}),children:(0,D.jsx)(`strong`,{className:`cursor-pointer underline`,children:`CORRELATED`})}),(0,D.jsx)(`span`,{children:e.substring(10)})]})}:e.startsWith(`SEARCH `)?{performance:`fast`,label:(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`strong`,{children:`SEARCH `}),(0,D.jsx)(`span`,{children:e.substring(6)})]})}:e.startsWith(`USE TEMP B-TREE FOR ORDER BY`)||e.startsWith(`USE TEMP B-TREE FOR GROUP BY`)||e.startsWith(`USE TEMP B-TREE FOR DISTINCT`)?{performance:`medium`,label:(0,D.jsx)(Le,{side:`bottom`,content:(0,D.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,D.jsxs)(`div`,{children:[`SQLite can’t return rows in the requested order/grouping directly, so it gathers them into a temporary structure and processes them before returning results.`,` `,(0,D.jsx)(`span`,{className:`text-red-500`,children:`This adds extra work and grows with result size.`})]}),(0,D.jsx)(`div`,{className:`text-green-500`,children:`Add an index that matches the clause (ORDER BY / GROUP BY / DISTINCT) to avoid the temp structure.`})]}),children:(0,D.jsx)(`strong`,{className:`cursor-pointer underline`,children:e})})}:{label:(0,D.jsx)(`span`,{children:e}),performance:`neutral`}}var Rb=class{dialect=`sqlite`;isSupportDropTable=!0;isSupportEditTable=!0;isSupportExplain=!1;isSupportReturningValue=!1;isSupportRowid=!1},zb=class extends Rb{conn;constructor(e){super(),this.conn=e}escapeValue(e){return Mb(e)}getColumnTypeHint(){return null}async query(e){return this.conn.query(e)}async transaction(e){return this.conn.transaction(e)}async batch(e){if(this.conn.batch)return this.conn.batch(e);let t=[];for(let n of e){let e=await this.query(n);t.push(e)}return t}async dropTable(e,t){await this.query(`DROP TABLE ${this.escapeId(e)}.${this.escapeId(t)}`)}generateTableSchemaStatement(e){throw Error(`Not yet implemented`)}async findFirst(e,t,n){let r=Object.entries(n).map(([e,t])=>`${this.escapeId(e)} = ${this.escapeValue(t)}`).join(` AND `),i=`SELECT * FROM ${this.escapeId(e)}.${this.escapeId(t)} ${r?`WHERE `+r:``} LIMIT 1 OFFSET 0`;return this.query(i)}createMutationStatements(e,t,n,r){r&&n.forEach(e=>Bb(e,r));let i=this.isSupportRowid&&!r?.withoutRowId;return n.map(n=>n.operation===`INSERT`?Wb(this,e,t,n.values,this.isSupportReturningValue,i):n.operation===`DELETE`?Kb(this,e,t,n.where):Gb(this,e,t,n.values,n.where,this.isSupportReturningValue,i))}async mutateTableRows(e,t,n,r){let i=this.createMutationStatements(e,t,n,r),a=await this.transaction(i),o=[];for(let r=0;r<a.length;r++){let i=a[r],s=n[r];if(!i||!s){o.push({});continue}let{operation:c}=s;if(c===`UPDATE`){if(i.rows.length===1)o.push({record:i.rows[0]});else{let n=await this.findFirst(e,t,s.where);o.push({lastId:i.lastInsertRowid,record:n.rows[0]})}}else if(c===`INSERT`){if(i.rows.length===1)o.push({record:i.rows[0]});else if(s.autoIncrementPkColumn){let n=await this.findFirst(e,t,{[s.autoIncrementPkColumn]:i.lastInsertRowid});o.push({lastId:i.lastInsertRowid,record:n.rows[0]})}else if(s.pk?.length){let n=s.pk.reduce((e,t)=>(e[t]=s.values[t],e),{}),r=await this.findFirst(e,t,n);o.push({lastId:i.lastInsertRowid,record:r.rows[0]})}else o.push({})}else o.push({})}return o}buildExplainStatement(e){throw Error(`Not implemented`)}getQueryTabOverride(e,t){return null}};function Bb(e,t){let{operation:n}=e,{pk:r,autoIncrement:i}=t,a=n===`INSERT`?{}:e.where,o=n===`DELETE`?{}:e.values,s=r.some(e=>a[e]==null),c=r.some(e=>(e in o?o[e]:a[e])==null);if(r.length===0)throw Error(`This table has no primary key. Unsafe to perform insert, update, or delete operations.`);switch(n){case`DELETE`:if(s)throw Error(`Cannot delete a row with NULL in primary key columns.`);break;case`UPDATE`:if(s)throw Error(`Cannot update a row with NULL in primary key columns.`);if(c)throw Error(`Cannot update a row causing NULL in primary key columns.`);break;case`INSERT`:{let e=r[0];if(i&&e&&o[e]===null)throw Error(`Cannot insert a row with NULL in the auto-increment primary key column.`);if(!i&&c)throw Error(`Cannot insert a row with NULL in primary key columns.`);break}}}function Vb(e,t){let n=Object.entries(t).map(([t,n])=>n==null?`${e.escapeId(t)} IS NULL`:`${e.escapeId(t)} = ${e.escapeValue(n)}`).join(` AND `);return n.length>0?`WHERE `+n:null}function Hb(e,t){return Object.entries(t).map(([t,n])=>`${e.escapeId(t)} = ${e.escapeValue(n)}`).join(`, `)}function Ub(e,t){let n=[],r=[];for(let[i,a]of Object.entries(t))n.push(e.escapeId(i)),r.push(e.escapeValue(a));return`(${n.join(`, `)}) VALUES(${r.join(`, `)})`}function Wb(e,t,n,r,i,a){return[`INSERT INTO`,`${e.escapeId(t)}.${e.escapeId(n)}`,Ub(e,r),i?`RETURNING ${a?`rowid, `:``}*`:``].join(` `)}function Gb(e,t,n,r,i,a,o){return[`UPDATE`,`${e.escapeId(t)}.${e.escapeId(n)}`,`SET`,Hb(e,r),Vb(e,i),a?`RETURNING ${o?`rowid, `:``}*`:``].filter(Boolean).join(` `)}function Kb(e,t,n,r){return[`DELETE FROM`,`${e.escapeId(t)}.${e.escapeId(n)}`,Vb(e,r)].filter(Boolean).join(` `)}function qb(e,t){let n={...e};for(let e of t)delete n[e];return n}function Jb(e){return e.length>=2&&e.startsWith(`(`)&&e.endsWith(`)`)?e:`(${e})`}function Yb(e,t){let n=[e.escapeId(t.name),t.type];t.constraint?.primaryKey&&n.push([`PRIMARY KEY`,t.constraint.primaryKeyOrder,t.constraint.primaryKeyConflict?`ON CONFLICT ${t.constraint.primaryKeyConflict}`:void 0,t.constraint.autoIncrement?`AUTOINCREMENT`:void 0].filter(Boolean).join(` `)),t.constraint?.unique&&n.push([`UNIQUE`,t.constraint.uniqueConflict?`ON CONFLICT ${t.constraint.uniqueConflict}`:void 0].filter(Boolean).join(` `)),t.constraint?.notNull&&n.push([`NOT NULL`,t.constraint.notNullConflict?`ON CONFLICT ${t.constraint.notNullConflict}`:void 0].filter(Boolean).join(` `)),t.constraint?.defaultValue&&n.push([`DEFAULT`,e.escapeValue(t.constraint.defaultValue)].join(` `)),t.constraint?.defaultExpression&&n.push([`DEFAULT`,Jb(t.constraint.defaultExpression)].join(` `)),t.constraint?.generatedExpression&&n.push([`GENERATED ALWAYS AS`,Jb(t.constraint.generatedExpression),t.constraint.generatedType].join(` `)),t.constraint?.checkExpression&&n.push(`CHECK `+Jb(t.constraint.checkExpression));let r=t.constraint?.foreignKey?.foreignTableName,i=(t.constraint?.foreignKey?.foreignColumns??[void 0])[0];return r&&i&&n.push([`REFERENCES`,e.escapeId(r)+`(${e.escapeId(i)})`].join(` `)),n.join(` `)}function Xb(e,t){return t.primaryKey?`PRIMARY KEY (${t.primaryColumns?.map(e.escapeId).join(`, `)})`:t.unique?`UNIQUE (${t.uniqueColumns?.map(e.escapeId).join(`, `)})`:t.checkExpression===void 0?t.foreignKey?`FOREIGN KEY (${t.foreignKey.columns?.map(e.escapeId).join(`, `)}) REFERENCES ${e.escapeId(t.foreignKey.foreignTableName??``)} (${t.foreignKey.foreignColumns?.map(e.escapeId).join(`, `)})`:``:`CHECK (${t.checkExpression})`}function Zb(e,t){let n=!t.name.old,r=[];for(let i of t.columns)i.new===null?r.push(`DROP COLUMN ${e.escapeId(i.old?.name??``)}`):i.old===null?n?r.push(Yb(e,i.new)):r.push(`ADD `+Yb(e,i.new)):(i.new.name!==i.old.name&&r.push(`RENAME COLUMN ${e.escapeId(i.old.name)} TO ${e.escapeId(i.new.name)}`),fs(qb(i.old,[`name`]),qb(i.new,[`name`]))||r.push(`ALTER COLUMN ${e.escapeId(i.new.name)} TO ${Yb(e,i.new)}`));for(let i of t.constraints)i.new&&n&&r.push(Xb(e,i.new));if(n||t.name.new!==t.name.old&&r.push(`RENAME TO ${e.escapeId(t.name.new??``)}`),n)return[`CREATE TABLE ${e.escapeId(t.schemaName??`main`)}.${e.escapeId(t.name.new||`no_table_name`)}(\n${r.map(e=>` `+e).join(`,
30
+ `)}\n)`];let i=`ALTER TABLE ${e.escapeId(t.schemaName??`main`)}.${e.escapeId(t.name.old??``)} `;return r.map(e=>i+e)}function Qb(e){let t=e.replace(/^["`[]/g,``);return t=t.replace(/["`\]]$/g,``),t=t.replace(/""/g,`"`),t}var $b=class e{tokens;ptr=0;constructor(e){for(this.tokens=e;this.tokens.length>0&&this.tokens[0].type===`WHITESPACE`;)this.tokens.shift();for(;this.tokens.length>0&&this.tokens[this.tokens.length-1].type===`WHITESPACE`;)this.tokens.pop()}getPointer(){return this.ptr}toStringRange(e,t){return this.tokens.slice(e,t).map(e=>e.value).join(``)}read(){return this.end()?``:this.tokens[this.ptr].value}consumeBlock(){return this.match(`(`)?this.consumeParen().toString():this.consume()}currentType(){return this.tokens[this.ptr].type}consumeParen(){if(this.read()!==`(`)throw Error(`Expecting (`);let t=this.ptr+1,n=1;for(;n>0;){if(!this.next())throw Error(`Expecting closing paren`);this.read()===`(`&&n++,this.read()===`)`&&n--}let r=new e(this.tokens.slice(t,this.ptr));return this.next(),r}consume(){let e=this.read();return this.next(),e}consumeIdentifier(){let e=Qb(this.read());return this.next(),e}expectToken(e){if(!this.match(e))throw Error(`Expecting ${e}`);this.next()}expectTokenOptional(e){this.match(e)&&this.next()}expectTokensOptional(e){if(e.length===0)return;let[t]=e;if(this.match(t)){this.next();for(let t of e.slice(1))this.expectToken(t)}}expectTokens(e){for(let t of e)this.expectToken(t)}next(){for(this.ptr+=1;this.ptr<this.tokens.length;this.ptr++)if(this.currentType()!==`WHITESPACE`)return!0;return!1}match(e){return!this.end()&&this.read().toLowerCase()===e.toLowerCase()}matchTokens(e){return e.some(e=>this.read().toLowerCase()===e.toLowerCase())}end(){return this.ptr>=this.tokens.length}toString(){return this.tokens.map(e=>e.value).join(``)}toStringWithParen(){return`(`+this.toString()+`)`}};function ex(e,t){let n=t.consumeIdentifier();if(!n)return null;let r=t.read();[`,`,`CHECK`,`COLLATE`,`CONSTRAINT`,`DEFAULT`,`GENERATED`,`NOT`,`PRIMARY`,`REFERENCES`,`UNIQUE`].includes(r.toUpperCase())?r=``:t.next(),t.match(`(`)&&(r+=t.consumeParen().toStringWithParen());let i=rx(e,t);return{name:n,pk:i?.primaryKey,constraint:i,type:r}}function tx(e){if(e.match(`ON`)&&(e.next(),e.match(`CONFLICT`)&&(e.next(),!e.end()))){let t=e.read().toUpperCase();return e.next(),t}}function nx(e){let t=[];for(;!e.end()&&(t.push(e.consumeIdentifier()),e.match(`,`));)e.next();return t}function rx(e,t){if(t.match(`CONSTRAINT`)){t.next();let n=t.consume();return{...rx(e,t),name:n}}if(t.match(`PRIMARY`)){let n,r,i=!1;if(t.next(),!t.match(`KEY`))throw Error(`PRIMARY must follow by KEY`);t.next(),t.match(`(`)&&(r=nx(t.consumeParen())),t.match(`ASC`)?(n=`ASC`,t.next()):t.match(`DESC`)&&(n=`DESC`,t.next());let a=tx(t);return t.match(`AUTOINCREMENT`)&&(i=!0,t.next()),{primaryKey:!0,primaryKeyOrder:n,primaryColumns:r,autoIncrement:i,primaryKeyConflict:a,...rx(e,t)}}if(t.match(`NOT`)){if(t.next(),!t.match(`NULL`))throw Error(`NOT should follow by NULL`);return t.next(),{notNull:!0,notNullConflict:tx(t),...rx(e,t)}}if(t.match(`NULL`))return t.next(),{notNull:!1,...rx(e,t)};if(t.match(`UNIQUE`)){let n;return t.next(),t.read()===`(`&&(n=nx(t.consumeParen())),{unique:!0,uniqueConflict:tx(t),uniqueColumns:n,...rx(e,t)}}if(t.match(`DEFAULT`)){let n,r;return t.next(),t.currentType()===`STRING`?(n=t.read().slice(1,-1),t.next()):t.currentType()===`OPERATOR`?t.match(`+`)?(t.next(),n=Number(t.read()),t.next()):t.match(`-`)&&(t.next(),n=-Number(t.read()),t.next()):t.currentType()===`NUMBER`?(n=Number(t.read()),t.next()):t.match(`(`)?r=t.consumeParen().toString():(t.match(`current_timestamp`)||t.match(`current_time`)||t.match(`current_date`)||t.match(`true`)||t.match(`false`)||t.match(`null`))&&(r=t.read(),t.next()),{defaultValue:n,defaultExpression:r,...rx(e,t)}}if(t.match(`CHECK`))return t.next(),{checkExpression:t.consumeBlock(),...rx(e,t)};if(t.match(`COLLATE`)){t.next();let n=t.read();return t.next(),{collate:n,...rx(e,t)}}if(t.match(`FOREIGN`)){if(t.next(),!t.match(`KEY`))throw Error(`FOREIGN should follow by KEY`);t.next();let n=nx(t.consumeParen()),r=rx(e,t);return{foreignKey:{foreignSchemaName:e,foreignTableName:r?.foreignKey?.foreignTableName??``,foreignColumns:r?.foreignKey?.foreignColumns??[],columns:n}}}if(t.match(`REFERENCES`)){t.next();let n=t.consumeIdentifier(),r=[];for(;!t.end()&&!t.match(`(`)&&!t.match(`,`);)t.next();return t.match(`(`)&&(r=nx(t.consumeParen())),{foreignKey:{foreignSchemaName:e,foreignTableName:n,foreignColumns:r},...rx(e,t)}}if(t.match(`GENERATED`)){if(t.next(),!t.match(`ALWAYS`))throw Error(`GENERATED should follow by ALWAYS`);if(t.next(),!t.match(`AS`))throw Error(`GENERATED ALWAYS should follow by AS`);t.next();let n=t.consumeBlock();return{generatedType:t.match(`STORED`)?`STORED`:`VIRTUAL`,generatedExpression:n,...rx(e,t)}}}function ix(e,t){let n=!0,r=!1,i=[],a=[];for(;n;){if(n=!1,t.matchTokens([`CHECK`,`CONSTRAINT`,`FOREIGN`,`PRIMARY`,`UNIQUE`])){let i=rx(e,t);i&&(r=!0,a.push(i),n=!0)}else if(!r){let r=ex(e,t);r&&(i.push(r),n=!0)}for(;t.read()!==`,`&&!t.end();)t.next();if(t.end())break;t.next()}for(let e of a)if(e.primaryKey&&e.primaryColumns)for(let t of e.primaryColumns){let e=i.find(e=>t.toLowerCase()===e.name.toLowerCase());e&&(e.pk=!0)}for(let e of i){let t=e.constraint?.foreignKey;t?.foreignColumns&&t.foreignColumns.length===0&&(t.foreignColumns=[e.name])}return{columns:i,constraints:a}}function ax(e){if(!e)return{};let t,n,r=e;for(;!r.end();)r.match(`content`)?(r.next(),r.match(`=`)&&(r.next(),r.end()||(t=Qb(r.read()),r.next()))):r.match(`content_rowid`)&&(r.next(),r.match(`=`)&&(r.next(),r.end()||(n=Qb(r.read()),r.next()))),r.next();return{content:t,contentRowId:n}}function ox(e){if(e.match(`WITHOUT`)){if(e.next(),e.match(`ROWID`))return e.next(),e.match(`,`)?(e.next(),{withoutRowId:!0,...ox(e)}):{withoutRowId:!0}}else if(e.match(`STRICT`))return e.next(),e.match(`,`)?(e.next(),{strict:!0,...ox(e)}):{strict:!0}}function sx(e,t){let n=new $b(bb(t,`sqlite`).filter(e=>e.type!==`COMMENT`));n.expectToken(`CREATE`),n.expectTokenOptional(`TEMP`),n.expectTokenOptional(`TEMPORARY`),n.expectTokenOptional(`VIRTUAL`),n.expectToken(`TABLE`),n.expectTokensOptional([`IF`,`NOT`,`EXISTS`]);let r=n.consumeIdentifier(),i;n.match(`USING`)&&(n.next(),n.match(`FTS5`)&&(n.next(),i=ax(n.consumeParen())));let a=n.match(`(`)?ix(e,n.consumeParen()):{columns:[],constraints:[]},o=a.columns.filter(e=>e.pk).map(e=>e.name),s=a.columns.some(e=>!!e.constraint?.autoIncrement);return{schemaName:e,tableName:r,...a,autoIncrement:s,fts5:i,pk:o,...ox(n)}}function cx(e){let t=new $b(bb(e,`sqlite`)),n={columns:[],name:``,tableName:``,type:`KEY`};return t.expectToken(`CREATE`),t.match(`UNIQUE`)&&(n.type=`UNIQUE`,t.next()),t.expectToken(`INDEX`),t.expectTokensOptional([`IF`,`NOT`,`EXISTS`]),n.name=t.consumeIdentifier(),t.expectToken(`ON`),n.tableName=t.consumeIdentifier(),t.match(`(`)&&(n.columns=nx(t.consumeParen())),n}var lx=class extends zb{isSupportEditTable=!0;isSupportExplain=!0;isSupportReturningValue=!0;isSupportRowid=!0;escapeId(e){return`"${e.replace(/"/g,`""`)}"`}getColumnTypeHint(e){return e?(e=e.toUpperCase(),e.includes(`TEXT`)||e.includes(`CHAR`)||e.includes(`CLOB`)||e.includes(`STRING`)?`TEXT`:e.includes(`INT`)||e.includes(`NUMBER`)||e.includes(`REAL`)||e.includes(`DOUBLE`)||e.includes(`FLOAT`)?`NUMBER`:e.includes(`BLOB`)?`BLOB`:`TEXT`):null}async schemas(){let e=`main`,t=await this.query(`SELECT * FROM sqlite_master;`),n=[],r=t.rows;for(let t of r)if(t.type===`table`)try{n.push({type:`table`,schemaName:e,name:t.name,tableSchema:{...sx(e,t.sql),createScript:t.sql}})}catch{console.warn(`Failed to parse schema for table: ${t.name}`),n.push({type:`table`,name:t.name,schemaName:e})}else t.type===`trigger`?n.push({type:`trigger`,name:t.name,tableName:t.tbl_name,schemaName:e}):t.type===`view`&&n.push({type:`view`,name:t.name,schemaName:e});let i=n.filter(e=>e.tableSchema?.fts5).map(e=>e.name),a=new Set(i.map(e=>[`${e}_content`,`${e}_idx`,`${e}_docsize`,`${e}_config`,`${e}_data`]).flat());return n=n.filter(e=>!a.has(e.name)),{[e]:n}}async tableSchema(e,t){let n=`SELECT * FROM ${this.escapeId(e)}.sqlite_schema WHERE tbl_name = ${this.escapeValue(t)} AND "type" IN ('table', 'view', 'index');`,r=(await this.query(n)).rows,i=r.filter(e=>e.type===`index`&&e.sql!==null),a=[];for(let e of i)try{a.push(cx(e.sql))}catch{continue}let o=r.find(e=>e.type===`table`||e.type===`view`);if(!o)throw Error(`Unexpected error finding table `+t);if(o.type===`view`)return this.getFallbackTableSchema(e,t);try{let n=o.sql,r={...sx(e,n),createScript:n,indexes:a,schemaName:e,type:`table`};return r.fts5?{...await this.getFallbackTableSchema(e,t),fts5:r.fts5}:r}catch{throw Error(`Failed to parse CREATE TABLE script for '${t}'`)}}async getFallbackTableSchema(e,t){let n=`SELECT * FROM ${this.escapeId(e)}.pragma_table_info(${this.escapeValue(t)});`,r=(await this.query(n)).rows.map(e=>({name:e.name,pk:!!e.pk,type:e.type}));return{autoIncrement:!1,columns:r,pk:r.filter(e=>e.pk).map(e=>e.name),schemaName:e,tableName:t}}async selectTable(e,t,n){let r=await this.tableSchema(e,t),{limit:i,offset:a,orderByColumn:o,orderByDirection:s}=n,c=!r.fts5&&r.pk.length===0&&!r.withoutRowId&&!r.columns.find(e=>e.name===`rowid`)&&r.type===`table`;c&&(r.columns=[{constraint:{primaryKey:!0,autoIncrement:!0},name:`rowid`,type:`INTEGER`},...r.columns],r.pk=[`rowid`],r.autoIncrement=!0);let l=`${this.escapeId(e)}.${this.escapeId(t)}`,u=`*`;c?u=`rowid, *`:r.fts5&&(u=`rank, *`);let d=`SELECT ${u} FROM ${l}`,f=o&&s&&[`ASC`,`DESC`].includes(s)?`ORDER BY ${this.escapeId(o)} ${s}`:``,p=`LIMIT ${this.escapeValue(i)} OFFSET ${this.escapeValue(a)}`,m=[d,n.whereRaw?`WHERE ${n.whereRaw}`:``,f,p].filter(Boolean).join(` `),h=await this.conn.query(m);return r.fts5?{result:h,schema:{...r,columns:[{name:`rank`,type:`INTEGER`},...r.columns]}}:{result:h,schema:r}}generateTableSchemaStatement(e){return Zb(this,e)}buildExplainStatement(e){let t=bb(e.trim(),`sqlite`).filter(e=>e.type!==`COMMENT`).map(e=>e.value===`?`?{type:`STRING`,value:`''`}:e).map(e=>e.value).join(``).replace(/^(?!EXPLAIN\s+QUERY\s+PLAN\b)(?:EXPLAIN\b(?:\s+ANALYZE\b)?\s*)?/i,`EXPLAIN QUERY PLAN `);if(!t.startsWith(`EXPLAIN QUERY PLAN `))throw Error(`Explain statement must start with EXPLAIN QUERY PLAN`);return t}getQueryTabOverride(e,t){return e.toUpperCase().startsWith(`EXPLAIN QUERY PLAN `)?{component:Fb({data:t}),icon:Nr,label:`Explain`}:null}},ux=class{databaseId;constructor(e){this.databaseId=e}async query(e){let[t]=await this.transaction([e]);if(!t)throw Error(`No result returned from query`);return t}async transaction(e){let t=await Ma({body:{sql:e.map(e=>e.trim().replace(/;+$/,``)).join(`;`)},path:{database_id:this.databaseId}});if(!t.data?.result)throw Error(`Invalid response: missing result data`);return t.data.result.map(e=>this.transformResult(e))}transformResult(e){let t=e.results?.rows??[];return{...Nb({headers:e.results?.columns??[],rows:t,transformHeader:e=>({name:e,displayName:e})}),lastInsertRowid:e.meta?.last_row_id,stat:{queryDurationMs:e.meta?.duration??null,rowsAffected:e.meta?.changes??0,rowsRead:e.meta?.rows_read??null,rowsWritten:e.meta?.rows_written??null,rowCount:t.length}}}},dx=class extends lx{constructor(e){super(new ux(e))}async schemas(){let e=await super.schemas(),t=new Set([`_cf_METADATA`]);return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,n.filter(e=>!t.has(e.name))]))}},fx=Rn(`/d1/$databaseId`)({component:k(()=>P(()=>import(`./_databaseId-BEh2sOY5.js`),__vite__mapDeps([61,1,3,62,7,6,10,63,11,23,18,8,13,42,39,64,14,15,16,21,40,27,19,20,48,65,43])),`component`),errorComponent:k(()=>P(()=>import(`./_databaseId-Cow8QNw6.js`),__vite__mapDeps([66,29,1,30,3,7,6,26])),`errorComponent`),loader:async e=>({tables:((await new dx(e.params.databaseId).schemas()).main??[]).filter(e=>e.type===`table`||e.type===`view`).map(e=>({label:e.name,value:e.name})).sort((e,t)=>e.label.localeCompare(t.label))}),validateSearch:e=>({table:typeof e.table==`string`?e.table:void 0,worker:typeof e.worker==`string`?e.worker:void 0})}),px=Rn(`/cron-triggers/configured`)({component:k(()=>P(()=>import(`./configured-BGeRrlYf.js`),__vite__mapDeps([67,1,68,7,6,8,13,14,15,22,23,18,20,43,4])),`component`)}),mx=Rn(`/cron-triggers/ad-hoc`)({component:k(()=>P(()=>import(`./ad-hoc-B9HL0oNk.js`),__vite__mapDeps([69,1,68,7,6,8,13,14,15,22,23,18,20,43,4])),`component`)}),hx=Rn(`/workflows/$workflowName/`)({component:k(()=>P(()=>import(`./_workflowName-WgIBBs_w.js`),__vite__mapDeps([70,1,7,71,6,63,11,23,72,38,73,74,64,15,21,40,18,27,19,20,13,22,43,8,49,55])),`component`),errorComponent:k(()=>P(()=>import(`./_workflowName-uYCS7veQ.js`),__vite__mapDeps([75,29,1,30,3,7,6,26])),`errorComponent`),loader:async({params:e})=>{let t=await eo({path:{workflow_name:e.workflowName},query:{page:1,per_page:25},throwOnError:!1});if(t.response?.status===404)throw T();if(t.error)throw Error(`Failed to list instances for workflow "${e.workflowName}"`);return{instances:t.data?.result??[],resultInfo:t.data?.result_info??{page:1,per_page:25,total_count:0,total_pages:0}}},notFoundComponent:k(()=>P(()=>import(`./_workflowName-Daanvg3W.js`),[]),`notFoundComponent`)}),gx=Rn(`/r2/$bucketName/`)({component:k(()=>P(()=>import(`./_bucketName-DqCj-aYZ.js`),__vite__mapDeps([76,1,30,3,7,71,6,10,18,38,77,73,42,13,14,15,21,40,11,41,65,43,8,55])),`component`),errorComponent:k(()=>P(()=>import(`./_bucketName-uYCS7veQ.js`),__vite__mapDeps([78,29,1,30,3,7,6,26])),`errorComponent`),loaderDeps:({search:e})=>({prefix:e.prefix,delimiter:e.delimiter}),loader:async({params:e,deps:t})=>{let n=await Ua({path:{bucket_name:e.bucketName},query:{delimiter:t.delimiter===!1?void 0:`/`,per_page:100,prefix:t.prefix||void 0},throwOnError:!1});if(n.response?.status===404)throw T();if(n.error)throw Error(`Failed to list objects in bucket "${e.bucketName}"`);return{objects:n.data?.result??[],delimitedPrefixes:n.data?.result_info?.delimited??[],cursor:n.data?.result_info?.cursor??null,isTruncated:n.data?.result_info?.is_truncated===`true`,delimiterEnabled:t.delimiter!==!1}},notFoundComponent:k(()=>P(()=>import(`./_bucketName-Daanvg3W.js`),[]),`notFoundComponent`),validateSearch:e=>({delimiter:e.delimiter!==!1,prefix:typeof e.prefix==`string`?e.prefix:void 0})}),_x=Rn(`/email/routing/`)({component:k(()=>P(()=>import(`./routing-CVthjHxr.js`),__vite__mapDeps([79,1,7,6,74,52,47,20,13,19,14,15,21,43,18,8,54,26,55,49])),`component`),errorComponent:k(()=>P(()=>import(`./routing-uYCS7veQ.js`),__vite__mapDeps([80,29,1,30,3,7,6,26])),`errorComponent`),loaderDeps:({search:e})=>({worker:e.worker}),loader:async({deps:e})=>{let t=Fo((await qa()).data?.result??[],e.worker===void 0?``:`?worker=${encodeURIComponent(e.worker)}`)?.name,n=await Ja({query:{per_page:24,worker:t},throwOnError:!1});if(n.error||!n.response.ok)throw Error(n.error?.errors?.[0]?.message??`Failed to load received emails.`);let r=n.data?.result;return{emails:Array.isArray(r)?r:[],worker:t,nextCursor:n.data?.result_info?.has_more?n.data.result_info.cursor:void 0}}}),vx=Rn(`/do/$className/`)({component:k(()=>P(()=>import(`./_className-BW1__nAw.js`),__vite__mapDeps([81,1,30,3,7,6,13,41,42,18,43,8])),`component`),errorComponent:k(()=>P(()=>import(`./_className-uYCS7veQ.js`),__vite__mapDeps([82,29,1,30,3,7,6,26])),`errorComponent`),loader:async({params:e})=>{let t=((await Pa()).data?.result??[]).find(t=>t.class===e.className||t.name===e.className||t.id===e.className);if(!t?.id)throw T();let n=await Fa({path:{id:t.id},query:{limit:50}}),r=n.data?.result??[],i=n.data?.result_info?.cursor??null;return{cursor:i,hasMore:!!i,namespaceId:t.id,objects:r}},notFoundComponent:k(()=>P(()=>import(`./_className-DCj9M_Uf.js`),[]),`notFoundComponent`)}),yx=Rn(`/workflows/$workflowName/$instanceId`)({component:k(()=>P(()=>import(`./_instanceId-CxJm9jpK.js`),__vite__mapDeps([83,1,30,3,7,71,6,10,18,72,8,24,25,74,64,14,15,21,40,11,43,49])),`component`),errorComponent:k(()=>P(()=>import(`./_instanceId-Cow8QNw6.js`),__vite__mapDeps([84,29,1,30,3,7,6,26])),`errorComponent`),loader:async({params:e})=>{let t=await ro({path:{instance_id:e.instanceId,workflow_name:e.workflowName},throwOnError:!1});if(t.response?.status===404)throw T();if(t.error)throw Error(`Failed to fetch workflow instance "${e.instanceId}"`);let n=t.data?.result;if(!n)throw T();return{details:n}},notFoundComponent:k(()=>P(()=>import(`./_instanceId-Daanvg3W.js`),[]),`notFoundComponent`)}),bx={received:`Displayed received email content was truncated during local capture. The complete message was still delivered to the Worker.`,reply:`Displayed reply content was truncated during local capture. The complete reply is available in the local filesystem; see the development log for its path.`,sent:`Displayed sent email content was truncated during local capture. The complete email is available in the local filesystem; see the development log for its path.`},xx={received:`This content was truncated during local capture. The complete email was delivered to the Worker, but cannot be inspected in Local Explorer.`,reply:`Reply content was truncated during local capture. The complete reply is available in temporary local storage; see the development log for its path.`,sent:`This content was truncated during local capture. The complete email is available in temporary local storage; see the development log for its path.`};function Sx(e,t){return e.some(({message:e})=>e===bx[t])}function Cx({kind:e}){return(0,D.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-kumo-warning/30 bg-kumo-warning/10 px-3 py-2.5 text-sm text-kumo-default`,role:`status`,children:[(0,D.jsx)(`span`,{className:`flex h-lh shrink-0 items-center`,children:(0,D.jsx)(Xe,{className:`text-kumo-warning`,size:16})}),(0,D.jsx)(`p`,{children:xx[e]})]})}var wx=()=>(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(Vr,{children:[(0,D.jsx)(Vr.Secondary,{children:`Lifecycle`}),(0,D.jsxs)(Vr.Primary,{children:[(0,D.jsx)(Wr,{}),(0,D.jsx)(Wr,{}),(0,D.jsx)(Wr,{}),(0,D.jsx)(Wr,{}),(0,D.jsx)(Wr,{})]})]}),(0,D.jsxs)(Vr,{children:[(0,D.jsx)(Vr.Secondary,{children:`Message`}),(0,D.jsxs)(Vr.Primary,{children:[(0,D.jsx)(Wr,{}),(0,D.jsx)(Wr,{}),(0,D.jsx)(Wr,{})]})]})]}),Tx=[`B`,`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],Ex=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`],Dx=[`b`,`kbit`,`Mbit`,`Gbit`,`Tbit`,`Pbit`,`Ebit`,`Zbit`,`Ybit`],Ox=[`b`,`kibit`,`Mibit`,`Gibit`,`Tibit`,`Pibit`,`Eibit`,`Zibit`,`Yibit`],kx=(e,t,n)=>{let r=e;return typeof t==`string`||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},Ax=e=>{if(typeof e==`number`)return Math.log10(e);let t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},jx=e=>typeof e==`number`?Math.log(e):Ax(e)*Math.log(10),Mx=(e,t)=>{if(typeof e==`number`)return e/t;let n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},Nx=(e,t)=>{if(t===void 0)return e;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<0)throw TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t,` `):e},Px=e=>{let{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(t!==void 0||n!==void 0)return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:`trunc`}};function Fx(e,t){if(typeof e!=`bigint`&&!Number.isFinite(e))throw TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};let n=t.bits?t.binary?Ox:Dx:t.binary?Ex:Tx,r=t.space?t.nonBreakingSpace?`\xA0`:` `:``,i=typeof e==`number`?e===0:e===0n;if(t.signed&&i)return Nx(` 0${r}${n[0]}`,t.fixedWidth);let a=e<0,o=a?`-`:t.signed?`+`:``;a&&(e=-e);let s=Px(t),c;if(e<1)c=o+kx(e,t.locale,s)+r+n[0];else{let i=Math.min(Math.floor(t.binary?jx(e)/Math.log(1024):Ax(e)/3),n.length-1);if(e=Mx(e,(t.binary?1024:1e3)**i),!s){let t=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(t)}let a=kx(Number(e),t.locale,s),l=n[i];c=o+a+r+l}return Nx(c,t.fixedWidth)}function Ix(e){return Fx(e??0)}function Lx(e){return e.replace(/^<|>$/g,``)}function Rx(e){return e.replace(/<([^<>]+)>/g,`$1`)}function zx(e){if(!e)return`-`;try{let t=new Date(e);return isNaN(t.getTime())?`-`:new Intl.DateTimeFormat(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,timeZone:`UTC`,timeZoneName:`short`}).format(t)}catch{return`-`}}var Bx=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function Vx(e){return Bx.test(e)}function Hx(e){return Lx(e)}var Ux=Rn(`/email/routing/$captureId`)({component:k(()=>P(()=>import(`./_captureId-Cb6ggQGG.js`),__vite__mapDeps([85,1,30,3,7,6,10,52,26,17,18,8,19,20,13,43,53])),`component`),errorComponent:k(()=>P(()=>import(`./_captureId-Cow8QNw6.js`),__vite__mapDeps([86,29,1,30,3,7,6,26])),`errorComponent`),notFoundComponent:k(()=>P(()=>import(`./_captureId-Daanvg3W.js`),[]),`notFoundComponent`),pendingComponent:wx,validateSearch:e=>({lookup:e.lookup===`message-id`?`message-id`:void 0,worker:typeof e.worker==`string`?e.worker:void 0}),loaderDeps:({search:e})=>({lookup:e.lookup,worker:e.worker}),loader:async({params:e,deps:t})=>{let n=t.lookup===`message-id`||!Vx(e.captureId),r=t.worker;!n&&r===void 0&&(r=Fo((await qa()).data?.result??[],``)?.name);let i=await Ja({query:n?{email_id:e.captureId,worker:r}:{capture_id:e.captureId,worker:r??``},throwOnError:!1});if(i.response?.status===404)throw T();let a=i.data?.result;if(i.error||!a||Array.isArray(a))throw Error(`Failed to load email "${e.captureId}"`);let o=Sx(i.data?.messages??[],`received`);return{email:a,replyTruncated:Sx(i.data?.messages??[],`reply`),truncated:o}}}),Wx=class{namespaceId;objectId;objectName;constructor(e,t,n){if(this.namespaceId=e,this.objectId=t,this.objectName=n,!t&&!n)throw Error("Either `objectId` or `objectName` must be provided to identify the Durable Object")}async query(e){let[t]=await this.transaction([e]);if(!t)throw Error(`No result returned from query`);return t}async transaction(e){let t=e.map(e=>e.trim().replace(/;+$/,``)).map(e=>({sql:e})),n=await Ka({body:this.objectId?{durable_object_id:this.objectId,queries:t}:{durable_object_name:this.objectName,queries:t},path:{namespace_id:this.namespaceId}});if(!n.data?.result)throw Error(`Invalid response: missing result data`);return n.data.result.map(e=>this.transformResult(e))}transformResult(e){let t=e.rows??[];return{...Nb({headers:e.columns??[],rows:t,transformHeader:e=>({name:e,displayName:e})}),stat:{queryDurationMs:null,rowsAffected:0,rowsRead:e.meta?.rows_read??null,rowsWritten:e.meta?.rows_written??null,rowCount:t.length}}}},Gx=class extends lx{constructor(e,t,n){super(new Wx(e,t,n))}async schemas(){let e=await super.schemas(),t=new Set([`_cf_KV`,`_cf_METADATA`,`__miniflare_do_name`]);return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,n.filter(e=>!t.has(e.name))]))}},Kx=()=>P(()=>import(`./_objectId-Daanvg3W.js`),[]),qx=()=>P(()=>import(`./_objectId-Cow8QNw6.js`),__vite__mapDeps([87,29,1,30,3,7,6,26])),Jx=()=>P(()=>import(`./_objectId-DdmD-NV1.js`),__vite__mapDeps([88,1,3,30,7,62,6,10,63,11,23,18,8,13,42,39,64,14,15,16,21,40,27,19,20,48,65,43]));function Yx(e){return/^[0-9a-f]{64}$/i.test(e)}var Xx=Rn(`/do/$className/$objectId`)({component:k(Jx,`component`),errorComponent:k(qx,`errorComponent`),loader:async({params:e})=>{let t=((await Pa()).data?.result??[]).find(t=>t.class===e.className||t.name===e.className||t.id===e.className);if(!t?.id)throw T();let n=Yx(e.objectId),r=n?e.objectId:null,i=n?null:e.objectId,a=((await new Gx(t.id,r,i).schemas()).main??[]).filter(e=>e.type===`table`||e.type===`view`).map(e=>({label:e.name,value:e.name})).sort((e,t)=>e.label.localeCompare(t.label));return{isId:n,namespaceId:t.id,objectId:r,objectName:i,tables:a}},notFoundComponent:k(Kx,`notFoundComponent`),validateSearch:e=>({table:typeof e.table==`string`?e.table:void 0})}),Zx=Rn(`/r2/$bucketName/object/$`)({component:k(()=>P(()=>import(`./object._-DDwO6NT7.js`),__vite__mapDeps([89,1,30,3,7,6,77,15,21,43,18,8,44])),`component`),errorComponent:k(()=>P(()=>import(`./object._-Cow8QNw6.js`),__vite__mapDeps([90,29,1,30,3,7,6,26])),`errorComponent`),validateSearch:e=>({delimiter:e.delimiter!==!1}),loader:async({params:e})=>{let t=e._splat;if(!t)throw Error(`Object key is required`);let n=await Wa({path:{bucket_name:e.bucketName,object_key:t},headers:{"cf-metadata-only":`true`},throwOnError:!1});if(n.response?.status===404)throw T();if(n.error)throw Error(`Failed to fetch object "${t}"`);let r=n.data?.result;if(!r)throw T();return{object:r,objectKey:t}},notFoundComponent:k(()=>P(()=>import(`./object._-Daanvg3W.js`),[]),`notFoundComponent`)}),Qx=Ko.update({id:`/email`,path:`/email`,getParentRoute:()=>zo}),$x=qo.update({id:`/cron-triggers`,path:`/cron-triggers`,getParentRoute:()=>zo}),eS=Qo.update({id:`/`,path:`/`,getParentRoute:()=>zo}),tS=$o.update({id:`/observability/`,path:`/observability/`,getParentRoute:()=>zo}),nS=es.update({id:`/`,path:`/`,getParentRoute:()=>$x}),rS=ts.update({id:`/workflows/$workflowName`,path:`/workflows/$workflowName`,getParentRoute:()=>zo}),iS=ns.update({id:`/r2/$bucketName`,path:`/r2/$bucketName`,getParentRoute:()=>zo}),aS=rs.update({id:`/observability/events`,path:`/observability/events`,getParentRoute:()=>zo}),oS=is.update({id:`/kv/$namespaceId`,path:`/kv/$namespaceId`,getParentRoute:()=>zo}),sS=ss.update({id:`/flagship/$appId`,path:`/flagship/$appId`,getParentRoute:()=>zo}),cS=ls.update({id:`/sending`,path:`/sending`,getParentRoute:()=>Qx}),lS=us.update({id:`/routing`,path:`/routing`,getParentRoute:()=>Qx}),uS=ds.update({id:`/do/$className`,path:`/do/$className`,getParentRoute:()=>zo}),dS=fx.update({id:`/d1/$databaseId`,path:`/d1/$databaseId`,getParentRoute:()=>zo}),fS=px.update({id:`/configured`,path:`/configured`,getParentRoute:()=>$x}),pS=mx.update({id:`/ad-hoc`,path:`/ad-hoc`,getParentRoute:()=>$x}),mS=hx.update({id:`/`,path:`/`,getParentRoute:()=>rS}),hS=gx.update({id:`/`,path:`/`,getParentRoute:()=>iS}),gS=_x.update({id:`/`,path:`/`,getParentRoute:()=>lS}),_S=vx.update({id:`/`,path:`/`,getParentRoute:()=>uS}),vS=yx.update({id:`/$instanceId`,path:`/$instanceId`,getParentRoute:()=>rS}),yS=Ux.update({id:`/$captureId`,path:`/$captureId`,getParentRoute:()=>lS}),bS=Xx.update({id:`/$objectId`,path:`/$objectId`,getParentRoute:()=>uS}),xS=Zx.update({id:`/object/$`,path:`/object/$`,getParentRoute:()=>iS}),SS={CronTriggersAdHocRoute:pS,CronTriggersConfiguredRoute:fS,CronTriggersIndexRoute:nS},CS=$x._addFileChildren(SS),wS={EmailRoutingCaptureIdRoute:yS,EmailRoutingIndexRoute:gS},TS={EmailRoutingRoute:lS._addFileChildren(wS),EmailSendingRoute:cS},ES=Qx._addFileChildren(TS),DS={DoClassNameObjectIdRoute:bS,DoClassNameIndexRoute:_S},OS=uS._addFileChildren(DS),kS={R2BucketNameIndexRoute:hS,R2BucketNameObjectSplatRoute:xS},AS=iS._addFileChildren(kS),jS={WorkflowsWorkflowNameInstanceIdRoute:vS,WorkflowsWorkflowNameIndexRoute:mS},MS={IndexRoute:eS,CronTriggersRoute:CS,EmailRoute:ES,D1DatabaseIdRoute:dS,DoClassNameRoute:OS,FlagshipAppIdRoute:sS,KvNamespaceIdRoute:oS,ObservabilityEventsRoute:aS,R2BucketNameRoute:AS,WorkflowsWorkflowNameRoute:rS._addFileChildren(jS),ObservabilityIndexRoute:tS},NS=zo._addFileChildren(MS)._addFileTypes(),PS=window.matchMedia(`(prefers-color-scheme: dark)`);ko(Do(),PS.matches),PS.addEventListener(`change`,()=>{ko(Do(),PS.matches)});var FS=nr({routeTree:NS,basepath:`/cdn-cgi/local/explorer/`}),IS=document.getElementById(`root`);IS&&(0,lr.createRoot)(IS).render((0,D.jsx)(O.StrictMode,{children:(0,D.jsx)(ar,{router:FS})}));export{R as $,eo as $t,Gv as A,Xa as At,fg as B,ao as Bt,kb as C,uo as Ct,ab as D,Fa as Dt,eb as E,so as Et,Ng as F,Va as Ft,Xm as G,ka as Gt,J as H,Ua as Ht,jg as I,za as It,rl as J,ja as Jt,Ih as K,Oa as Kt,o_ as L,Ba as Lt,Fg as M,Za as Mt,Mg as N,La as Nt,jv as O,Ja as Ot,Pg as P,Ra as Pt,yl as Q,ro as Qt,Qg as R,qa as Rt,xb as S,fo as St,ub as T,co as Tt,Z as U,Ga as Ut,mu as V,Ha as Vt,Nd as W,Na as Wt,Cc as X,no as Xt,Sc as Y,to as Yt,L as Z,$a as Zt,hx as _,Ko as _t,Vx as a,jr as an,Rl as at,Ab as b,ho as bt,Rx as c,Dr as cn,fs as ct,Cx as d,tr as dn,ss as dt,io as en,z as et,Sx as f,Qn as fn,is as ft,gx as g,qo as gt,_x as h,An as hn,Zo as ht,Ux as i,Fr as in,bl as it,Mv as j,Ya as jt,Hv as k,Qa as kt,Lx as l,Er as ln,ls as lt,vx as m,jn as mn,Qo as mt,Xx as n,Wr as nn,I as nt,Hx as o,Ar as on,mc as ot,yx as p,Mn as pn,$o as pt,ah as q,Aa as qt,Gx as r,Vr as rn,B as rt,zx as s,Or as sn,F as st,Zx as t,oi as tn,zc as tt,Ix as u,mr as un,cs as ut,fx as v,Po as vt,bb as w,lo as wt,Pb as x,po as xt,dx as y,Fo as yt,yg as z,oo as zt};