@vellumai/web 0.12.2 → 0.12.3-staging.1

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 (448) hide show
  1. package/dist/assets/{a2a-invite-BOdHy8O9.js → a2a-invite-DBlDzShH.js} +1 -1
  2. package/dist/assets/{about-page-COxmu2oQ.js → about-page-DdLu4gin.js} +1 -1
  3. package/dist/assets/{account-page-CYNbvuWs.js → account-page-CRCayJE1.js} +1 -1
  4. package/dist/assets/{account-shell-CbiWTAQP.js → account-shell-CIfUqVu1.js} +1 -1
  5. package/dist/assets/acp-run-detail-panel-Be03WYUS.js +3 -0
  6. package/dist/assets/activation-list-route-BiHOPkuW.js +1 -0
  7. package/dist/assets/{activity-redirect-page-BWj7yOid.js → activity-redirect-page-DM_5_I_D.js} +1 -1
  8. package/dist/assets/activity-steps-panel-BXkDyFqw.js +1 -0
  9. package/dist/assets/add-credits-modal-Bjj5IcfD.js +1 -0
  10. package/dist/assets/{add-credits-modal-B0DI6Rs_.js → add-credits-modal-CzEGqiQb.js} +1 -1
  11. package/dist/assets/ai-page-BhWTbyQ2.js +1 -0
  12. package/dist/assets/android-billing-handoff-Cbg8fsR3.js +1 -0
  13. package/dist/assets/{api-key-screen-fY9JjhTe.js → api-key-screen-VGgQ3yZn.js} +1 -1
  14. package/dist/assets/app-BFMKh-Wt.css +2 -0
  15. package/dist/assets/{app-info-B8Mqmeak.js → app-info-Clahy-Wt.js} +1 -1
  16. package/dist/assets/app-n7D5Q-HS.js +392 -0
  17. package/dist/assets/archive-redirect-page-DebwOmzE.js +1 -0
  18. package/dist/assets/{assistant-status-panel-BALzwsAc.js → assistant-status-panel-B1FR7MM1.js} +1 -1
  19. package/dist/assets/auth-store-C6J2aPKg.js +1 -0
  20. package/dist/assets/{auth-welcome-screen-D2mxoZEG.js → auth-welcome-screen-BeA5CpIk.js} +1 -1
  21. package/dist/assets/avatar-bundled-components-L3rXWeWJ.js +1 -0
  22. package/dist/assets/avatar-random-CWz7C9rs.js +2 -0
  23. package/dist/assets/{await-org-header-settled-CYxBtSPa.js → await-org-header-settled-BOJkVf_1.js} +1 -1
  24. package/dist/assets/background-task-detail-panel-t9FRp_-Z.js +1 -0
  25. package/dist/assets/billing-page-CL0Pdh_3.js +3 -0
  26. package/dist/assets/{billing-redirect-page-nGTPWHMN.js → billing-redirect-page-DDf6m-FK.js} +1 -1
  27. package/dist/assets/{bookmarks-page-CGd4Okx8.js → bookmarks-page-UXQyS5kQ.js} +1 -1
  28. package/dist/assets/{bundle-confirm-page-BuQ9wfYw.js → bundle-confirm-page-Wg-3XwhK.js} +1 -1
  29. package/dist/assets/channel-transcript-panel-HxUNeT8p.js +1 -0
  30. package/dist/assets/channels-page-route-Cz5m59Qi.js +1 -0
  31. package/dist/assets/chat-CBbKX2hh.js +3 -0
  32. package/dist/assets/chat-CVcAmb4G.js +3 -0
  33. package/dist/assets/chat-Cp6r9FuL.js +3 -0
  34. package/dist/assets/chat-DaQ9msXY.js +3 -0
  35. package/dist/assets/chat-info-panel-DEanOgSg.js +1 -0
  36. package/dist/assets/{checkout-continuation-ATko7N-k.js → checkout-continuation-BKsgghES.js} +1 -1
  37. package/dist/assets/{checkout-page-CVp2T6mP.js → checkout-page-C73ixDgx.js} +1 -1
  38. package/dist/assets/checkout-return-target-DDDp8tMv.js +1 -0
  39. package/dist/assets/command-palette-Bqkpugfw.js +1 -0
  40. package/dist/assets/{command-palette-BuaJlwlj.js → command-palette-DvhQJQSH.js} +1 -1
  41. package/dist/assets/{command-palette-window-page-UeoQHE-2.js → command-palette-window-page-DGDhA-B4.js} +1 -1
  42. package/dist/assets/common-B9fnih0e.js +1 -0
  43. package/dist/assets/common-DbDGhUk1.js +1 -0
  44. package/dist/assets/common-twS-Xtq8.js +1 -0
  45. package/dist/assets/common-ue46KSet.js +1 -0
  46. package/dist/assets/{community-page-rNFPZE2f.js → community-page-Dob0FV5_.js} +1 -1
  47. package/dist/assets/{companion-accent-C3xBrXHO.js → companion-accent-la8ZJ6IC.js} +1 -1
  48. package/dist/assets/{companion-dock-zones-page-plFxxNVK.js → companion-dock-zones-page-CFJTproC.js} +1 -1
  49. package/dist/assets/{companion-layout-Cu_j-nKV.js → companion-layout-BuxIBkh-.js} +1 -1
  50. package/dist/assets/{companion-popover-STvrRaku.js → companion-popover-BBqEGBTZ.js} +1 -1
  51. package/dist/assets/{companion-popover-page-Dvft1iSc.js → companion-popover-page-Ck2zhqqG.js} +1 -1
  52. package/dist/assets/companion-surface-page-D7cjO06j.js +1 -0
  53. package/dist/assets/{companion-watch-frame-page-DLTwthiI.js → companion-watch-frame-page-pWwGxOZY.js} +1 -1
  54. package/dist/assets/{connect-page-BtvEUJj6.js → connect-page-lW4ZEcOf.js} +1 -1
  55. package/dist/assets/{consent-controls-CjyXQ2Ju.js → consent-controls--WNBdiwt.js} +1 -1
  56. package/dist/assets/contacts-gateway-CWKximoP.js +1 -0
  57. package/dist/assets/contacts-page-route-8Nysvlx4.js +1 -0
  58. package/dist/assets/copy-button-DPlyOF7A.js +1 -0
  59. package/dist/assets/{credential-entry-page-CvXfQZPl.js → credential-entry-page-CRLQ3v95.js} +1 -1
  60. package/dist/assets/credentials-page-CcY2zM5u.js +1 -0
  61. package/dist/assets/{csv-preview-TFV8b1Dq.js → csv-preview-Cx1awfot.js} +1 -1
  62. package/dist/assets/danger-zone-redirect-page-CduOjFC8.js +1 -0
  63. package/dist/assets/debug-page-B5rdWQOa.js +4 -0
  64. package/dist/assets/deploy-dialogs-Bcjd9rq0.js +1 -0
  65. package/dist/assets/deploy-dialogs-CoLI4cjl.js +1 -0
  66. package/dist/assets/desktop-preview-content-V-sOQVf4.js +2 -0
  67. package/dist/assets/{desktop-status-CPR10G_B.js → desktop-status-Br7Q6i6P.js} +1 -1
  68. package/dist/assets/{desktop-viewer-Cm09cFMg.js → desktop-viewer-DffX_ioO.js} +2 -2
  69. package/dist/assets/{detail-card-pT0agbKq.js → detail-card-BkqRteiy.js} +1 -1
  70. package/dist/assets/{detail-panel-stop-button-DWoO-nJN.js → detail-panel-stop-button-B-4csyQj.js} +1 -1
  71. package/dist/assets/detail-primitives-ChhRyu-L.js +1 -0
  72. package/dist/assets/developer-page-BHH-G3vb.js +1 -0
  73. package/dist/assets/devices-redirect-page-Ci4S4x-o.js +1 -0
  74. package/dist/assets/{dictation-overlay-page-CG8S4p0x.js → dictation-overlay-page-DFWMmpSF.js} +1 -1
  75. package/dist/assets/{document-load-DShQChFM.js → document-load-BK4EO7RZ.js} +1 -1
  76. package/dist/assets/document-load-BRhCAhb0.js +1 -0
  77. package/dist/assets/document-viewer-page-8sDnK841.js +1 -0
  78. package/dist/assets/{ellipsis-vertical-Dbz00Lo-.js → ellipsis-vertical-DWDUOGRm.js} +1 -1
  79. package/dist/assets/{emails-page-BlP1KP70.js → emails-page-DO9ZE3jU.js} +1 -1
  80. package/dist/assets/environment-store-BeKdNCDQ.js +1 -0
  81. package/dist/assets/esm-BGKIdtva.js +2 -0
  82. package/dist/assets/esm-CeA0xUzc.js +2 -0
  83. package/dist/assets/{esm-BRap8C09.js → esm-CkWCRmp8.js} +1 -1
  84. package/dist/assets/esm-CskPvois.js +2 -0
  85. package/dist/assets/esm-DC5Xk3B0.js +2 -0
  86. package/dist/assets/esm-DbCpCgyJ.js +1 -0
  87. package/dist/assets/{esm-C8i-Nf3-.js → esm-DcW4PisK.js} +1 -1
  88. package/dist/assets/esm-DtH_yADh.js +1 -0
  89. package/dist/assets/esm-hhBjqEXz.js +2 -0
  90. package/dist/assets/{esm-BfMa-HX2.js → esm-hzkaqWNK.js} +2 -2
  91. package/dist/assets/{file-diff-view-CO2QJdSQ.js → file-diff-view-C9bCfhOV.js} +1 -1
  92. package/dist/assets/file-editor-CfRnh-Mo.js +1 -0
  93. package/dist/assets/general-page-DjjeWAtL.js +2 -0
  94. package/dist/assets/hatching-screen-B9jbVOd6.js +1 -0
  95. package/dist/assets/home-BVIzMQck.js +1 -0
  96. package/dist/assets/home-CCaaP5mz.js +1 -0
  97. package/dist/assets/home-Dn0m9kBd.js +1 -0
  98. package/dist/assets/home-DpWJt0sR.js +1 -0
  99. package/dist/assets/{hosting-screen-nVYKldkt.js → hosting-screen-CGLHzAHy.js} +1 -1
  100. package/dist/assets/icons-DxrLl-Dj.js +1 -0
  101. package/dist/assets/identity-page-route-BuLKelGC.js +7 -0
  102. package/dist/assets/inspect-page-DKNTTk-0.js +9 -0
  103. package/dist/assets/integrations-page-DyiqZ_kn.js +1 -0
  104. package/dist/assets/{intelligence-layout-BUGM35jP.js → intelligence-layout-SSf_CqAg.js} +1 -1
  105. package/dist/assets/intelligence-layout-slots-store-DqHNLKm3.js +1 -0
  106. package/dist/assets/keyboard-shortcuts-redirect-page-CO4tE0_q.js +1 -0
  107. package/dist/assets/{latest-assistant-text-CaZrfk6l.js → latest-assistant-text-dvDZFw6m.js} +1 -1
  108. package/dist/assets/library-detail-page-B7-d8yHD.js +1 -0
  109. package/dist/assets/library-page-D2GjaHzY.js +1 -0
  110. package/dist/assets/local-mode-CMLuHoSn.js +1 -0
  111. package/dist/assets/login-page-CFgNabXb.js +1 -0
  112. package/dist/assets/{logout-page-DpNGL-t4.js → logout-page-DwDFjp0Z.js} +1 -1
  113. package/dist/assets/{logs-layout-BqrW_P--.js → logs-layout-BBZ9RAjZ.js} +1 -1
  114. package/dist/assets/markdown-preview-CaBuvjCf.js +1 -0
  115. package/dist/assets/{media-preview-DvdWd4rA.js → media-preview-BoHSPjgq.js} +1 -1
  116. package/dist/assets/memory-page-route-BYhuTazu.js +2 -0
  117. package/dist/assets/{memory-router-playground-page-BmST7_Kw.js → memory-router-playground-page-0MqBO297.js} +1 -1
  118. package/dist/assets/message-files-panel-DQG3vRZi.js +1 -0
  119. package/dist/assets/{metric-card-BLErTI6M.js → metric-card-CfWDowxR.js} +1 -1
  120. package/dist/assets/native-attachment-pickers-Ck3NxYSR.js +1 -0
  121. package/dist/assets/native-file-D0OMqAkq.js +1 -0
  122. package/dist/assets/{notifications-page-wjJIxJdC.js → notifications-page-DKf_7eYc.js} +1 -1
  123. package/dist/assets/{oauth-complete-page-DMvGhbPg.js → oauth-complete-page-cDoKH693.js} +1 -1
  124. package/dist/assets/{oauth-popup-complete-page-BjtYXKTi.js → oauth-popup-complete-page-Cp0vjEmH.js} +1 -1
  125. package/dist/assets/paired-platform-identity-DskZXcWX.js +1 -0
  126. package/dist/assets/{pairing-page-BfrUX_YA.js → pairing-page-skO554fH.js} +1 -1
  127. package/dist/assets/password-reset-page-Dr8OrlGm.js +1 -0
  128. package/dist/assets/{pdf-file-preview-Cv30v3e_.js → pdf-file-preview-DC5vOcs5.js} +1 -1
  129. package/dist/assets/{peeking-eyes-DJkKQl-G.js → peeking-eyes-C795qorf.js} +1 -1
  130. package/dist/assets/{personality-page-D03UdQms.js → personality-page-BkCqu5OB.js} +1 -1
  131. package/dist/assets/{personality-page-CUwdmzId.js → personality-page-fO74T0hs.js} +1 -1
  132. package/dist/assets/personality-sliders-sAKu2C74.js +1 -0
  133. package/dist/assets/plans-page-C5BxyaZO.js +1 -0
  134. package/dist/assets/{platform-loopback-page-C3a-am1y.js → platform-loopback-page-CrowCjnc.js} +1 -1
  135. package/dist/assets/{plugin-detail-page-D52frrTx.js → plugin-detail-page-DdUXGKxQ.js} +1 -1
  136. package/dist/assets/{plugins-page-RrhNT7og.js → plugins-page-DfMdsxPx.js} +1 -1
  137. package/dist/assets/plugins-surface-BL69ztAA.js +1 -0
  138. package/dist/assets/{preview-error-BlHGLqgj.js → preview-error-vi2B-l2a.js} +1 -1
  139. package/dist/assets/privacy-page-znT2Mvu5.js +1 -0
  140. package/dist/assets/{privacy-screen-Bkjr2dIv.js → privacy-screen-Dofd5Mz8.js} +1 -1
  141. package/dist/assets/{provider-callback-page-DGAy5DvE.js → provider-callback-page-BjwoQL8R.js} +1 -1
  142. package/dist/assets/{provider-key-CHOBBf9E.js → provider-key-CFsemHfe.js} +1 -1
  143. package/dist/assets/{provider-signup-page-BG1mhVYr.js → provider-signup-page-Cqs--Pss.js} +1 -1
  144. package/dist/assets/{provisioning-targets-B5flnyHy.js → provisioning-targets-DdPIF4Aj.js} +1 -1
  145. package/dist/assets/{quick-input-page-CCDzeBSI.js → quick-input-page-RhvkuA-a.js} +1 -1
  146. package/dist/assets/referral-modal-D3YmuUji.js +1 -0
  147. package/dist/assets/referral-modal-WPGRXuLA.js +1 -0
  148. package/dist/assets/{rehype-katex-Bp74Wkmo.js → rehype-katex-Cj-PIKJ4.js} +1 -1
  149. package/dist/assets/{research-mock-page-CHfDwifi.js → research-mock-page-DtY0W-jo.js} +1 -1
  150. package/dist/assets/research-onboarding-route-8bvvxnvF.js +50 -0
  151. package/dist/assets/{review-terms-screen-C2vdbHvu.js → review-terms-screen-DlpazHw3.js} +1 -1
  152. package/dist/assets/routes-DaWUVprK.js +1 -0
  153. package/dist/assets/schedules-DzyEr3no.js +1 -0
  154. package/dist/assets/schedules-page-CR1ee93h.js +1 -0
  155. package/dist/assets/security-redirect-page-C3bkYPpB.js +1 -0
  156. package/dist/assets/select-assistant-screen-Dzrgh4-3.js +1 -0
  157. package/dist/assets/{self-hosted-servers-CsZVedz3.js → self-hosted-servers-C9NSM8gD.js} +1 -1
  158. package/dist/assets/{service-form-controls-DTfO4j3O.js → service-form-controls-BtX2YnjY.js} +1 -1
  159. package/dist/assets/{setting-row-B9yebbEq.js → setting-row-Dhzhn9MB.js} +1 -1
  160. package/dist/assets/settings-BaBLTX_4.js +3 -0
  161. package/dist/assets/settings-DYkeeCDS.js +3 -0
  162. package/dist/assets/settings-DrC1YWLC.js +3 -0
  163. package/dist/assets/settings-divider-D9PQS5sY.js +1 -0
  164. package/dist/assets/{settings-layout-D6972VFH.js → settings-layout-DgPLIzdo.js} +1 -1
  165. package/dist/assets/settings-zLCbPrgt.js +3 -0
  166. package/dist/assets/share-feedback-modal-8OzEECo-.js +1 -0
  167. package/dist/assets/share-feedback-modal-B7VbR0v7.js +2 -0
  168. package/dist/assets/{sidebar-tree-C-XVAOgc.js → sidebar-tree-J3jVmAh0.js} +1 -1
  169. package/dist/assets/{signup-page-DdiJpBz3.js → signup-page-26zBZOTJ.js} +1 -1
  170. package/dist/assets/{signup-shell-_mEn5UNl.js → signup-shell-BqsMKj0N.js} +1 -1
  171. package/dist/assets/skill-detail-page-xDrQtE_K.js +2 -0
  172. package/dist/assets/skill-detail-panel-CbQ0z2ls.js +1 -0
  173. package/dist/assets/{skill-removal-dialog-CWQDV20Q.js → skill-removal-dialog-CTrw0VTo.js} +1 -1
  174. package/dist/assets/{skills-page-CkHlkDe4.js → skills-page-DyoAyL-Y.js} +1 -1
  175. package/dist/assets/{sounds-page-DZ9H_Uhf.js → sounds-page-DN6yTY9n.js} +1 -1
  176. package/dist/assets/{start-screen-CPuK_kcL.js → start-screen-hgI5Ztmj.js} +1 -1
  177. package/dist/assets/{stt-language-picker-modal-vTox8Zp8.js → stt-language-picker-modal-5mPezSwB.js} +1 -1
  178. package/dist/assets/subagent-detail-panel-Dq6cXS-i.js +1 -0
  179. package/dist/assets/superpowers-page-B9eA7_2A.js +1 -0
  180. package/dist/assets/{system-events-page-CxJryFCX.js → system-events-page-B2JPqyrn.js} +1 -1
  181. package/dist/assets/system-events-redirect-page-C3FW7lke.js +1 -0
  182. package/dist/assets/{text-preview-BZ7GgUAU.js → text-preview-cPzlZljx.js} +1 -1
  183. package/dist/assets/{theme-stage-page-BBUhsE2D.js → theme-stage-page-l6bxpzmD.js} +1 -1
  184. package/dist/assets/{tiptap-document-editor-DR6f403A.js → tiptap-document-editor-DZcFWtPf.js} +2 -2
  185. package/dist/assets/tool-detail-panel-Mme2rbul.js +1 -0
  186. package/dist/assets/tool-detail-panel-dCPxQfT2.js +15 -0
  187. package/dist/assets/{trait-cycle-row-BRsd1qDW.js → trait-cycle-row-CEqSGPz2.js} +1 -1
  188. package/dist/assets/upgrade-cancel-page-B-D_oeBx.js +1 -0
  189. package/dist/assets/upgrade-success-page-DCwSI4N0.js +1 -0
  190. package/dist/assets/{usage-redirect-page-DmacFGtX.js → usage-redirect-page-DKaEQTLK.js} +1 -1
  191. package/dist/assets/use-app-delete-Cl7y_3Ka.js +1 -0
  192. package/dist/assets/{use-assistant-identity-details-BqNoC_Po.js → use-assistant-identity-details-DBNlc3LO.js} +1 -1
  193. package/dist/assets/use-checkout-dismiss-refresh-D13I69hb.js +1 -0
  194. package/dist/assets/use-debounced-value-Da0RJeae.js +1 -0
  195. package/dist/assets/{use-edge-swipe-back-DMaMp9xI.js → use-edge-swipe-back-DW3HRHcT.js} +1 -1
  196. package/dist/assets/{use-hotkey-recorder-CVYKioKK.js → use-hotkey-recorder-Di3iXQJb.js} +1 -1
  197. package/dist/assets/use-invite-link-dialog-BSufG3vr.js +1 -0
  198. package/dist/assets/{use-platform-assistant-id-CPNM_Svc.js → use-platform-assistant-id-CKhExZPC.js} +1 -1
  199. package/dist/assets/use-plugins-list-BTPeAWTb.js +1 -0
  200. package/dist/assets/use-return-to-short-circuit-BIecKROR.js +1 -0
  201. package/dist/assets/{use-side-list-room-XknEC6_F.js → use-side-list-room-C4-lrJ7T.js} +1 -1
  202. package/dist/assets/{use-skill-actions-B7qsFEjO.js → use-skill-actions-B3-h8aTL.js} +1 -1
  203. package/dist/assets/{use-skill-detail-files-Caa0kAOC.js → use-skill-detail-files-Bp1ZrmrD.js} +1 -1
  204. package/dist/assets/use-supports-credentials-settings-D1R1OKic.js +1 -0
  205. package/dist/assets/use-transcript-message-by-id-CWtKMTjb.js +1 -0
  206. package/dist/assets/{vendor-DYOeoIwg.js → vendor-DUzxlXbu.js} +17 -17
  207. package/dist/assets/voice-page-CUbLB1IH.js +1 -0
  208. package/dist/assets/{wake-detail-panel-JG7TyKGn.js → wake-detail-panel-DXNbDu7k.js} +1 -1
  209. package/dist/assets/{weather-forecast-display-CZYQX4n1.js → weather-forecast-display-Dx_JDnVC.js} +1 -1
  210. package/dist/assets/{web-CkN0uo01.js → web-8nc1FdUf.js} +1 -1
  211. package/dist/assets/{web-Bb3bM_rE.js → web-BIq0eRiB.js} +1 -1
  212. package/dist/assets/{web-ZV0_2EZ9.js → web-BMzfWFM-.js} +1 -1
  213. package/dist/assets/{web-CQyztjRg.js → web-BgEkRgce.js} +1 -1
  214. package/dist/assets/{web-B_ZkQa17.js → web-DGjg0P8a.js} +1 -1
  215. package/dist/assets/{web-7w3Y8MVH.js → web-DaIUYGHw.js} +1 -1
  216. package/dist/assets/{web-ocPGQzbv.js → web-Dq2IVkFl.js} +1 -1
  217. package/dist/assets/{web-DZd0e2iR.js → web-SBJYIwk0.js} +1 -1
  218. package/dist/assets/{web-DpFmNxr1.js → web-nBaaP7qv.js} +1 -1
  219. package/dist/assets/welcome-screen-bgD2LcV9.js +1 -0
  220. package/dist/assets/workflow-detail-panel-CTOW3eOK.js +1 -0
  221. package/dist/assets/workspace-9CiV_W5c.js +1 -0
  222. package/dist/assets/{workspace-DOerIby3.js → workspace-DWS-BW9d.js} +1 -1
  223. package/dist/assets/workspace-hqnPWewF.js +1 -0
  224. package/dist/assets/workspace-page-DBWsGAaO.js +1 -0
  225. package/dist/assets/workspace-uAp0lLvq.js +1 -0
  226. package/dist/images/integrations/ATTRIBUTION.md +12 -0
  227. package/dist/images/integrations/amplemarket-mcp.png +0 -0
  228. package/dist/images/integrations/ashby-mcp.png +0 -0
  229. package/dist/images/integrations/atlassian-mcp.png +0 -0
  230. package/dist/images/integrations/attio-mcp.png +0 -0
  231. package/dist/images/integrations/brex-mcp.png +0 -0
  232. package/dist/images/integrations/calendly-mcp.png +0 -0
  233. package/dist/images/integrations/circleback-mcp.png +0 -0
  234. package/dist/images/integrations/clay-mcp.png +0 -0
  235. package/dist/images/integrations/craft-mcp.png +0 -0
  236. package/dist/images/integrations/customer-io-mcp.png +0 -0
  237. package/dist/images/integrations/fathom-mcp.png +0 -0
  238. package/dist/images/integrations/fireflies-mcp.png +0 -0
  239. package/dist/images/integrations/gamma-mcp.png +0 -0
  240. package/dist/images/integrations/guru-mcp.png +0 -0
  241. package/dist/images/integrations/interactive-brokers-mcp.png +0 -0
  242. package/dist/images/integrations/intercom-mcp.png +0 -0
  243. package/dist/images/integrations/jotform-mcp.png +0 -0
  244. package/dist/images/integrations/juicebox-mcp.png +0 -0
  245. package/dist/images/integrations/klaviyo-mcp.png +0 -0
  246. package/dist/images/integrations/linear-mcp.png +0 -0
  247. package/dist/images/integrations/mailerlite-mcp.png +0 -0
  248. package/dist/images/integrations/meltwater-mcp.png +0 -0
  249. package/dist/images/integrations/mem-mcp.png +0 -0
  250. package/dist/images/integrations/mercury-mcp.png +0 -0
  251. package/dist/images/integrations/navan-mcp.png +0 -0
  252. package/dist/images/integrations/notion-mcp.png +0 -0
  253. package/dist/images/integrations/otter-mcp.png +0 -0
  254. package/dist/images/integrations/profound-mcp.png +0 -0
  255. package/dist/images/integrations/ramp-mcp.png +0 -0
  256. package/dist/images/integrations/readwise-mcp.png +0 -0
  257. package/dist/images/integrations/semrush-mcp.png +0 -0
  258. package/dist/images/integrations/sentry-mcp.png +0 -0
  259. package/dist/images/integrations/stripe-mcp.png +0 -0
  260. package/dist/images/integrations/todoist-mcp.png +0 -0
  261. package/dist/images/integrations/typeform-mcp.png +0 -0
  262. package/dist/images/integrations/upwork-mcp.png +0 -0
  263. package/dist/images/integrations/webull-mcp.png +0 -0
  264. package/dist/index.html +4 -4
  265. package/package.json +1 -1
  266. package/dist/assets/acp-run-detail-panel-B5vKfWQN.js +0 -3
  267. package/dist/assets/activation-list-route-BOb-rtBa.js +0 -1
  268. package/dist/assets/activity-steps-panel-DmC1H7g8.js +0 -1
  269. package/dist/assets/add-credits-modal-Clg9vuy6.js +0 -1
  270. package/dist/assets/ai-page-CUKc_nmb.js +0 -1
  271. package/dist/assets/android-billing-handoff-CpzR7JDr.js +0 -1
  272. package/dist/assets/app-BNL3dwNm.css +0 -2
  273. package/dist/assets/app-Tg6YU_tZ.js +0 -392
  274. package/dist/assets/archive-redirect-page-De-Keegk.js +0 -1
  275. package/dist/assets/auth-store-D-6LI7o_.js +0 -1
  276. package/dist/assets/avatar-bundled-components-Bo-wVBBE.js +0 -1
  277. package/dist/assets/avatar-random-ZUs-wFAP.js +0 -2
  278. package/dist/assets/background-task-detail-panel-D4CYPLDN.js +0 -1
  279. package/dist/assets/billing-page-CqDMGSHe.js +0 -3
  280. package/dist/assets/channel-transcript-panel-Ca2IqSxd.js +0 -1
  281. package/dist/assets/channels-page-route-BrkM9cD0.js +0 -1
  282. package/dist/assets/chat-8C19KXOV.js +0 -3
  283. package/dist/assets/chat-B8bCjQZ1.js +0 -3
  284. package/dist/assets/chat-BMyAegHU.js +0 -3
  285. package/dist/assets/chat-info-panel-CFHg5G5C.js +0 -1
  286. package/dist/assets/chat-k0ASlCf6.js +0 -3
  287. package/dist/assets/checkout-return-target-BM6j8E5w.js +0 -1
  288. package/dist/assets/command-palette-DkTYuZU8.js +0 -1
  289. package/dist/assets/common-Bj2G8_g5.js +0 -1
  290. package/dist/assets/common-CaTw6iFT.js +0 -1
  291. package/dist/assets/common-DvY3wB2D.js +0 -1
  292. package/dist/assets/common-HddDknEB.js +0 -1
  293. package/dist/assets/companion-surface-page-DHxOTQOL.js +0 -1
  294. package/dist/assets/contacts-gateway-CZ3fJfK5.js +0 -1
  295. package/dist/assets/contacts-page-route-CNXEHOrf.js +0 -1
  296. package/dist/assets/credentials-page-DsxuB0Ui.js +0 -1
  297. package/dist/assets/danger-zone-redirect-page-C23hsdDS.js +0 -1
  298. package/dist/assets/debug-page-6PKrAjce.js +0 -4
  299. package/dist/assets/deploy-dialogs-BXYdSkVL.js +0 -1
  300. package/dist/assets/deploy-dialogs-C0gFbHA2.js +0 -1
  301. package/dist/assets/desktop-preview-content-Cc9hlQ4Q.js +0 -2
  302. package/dist/assets/detail-primitives-ue4wzzCx.js +0 -1
  303. package/dist/assets/developer-page-DcZbWcLH.js +0 -1
  304. package/dist/assets/devices-redirect-page-Bxu6ZvQb.js +0 -1
  305. package/dist/assets/document-load-B8iTfjYL.js +0 -1
  306. package/dist/assets/document-viewer-page-BStfu3jJ.js +0 -1
  307. package/dist/assets/environment-store-rH-YdiqT.js +0 -1
  308. package/dist/assets/esm-BarLUlPV.js +0 -2
  309. package/dist/assets/esm-C19uvbek.js +0 -2
  310. package/dist/assets/esm-CI79f_VT.js +0 -2
  311. package/dist/assets/esm-CtAM062C.js +0 -1
  312. package/dist/assets/esm-DGqMBGum.js +0 -1
  313. package/dist/assets/esm-DYrMpsGJ.js +0 -2
  314. package/dist/assets/esm-Y7e1KRCK.js +0 -2
  315. package/dist/assets/file-editor-EZsnOrB1.js +0 -1
  316. package/dist/assets/general-page-DjmqGNEh.js +0 -2
  317. package/dist/assets/hatching-screen-Vx631ARz.js +0 -1
  318. package/dist/assets/home-CQRYKQ5-.js +0 -1
  319. package/dist/assets/home-DQz-gw5J.js +0 -1
  320. package/dist/assets/home-jvtY7w4T.js +0 -1
  321. package/dist/assets/home-uZ5Qvj6E.js +0 -1
  322. package/dist/assets/icons-QG1KAFmx.js +0 -1
  323. package/dist/assets/identity-page-route-B4R5hI3l.js +0 -7
  324. package/dist/assets/inspect-page-CYYIbGHx.js +0 -9
  325. package/dist/assets/integrations-page-BjXxWGKz.js +0 -1
  326. package/dist/assets/intelligence-layout-slots-store-nrEU1pdD.js +0 -1
  327. package/dist/assets/keyboard-shortcuts-redirect-page-UFsztRh3.js +0 -1
  328. package/dist/assets/library-detail-page-BcqVyl-x.js +0 -1
  329. package/dist/assets/library-page-CK7LA8to.js +0 -1
  330. package/dist/assets/local-mode-B63ogN2h.js +0 -1
  331. package/dist/assets/login-page-Cw14hc03.js +0 -1
  332. package/dist/assets/markdown-preview-DsAfiAyB.js +0 -1
  333. package/dist/assets/memory-page-route-B98b_k6V.js +0 -2
  334. package/dist/assets/message-files-panel-B4KcGaTu.js +0 -1
  335. package/dist/assets/native-attachment-pickers-DXW2YF-J.js +0 -1
  336. package/dist/assets/native-file-DIYnpRix.js +0 -1
  337. package/dist/assets/paired-platform-identity-DyA-oZ1a.js +0 -1
  338. package/dist/assets/password-reset-page-DyCdaLlT.js +0 -1
  339. package/dist/assets/personality-sliders-BZ5p3Svp.js +0 -1
  340. package/dist/assets/plans-page-Bt7rWPBi.js +0 -1
  341. package/dist/assets/plugins-surface-f4dAI31U.js +0 -1
  342. package/dist/assets/privacy-page-CKEUMx1C.js +0 -1
  343. package/dist/assets/referral-modal-BTG7IbD5.js +0 -1
  344. package/dist/assets/referral-modal-BWGbrPeD.js +0 -1
  345. package/dist/assets/research-onboarding-route-DvnsATHR.js +0 -50
  346. package/dist/assets/routes-64wTPHX3.js +0 -1
  347. package/dist/assets/schedules-AMG6VEfS.js +0 -1
  348. package/dist/assets/schedules-page-DQ0p71wD.js +0 -1
  349. package/dist/assets/security-redirect-page-C8sxzPnV.js +0 -1
  350. package/dist/assets/select-assistant-screen-B57uDK4U.js +0 -1
  351. package/dist/assets/settings-C-QPO0as.js +0 -3
  352. package/dist/assets/settings-D9OIWncF.js +0 -3
  353. package/dist/assets/settings-DGQfZ51D.js +0 -3
  354. package/dist/assets/settings-divider-BkQcvD1N.js +0 -1
  355. package/dist/assets/settings-gxBTr-j9.js +0 -3
  356. package/dist/assets/share-feedback-modal-CYWA8ArT.js +0 -1
  357. package/dist/assets/share-feedback-modal-DwmVNIDD.js +0 -2
  358. package/dist/assets/skill-detail-page-bMQCOgEU.js +0 -2
  359. package/dist/assets/skill-detail-panel-jkm8mNzk.js +0 -1
  360. package/dist/assets/subagent-detail-panel-p9ahsacR.js +0 -1
  361. package/dist/assets/superpowers-page-BiVUrsDa.js +0 -1
  362. package/dist/assets/system-events-redirect-page-CORiS4Xr.js +0 -1
  363. package/dist/assets/tool-detail-panel-Bia85tXo.js +0 -15
  364. package/dist/assets/tool-detail-panel-CEtClwDC.js +0 -1
  365. package/dist/assets/upgrade-cancel-page-Cb2Knf6m.js +0 -1
  366. package/dist/assets/upgrade-success-page-5FOrQc3B.js +0 -1
  367. package/dist/assets/use-app-delete-C6E5CTp4.js +0 -1
  368. package/dist/assets/use-checkout-dismiss-refresh-DFYkYYpp.js +0 -1
  369. package/dist/assets/use-invite-link-dialog-ChgRhNyN.js +0 -1
  370. package/dist/assets/use-return-to-short-circuit-dsa2YMci.js +0 -1
  371. package/dist/assets/use-supports-credentials-settings-CxEHVJ-e.js +0 -1
  372. package/dist/assets/use-transcript-message-by-id-Bnbe06RA.js +0 -1
  373. package/dist/assets/voice-page-D237ka3h.js +0 -1
  374. package/dist/assets/welcome-screen-CQo-_cIi.js +0 -1
  375. package/dist/assets/workflow-detail-panel-rYCgZeUb.js +0 -1
  376. package/dist/assets/workspace-CrT6IjXz.js +0 -1
  377. package/dist/assets/workspace-D-j7Q1o1.js +0 -1
  378. package/dist/assets/workspace-Db-P5zkL.js +0 -1
  379. package/dist/assets/workspace-page-Bx0l3azH.js +0 -1
  380. /package/dist/assets/{account-n9xXc949.js → account-C8xg8kR6.js} +0 -0
  381. /package/dist/assets/{account-1POZPT9m.js → account-Cb-DyELI.js} +0 -0
  382. /package/dist/assets/{account-BBvlSFcW.js → account-RgxzlOwE.js} +0 -0
  383. /package/dist/assets/{account-DV-tB0oh.js → account-sUEgVZyw.js} +0 -0
  384. /package/dist/assets/{activation-B2g-Oe-r.js → activation-Bgezxtsd.js} +0 -0
  385. /package/dist/assets/{activation-BtZhlZ_s.js → activation-BzQVC8-5.js} +0 -0
  386. /package/dist/assets/{activation-dc_gRGWQ.js → activation-Dq1qihrb.js} +0 -0
  387. /package/dist/assets/{activation-CaYos65l.js → activation-fQ2w8k-_.js} +0 -0
  388. /package/dist/assets/{activation-tasks-CvYLTc0s.js → activation-tasks-BOXaCIAc.js} +0 -0
  389. /package/dist/assets/{activation-tasks-CzjUeEj1.js → activation-tasks-Crm7xZCE.js} +0 -0
  390. /package/dist/assets/{activation-tasks-C5NV7wu7.js → activation-tasks-DDUN5H65.js} +0 -0
  391. /package/dist/assets/{activation-tasks-D057dozu.js → activation-tasks-v6hBb3kp.js} +0 -0
  392. /package/dist/assets/{app-types-2kvircdH.js → app-types-BHZZ2-T8.js} +0 -0
  393. /package/dist/assets/{build.umd-BWfbInTw.js → build.umd-B4nySx9q.js} +0 -0
  394. /package/dist/assets/{channels-BnJWh26Z.js → channels-1fPalZ3Q.js} +0 -0
  395. /package/dist/assets/{channels-LgPH3TQp.js → channels-Bp6785EE.js} +0 -0
  396. /package/dist/assets/{channels-itxMVi8q.js → channels-DUGt-c_s.js} +0 -0
  397. /package/dist/assets/{channels-QZtdATsC.js → channels-zwQvxHhS.js} +0 -0
  398. /package/dist/assets/{contacts-X4REeAsN.js → contacts-7s5uUt1u.js} +0 -0
  399. /package/dist/assets/{contacts-D6N3gRLL.js → contacts-Bb43JJJN.js} +0 -0
  400. /package/dist/assets/{contacts-DP3Crat5.js → contacts-CNaEZ-fL.js} +0 -0
  401. /package/dist/assets/{contacts-yIhQlpq2.js → contacts-CwnIjST-.js} +0 -0
  402. /package/dist/assets/{credential-requests-DrJdsdeJ.js → credential-requests-BOCpSsQ3.js} +0 -0
  403. /package/dist/assets/{credential-requests-1WDcifE6.js → credential-requests-BXKQ_K8b.js} +0 -0
  404. /package/dist/assets/{credential-requests-DKbR-6qV.js → credential-requests-CoE9Lb8S.js} +0 -0
  405. /package/dist/assets/{credential-requests-D6SU6G2Z.js → credential-requests-J6rR1d8i.js} +0 -0
  406. /package/dist/assets/{definitions-DhwHuMC5.js → definitions-BfnfKapN.js} +0 -0
  407. /package/dist/assets/{definitions-Qg1-j0J7.js → definitions-C8lsOLos.js} +0 -0
  408. /package/dist/assets/{emoji-catalog-data-Yyjk_IDu.js → emoji-catalog-data-DMFEL5YE.js} +0 -0
  409. /package/dist/assets/{format-countdown-BEyU91h0.js → format-countdown-Dceq8qd-.js} +0 -0
  410. /package/dist/assets/{intelligence-DFMbHITq.js → intelligence-2OGzDFvC.js} +0 -0
  411. /package/dist/assets/{intelligence-dNqws_vC.js → intelligence-CoqqSgFj.js} +0 -0
  412. /package/dist/assets/{intelligence-C2fySq4l.js → intelligence-DGasqUYG.js} +0 -0
  413. /package/dist/assets/{intelligence-8J0ZD9Ph.js → intelligence-DsAUVOAd.js} +0 -0
  414. /package/dist/assets/{library-gTJv7Oz7.js → library-BfKxaPf0.js} +0 -0
  415. /package/dist/assets/{library-BXLScXI1.js → library-DO9JsNSy.js} +0 -0
  416. /package/dist/assets/{library-D7tisF9R.js → library-DrPeM0_h.js} +0 -0
  417. /package/dist/assets/{library-IMXA70AZ.js → library-t0vQjS7N.js} +0 -0
  418. /package/dist/assets/{link-click-BYgcUBN3.js → link-click-Bzv2fph0.js} +0 -0
  419. /package/dist/assets/{logs-gUmqmCAe.js → logs-BuCPf34Y.js} +0 -0
  420. /package/dist/assets/{logs-ji3E1A5W.js → logs-C5iN-fuK.js} +0 -0
  421. /package/dist/assets/{logs-itULWBC4.js → logs-M2b1TrMN.js} +0 -0
  422. /package/dist/assets/{logs-DV_rbeyU.js → logs-oZIjcpgE.js} +0 -0
  423. /package/dist/assets/{machine-sizes-Cyr9sICv.js → machine-sizes--PLzvcMG.js} +0 -0
  424. /package/dist/assets/{onboarding-CFxxcqra.js → onboarding-By9JR2qu.js} +0 -0
  425. /package/dist/assets/{onboarding-4AB8OdqK.js → onboarding-Bz72aOnk.js} +0 -0
  426. /package/dist/assets/{onboarding-C9uVVsD1.js → onboarding-Ce_CYrXg.js} +0 -0
  427. /package/dist/assets/{onboarding-Bv6Vw7rT.js → onboarding-DIUBmWBM.js} +0 -0
  428. /package/dist/assets/{onboarding-step-layout-XiwLE8P3.js → onboarding-step-layout-D1cb8TW9.js} +0 -0
  429. /package/dist/assets/{pdf-DZqed7HH.js → pdf-BKWEs79u.js} +0 -0
  430. /package/dist/assets/{plugin-attribution-B2jD5Q1N.js → plugin-attribution-DtahcNMf.js} +0 -0
  431. /package/dist/assets/{radio-card-nav-BtZq6gZp.js → radio-card-nav-CZkUYNJ9.js} +0 -0
  432. /package/dist/assets/{remote-web-BqE5HtVx.js → remote-web-CdqK_lTu.js} +0 -0
  433. /package/dist/assets/{remote-web-BTqxQIZY.js → remote-web-D_8aBk2_.js} +0 -0
  434. /package/dist/assets/{remote-web-BClKYDvU.js → remote-web-DlydCzEK.js} +0 -0
  435. /package/dist/assets/{remote-web-Cy9y7nTE.js → remote-web-yIqbgeYo.js} +0 -0
  436. /package/dist/assets/{schedules-DDJ36QQM.js → schedules-Bny8l_CP.js} +0 -0
  437. /package/dist/assets/{schedules-Capmqn71.js → schedules-KPfLvypq.js} +0 -0
  438. /package/dist/assets/{schedules-BZCt6hXe.js → schedules-cg2MRom9.js} +0 -0
  439. /package/dist/assets/{schedules-DO26F1mH.js → schedules-uSjJ_EjR.js} +0 -0
  440. /package/dist/assets/{skill-icon-DLqnaRMf.js → skill-icon-B7ALU8Ca.js} +0 -0
  441. /package/dist/assets/{terminal-1uiH9Lk0.js → terminal-CM_nhgrt.js} +0 -0
  442. /package/dist/assets/{terminal-CWSI_cvE.js → terminal-CacAJB1i.js} +0 -0
  443. /package/dist/assets/{terminal-DHtM2WSE.js → terminal-CmV3W_IT.js} +0 -0
  444. /package/dist/assets/{terminal-BKHabeoN.js → terminal-DgXT91mg.js} +0 -0
  445. /package/dist/assets/{usage-window-DA_JAjjs.js → usage-window-za0Cf2tq.js} +0 -0
  446. /package/dist/assets/{use-truncated-blob-text-BArL-keL.js → use-truncated-blob-text-BnZS-VRC.js} +0 -0
  447. /package/dist/assets/{xterm-DuUTQzS6.js → xterm-DdbteOXE.js} +0 -0
  448. /package/dist/assets/{xterm-addon-fit-DuSb5pvT.js → xterm-addon-fit-LbAazlGK.js} +0 -0
@@ -1,12 +1,12 @@
1
1
  import{a as e,n as t,o as n,r,t as i}from"./rolldown-runtime-BM3Ffeng.js";import{b as a,t as o,v as s,x as c}from"./react-B9IgSVeK.js";var l=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,u=globalThis,d=`10.52.0`;function f(){return p(u),u}function p(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.52.0`,t[d]=t[`10.52.0`]||{}}function m(e,t,n=u){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[d]=r[`10.52.0`]||{};return i[e]||(i[e]=t())}var h=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],g=`Sentry Logger `,_={};function v(e){if(!(`console`in u))return e();let t=u.console,n={},r=Object.keys(_);r.forEach(e=>{let r=_[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function y(){E().enabled=!0}function b(){E().enabled=!1}function x(){return E().enabled}function S(...e){T(`log`,...e)}function C(...e){T(`warn`,...e)}function w(...e){T(`error`,...e)}function T(e,...t){l&&x()&&v(()=>{u.console[e](`${g}[${e}]:`,...t)})}function E(){return l?m(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var D={enable:y,disable:b,isEnabled:x,log:S,warn:C,error:w},O=50,ee=/\(error: (.*)\)/,te=/captureMessage|captureException/;function ne(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
2
- `);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=ee.test(n)?n.replace(ee,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=O+r)break}}return re(i.slice(r))}}function k(e){return Array.isArray(e)?ne(...e):e}function re(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ie(t).function||``)&&t.pop(),t.reverse(),te.test(ie(t).function||``)&&(t.pop(),te.test(ie(t).function||``)&&t.pop()),t.slice(0,O).map(e=>({...e,filename:e.filename||ie(t).filename,function:e.function||`?`}))}function ie(e){return e[e.length-1]||{}}var ae=`<anonymous>`;function A(e){try{return!e||typeof e!=`function`?ae:e.name||ae}catch{return ae}}function oe(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function se(e){return`__v_isVNode`in e&&e.__v_isVNode?`[VueVNode]`:`[VueViewModel]`}var ce={},le={};function ue(e,t){return ce[e]=ce[e]||[],ce[e].push(t),()=>{let n=ce[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function de(e,t){if(!le[e]){le[e]=!0;try{t()}catch(t){l&&D.error(`Error while instrumenting ${e}`,t)}}}function fe(e,t){let n=e&&ce[e];if(n)for(let r of n)try{r(t)}catch(t){l&&D.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${A(r)}\nError:`,t)}}var pe=null;function me(e){let t=`error`;ue(t,e),de(t,he)}function he(){pe=u.onerror,u.onerror=function(e,t,n,r,i){return fe(`error`,{column:r,error:i,line:n,msg:e,url:t}),pe?pe.apply(this,arguments):!1},u.onerror.__SENTRY_INSTRUMENTED__=!0}var ge=null;function _e(e){let t=`unhandledrejection`;ue(t,e),de(t,ve)}function ve(){ge=u.onunhandledrejection,u.onunhandledrejection=function(e){return fe(`unhandledrejection`,e),ge?ge.apply(this,arguments):!0},u.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var ye=Object.prototype.toString;function be(e){switch(ye.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Pe(e,Error)}}function xe(e,t){return ye.call(e)===`[object ${t}]`}function Se(e){return xe(e,`ErrorEvent`)}function Ce(e){return xe(e,`DOMError`)}function we(e){return xe(e,`DOMException`)}function Te(e){return xe(e,`String`)}function Ee(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function De(e){return e===null||Ee(e)||typeof e!=`object`&&typeof e!=`function`}function Oe(e){return xe(e,`Object`)}function ke(e){return typeof Event<`u`&&Pe(e,Event)}function Ae(e){return typeof Element<`u`&&Pe(e,Element)}function je(e){return xe(e,`RegExp`)}function Me(e){return!!(e?.then&&typeof e.then==`function`)}function Ne(e){return Oe(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function Pe(e,t){try{return e instanceof t}catch{return!1}}function Fe(e){return!!(typeof e==`object`&&e&&(e.__isVue||e._isVue||e.__v_isVNode))}function Ie(e){return typeof Request<`u`&&Pe(e,Request)}var Le=u,Re=80;function ze(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||Re;for(;n&&i++<5&&(o=Be(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function Be(e,t){let n=e,r=[];if(!n?.tagName)return``;if(Le.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&Te(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function Ve(){try{return Le.document.location.href}catch{return``}}function He(e,t=5){if(!Le.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function Ue(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!=`function`)return;let i=n(r);typeof i==`function`&&Ge(i,r);try{e[t]=i}catch{l&&D.log(`Failed to replace method "${t}" in object`,e)}}function We(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{l&&D.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Ge(e,t){try{e.prototype=t.prototype=t.prototype||{},We(e,`__sentry_original__`,t)}catch{}}function Ke(e){return e.__sentry_original__}function qe(e){if(be(e))return{message:e.message,name:e.name,stack:e.stack,...Ye(e)};if(ke(e)){let t={type:e.type,target:Je(e.target),currentTarget:Je(e.currentTarget),...Ye(e)};return typeof CustomEvent<`u`&&Pe(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Je(e){try{return Ae(e)?ze(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}}function Ye(e){return typeof e==`object`&&e?Object.fromEntries(Object.entries(e)):{}}function eee(e){let t=Object.keys(qe(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var Xe;function Ze(e){if(Xe!==void 0)return Xe?Xe(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=u;return t in n&&typeof n[t]==`function`?(Xe=n[t],Xe(e)):(Xe=null,e())}function Qe(){return Ze(()=>Math.random())}function $e(){return Ze(()=>Date.now())}function et(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function tt(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{Fe(r)?n.push(se(r)):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function nt(e,t,n=!1){return Te(e)?je(t)?t.test(e):Te(t)?n?e===t:e.includes(t):typeof t==`function`?t(e):!1:!1}function rt(e,t=[],n=!1){return t.some(t=>nt(e,t,n))}function it(){let e=u;return e.crypto||e.msCrypto}var at;function ot(){return Qe()*16}function st(e=it()){try{if(e?.randomUUID)return Ze(()=>e.randomUUID()).replace(/-/g,``)}catch{}return at||=`10000000100040008000100000000000`,at.replace(/[018]/g,e=>(e^(ot()&15)>>e/4).toString(16))}function ct(e){return e.exception?.values?.[0]}function lt(e){let{message:t,event_id:n}=e;if(t)return t;let r=ct(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function ut(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function dt(e,t){let n=ct(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function ft(e){if(pt(e))return!0;try{We(e,`__sentry_captured__`,!0)}catch{}return!1}function pt(e){try{return e.__sentry_captured__}catch{}}var mt=1e3;function ht(){return $e()/mt}function gt(){let{performance:e}=u;if(!e?.now||!e.timeOrigin)return ht;let t=e.timeOrigin;return()=>(t+Ze(()=>e.now()))/mt}var _t;function vt(){return(_t??=gt())()}function tee(e){let t=vt(),n={sid:st(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>xt(n)};return e&&yt(n,e),n}function yt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||vt(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:st()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function bt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),yt(e,n)}function xt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function St(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=St(r[e],t[e],n-1));return r}function Ct(){return st()}function wt(){return st().substring(16)}var Tt=`_sentrySpan`;function Et(e,t){t?We(e,Tt,t):delete e[Tt]}function Dt(e){return e[Tt]}var Ot=100,kt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ct(),sampleRand:Qe()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Et(t,Dt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&yt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():Oe(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Et(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ct(),sampleRand:Qe()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Ot;if(n<=0)return this;let r={timestamp:ht(),...e,message:e.message?et(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Dt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=St(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||st();if(!this._client)return l&&D.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||st();if(!this._client)return l&&D.warn(`No client configured on scope - will not capture message!`),r;let i=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=e.event_id||t?.event_id||st();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(l&&D.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function At(){return m(`defaultCurrentScope`,()=>new kt)}function jt(){return m(`defaultIsolationScope`,()=>new kt)}var Mt=e=>e instanceof Promise&&!e[Nt],Nt=Symbol(`chained PromiseLike`),Pt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Mt(r)&&Mt(e)?r:Ft(e,r)},Ft=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Nt]:!0}),t},It=class{constructor(e,t){let n;n=e||new kt;let r;r=t||new kt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Me(n)?Pt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Lt(){let e=p(f());return e.stack=e.stack||new It(At(),jt())}function Rt(e){return Lt().withScope(e)}function zt(e,t){let n=Lt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Bt(e){return Lt().withScope(()=>e(Lt().getIsolationScope()))}function Vt(){return{withIsolationScope:Bt,withScope:Rt,withSetScope:zt,withSetIsolationScope:(e,t)=>Bt(t),getCurrentScope:()=>Lt().getScope(),getIsolationScope:()=>Lt().getIsolationScope()}}function Ht(e){let t=p(e);return t.acs?t.acs:Vt()}var Ut;function Wt(){return Ut?.()}function Gt(){return Ht(f()).getCurrentScope()}function Kt(){return Ht(f()).getIsolationScope()}function qt(){return m(`globalScope`,()=>new kt)}function Jt(...e){let t=Ht(f());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Yt(){return Gt().getClient()}function Xt(e){let t=Wt();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||wt()};return r&&(a.parent_span_id=r),a}var Zt=`sentry.source`,Qt=`sentry.sample_rate`,$t=`sentry.op`,en=`sentry.origin`,tn=`sentry.measurement_unit`,nn=`sentry.measurement_value`,rn=`sentry.custom_span_name`,an=`sentry.profile_id`,on=`sentry.exclusive_time`,sn=`gen_ai.conversation.id`;function cn(e){try{let t=u.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function ln(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var un=`_sentryScope`,dn=`_sentryIsolationScope`;function fn(e,t,n){e&&(We(e,dn,cn(n)),We(e,un,t))}function pn(e){let t=e;return{scope:t[un],isolationScope:ln(t[dn])}}function mn(e){let t=hn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function hn(e){if(!(!e||!Te(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=gn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):gn(e)}function gn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var _n=/^o(\d+)\./,vn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function yn(e){return e===`http`||e===`https`}function bn(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function xn(e){let t=vn.exec(e);if(!t){v(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Sn({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function Sn(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Cn(e){if(!l)return!0;let{port:t,projectId:n,protocol:r}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(D.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?yn(r)?t&&isNaN(parseInt(t,10))?(D.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(D.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(D.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function wn(e){return e.match(_n)?.[1]}function Tn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=wn(n)),r}function En(e){let t=typeof e==`string`?xn(e):Sn(e);if(!(!t||!Cn(t)))return t}function Dn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var On=!1;function kn(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=Fn(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function An(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Fn(e).parent_span_id,a=pn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||wt():t,trace_id:n}}function jn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function Mn(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function Nn(e){return typeof e==`number`?Pn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Pn(e.getTime()):vt()}function Pn(e){return e>9999999999?e/1e3:e}function Fn(e){if(Rn(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Ln(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:In(e),start_timestamp:Nn(i),timestamp:Nn(o)||void 0,status:Bn(s),op:r[$t],origin:r[en],links:jn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function In(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function Ln(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Rn(e){return typeof e.getSpanJSON==`function`}function zn(e){let{traceFlags:t}=e.spanContext();return t===1}function Bn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function Vn(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}var Hn=`_sentryChildSpans`,Un=`_sentryRootSpan`;function Wn(e,t){We(t,Un,e[Un]||e),e[Hn]?e[Hn].add(t):We(e,Hn,new Set([t]))}function Gn(e){let t=new Set;function n(e){if(!t.has(e)&&zn(e)){t.add(e);let r=e[Hn]?Array.from(e[Hn]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var Kn=qn;function qn(e){return e[Un]||e}function Jn(){On||=(v(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function Yn(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||Yt()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Xn(e){D.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Zn(e,t){if(!t?.length)return!1;for(let n of t){if(er(n)){if(e.description&&nt(e.description,n))return l&&Xn(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let r=n.name?e.description&&nt(e.description,n.name):!0,i=n.op?e.op&&nt(e.op,n.op):!0,a=n.attributes?Object.entries(n.attributes).every(([t,n])=>Qn(e.attributes?.[t],n)):!0;if(r&&i&&a)return l&&Xn(e),!0}return!1}function Qn(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?nt(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function $n(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function er(e){return typeof e==`string`||e instanceof RegExp}var tr=`production`,nr=`_frozenDsc`;function rr(e,t){We(e,nr,t)}function ir(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:Tn(t)};return t.emit(`createDsc`,i),i}function ar(e,t){let n=t.getPropagationContext();return n.dsc||ir(n.traceId,e)}function or(e){let t=Yt();if(!t)return{};let n=Kn(e),r=Fn(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[nr];if(c)return s(c);let l=a?.get(`sentry.dsc`),u=l&&mn(l);if(u)return s(u);let d=ir(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),Yn()&&(d.sampled=String(zn(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??pn(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}var sr=class{constructor(e={}){this._traceId=e.traceId||Ct(),this._spanId=e.spanId||wt(),this.dropReason=e.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function cr(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}var lr=Symbol.for(`sentry.skipNormalization`),ur=Symbol.for(`sentry.overrideNormalizationDepth`);function dr(e){return!!e[lr]}function fr(e){let t=e[ur];return typeof t==`number`?t:void 0}function pr(e,t=100,n=1/0){try{return hr(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function mr(e,t=3,n=100*1024){let r=pr(e,t);return yr(r)>n?mr(e,t-1,n):r}function hr(e,t,n=1/0,r=1/0,i=br()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=gr(e,t);if(!s.startsWith(`[object `))return s;if(dr(t))return t;let c=fr(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return hr(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=qe(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=hr(e,t,l-1,r,i),f++}return o(t),d}function gr(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(Fe(t))return se(t);if(Ne(t))return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${A(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let n=_r(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function _r(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function vr(e){return~-encodeURI(e).split(/%..|./).length}function yr(e){return vr(JSON.stringify(e))}function br(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function xr(e,t=[]){return[e,t]}function Sr(e,t){let[n,r]=e;return[n,[...r,t]]}function Cr(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function wr(e,t){return Cr(e,(e,n)=>t.includes(n))}function Tr(e){let t=p(u);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Er(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Tr(r),e]:r.push(typeof e==`string`?Tr(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(pr(n))}i(e)}}return typeof r==`string`?r:Dr(r)}function Dr(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Or(e){return[{type:`span`},e]}function kr(e){let t=typeof e.data==`string`?Tr(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Ar={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function jr(e){return e in Ar}function Mr(e){return jr(e)?Ar[e]:e}function Nr(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Pr(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:bn(r)},...i&&{trace:i}}}function Fr(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Ir(e,t,n,r){let i=Nr(n);return xr({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:bn(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Lr(e,t,n,r){let i=Nr(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;Fr(e,n?.sdk);let o=Pr(e,i,r,t);return delete e.sdkProcessingMetadata,xr(o,[[{type:a},e]])}function Rr(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=or(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:bn(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=Fn(e);return!Zn({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=Fn(e);return(cr(s)?t:s(t))||(Jn(),t)}:Fn,f=[];for(let e of l){let t=d(e);t&&f.push(Or(t))}return xr(o,f)}function zr(e){if(!l)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:r}=Fn(e),{spanId:i}=e.spanContext(),a=zn(e),o=Kn(e),s=o===e,c=`[Tracing] Starting ${a?`sampled`:`unsampled`} ${s?`root `:``}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&u.push(`parent ID: ${r}`),!s){let{op:e,description:t}=Fn(o);u.push(`root ID: ${o.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}D.log(`${c}
2
+ `);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=ee.test(n)?n.replace(ee,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=O+r)break}}return re(i.slice(r))}}function k(e){return Array.isArray(e)?ne(...e):e}function re(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ie(t).function||``)&&t.pop(),t.reverse(),te.test(ie(t).function||``)&&(t.pop(),te.test(ie(t).function||``)&&t.pop()),t.slice(0,O).map(e=>({...e,filename:e.filename||ie(t).filename,function:e.function||`?`}))}function ie(e){return e[e.length-1]||{}}var ae=`<anonymous>`;function A(e){try{return!e||typeof e!=`function`?ae:e.name||ae}catch{return ae}}function oe(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function se(e){return`__v_isVNode`in e&&e.__v_isVNode?`[VueVNode]`:`[VueViewModel]`}var ce={},le={};function ue(e,t){return ce[e]=ce[e]||[],ce[e].push(t),()=>{let n=ce[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function de(e,t){if(!le[e]){le[e]=!0;try{t()}catch(t){l&&D.error(`Error while instrumenting ${e}`,t)}}}function fe(e,t){let n=e&&ce[e];if(n)for(let r of n)try{r(t)}catch(t){l&&D.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${A(r)}\nError:`,t)}}var pe=null;function me(e){let t=`error`;ue(t,e),de(t,he)}function he(){pe=u.onerror,u.onerror=function(e,t,n,r,i){return fe(`error`,{column:r,error:i,line:n,msg:e,url:t}),pe?pe.apply(this,arguments):!1},u.onerror.__SENTRY_INSTRUMENTED__=!0}var ge=null;function _e(e){let t=`unhandledrejection`;ue(t,e),de(t,ve)}function ve(){ge=u.onunhandledrejection,u.onunhandledrejection=function(e){return fe(`unhandledrejection`,e),ge?ge.apply(this,arguments):!0},u.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var ye=Object.prototype.toString;function be(e){switch(ye.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Pe(e,Error)}}function xe(e,t){return ye.call(e)===`[object ${t}]`}function Se(e){return xe(e,`ErrorEvent`)}function Ce(e){return xe(e,`DOMError`)}function we(e){return xe(e,`DOMException`)}function Te(e){return xe(e,`String`)}function Ee(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function De(e){return e===null||Ee(e)||typeof e!=`object`&&typeof e!=`function`}function Oe(e){return xe(e,`Object`)}function ke(e){return typeof Event<`u`&&Pe(e,Event)}function Ae(e){return typeof Element<`u`&&Pe(e,Element)}function je(e){return xe(e,`RegExp`)}function Me(e){return!!(e?.then&&typeof e.then==`function`)}function Ne(e){return Oe(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function Pe(e,t){try{return e instanceof t}catch{return!1}}function Fe(e){return!!(typeof e==`object`&&e&&(e.__isVue||e._isVue||e.__v_isVNode))}function Ie(e){return typeof Request<`u`&&Pe(e,Request)}var Le=u,Re=80;function ze(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||Re;for(;n&&i++<5&&(o=Be(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function Be(e,t){let n=e,r=[];if(!n?.tagName)return``;if(Le.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&Te(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}function Ve(){try{return Le.document.location.href}catch{return``}}function He(e,t=5){if(!Le.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function Ue(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!=`function`)return;let i=n(r);typeof i==`function`&&Ge(i,r);try{e[t]=i}catch{l&&D.log(`Failed to replace method "${t}" in object`,e)}}function We(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{l&&D.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Ge(e,t){try{e.prototype=t.prototype=t.prototype||{},We(e,`__sentry_original__`,t)}catch{}}function Ke(e){return e.__sentry_original__}function qe(e){if(be(e))return{message:e.message,name:e.name,stack:e.stack,...Ye(e)};if(ke(e)){let t={type:e.type,target:Je(e.target),currentTarget:Je(e.currentTarget),...Ye(e)};return typeof CustomEvent<`u`&&Pe(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Je(e){try{return Ae(e)?ze(e):Object.prototype.toString.call(e)}catch{return`<unknown>`}}function Ye(e){return typeof e==`object`&&e?Object.fromEntries(Object.entries(e)):{}}function eee(e){let t=Object.keys(qe(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var Xe;function Ze(e){if(Xe!==void 0)return Xe?Xe(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=u;return t in n&&typeof n[t]==`function`?(Xe=n[t],Xe(e)):(Xe=null,e())}function Qe(){return Ze(()=>Math.random())}function $e(){return Ze(()=>Date.now())}function et(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function tt(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];try{Fe(r)?n.push(se(r)):n.push(String(r))}catch{n.push(`[value cannot be serialized]`)}}return n.join(t)}function nt(e,t,n=!1){return Te(e)?je(t)?t.test(e):Te(t)?n?e===t:e.includes(t):typeof t==`function`?t(e):!1:!1}function rt(e,t=[],n=!1){return t.some(t=>nt(e,t,n))}function it(){let e=u;return e.crypto||e.msCrypto}var at;function ot(){return Qe()*16}function st(e=it()){try{if(e?.randomUUID)return Ze(()=>e.randomUUID()).replace(/-/g,``)}catch{}return at||=`10000000100040008000100000000000`,at.replace(/[018]/g,e=>(e^(ot()&15)>>e/4).toString(16))}function ct(e){return e.exception?.values?.[0]}function lt(e){let{message:t,event_id:n}=e;if(t)return t;let r=ct(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function ut(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function dt(e,t){let n=ct(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function ft(e){if(pt(e))return!0;try{We(e,`__sentry_captured__`,!0)}catch{}return!1}function pt(e){try{return e.__sentry_captured__}catch{}}var mt=1e3;function ht(){return $e()/mt}function tee(){let{performance:e}=u;if(!e?.now||!e.timeOrigin)return ht;let t=e.timeOrigin;return()=>(t+Ze(()=>e.now()))/mt}var gt;function _t(){return(gt??=tee())()}function nee(e){let t=_t(),n={sid:st(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>bt(n)};return e&&vt(n,e),n}function vt(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||_t(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:st()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function yt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),vt(e,n)}function bt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function xt(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=xt(r[e],t[e],n-1));return r}function St(){return st()}function Ct(){return st().substring(16)}var wt=`_sentrySpan`;function Tt(e,t){t?We(e,wt,t):delete e[wt]}function Et(e){return e[wt]}var Dt=100,Ot=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:St(),sampleRand:Qe()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Tt(t,Et(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&vt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():Oe(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Tt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:St(),sampleRand:Qe()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Dt;if(n<=0)return this;let r={timestamp:ht(),...e,message:e.message?et(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Et(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=xt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||st();if(!this._client)return l&&D.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||st();if(!this._client)return l&&D.warn(`No client configured on scope - will not capture message!`),r;let i=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=e.event_id||t?.event_id||st();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(l&&D.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function kt(){return m(`defaultCurrentScope`,()=>new Ot)}function At(){return m(`defaultIsolationScope`,()=>new Ot)}var jt=e=>e instanceof Promise&&!e[Mt],Mt=Symbol(`chained PromiseLike`),Nt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return jt(r)&&jt(e)?r:Pt(e,r)},Pt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Mt]:!0}),t},Ft=class{constructor(e,t){let n;n=e||new Ot;let r;r=t||new Ot,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Me(n)?Nt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function It(){let e=p(f());return e.stack=e.stack||new Ft(kt(),At())}function Lt(e){return It().withScope(e)}function Rt(e,t){let n=It();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function zt(e){return It().withScope(()=>e(It().getIsolationScope()))}function Bt(){return{withIsolationScope:zt,withScope:Lt,withSetScope:Rt,withSetIsolationScope:(e,t)=>zt(t),getCurrentScope:()=>It().getScope(),getIsolationScope:()=>It().getIsolationScope()}}function Vt(e){let t=p(e);return t.acs?t.acs:Bt()}var Ht;function Ut(){return Ht?.()}function Wt(){return Vt(f()).getCurrentScope()}function Gt(){return Vt(f()).getIsolationScope()}function Kt(){return m(`globalScope`,()=>new Ot)}function qt(...e){let t=Vt(f());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Jt(){return Wt().getClient()}function Yt(e){let t=Ut();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||Ct()};return r&&(a.parent_span_id=r),a}var Xt=`sentry.source`,Zt=`sentry.sample_rate`,Qt=`sentry.op`,$t=`sentry.origin`,ree=`sentry.measurement_unit`,en=`sentry.measurement_value`,tn=`sentry.custom_span_name`,nn=`sentry.profile_id`,rn=`sentry.exclusive_time`,an=`gen_ai.conversation.id`;function on(e){try{let t=u.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function sn(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var cn=`_sentryScope`,ln=`_sentryIsolationScope`;function un(e,t,n){e&&(We(e,ln,on(n)),We(e,cn,t))}function dn(e){let t=e;return{scope:t[cn],isolationScope:sn(t[ln])}}function fn(e){let t=pn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function pn(e){if(!(!e||!Te(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=mn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):mn(e)}function mn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var hn=/^o(\d+)\./,gn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function _n(e){return e===`http`||e===`https`}function vn(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function yn(e){let t=gn.exec(e);if(!t){v(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return bn({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function bn(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function xn(e){if(!l)return!0;let{port:t,projectId:n,protocol:r}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(D.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?_n(r)?t&&isNaN(parseInt(t,10))?(D.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(D.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(D.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Sn(e){return e.match(hn)?.[1]}function Cn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=Sn(n)),r}function wn(e){let t=typeof e==`string`?yn(e):bn(e);if(!(!t||!xn(t)))return t}function Tn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var En=!1;function Dn(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=Nn(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function On(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:Nn(e).parent_span_id,a=dn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||Ct():t,trace_id:n}}function kn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function An(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function jn(e){return typeof e==`number`?Mn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Mn(e.getTime()):_t()}function Mn(e){return e>9999999999?e/1e3:e}function Nn(e){if(In(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Fn(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Pn(e),start_timestamp:jn(i),timestamp:jn(o)||void 0,status:Rn(s),op:r[Qt],origin:r[$t],links:kn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Pn(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function Fn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function In(e){return typeof e.getSpanJSON==`function`}function Ln(e){let{traceFlags:t}=e.spanContext();return t===1}function Rn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function zn(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}var Bn=`_sentryChildSpans`,Vn=`_sentryRootSpan`;function Hn(e,t){We(t,Vn,e[Vn]||e),e[Bn]?e[Bn].add(t):We(e,Bn,new Set([t]))}function Un(e){let t=new Set;function n(e){if(!t.has(e)&&Ln(e)){t.add(e);let r=e[Bn]?Array.from(e[Bn]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var Wn=Gn;function Gn(e){return e[Vn]||e}function Kn(){En||=(v(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function qn(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||Jt()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Jn(e){D.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Yn(e,t){if(!t?.length)return!1;for(let n of t){if(Qn(n)){if(e.description&&nt(e.description,n))return l&&Jn(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let r=n.name?e.description&&nt(e.description,n.name):!0,i=n.op?e.op&&nt(e.op,n.op):!0,a=n.attributes?Object.entries(n.attributes).every(([t,n])=>Xn(e.attributes?.[t],n)):!0;if(r&&i&&a)return l&&Jn(e),!0}return!1}function Xn(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?nt(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Zn(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Qn(e){return typeof e==`string`||e instanceof RegExp}var $n=`production`,er=`_frozenDsc`;function tr(e,t){We(e,er,t)}function nr(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:Cn(t)};return t.emit(`createDsc`,i),i}function rr(e,t){let n=t.getPropagationContext();return n.dsc||nr(n.traceId,e)}function ir(e){let t=Jt();if(!t)return{};let n=Wn(e),r=Nn(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[er];if(c)return s(c);let l=a?.get(`sentry.dsc`),u=l&&fn(l);if(u)return s(u);let d=nr(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),qn()&&(d.sampled=String(Ln(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??dn(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}var ar=class{constructor(e={}){this._traceId=e.traceId||St(),this._spanId=e.spanId||Ct(),this.dropReason=e.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function or(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}var sr=Symbol.for(`sentry.skipNormalization`),cr=Symbol.for(`sentry.overrideNormalizationDepth`);function lr(e){return!!e[sr]}function ur(e){let t=e[cr];return typeof t==`number`?t:void 0}function dr(e,t=100,n=1/0){try{return pr(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function fr(e,t=3,n=100*1024){let r=dr(e,t);return _r(r)>n?fr(e,t-1,n):r}function pr(e,t,n=1/0,r=1/0,i=vr()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=mr(e,t);if(!s.startsWith(`[object `))return s;if(lr(t))return t;let c=ur(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return pr(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=qe(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=pr(e,t,l-1,r,i),f++}return o(t),d}function mr(e,t){try{if(e===`domain`&&t&&typeof t==`object`&&t._events)return`[Domain]`;if(e===`domainEmitter`)return`[DomainEmitter]`;if(typeof global<`u`&&t===global)return`[Global]`;if(typeof window<`u`&&t===window)return`[Window]`;if(typeof document<`u`&&t===document)return`[Document]`;if(Fe(t))return se(t);if(Ne(t))return`[SyntheticEvent]`;if(typeof t==`number`&&!Number.isFinite(t))return`[${t}]`;if(typeof t==`function`)return`[Function: ${A(t)}]`;if(typeof t==`symbol`)return`[${String(t)}]`;if(typeof t==`bigint`)return`[BigInt: ${String(t)}]`;let n=hr(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function hr(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function gr(e){return~-encodeURI(e).split(/%..|./).length}function _r(e){return gr(JSON.stringify(e))}function vr(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function yr(e,t=[]){return[e,t]}function br(e,t){let[n,r]=e;return[n,[...r,t]]}function xr(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Sr(e,t){return xr(e,(e,n)=>t.includes(n))}function Cr(e){let t=p(u);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function wr(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Cr(r),e]:r.push(typeof e==`string`?Cr(e):e)}for(let e of n){let[t,n]=e;if(i(`\n${JSON.stringify(t)}\n`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(dr(n))}i(e)}}return typeof r==`string`?r:Tr(r)}function Tr(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Er(e){return[{type:`span`},e]}function Dr(e){let t=typeof e.data==`string`?Cr(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Or={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function kr(e){return e in Or}function Ar(e){return kr(e)?Or[e]:e}function jr(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Mr(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:vn(r)},...i&&{trace:i}}}function Nr(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Pr(e,t,n,r){let i=jr(n);return yr({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:vn(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Fr(e,t,n,r){let i=jr(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;Nr(e,n?.sdk);let o=Mr(e,i,r,t);return delete e.sdkProcessingMetadata,yr(o,[[{type:a},e]])}function Ir(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=ir(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:vn(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=Nn(e);return!Yn({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=Nn(e);return(or(s)?t:s(t))||(Kn(),t)}:Nn,f=[];for(let e of l){let t=d(e);t&&f.push(Er(t))}return yr(o,f)}function Lr(e){if(!l)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:r}=Nn(e),{spanId:i}=e.spanContext(),a=Ln(e),o=Wn(e),s=o===e,c=`[Tracing] Starting ${a?`sampled`:`unsampled`} ${s?`root `:``}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&u.push(`parent ID: ${r}`),!s){let{op:e,description:t}=Nn(o);u.push(`root ID: ${o.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}D.log(`${c}
3
3
  ${u.join(`
4
- `)}`)}function Br(e){if(!l)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=Fn(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${Kn(e)===e?`root `:``}span "${t}" with ID ${r}`;D.log(i)}function Vr(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[tn],i=n[nn];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function Hr(e){return e.getOptions().traceLifecycle===`stream`}var Ur=1e3,Wr=class{constructor(e={}){this._traceId=e.traceId||Ct(),this._spanId=e.spanId||wt(),this._startTime=e.startTimestamp||vt(),this._links=e.links,this._attributes={},this.setAttributes({[en]:`manual`,[$t]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=Nn(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Zt,`custom`),this}end(e){this._endTime||(this._endTime=Nn(e),Br(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[$t],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Bn(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[en],profile_id:this._attributes[an],exclusive_time:this._attributes[on],measurements:Vr(this._events),is_segment:this._isStandaloneSpan&&Kn(this)===this||void 0,segment_id:this._isStandaloneSpan?Kn(this).spanContext().spanId:void 0,links:jn(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Kn(this),status:Vn(this._status),attributes:this._attributes,links:Mn(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){l&&D.log(`[Tracing] Adding an event to span:`,e);let r=Gr(t)?t:n||vt(),i=Gr(t)?{}:t||{},a={name:e,time:Nn(r),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=Yt();if(e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this)),!(this._isStandaloneSpan||this===Kn(this)))return;if(this._isStandaloneSpan){this._sampled?Jr(Rr([this],e)):(l&&D.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}else if(e&&Hr(e)){e.emit(`afterSegmentSpanEnd`,this);return}let t=this._convertSpanToTransaction();t&&(pn(this).scope||Gt()).captureEvent(t)}_convertSpanToTransaction(){if(!Kr(Fn(this)))return;this._name||=(l&&D.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:e,isolationScope:t}=pn(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let r=Gn(this).filter(e=>e!==this&&!qr(e)).map(e=>Fn(e)).filter(Kr),i=this._attributes[Zt];delete this._attributes[rn],r.forEach(e=>{delete e.data[rn]});let a={contexts:{trace:kn(this)},spans:r.length>Ur?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Ur):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:or(this)},request:n,...i&&{transaction_info:{source:i}}},o=Vr(this._events);return o&&Object.keys(o).length&&(l&&D.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(o,void 0,2)),a.measurements=o),a}};function Gr(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Kr(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function qr(e){return e instanceof Wr&&e.isStandaloneSpan()}function Jr(e){let t=Yt();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function Yr(e,t,n){if(!Yn(e))return[!1];let r,i;typeof e.tracesSampler==`function`?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),r=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(i=e.tracesSampleRate,r=!0):i=t.parentSampled;let a=Dn(i);if(a===void 0)return l&&D.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!a)return l&&D.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,a,r];let o=n<a;return o||l&&D.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,a,r]}var Xr=`__SENTRY_SUPPRESS_TRACING__`;function Zr(e){let t=ti();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=ei(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>Jt(e.scope,t):i===void 0?e=>e():e=>Qr(i,e))(()=>{let t=Gt(),a=ii(t,i),o=Yt();return e.onlyIfParent&&!a?(o?.recordDroppedEvent(`no_parent_span`,`span`),new sr):$r({parentSpan:a,spanArguments:n,forceTransaction:r,scope:t})})}function Qr(e,t){let n=ti();return n.withActiveSpan?n.withActiveSpan(e,t):Jt(n=>(Et(n,e||void 0),t(n)))}function $r({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Yn()){let r=new sr;return(n||!e)&&rr(r,{sampled:`false`,sample_rate:`0`,transaction:t.name,...or(r)}),r}let i=Yt();if(ai(i,t))return oi(r)||i?.recordDroppedEvent(`ignored`,`span`),new sr({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});let a=Kt(),o;if(e&&!n)o=ri(e,r,t),Wn(e,o);else if(e){let n=or(e),{traceId:i,spanId:a}=e.spanContext(),s=zn(e);o=ni({traceId:i,parentSpanId:a,...t},r,s),rr(o,n)}else{let{traceId:e,dsc:n,parentSpanId:i,sampled:s}={...a.getPropagationContext(),...r.getPropagationContext()};o=ni({traceId:e,parentSpanId:i,...t},r,s),n&&rr(o,n)}return zr(o),fn(o,r,a),o}function ei(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=Nn(e.startTime),delete n.startTime,n}return t}function ti(){return Ht(f())}function ni(e,t,n){let r=Yt(),i=r?.getOptions()||{},{name:a=``}=e,o={spanAttributes:{...e.attributes},spanName:a,parentSampled:n};r?.emit(`beforeSampling`,o,{decision:!1});let s=o.parentSampled??n,c=o.spanAttributes,u=t.getPropagationContext(),d=oi(t),[f,p,m]=d?[!1]:Yr(i,{name:a,parentSampled:s,attributes:c,parentSampleRate:Dn(u.dsc?.sample_rate)},u.sampleRand),h=new Wr({...e,attributes:{[Zt]:`custom`,[Qt]:p!==void 0&&m?p:void 0,...c},sampled:f});return!f&&r&&!d&&(l&&D.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),r.recordDroppedEvent(`sample_rate`,Hr(r)?`span`:`transaction`)),r&&r.emit(`spanStart`,h),h}function ri(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),a=oi(t),o=a?!1:zn(e),s=o?new Wr({...n,parentSpanId:r,traceId:i,sampled:o}):new sr({traceId:i});Wn(e,s);let c=Yt();return c?(Hr(c)&&s instanceof sr&&(e instanceof sr&&e.dropReason?(s.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,`span`)):a||(s.dropReason=`sample_rate`,c.recordDroppedEvent(`sample_rate`,`span`))),c.emit(`spanStart`,s),n.endTimestamp&&(c.emit(`spanEnd`,s),c.emit(`afterSpanEnd`,s)),s):s}function ii(e,t){if(t)return t;if(t===null)return;let n=Dt(e);if(!n)return;let r=Yt();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Kn(n):n}function ai(e,t){let n=e?.getOptions().ignoreSpans;return!e||!Hr(e)||!n?.length?!1:Zn({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function oi(e){return e.getScopeData().sdkProcessingMetadata[Xr]===!0}function si(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;di(e,t),r&&mi(e,r),hi(e,n),fi(e,i),pi(e,a)}function ci(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;li(e,`extra`,n),li(e,`tags`,r),li(e,`attributes`,i),li(e,`user`,a),li(e,`contexts`,o),e.sdkProcessingMetadata=St(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function li(e,t,n){e[t]=St(e[t],n,1)}function ui(e,t){let n=qt().getScopeData();return e&&ci(n,e.getScopeData()),t&&ci(n,t.getScopeData()),n}function di(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function fi(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function pi(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function mi(e,t){e.contexts={trace:An(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:or(t),...e.sdkProcessingMetadata};let n=Fn(Kn(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function hi(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function gi(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function _i(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function vi(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}var yi=0,bi=1,xi=2;function Si(e){return new wi(t=>{t(e)})}function Ci(e){return new wi((t,n)=>{n(e)})}var wi=class e{constructor(e){this._state=yi,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===yi)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===bi&&e[1](this._value),this._state===xi&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===yi){if(Me(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(bi,e)},r=e=>{t(xi,e)};try{e(n,r)}catch(e){r(e)}}};function Ti(e,t,n,r=0){try{let i=Ei(t,n,e,r);return Me(i)?i:Si(i)}catch(e){return Ci(e)}}function Ei(e,t,n,r){let i=n[r];if(!e||!i)return e;let a=i({...e},t);return l&&a===null&&D.log(`Event processor "${i.id||`?`}" dropped event`),Me(a)?a.then(e=>Ei(e,t,n,r+1)):Ei(a,t,n,r+1)}var Di,Oi,ki,Ai;function nee(e){let t=u._sentryDebugIds,n=u._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(Ai&&r.length===Oi&&i.length===ki)return Ai;Oi=r.length,ki=i.length,Ai={},Di||={};let a=(t,n)=>{for(let r of t){let t=n[r],i=Di?.[r];if(i&&Ai&&t)Ai[i[0]]=t,Di&&(Di[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&Ai&&Di){Ai[i]=t,Di[r]=[i,t];break}}}}};return t&&a(r,t),n&&a(i,n),Ai}function ree(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||st(),timestamp:t.timestamp||ht()},l=n.integrations||e.integrations.map(e=>e.name);iee(c,e),see(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&aee(c,e.stackParser);let u=lee(r,n.captureContext);n.mechanism&&dt(c,n.mechanism);let d=i?i.getEventProcessors():[],f=ui(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),si(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?Si(c):Ti(m,c,n)).then(e=>(e&&oee(e),typeof o==`number`&&o>0?cee(e,o,s):e))}function iee(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=et(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=et(e.value,a)})}function aee(e,t){let n=nee(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function oee(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function see(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function cee(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:pr(e.data,t,n)}}))},...e.user&&{user:pr(e.user,t,n)},...e.contexts&&{contexts:pr(e.contexts,t,n)},...e.extra&&{extra:pr(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=pr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:pr(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=pr(e.contexts.flags,3,n)),r}function lee(e,t){if(!t)return e;let n=e?e.clone():new kt;return n.update(t),n}function uee(e){if(e)return dee(e)||pee(e)?{captureContext:e}:e}function dee(e){return e instanceof kt||typeof e==`function`}var fee=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function pee(e){return Object.keys(e).some(e=>fee.includes(e))}function ji(e,t){return Gt().captureException(e,uee(t))}function mee(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return Gt().captureMessage(e,n,r)}function Mi(e,t){return Gt().captureEvent(e,t)}function hee(e,t){Kt().setContext(e,t)}function gee(e){Kt().setUser(e)}function _ee(){return Kt().lastEventId()}function Ni(e){let t=Kt(),{user:n}=ui(t,Gt()),{userAgent:r}=u.navigator||{},i=tee({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return a?.status===`ok`&&yt(a,{status:`exited`}),Pi(),t.setSession(i),i}function Pi(){let e=Kt(),t=Gt().getSession()||e.getSession();t&&bt(t),Fi(),e.setSession()}function Fi(){let e=Kt(),t=Yt(),n=e.getSession();n&&t&&t.captureSession(n)}function Ii(e=!1){if(e){Pi();return}Fi()}function Li(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function vee(e){return`${Li(e)}${e.projectId}/envelope/`}function yee(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function bee(e,t,n){return t||`${vee(e)}?${yee(e,n)}`}function xee(e,t){let n=En(e);if(!n)return``;let r=`${Li(n)}embed/error-page/`,i=`dsn=${bn(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`)if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${i}`}var Ri=[];function See(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Cee(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return See(r)}function wee(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Bi(e,t,n)}),n}function zi(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Bi(e,t,n){if(n[t.name]){l&&D.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Ri.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),Ri.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),l&&D.log(`Integration installed: ${t.name}`)}function Vi(e){return e}function Hi(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Ui(){return`npm`}function Tee(){return!Hi()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Wi(){return typeof window<`u`&&(!Tee()||Gi())}function Gi(){return u.process?.type===`renderer`}function Ki(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Wi()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function qi(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),xr(a,[Ki(e,i)])}function Ji(e,t){let n=t??Yi(e)??[];if(n.length===0)return;let r=e.getOptions(),i=qi(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);Xi().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Yi(e){return Xi().get(e)}function Xi(){return m(`clientToLogBufferMap`,()=>new WeakMap)}function Zi(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Wi()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Qi(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=bn(r)),xr(a,[Zi(e,i)])}function $i(e,t){let n=t??ea(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Qi(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);ta().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function ea(e){return ta().get(e)}function ta(){return m(`clientToMetricBufferMap`,()=>new WeakMap)}function na(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}var ra=Symbol.for(`SentryBufferFullError`);function ia(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return Ci(ra);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return Si(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>na(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var aa=60*1e3;function oa(e,t=$e()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?aa:r-t}function sa(e,t){return e[t]||e.all||0}function ca(e,t,n=$e()){return sa(e,t)>n}function la(e,{statusCode:t,headers:n},r=$e()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+oa(o,r):t===429&&(i.all=r+60*1e3);return i}function Eee(e,t,n=ia(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(Cr(i,(t,n)=>{let i=Mr(n);ca(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=xr(i[0],a),s=t=>{if(wr(o,[`client_report`])){l&&D.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}Cr(o,(n,r)=>{e.recordDroppedEvent(t,Mr(r))})};return n.add(()=>t({body:Er(o)}).then(e=>e.statusCode===413?(l&&D.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),s(`send_error`),e):(l&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&D.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=la(r,e),e),e=>{throw s(`network_error`),l&&D.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===ra)return l&&D.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function ua(e,t,n){let r=[{type:`client_report`},{timestamp:n||ht(),discarded_events:e}];return xr(t?{dsn:t}:{},[r])}function da(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Dee(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[an],exclusive_time:o?.[on],measurements:e.measurements,is_segment:!0}}function Oee(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var fa=`Not capturing exception because it's already been captured.`,pa=`Discarded session because of missing or non-string release`,ma=Symbol.for(`SentryInternalError`),ha=Symbol.for(`SentryDoNotSendEventError`),ga=5e3;function _a(e){return{message:e,[ma]:!0}}function va(e){return{message:e,[ha]:!0}}function ya(e){return!!e&&typeof e==`object`&&ma in e}function ba(e){return!!e&&typeof e==`object`&&ha in e}function xa(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{a+=r(t),a>=8e5?i(e):s||(s=!0,o=na(setTimeout(()=>{i(e)},ga)))}),e.on(`flush`,()=>{i(e)})}var Sa=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ia(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=En(e.dsn):l&&D.warn(`No DSN provided, client will not send events.`),this._dsn){let t=bee(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&xa(this,`afterCaptureLog`,`flushLogs`,ka,Ji),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&xa(this,`afterCaptureMetric`,`flushMetrics`,Oa,$i)}captureException(e,t,n){let r=st();if(ft(e))return l&&D.log(fa),r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),`error`),i.event_id}captureMessage(e,t,n,r){let i={event_id:st(),...n},a=Ee(e)?e:String(e),o=De(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=st();if(t?.originalException&&ft(t.originalException))return l&&D.log(fa),r;let i={event_id:r,...t},a=e.sdkProcessingMetadata||{},o=a.capturedSpanScope,s=a.capturedSpanIsolationScope,c=Ca(e.type);return this._process(()=>this._captureEvent(e,i,o||n,s),c),i.event_id}captureSession(e){this.sendSession(e),yt(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Ji(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Bi(this,e,this._integrations),t||zi(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Lr(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=Sr(n,kr(e));this.sendEnvelope(n).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=tr}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t){l&&D.warn(pa);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){l&&D.warn(pa);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=Ir(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;l&&D.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:``}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return l&&D.error(`Error while sending envelope:`,e),{}}return l&&D.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=wee(this,e),zi(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(yt(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a?.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),ree(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...Xt(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ar(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=Gt(),r=Kt()){return l&&Ea(e)&&D.log(`Captured error event \`${da(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{l&&(ba(e)?D.log(e.message):ya(e)?D.warn(e.message):D.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Da(e),s=Ea(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:Dn(a);if(s&&typeof l==`number`&&Qe()>l)return this.recordDroppedEvent(`sample_rate`,`error`),Ci(va(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=Ca(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),va("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:wa(Ta(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw va(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw ba(e)||ya(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),_a(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===ra&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){l&&D.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){l&&D.log(`No outcomes to send`);return}if(!this._dsn){l&&D.log(`No dsn provided, will not send outcomes`);return}l&&D.log(`Sending outcomes:`,e);let t=ua(e,this._options.tunnel&&bn(this._dsn));this.sendEnvelope(t)}};function Ca(e){return e===`replay_event`?`replay`:e||`error`}function wa(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Me(e))return e.then(e=>{if(!Oe(e)&&e!==null)throw _a(n);return e},e=>{throw _a(`${t} rejected with ${e}`)});if(!Oe(e)&&e!==null)throw _a(n);return e}function Ta(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!cr(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Ea(c)&&i)return i(c,r);if(Da(c)){if(s||o){let t=Dee(c);if(o?.length&&Zn({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=St(n,Oee(e)):Jn()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&Zn({description:e.description,op:e.op,attributes:e.data},o)){$n(n,e);continue}if(s){let n=s(e);n?t.push(n):(Jn(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function Ea(e){return e.type===void 0}function Da(e){return e.type===`transaction`}function Oa(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Aa(e.attributes)}function ka(e){let t=0;return e.message&&(t+=e.message.length*2),t+Aa(e.attributes)}function Aa(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*ja(e[0]):De(e)?t+=ja(e):t+=100}),t}function ja(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Ma(e,t){return e(t.stack||``,1)}function Na(e){return be(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Pa(e){return Na(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Fa(e,t){let n={type:t.name||t.constructor.name,value:Pa(t)},r=Ma(e,t);return r.length&&(n.stacktrace={frames:r}),n}function Ia(e,t){t.debug===!0&&(l?D.enable():v(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Gt().update(t.initialScope);let n=new e(t);return La(n),n.init(),n}function La(e){Gt().setClient(e)}function Ra(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function za(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:d})),i.version=d)}var Ba=100;function Va(e,t){let n=Yt(),r=Kt();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Ba}=n.getOptions();if(a<=0)return;let o={timestamp:ht(),...e},s=i?v(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var Ha,Ua=`FunctionToString`,Wa=new WeakMap,Ga=Vi((()=>({name:Ua,setupOnce(){Ha=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Ke(this),n=Wa.has(Yt())&&t!==void 0?t:this;return Ha.apply(n,e)}}catch{}},setup(e){Wa.set(e,!0)}}))),kee=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],Aee=`EventFilters`,Ka=Vi((e={})=>{let t;return{name:Aee,setup(n){t=qa(e,n.getOptions())},processEvent(n,r,i){return t||=qa(e,i.getOptions()),Mee(n,t)?null:n}}}),jee=Vi(((e={})=>({...Ka(e),name:`InboundFilters`})));function qa(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:kee],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Mee(e,t){if(!e.type){if(Nee(e,t.ignoreErrors))return l&&D.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${lt(e)}`),!0;if($a(e))return l&&D.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${lt(e)}`),!0;if(Ya(e,t.denyUrls))return l&&D.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${lt(e)}.\nUrl: ${Qa(e)}`),!0;if(!Xa(e,t.allowUrls))return l&&D.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${lt(e)}.\nUrl: ${Qa(e)}`),!0}else if(e.type===`transaction`&&Ja(e,t.ignoreTransactions))return l&&D.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${lt(e)}`),!0;return!1}function Nee(e,t){return t?.length?da(e).some(e=>rt(e,t)):!1}function Ja(e,t){if(!t?.length)return!1;let n=e.transaction;return n?rt(n,t):!1}function Ya(e,t){if(!t?.length)return!1;let n=Qa(e);return n?rt(n,t):!1}function Xa(e,t){if(!t?.length)return!0;let n=Qa(e);return n?rt(n,t):!0}function Za(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Qa(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?Za(t):null}catch{return l&&D.error(`Cannot extract url for event ${lt(e)}`),null}}function $a(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function eo(e,t,n,r,i,a){if(!i.exception?.values||!a||!Pe(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=to(e,t,r,a.originalException,n,i.exception.values,o,0))}function to(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Pe(r[i],Error)){ro(o,s,r);let a=e(t,r[i]),l=c.length;io(a,i,l,s),c=to(e,t,n,r[i],i,[a,...c],a,l)}return no(r)&&r.errors.forEach((a,l)=>{if(Pe(a,Error)){ro(o,s,r);let u=e(t,a),d=c.length;io(u,`errors[${l}]`,d,s),c=to(e,t,n,a,i,[u,...c],u,d)}}),c}function no(e){return Array.isArray(e.errors)}function ro(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...no(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function io(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}var ao=`cause`,oo=5,so=`LinkedErrors`,co=Vi(((e={})=>{let t=e.limit||oo,n=e.key||ao;return{name:so,preprocessEvent(e,r,i){eo(Fa,i.getOptions().stackParser,n,t,e,r)}}}));function lo(e){let t=`console`,n=ue(t,e);return de(t,uo),n}function uo(){`console`in u&&h.forEach(function(e){e in u.console&&Ue(u.console,e,function(t){return _[e]=t,function(...t){fe(`console`,{args:t,level:e}),_[e]?.apply(u.console,t)}})})}function fo(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var po=`Dedupe`,mo=Vi((()=>{let e;return{name:po,processEvent(t){if(t.type)return t;try{if(ho(t,e))return l&&D.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function ho(e,t){return t?!!(go(e,t)||_o(e,t)):!1}function go(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!yo(e,t)||!vo(e,t))}function _o(e,t){let n=bo(t),r=bo(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!yo(e,t)||!vo(e,t))}function vo(e,t){let n=oe(e),r=oe(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function yo(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function bo(e){return e.exception?.values?.[0]}function xo(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}var So=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Co(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=So.exec(t);return n?n.slice(1):[]}function wo(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=xo(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function To(e){let t=0;for(;t<e.length&&e[t]===``;t++);let n=e.length-1;for(;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}function Eo(e,t){e=wo(e).slice(1),t=wo(t).slice(1);let n=To(e.split(`/`)),r=To(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function Do(e,t){let n=Co(e)[2]||``;return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var Oo=`RewriteFrames`,ko=Vi((e={})=>{let t=e.root,n=e.prefix||`app:///`,r=`window`in u&&!!u.window,i=e.iteratee||Ao({isBrowser:r,root:t,prefix:n});function a(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:o(e.stacktrace)}}))}}}catch{return e}}function o(e){return{...e,frames:e?.frames?.map(e=>i(e))}}return{name:Oo,processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=a(t)),t}}});function Ao({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes(`\\`)&&!r.filename.includes(`/`),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;e.indexOf(t)===0&&(r.filename=e.replace(t,n))}}else if(i||a){let e=i?r.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):r.filename;r.filename=`${n}${t?Eo(t,e):Do(e)}`}return r}}var jo=`ConversationId`,Mo=Vi((()=>({name:jo,setup(e){e.on(`spanStart`,e=>{let t=Gt().getScopeData(),n=Kt().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=Fn(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(sn,r)}})}})));function No(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Po=u;function Fo(){return`history`in Po&&!!Po.history}function Io(){if(!(`fetch`in Po))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Lo(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ro(){if(typeof EdgeRuntime==`string`)return!0;if(!Io())return!1;if(Lo(Po.fetch))return!0;let e=!1,t=Po.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Lo(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){l&&D.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function zo(e,t){let n=`fetch`,r=ue(n,e);return de(n,()=>Bo(void 0,t)),r}function Bo(e,t=!1){t&&!Ro()||Ue(u,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=Uo(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:vt()*1e3,virtualError:r,headers:Wo(n)};return e||fe(`fetch`,{...o}),t.apply(u,n).then(async t=>(e?e(t):fe(`fetch`,{...o,endTimestamp:vt()*1e3,response:t}),t),e=>{fe(`fetch`,{...o,endTimestamp:vt()*1e3,error:e}),be(e)&&e.stack===void 0&&(e.stack=r.stack,We(e,`framesToPop`,1));let t=Yt()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(o.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:We(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}function Vo(e,t){return!!e&&typeof e==`object`&&!!e[t]}function Ho(e){return typeof e==`string`?e:e?Vo(e,`url`)?e.url:e.toString?e.toString():``:``}function Uo(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Ho(t),method:Vo(n,`method`)?String(n.method).toUpperCase():Ie(t)&&Vo(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Ho(t),method:Vo(t,`method`)?String(t.method).toUpperCase():`GET`}}function Wo(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Ie(t))return new Headers(t.headers)}catch{}}var Go=u,Ko=0;function qo(){return Ko>0}function Jo(){Ko++,setTimeout(()=>{Ko--})}function Yo(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Ke(e))return e}catch{return e}let r=function(...n){try{let r=n.map(e=>Yo(e,t));return e.apply(this,r)}catch(e){throw Jo(),Jt(r=>{r.addEventProcessor(e=>(t.mechanism&&(ut(e,void 0,void 0),dt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),ji(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Ge(r,e),We(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,`name`,{get(){return e.name}})}catch{}return r}function Xo(){let e=Ve(),{referrer:t}=Go.document||{},{userAgent:n}=Go.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function Zo(e,t){let n=es(e,t),r={type:as(t),value:os(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Qo(e,t,n,r){let i=Yt()?.getOptions().normalizeDepth,a=ps(t),o={__serialized__:mr(t,i)};if(a)return{exception:{values:[Zo(e,a)]},extra:o};let s={exception:{values:[{type:ke(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:ds(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=es(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function $o(e,t){return{exception:{values:[Zo(e,t)]}}}function es(e,t){let n=t.stacktrace||t.stack||``,r=ns(t),i=rs(t);try{return e(n,r,i)}catch{}return[]}var ts=/Minified React error #\d+;/i;function ns(e){return e&&ts.test(e.message)?1:0}function rs(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function is(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function as(e){let t=e?.name;return!t&&is(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function os(e){let t=e?.message;return is(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Pa(t.error):Pa(e):`No error message`}function ss(e,t,n,r){let i=ls(e,t,n?.syntheticException||void 0,r);return dt(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),Si(i)}function cs(e,t,n=`info`,r,i){let a=us(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),Si(a)}function ls(e,t,n,r,i){let a;if(Se(t)&&t.error)return $o(e,t.error);if(Ce(t)||we(t)){let i=t;if(`stack`in t)a=$o(e,t);else{let t=i.name||(Ce(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=us(e,o,n,r),ut(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return be(t)?$o(e,t):Oe(t)||ke(t)?(a=Qo(e,t,n,i),dt(a,{synthetic:!0}),a):(a=us(e,t,n,r),ut(a,`${t}`,void 0),dt(a,{synthetic:!0}),a)}function us(e,t,n,r){let i={};if(r&&n){let r=es(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),dt(i,{synthetic:!0})}if(Ee(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function ds(e,{isUnhandledRejection:t}){let n=eee(e),r=t?`promise rejection`:`exception`;return Se(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ke(e)?`Event \`${fs(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function fs(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ps(e){return Object.values(e).find(e=>e instanceof Error)}var ms=class extends Sa{constructor(e){let t=hs(e);za(t,`browser`,[`browser`],Go.SENTRY_SDK_SOURCE||Ui()),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?`auto`:`never`,...t._metadata.sdk.settings}),super(t);let{sendDefaultPii:n,sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;Go.document&&(r||i||s)&&Go.document.addEventListener(`visibilitychange`,()=>{Go.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&Ji(this),s&&$i(this))}),n&&this.on(`beforeSendSession`,Ra)}eventFromException(e,t){return ss(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return cs(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function hs(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:Go.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var gs=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,_s=u,vs=1e3,ys,bs,xs;function Ss(e){ue(`dom`,e),de(`dom`,Cs)}function Cs(){if(!_s.document)return;let e=fe.bind(null,`dom`),t=Es(e,!0);_s.document.addEventListener(`click`,t,!1),_s.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=_s[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Ue(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Es(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Ue(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function ws(e){if(e.type!==bs)return!1;try{if(!e.target||e.target._sentryId!==xs)return!1}catch{}return!0}function Ts(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function Es(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Ds(n);if(Ts(n.type,r))return;We(n,`_sentryCaptured`,!0),r&&!r._sentryId&&We(r,`_sentryId`,st());let i=n.type===`keypress`?`input`:n.type;ws(n)||(e({event:n,name:i,global:t}),bs=n.type,xs=r?r._sentryId:void 0),clearTimeout(ys),ys=_s.setTimeout(()=>{xs=void 0,bs=void 0},vs)}}function Ds(e){try{return e.target}catch{return null}}var Os;function ks(e){let t=`history`;ue(t,e),de(t,As)}function As(){if(_s.addEventListener(`popstate`,()=>{let e=_s.location.href,t=Os;Os=e,t!==e&&fe(`history`,{from:t,to:e})}),!Fo())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Os,i=js(String(n));if(Os=i,r===i)return e.apply(this,t);fe(`history`,{from:r,to:i})}return e.apply(this,t)}}Ue(_s.history,`pushState`,e),Ue(_s.history,`replaceState`,e)}function js(e){try{return new URL(e,_s.location.origin).toString()}catch{return e}}var Ms={};function Ns(e){let t=Ms[e];if(t)return t;let n=_s[e];if(Lo(n))return Ms[e]=n.bind(_s);let r=_s.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){gs&&D.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Ms[e]=n.bind(_s))}function Ps(e){Ms[e]=void 0}var Fs=`__sentry_xhr_v3__`;function Is(e){ue(`xhr`,e),de(`xhr`,Ls)}function Ls(){if(!_s.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=vt()*1e3,a=Te(n[0])?n[0].toUpperCase():void 0,o=Rs(n[1]);if(!a||!o)return e.apply(t,n);t[Fs]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[Fs];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}fe(`xhr`,{endTimestamp:vt()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[Fs];return a&&Te(r)&&Te(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[Fs];return r?(n[0]!==void 0&&(r.body=n[0]),fe(`xhr`,{startTimestamp:vt()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Rs(e){if(Te(e))return e;try{return e.toString()}catch{}}var zs=40;function Bs(e,t=Ns(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw Ps(`fetch`),e}finally{n-=a,r--}}return Eee(e,i,ia(e.bufferSize||zs))}var Vs=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Pee=30,Fee=50;function Hs(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Iee=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Lee=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ree=/\((\S*)(?::(\d+))(?::(\d+))\)/,zee=/at (.+?) ?\(data:(.+?),/,Bee=[Pee,e=>{let t=e.match(zee);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=Iee.exec(e);if(n){let[,e,t,r]=n;return Hs(e,`?`,+t,+r)}let r=Lee.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=Ree.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Us(r[1]||`?`,r[2]);return Hs(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Vee=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Hee=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Uee=ne(Bee,[Fee,e=>{let t=Vee.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Hee.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Us(n,e),Hs(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Us=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ws=1024,Wee=`Breadcrumbs`,Gs=Vi(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Wee,setup(e){t.console&&lo(qee(e)),t.dom&&Ss(Kee(e,t.dom)),t.xhr&&Is(Jee(e)),t.fetch&&zo(Yee(e)),t.history&&ks(Xee(e)),t.sentry&&e.on(`beforeSendEvent`,Gee(e))}}}));function Gee(e){return function(t){Yt()===e&&Va({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:lt(t)},{event:t})}}function Kee(e,t){return function(n){if(Yt()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Ws&&(Vs&&D.warn(`\`dom.maxStringLength\` cannot exceed ${Ws}, but a value of ${o} was configured. Sentry will use ${Ws} instead.`),o=Ws),typeof a==`string`&&(a=[a]);try{let e=n.event,t=Zee(e)?e.target:e;r=ze(t,{keyAttrs:a,maxStringLength:o}),i=He(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Va(s,{event:n.event,name:n.name,global:n.global})}}function qee(e){return function(t){if(Yt()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:fo(t.level),message:tt(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${tt(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;Va(n,{input:t.args,level:t.level})}}function Jee(e){return function(t){if(Yt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Fs];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:No(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),Va(d,u)}}function Yee(e){return function(t){if(Yt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),Va(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:No(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),Va(s,o)}}}function Xee(e){return function(t){if(Yt()!==e)return;let n=t.from,r=t.to,i=gi(Go.location.href),a=n?gi(n):void 0,o=gi(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),Va({category:`navigation`,data:{from:n,to:r}})}}function Zee(e){return!!e&&!!e.target}var Qee=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),$ee=`BrowserApiErrors`,Ks=Vi(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:$ee,setupOnce(){t.setTimeout&&Ue(Go,`setTimeout`,qs),t.setInterval&&Ue(Go,`setInterval`,qs),t.requestAnimationFrame&&Ue(Go,`requestAnimationFrame`,ete),t.XMLHttpRequest&&`XMLHttpRequest`in Go&&Ue(XMLHttpRequest.prototype,`send`,tte);let e=t.eventTarget;e&&(Array.isArray(e)?e:Qee).forEach(e=>nte(e,t))}}}));function qs(e){return function(...t){let n=t[0];return t[0]=Yo(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${A(e)}`}}),e.apply(this,t)}}function ete(e){return function(t){return e.apply(this,[Yo(t,{mechanism:{data:{handler:A(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function tte(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Ue(n,e,function(t){let n={mechanism:{data:{handler:A(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Ke(t);return r&&(n.mechanism.data.handler=A(r)),Yo(t,n)})}),e.apply(this,t)}}function nte(e,t){let n=Go[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Ue(n,`addEventListener`,function(n){return function(r,i,a){try{rte(i)&&(i.handleEvent=Yo(i.handleEvent,{mechanism:{data:{handler:A(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&ite(this,r,i),n.apply(this,[r,Yo(i,{mechanism:{data:{handler:A(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Ue(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}function rte(e){return typeof e.handleEvent==`function`}function ite(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var Js=Vi((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(Go.document===void 0){Vs&&D.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Ni({ignoreDuration:!0}),Ii();let e=Kt(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();(n?.id!==t?.id||n?.ip_address!==t?.ip_address)&&(Ii(),n=t)}),t===`route`&&ks(({from:e,to:t})=>{e!==t&&(Ni({ignoreDuration:!0}),Ii())})}}}),ate=`CultureContext`,ote=Vi((()=>({name:ate,preprocessEvent(e){let t=Ys();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Ys();t&&vi(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function Ys(){try{let e=Go.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var ste=`GlobalHandlers`,Xs=Vi(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:ste,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(cte(e),Zs(`onerror`)),t.onunhandledrejection&&(lte(e),Zs(`onunhandledrejection`))}}}));function cte(e){me(t=>{let{stackParser:n,attachStacktrace:r}=Qs();if(Yt()!==e||qo())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=fte(ls(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Mi(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function lte(e){_e(t=>{let{stackParser:n,attachStacktrace:r}=Qs();if(Yt()!==e||qo())return;let i=ute(t),a=De(i)?dte(i):ls(n,i,void 0,r,!0);a.level=`error`,Mi(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function ute(e){if(De(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function dte(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function fte(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:$s(t)??Ve(),function:`?`,in_app:!0}),e}function Zs(e){Vs&&D.log(`Global Handler attached: ${e}`)}function Qs(){return Yt()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function $s(e){if(!(!Te(e)||e.length===0))return e.startsWith(`data:`)?`<${_i(e,!1)}>`:e}var ec=Vi(()=>({name:`HttpContext`,preprocessEvent(e){if(!Go.navigator&&!Go.location&&!Go.document)return;let t=Xo(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!Go.navigator&&!Go.location&&!Go.document)return;let t=Xo();vi(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers[`User-Agent`],"http.request.header.referer":t.headers.Referer})}})),tc=`cause`,nc=5,rc=`LinkedErrors`,ic=Vi(((e={})=>{let t=e.limit||nc,n=e.key||tc;return{name:rc,preprocessEvent(e,r,i){eo(Zo,i.getOptions().stackParser,n,t,e,r)}}}));function ac(){return oc()?(Vs&&v(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function oc(){if(Go.window===void 0)return!1;let e=Go;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=Ve();return!(Go===Go.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function sc(e){return[jee(),Ga(),Mo(),Ks(),Gs(),Xs(),ic(),mo(),ec(),ote(),Js()]}function cc(e={}){let t=!e.skipBrowserExtensionCheck&&ac(),n=e.defaultIntegrations==null?sc():e.defaultIntegrations;return Ia(ms,{...e,enabled:t?!1:e.enabled,stackParser:k(e.stackParser||Uee),integrations:Cee({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Bs})}function lc(e={}){let t=Go.document,n=t?.head||t?.body;if(!n){Vs&&D.error(`[showReportDialog] Global document not defined`);return}let r=Gt(),i=Yt()?.getDsn();if(!i){Vs&&D.error(`[showReportDialog] DSN not configured`);return}let a={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||_ee()},o=Go.document.createElement(`script`);o.async=!0,o.crossOrigin=`anonymous`,o.src=xee(i,a);let{onLoad:s,onClose:c}=a;if(s&&(o.onload=s),c){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{c()}finally{Go.removeEventListener(`message`,e)}};Go.addEventListener(`message`,e)}n.appendChild(o)}var j=n(c());function uc(e){let t={...e};return za(t,`react`),hee(`react`,{version:j.version}),cc(t)}function dc(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function fc(e,t){let n=new WeakSet;function r(e,t){if(!n.has(e)){if(e.cause)return n.add(e),r(e.cause,t);e.cause=t}}r(e,t)}function pc(e,{componentStack:t},n){if(dc(j.version)&&be(e)&&t){let n=Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,fc(e,n)}return Jt(r=>(r.setContext(`react`,{componentStack:t}),ji(e,n)))}var mc=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,hc={componentStack:null,error:null,eventId:null},gc=class extends j.Component{constructor(e){super(e),this.state=hc,this._openFallbackReportDialog=!0;let t=Yt();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on(`afterSendEvent`,t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&lc({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,t){let{componentStack:n}=t,{beforeCapture:r,onError:i,showDialog:a,dialogOptions:o}=this.props;Jt(s=>{r&&r(s,e,n);let c=pc(e,t,{mechanism:{handled:this.props.handled==null?!!this.props.fallback:this.props.handled,type:`auto.function.react.error_boundary`}});i&&i(e,n,c),a&&(this._lastEventId=c,this._openFallbackReportDialog&&lc({...o,eventId:c})),this.setState({error:e,componentStack:n,eventId:c})})}componentDidMount(){let{onMount:e}=this.props;e&&e()}componentWillUnmount(){let{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===hc?r(null,null,null):r(e,t,n)),this._cleanupHook&&=(this._cleanupHook(),void 0)}resetErrorBoundary(){let{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(hc)}render(){let{fallback:e,children:t}=this.props,n=this.state;if(n.componentStack===null)return typeof t==`function`?t():t;let r=typeof e==`function`?j.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return j.isValidElement(r)?r:(e&&mc&&D.warn(`fallback did not produce a valid ReactElement`),null)}},_c=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vc={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},yc=new class{#e=vc;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function bc(e){setTimeout(e,0)}var xc=typeof window>`u`||`Deno`in globalThis;function Sc(){}function Cc(e,t){return typeof e==`function`?e(t):e}function wc(e){return typeof e==`number`&&e>=0&&e!==1/0}function Tc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ec(e,t){return typeof e==`function`?e(t):e}function Dc(e,t){return typeof e==`function`?e(t):e}function Oc(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ac(o,t.options))return!1}else if(!Mc(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function kc(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(jc(t.options.mutationKey)!==jc(a))return!1}else if(!Mc(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ac(e,t){return(t?.queryKeyHashFn||jc)(e)}function jc(e){return JSON.stringify(e,(e,t)=>Lc(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Mc(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Mc(e[n],t[n])):!1}var Nc=Object.prototype.hasOwnProperty;function Pc(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Ic(e)&&Ic(t);if(!r&&!(Lc(e)&&Lc(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Nc.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Pc(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Fc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Ic(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lc(e){if(!Rc(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Rc(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Rc(e){return Object.prototype.toString.call(e)===`[object Object]`}function zc(e){return new Promise(t=>{yc.setTimeout(t,e)})}function Bc(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Pc(e,t)}function Vc(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Hc(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Uc=Symbol();function Wc(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Uc?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Gc(e,t){return typeof e==`function`?e(...t):!!e}function Kc(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var qc=new class extends _c{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!xc&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function Jc(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Yc=bc;function Xc(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Yc,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Zc=Xc(),Qc=new class extends _c{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!xc&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function $c(e){return Math.min(1e3*2**e,3e4)}function el(e){return(e??`online`)===`online`?Qc.isOnline():!0}var tl=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function nl(e){return e instanceof tl}function rl(e){let t=!1,n=0,r,i=Jc(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new tl(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>qc.isFocused()&&(e.networkMode===`always`||Qc.isOnline())&&e.canRun(),u=()=>el(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(xc?0:3),o=e.retryDelay??$c,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),zc(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var il=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wc(this.gcTime)&&(this.#e=yc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xc?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(yc.clearTimeout(this.#e),void 0)}},al=class extends il{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=cl(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=cl(this.options);e.data!==void 0&&(this.setState(sl(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=Bc(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Sc).catch(Sc):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Dc(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ec(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Tc(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=Wc(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=rl({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof tl&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof tl){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ol(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...sl(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Zc.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function ol(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:el(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function sl(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function cl(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ll=class extends _c{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Jc(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),dl(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fl(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fl(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Dc(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Fc(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&pl(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Dc(this.options.enabled,this.#t)!==Dc(t.enabled,this.#t)||Ec(this.options.staleTime,this.#t)!==Ec(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Dc(this.options.enabled,this.#t)!==Dc(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return hl(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Sc)),t}#g(){this.#b();let e=Ec(this.options.staleTime,this.#t);if(xc||this.#r.isStale||!wc(e))return;let t=Tc(this.#r.dataUpdatedAt,e)+1;this.#d=yc.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(xc||Dc(this.options.enabled,this.#t)===!1||!wc(this.#p)||this.#p===0)&&(this.#f=yc.setInterval(()=>{(this.options.refetchIntervalInBackground||qc.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(yc.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(yc.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&dl(e,t),o=i&&pl(e,n,t,r);(a||o)&&(l={...l,...ol(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Bc(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Bc(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ml(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Dc(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=Jc())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Fc(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Zc.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ul(e,t){return Dc(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function dl(e,t){return ul(e,t)||e.state.data!==void 0&&fl(e,t,t.refetchOnMount)}function fl(e,t,n){if(Dc(t.enabled,e)!==!1&&Ec(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ml(e,t)}return!1}function pl(e,t,n,r){return(e!==t||Dc(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ml(e,n)}function ml(e,t){return Dc(t.enabled,e)!==!1&&e.isStaleByTime(Ec(t.staleTime,e))}function hl(e,t){return!Fc(e.getCurrentResult(),t)}function gl(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Kc(e,()=>t.signal,()=>n=!0)},u=Wc(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Hc:Vc;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?vl:_l,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:_l(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function _l(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function vl(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function yl(e,t){return t?_l(e,t)!=null:!1}function bl(e,t){return!t||!e.getPreviousPageParam?!1:vl(e,t)!=null}var xl=class extends ll{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:gl()})}getOptimisticResult(e){return e.behavior=gl(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:yl(t,n.data),hasPreviousPage:bl(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Sl=class extends il{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Cl(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=rl({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Zc.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Cl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var wl=class extends _c{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Sl({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Tl(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Tl(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Tl(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Tl(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Zc.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>kc(t,e))}findAll(e={}){return this.getAll().filter(t=>kc(e,t))}notify(e){Zc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Zc.batch(()=>Promise.all(e.map(e=>e.continue().catch(Sc))))}};function Tl(e){return e.options.scope?.id}var El=class extends _c{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Fc(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&jc(t.mutationKey)!==jc(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Cl();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Zc.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function Dl(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function Ol(e,t,n){let r=e.slice(0);return r[t]=n,r}var kl=class extends _c{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,Zc.batch(()=>{let e=this.#i,t=this.#f(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!Fc(e,n)});!o&&!s||(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(Dl(e,n).forEach(e=>{e.destroy()}),Dl(n,e).forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})),this.#m()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#f(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=Pc(this.#a,t(e))),this.#a}return e}#f(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new ll(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#p(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=Ol(this.#t,n,t),this.#m())}#m(){if(this.hasListeners()){let e=this.#a,t=this.#u(this.#t,this.#l);e!==this.#d(t,this.#r?.combine)&&Zc.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},Al=class extends _c{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Ac(r,t),a=this.get(i);return a||(a=new al({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Zc.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Oc(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Oc(e,t)):t}notify(e){Zc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Zc.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Zc.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},jl=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Al,this.#t=e.mutationCache||new wl,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=qc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Qc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ec(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Cc(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Zc.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Zc.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Zc.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Zc.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Sc).catch(Sc)}invalidateQueries(e,t={}){return Zc.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Zc.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Sc)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Sc)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Ec(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sc).catch(Sc)}fetchInfiniteQuery(e){return e.behavior=gl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sc).catch(Sc)}ensureInfiniteQueryData(e){return e.behavior=gl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(jc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Mc(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(jc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Mc(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ac(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Uc&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},M=o(),Ml=j.createContext(void 0),Nl=e=>{let t=j.useContext(Ml);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Pl=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,M.jsx)(Ml.Provider,{value:e,children:t})),Fl=j.createContext(!1),Il=()=>j.useContext(Fl);Fl.Provider;function Ll(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Rl=j.createContext(Ll()),zl=()=>j.useContext(Rl),Bl=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Gc(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Vl=e=>{j.useEffect(()=>{e.clearReset()},[e])},Hl=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Gc(n,[e.error,r])),Ul=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Wl=(e,t)=>e.isLoading&&e.isFetching&&!t,Gl=(e,t)=>e?.suspense&&t.isPending,Kl=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ql({queries:e,...t},n){let r=Nl(n),i=Il(),a=zl(),o=j.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{Ul(e),Bl(e,a,r.getQueryCache().get(e.queryHash))}),Vl(a);let[s]=j.useState(()=>new kl(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;j.useSyncExternalStore(j.useCallback(e=>d?s.subscribe(Zc.batchCalls(e)):Sc,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),j.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let f=c.some((e,t)=>Gl(o[t],e))?c.flatMap((e,t)=>{let n=o[t];return n&&Gl(n,e)?Kl(n,new ll(r,n),a):[]}):[];if(f.length>0)throw Promise.all(f);let p=c.find((e,t)=>{let n=o[t];return n&&Hl({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(p?.error)throw p.error;return l(u())}function Jl(e,t,n){let r=Il(),i=zl(),a=Nl(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,Ul(o),Bl(o,i,s),Vl(i);let c=!a.getQueryCache().get(o.queryHash),[l]=j.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(e=>{let t=d?l.subscribe(Zc.batchCalls(e)):Sc;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),j.useEffect(()=>{l.setOptions(o)},[o,l]),Gl(o,u))throw Kl(o,l,i);if(Hl({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!xc&&Wl(u,r)&&(c?Kl(o,l,i):s?.promise)?.catch(Sc).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function Yl(e,t){return Jl(e,ll,t)}function Xl(e){return e}function Zl(e){return e}function Ql(e,t){let n=Nl(t),[r]=j.useState(()=>new El(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);let i=j.useSyncExternalStore(j.useCallback(e=>r.subscribe(Zc.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=j.useCallback((e,t)=>{r.mutate(e,t).catch(Sc)},[r]);if(i.error&&Gc(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function $l(e,t){return Jl(e,xl,t)}function eu(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function tu(...e){return t=>{let n=!1,r=e.map(e=>{let r=eu(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():eu(e[t],null)}}}}function nu(...e){return j.useCallback(tu(...e),e)}var ru=Symbol.for(`react.lazy`),iu=j.use;function au(e){return typeof e==`object`&&!!e&&`then`in e}function ou(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ru&&`_payload`in e&&au(e._payload)}function su(e){let t=lu(e),n=j.forwardRef((e,n)=>{let{children:r,...i}=e;ou(r)&&typeof iu==`function`&&(r=iu(r._payload));let a=j.Children.toArray(r),o=a.find(pu);if(o){let e=o.props.children,r=a.map(t=>t===o?j.Children.count(e)>1?j.Children.only(null):j.isValidElement(e)?e.props.children:null:t);return(0,M.jsx)(t,{...i,ref:n,children:j.isValidElement(e)?j.cloneElement(e,void 0,r):null})}return(0,M.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var cu=su(`Slot`);function lu(e){let t=j.forwardRef((e,t)=>{let{children:n,...r}=e;if(ou(n)&&typeof iu==`function`&&(n=iu(n._payload)),j.isValidElement(n)){let e=hu(n),i=mu(r,n.props);return n.type!==j.Fragment&&(i.ref=t?tu(t,e):e),j.cloneElement(n,i)}return j.Children.count(n)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uu=Symbol(`radix.slottable`);function du(e){let t=({children:e})=>(0,M.jsx)(M.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=uu,t}var fu=du(`Slottable`);function pu(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===uu}function mu(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function hu(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function gu(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=gu(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function _u(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=gu(e))&&(r&&(r+=` `),r+=t);return r}var vu=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,yu=_u,bu=(e,t)=>n=>{if(t?.variants==null)return yu(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=vu(t)||vu(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return yu(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},xu=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Su=(e,t)=>({classGroupId:e,validator:t}),Cu=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),wu=`-`,Tu=[],Eu=`arbitrary..`,Du=e=>{let t=Au(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return ku(e);let n=e.split(wu);return Ou(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?xu(i,t):t:i||Tu}return n[e]||Tu}}},Ou=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ou(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(wu):e.slice(t).join(wu),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},ku=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Eu+r:void 0})(),Au=e=>{let{theme:t,classGroups:n}=e;return ju(n,t)},ju=(e,t)=>{let n=Cu();for(let r in e){let i=e[r];Mu(i,n,r,t)}return n},Mu=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Nu(i,t,n,r)}},Nu=(e,t,n,r)=>{if(typeof e==`string`){Pu(e,t,n);return}if(typeof e==`function`){Fu(e,t,n,r);return}Iu(e,t,n,r)},Pu=(e,t,n)=>{let r=e===``?t:Lu(t,e);r.classGroupId=n},Fu=(e,t,n,r)=>{if(Ru(e)){Mu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Su(n,e))},Iu=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Mu(o,Lu(t,a),n,r)}},Lu=(e,t)=>{let n=e,r=t.split(wu),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Cu(),n.nextPart.set(t,i)),n=i}return n},Ru=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,zu=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Bu=`!`,Vu=`:`,Hu=[],Uu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Wu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Vu){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Bu)?(c=s.slice(0,-1),l=!0):s.startsWith(Bu)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Uu(t,l,c,u)};if(t){let e=t+Vu,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Uu(Hu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Gu=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ku=e=>({cache:zu(e.cacheSize),parseClassName:Wu(e),sortModifiers:Gu(e),postfixLookupClassGroupIds:qu(e),...Du(e)}),qu=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Ju=/\s+/,Yu=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Ju),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Bu:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Xu=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Zu(n))&&(i&&(i+=` `),i+=r);return i},Zu=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Zu(e[r]))&&(n&&(n+=` `),n+=t);return n},Qu=(e,...t)=>{let n,r,i,a,o=o=>(n=Ku(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Yu(e,n);return i(e,a),a};return a=o,(...e)=>a(Xu(...e))},$u=[],ed=e=>{let t=t=>t[e]||$u;return t.isThemeGetter=!0,t},td=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nd=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rd=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,id=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ad=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,od=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,sd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ld=e=>rd.test(e),ud=e=>!!e&&!Number.isNaN(Number(e)),dd=e=>!!e&&Number.isInteger(Number(e)),fd=e=>e.endsWith(`%`)&&ud(e.slice(0,-1)),pd=e=>id.test(e),md=()=>!0,hd=e=>ad.test(e)&&!od.test(e),gd=()=>!1,_d=e=>sd.test(e),vd=e=>cd.test(e),yd=e=>!N(e)&&!P(e),bd=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),xd=e=>Id(e,Bd,gd),N=e=>td.test(e),Sd=e=>Id(e,Vd,hd),Cd=e=>Id(e,Hd,ud),wd=e=>Id(e,Wd,md),Td=e=>Id(e,Ud,gd),Ed=e=>Id(e,Rd,gd),Dd=e=>Id(e,zd,vd),Od=e=>Id(e,Gd,_d),P=e=>nd.test(e),kd=e=>Ld(e,Vd),Ad=e=>Ld(e,Ud),jd=e=>Ld(e,Rd),Md=e=>Ld(e,Bd),Nd=e=>Ld(e,zd),Pd=e=>Ld(e,Gd,!0),Fd=e=>Ld(e,Wd,!0),Id=(e,t,n)=>{let r=td.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ld=(e,t,n=!1)=>{let r=nd.exec(e);return r?r[1]?t(r[1]):n:!1},Rd=e=>e===`position`||e===`percentage`,zd=e=>e===`image`||e===`url`,Bd=e=>e===`length`||e===`size`||e===`bg-size`,Vd=e=>e===`length`,Hd=e=>e===`number`,Ud=e=>e===`family-name`,Wd=e=>e===`number`||e===`weight`,Gd=e=>e===`shadow`,Kd=()=>{let e=ed(`color`),t=ed(`font`),n=ed(`text`),r=ed(`font-weight`),i=ed(`tracking`),a=ed(`leading`),o=ed(`breakpoint`),s=ed(`container`),c=ed(`spacing`),l=ed(`radius`),u=ed(`shadow`),d=ed(`inset-shadow`),f=ed(`text-shadow`),p=ed(`drop-shadow`),m=ed(`blur`),h=ed(`perspective`),g=ed(`aspect`),_=ed(`ease`),v=ed(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),P,N],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[P,N,c],T=()=>[ld,`full`,`auto`,...w()],E=()=>[dd,`none`,`subgrid`,P,N],D=()=>[`auto`,{span:[`full`,dd,P,N]},dd,P,N],O=()=>[dd,`auto`,P,N],ee=()=>[`auto`,`min`,`max`,`fr`,P,N],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],re=()=>[ld,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ie=()=>[ld,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[ld,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,P,N],oe=()=>[...b(),jd,Ed,{position:[P,N]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,Md,xd,{size:[P,N]}],le=()=>[fd,kd,Sd],ue=()=>[``,`none`,`full`,l,P,N],de=()=>[``,ud,kd,Sd],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[ud,fd,jd,Ed],he=()=>[``,`none`,m,P,N],ge=()=>[`none`,ud,P,N],_e=()=>[`none`,ud,P,N],ve=()=>[ud,P,N],ye=()=>[ld,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[pd],breakpoint:[pd],color:[md],container:[pd],"drop-shadow":[pd],ease:[`in`,`out`,`in-out`],font:[yd],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[pd],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[pd],shadow:[pd],spacing:[`px`,ud],text:[pd],"text-shadow":[pd],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ld,N,P,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,P,N]}],"container-named":[bd],columns:[{columns:[ud,N,P,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[dd,`auto`,P,N]}],basis:[{basis:[ld,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ud,ld,`auto`,`initial`,`none`,N]}],grow:[{grow:[``,ud,P,N]}],shrink:[{shrink:[``,ud,P,N]}],order:[{order:[dd,`first`,`last`,`none`,P,N]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:re()}],"inline-size":[{inline:[`auto`,...ie()]}],"min-inline-size":[{"min-inline":[`auto`,...ie()]}],"max-inline-size":[{"max-inline":[`none`,...ie()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...re()]}],"min-w":[{"min-w":[s,`screen`,`none`,...re()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...re()]}],h:[{h:[`screen`,`lh`,...re()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...re()]}],"max-h":[{"max-h":[`screen`,`lh`,...re()]}],"font-size":[{text:[`base`,n,kd,Sd]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Fd,wd]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,fd,N]}],"font-family":[{font:[Ad,Td,t]}],"font-features":[{"font-features":[N]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,P,N]}],"line-clamp":[{"line-clamp":[ud,`none`,P,Cd]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,P,N]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,P,N]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[ud,`from-font`,`auto`,P,Sd]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[ud,`auto`,P,N]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[dd,P,N]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,P,N]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,P,N]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},dd,P,N],radial:[``,P,N],conic:[dd,P,N]},Nd,Dd]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ud,P,N]}],"outline-w":[{outline:[``,ud,kd,Sd]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,u,Pd,Od]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,Pd,Od]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[ud,Sd]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,Pd,Od]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[ud,P,N]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ud]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[P,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ud]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,P,N]}],filter:[{filter:[``,`none`,P,N]}],blur:[{blur:he()}],brightness:[{brightness:[ud,P,N]}],contrast:[{contrast:[ud,P,N]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Pd,Od]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,ud,P,N]}],"hue-rotate":[{"hue-rotate":[ud,P,N]}],invert:[{invert:[``,ud,P,N]}],saturate:[{saturate:[ud,P,N]}],sepia:[{sepia:[``,ud,P,N]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,P,N]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[ud,P,N]}],"backdrop-contrast":[{"backdrop-contrast":[ud,P,N]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ud,P,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ud,P,N]}],"backdrop-invert":[{"backdrop-invert":[``,ud,P,N]}],"backdrop-opacity":[{"backdrop-opacity":[ud,P,N]}],"backdrop-saturate":[{"backdrop-saturate":[ud,P,N]}],"backdrop-sepia":[{"backdrop-sepia":[``,ud,P,N]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,P,N]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ud,`initial`,P,N]}],ease:[{ease:[`linear`,`initial`,_,P,N]}],delay:[{delay:[ud,P,N]}],animate:[{animate:[`none`,v,P,N]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,P,N]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[P,N,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[dd,P,N]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,P,N]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,P,N]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[ud,kd,Sd,Cd]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},qd=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(Jd(e,`cacheSize`,t),Jd(e,`prefix`,n),Jd(e,`experimentalParseClassName`,r),Yd(e.theme,a.theme),Yd(e.classGroups,a.classGroups),Yd(e.conflictingClassGroups,a.conflictingClassGroups),Yd(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),Jd(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),Jd(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),Xd(e.theme,i.theme),Xd(e.classGroups,i.classGroups),Xd(e.conflictingClassGroups,i.conflictingClassGroups),Xd(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Zd(e,i,`postfixLookupClassGroups`),Zd(e,i,`orderSensitiveModifiers`),e),Jd=(e,t,n)=>{n!==void 0&&(e[t]=n)},Yd=(e,t)=>{if(t)for(let n in t)Jd(e,n,t[n])},Xd=(e,t)=>{if(t)for(let n in t)Zd(e,t,n)},Zd=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Qd=(e,...t)=>typeof e==`function`?Qu(Kd,e,...t):Qu(()=>qd(Kd(),e),...t);typeof window<`u`&&window.document&&window.document.createElement;function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function $d(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ef(...e){return t=>{let n=!1,r=e.map(e=>{let r=$d(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():$d(e[t],null)}}}}function tf(...e){return j.useCallback(ef(...e),e)}function nf(e,t=[]){let n=[];function r(t,r){let i=j.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=j.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=j.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>j.createContext(e));return function(n){let r=n?.[e]||t;return j.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,rf(i,...t)]}function rf(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var af=n(a(),1);function of(e){let t=j.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];mf(r)&&typeof vf==`function`&&(r=vf(r._payload)),j.Children.forEach(r,e=>{if(ff(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;mf(n)&&typeof vf==`function`&&(n=vf(n._payload)),a=lf(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=j.cloneElement(a,void 0,s):!o&&j.Children.count(r)===1&&j.isValidElement(r)&&(a=r);let c=a?df(a):void 0,l=tf(n,c);if(!a){if(r||r===0)throw Error(o?_f(e):gf(e));return r}let u=uf(i,a.props??{});return a.type!==j.Fragment&&(u.ref=n?l:c),j.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var sf=Symbol.for(`radix.slottable`);function cf(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=sf,t}var lf=(e,t)=>{if(`child`in e.props){let t=e.props.child;return j.isValidElement(t)?j.cloneElement(t,void 0,e.props.children(t.props.children)):null}return j.isValidElement(t)?t:null};function uf(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function df(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ff(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===sf}var pf=Symbol.for(`react.lazy`);function mf(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===pf&&`_payload`in e&&hf(e._payload)}function hf(e){return typeof e==`object`&&!!e&&`then`in e}var gf=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,_f=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,vf=j.use,yf=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=of(`Primitive.${t}`),r=j.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bf(e,t){e&&af.flushSync(()=>e.dispatchEvent(t))}function xf(e){let t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Sf=globalThis?.document?j.useLayoutEffect:()=>{},Cf=j.useEffectEvent,wf=j.useInsertionEffect;function Tf(e){if(typeof Cf==`function`)return Cf(e);let t=j.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof wf==`function`?wf(()=>{t.current=e}):Sf(()=>{t.current=e}),j.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Ef=`DismissableLayer`,Df=`dismissableLayer.update`,Of=`dismissableLayer.pointerDownOutside`,kf=`dismissableLayer.focusOutside`,Af,jf=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Mf=j.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=j.useContext(jf),[d,f]=j.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=j.useState({}),h=tf(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(_),y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=j.useRef(!1),C=If(e=>{let t=e.target;if(!(t instanceof Node))return;let n=[...u.branches].some(e=>e.contains(t));!x||n||(a?.(e),s?.(e),e.defaultPrevented||c?.())},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces}),w=Lf(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Tf(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return j.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T]),j.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Af=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Rf(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Af))}},[d,p,n,u]),j.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Rf())},[d,u]),j.useEffect(()=>{let e=()=>m({});return document.addEventListener(Df,e),()=>document.removeEventListener(Df,e)},[]),(0,M.jsx)(yf.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:F(e.onFocusCapture,w.onFocusCapture),onBlurCapture:F(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,C.onPointerDownCapture)})});Mf.displayName=Ef;var Nf=`DismissableLayerBranch`,Pf=j.forwardRef((e,t)=>{let n=j.useContext(jf),r=j.useRef(null),i=tf(t,r);return j.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,M.jsx)(yf.div,{...e,ref:i})});Pf.displayName=Nf;function Ff(){let e=j.useContext(jf),[t,n]=j.useState(null);return j.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function If(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a}=t,o=xf(e),s=j.useRef(!1),c=j.useRef(!1),l=j.useRef(new Map),u=j.useRef(()=>{});return j.useEffect(()=>{function e(){c.current=!1,i.current=!1,l.current.clear()}function t(){return Array.from(l.current.values()).some(Boolean)}function d(e){if(!c.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||l.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{c.current&&u.current()},0)}function f(e){c.current&&l.current.set(e.type,!1)}let p=a=>{if(a.target&&!s.current){let s=function(){n.removeEventListener(`click`,u.current);let r=t();e(),r||zf(Of,o,d,{discrete:!0})},d={originalEvent:a};c.current=!0,i.current=r&&a.button===0,l.current.clear(),!r||a.button!==0?s():(n.removeEventListener(`click`,u.current),u.current=s,n.addEventListener(`click`,u.current,{once:!0}))}else n.removeEventListener(`click`,u.current),e();s.current=!1},m=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of m)n.addEventListener(e,d,!0),n.addEventListener(e,f);let h=window.setTimeout(()=>{n.addEventListener(`pointerdown`,p)},0);return()=>{window.clearTimeout(h),n.removeEventListener(`pointerdown`,p),n.removeEventListener(`click`,u.current);for(let e of m)n.removeEventListener(e,d,!0),n.removeEventListener(e,f)}},[n,o,r,i,a]),{onPointerDownCapture:()=>s.current=!0}}function Lf(e,t=globalThis?.document){let n=xf(e),r=j.useRef(!1);return j.useEffect(()=>{let e=e=>{e.target&&!r.current&&zf(kf,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Rf(){let e=new CustomEvent(Df);document.dispatchEvent(e)}function zf(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?bf(i,a):i.dispatchEvent(a)}var Bf=j.useId||(()=>void 0),Vf=0;function Hf(e){let[t,n]=j.useState(Bf());return Sf(()=>{e||n(e=>e??String(Vf++))},[e]),e||(t?`radix-${t}`:``)}var Uf=[`top`,`right`,`bottom`,`left`],Wf=[`start`,`end`],Gf=Uf.reduce((e,t)=>e.concat(t,t+`-`+Wf[0],t+`-`+Wf[1]),[]),Kf=Math.min,qf=Math.max,Jf=Math.round,Yf=Math.floor,Xf=e=>({x:e,y:e}),Zf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Qf(e,t,n){return qf(e,Kf(t,n))}function $f(e,t){return typeof e==`function`?e(t):e}function ep(e){return e.split(`-`)[0]}function tp(e){return e.split(`-`)[1]}function np(e){return e===`x`?`y`:`x`}function rp(e){return e===`y`?`height`:`width`}function ip(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ap(e){return np(ip(e))}function op(e,t,n){n===void 0&&(n=!1);let r=tp(e),i=ap(e),a=rp(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=hp(o)),[o,hp(o)]}function sp(e){let t=hp(e);return[cp(e),t,cp(t)]}function cp(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var lp=[`left`,`right`],up=[`right`,`left`],dp=[`top`,`bottom`],fp=[`bottom`,`top`];function pp(e,t,n){switch(e){case`top`:case`bottom`:return n?t?up:lp:t?lp:up;case`left`:case`right`:return t?dp:fp;default:return[]}}function mp(e,t,n,r){let i=tp(e),a=pp(ep(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(cp)))),a}function hp(e){let t=ep(e);return Zf[t]+e.slice(t.length)}function gp(e){return{top:0,right:0,bottom:0,left:0,...e}}function _p(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:gp(e)}function vp(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function yp(e,t,n){let{reference:r,floating:i}=e,a=ip(t),o=ap(t),s=rp(o),c=ep(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(tp(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function bp(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=$f(t,e),p=_p(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=vp(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=vp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var xp=50,Sp=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:bp},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=yp(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<xp&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=yp(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Cp=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=$f(e,t)||{};if(l==null)return{};let d=_p(u),f={x:n,y:r},p=ap(i),m=rp(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Kf(d[_],T),D=Kf(d[v],T),O=E,ee=C-h[m]-D,te=C/2-h[m]/2+w,ne=Qf(O,te,ee),k=!c.arrow&&tp(i)!=null&&te!==ne&&a.reference[m]/2-(te<O?E:D)-h[m]/2<0,re=k?te<O?te-O:te-ee:0;return{[p]:f[p]+re,data:{[p]:ne,centerOffset:te-ne-re,...k&&{alignmentOffset:re}},reset:k}}});function wp(e,t,n){return(e?[...n.filter(t=>tp(t)===e),...n.filter(t=>tp(t)!==e)]:n.filter(e=>ep(e)===e)).filter(n=>e?tp(n)===e||(t?cp(n)!==n:!1):!0)}var Tp=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=Gf,autoAlignment:u=!0,...d}=$f(e,t),f=c!==void 0||l===Gf?wp(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=op(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[ep(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=tp(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,tp(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},Ep=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=$f(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ep(r),_=ip(o),v=ep(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[hp(o)]:sp(o)),x=p!==`none`;!d&&x&&b.push(...mp(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=op(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==ip(t))||T.every(e=>ip(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ip(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Dp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Op(e){return Uf.some(t=>e[t]>=0)}var kp=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=$f(e,t);switch(i){case`referenceHidden`:{let e=Dp(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Op(e)}}}case`escaped`:{let e=Dp(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Op(e)}}}default:return{}}}}};function Ap(e){let t=Kf(...e.map(e=>e.left)),n=Kf(...e.map(e=>e.top)),r=qf(...e.map(e=>e.right)),i=qf(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function jp(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>vp(Ap(e)))}var Mp=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=$f(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=jp(u),f=vp(Ap(u)),p=_p(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(ip(n)===`y`){let e=d[0],t=d[d.length-1],r=ep(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=ep(n)===`left`,t=qf(...d.map(e=>e.right)),r=Kf(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Np=new Set([`left`,`top`]);async function Pp(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ep(n),s=tp(n),c=ip(n)===`y`,l=Np.has(o)?-1:1,u=a&&c?-1:1,d=$f(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Fp=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Pp(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ip=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=$f(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ip(ep(i)),p=np(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Qf(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Qf(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Lp=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=$f(e,t),u={x:n,y:r},d=ip(i),f=np(d),p=u[f],m=u[d],h=$f(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Np.has(ep(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Rp=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=$f(e,t),u=await o.detectOverflow(t,l),d=ep(i),f=tp(i),p=ip(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Kf(h-u[g],v),x=Kf(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=qf(u.left,0),t=qf(u.right,0),n=qf(u.top,0),r=qf(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:qf(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:qf(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function zp(){return typeof window<`u`}function Bp(e){return Up(e)?(e.nodeName||``).toLowerCase():`#document`}function Vp(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hp(e){return((Up(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Up(e){return zp()?e instanceof Node||e instanceof Vp(e).Node:!1}function Wp(e){return zp()?e instanceof Element||e instanceof Vp(e).Element:!1}function Gp(e){return zp()?e instanceof HTMLElement||e instanceof Vp(e).HTMLElement:!1}function Kp(e){return!zp()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Vp(e).ShadowRoot}function qp(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=im(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Jp(e){return/^(table|td|th)$/.test(Bp(e))}function Yp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Xp=/transform|translate|scale|rotate|perspective|filter/,Zp=/paint|layout|strict|content/,Qp=e=>!!e&&e!==`none`,$p;function em(e){let t=Wp(e)?im(e):e;return Qp(t.transform)||Qp(t.translate)||Qp(t.scale)||Qp(t.rotate)||Qp(t.perspective)||!nm()&&(Qp(t.backdropFilter)||Qp(t.filter))||Xp.test(t.willChange||``)||Zp.test(t.contain||``)}function tm(e){let t=om(e);for(;Gp(t)&&!rm(t);){if(em(t))return t;if(Yp(t))return null;t=om(t)}return null}function nm(){return $p??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),$p}function rm(e){return/^(html|body|#document)$/.test(Bp(e))}function im(e){return Vp(e).getComputedStyle(e)}function am(e){return Wp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function om(e){if(Bp(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Kp(e)&&e.host||Hp(e);return Kp(t)?t.host:t}function sm(e){let t=om(e);return rm(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gp(t)&&qp(t)?t:sm(t)}function cm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=sm(e),i=r===e.ownerDocument?.body,a=Vp(r);if(i){let e=lm(a);return t.concat(a,a.visualViewport||[],qp(r)?r:[],e&&n?cm(e):[])}else return t.concat(r,cm(r,[],n))}function lm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function um(e){let t=im(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Gp(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Jf(n)!==a||Jf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function dm(e){return Wp(e)?e:e.contextElement}function fm(e){let t=dm(e);if(!Gp(t))return Xf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=um(t),o=(a?Jf(n.width):n.width)/r,s=(a?Jf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var pm=Xf(0);function mm(e){let t=Vp(e);return!nm()||!t.visualViewport?pm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Vp(e)?!1:t}function gm(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=dm(e),o=Xf(1);t&&(r?Wp(r)&&(o=fm(r)):o=fm(e));let s=hm(a,n,r)?mm(a):Xf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Vp(a),t=r&&Wp(r)?Vp(r):r,n=e,i=lm(n);for(;i&&r&&t!==n;){let e=fm(i),t=i.getBoundingClientRect(),r=im(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Vp(i),i=lm(n)}}return vp({width:u,height:d,x:c,y:l})}function _m(e,t){let n=am(e).scrollLeft;return t?t.left+n:gm(Hp(e)).left+n}function vm(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-_m(e,n),y:n.top+t.scrollTop}}function pte(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Hp(r),s=t?Yp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Xf(1),u=Xf(0),d=Gp(r);if((d||!d&&!a)&&((Bp(r)!==`body`||qp(o))&&(c=am(r)),d)){let e=gm(r);l=fm(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?vm(o,c):Xf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function mte(e){return Array.from(e.getClientRects())}function hte(e){let t=Hp(e),n=am(e),r=e.ownerDocument.body,i=qf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=qf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+_m(e),s=-n.scrollTop;return im(r).direction===`rtl`&&(o+=qf(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var ym=25;function gte(e,t){let n=Vp(e),r=Hp(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=nm();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=_m(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=ym&&(a-=o)}else l<=ym&&(a+=l);return{width:a,height:o,x:s,y:c}}function _te(e,t){let n=gm(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Gp(e)?fm(e):Xf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function bm(e,t,n){let r;if(t===`viewport`)r=gte(e,n);else if(t===`document`)r=hte(Hp(e));else if(Wp(t))r=_te(t,n);else{let n=mm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vp(r)}function xm(e,t){let n=om(e);return n===t||!Wp(n)||rm(n)?!1:im(n).position===`fixed`||xm(n,t)}function vte(e,t){let n=t.get(e);if(n)return n;let r=cm(e,[],!1).filter(e=>Wp(e)&&Bp(e)!==`body`),i=null,a=im(e).position===`fixed`,o=a?om(e):e;for(;Wp(o)&&!rm(o);){let t=im(o),n=em(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||qp(o)&&!n&&xm(e,o))?r=r.filter(e=>e!==o):i=t,o=om(o)}return t.set(e,r),r}function yte(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Yp(t)?[]:vte(t,this._c):[].concat(n),r],o=bm(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=bm(t,a[e],i);s=qf(n.top,s),c=Kf(n.right,c),l=Kf(n.bottom,l),u=qf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function bte(e){let{width:t,height:n}=um(e);return{width:t,height:n}}function xte(e,t,n){let r=Gp(t),i=Hp(t),a=n===`fixed`,o=gm(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Xf(0);function l(){c.x=_m(i)}if(r||!r&&!a)if((Bp(t)!==`body`||qp(i))&&(s=am(t)),r){let e=gm(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?vm(i,s):Xf(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Sm(e){return im(e).position===`static`}function Cm(e,t){if(!Gp(e)||im(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Hp(e)===n&&(n=n.ownerDocument.body),n}function wm(e,t){let n=Vp(e);if(Yp(e))return n;if(!Gp(e)){let t=om(e);for(;t&&!rm(t);){if(Wp(t)&&!Sm(t))return t;t=om(t)}return n}let r=Cm(e,t);for(;r&&Jp(r)&&Sm(r);)r=Cm(r,t);return r&&rm(r)&&Sm(r)&&!em(r)?n:r||tm(e)||n}var Ste=async function(e){let t=this.getOffsetParent||wm,n=this.getDimensions,r=await n(e.floating);return{reference:xte(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cte(e){return im(e).direction===`rtl`}var wte={convertOffsetParentRelativeRectToViewportRelativeRect:pte,getDocumentElement:Hp,getClippingRect:yte,getOffsetParent:wm,getElementRects:Ste,getClientRects:mte,getDimensions:bte,getScale:fm,isElement:Wp,isRTL:Cte};function Tm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Tte(e,t){let n=null,r,i=Hp(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Yf(d),h=Yf(i.clientWidth-(u+f)),g=Yf(i.clientHeight-(d+p)),_=Yf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:qf(0,Kf(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Tm(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Em(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=dm(e),u=i||a?[...l?cm(l):[],...t?cm(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Tte(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?gm(e):null;c&&g();function g(){let t=gm(e);h&&!Tm(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Dm=Fp,Ete=Tp,Om=Ip,km=Ep,Am=Rp,jm=kp,Mm=Cp,Dte=Mp,Ote=Lp,Nm=(e,t,n)=>{let r=new Map,i={platform:wte,...n},a={...i.platform,_c:r};return Sp(e,t,{...i,platform:a})},Pm=typeof document<`u`?j.useLayoutEffect:function(){};function Fm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Fm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Fm(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Im(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lm(e,t){let n=Im(e);return Math.round(t*n)/n}function Rm(e){let t=j.useRef(e);return Pm(()=>{t.current=e}),t}function zm(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=j.useState(r);Fm(f,r)||p(r);let[m,h]=j.useState(null),[g,_]=j.useState(null),v=j.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=j.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=j.useRef(null),C=j.useRef(null),w=j.useRef(u),T=c!=null,E=Rm(c),D=Rm(i),O=Rm(l),ee=j.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nm(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};te.current&&!Fm(w.current,t)&&(w.current=t,af.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Pm(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=j.useRef(!1);Pm(()=>(te.current=!0,()=>{te.current=!1}),[]),Pm(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,ee);ee()}},[b,x,ee,E,T]);let ne=j.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),k=j.useMemo(()=>({reference:b,floating:x}),[b,x]),re=j.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=Lm(k.floating,u.x),r=Lm(k.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Im(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,u.x,u.y]);return j.useMemo(()=>({...u,update:ee,refs:ne,elements:k,floatingStyles:re}),[u,ee,ne,k,re])}var kte=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Mm({element:r.current,padding:i}).fn(n):r?Mm({element:r,padding:i}).fn(n):{}}}},Bm=(e,t)=>{let n=Dm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vm=(e,t)=>{let n=Om(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hm=(e,t)=>({fn:Ote(e).fn,options:[e,t]}),Um=(e,t)=>{let n=km(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wm=(e,t)=>{let n=Am(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gm=(e,t)=>{let n=jm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Km=(e,t)=>{let n=kte(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ate=`Arrow`,qm=j.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,M.jsx)(yf.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,M.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});qm.displayName=Ate;var jte=qm;function Jm(e){let[t,n]=j.useState(void 0);return Sf(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Ym=`Popper`,[Xm,Zm]=nf(Ym),[Mte,Qm]=Xm(Ym),$m=e=>{let{__scopePopper:t,children:n}=e,[r,i]=j.useState(null),[a,o]=j.useState(void 0);return(0,M.jsx)(Mte,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};$m.displayName=Ym;var eh=`PopperAnchor`,th=j.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Qm(eh,n),o=j.useRef(null),s=a.onAnchorChange,c=tf(t,j.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=j.useRef(null);j.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&oh(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,M.jsx)(yf.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});th.displayName=eh;var nh=`PopperContent`,[Nte,Pte]=Xm(nh),rh=j.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Qm(nh,n),[_,v]=j.useState(null),y=tf(t,v),[b,x]=j.useState(null),S=Jm(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,ee={padding:E,boundary:D.filter(Ite),altBoundary:O},{refs:te,floatingStyles:ne,placement:k,isPositioned:re,middlewareData:ie}=zm({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>Em(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Bm({mainAxis:i+w,alignmentAxis:o}),c&&Vm({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Hm():void 0,...ee}),c&&Um({...ee}),Wm({...ee,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Km({element:b,padding:s}),Lte({arrowWidth:C,arrowHeight:w}),f&&Gm({strategy:`referenceHidden`,...ee,boundary:O?ee.boundary:void 0})]}),ae=g.setPlacementState;Sf(()=>(ae(k),()=>{ae(void 0)}),[k,ae]);let[A,oe]=oh(k),se=xf(m);Sf(()=>{re&&se?.()},[re,se]);let ce=ie.arrow?.x,le=ie.arrow?.y,ue=ie.arrow?.centerOffset!==0,[de,fe]=j.useState();return Sf(()=>{_&&fe(window.getComputedStyle(_).zIndex)},[_]),(0,M.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:re?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,M.jsx)(Nte,{scope:n,placedSide:A,placedAlign:oe,onArrowChange:x,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,M.jsx)(yf.div,{"data-side":A,"data-align":oe,...h,ref:y,style:{...h.style,animation:re?void 0:`none`}})})})});rh.displayName=nh;var ih=`PopperArrow`,Fte={top:`bottom`,right:`left`,bottom:`top`,left:`right`},ah=j.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Pte(ih,n),a=Fte[i.placedSide];return(0,M.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,M.jsx)(jte,{...r,ref:t,style:{...r.style,display:`block`}})})});ah.displayName=ih;function Ite(e){return e!==null}var Lte=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=oh(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function oh(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var sh=$m,ch=th,lh=rh,uh=ah,Rte=`Portal`,dh=j.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=j.useState(!1);Sf(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?af.createPortal((0,M.jsx)(yf.div,{...r,ref:t}),o):null});dh.displayName=Rte;function zte(e,t){return j.useReducer((e,n)=>t[e][n]??e,e)}var fh=e=>{let{present:t,children:n}=e,r=Bte(t),i=typeof n==`function`?n({present:r.isPresent}):j.Children.only(n),a=Vte(r.ref,Hte(i));return typeof n==`function`||r.isPresent?j.cloneElement(i,{ref:a}):null};fh.displayName=`Presence`;function Bte(e){let[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef(`none`),[o,s]=zte(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return j.useEffect(()=>{let e=mh(r.current);a.current=o===`mounted`?e:`none`},[o]),Sf(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=mh(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Sf(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=mh(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=mh(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:j.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function ph(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Vte(...e){let t=j.useRef(e);return t.current=e,j.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=ph(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():ph(n[e],null)}}},[])}function mh(e){return e?.animationName||`none`}function Hte(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ute=j.useInsertionEffect||Sf;function hh({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Wte({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=j.useRef(e!==void 0);j.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,j.useCallback(t=>{if(s){let n=Gte(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Wte({defaultProp:e,onChange:t}){let[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return Ute(()=>{a.current=t},[t]),j.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Gte(e){return typeof e==`function`}var Kte=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),qte=`VisuallyHidden`,gh=j.forwardRef((e,t)=>(0,M.jsx)(yf.span,{...e,ref:t,style:{...Kte,...e.style}}));gh.displayName=qte;var Jte=gh,[_h,Yte]=nf(`Tooltip`,[Zm]),vh=Zm(),yh=`TooltipProvider`,Xte=700,bh=`tooltip.open`,[Zte,xh]=_h(yh),Sh=e=>{let{__scopeTooltip:t,delayDuration:n=Xte,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=j.useRef(!0),s=j.useRef(!1),c=j.useRef(0);return j.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,M.jsx)(Zte,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:j.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:j.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:j.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Sh.displayName=yh;var Ch=`Tooltip`,[Qte,wh]=_h(Ch),Th=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=xh(Ch,e.__scopeTooltip),l=vh(t),[u,d]=j.useState(null),f=Hf(),p=j.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=j.useRef(!1),[_,v]=hh({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(bh))):c.onClose(),a?.(e)},caller:Ch}),y=j.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=j.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=j.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=j.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return j.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,M.jsx)(sh,{...l,children:(0,M.jsx)(Qte,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:j.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:j.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};Th.displayName=Ch;var Eh=`TooltipTrigger`,Dh=j.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=wh(Eh,n),a=xh(Eh,n),o=vh(n),s=tf(t,j.useRef(null),i.onTriggerChange),c=j.useRef(!1),l=j.useRef(!1),u=j.useCallback(()=>c.current=!1,[]);return j.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,M.jsx)(ch,{asChild:!0,...o,children:(0,M.jsx)(yf.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:F(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:F(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:F(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:F(e.onBlur,i.onClose),onClick:F(e.onClick,i.onClose)})})});Dh.displayName=Eh;var Oh=`TooltipPortal`,[$te,ene]=_h(Oh,{forceMount:void 0}),kh=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=wh(Oh,t);return(0,M.jsx)($te,{scope:t,forceMount:n,children:(0,M.jsx)(fh,{present:n||a.open,children:(0,M.jsx)(dh,{asChild:!0,container:i,children:r})})})};kh.displayName=Oh;var Ah=`TooltipContent`,jh=j.forwardRef((e,t)=>{let n=ene(Ah,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=wh(Ah,e.__scopeTooltip);return(0,M.jsx)(fh,{present:r||o.open,children:o.disableHoverableContent?(0,M.jsx)(Mh,{side:i,...a,ref:t}):(0,M.jsx)(tne,{side:i,...a,ref:t})})}),tne=j.forwardRef((e,t)=>{let n=wh(Ah,e.__scopeTooltip),r=xh(Ah,e.__scopeTooltip),i=j.useRef(null),a=tf(t,i),[o,s]=j.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=j.useCallback(()=>{s(null),d(!1)},[d]),p=j.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=sne(r,one(r,n.getBoundingClientRect())),a=cne(t.getBoundingClientRect());s(une([...i,...a])),d(!0)},[d]);return j.useEffect(()=>()=>f(),[f]),j.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),j.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!lne(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,M.jsx)(Mh,{...e,ref:a})}),[nne,rne]=_h(Ch,{isInside:!1}),ine=cf(`TooltipContent`),Mh=j.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=wh(Ah,n),l=vh(n),{onClose:u}=c;return j.useEffect(()=>(document.addEventListener(bh,u),()=>document.removeEventListener(bh,u)),[u]),j.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,M.jsx)(Mf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,M.jsxs)(lh,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,M.jsx)(ine,{children:r}),(0,M.jsx)(nne,{scope:n,isInside:!0,children:(0,M.jsx)(Jte,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});jh.displayName=Ah;var Nh=`TooltipArrow`,ane=j.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=vh(n);return rne(Nh,n).isInside?null:(0,M.jsx)(uh,{...i,...r,ref:t})});ane.displayName=Nh;function one(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function sne(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function cne(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function lne(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function une(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),dne(t)}function dne(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var fne=Sh,pne=Th,mne=Dh,hne=kh,gne=jh,Ph=0,Fh=null;function Ih(){j.useEffect(()=>{Fh||={start:Lh(),end:Lh()};let{start:e,end:t}=Fh;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ph++,()=>{Ph===1&&(Fh?.start.remove(),Fh?.end.remove(),Fh=null),Ph=Math.max(0,Ph-1)}},[])}function Lh(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Rh=`focusScope.autoFocusOnMount`,zh=`focusScope.autoFocusOnUnmount`,Bh={bubbles:!1,cancelable:!0},_ne=`FocusScope`,Vh=j.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=j.useState(null),l=xf(i),u=xf(a),d=j.useRef(null),f=tf(t,c),p=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Wh(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Wh(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Wh(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),j.useEffect(()=>{if(s){Gh.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Rh,Bh);s.addEventListener(Rh,l),s.dispatchEvent(t),t.defaultPrevented||(vne(Jh(Hh(s)),{select:!0}),document.activeElement===e&&Wh(s))}return()=>{s.removeEventListener(Rh,l),setTimeout(()=>{let t=new CustomEvent(zh,Bh);s.addEventListener(zh,u),s.dispatchEvent(t),t.defaultPrevented||Wh(e??document.body,{select:!0}),s.removeEventListener(zh,u),Gh.remove(p)},0)}}},[s,l,u,p]);let m=j.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=yne(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Wh(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Wh(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,M.jsx)(yf.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Vh.displayName=_ne;function vne(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Wh(r,{select:t}),document.activeElement!==n)return}function yne(e){let t=Hh(e);return[Uh(t,e),Uh(t.reverse(),e)]}function Hh(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Uh(e,t){for(let n of e)if(!bne(n,{upTo:t}))return n}function bne(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function xne(e){return e instanceof HTMLInputElement&&`select`in e}function Wh(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xne(e)&&t&&e.select()}}var Gh=Kh();function Kh(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=qh(e,t),e.unshift(t)},remove(t){e=qh(e,t),e[0]?.resume()}}}function qh(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Jh(e){return e.filter(e=>e.tagName!==`A`)}var Yh=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Xh=new WeakMap,Zh=new WeakMap,Qh={},$h=0,eg=function(e){return e&&(e.host||eg(e.parentNode))},tg=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=eg(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Sne=function(e,t,n,r){var i=tg(t,Array.isArray(e)?e:[e]);Qh[n]||(Qh[n]=new WeakMap);var a=Qh[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Xh.get(e)||0)+1,l=(a.get(e)||0)+1;Xh.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Zh.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),$h++,function(){o.forEach(function(e){var t=Xh.get(e)-1,i=a.get(e)-1;Xh.set(e,t),a.set(e,i),t||(Zh.has(e)||e.removeAttribute(r),Zh.delete(e)),i||e.removeAttribute(n)}),$h--,$h||(Xh=new WeakMap,Xh=new WeakMap,Zh=new WeakMap,Qh={})}},ng=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Yh(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Sne(r,i,n,`aria-hidden`)):function(){return null}},rg=function(){return rg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},rg.apply(this,arguments)};function ig(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ag(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var og=`right-scroll-bar-position`,sg=`width-before-scroll-bar`,cg=`with-scroll-bars-hidden`,lg=`--removed-body-scroll-bar-size`;function ug(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function dg(e,t){var n=(0,j.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var fg=typeof window<`u`?j.useLayoutEffect:j.useEffect,pg=new WeakMap;function mg(e,t){var n=dg(t||null,function(t){return e.forEach(function(e){return ug(e,t)})});return fg(function(){var t=pg.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||ug(e,null)}),i.forEach(function(e){r.has(e)||ug(e,a)})}pg.set(n,e)},[e]),n}function hg(e){return e}function gg(e,t){t===void 0&&(t=hg);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function _g(e){e===void 0&&(e={});var t=gg(null);return t.options=rg({async:!0,ssr:!1},e),t}var vg=function(e){var t=e.sideCar,n=ig(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return j.createElement(r,rg({},n))};vg.isSideCarExport=!0;function yg(e,t){return e.useMedium(t),vg}var bg=_g(),xg=function(){},Sg=j.forwardRef(function(e,t){var n=j.useRef(null),r=j.useState({onScrollCapture:xg,onWheelCapture:xg,onTouchMoveCapture:xg}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=ig(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=mg([n,t]),C=rg(rg({},b),i);return j.createElement(j.Fragment,null,u&&j.createElement(x,{sideCar:bg,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?j.cloneElement(j.Children.only(s),rg(rg({},C),{ref:S})):j.createElement(v,rg({},C,{className:c,ref:S}),s))});Sg.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Sg.classNames={fullWidth:sg,zeroRight:og};var Cg,wg=function(){if(Cg)return Cg;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Tg(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=wg();return t&&e.setAttribute(`nonce`,t),e}function Cne(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wne(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Tne=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Tg())&&(Cne(t,n),wne(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ene=function(){var e=Tne();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Eg=function(){var e=Ene();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Dne={left:0,top:0,right:0,gap:0},Dg=function(e){return parseInt(e||``,10)||0},Og=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Dg(n),Dg(r),Dg(i)]},kg=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Dne;var t=Og(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ag=Eg(),jg=`data-scroll-locked`,Mg=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
5
- .${cg} {
4
+ `)}`)}function Rr(e){if(!l)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=Nn(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${Wn(e)===e?`root `:``}span "${t}" with ID ${r}`;D.log(i)}function zr(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[ree],i=n[en];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function Br(e){return e.getOptions().traceLifecycle===`stream`}var Vr=1e3,Hr=class{constructor(e={}){this._traceId=e.traceId||St(),this._spanId=e.spanId||Ct(),this._startTime=e.startTimestamp||_t(),this._links=e.links,this._attributes={},this.setAttributes({[$t]:`manual`,[Qt]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=jn(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Xt,`custom`),this}end(e){this._endTime||(this._endTime=jn(e),Rr(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Qt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Rn(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[$t],profile_id:this._attributes[nn],exclusive_time:this._attributes[rn],measurements:zr(this._events),is_segment:this._isStandaloneSpan&&Wn(this)===this||void 0,segment_id:this._isStandaloneSpan?Wn(this).spanContext().spanId:void 0,links:kn(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===Wn(this),status:zn(this._status),attributes:this._attributes,links:An(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){l&&D.log(`[Tracing] Adding an event to span:`,e);let r=Ur(t)?t:n||_t(),i=Ur(t)?{}:t||{},a={name:e,time:jn(r),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=Jt();if(e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this)),!(this._isStandaloneSpan||this===Wn(this)))return;if(this._isStandaloneSpan){this._sampled?Kr(Ir([this],e)):(l&&D.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}else if(e&&Br(e)){e.emit(`afterSegmentSpanEnd`,this);return}let t=this._convertSpanToTransaction();t&&(dn(this).scope||Wt()).captureEvent(t)}_convertSpanToTransaction(){if(!Wr(Nn(this)))return;this._name||=(l&&D.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:e,isolationScope:t}=dn(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let r=Un(this).filter(e=>e!==this&&!Gr(e)).map(e=>Nn(e)).filter(Wr),i=this._attributes[Xt];delete this._attributes[tn],r.forEach(e=>{delete e.data[tn]});let a={contexts:{trace:Dn(this)},spans:r.length>Vr?r.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Vr):r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:ir(this)},request:n,...i&&{transaction_info:{source:i}}},o=zr(this._events);return o&&Object.keys(o).length&&(l&&D.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(o,void 0,2)),a.measurements=o),a}};function Ur(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function Wr(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Gr(e){return e instanceof Hr&&e.isStandaloneSpan()}function Kr(e){let t=Jt();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function qr(e,t,n){if(!qn(e))return[!1];let r,i;typeof e.tracesSampler==`function`?(i=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),r=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(i=e.tracesSampleRate,r=!0):i=t.parentSampled;let a=Tn(i);if(a===void 0)return l&&D.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!a)return l&&D.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,a,r];let o=n<a;return o||l&&D.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[o,a,r]}var Jr=`__SENTRY_SUPPRESS_TRACING__`;function Yr(e){let t=$r();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=Qr(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>qt(e.scope,t):i===void 0?e=>e():e=>Xr(i,e))(()=>{let t=Wt(),a=ni(t,i),o=Jt();return e.onlyIfParent&&!a?(o?.recordDroppedEvent(`no_parent_span`,`span`),new ar):Zr({parentSpan:a,spanArguments:n,forceTransaction:r,scope:t})})}function Xr(e,t){let n=$r();return n.withActiveSpan?n.withActiveSpan(e,t):qt(n=>(Tt(n,e||void 0),t(n)))}function Zr({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!qn()){let r=new ar;return(n||!e)&&tr(r,{sampled:`false`,sample_rate:`0`,transaction:t.name,...ir(r)}),r}let i=Jt();if(ri(i,t))return ii(r)||i?.recordDroppedEvent(`ignored`,`span`),new ar({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});let a=Gt(),o;if(e&&!n)o=ti(e,r,t),Hn(e,o);else if(e){let n=ir(e),{traceId:i,spanId:a}=e.spanContext(),s=Ln(e);o=ei({traceId:i,parentSpanId:a,...t},r,s),tr(o,n)}else{let{traceId:e,dsc:n,parentSpanId:i,sampled:s}={...a.getPropagationContext(),...r.getPropagationContext()};o=ei({traceId:e,parentSpanId:i,...t},r,s),n&&tr(o,n)}return Lr(o),un(o,r,a),o}function Qr(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=jn(e.startTime),delete n.startTime,n}return t}function $r(){return Vt(f())}function ei(e,t,n){let r=Jt(),i=r?.getOptions()||{},{name:a=``}=e,o={spanAttributes:{...e.attributes},spanName:a,parentSampled:n};r?.emit(`beforeSampling`,o,{decision:!1});let s=o.parentSampled??n,c=o.spanAttributes,u=t.getPropagationContext(),d=ii(t),[f,p,m]=d?[!1]:qr(i,{name:a,parentSampled:s,attributes:c,parentSampleRate:Tn(u.dsc?.sample_rate)},u.sampleRand),h=new Hr({...e,attributes:{[Xt]:`custom`,[Zt]:p!==void 0&&m?p:void 0,...c},sampled:f});return!f&&r&&!d&&(l&&D.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),r.recordDroppedEvent(`sample_rate`,Br(r)?`span`:`transaction`)),r&&r.emit(`spanStart`,h),h}function ti(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),a=ii(t),o=a?!1:Ln(e),s=o?new Hr({...n,parentSpanId:r,traceId:i,sampled:o}):new ar({traceId:i});Hn(e,s);let c=Jt();return c?(Br(c)&&s instanceof ar&&(e instanceof ar&&e.dropReason?(s.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,`span`)):a||(s.dropReason=`sample_rate`,c.recordDroppedEvent(`sample_rate`,`span`))),c.emit(`spanStart`,s),n.endTimestamp&&(c.emit(`spanEnd`,s),c.emit(`afterSpanEnd`,s)),s):s}function ni(e,t){if(t)return t;if(t===null)return;let n=Et(e);if(!n)return;let r=Jt();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Wn(n):n}function ri(e,t){let n=e?.getOptions().ignoreSpans;return!e||!Br(e)||!n?.length?!1:Yn({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function ii(e){return e.getScopeData().sdkProcessingMetadata[Jr]===!0}function ai(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;li(e,t),r&&fi(e,r),pi(e,n),ui(e,i),di(e,a)}function oi(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;si(e,`extra`,n),si(e,`tags`,r),si(e,`attributes`,i),si(e,`user`,a),si(e,`contexts`,o),e.sdkProcessingMetadata=xt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function si(e,t,n){e[t]=xt(e[t],n,1)}function ci(e,t){let n=Kt().getScopeData();return e&&oi(n,e.getScopeData()),t&&oi(n,t.getScopeData()),n}function li(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function ui(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function di(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function fi(e,t){e.contexts={trace:On(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ir(t),...e.sdkProcessingMetadata};let n=Nn(Wn(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function pi(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function mi(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function hi(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function gi(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}var _i=0,vi=1,yi=2;function bi(e){return new Si(t=>{t(e)})}function xi(e){return new Si((t,n)=>{n(e)})}var Si=class e{constructor(e){this._state=_i,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===_i)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===vi&&e[1](this._value),this._state===yi&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===_i){if(Me(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(vi,e)},r=e=>{t(yi,e)};try{e(n,r)}catch(e){r(e)}}};function Ci(e,t,n,r=0){try{let i=wi(t,n,e,r);return Me(i)?i:bi(i)}catch(e){return xi(e)}}function wi(e,t,n,r){let i=n[r];if(!e||!i)return e;let a=i({...e},t);return l&&a===null&&D.log(`Event processor "${i.id||`?`}" dropped event`),Me(a)?a.then(e=>wi(e,t,n,r+1)):wi(a,t,n,r+1)}var Ti,Ei,Di,Oi;function iee(e){let t=u._sentryDebugIds,n=u._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(Oi&&r.length===Ei&&i.length===Di)return Oi;Ei=r.length,Di=i.length,Oi={},Ti||={};let a=(t,n)=>{for(let r of t){let t=n[r],i=Ti?.[r];if(i&&Oi&&t)Oi[i[0]]=t,Ti&&(Ti[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&Oi&&Ti){Oi[i]=t,Ti[r]=[i,t];break}}}}};return t&&a(r,t),n&&a(i,n),Oi}function aee(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||st(),timestamp:t.timestamp||ht()},l=n.integrations||e.integrations.map(e=>e.name);oee(c,e),lee(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&see(c,e.stackParser);let u=dee(r,n.captureContext);n.mechanism&&dt(c,n.mechanism);let d=i?i.getEventProcessors():[],f=ci(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),ai(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?bi(c):Ci(m,c,n)).then(e=>(e&&cee(e),typeof o==`number`&&o>0?uee(e,o,s):e))}function oee(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=et(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=et(e.value,a)})}function see(e,t){let n=iee(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function cee(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function lee(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function uee(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:dr(e.data,t,n)}}))},...e.user&&{user:dr(e.user,t,n)},...e.contexts&&{contexts:dr(e.contexts,t,n)},...e.extra&&{extra:dr(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=dr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:dr(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=dr(e.contexts.flags,3,n)),r}function dee(e,t){if(!t)return e;let n=e?e.clone():new Ot;return n.update(t),n}function fee(e){if(e)return pee(e)||hee(e)?{captureContext:e}:e}function pee(e){return e instanceof Ot||typeof e==`function`}var mee=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function hee(e){return Object.keys(e).some(e=>mee.includes(e))}function ki(e,t){return Wt().captureException(e,fee(t))}function gee(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return Wt().captureMessage(e,n,r)}function Ai(e,t){return Wt().captureEvent(e,t)}function _ee(e,t){Gt().setContext(e,t)}function vee(e){Gt().setUser(e)}function yee(){return Gt().lastEventId()}function ji(e){let t=Gt(),{user:n}=ci(t,Wt()),{userAgent:r}=u.navigator||{},i=nee({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return a?.status===`ok`&&vt(a,{status:`exited`}),Mi(),t.setSession(i),i}function Mi(){let e=Gt(),t=Wt().getSession()||e.getSession();t&&yt(t),Ni(),e.setSession()}function Ni(){let e=Gt(),t=Jt(),n=e.getSession();n&&t&&t.captureSession(n)}function Pi(e=!1){if(e){Mi();return}Ni()}function Fi(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function bee(e){return`${Fi(e)}${e.projectId}/envelope/`}function xee(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function See(e,t,n){return t||`${bee(e)}?${xee(e,n)}`}function Cee(e,t){let n=wn(e);if(!n)return``;let r=`${Fi(n)}embed/error-page/`,i=`dsn=${vn(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`)if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${i}`}var Ii=[];function wee(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Tee(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return wee(r)}function Li(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&zi(e,t,n)}),n}function Ri(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function zi(e,t,n){if(n[t.name]){l&&D.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Ii.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),Ii.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),l&&D.log(`Integration installed: ${t.name}`)}function Bi(e){return e}function Vi(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Hi(){return`npm`}function Ui(){return!Vi()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Wi(){return typeof window<`u`&&(!Ui()||Gi())}function Gi(){return u.process?.type===`renderer`}function Ki(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Wi()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function qi(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=vn(r)),yr(a,[Ki(e,i)])}function Ji(e,t){let n=t??Yi(e)??[];if(n.length===0)return;let r=e.getOptions(),i=qi(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);Xi().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Yi(e){return Xi().get(e)}function Xi(){return m(`clientToLogBufferMap`,()=>new WeakMap)}function Zi(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Wi()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Qi(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=vn(r)),yr(a,[Zi(e,i)])}function $i(e,t){let n=t??ea(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Qi(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);ta().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function ea(e){return ta().get(e)}function ta(){return m(`clientToMetricBufferMap`,()=>new WeakMap)}function na(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}var ra=Symbol.for(`SentryBufferFullError`);function ia(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return xi(ra);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return bi(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>na(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var aa=60*1e3;function oa(e,t=$e()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?aa:r-t}function sa(e,t){return e[t]||e.all||0}function ca(e,t,n=$e()){return sa(e,t)>n}function la(e,{statusCode:t,headers:n},r=$e()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+oa(o,r):t===429&&(i.all=r+60*1e3);return i}function ua(e,t,n=ia(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(xr(i,(t,n)=>{let i=Ar(n);ca(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=yr(i[0],a),s=t=>{if(Sr(o,[`client_report`])){l&&D.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}xr(o,(n,r)=>{e.recordDroppedEvent(t,Ar(r))})};return n.add(()=>t({body:wr(o)}).then(e=>e.statusCode===413?(l&&D.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),s(`send_error`),e):(l&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&D.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=la(r,e),e),e=>{throw s(`network_error`),l&&D.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===ra)return l&&D.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function da(e,t,n){let r=[{type:`client_report`},{timestamp:n||ht(),discarded_events:e}];return yr(t?{dsn:t}:{},[r])}function fa(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function pa(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[nn],exclusive_time:o?.[rn],measurements:e.measurements,is_segment:!0}}function ma(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var ha=`Not capturing exception because it's already been captured.`,ga=`Discarded session because of missing or non-string release`,_a=Symbol.for(`SentryInternalError`),va=Symbol.for(`SentryDoNotSendEventError`),Eee=5e3;function ya(e){return{message:e,[_a]:!0}}function ba(e){return{message:e,[va]:!0}}function xa(e){return!!e&&typeof e==`object`&&_a in e}function Sa(e){return!!e&&typeof e==`object`&&va in e}function Ca(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{a+=r(t),a>=8e5?i(e):s||(s=!0,o=na(setTimeout(()=>{i(e)},Eee)))}),e.on(`flush`,()=>{i(e)})}var Dee=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ia(e.transportOptions?.bufferSize??64),e.dsn?this._dsn=wn(e.dsn):l&&D.warn(`No DSN provided, client will not send events.`),this._dsn){let t=See(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Ca(this,`afterCaptureLog`,`flushLogs`,Aa,Ji),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Ca(this,`afterCaptureMetric`,`flushMetrics`,ka,$i)}captureException(e,t,n){let r=st();if(ft(e))return l&&D.log(ha),r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),`error`),i.event_id}captureMessage(e,t,n,r){let i={event_id:st(),...n},a=Ee(e)?e:String(e),o=De(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=st();if(t?.originalException&&ft(t.originalException))return l&&D.log(ha),r;let i={event_id:r,...t},a=e.sdkProcessingMetadata||{},o=a.capturedSpanScope,s=a.capturedSpanIsolationScope,c=wa(e.type);return this._process(()=>this._captureEvent(e,i,o||n,s),c),i.event_id}captureSession(e){this.sendSession(e),vt(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Ji(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),zi(this,e,this._integrations),t||Ri(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Fr(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=br(n,Dr(e));this.sendEnvelope(n).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=$n}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t){l&&D.warn(ga);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){l&&D.warn(ga);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=Pr(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;l&&D.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:``}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return l&&D.error(`Error while sending envelope:`,e),{}}return l&&D.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Li(this,e),Ri(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(vt(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a?.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),aee(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...Yt(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:rr(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=Wt(),r=Gt()){return l&&Da(e)&&D.log(`Captured error event \`${fa(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{l&&(Sa(e)?D.log(e.message):xa(e)?D.warn(e.message):D.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Oa(e),s=Da(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:Tn(a);if(s&&typeof l==`number`&&Qe()>l)return this.recordDroppedEvent(`sample_rate`,`error`),xi(ba(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=wa(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),ba("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Ta(Ea(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw ba(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw Sa(e)||xa(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),ya(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===ra&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){l&&D.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){l&&D.log(`No outcomes to send`);return}if(!this._dsn){l&&D.log(`No dsn provided, will not send outcomes`);return}l&&D.log(`Sending outcomes:`,e);let t=da(e,this._options.tunnel&&vn(this._dsn));this.sendEnvelope(t)}};function wa(e){return e===`replay_event`?`replay`:e||`error`}function Ta(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Me(e))return e.then(e=>{if(!Oe(e)&&e!==null)throw ya(n);return e},e=>{throw ya(`${t} rejected with ${e}`)});if(!Oe(e)&&e!==null)throw ya(n);return e}function Ea(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!or(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Da(c)&&i)return i(c,r);if(Oa(c)){if(s||o){let t=pa(c);if(o?.length&&Yn({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=xt(n,ma(e)):Kn()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&Yn({description:e.description,op:e.op,attributes:e.data},o)){Zn(n,e);continue}if(s){let n=s(e);n?t.push(n):(Kn(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function Da(e){return e.type===void 0}function Oa(e){return e.type===`transaction`}function ka(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+ja(e.attributes)}function Aa(e){let t=0;return e.message&&(t+=e.message.length*2),t+ja(e.attributes)}function ja(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Ma(e[0]):De(e)?t+=Ma(e):t+=100}),t}function Ma(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Na(e,t){return e(t.stack||``,1)}function Pa(e){return be(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Fa(e){return Pa(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Ia(e,t){let n={type:t.name||t.constructor.name,value:Fa(t)},r=Na(e,t);return r.length&&(n.stacktrace={frames:r}),n}function La(e,t){t.debug===!0&&(l?D.enable():v(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Wt().update(t.initialScope);let n=new e(t);return Ra(n),n.init(),n}function Ra(e){Wt().setClient(e)}function za(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function Ba(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:d})),i.version=d)}var Va=100;function Ha(e,t){let n=Jt(),r=Gt();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Va}=n.getOptions();if(a<=0)return;let o={timestamp:ht(),...e},s=i?v(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var Ua,Oee=`FunctionToString`,Wa=new WeakMap,Ga=Bi((()=>({name:Oee,setupOnce(){Ua=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Ke(this),n=Wa.has(Jt())&&t!==void 0?t:this;return Ua.apply(n,e)}}catch{}},setup(e){Wa.set(e,!0)}}))),kee=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],Aee=`EventFilters`,Ka=Bi((e={})=>{let t;return{name:Aee,setup(n){t=qa(e,n.getOptions())},processEvent(n,r,i){return t||=qa(e,i.getOptions()),Mee(n,t)?null:n}}}),jee=Bi(((e={})=>({...Ka(e),name:`InboundFilters`})));function qa(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:kee],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Mee(e,t){if(!e.type){if(Nee(e,t.ignoreErrors))return l&&D.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${lt(e)}`),!0;if(Ya(e))return l&&D.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${lt(e)}`),!0;if(Fee(e,t.denyUrls))return l&&D.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${lt(e)}.\nUrl: ${Ja(e)}`),!0;if(!Iee(e,t.allowUrls))return l&&D.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${lt(e)}.\nUrl: ${Ja(e)}`),!0}else if(e.type===`transaction`&&Pee(e,t.ignoreTransactions))return l&&D.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${lt(e)}`),!0;return!1}function Nee(e,t){return t?.length?fa(e).some(e=>rt(e,t)):!1}function Pee(e,t){if(!t?.length)return!1;let n=e.transaction;return n?rt(n,t):!1}function Fee(e,t){if(!t?.length)return!1;let n=Ja(e);return n?rt(n,t):!1}function Iee(e,t){if(!t?.length)return!0;let n=Ja(e);return n?rt(n,t):!0}function Lee(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Ja(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?Lee(t):null}catch{return l&&D.error(`Cannot extract url for event ${lt(e)}`),null}}function Ya(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function Xa(e,t,n,r,i,a){if(!i.exception?.values||!a||!Pe(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=Za(e,t,r,a.originalException,n,i.exception.values,o,0))}function Za(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Pe(r[i],Error)){$a(o,s,r);let a=e(t,r[i]),l=c.length;eo(a,i,l,s),c=Za(e,t,n,r[i],i,[a,...c],a,l)}return Qa(r)&&r.errors.forEach((a,l)=>{if(Pe(a,Error)){$a(o,s,r);let u=e(t,a),d=c.length;eo(u,`errors[${l}]`,d,s),c=Za(e,t,n,a,i,[u,...c],u,d)}}),c}function Qa(e){return Array.isArray(e.errors)}function $a(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...Qa(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function eo(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}var to=`cause`,no=5,ro=`LinkedErrors`,io=Bi(((e={})=>{let t=e.limit||no,n=e.key||to;return{name:ro,preprocessEvent(e,r,i){Xa(Ia,i.getOptions().stackParser,n,t,e,r)}}}));function ao(e){let t=`console`,n=ue(t,e);return de(t,oo),n}function oo(){`console`in u&&h.forEach(function(e){e in u.console&&Ue(u.console,e,function(t){return _[e]=t,function(...t){fe(`console`,{args:t,level:e}),_[e]?.apply(u.console,t)}})})}function so(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var co=`Dedupe`,lo=Bi((()=>{let e;return{name:co,processEvent(t){if(t.type)return t;try{if(uo(t,e))return l&&D.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function uo(e,t){return t?!!(fo(e,t)||po(e,t)):!1}function fo(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ho(e,t)||!mo(e,t))}function po(e,t){let n=go(t),r=go(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ho(e,t)||!mo(e,t))}function mo(e,t){let n=oe(e),r=oe(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function ho(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function go(e){return e.exception?.values?.[0]}function _o(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}var vo=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function yo(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=vo.exec(t);return n?n.slice(1):[]}function bo(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=_o(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function xo(e){let t=0;for(;t<e.length&&e[t]===``;t++);let n=e.length-1;for(;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}function So(e,t){e=bo(e).slice(1),t=bo(t).slice(1);let n=xo(e.split(`/`)),r=xo(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function Co(e,t){let n=yo(e)[2]||``;return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var wo=`RewriteFrames`,To=Bi((e={})=>{let t=e.root,n=e.prefix||`app:///`,r=`window`in u&&!!u.window,i=e.iteratee||Eo({isBrowser:r,root:t,prefix:n});function a(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:o(e.stacktrace)}}))}}}catch{return e}}function o(e){return{...e,frames:e?.frames?.map(e=>i(e))}}return{name:wo,processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=a(t)),t}}});function Eo({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes(`\\`)&&!r.filename.includes(`/`),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;e.indexOf(t)===0&&(r.filename=e.replace(t,n))}}else if(i||a){let e=i?r.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):r.filename;r.filename=`${n}${t?So(t,e):Co(e)}`}return r}}var Do=`ConversationId`,Oo=Bi((()=>({name:Do,setup(e){e.on(`spanStart`,e=>{let t=Wt().getScopeData(),n=Gt().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=Nn(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(an,r)}})}})));function ko(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Ao=u;function jo(){return`history`in Ao&&!!Ao.history}function Mo(){if(!(`fetch`in Ao))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function No(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Po(){if(typeof EdgeRuntime==`string`)return!0;if(!Mo())return!1;if(No(Ao.fetch))return!0;let e=!1,t=Ao.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=No(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){l&&D.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Fo(e,t){let n=`fetch`,r=ue(n,e);return de(n,()=>Io(void 0,t)),r}function Io(e,t=!1){t&&!Po()||Ue(u,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=zo(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:_t()*1e3,virtualError:r,headers:Bo(n)};return e||fe(`fetch`,{...o}),t.apply(u,n).then(async t=>(e?e(t):fe(`fetch`,{...o,endTimestamp:_t()*1e3,response:t}),t),e=>{fe(`fetch`,{...o,endTimestamp:_t()*1e3,error:e}),be(e)&&e.stack===void 0&&(e.stack=r.stack,We(e,`framesToPop`,1));let t=Jt()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(o.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:We(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}function Lo(e,t){return!!e&&typeof e==`object`&&!!e[t]}function Ro(e){return typeof e==`string`?e:e?Lo(e,`url`)?e.url:e.toString?e.toString():``:``}function zo(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Ro(t),method:Lo(n,`method`)?String(n.method).toUpperCase():Ie(t)&&Lo(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Ro(t),method:Lo(t,`method`)?String(t.method).toUpperCase():`GET`}}function Bo(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Ie(t))return new Headers(t.headers)}catch{}}var Vo=u,Ho=0;function Uo(){return Ho>0}function Wo(){Ho++,setTimeout(()=>{Ho--})}function Go(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Ke(e))return e}catch{return e}let r=function(...n){try{let r=n.map(e=>Go(e,t));return e.apply(this,r)}catch(e){throw Wo(),qt(r=>{r.addEventProcessor(e=>(t.mechanism&&(ut(e,void 0,void 0),dt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),ki(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Ge(r,e),We(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,`name`,{get(){return e.name}})}catch{}return r}function Ko(){let e=Ve(),{referrer:t}=Vo.document||{},{userAgent:n}=Vo.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function qo(e,t){let n=Xo(e,t),r={type:ts(t),value:ns(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Jo(e,t,n,r){let i=Jt()?.getOptions().normalizeDepth,a=ls(t),o={__serialized__:fr(t,i)};if(a)return{exception:{values:[qo(e,a)]},extra:o};let s={exception:{values:[{type:ke(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:ss(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=Xo(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function Yo(e,t){return{exception:{values:[qo(e,t)]}}}function Xo(e,t){let n=t.stacktrace||t.stack||``,r=Qo(t),i=$o(t);try{return e(n,r,i)}catch{}return[]}var Zo=/Minified React error #\d+;/i;function Qo(e){return e&&Zo.test(e.message)?1:0}function $o(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function es(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function ts(e){let t=e?.name;return!t&&es(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function ns(e){let t=e?.message;return es(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Fa(t.error):Fa(e):`No error message`}function rs(e,t,n,r){let i=as(e,t,n?.syntheticException||void 0,r);return dt(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),bi(i)}function is(e,t,n=`info`,r,i){let a=os(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),bi(a)}function as(e,t,n,r,i){let a;if(Se(t)&&t.error)return Yo(e,t.error);if(Ce(t)||we(t)){let i=t;if(`stack`in t)a=Yo(e,t);else{let t=i.name||(Ce(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=os(e,o,n,r),ut(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return be(t)?Yo(e,t):Oe(t)||ke(t)?(a=Jo(e,t,n,i),dt(a,{synthetic:!0}),a):(a=os(e,t,n,r),ut(a,`${t}`,void 0),dt(a,{synthetic:!0}),a)}function os(e,t,n,r){let i={};if(r&&n){let r=Xo(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),dt(i,{synthetic:!0})}if(Ee(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function ss(e,{isUnhandledRejection:t}){let n=eee(e),r=t?`promise rejection`:`exception`;return Se(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ke(e)?`Event \`${cs(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function cs(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ls(e){return Object.values(e).find(e=>e instanceof Error)}var us=class extends Dee{constructor(e){let t=ds(e);Ba(t,`browser`,[`browser`],Vo.SENTRY_SDK_SOURCE||Hi()),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?`auto`:`never`,...t._metadata.sdk.settings}),super(t);let{sendDefaultPii:n,sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;Vo.document&&(r||i||s)&&Vo.document.addEventListener(`visibilitychange`,()=>{Vo.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&Ji(this),s&&$i(this))}),n&&this.on(`beforeSendSession`,za)}eventFromException(e,t){return rs(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return is(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function ds(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:Vo.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var fs=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,ps=u,ms=1e3,hs,gs,_s;function vs(e){ue(`dom`,e),de(`dom`,ys)}function ys(){if(!ps.document)return;let e=fe.bind(null,`dom`),t=Ss(e,!0);ps.document.addEventListener(`click`,t,!1),ps.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=ps[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Ue(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Ss(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),Ue(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function bs(e){if(e.type!==gs)return!1;try{if(!e.target||e.target._sentryId!==_s)return!1}catch{}return!0}function xs(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function Ss(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Cs(n);if(xs(n.type,r))return;We(n,`_sentryCaptured`,!0),r&&!r._sentryId&&We(r,`_sentryId`,st());let i=n.type===`keypress`?`input`:n.type;bs(n)||(e({event:n,name:i,global:t}),gs=n.type,_s=r?r._sentryId:void 0),clearTimeout(hs),hs=ps.setTimeout(()=>{_s=void 0,gs=void 0},ms)}}function Cs(e){try{return e.target}catch{return null}}var ws;function Ts(e){let t=`history`;ue(t,e),de(t,Es)}function Es(){if(ps.addEventListener(`popstate`,()=>{let e=ps.location.href,t=ws;ws=e,t!==e&&fe(`history`,{from:t,to:e})}),!jo())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=ws,i=Ds(String(n));if(ws=i,r===i)return e.apply(this,t);fe(`history`,{from:r,to:i})}return e.apply(this,t)}}Ue(ps.history,`pushState`,e),Ue(ps.history,`replaceState`,e)}function Ds(e){try{return new URL(e,ps.location.origin).toString()}catch{return e}}var Os={};function ks(e){let t=Os[e];if(t)return t;let n=ps[e];if(No(n))return Os[e]=n.bind(ps);let r=ps.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){fs&&D.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Os[e]=n.bind(ps))}function As(e){Os[e]=void 0}var js=`__sentry_xhr_v3__`;function Ms(e){ue(`xhr`,e),de(`xhr`,Ns)}function Ns(){if(!ps.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=_t()*1e3,a=Te(n[0])?n[0].toUpperCase():void 0,o=Ps(n[1]);if(!a||!o)return e.apply(t,n);t[js]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[js];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}fe(`xhr`,{endTimestamp:_t()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[js];return a&&Te(r)&&Te(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[js];return r?(n[0]!==void 0&&(r.body=n[0]),fe(`xhr`,{startTimestamp:_t()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Ps(e){if(Te(e))return e;try{return e.toString()}catch{}}var Fs=40;function Is(e,t=ks(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw As(`fetch`),e}finally{n-=a,r--}}return ua(e,i,ia(e.bufferSize||Fs))}var Ls=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Rs=30,Ree=50;function zs(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var zee=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Bee=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Vee=/\((\S*)(?::(\d+))(?::(\d+))\)/,Hee=/at (.+?) ?\(data:(.+?),/,Uee=[Rs,e=>{let t=e.match(Hee);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=zee.exec(e);if(n){let[,e,t,r]=n;return zs(e,`?`,+t,+r)}let r=Bee.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=Vee.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Bs(r[1]||`?`,r[2]);return zs(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Wee=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Gee=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Kee=ne(Uee,[Ree,e=>{let t=Wee.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Gee.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Bs(n,e),zs(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Bs=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Vs=1024,qee=`Breadcrumbs`,Hs=Bi(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:qee,setup(e){t.console&&ao(Xee(e)),t.dom&&vs(Yee(e,t.dom)),t.xhr&&Ms(Zee(e)),t.fetch&&Fo(Qee(e)),t.history&&Ts($ee(e)),t.sentry&&e.on(`beforeSendEvent`,Jee(e))}}}));function Jee(e){return function(t){Jt()===e&&Ha({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:lt(t)},{event:t})}}function Yee(e,t){return function(n){if(Jt()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Vs&&(Ls&&D.warn(`\`dom.maxStringLength\` cannot exceed ${Vs}, but a value of ${o} was configured. Sentry will use ${Vs} instead.`),o=Vs),typeof a==`string`&&(a=[a]);try{let e=n.event,t=ete(e)?e.target:e;r=ze(t,{keyAttrs:a,maxStringLength:o}),i=He(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Ha(s,{event:n.event,name:n.name,global:n.global})}}function Xee(e){return function(t){if(Jt()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:so(t.level),message:tt(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${tt(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;Ha(n,{input:t.args,level:t.level})}}function Zee(e){return function(t){if(Jt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[js];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:ko(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),Ha(d,u)}}function Qee(e){return function(t){if(Jt()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),Ha(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:ko(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),Ha(s,o)}}}function $ee(e){return function(t){if(Jt()!==e)return;let n=t.from,r=t.to,i=mi(Vo.location.href),a=n?mi(n):void 0,o=mi(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),Ha({category:`navigation`,data:{from:n,to:r}})}}function ete(e){return!!e&&!!e.target}var tte=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),nte=`BrowserApiErrors`,Us=Bi(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:nte,setupOnce(){t.setTimeout&&Ue(Vo,`setTimeout`,Ws),t.setInterval&&Ue(Vo,`setInterval`,Ws),t.requestAnimationFrame&&Ue(Vo,`requestAnimationFrame`,rte),t.XMLHttpRequest&&`XMLHttpRequest`in Vo&&Ue(XMLHttpRequest.prototype,`send`,ite);let e=t.eventTarget;e&&(Array.isArray(e)?e:tte).forEach(e=>ate(e,t))}}}));function Ws(e){return function(...t){let n=t[0];return t[0]=Go(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${A(e)}`}}),e.apply(this,t)}}function rte(e){return function(t){return e.apply(this,[Go(t,{mechanism:{data:{handler:A(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function ite(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&Ue(n,e,function(t){let n={mechanism:{data:{handler:A(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Ke(t);return r&&(n.mechanism.data.handler=A(r)),Go(t,n)})}),e.apply(this,t)}}function ate(e,t){let n=Vo[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(Ue(n,`addEventListener`,function(n){return function(r,i,a){try{ote(i)&&(i.handleEvent=Go(i.handleEvent,{mechanism:{data:{handler:A(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&ste(this,r,i),n.apply(this,[r,Go(i,{mechanism:{data:{handler:A(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),Ue(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}function ote(e){return typeof e.handleEvent==`function`}function ste(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var Gs=Bi((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(Vo.document===void 0){Ls&&D.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ji({ignoreDuration:!0}),Pi();let e=Gt(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();(n?.id!==t?.id||n?.ip_address!==t?.ip_address)&&(Pi(),n=t)}),t===`route`&&Ts(({from:e,to:t})=>{e!==t&&(ji({ignoreDuration:!0}),Pi())})}}}),cte=`CultureContext`,lte=Bi((()=>({name:cte,preprocessEvent(e){let t=Ks();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=Ks();t&&gi(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function Ks(){try{let e=Vo.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var ute=`GlobalHandlers`,qs=Bi(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:ute,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(dte(e),Js(`onerror`)),t.onunhandledrejection&&(fte(e),Js(`onunhandledrejection`))}}}));function dte(e){me(t=>{let{stackParser:n,attachStacktrace:r}=Ys();if(Jt()!==e||Uo())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=hte(as(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Ai(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function fte(e){_e(t=>{let{stackParser:n,attachStacktrace:r}=Ys();if(Jt()!==e||Uo())return;let i=pte(t),a=De(i)?mte(i):as(n,i,void 0,r,!0);a.level=`error`,Ai(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function pte(e){if(De(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function mte(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function hte(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:Xs(t)??Ve(),function:`?`,in_app:!0}),e}function Js(e){Ls&&D.log(`Global Handler attached: ${e}`)}function Ys(){return Jt()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Xs(e){if(!(!Te(e)||e.length===0))return e.startsWith(`data:`)?`<${hi(e,!1)}>`:e}var Zs=Bi(()=>({name:`HttpContext`,preprocessEvent(e){if(!Vo.navigator&&!Vo.location&&!Vo.document)return;let t=Ko(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!Vo.navigator&&!Vo.location&&!Vo.document)return;let t=Ko();gi(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers[`User-Agent`],"http.request.header.referer":t.headers.Referer})}})),Qs=`cause`,$s=5,ec=`LinkedErrors`,tc=Bi(((e={})=>{let t=e.limit||$s,n=e.key||Qs;return{name:ec,preprocessEvent(e,r,i){Xa(qo,i.getOptions().stackParser,n,t,e,r)}}}));function nc(){return rc()?(Ls&&v(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function rc(){if(Vo.window===void 0)return!1;let e=Vo;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=Ve();return!(Vo===Vo.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function ic(e){return[jee(),Ga(),Oo(),Us(),Hs(),qs(),tc(),lo(),Zs(),lte(),Gs()]}function ac(e={}){let t=!e.skipBrowserExtensionCheck&&nc(),n=e.defaultIntegrations==null?ic():e.defaultIntegrations;return La(us,{...e,enabled:t?!1:e.enabled,stackParser:k(e.stackParser||Kee),integrations:Tee({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Is})}function oc(e={}){let t=Vo.document,n=t?.head||t?.body;if(!n){Ls&&D.error(`[showReportDialog] Global document not defined`);return}let r=Wt(),i=Jt()?.getDsn();if(!i){Ls&&D.error(`[showReportDialog] DSN not configured`);return}let a={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||yee()},o=Vo.document.createElement(`script`);o.async=!0,o.crossOrigin=`anonymous`,o.src=Cee(i,a);let{onLoad:s,onClose:c}=a;if(s&&(o.onload=s),c){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{c()}finally{Vo.removeEventListener(`message`,e)}};Vo.addEventListener(`message`,e)}n.appendChild(o)}var j=n(c());function sc(e){let t={...e};return Ba(t,`react`),_ee(`react`,{version:j.version}),ac(t)}function cc(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function lc(e,t){let n=new WeakSet;function r(e,t){if(!n.has(e)){if(e.cause)return n.add(e),r(e.cause,t);e.cause=t}}r(e,t)}function uc(e,{componentStack:t},n){if(cc(j.version)&&be(e)&&t){let n=Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,lc(e,n)}return qt(r=>(r.setContext(`react`,{componentStack:t}),ki(e,n)))}var dc=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,fc={componentStack:null,error:null,eventId:null},pc=class extends j.Component{constructor(e){super(e),this.state=fc,this._openFallbackReportDialog=!0;let t=Jt();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on(`afterSendEvent`,t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&oc({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,t){let{componentStack:n}=t,{beforeCapture:r,onError:i,showDialog:a,dialogOptions:o}=this.props;qt(s=>{r&&r(s,e,n);let c=uc(e,t,{mechanism:{handled:this.props.handled==null?!!this.props.fallback:this.props.handled,type:`auto.function.react.error_boundary`}});i&&i(e,n,c),a&&(this._lastEventId=c,this._openFallbackReportDialog&&oc({...o,eventId:c})),this.setState({error:e,componentStack:n,eventId:c})})}componentDidMount(){let{onMount:e}=this.props;e&&e()}componentWillUnmount(){let{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===fc?r(null,null,null):r(e,t,n)),this._cleanupHook&&=(this._cleanupHook(),void 0)}resetErrorBoundary(){let{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(fc)}render(){let{fallback:e,children:t}=this.props,n=this.state;if(n.componentStack===null)return typeof t==`function`?t():t;let r=typeof e==`function`?j.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return j.isValidElement(r)?r:(e&&dc&&D.warn(`fallback did not produce a valid ReactElement`),null)}},mc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hc={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gc=new class{#e=hc;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function _c(e){setTimeout(e,0)}var vc=typeof window>`u`||`Deno`in globalThis;function yc(){}function bc(e,t){return typeof e==`function`?e(t):e}function xc(e){return typeof e==`number`&&e>=0&&e!==1/0}function Sc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Cc(e,t){return typeof e==`function`?e(t):e}function wc(e,t){return typeof e==`function`?e(t):e}function Tc(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Dc(o,t.options))return!1}else if(!kc(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ec(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Oc(t.options.mutationKey)!==Oc(a))return!1}else if(!kc(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Dc(e,t){return(t?.queryKeyHashFn||Oc)(e)}function Oc(e){return JSON.stringify(e,(e,t)=>Pc(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function kc(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>kc(e[n],t[n])):!1}var Ac=Object.prototype.hasOwnProperty;function jc(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Nc(e)&&Nc(t);if(!r&&!(Pc(e)&&Pc(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Ac.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=jc(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Mc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Nc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pc(e){if(!Fc(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Fc(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Fc(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ic(e){return new Promise(t=>{gc.setTimeout(t,e)})}function Lc(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:jc(e,t)}function Rc(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function zc(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Bc=Symbol();function Vc(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Bc?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Hc(e,t){return typeof e==`function`?e(...t):!!e}function Uc(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Wc=new class extends mc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!vc&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function Gc(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Kc=_c;function qc(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Kc,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Jc=qc(),Yc=new class extends mc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!vc&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Xc(e){return Math.min(1e3*2**e,3e4)}function Zc(e){return(e??`online`)===`online`?Yc.isOnline():!0}var Qc=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function $c(e){return e instanceof Qc}function el(e){let t=!1,n=0,r,i=Gc(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Qc(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Wc.isFocused()&&(e.networkMode===`always`||Yc.isOnline())&&e.canRun(),u=()=>Zc(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(vc?0:3),o=e.retryDelay??Xc,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Ic(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var tl=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xc(this.gcTime)&&(this.#e=gc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vc?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(gc.clearTimeout(this.#e),void 0)}},nl=class extends tl{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=al(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=al(this.options);e.data!==void 0&&(this.setState(il(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=Lc(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(yc).catch(yc):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>wc(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bc||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Cc(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Sc(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=Vc(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=el({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Qc&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Qc){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...rl(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...il(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Jc.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function rl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zc(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function il(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function al(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ol=class extends mc{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Gc(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),cl(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ll(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ll(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof wc(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Mc(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&ul(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||wc(this.options.enabled,this.#t)!==wc(t.enabled,this.#t)||Cc(this.options.staleTime,this.#t)!==Cc(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||wc(this.options.enabled,this.#t)!==wc(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return fl(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(yc)),t}#g(){this.#b();let e=Cc(this.options.staleTime,this.#t);if(vc||this.#r.isStale||!xc(e))return;let t=Sc(this.#r.dataUpdatedAt,e)+1;this.#d=gc.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(vc||wc(this.options.enabled,this.#t)===!1||!xc(this.#p)||this.#p===0)&&(this.#f=gc.setInterval(()=>{(this.options.refetchIntervalInBackground||Wc.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(gc.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(gc.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&cl(e,t),o=i&&ul(e,n,t,r);(a||o)&&(l={...l,...rl(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Lc(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Lc(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:dl(e,t),refetch:this.refetch,promise:this.#o,isEnabled:wc(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{i(this.#o=x.promise=Gc())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Mc(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Jc.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function sl(e,t){return wc(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function cl(e,t){return sl(e,t)||e.state.data!==void 0&&ll(e,t,t.refetchOnMount)}function ll(e,t,n){if(wc(t.enabled,e)!==!1&&Cc(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&dl(e,t)}return!1}function ul(e,t,n,r){return(e!==t||wc(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&dl(e,n)}function dl(e,t){return wc(t.enabled,e)!==!1&&e.isStaleByTime(Cc(t.staleTime,e))}function fl(e,t){return!Mc(e.getCurrentResult(),t)}function pl(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Uc(e,()=>t.signal,()=>n=!0)},u=Vc(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?zc:Rc;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?hl:ml,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:ml(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function ml(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function hl(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function gl(e,t){return t?ml(e,t)!=null:!1}function _l(e,t){return!t||!e.getPreviousPageParam?!1:hl(e,t)!=null}var vl=class extends ol{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:pl()})}getOptimisticResult(e){return e.behavior=pl(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:gl(t,n.data),hasPreviousPage:_l(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},yl=class extends tl{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||bl(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=el({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Jc.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function bl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var xl=class extends mc{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new yl({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Sl(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Sl(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Sl(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Sl(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Jc.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ec(t,e))}findAll(e={}){return this.getAll().filter(t=>Ec(e,t))}notify(e){Jc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Jc.batch(()=>Promise.all(e.map(e=>e.continue().catch(yc))))}};function Sl(e){return e.options.scope?.id}var Cl=class extends mc{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Mc(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Oc(t.mutationKey)!==Oc(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??bl();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Jc.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function wl(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function Tl(e,t,n){let r=e.slice(0);return r[t]=n,r}var El=class extends mc{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,Jc.batch(()=>{let e=this.#i,t=this.#f(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!Mc(e,n)});!o&&!s||(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(wl(e,n).forEach(e=>{e.destroy()}),wl(n,e).forEach(e=>{e.subscribe(t=>{this.#p(e,t)})})),this.#m()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#f(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=jc(this.#a,t(e))),this.#a}return e}#f(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new ol(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#p(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=Tl(this.#t,n,t),this.#m())}#m(){if(this.hasListeners()){let e=this.#a,t=this.#u(this.#t,this.#l);e!==this.#d(t,this.#r?.combine)&&Jc.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},Dl=class extends mc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Dc(r,t),a=this.get(i);return a||(a=new nl({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Jc.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Tc(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Tc(e,t)):t}notify(e){Jc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Jc.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Jc.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ol=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Dl,this.#t=e.mutationCache||new xl,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Wc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Yc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Cc(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=bc(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Jc.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Jc.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Jc.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Jc.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(yc).catch(yc)}invalidateQueries(e,t={}){return Jc.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Jc.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(yc)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(yc)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Cc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yc).catch(yc)}fetchInfiniteQuery(e){return e.behavior=pl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yc).catch(yc)}ensureInfiniteQueryData(e){return e.behavior=pl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Yc.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Oc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{kc(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Oc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{kc(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Dc(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Bc&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},M=o(),kl=j.createContext(void 0),Al=e=>{let t=j.useContext(kl);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},jl=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,M.jsx)(kl.Provider,{value:e,children:t})),Ml=j.createContext(!1),Nl=()=>j.useContext(Ml);Ml.Provider;function Pl(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Fl=j.createContext(Pl()),Il=()=>j.useContext(Fl),Ll=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Hc(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Rl=e=>{j.useEffect(()=>{e.clearReset()},[e])},zl=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Hc(n,[e.error,r])),Bl=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Vl=(e,t)=>e.isLoading&&e.isFetching&&!t,Hl=(e,t)=>e?.suspense&&t.isPending,Ul=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Wl({queries:e,...t},n){let r=Al(n),i=Nl(),a=Il(),o=j.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{Bl(e),Ll(e,a,r.getQueryCache().get(e.queryHash))}),Rl(a);let[s]=j.useState(()=>new El(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;j.useSyncExternalStore(j.useCallback(e=>d?s.subscribe(Jc.batchCalls(e)):yc,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),j.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let f=c.some((e,t)=>Hl(o[t],e))?c.flatMap((e,t)=>{let n=o[t];return n&&Hl(n,e)?Ul(n,new ol(r,n),a):[]}):[];if(f.length>0)throw Promise.all(f);let p=c.find((e,t)=>{let n=o[t];return n&&zl({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(p?.error)throw p.error;return l(u())}function Gl(e,t,n){let r=Nl(),i=Il(),a=Al(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,Bl(o),Ll(o,i,s),Rl(i);let c=!a.getQueryCache().get(o.queryHash),[l]=j.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(e=>{let t=d?l.subscribe(Jc.batchCalls(e)):yc;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),j.useEffect(()=>{l.setOptions(o)},[o,l]),Hl(o,u))throw Ul(o,l,i);if(zl({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!vc&&Vl(u,r)&&(c?Ul(o,l,i):s?.promise)?.catch(yc).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function Kl(e,t){return Gl(e,ol,t)}function ql(e){return e}function Jl(e){return e}function Yl(e,t){let n=Al(t),[r]=j.useState(()=>new Cl(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);let i=j.useSyncExternalStore(j.useCallback(e=>r.subscribe(Jc.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=j.useCallback((e,t)=>{r.mutate(e,t).catch(yc)},[r]);if(i.error&&Hc(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Xl(e,t){return Gl(e,vl,t)}function Zl(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ql(...e){return t=>{let n=!1,r=e.map(e=>{let r=Zl(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Zl(e[t],null)}}}}function $l(...e){return j.useCallback(Ql(...e),e)}var eu=Symbol.for(`react.lazy`),tu=j.use;function nu(e){return typeof e==`object`&&!!e&&`then`in e}function ru(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===eu&&`_payload`in e&&nu(e._payload)}function iu(e){let t=ou(e),n=j.forwardRef((e,n)=>{let{children:r,...i}=e;ru(r)&&typeof tu==`function`&&(r=tu(r._payload));let a=j.Children.toArray(r),o=a.find(uu);if(o){let e=o.props.children,r=a.map(t=>t===o?j.Children.count(e)>1?j.Children.only(null):j.isValidElement(e)?e.props.children:null:t);return(0,M.jsx)(t,{...i,ref:n,children:j.isValidElement(e)?j.cloneElement(e,void 0,r):null})}return(0,M.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var au=iu(`Slot`);function ou(e){let t=j.forwardRef((e,t)=>{let{children:n,...r}=e;if(ru(n)&&typeof tu==`function`&&(n=tu(n._payload)),j.isValidElement(n)){let e=fu(n),i=du(r,n.props);return n.type!==j.Fragment&&(i.ref=t?Ql(t,e):e),j.cloneElement(n,i)}return j.Children.count(n)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var su=Symbol(`radix.slottable`);function cu(e){let t=({children:e})=>(0,M.jsx)(M.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=su,t}var lu=cu(`Slottable`);function uu(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===su}function du(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function fu(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function pu(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=pu(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function mu(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=pu(e))&&(r&&(r+=` `),r+=t);return r}var hu=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,gu=mu,_u=(e,t)=>n=>{if(t?.variants==null)return gu(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=hu(t)||hu(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return gu(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},vu=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},yu=(e,t)=>({classGroupId:e,validator:t}),bu=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),xu=`-`,Su=[],Cu=`arbitrary..`,wu=e=>{let t=Du(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Eu(e);let n=e.split(xu);return Tu(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?vu(i,t):t:i||Su}return n[e]||Su}}},Tu=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Tu(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(xu):e.slice(t).join(xu),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Eu=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Cu+r:void 0})(),Du=e=>{let{theme:t,classGroups:n}=e;return Ou(n,t)},Ou=(e,t)=>{let n=bu();for(let r in e){let i=e[r];ku(i,n,r,t)}return n},ku=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Au(i,t,n,r)}},Au=(e,t,n,r)=>{if(typeof e==`string`){ju(e,t,n);return}if(typeof e==`function`){Mu(e,t,n,r);return}Nu(e,t,n,r)},ju=(e,t,n)=>{let r=e===``?t:Pu(t,e);r.classGroupId=n},Mu=(e,t,n,r)=>{if(Fu(e)){ku(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(yu(n,e))},Nu=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ku(o,Pu(t,a),n,r)}},Pu=(e,t)=>{let n=e,r=t.split(xu),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=bu(),n.nextPart.set(t,i)),n=i}return n},Fu=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Iu=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Lu=`!`,Ru=`:`,zu=[],Bu=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Vu=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Ru){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Lu)?(c=s.slice(0,-1),l=!0):s.startsWith(Lu)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Bu(t,l,c,u)};if(t){let e=t+Ru,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Bu(zu,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Hu=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Uu=e=>({cache:Iu(e.cacheSize),parseClassName:Vu(e),sortModifiers:Hu(e),postfixLookupClassGroupIds:Wu(e),...wu(e)}),Wu=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Gu=/\s+/,Ku=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Gu),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Lu:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},qu=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ju(n))&&(i&&(i+=` `),i+=r);return i},Ju=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Ju(e[r]))&&(n&&(n+=` `),n+=t);return n},Yu=(e,...t)=>{let n,r,i,a,o=o=>(n=Uu(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Ku(e,n);return i(e,a),a};return a=o,(...e)=>a(qu(...e))},Xu=[],Zu=e=>{let t=t=>t[e]||Xu;return t.isThemeGetter=!0,t},Qu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$u=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ed=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,td=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,id=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ad=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,od=e=>ed.test(e),sd=e=>!!e&&!Number.isNaN(Number(e)),cd=e=>!!e&&Number.isInteger(Number(e)),ld=e=>e.endsWith(`%`)&&sd(e.slice(0,-1)),ud=e=>td.test(e),dd=()=>!0,fd=e=>nd.test(e)&&!rd.test(e),pd=()=>!1,md=e=>id.test(e),hd=e=>ad.test(e),gd=e=>!N(e)&&!P(e),_d=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),vd=e=>Nd(e,Ld,pd),N=e=>Qu.test(e),yd=e=>Nd(e,Rd,fd),bd=e=>Nd(e,zd,sd),xd=e=>Nd(e,Vd,dd),Sd=e=>Nd(e,Bd,pd),Cd=e=>Nd(e,Fd,pd),wd=e=>Nd(e,Id,hd),Td=e=>Nd(e,Hd,md),P=e=>$u.test(e),Ed=e=>Pd(e,Rd),Dd=e=>Pd(e,Bd),Od=e=>Pd(e,Fd),kd=e=>Pd(e,Ld),Ad=e=>Pd(e,Id),jd=e=>Pd(e,Hd,!0),Md=e=>Pd(e,Vd,!0),Nd=(e,t,n)=>{let r=Qu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Pd=(e,t,n=!1)=>{let r=$u.exec(e);return r?r[1]?t(r[1]):n:!1},Fd=e=>e===`position`||e===`percentage`,Id=e=>e===`image`||e===`url`,Ld=e=>e===`length`||e===`size`||e===`bg-size`,Rd=e=>e===`length`,zd=e=>e===`number`,Bd=e=>e===`family-name`,Vd=e=>e===`number`||e===`weight`,Hd=e=>e===`shadow`,Ud=()=>{let e=Zu(`color`),t=Zu(`font`),n=Zu(`text`),r=Zu(`font-weight`),i=Zu(`tracking`),a=Zu(`leading`),o=Zu(`breakpoint`),s=Zu(`container`),c=Zu(`spacing`),l=Zu(`radius`),u=Zu(`shadow`),d=Zu(`inset-shadow`),f=Zu(`text-shadow`),p=Zu(`drop-shadow`),m=Zu(`blur`),h=Zu(`perspective`),g=Zu(`aspect`),_=Zu(`ease`),v=Zu(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),P,N],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[P,N,c],T=()=>[od,`full`,`auto`,...w()],E=()=>[cd,`none`,`subgrid`,P,N],D=()=>[`auto`,{span:[`full`,cd,P,N]},cd,P,N],O=()=>[cd,`auto`,P,N],ee=()=>[`auto`,`min`,`max`,`fr`,P,N],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],re=()=>[od,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ie=()=>[od,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[od,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,P,N],oe=()=>[...b(),Od,Cd,{position:[P,N]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,kd,vd,{size:[P,N]}],le=()=>[ld,Ed,yd],ue=()=>[``,`none`,`full`,l,P,N],de=()=>[``,sd,Ed,yd],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[sd,ld,Od,Cd],he=()=>[``,`none`,m,P,N],ge=()=>[`none`,sd,P,N],_e=()=>[`none`,sd,P,N],ve=()=>[sd,P,N],ye=()=>[od,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ud],breakpoint:[ud],color:[dd],container:[ud],"drop-shadow":[ud],ease:[`in`,`out`,`in-out`],font:[gd],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ud],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ud],shadow:[ud],spacing:[`px`,sd],text:[ud],"text-shadow":[ud],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,od,N,P,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,P,N]}],"container-named":[_d],columns:[{columns:[sd,N,P,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[cd,`auto`,P,N]}],basis:[{basis:[od,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[sd,od,`auto`,`initial`,`none`,N]}],grow:[{grow:[``,sd,P,N]}],shrink:[{shrink:[``,sd,P,N]}],order:[{order:[cd,`first`,`last`,`none`,P,N]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:re()}],"inline-size":[{inline:[`auto`,...ie()]}],"min-inline-size":[{"min-inline":[`auto`,...ie()]}],"max-inline-size":[{"max-inline":[`none`,...ie()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...re()]}],"min-w":[{"min-w":[s,`screen`,`none`,...re()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...re()]}],h:[{h:[`screen`,`lh`,...re()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...re()]}],"max-h":[{"max-h":[`screen`,`lh`,...re()]}],"font-size":[{text:[`base`,n,Ed,yd]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Md,xd]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ld,N]}],"font-family":[{font:[Dd,Sd,t]}],"font-features":[{"font-features":[N]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,P,N]}],"line-clamp":[{"line-clamp":[sd,`none`,P,bd]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,P,N]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,P,N]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[sd,`from-font`,`auto`,P,yd]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[sd,`auto`,P,N]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[cd,P,N]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,P,N]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,P,N]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},cd,P,N],radial:[``,P,N],conic:[cd,P,N]},Ad,wd]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[sd,P,N]}],"outline-w":[{outline:[``,sd,Ed,yd]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,u,jd,Td]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,jd,Td]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[sd,yd]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,jd,Td]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[sd,P,N]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[sd]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[P,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[sd]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,P,N]}],filter:[{filter:[``,`none`,P,N]}],blur:[{blur:he()}],brightness:[{brightness:[sd,P,N]}],contrast:[{contrast:[sd,P,N]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,jd,Td]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,sd,P,N]}],"hue-rotate":[{"hue-rotate":[sd,P,N]}],invert:[{invert:[``,sd,P,N]}],saturate:[{saturate:[sd,P,N]}],sepia:[{sepia:[``,sd,P,N]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,P,N]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[sd,P,N]}],"backdrop-contrast":[{"backdrop-contrast":[sd,P,N]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,sd,P,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[sd,P,N]}],"backdrop-invert":[{"backdrop-invert":[``,sd,P,N]}],"backdrop-opacity":[{"backdrop-opacity":[sd,P,N]}],"backdrop-saturate":[{"backdrop-saturate":[sd,P,N]}],"backdrop-sepia":[{"backdrop-sepia":[``,sd,P,N]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,P,N]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[sd,`initial`,P,N]}],ease:[{ease:[`linear`,`initial`,_,P,N]}],delay:[{delay:[sd,P,N]}],animate:[{animate:[`none`,v,P,N]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,P,N]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[P,N,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[cd,P,N]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,P,N]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,P,N]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[sd,Ed,yd,bd]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},Wd=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(Gd(e,`cacheSize`,t),Gd(e,`prefix`,n),Gd(e,`experimentalParseClassName`,r),Kd(e.theme,a.theme),Kd(e.classGroups,a.classGroups),Kd(e.conflictingClassGroups,a.conflictingClassGroups),Kd(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),Gd(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),Gd(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),qd(e.theme,i.theme),qd(e.classGroups,i.classGroups),qd(e.conflictingClassGroups,i.conflictingClassGroups),qd(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Jd(e,i,`postfixLookupClassGroups`),Jd(e,i,`orderSensitiveModifiers`),e),Gd=(e,t,n)=>{n!==void 0&&(e[t]=n)},Kd=(e,t)=>{if(t)for(let n in t)Gd(e,n,t[n])},qd=(e,t)=>{if(t)for(let n in t)Jd(e,t,n)},Jd=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Yd=(e,...t)=>typeof e==`function`?Yu(Ud,e,...t):Yu(()=>Wd(Ud(),e),...t);typeof window<`u`&&window.document&&window.document.createElement;function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Xd(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Zd(...e){return t=>{let n=!1,r=e.map(e=>{let r=Xd(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Xd(e[t],null)}}}}function Qd(...e){return j.useCallback(Zd(...e),e)}function $d(e,t=[]){let n=[];function r(t,r){let i=j.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=j.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=j.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>j.createContext(e));return function(n){let r=n?.[e]||t;return j.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,ef(i,...t)]}function ef(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var tf=n(a(),1);function nf(e){let t=j.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];df(r)&&typeof hf==`function`&&(r=hf(r._payload)),j.Children.forEach(r,e=>{if(lf(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;df(n)&&typeof hf==`function`&&(n=hf(n._payload)),a=of(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=j.cloneElement(a,void 0,s):!o&&j.Children.count(r)===1&&j.isValidElement(r)&&(a=r);let c=a?cf(a):void 0,l=Qd(n,c);if(!a){if(r||r===0)throw Error(o?mf(e):pf(e));return r}let u=sf(i,a.props??{});return a.type!==j.Fragment&&(u.ref=n?l:c),j.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var rf=Symbol.for(`radix.slottable`);function af(e){let t=e=>`child`in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=rf,t}var of=(e,t)=>{if(`child`in e.props){let t=e.props.child;return j.isValidElement(t)?j.cloneElement(t,void 0,e.props.children(t.props.children)):null}return j.isValidElement(t)?t:null};function sf(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function cf(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lf(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===rf}var uf=Symbol.for(`react.lazy`);function df(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===uf&&`_payload`in e&&ff(e._payload)}function ff(e){return typeof e==`object`&&!!e&&`then`in e}var pf=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,mf=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,hf=j.use,gf=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=nf(`Primitive.${t}`),r=j.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function _f(e,t){e&&tf.flushSync(()=>e.dispatchEvent(t))}function vf(e){let t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>((...e)=>t.current?.(...e)),[])}var yf=globalThis?.document?j.useLayoutEffect:()=>{},bf=j.useEffectEvent,xf=j.useInsertionEffect;function Sf(e){if(typeof bf==`function`)return bf(e);let t=j.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof xf==`function`?xf(()=>{t.current=e}):yf(()=>{t.current=e}),j.useMemo(()=>((...e)=>t.current?.(...e)),[])}var Cf=`DismissableLayer`,wf=`dismissableLayer.update`,Tf=`dismissableLayer.pointerDownOutside`,Ef=`dismissableLayer.focusOutside`,Df,Of=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),kf=j.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=j.useContext(Of),[d,f]=j.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=j.useState({}),h=Qd(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(_),y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=j.useRef(!1),C=Nf(e=>{let t=e.target;if(!(t instanceof Node))return;let n=[...u.branches].some(e=>e.contains(t));!x||n||(a?.(e),s?.(e),e.defaultPrevented||c?.())},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces}),w=Pf(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Sf(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return j.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T]),j.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Df=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ff(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Df))}},[d,p,n,u]),j.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ff())},[d,u]),j.useEffect(()=>{let e=()=>m({});return document.addEventListener(wf,e),()=>document.removeEventListener(wf,e)},[]),(0,M.jsx)(gf.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:F(e.onFocusCapture,w.onFocusCapture),onBlurCapture:F(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,C.onPointerDownCapture)})});kf.displayName=Cf;var Af=`DismissableLayerBranch`,jf=j.forwardRef((e,t)=>{let n=j.useContext(Of),r=j.useRef(null),i=Qd(t,r);return j.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,M.jsx)(gf.div,{...e,ref:i})});jf.displayName=Af;function Mf(){let e=j.useContext(Of),[t,n]=j.useState(null);return j.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function Nf(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a}=t,o=vf(e),s=j.useRef(!1),c=j.useRef(!1),l=j.useRef(new Map),u=j.useRef(()=>{});return j.useEffect(()=>{function e(){c.current=!1,i.current=!1,l.current.clear()}function t(){return Array.from(l.current.values()).some(Boolean)}function d(e){if(!c.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||l.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{c.current&&u.current()},0)}function f(e){c.current&&l.current.set(e.type,!1)}let p=a=>{if(a.target&&!s.current){let s=function(){n.removeEventListener(`click`,u.current);let r=t();e(),r||If(Tf,o,d,{discrete:!0})},d={originalEvent:a};c.current=!0,i.current=r&&a.button===0,l.current.clear(),!r||a.button!==0?s():(n.removeEventListener(`click`,u.current),u.current=s,n.addEventListener(`click`,u.current,{once:!0}))}else n.removeEventListener(`click`,u.current),e();s.current=!1},m=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of m)n.addEventListener(e,d,!0),n.addEventListener(e,f);let h=window.setTimeout(()=>{n.addEventListener(`pointerdown`,p)},0);return()=>{window.clearTimeout(h),n.removeEventListener(`pointerdown`,p),n.removeEventListener(`click`,u.current);for(let e of m)n.removeEventListener(e,d,!0),n.removeEventListener(e,f)}},[n,o,r,i,a]),{onPointerDownCapture:()=>s.current=!0}}function Pf(e,t=globalThis?.document){let n=vf(e),r=j.useRef(!1);return j.useEffect(()=>{let e=e=>{e.target&&!r.current&&If(Ef,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ff(){let e=new CustomEvent(wf);document.dispatchEvent(e)}function If(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?_f(i,a):i.dispatchEvent(a)}var Lf=j.useId||(()=>void 0),Rf=0;function zf(e){let[t,n]=j.useState(Lf());return yf(()=>{e||n(e=>e??String(Rf++))},[e]),e||(t?`radix-${t}`:``)}var Bf=[`top`,`right`,`bottom`,`left`],Vf=[`start`,`end`],Hf=Bf.reduce((e,t)=>e.concat(t,t+`-`+Vf[0],t+`-`+Vf[1]),[]),Uf=Math.min,Wf=Math.max,Gf=Math.round,Kf=Math.floor,qf=e=>({x:e,y:e}),Jf={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Yf(e,t,n){return Wf(e,Uf(t,n))}function Xf(e,t){return typeof e==`function`?e(t):e}function Zf(e){return e.split(`-`)[0]}function Qf(e){return e.split(`-`)[1]}function $f(e){return e===`x`?`y`:`x`}function ep(e){return e===`y`?`height`:`width`}function tp(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function np(e){return $f(tp(e))}function rp(e,t,n){n===void 0&&(n=!1);let r=Qf(e),i=np(e),a=ep(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=fp(o)),[o,fp(o)]}function ip(e){let t=fp(e);return[ap(e),t,ap(t)]}function ap(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var op=[`left`,`right`],sp=[`right`,`left`],cp=[`top`,`bottom`],lp=[`bottom`,`top`];function up(e,t,n){switch(e){case`top`:case`bottom`:return n?t?sp:op:t?op:sp;case`left`:case`right`:return t?cp:lp;default:return[]}}function dp(e,t,n,r){let i=Qf(e),a=up(Zf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ap)))),a}function fp(e){let t=Zf(e);return Jf[t]+e.slice(t.length)}function pp(e){return{top:0,right:0,bottom:0,left:0,...e}}function mp(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:pp(e)}function hp(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function gp(e,t,n){let{reference:r,floating:i}=e,a=tp(t),o=np(t),s=ep(o),c=Zf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Qf(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function _p(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Xf(t,e),p=mp(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=hp(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=hp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var vp=50,yp=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:_p},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=gp(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<vp&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=gp(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},bp=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Xf(e,t)||{};if(l==null)return{};let d=mp(u),f={x:n,y:r},p=np(i),m=ep(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Uf(d[_],T),D=Uf(d[v],T),O=E,ee=C-h[m]-D,te=C/2-h[m]/2+w,ne=Yf(O,te,ee),k=!c.arrow&&Qf(i)!=null&&te!==ne&&a.reference[m]/2-(te<O?E:D)-h[m]/2<0,re=k?te<O?te-O:te-ee:0;return{[p]:f[p]+re,data:{[p]:ne,centerOffset:te-ne-re,...k&&{alignmentOffset:re}},reset:k}}});function xp(e,t,n){return(e?[...n.filter(t=>Qf(t)===e),...n.filter(t=>Qf(t)!==e)]:n.filter(e=>Zf(e)===e)).filter(n=>e?Qf(n)===e||(t?ap(n)!==n:!1):!0)}var Sp=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=Hf,autoAlignment:u=!0,...d}=Xf(e,t),f=c!==void 0||l===Hf?xp(c||null,u,l):l,p=await a.detectOverflow(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=rp(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[Zf(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Qf(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Qf(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},Cp=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Xf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Zf(r),_=tp(o),v=Zf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[fp(o)]:ip(o)),x=p!==`none`;!d&&x&&b.push(...dp(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=rp(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==tp(t))||T.every(e=>tp(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=tp(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function wp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tp(e){return Bf.some(t=>e[t]>=0)}var Ep=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Xf(e,t);switch(i){case`referenceHidden`:{let e=wp(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Tp(e)}}}case`escaped`:{let e=wp(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Tp(e)}}}default:return{}}}}};function Dp(e){let t=Uf(...e.map(e=>e.left)),n=Uf(...e.map(e=>e.top)),r=Wf(...e.map(e=>e.right)),i=Wf(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Op(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>hp(Dp(e)))}var kp=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=Xf(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]),d=Op(u),f=hp(Dp(u)),p=mp(s);function m(){if(d.length===2&&d[0].left>d[1].right&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(tp(n)===`y`){let e=d[0],t=d[d.length-1],r=Zf(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=Zf(n)===`left`,t=Wf(...d.map(e=>e.right)),r=Uf(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom,s=r,c=t;return{top:a,bottom:o,left:s,right:c,width:c-s,height:o-a,x:s,y:a}}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Ap=new Set([`left`,`top`]);async function jp(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Zf(n),s=Qf(n),c=tp(n)===`y`,l=Ap.has(o)?-1:1,u=a&&c?-1:1,d=Xf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Mp=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await jp(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Np=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Xf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=tp(Zf(i)),p=$f(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Yf(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Yf(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Pp=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Xf(e,t),u={x:n,y:r},d=tp(i),f=$f(d),p=u[f],m=u[d],h=Xf(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ap.has(Zf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Fp=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Xf(e,t),u=await o.detectOverflow(t,l),d=Zf(i),f=Qf(i),p=tp(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Uf(h-u[g],v),x=Uf(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Wf(u.left,0),t=Wf(u.right,0),n=Wf(u.top,0),r=Wf(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Wf(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Wf(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Ip(){return typeof window<`u`}function Lp(e){return Bp(e)?(e.nodeName||``).toLowerCase():`#document`}function Rp(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zp(e){return((Bp(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Bp(e){return Ip()?e instanceof Node||e instanceof Rp(e).Node:!1}function Vp(e){return Ip()?e instanceof Element||e instanceof Rp(e).Element:!1}function Hp(e){return Ip()?e instanceof HTMLElement||e instanceof Rp(e).HTMLElement:!1}function Up(e){return!Ip()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Rp(e).ShadowRoot}function Wp(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=tm(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Gp(e){return/^(table|td|th)$/.test(Lp(e))}function Kp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var qp=/transform|translate|scale|rotate|perspective|filter/,Jp=/paint|layout|strict|content/,Yp=e=>!!e&&e!==`none`,Xp;function Zp(e){let t=Vp(e)?tm(e):e;return Yp(t.transform)||Yp(t.translate)||Yp(t.scale)||Yp(t.rotate)||Yp(t.perspective)||!$p()&&(Yp(t.backdropFilter)||Yp(t.filter))||qp.test(t.willChange||``)||Jp.test(t.contain||``)}function Qp(e){let t=rm(e);for(;Hp(t)&&!em(t);){if(Zp(t))return t;if(Kp(t))return null;t=rm(t)}return null}function $p(){return Xp??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Xp}function em(e){return/^(html|body|#document)$/.test(Lp(e))}function tm(e){return Rp(e).getComputedStyle(e)}function nm(e){return Vp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rm(e){if(Lp(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Up(e)&&e.host||zp(e);return Up(t)?t.host:t}function im(e){let t=rm(e);return em(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hp(t)&&Wp(t)?t:im(t)}function am(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=im(e),i=r===e.ownerDocument?.body,a=Rp(r);if(i){let e=om(a);return t.concat(a,a.visualViewport||[],Wp(r)?r:[],e&&n?am(e):[])}else return t.concat(r,am(r,[],n))}function om(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sm(e){let t=tm(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Hp(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Gf(n)!==a||Gf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function cm(e){return Vp(e)?e:e.contextElement}function lm(e){let t=cm(e);if(!Hp(t))return qf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=sm(t),o=(a?Gf(n.width):n.width)/r,s=(a?Gf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var um=qf(0);function dm(e){let t=Rp(e);return!$p()||!t.visualViewport?um:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Rp(e)?!1:t}function pm(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=cm(e),o=qf(1);t&&(r?Vp(r)&&(o=lm(r)):o=lm(e));let s=fm(a,n,r)?dm(a):qf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Rp(a),t=r&&Vp(r)?Rp(r):r,n=e,i=om(n);for(;i&&r&&t!==n;){let e=lm(i),t=i.getBoundingClientRect(),r=tm(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Rp(i),i=om(n)}}return hp({width:u,height:d,x:c,y:l})}function mm(e,t){let n=nm(e).scrollLeft;return t?t.left+n:pm(zp(e)).left+n}function hm(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-mm(e,n),y:n.top+t.scrollTop}}function gte(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=zp(r),s=t?Kp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=qf(1),u=qf(0),d=Hp(r);if((d||!d&&!a)&&((Lp(r)!==`body`||Wp(o))&&(c=nm(r)),d)){let e=pm(r);l=lm(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?hm(o,c):qf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function _te(e){return Array.from(e.getClientRects())}function vte(e){let t=zp(e),n=nm(e),r=e.ownerDocument.body,i=Wf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Wf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+mm(e),s=-n.scrollTop;return tm(r).direction===`rtl`&&(o+=Wf(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var gm=25;function yte(e,t){let n=Rp(e),r=zp(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=$p();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=mm(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=gm&&(a-=o)}else l<=gm&&(a+=l);return{width:a,height:o,x:s,y:c}}function bte(e,t){let n=pm(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Hp(e)?lm(e):qf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function _m(e,t,n){let r;if(t===`viewport`)r=yte(e,n);else if(t===`document`)r=vte(zp(e));else if(Vp(t))r=bte(t,n);else{let n=dm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return hp(r)}function vm(e,t){let n=rm(e);return n===t||!Vp(n)||em(n)?!1:tm(n).position===`fixed`||vm(n,t)}function xte(e,t){let n=t.get(e);if(n)return n;let r=am(e,[],!1).filter(e=>Vp(e)&&Lp(e)!==`body`),i=null,a=tm(e).position===`fixed`,o=a?rm(e):e;for(;Vp(o)&&!em(o);){let t=tm(o),n=Zp(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Wp(o)&&!n&&vm(e,o))?r=r.filter(e=>e!==o):i=t,o=rm(o)}return t.set(e,r),r}function Ste(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Kp(t)?[]:xte(t,this._c):[].concat(n),r],o=_m(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=_m(t,a[e],i);s=Wf(n.top,s),c=Uf(n.right,c),l=Uf(n.bottom,l),u=Wf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Cte(e){let{width:t,height:n}=sm(e);return{width:t,height:n}}function wte(e,t,n){let r=Hp(t),i=zp(t),a=n===`fixed`,o=pm(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=qf(0);function l(){c.x=mm(i)}if(r||!r&&!a)if((Lp(t)!==`body`||Wp(i))&&(s=nm(t)),r){let e=pm(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?hm(i,s):qf(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function ym(e){return tm(e).position===`static`}function bm(e,t){if(!Hp(e)||tm(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return zp(e)===n&&(n=n.ownerDocument.body),n}function xm(e,t){let n=Rp(e);if(Kp(e))return n;if(!Hp(e)){let t=rm(e);for(;t&&!em(t);){if(Vp(t)&&!ym(t))return t;t=rm(t)}return n}let r=bm(e,t);for(;r&&Gp(r)&&ym(r);)r=bm(r,t);return r&&em(r)&&ym(r)&&!Zp(r)?n:r||Qp(e)||n}var Tte=async function(e){let t=this.getOffsetParent||xm,n=this.getDimensions,r=await n(e.floating);return{reference:wte(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ete(e){return tm(e).direction===`rtl`}var Dte={convertOffsetParentRelativeRectToViewportRelativeRect:gte,getDocumentElement:zp,getClippingRect:Ste,getOffsetParent:xm,getElementRects:Tte,getClientRects:_te,getDimensions:Cte,getScale:lm,isElement:Vp,isRTL:Ete};function Sm(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ote(e,t){let n=null,r,i=zp(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Kf(d),h=Kf(i.clientWidth-(u+f)),g=Kf(i.clientHeight-(d+p)),_=Kf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Wf(0,Uf(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Sm(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Cm(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=cm(e),u=i||a?[...l?am(l):[],...t?am(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ote(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?pm(e):null;c&&g();function g(){let t=pm(e);h&&!Sm(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var wm=Mp,kte=Sp,Tm=Np,Em=Cp,Dm=Fp,Om=Ep,km=bp,Ate=kp,jte=Pp,Am=(e,t,n)=>{let r=new Map,i={platform:Dte,...n},a={...i.platform,_c:r};return yp(e,t,{...i,platform:a})},jm=typeof document<`u`?j.useLayoutEffect:function(){};function Mm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Mm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Mm(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Nm(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pm(e,t){let n=Nm(e);return Math.round(t*n)/n}function Fm(e){let t=j.useRef(e);return jm(()=>{t.current=e}),t}function Im(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=j.useState(r);Mm(f,r)||p(r);let[m,h]=j.useState(null),[g,_]=j.useState(null),v=j.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=j.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=j.useRef(null),C=j.useRef(null),w=j.useRef(u),T=c!=null,E=Fm(c),D=Fm(i),O=Fm(l),ee=j.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Am(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};te.current&&!Mm(w.current,t)&&(w.current=t,tf.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);jm(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=j.useRef(!1);jm(()=>(te.current=!0,()=>{te.current=!1}),[]),jm(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,ee);ee()}},[b,x,ee,E,T]);let ne=j.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),k=j.useMemo(()=>({reference:b,floating:x}),[b,x]),re=j.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=Pm(k.floating,u.x),r=Pm(k.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Nm(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,u.x,u.y]);return j.useMemo(()=>({...u,update:ee,refs:ne,elements:k,floatingStyles:re}),[u,ee,ne,k,re])}var Mte=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:km({element:r.current,padding:i}).fn(n):r?km({element:r,padding:i}).fn(n):{}}}},Lm=(e,t)=>{let n=wm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rm=(e,t)=>{let n=Tm(e);return{name:n.name,fn:n.fn,options:[e,t]}},zm=(e,t)=>({fn:jte(e).fn,options:[e,t]}),Bm=(e,t)=>{let n=Em(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vm=(e,t)=>{let n=Dm(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hm=(e,t)=>{let n=Om(e);return{name:n.name,fn:n.fn,options:[e,t]}},Um=(e,t)=>{let n=Mte(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nte=`Arrow`,Wm=j.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,M.jsx)(gf.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,M.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Wm.displayName=Nte;var Pte=Wm;function Gm(e){let[t,n]=j.useState(void 0);return yf(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Km=`Popper`,[qm,Jm]=$d(Km),[Fte,Ym]=qm(Km),Xm=e=>{let{__scopePopper:t,children:n}=e,[r,i]=j.useState(null),[a,o]=j.useState(void 0);return(0,M.jsx)(Fte,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};Xm.displayName=Km;var Zm=`PopperAnchor`,Qm=j.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Ym(Zm,n),o=j.useRef(null),s=a.onAnchorChange,c=Qd(t,j.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=j.useRef(null);j.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&rh(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,M.jsx)(gf.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});Qm.displayName=Zm;var $m=`PopperContent`,[Ite,Lte]=qm($m),eh=j.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Ym($m,n),[_,v]=j.useState(null),y=Qd(t,v),[b,x]=j.useState(null),S=Gm(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,ee={padding:E,boundary:D.filter(zte),altBoundary:O},{refs:te,floatingStyles:ne,placement:k,isPositioned:re,middlewareData:ie}=Im({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>Cm(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[Lm({mainAxis:i+w,alignmentAxis:o}),c&&Rm({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?zm():void 0,...ee}),c&&Bm({...ee}),Vm({...ee,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Um({element:b,padding:s}),Bte({arrowWidth:C,arrowHeight:w}),f&&Hm({strategy:`referenceHidden`,...ee,boundary:O?ee.boundary:void 0})]}),ae=g.setPlacementState;yf(()=>(ae(k),()=>{ae(void 0)}),[k,ae]);let[A,oe]=rh(k),se=vf(m);yf(()=>{re&&se?.()},[re,se]);let ce=ie.arrow?.x,le=ie.arrow?.y,ue=ie.arrow?.centerOffset!==0,[de,fe]=j.useState();return yf(()=>{_&&fe(window.getComputedStyle(_).zIndex)},[_]),(0,M.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:re?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,M.jsx)(Ite,{scope:n,placedSide:A,placedAlign:oe,onArrowChange:x,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,M.jsx)(gf.div,{"data-side":A,"data-align":oe,...h,ref:y,style:{...h.style,animation:re?void 0:`none`}})})})});eh.displayName=$m;var th=`PopperArrow`,Rte={top:`bottom`,right:`left`,bottom:`top`,left:`right`},nh=j.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Lte(th,n),a=Rte[i.placedSide];return(0,M.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,M.jsx)(Pte,{...r,ref:t,style:{...r.style,display:`block`}})})});nh.displayName=th;function zte(e){return e!==null}var Bte=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=rh(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function rh(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var ih=Xm,ah=Qm,oh=eh,sh=nh,Vte=`Portal`,ch=j.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=j.useState(!1);yf(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?tf.createPortal((0,M.jsx)(gf.div,{...r,ref:t}),o):null});ch.displayName=Vte;function Hte(e,t){return j.useReducer((e,n)=>t[e][n]??e,e)}var lh=e=>{let{present:t,children:n}=e,r=Ute(t),i=typeof n==`function`?n({present:r.isPresent}):j.Children.only(n),a=Wte(r.ref,Gte(i));return typeof n==`function`||r.isPresent?j.cloneElement(i,{ref:a}):null};lh.displayName=`Presence`;function Ute(e){let[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef(`none`),[o,s]=Hte(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return j.useEffect(()=>{let e=dh(r.current);a.current=o===`mounted`?e:`none`},[o]),yf(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=dh(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),yf(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=dh(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=dh(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:j.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function uh(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Wte(...e){let t=j.useRef(e);return t.current=e,j.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=uh(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():uh(n[e],null)}}},[])}function dh(e){return e?.animationName||`none`}function Gte(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kte=j.useInsertionEffect||yf;function fh({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=qte({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=j.useRef(e!==void 0);j.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,j.useCallback(t=>{if(s){let n=Jte(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function qte({defaultProp:e,onChange:t}){let[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return Kte(()=>{a.current=t},[t]),j.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Jte(e){return typeof e==`function`}var Yte=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Xte=`VisuallyHidden`,ph=j.forwardRef((e,t)=>(0,M.jsx)(gf.span,{...e,ref:t,style:{...Yte,...e.style}}));ph.displayName=Xte;var Zte=ph,[mh,Qte]=$d(`Tooltip`,[Jm]),hh=Jm(),gh=`TooltipProvider`,$te=700,_h=`tooltip.open`,[ene,vh]=mh(gh),yh=e=>{let{__scopeTooltip:t,delayDuration:n=$te,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=j.useRef(!0),s=j.useRef(!1),c=j.useRef(0);return j.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,M.jsx)(ene,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:j.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:j.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:j.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};yh.displayName=gh;var bh=`Tooltip`,[tne,xh]=mh(bh),Sh=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=vh(bh,e.__scopeTooltip),l=hh(t),[u,d]=j.useState(null),f=zf(),p=j.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=j.useRef(!1),[_,v]=fh({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(_h))):c.onClose(),a?.(e)},caller:bh}),y=j.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=j.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=j.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=j.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return j.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,M.jsx)(ih,{...l,children:(0,M.jsx)(tne,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:j.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:j.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};Sh.displayName=bh;var Ch=`TooltipTrigger`,wh=j.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=xh(Ch,n),a=vh(Ch,n),o=hh(n),s=Qd(t,j.useRef(null),i.onTriggerChange),c=j.useRef(!1),l=j.useRef(!1),u=j.useCallback(()=>c.current=!1,[]);return j.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,M.jsx)(ah,{asChild:!0,...o,children:(0,M.jsx)(gf.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:F(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:F(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:F(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:F(e.onBlur,i.onClose),onClick:F(e.onClick,i.onClose)})})});wh.displayName=Ch;var Th=`TooltipPortal`,[nne,rne]=mh(Th,{forceMount:void 0}),Eh=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=xh(Th,t);return(0,M.jsx)(nne,{scope:t,forceMount:n,children:(0,M.jsx)(lh,{present:n||a.open,children:(0,M.jsx)(ch,{asChild:!0,container:i,children:r})})})};Eh.displayName=Th;var Dh=`TooltipContent`,Oh=j.forwardRef((e,t)=>{let n=rne(Dh,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=xh(Dh,e.__scopeTooltip);return(0,M.jsx)(lh,{present:r||o.open,children:o.disableHoverableContent?(0,M.jsx)(kh,{side:i,...a,ref:t}):(0,M.jsx)(ine,{side:i,...a,ref:t})})}),ine=j.forwardRef((e,t)=>{let n=xh(Dh,e.__scopeTooltip),r=vh(Dh,e.__scopeTooltip),i=j.useRef(null),a=Qd(t,i),[o,s]=j.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=j.useCallback(()=>{s(null),d(!1)},[d]),p=j.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=une(r,lne(r,n.getBoundingClientRect())),a=dne(t.getBoundingClientRect());s(pne([...i,...a])),d(!0)},[d]);return j.useEffect(()=>()=>f(),[f]),j.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),j.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!fne(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,M.jsx)(kh,{...e,ref:a})}),[ane,one]=mh(bh,{isInside:!1}),sne=af(`TooltipContent`),kh=j.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=xh(Dh,n),l=hh(n),{onClose:u}=c;return j.useEffect(()=>(document.addEventListener(_h,u),()=>document.removeEventListener(_h,u)),[u]),j.useEffect(()=>{if(c.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,M.jsx)(kf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,M.jsxs)(oh,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,M.jsx)(sne,{children:r}),(0,M.jsx)(ane,{scope:n,isInside:!0,children:(0,M.jsx)(Zte,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Oh.displayName=Dh;var Ah=`TooltipArrow`,cne=j.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=hh(n);return one(Ah,n).isInside?null:(0,M.jsx)(sh,{...i,...r,ref:t})});cne.displayName=Ah;function lne(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function une(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function dne(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function fne(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function pne(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),mne(t)}function mne(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var hne=yh,gne=Sh,_ne=wh,vne=Eh,yne=Oh,jh=`focusScope.autoFocusOnMount`,Mh=`focusScope.autoFocusOnUnmount`,Nh={bubbles:!1,cancelable:!0},bne=`FocusScope`,Ph=j.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=j.useState(null),l=vf(i),u=vf(a),d=j.useRef(null),f=Qd(t,c),p=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Lh(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Lh(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Lh(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),j.useEffect(()=>{if(s){Rh.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(jh,Nh);s.addEventListener(jh,l),s.dispatchEvent(t),t.defaultPrevented||(xne(Ene(Fh(s)),{select:!0}),document.activeElement===e&&Lh(s))}return()=>{s.removeEventListener(jh,l),setTimeout(()=>{let t=new CustomEvent(Mh,Nh);s.addEventListener(Mh,u),s.dispatchEvent(t),t.defaultPrevented||Lh(e??document.body,{select:!0}),s.removeEventListener(Mh,u),Rh.remove(p)},0)}}},[s,l,u,p]);let m=j.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Sne(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Lh(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Lh(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,M.jsx)(gf.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Ph.displayName=bne;function xne(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Lh(r,{select:t}),document.activeElement!==n)return}function Sne(e){let t=Fh(e);return[Ih(t,e),Ih(t.reverse(),e)]}function Fh(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ih(e,t){for(let n of e)if(!Cne(n,{upTo:t}))return n}function Cne(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function wne(e){return e instanceof HTMLInputElement&&`select`in e}function Lh(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&wne(e)&&t&&e.select()}}var Rh=Tne();function Tne(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=zh(e,t),e.unshift(t)},remove(t){e=zh(e,t),e[0]?.resume()}}}function zh(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ene(e){return e.filter(e=>e.tagName!==`A`)}var Bh=0,Vh=null;function Hh(){j.useEffect(()=>{Vh||={start:Uh(),end:Uh()};let{start:e,end:t}=Vh;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Bh++,()=>{Bh===1&&(Vh?.start.remove(),Vh?.end.remove(),Vh=null),Bh=Math.max(0,Bh-1)}},[])}function Uh(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Wh=function(){return Wh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wh.apply(this,arguments)};function Gh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Dne(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Kh=`right-scroll-bar-position`,qh=`width-before-scroll-bar`,Jh=`with-scroll-bars-hidden`,Yh=`--removed-body-scroll-bar-size`;function Xh(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Zh(e,t){var n=(0,j.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Qh=typeof window<`u`?j.useLayoutEffect:j.useEffect,$h=new WeakMap;function One(e,t){var n=Zh(t||null,function(t){return e.forEach(function(e){return Xh(e,t)})});return Qh(function(){var t=$h.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Xh(e,null)}),i.forEach(function(e){r.has(e)||Xh(e,a)})}$h.set(n,e)},[e]),n}function kne(e){return e}function Ane(e,t){t===void 0&&(t=kne);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function jne(e){e===void 0&&(e={});var t=Ane(null);return t.options=Wh({async:!0,ssr:!1},e),t}var eg=function(e){var t=e.sideCar,n=Gh(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return j.createElement(r,Wh({},n))};eg.isSideCarExport=!0;function tg(e,t){return e.useMedium(t),eg}var ng=jne(),rg=function(){},ig=j.forwardRef(function(e,t){var n=j.useRef(null),r=j.useState({onScrollCapture:rg,onWheelCapture:rg,onTouchMoveCapture:rg}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Gh(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=One([n,t]),C=Wh(Wh({},b),i);return j.createElement(j.Fragment,null,u&&j.createElement(x,{sideCar:ng,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?j.cloneElement(j.Children.only(s),Wh(Wh({},C),{ref:S})):j.createElement(v,Wh({},C,{className:c,ref:S}),s))});ig.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},ig.classNames={fullWidth:qh,zeroRight:Kh};var ag,og=function(){if(ag)return ag;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function sg(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=og();return t&&e.setAttribute(`nonce`,t),e}function cg(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lg(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ug=function(){var e=0,t=null;return{add:function(n){e==0&&(t=sg())&&(cg(t,n),lg(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dg=function(){var e=ug();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fg=function(){var e=dg();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},pg={left:0,top:0,right:0,gap:0},mg=function(e){return parseInt(e||``,10)||0},hg=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[mg(n),mg(r),mg(i)]},gg=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return pg;var t=hg(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_g=fg(),vg=`data-scroll-locked`,yg=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
5
+ .${Jh} {
6
6
  overflow: hidden ${r};
7
7
  padding-right: ${s}px ${r};
8
8
  }
9
- body[${jg}] {
9
+ body[${vg}] {
10
10
  overflow: hidden ${r};
11
11
  overscroll-behavior: contain;
12
12
  ${[t&&`position: relative ${r};`,n===`margin`&&`
@@ -19,29 +19,29 @@ import{a as e,n as t,o as n,r,t as i}from"./rolldown-runtime-BM3Ffeng.js";import
19
19
  `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
20
20
  }
21
21
 
22
- .${og} {
22
+ .${Kh} {
23
23
  right: ${s}px ${r};
24
24
  }
25
25
 
26
- .${sg} {
26
+ .${qh} {
27
27
  margin-right: ${s}px ${r};
28
28
  }
29
29
 
30
- .${og} .${og} {
30
+ .${Kh} .${Kh} {
31
31
  right: 0 ${r};
32
32
  }
33
33
 
34
- .${sg} .${sg} {
34
+ .${qh} .${qh} {
35
35
  margin-right: 0 ${r};
36
36
  }
37
37
 
38
- body[${jg}] {
39
- ${lg}: ${s}px;
38
+ body[${vg}] {
39
+ ${Yh}: ${s}px;
40
40
  }
41
- `},Ng=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Pg=function(){j.useEffect(function(){return document.body.setAttribute(jg,(Ng()+1).toString()),function(){var e=Ng()-1;e<=0?document.body.removeAttribute(jg):document.body.setAttribute(jg,e.toString())}},[])},Fg=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Pg();var a=j.useMemo(function(){return kg(i)},[i]);return j.createElement(Ag,{styles:Mg(a,!t,i,n?``:`!important`)})},Ig=!1;if(typeof window<`u`)try{var Lg=Object.defineProperty({},`passive`,{get:function(){return Ig=!0,!0}});window.addEventListener(`test`,Lg,Lg),window.removeEventListener(`test`,Lg,Lg)}catch{Ig=!1}var Rg=Ig?{passive:!1}:!1,zg=function(e){return e.tagName===`TEXTAREA`},Bg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!zg(e)&&n[t]===`visible`)},Vg=function(e){return Bg(e,`overflowY`)},Hg=function(e){return Bg(e,`overflowX`)},Ug=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Kg(e,r)){var i=qg(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Wg=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Gg=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Kg=function(e,t){return e===`v`?Vg(t):Hg(t)},qg=function(e,t){return e===`v`?Wg(t):Gg(t)},Jg=function(e,t){return e===`h`&&t===`rtl`?-1:1},Yg=function(e,t,n,r,i){var a=Jg(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=qg(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Kg(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Xg=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zg=function(e){return[e.deltaX,e.deltaY]},Qg=function(e){return e&&`current`in e?e.current:e},$g=function(e,t){return e[0]===t[0]&&e[1]===t[1]},e_=function(e){return`
41
+ `},bg=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},xg=function(){j.useEffect(function(){return document.body.setAttribute(vg,(bg()+1).toString()),function(){var e=bg()-1;e<=0?document.body.removeAttribute(vg):document.body.setAttribute(vg,e.toString())}},[])},Sg=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;xg();var a=j.useMemo(function(){return gg(i)},[i]);return j.createElement(_g,{styles:yg(a,!t,i,n?``:`!important`)})},Cg=!1;if(typeof window<`u`)try{var wg=Object.defineProperty({},`passive`,{get:function(){return Cg=!0,!0}});window.addEventListener(`test`,wg,wg),window.removeEventListener(`test`,wg,wg)}catch{Cg=!1}var Tg=Cg?{passive:!1}:!1,Eg=function(e){return e.tagName===`TEXTAREA`},Dg=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Eg(e)&&n[t]===`visible`)},Og=function(e){return Dg(e,`overflowY`)},kg=function(e){return Dg(e,`overflowX`)},Ag=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),jg(e,r)){var i=Mg(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Mne=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Nne=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},jg=function(e,t){return e===`v`?Og(t):kg(t)},Mg=function(e,t){return e===`v`?Mne(t):Nne(t)},Pne=function(e,t){return e===`h`&&t===`rtl`?-1:1},Fne=function(e,t,n,r,i){var a=Pne(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Mg(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&jg(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ng=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pg=function(e){return[e.deltaX,e.deltaY]},Fg=function(e){return e&&`current`in e?e.current:e},Ig=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Lg=function(e){return`
42
42
  .block-interactivity-${e} {pointer-events: none;}
43
43
  .allow-interactivity-${e} {pointer-events: all;}
44
- `},t_=0,n_=[];function r_(e){var t=j.useRef([]),n=j.useRef([0,0]),r=j.useRef(),i=j.useState(t_++)[0],a=j.useState(Eg)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ag([e.lockRef.current],(e.shards||[]).map(Qg),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=j.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Xg(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ug(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ug(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Yg(h,t,e,h===`h`?s:c,!0)},[]),c=j.useCallback(function(e){var n=e;if(!(!n_.length||n_[n_.length-1]!==a)){var r=`deltaY`in n?Zg(n):Xg(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&$g(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Qg).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=j.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:i_(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=j.useCallback(function(e){n.current=Xg(e),r.current=void 0},[]),d=j.useCallback(function(t){l(t.type,Zg(t),t.target,s(t,e.lockRef.current))},[]),f=j.useCallback(function(t){l(t.type,Xg(t),t.target,s(t,e.lockRef.current))},[]);j.useEffect(function(){return n_.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Rg),document.addEventListener(`touchmove`,c,Rg),document.addEventListener(`touchstart`,u,Rg),function(){n_=n_.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Rg),document.removeEventListener(`touchmove`,c,Rg),document.removeEventListener(`touchstart`,u,Rg)}},[]);var p=e.removeScrollBar,m=e.inert;return j.createElement(j.Fragment,null,m?j.createElement(a,{styles:e_(i)}):null,p?j.createElement(Fg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function i_(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var a_=yg(bg,r_),o_=j.forwardRef(function(e,t){return j.createElement(Sg,rg({},e,{ref:t,sideCar:a_}))});o_.classNames=Sg.classNames;var s_=`Popover`,[c_,One]=nf(s_,[Zm]),l_=Zm(),[u_,d_]=c_(s_),f_=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=l_(t),c=j.useRef(null),[l,u]=j.useState(!1),[d,f]=hh({prop:r,defaultProp:i??!1,onChange:a,caller:s_});return(0,M.jsx)(sh,{...s,children:(0,M.jsx)(u_,{scope:t,contentId:Hf(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:j.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:j.useCallback(()=>u(!0),[]),onCustomAnchorRemove:j.useCallback(()=>u(!1),[]),modal:o,children:n})})};f_.displayName=s_;var p_=`PopoverAnchor`,m_=j.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=d_(p_,n),a=l_(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return j.useEffect(()=>(o(),()=>s()),[o,s]),(0,M.jsx)(ch,{...a,...r,ref:t})});m_.displayName=p_;var h_=`PopoverTrigger`,g_=j.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=d_(h_,n),a=l_(n),o=tf(t,i.triggerRef),s=(0,M.jsx)(yf.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":j_(i.open),...r,ref:o,onClick:F(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,M.jsx)(ch,{asChild:!0,...a,children:s})});g_.displayName=h_;var __=`PopoverPortal`,[v_,y_]=c_(__,{forceMount:void 0}),b_=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=d_(__,t);return(0,M.jsx)(v_,{scope:t,forceMount:n,children:(0,M.jsx)(fh,{present:n||a.open,children:(0,M.jsx)(dh,{asChild:!0,container:i,children:r})})})};b_.displayName=__;var x_=`PopoverContent`,S_=j.forwardRef((e,t)=>{let n=y_(x_,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=d_(x_,e.__scopePopover);return(0,M.jsx)(fh,{present:r||a.open,children:a.modal?(0,M.jsx)(w_,{...i,ref:t}):(0,M.jsx)(T_,{...i,ref:t})})});S_.displayName=x_;var C_=of(`PopoverContent.RemoveScroll`),w_=j.forwardRef((e,t)=>{let n=d_(x_,e.__scopePopover),r=j.useRef(null),i=tf(t,r),a=j.useRef(!1);return j.useEffect(()=>{let e=r.current;if(e)return ng(e)},[]),(0,M.jsx)(o_,{as:C_,allowPinchZoom:!0,children:(0,M.jsx)(E_,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),T_=j.forwardRef((e,t)=>{let n=d_(x_,e.__scopePopover),r=j.useRef(!1),i=j.useRef(!1);return(0,M.jsx)(E_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),E_=j.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=d_(x_,n),p=l_(n);return Ih(),(0,M.jsx)(Vh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(Mf,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,M.jsx)(lh,{"data-state":j_(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),D_=`PopoverClose`,O_=j.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=d_(D_,n);return(0,M.jsx)(yf.button,{type:`button`,...r,ref:t,onClick:F(e.onClick,()=>i.onOpenChange(!1))})});O_.displayName=D_;var k_=`PopoverArrow`,A_=j.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=l_(n);return(0,M.jsx)(uh,{...i,...r,ref:t})});A_.displayName=k_;function j_(e){return e?`open`:`closed`}var M_=f_,N_=m_,P_=g_,F_=b_,I_=S_,L_=O_;function R_(e,t=[]){let n=[];function r(t,r){let i=j.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=j.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=j.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>j.createContext(e));return function(n){let r=n?.[e]||t;return j.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,z_(i,...t)]}function z_(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function B_(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var V_=globalThis?.document?j.useLayoutEffect:()=>{},H_=j.useInsertionEffect||V_;function U_({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=W_({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=j.useRef(e!==void 0);j.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,j.useCallback(t=>{if(s){let n=G_(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function W_({defaultProp:e,onChange:t}){let[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return H_(()=>{a.current=t},[t]),j.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function G_(e){return typeof e==`function`}function K_(e){let t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function q_(e){let[t,n]=j.useState(void 0);return V_(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function J_(e,t){return j.useReducer((e,n)=>t[e][n]??e,e)}var Y_=e=>{let{present:t,children:n}=e,r=kne(t),i=typeof n==`function`?n({present:r.isPresent}):j.Children.only(n),a=nu(r.ref,Ane(i));return typeof n==`function`||r.isPresent?j.cloneElement(i,{ref:a}):null};Y_.displayName=`Presence`;function kne(e){let[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef(`none`),[o,s]=J_(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return j.useEffect(()=>{let e=X_(r.current);a.current=o===`mounted`?e:`none`},[o]),V_(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=X_(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),V_(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=X_(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=X_(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:j.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function X_(e){return e?.animationName||`none`}function Ane(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Z_(e){let t=jne(e),n=j.forwardRef((e,n)=>{let{children:r,...i}=e,a=j.Children.toArray(r),o=a.find(Nne);if(o){let e=o.props.children,r=a.map(t=>t===o?j.Children.count(e)>1?j.Children.only(null):j.isValidElement(e)?e.props.children:null:t);return(0,M.jsx)(t,{...i,ref:n,children:j.isValidElement(e)?j.cloneElement(e,void 0,r):null})}return(0,M.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function jne(e){let t=j.forwardRef((e,t)=>{let{children:n,...r}=e;if(j.isValidElement(n)){let e=Fne(n),i=Pne(r,n.props);return n.type!==j.Fragment&&(i.ref=t?tu(t,e):e),j.cloneElement(n,i)}return j.Children.count(n)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mne=Symbol(`radix.slottable`);function Nne(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Mne}function Pne(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Fne(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Q_=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Z_(`Primitive.${t}`),r=j.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),$_=`Checkbox`,[Ine,Lne]=R_($_),[Rne,ev]=Ine($_);function zne(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=U_({prop:n,defaultProp:i??!1,onChange:c,caller:$_}),[m,h]=j.useState(null),[g,_]=j.useState(null),v=j.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:lv(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,M.jsx)(Rne,{scope:t,...b,children:cv(d)?d(b):r})}var tv=`CheckboxTrigger`,nv=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=ev(tv,e),h=nu(i,u),g=j.useRef(c);return j.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,M.jsx)(Q_.button,{type:`button`,role:`checkbox`,"aria-checked":lv(c)?`mixed`:c,"aria-required":l,"data-state":uv(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:B_(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:B_(n,e=>{d(e=>lv(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});nv.displayName=tv;var rv=j.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,M.jsx)(zne,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(nv,{...d,ref:t,__scopeCheckbox:n}),e&&(0,M.jsx)(sv,{__scopeCheckbox:n})]})})});rv.displayName=$_;var iv=`CheckboxIndicator`,av=j.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=ev(iv,n);return(0,M.jsx)(Y_,{present:r||lv(a.checked)||a.checked===!0,children:(0,M.jsx)(Q_.span,{"data-state":uv(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});av.displayName=iv;var ov=`CheckboxBubbleInput`,sv=j.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=ev(ov,e),m=nu(n,p),h=K_(a),g=q_(r);j.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=lv(a),n.call(e,lv(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=j.useRef(lv(a)?!1:a);return(0,M.jsx)(Q_.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});sv.displayName=ov;function cv(e){return typeof e==`function`}function lv(e){return e===`indeterminate`}function uv(e){return lv(e)?`indeterminate`:e?`checked`:`unchecked`}function dv(e){let t=e+`CollectionProvider`,[n,r]=nf(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=j.useRef(null),a=j.useRef(new Map).current;return(0,M.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=of(s),l=j.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(c,{ref:tf(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=of(u),p=j.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=j.useRef(null),s=tf(t,o),c=a(u,n);return j.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,M.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return j.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var fv=j.createContext(void 0);function pv(e){let t=j.useContext(fv);return e||t||`ltr`}var mv=`rovingFocusGroup.onEntryFocus`,hv={bubbles:!1,cancelable:!0},gv=`RovingFocusGroup`,[_v,vv,yv]=dv(gv),[bv,xv]=nf(gv,[yv]),[Sv,Cv]=bv(gv),wv=j.forwardRef((e,t)=>(0,M.jsx)(_v.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(_v.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(Tv,{...e,ref:t})})}));wv.displayName=gv;var Tv=j.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=j.useRef(null),p=tf(t,f),m=pv(a),[h,g]=hh({prop:o,defaultProp:s??null,onChange:c,caller:gv}),[_,v]=j.useState(!1),y=xf(l),b=vv(n),x=j.useRef(!1),[S,C]=j.useState(0);return j.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(mv,y),()=>e.removeEventListener(mv,y)},[y]),(0,M.jsx)(Sv,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:j.useCallback(e=>g(e),[g]),onItemShiftTab:j.useCallback(()=>v(!0),[]),onFocusableItemAdd:j.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:j.useCallback(()=>C(e=>e-1),[]),children:(0,M.jsx)(yf.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:F(e.onMouseDown,()=>{x.current=!0}),onFocus:F(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(mv,hv);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);jv([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:F(e.onBlur,()=>v(!1))})})}),Ev=`RovingFocusGroupItem`,Dv=j.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Hf(),l=a||c,u=Cv(Ev,n),d=u.currentTabStopId===l,f=vv(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return j.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,M.jsx)(_v.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,M.jsx)(yf.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:F(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:F(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:F(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Av(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Mv(n,r+1):n.slice(r+1)}setTimeout(()=>jv(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});Dv.displayName=Ev;var Ov={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function kv(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Av(e,t,n){let r=kv(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Ov[r]}function jv(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Mv(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Nv=wv,Pv=Dv;function Fv(e){let t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Iv=`Radio`,[Lv,Rv]=nf(Iv),[zv,Bv]=Lv(Iv);function Vv(e){let{__scopeRadio:t,checked:n=!1,children:r,disabled:i,form:a,name:o,onCheck:s,required:c,value:l=`on`,internal_do_not_use_render:u}=e,[d,f]=j.useState(null),[p,m]=j.useState(null),h={checked:n,disabled:i,required:c,name:o,form:a,value:l,control:d,setControl:f,hasConsumerStoppedPropagationRef:j.useRef(!1),isFormControl:d?!!a||!!d.closest(`form`):!0,bubbleInput:p,setBubbleInput:m,onCheck:()=>s?.()};return(0,M.jsx)(zv,{scope:t,...h,children:Yv(u)?u(h):r})}var Hv=`RadioTrigger`,Uv=j.forwardRef(({__scopeRadio:e,onClick:t,...n},r)=>{let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,hasConsumerStoppedPropagationRef:l,isFormControl:u,bubbleInput:d}=Bv(Hv,e),f=tf(r,s);return(0,M.jsx)(yf.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":Xv(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:f,onClick:F(t,e=>{i||c(),d&&u&&(l.current=e.isPropagationStopped(),l.current||e.stopPropagation())})})});Uv.displayName=Hv;var Wv=j.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i,required:a,disabled:o,value:s,onCheck:c,form:l,...u}=e;return(0,M.jsx)(Vv,{__scopeRadio:n,checked:i,disabled:o,required:a,onCheck:c,name:r,form:l,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Uv,{...u,ref:t,__scopeRadio:n}),e&&(0,M.jsx)(Jv,{__scopeRadio:n})]})})});Wv.displayName=Iv;var Gv=`RadioIndicator`,Kv=j.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=Bv(Gv,n);return(0,M.jsx)(fh,{present:r||a.checked,children:(0,M.jsx)(yf.span,{"data-state":Xv(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});Kv.displayName=Gv;var qv=`RadioBubbleInput`,Jv=j.forwardRef(({__scopeRadio:e,...t},n)=>{let{control:r,checked:i,required:a,disabled:o,name:s,value:c,form:l,bubbleInput:u,setBubbleInput:d,hasConsumerStoppedPropagationRef:f}=Bv(qv,e),p=tf(n,d),m=Fv(i),h=Jm(r);j.useEffect(()=>{let e=u;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!f.current;if(m!==i&&n){let t=new Event(`click`,{bubbles:r});n.call(e,i),e.dispatchEvent(t)}},[u,m,i,f]);let g=j.useRef(i);return(0,M.jsx)(yf.input,{type:`radio`,"aria-hidden":!0,defaultChecked:g.current,required:a,disabled:o,name:s,value:c,form:l,...t,tabIndex:-1,ref:p,style:{...t.style,...h,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});Jv.displayName=qv;function Yv(e){return typeof e==`function`}function Xv(e){return e?`checked`:`unchecked`}var Zv=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Qv=`RadioGroup`,[$v,Bne]=nf(Qv,[xv,Rv]),ey=xv(),ty=Rv(),[ny,ry]=$v(Qv),iy=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=ey(n),m=pv(l),[h,g]=hh({prop:a,defaultProp:i??null,onChange:d,caller:Qv});return(0,M.jsx)(ny,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,M.jsx)(Nv,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,M.jsx)(yf.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});iy.displayName=Qv;var ay=`RadioGroupItem`,oy=`RadioGroupItemProvider`,sy=`RadioGroupItemTrigger`,cy=`RadioGroupItemBubbleInput`;function ly(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=ry(oy,t),s=ty(t),c=o.disabled||r;return(0,M.jsx)(Vv,{...s,checked:o.value===n,disabled:c,required:o.required,name:o.name,value:n,onCheck:()=>o.onValueChange(n),internal_do_not_use_render:a,children:i})}var uy=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e,i=ey(n),a=ty(n),{checked:o,disabled:s}=Bv(sy,a.__scopeRadio),c=j.useRef(null),l=tf(t,c),u=j.useRef(!1);return j.useEffect(()=>{let e=e=>{Zv.includes(e.key)&&(u.current=!0)},t=()=>u.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,M.jsx)(Pv,{asChild:!0,...i,focusable:!s,active:o,children:(0,M.jsx)(Uv,{...a,...r,ref:l,onKeyDown:F(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:F(r.onFocus,()=>{u.current&&c.current?.click()})})})});uy.displayName=sy;var dy=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,M.jsx)(ly,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(uy,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,M.jsx)(fy,{__scopeRadioGroup:n})]})})});dy.displayName=ay;var fy=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,M.jsx)(Jv,{...ty(n),...r,ref:t})});fy.displayName=cy;var py=`RadioGroupIndicator`,my=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,M.jsx)(Kv,{...ty(n),...r,ref:t})});my.displayName=py;function hy(e){let t=e+`CollectionProvider`,[n,r]=R_(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=j.useRef(null),a=j.useRef(new Map).current;return(0,M.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=Z_(s),l=j.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(c,{ref:nu(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Z_(u),p=j.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=j.useRef(null),s=nu(t,o),c=a(u,n);return j.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,M.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return j.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var gy=j.useId||(()=>void 0),_y=0;function vy(e){let[t,n]=j.useState(gy());return V_(()=>{e||n(e=>e??String(_y++))},[e]),e||(t?`radix-${t}`:``)}function yy(e){let t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...e)=>t.current?.(...e),[])}var by=j.createContext(void 0);function xy(e){let t=j.useContext(by);return e||t||`ltr`}var Sy=`rovingFocusGroup.onEntryFocus`,Cy={bubbles:!1,cancelable:!0},wy=`RovingFocusGroup`,[Ty,Ey,Dy]=hy(wy),[Oy,ky]=R_(wy,[Dy]),[Ay,jy]=Oy(wy),My=j.forwardRef((e,t)=>(0,M.jsx)(Ty.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(Ty.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(Ny,{...e,ref:t})})}));My.displayName=wy;var Ny=j.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=j.useRef(null),p=nu(t,f),m=xy(a),[h,g]=U_({prop:o,defaultProp:s??null,onChange:c,caller:wy}),[_,v]=j.useState(!1),y=yy(l),b=Ey(n),x=j.useRef(!1),[S,C]=j.useState(0);return j.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Sy,y),()=>e.removeEventListener(Sy,y)},[y]),(0,M.jsx)(Ay,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:j.useCallback(e=>g(e),[g]),onItemShiftTab:j.useCallback(()=>v(!0),[]),onFocusableItemAdd:j.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:j.useCallback(()=>C(e=>e-1),[]),children:(0,M.jsx)(Q_.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:B_(e.onMouseDown,()=>{x.current=!0}),onFocus:B_(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Sy,Cy);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);zy([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:B_(e.onBlur,()=>v(!1))})})}),Py=`RovingFocusGroupItem`,Fy=j.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=vy(),l=a||c,u=jy(Py,n),d=u.currentTabStopId===l,f=Ey(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return j.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,M.jsx)(Ty.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,M.jsx)(Q_.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:B_(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:B_(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:B_(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ry(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?By(n,r+1):n.slice(r+1)}setTimeout(()=>zy(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});Fy.displayName=Py;var Iy={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Ly(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ry(e,t,n){let r=Ly(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Iy[r]}function zy(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function By(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Vy=My,Hy=Fy,Uy=`Tabs`,[Wy,Vne]=R_(Uy,[ky]),Gy=ky(),[Ky,qy]=Wy(Uy),Jy=j.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=xy(s),[d,f]=U_({prop:r,onChange:i,defaultProp:a??``,caller:Uy});return(0,M.jsx)(Ky,{scope:n,baseId:vy(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,M.jsx)(Q_.div,{dir:u,"data-orientation":o,...l,ref:t})})});Jy.displayName=Uy;var Yy=`TabsList`,Xy=j.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=qy(Yy,n),o=Gy(n);return(0,M.jsx)(Vy,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,M.jsx)(Q_.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});Xy.displayName=Yy;var Zy=`TabsTrigger`,Qy=j.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=qy(Zy,n),s=Gy(n),c=tb(o.baseId,r),l=nb(o.baseId,r),u=r===o.value;return(0,M.jsx)(Hy,{asChild:!0,...s,focusable:!i,active:u,children:(0,M.jsx)(Q_.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:B_(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:B_(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:B_(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});Qy.displayName=Zy;var $y=`TabsContent`,eb=j.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=qy($y,n),c=tb(s.baseId,r),l=nb(s.baseId,r),u=r===s.value,d=j.useRef(u);return j.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,M.jsx)(Y_,{present:i||u,children:({present:n})=>(0,M.jsx)(Q_.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});eb.displayName=$y;function tb(e,t){return`${e}-trigger-${t}`}function nb(e,t){return`${e}-content-${t}`}var rb=Jy,ib=Xy,ab=Qy,ob=eb;function sb(e,[t,n]){return Math.min(n,Math.max(t,e))}var cb=[`PageUp`,`PageDown`],lb=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],ub={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},db=`Slider`,[fb,pb,mb]=dv(db),[hb,Hne]=nf(db,[mb]),[gb,_b]=hb(db),vb=j.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=j.useRef(new Set),_=j.useRef(0),v=j.useRef(!1),y=o===`horizontal`?xb:Sb,[b=[],x]=hh({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus({preventScroll:!0,focusVisible:v.current}),v.current=!1,d(e)}}),S=j.useRef(b);function C(e){E(e,Vb(b,e))}function w(e){E(e,_.current)}function T(){let e=S.current[_.current];b[_.current]!==e&&f(b)}function E(e,t,{commit:n}={commit:!1}){let o=Kb(a),s=sb(qb(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=Rb(e,s,t);if(Wb(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,M.jsx)(gb,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:b,orientation:o,form:m,children:(0,M.jsx)(fb.Provider,{scope:e.__scopeSlider,children:(0,M.jsx)(fb.Slot,{scope:e.__scopeSlider,children:(0,M.jsx)(y,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:F(h.onPointerDown,()=>{s||(S.current=b,v.current=!1)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>{s||(v.current=!0,E(r,0,{commit:!0}))},onEndKeyDown:()=>{s||(v.current=!0,E(i,b.length-1,{commit:!0}))},onStepKeyDown:({event:e,direction:t})=>{if(!s){v.current=!0;let n=cb.includes(e.key)||e.shiftKey&&lb.includes(e.key)?10:1,r=_.current,i=b[r];E(i+a*n*t,r,{commit:!0})}}})})})})});vb.displayName=db;var[yb,bb]=hb(db,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),xb=j.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=j.useState(null),p=tf(t,f),m=j.useRef(void 0),h=pv(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=Gb([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,M.jsx)(yb,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,M.jsx)(Cb,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=ub[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),Sb=j.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=j.useRef(null),d=tf(t,u),f=j.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=Gb([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,M.jsx)(yb,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,M.jsx)(Cb,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=ub[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),Cb=j.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=_b(db,n);return(0,M.jsx)(yf.span,{...l,ref:t,onKeyDown:F(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):cb.concat(lb).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:F(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus({preventScroll:!0,focusVisible:!1}):r(e)}),onPointerMove:F(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:F(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),wb=`SliderTrack`,Tb=j.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=_b(wb,n);return(0,M.jsx)(yf.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});Tb.displayName=wb;var Eb=`SliderRange`,Db=j.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=_b(Eb,n),a=bb(Eb,n),o=tf(t,j.useRef(null)),s=i.values.length,c=i.values.map(e=>zb(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,M.jsx)(yf.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});Db.displayName=Eb;var Ob=`SliderThumb`,[kb,Ab]=hb(Ob),jb=`SliderThumbProvider`;function Mb(e){let{__scopeSlider:t,name:n,children:r,internal_do_not_use_render:i}=e,a=_b(jb,t),o=pb(t),[s,c]=j.useState(null),l=j.useMemo(()=>s?o().findIndex(e=>e.ref.current===s):-1,[o,s]),u=Jm(s),d=s?!!a.form||!!s.closest(`form`):!0,f=a.values[l],p=n??(a.name?a.name+(a.values.length>1?`[]`:``):void 0),m=f===void 0?0:zb(f,a.min,a.max);j.useEffect(()=>{if(s)return a.thumbs.add(s),()=>{a.thumbs.delete(s)}},[s,a.thumbs]);let h={value:f,name:p,form:a.form,isFormControl:d,index:l,thumb:s,onThumbChange:c,percent:m,size:u};return(0,M.jsx)(kb,{scope:t,...h,children:Jb(i)?i(h):r})}Mb.displayName=jb;var Nb=`SliderThumbTrigger`,Pb=j.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=_b(Nb,n),a=bb(Nb,n),{index:o,value:s,percent:c,size:l,onThumbChange:u}=Ab(Nb,n),d=tf(t,u),f=Bb(o,i.values.length),p=l?.[a.size],m=p?Hb(p,c,a.direction):0;return(0,M.jsx)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[a.startEdge]:`calc(${c}% + ${m}px)`},children:(0,M.jsx)(fb.ItemSlot,{scope:n,children:(0,M.jsx)(yf.span,{role:`slider`,"aria-label":e[`aria-label`]||f,"aria-valuemin":i.min,"aria-valuenow":s,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,tabIndex:i.disabled?void 0:0,...r,ref:d,style:s===void 0?{display:`none`}:e.style,onFocus:F(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})})})});Pb.displayName=Nb;var Fb=j.forwardRef((e,t)=>{let{__scopeSlider:n,name:r,...i}=e;return(0,M.jsx)(Mb,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:e,isFormControl:r})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Pb,{...i,ref:t,__scopeSlider:n}),r?(0,M.jsx)(Lb,{__scopeSlider:n},e):null]})})});Fb.displayName=Ob;var Ib=`SliderBubbleInput`,Lb=j.forwardRef(({__scopeSlider:e,...t},n)=>{let{value:r,name:i,form:a}=Ab(Ib,e),o=j.useRef(null),s=tf(o,n),c=Fv(r);return j.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(c!==r&&n){let t=new Event(`input`,{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[c,r]),(0,M.jsx)(yf.input,{style:{display:`none`},name:i,form:a,...t,ref:s,defaultValue:r})});Lb.displayName=Ib;function Rb(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function zb(e,t,n){return sb(100/(n-t)*(e-t),[0,100])}function Bb(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function Vb(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function Hb(e,t,n){let r=e/2;return(r-Gb([0,50],[0,r])(t)*n)*n}function Ub(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function Wb(e,t){if(t>0){let n=Ub(e);return Math.min(...n)>=t}return!0}function Gb(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Kb(e){if(!Number.isFinite(e))return 0;let t=e.toString();if(t.includes(`e`)){let[e,n]=t.split(`e`),r=e.split(`.`)[1]||``,i=Number(n);return Math.max(0,r.length-i)}let n=t.split(`.`)[1];return n?n.length:0}function qb(e,t){let n=10**t;return Math.round(e*n)/n}function Jb(e){return typeof e==`function`}var Yb=`Dialog`,[Xb,Une]=nf(Yb),[Zb,Qb]=Xb(Yb),$b=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=j.useRef(null),c=j.useRef(null),[l,u]=hh({prop:r,defaultProp:i??!1,onChange:a,caller:Yb});return(0,M.jsx)(Zb,{scope:t,triggerRef:s,contentRef:c,contentId:Hf(),titleId:Hf(),descriptionId:Hf(),open:l,onOpenChange:u,onOpenToggle:j.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};$b.displayName=Yb;var ex=`DialogTrigger`,tx=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Qb(ex,n),a=tf(t,i.triggerRef);return(0,M.jsx)(yf.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":gx(i.open),...r,ref:a,onClick:F(e.onClick,i.onOpenToggle)})});tx.displayName=ex;var nx=`DialogPortal`,[Wne,rx]=Xb(nx,{forceMount:void 0}),ix=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Qb(nx,t);return(0,M.jsx)(Wne,{scope:t,forceMount:n,children:j.Children.map(r,e=>(0,M.jsx)(fh,{present:n||a.open,children:(0,M.jsx)(dh,{asChild:!0,container:i,children:e})}))})};ix.displayName=nx;var ax=`DialogOverlay`,ox=j.forwardRef((e,t)=>{let n=rx(ax,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Qb(ax,e.__scopeDialog);return a.modal?(0,M.jsx)(fh,{present:r||a.open,children:(0,M.jsx)(Kne,{...i,ref:t})}):null});ox.displayName=ax;var Gne=of(`DialogOverlay.RemoveScroll`),Kne=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Qb(ax,n),a=tf(t,Ff());return(0,M.jsx)(o_,{as:Gne,allowPinchZoom:!0,shards:[i.contentRef],children:(0,M.jsx)(yf.div,{"data-state":gx(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),sx=`DialogContent`,cx=j.forwardRef((e,t)=>{let n=rx(sx,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Qb(sx,e.__scopeDialog);return(0,M.jsx)(fh,{present:r||a.open,children:a.modal?(0,M.jsx)(qne,{...i,ref:t}):(0,M.jsx)(Jne,{...i,ref:t})})});cx.displayName=sx;var qne=j.forwardRef((e,t)=>{let n=Qb(sx,e.__scopeDialog),r=j.useRef(null),i=tf(t,n.contentRef,r);return j.useEffect(()=>{let e=r.current;if(e)return ng(e)},[]),(0,M.jsx)(lx,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault())})}),Jne=j.forwardRef((e,t)=>{let n=Qb(sx,e.__scopeDialog),r=j.useRef(!1),i=j.useRef(!1);return(0,M.jsx)(lx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),lx=j.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Qb(sx,n);return Ih(),(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(Vh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(Mf,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":gx(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),ux=`DialogTitle`,dx=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Qb(ux,n);return(0,M.jsx)(yf.h2,{id:i.titleId,...r,ref:t})});dx.displayName=ux;var fx=`DialogDescription`,px=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Qb(fx,n);return(0,M.jsx)(yf.p,{id:i.descriptionId,...r,ref:t})});px.displayName=fx;var mx=`DialogClose`,hx=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Qb(mx,n);return(0,M.jsx)(yf.button,{type:`button`,...r,ref:t,onClick:F(e.onClick,()=>i.onOpenChange(!1))})});hx.displayName=mx;function gx(e){return e?`open`:`closed`}function Yne(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Xne=e=>{switch(e){case`success`:return $ne;case`info`:return tre;case`warning`:return ere;case`error`:return nre;default:return null}},Zne=Array(12).fill(0),Qne=({visible:e,className:t})=>j.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},j.createElement(`div`,{className:`sonner-spinner`},Zne.map((e,t)=>j.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),$ne=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},j.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),ere=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},j.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),tre=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},j.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),nre=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},j.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),rre=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},j.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),j.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ire=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},_x=1,vx=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:_x++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],j.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(ore(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!j.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!j.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!j.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!j.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||_x++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},are=(e,t)=>{let n=t?.id||_x++;return vx.addToast({title:e,...t,id:n}),n},ore=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,sre=Object.assign(are,{success:vx.success,info:vx.info,warning:vx.warning,error:vx.error,custom:vx.custom,message:vx.message,promise:vx.promise,dismiss:vx.dismiss,loading:vx.loading},{getHistory:()=>vx.toasts,getToasts:()=>vx.getActiveToasts()});Yne(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function yx(e){return e.label!==void 0}var cre=3,lre=`24px`,ure=`16px`,bx=4e3,dre=356,fre=14,pre=45,mre=200;function xx(...e){return e.filter(Boolean).join(` `)}function hre(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var gre=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=j.useState(null),[O,ee]=j.useState(null),[te,ne]=j.useState(!1),[k,re]=j.useState(!1),[ie,ae]=j.useState(!1),[A,oe]=j.useState(!1),[se,ce]=j.useState(!1),[le,ue]=j.useState(0),[de,fe]=j.useState(0),pe=j.useRef(n.duration||y||bx),me=j.useRef(null),he=j.useRef(null),ge=c===0,_e=c+1<=o,ve=n.type,ye=n.dismissible!==!1,be=n.className||``,xe=n.descriptionClassName||``,Se=j.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Ce=j.useMemo(()=>n.closeButton??p,[n.closeButton,p]),we=j.useMemo(()=>n.duration||y||bx,[n.duration,y]),Te=j.useRef(0),Ee=j.useRef(0),De=j.useRef(0),Oe=j.useRef(null),[ke,Ae]=b.split(`-`),je=j.useMemo(()=>s.reduce((e,t,n)=>n>=Se?e:e+t.height,0),[s,Se]),Me=ire(),Ne=n.invert||t,Pe=ve===`loading`;Ee.current=j.useMemo(()=>Se*x+je,[Se,je]),j.useEffect(()=>{pe.current=we},[we]),j.useEffect(()=>{ne(!0)},[]),j.useEffect(()=>{let e=he.current;if(e){let t=e.getBoundingClientRect().height;return fe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),j.useLayoutEffect(()=>{if(!te)return;let e=he.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,fe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[te,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Fe=j.useCallback(()=>{re(!0),ue(Ee.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},mre)},[n,d,a,Ee]);j.useEffect(()=>{if(n.promise&&ve===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Me?(()=>{if(De.current<Te.current){let e=new Date().getTime()-Te.current;pe.current-=e}De.current=new Date().getTime()})():pe.current!==1/0&&(Te.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Fe()},pe.current)),()=>clearTimeout(e)},[u,i,n,ve,Me,Fe]),j.useEffect(()=>{n.delete&&(Fe(),n.onDismiss==null||n.onDismiss.call(n,n))},[Fe,n.delete]);function Ie(){return w?.loading?j.createElement(`div`,{className:xx(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":ve===`loading`},w.loading):j.createElement(Qne,{className:xx(C?.loader,n?.classNames?.loader),visible:ve===`loading`})}let Le=n.icon||w?.[ve]||Xne(ve);return j.createElement(`li`,{tabIndex:0,ref:he,className:xx(_,be,C?.toast,n?.classNames?.toast,C?.default,C?.[ve],n?.classNames?.[ve]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":te,"data-promise":!!n.promise,"data-swiped":se,"data-removed":k,"data-visible":_e,"data-y-position":ke,"data-x-position":Ae,"data-index":c,"data-front":ge,"data-swiping":ie,"data-dismissible":ye,"data-type":ve,"data-invert":Ne,"data-swipe-out":A,"data-swipe-direction":O,"data-expanded":!!(u||S&&te),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${k?le:Ee.current}px`,"--initial-height":S?`auto`:`${de}px`,...m,...n.style},onDragEnd:()=>{ae(!1),D(null),Oe.current=null},onPointerDown:e=>{e.button!==2&&(Pe||!ye||(me.current=new Date,ue(Ee.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ae(!0),Oe.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(A||!ye)return;Oe.current=null;let e=Number(he.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(he.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-me.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=pre||a>.11){ue(Ee.current),n.onDismiss==null||n.onDismiss.call(n,n),ee(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Fe(),oe(!0);return}else{var o,s;(o=he.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=he.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}ce(!1),ae(!1),D(null)},onPointerMove:t=>{var n,r;if(!Oe.current||!ye||window.getSelection()?.toString().length>0)return;let i=t.clientY-Oe.current.y,a=t.clientX-Oe.current.x,o=e.swipeDirections??hre(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(E===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&ce(!0),(n=he.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=he.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},Ce&&!n.jsx&&ve!==`loading`?j.createElement(`button`,{"aria-label":T,"data-disabled":Pe,"data-close-button":!0,onClick:Pe||!ye?()=>{}:()=>{Fe(),n.onDismiss==null||n.onDismiss.call(n,n)},className:xx(C?.closeButton,n?.classNames?.closeButton)},w?.close??rre):null,(ve||n.icon||n.promise)&&n.icon!==null&&(w?.[ve]!==null||n.icon)?j.createElement(`div`,{"data-icon":``,className:xx(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ie():null,n.type===`loading`?null:Le):null,j.createElement(`div`,{"data-content":``,className:xx(C?.content,n?.classNames?.content)},j.createElement(`div`,{"data-title":``,className:xx(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?j.createElement(`div`,{"data-description":``,className:xx(v,xe,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),j.isValidElement(n.cancel)?n.cancel:n.cancel&&yx(n.cancel)?j.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{yx(n.cancel)&&ye&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Fe())},className:xx(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,j.isValidElement(n.action)?n.action:n.action&&yx(n.action)?j.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{yx(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Fe())},className:xx(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Sx(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function _re(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ure:lre;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Cx=j.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=cre,toastOptions:g,dir:_=Sx(),gap:v=fre,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=j.useState([]),C=j.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=j.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[T,E]=j.useState([]),[D,O]=j.useState(!1),[ee,te]=j.useState(!1),[ne,k]=j.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),re=j.useRef(null),ie=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),ae=j.useRef(null),A=j.useRef(!1),oe=j.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||vx.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return j.useEffect(()=>vx.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{af.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),j.useEffect(()=>{if(d!==`system`){k(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?k(`dark`):k(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{k(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{k(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),j.useEffect(()=>{x.length<=1&&O(!1)},[x]),j.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=re.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===re.current||re.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),j.useEffect(()=>{if(re.current)return()=>{ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null,A.current=!1)}},[re.current]),j.createElement(`section`,{ref:t,"aria-label":`${b} ${ie}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?j.createElement(`ol`,{key:t,dir:_===`auto`?Sx():_,tabIndex:-1,ref:re,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ne,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${dre}px`,"--gap":`${v}px`,...m,..._re(l,u)},onBlur:e=>{A.current&&!e.currentTarget.contains(e.relatedTarget)&&(A.current=!1,ae.current&&=(ae.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||A.current||(A.current=!0,ae.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{ee||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||te(!0)},onPointerUp:()=>te(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>j.createElement(gre,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:ee,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:oe,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:e.swipeDirections}))):null}))}),wx=[`Enter`,` `],Tx=[`ArrowDown`,`PageUp`,`Home`],Ex=[`ArrowUp`,`PageDown`,`End`],Dx=[...Tx,...Ex],Ox={ltr:[...wx,`ArrowRight`],rtl:[...wx,`ArrowLeft`]},kx={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Ax=`Menu`,[jx,Mx,Nx]=dv(Ax),[Px,Fx]=nf(Ax,[Nx,Zm,xv]),Ix=Zm(),Lx=xv(),[Rx,zx]=Px(Ax),[Bx,Vx]=Px(Ax),Hx=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Ix(t),[c,l]=j.useState(null),u=j.useRef(!1),d=xf(a),f=pv(i);return j.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),j.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,M.jsx)(sh,{...s,children:(0,M.jsx)(Rx,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,M.jsx)(Bx,{scope:t,onClose:j.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};Hx.displayName=Ax;var Ux=`MenuAnchor`,Wx=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ix(n);return(0,M.jsx)(ch,{...i,...r,ref:t})});Wx.displayName=Ux;var Gx=`MenuPortal`,[Kx,qx]=Px(Gx,{forceMount:void 0}),Jx=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=zx(Gx,t);return(0,M.jsx)(Kx,{scope:t,forceMount:n,children:(0,M.jsx)(fh,{present:n||a.open,children:(0,M.jsx)(dh,{asChild:!0,container:i,children:r})})})};Jx.displayName=Gx;var Yx=`MenuContent`,[Xx,Zx]=Px(Yx),Qx=j.forwardRef((e,t)=>{let n=qx(Yx,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=zx(Yx,e.__scopeMenu),o=Vx(Yx,e.__scopeMenu);return(0,M.jsx)(jx.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(fh,{present:r||a.open,children:(0,M.jsx)(jx.Slot,{scope:e.__scopeMenu,children:o.modal?(0,M.jsx)($x,{...i,ref:t}):(0,M.jsx)(eS,{...i,ref:t})})})})}),$x=j.forwardRef((e,t)=>{let n=zx(Yx,e.__scopeMenu),r=j.useRef(null),i=tf(t,r);return j.useEffect(()=>{let e=r.current;if(e)return ng(e)},[]),(0,M.jsx)(nS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),eS=j.forwardRef((e,t)=>{let n=zx(Yx,e.__scopeMenu);return(0,M.jsx)(nS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),tS=of(`MenuContent.ScrollLock`),nS=j.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=zx(Yx,n),_=Vx(Yx,n),v=Ix(n),y=Lx(n),b=Mx(n),[x,S]=j.useState(null),C=j.useRef(null),w=tf(t,C,g.onContentChange),T=j.useRef(0),E=j.useRef(``),D=j.useRef(0),O=j.useRef(null),ee=j.useRef(`right`),te=j.useRef(0),ne=m?o_:j.Fragment,k=m?{as:tS,allowPinchZoom:!0}:void 0,re=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=BS(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};j.useEffect(()=>()=>window.clearTimeout(T.current),[]),Ih();let ie=j.useCallback(e=>ee.current===O.current?.side&&HS(e,O.current?.area),[]);return(0,M.jsx)(Xx,{scope:n,searchRef:E,onItemEnter:j.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),onItemLeave:j.useCallback(e=>{ie(e)||(C.current?.focus(),S(null))},[ie]),onTriggerLeave:j.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),pointerGraceTimerRef:D,onPointerGraceIntentChange:j.useCallback(e=>{O.current=e},[]),children:(0,M.jsx)(ne,{...k,children:(0,M.jsx)(Vh,{asChild:!0,trapped:i,onMountAutoFocus:F(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,M.jsx)(Mf,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,M.jsx)(Nv,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:F(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,M.jsx)(lh,{role:`menu`,"aria-orientation":`vertical`,"data-state":FS(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:F(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&re(e.key));let i=C.current;if(e.target!==i||!Dx.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Ex.includes(e.key)&&a.reverse(),RS(a)}),onBlur:F(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:F(e.onPointerMove,US(e=>{let t=e.target,n=te.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ee.current=e.clientX>te.current?`right`:`left`,te.current=e.clientX)}))})})})})})})});Qx.displayName=Yx;var rS=`MenuGroup`,iS=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,M.jsx)(yf.div,{role:`group`,...r,ref:t})});iS.displayName=rS;var aS=`MenuLabel`,oS=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,M.jsx)(yf.div,{...r,ref:t})});oS.displayName=aS;var sS=`MenuItem`,cS=`menu.itemSelect`,lS=j.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=j.useRef(null),o=Vx(sS,e.__scopeMenu),s=Zx(sS,e.__scopeMenu),c=tf(t,a),l=j.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(cS,{bubbles:!0,cancelable:!0});e.addEventListener(cS,e=>r?.(e),{once:!0}),bf(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,M.jsx)(uS,{...i,ref:c,disabled:n,onClick:F(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:F(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:F(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||wx.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});lS.displayName=sS;var uS=j.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Zx(sS,n),s=Lx(n),c=j.useRef(null),l=tf(t,c),[u,d]=j.useState(!1),[f,p]=j.useState(``);return j.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,M.jsx)(jx.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,M.jsx)(Pv,{asChild:!0,...s,focusable:!r,children:(0,M.jsx)(yf.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:F(e.onPointerMove,US(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,US(e=>o.onItemLeave(e))),onFocus:F(e.onFocus,()=>d(!0)),onBlur:F(e.onBlur,()=>d(!1))})})})}),dS=`MenuCheckboxItem`,fS=j.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,M.jsx)(bS,{scope:e.__scopeMenu,checked:n,children:(0,M.jsx)(lS,{role:`menuitemcheckbox`,"aria-checked":IS(n)?`mixed`:n,...i,ref:t,"data-state":LS(n),onSelect:F(i.onSelect,()=>r?.(IS(n)?!0:!n),{checkForDefaultPrevented:!1})})})});fS.displayName=dS;var pS=`MenuRadioGroup`,[mS,hS]=Px(pS,{value:void 0,onValueChange:()=>{}}),gS=j.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=xf(r);return(0,M.jsx)(mS,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,M.jsx)(iS,{...i,ref:t})})});gS.displayName=pS;var _S=`MenuRadioItem`,vS=j.forwardRef((e,t)=>{let{value:n,...r}=e,i=hS(_S,e.__scopeMenu),a=n===i.value;return(0,M.jsx)(bS,{scope:e.__scopeMenu,checked:a,children:(0,M.jsx)(lS,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":LS(a),onSelect:F(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});vS.displayName=_S;var yS=`MenuItemIndicator`,[bS,xS]=Px(yS,{checked:!1}),SS=j.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=xS(yS,n);return(0,M.jsx)(fh,{present:r||IS(a.checked)||a.checked===!0,children:(0,M.jsx)(yf.span,{...i,ref:t,"data-state":LS(a.checked)})})});SS.displayName=yS;var CS=`MenuSeparator`,wS=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,M.jsx)(yf.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});wS.displayName=CS;var TS=`MenuArrow`,ES=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Ix(n);return(0,M.jsx)(uh,{...i,...r,ref:t})});ES.displayName=TS;var DS=`MenuSub`,[OS,kS]=Px(DS),AS=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=zx(DS,t),o=Ix(t),[s,c]=j.useState(null),[l,u]=j.useState(null),d=xf(i);return j.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,M.jsx)(sh,{...o,children:(0,M.jsx)(Rx,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,M.jsx)(OS,{scope:t,contentId:Hf(),triggerId:Hf(),trigger:s,onTriggerChange:c,children:n})})})};AS.displayName=DS;var jS=`MenuSubTrigger`,MS=j.forwardRef((e,t)=>{let n=zx(jS,e.__scopeMenu),r=Vx(jS,e.__scopeMenu),i=kS(jS,e.__scopeMenu),a=Zx(jS,e.__scopeMenu),o=j.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=j.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);j.useEffect(()=>u,[u]),j.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=tf(t,i.onTriggerChange);return(0,M.jsx)(Wx,{asChild:!0,...l,children:(0,M.jsx)(uS,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":FS(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,US(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:F(e.onPointerLeave,US(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Ox[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});MS.displayName=jS;var NS=`MenuSubContent`,PS=j.forwardRef((e,t)=>{let n=qx(Yx,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=zx(Yx,e.__scopeMenu),s=Vx(Yx,e.__scopeMenu),c=kS(NS,e.__scopeMenu),l=j.useRef(null),u=tf(t,l);return(0,M.jsx)(jx.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(fh,{present:r||o.open,children:(0,M.jsx)(jx.Slot,{scope:e.__scopeMenu,children:(0,M.jsx)(nS,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:F(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:F(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=kx[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});PS.displayName=NS;function FS(e){return e?`open`:`closed`}function IS(e){return e===`indeterminate`}function LS(e){return IS(e)?`indeterminate`:e?`checked`:`unchecked`}function RS(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function BS(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=zS(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function VS(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function HS(e,t){return t?VS({x:e.clientX,y:e.clientY},t):!1}function US(e){return t=>t.pointerType===`mouse`?e(t):void 0}var WS=Hx,GS=Wx,KS=Jx,qS=Qx,JS=iS,YS=oS,XS=lS,ZS=fS,QS=gS,$S=vS,eC=SS,tC=wS,nC=ES,rC=AS,iC=MS,aC=PS,oC=`DropdownMenu`,[sC,vre]=nf(oC,[Fx]),cC=Fx(),[lC,uC]=sC(oC),dC=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=cC(t),l=j.useRef(null),[u,d]=hh({prop:i,defaultProp:a??!1,onChange:o,caller:oC});return(0,M.jsx)(lC,{scope:t,triggerId:Hf(),triggerRef:l,contentId:Hf(),open:u,onOpenChange:d,onOpenToggle:j.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,M.jsx)(WS,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};dC.displayName=oC;var fC=`DropdownMenuTrigger`,pC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=uC(fC,n),o=cC(n),s=tf(t,a.triggerRef);return(0,M.jsx)(GS,{asChild:!0,...o,children:(0,M.jsx)(yf.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:F(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:F(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});pC.displayName=fC;var mC=`DropdownMenuPortal`,hC=e=>{let{__scopeDropdownMenu:t,...n}=e,r=cC(t);return(0,M.jsx)(KS,{...r,...n})};hC.displayName=mC;var gC=`DropdownMenuContent`,_C=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=uC(gC,n),a=cC(n),o=j.useRef(!1);return(0,M.jsx)(qS,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:F(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});_C.displayName=gC;var vC=`DropdownMenuGroup`,yC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(JS,{...i,...r,ref:t})});yC.displayName=vC;var bC=`DropdownMenuLabel`,xC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(YS,{...i,...r,ref:t})});xC.displayName=bC;var SC=`DropdownMenuItem`,CC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(XS,{...i,...r,ref:t})});CC.displayName=SC;var wC=`DropdownMenuCheckboxItem`,TC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(ZS,{...i,...r,ref:t})});TC.displayName=wC;var EC=`DropdownMenuRadioGroup`,DC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(QS,{...i,...r,ref:t})});DC.displayName=EC;var OC=`DropdownMenuRadioItem`,kC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)($S,{...i,...r,ref:t})});kC.displayName=OC;var AC=`DropdownMenuItemIndicator`,jC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(eC,{...i,...r,ref:t})});jC.displayName=AC;var MC=`DropdownMenuSeparator`,NC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(tC,{...i,...r,ref:t})});NC.displayName=MC;var PC=`DropdownMenuArrow`,FC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(nC,{...i,...r,ref:t})});FC.displayName=PC;var IC=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=cC(t),[s,c]=hh({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,M.jsx)(rC,{...o,open:s,onOpenChange:c,children:n})},LC=`DropdownMenuSubTrigger`,RC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(iC,{...i,...r,ref:t})});RC.displayName=LC;var zC=`DropdownMenuSubContent`,BC=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=cC(n);return(0,M.jsx)(aC,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});BC.displayName=zC;var VC=dC,HC=pC,UC=hC,WC=_C,GC=xC,KC=CC,qC=TC,JC=DC,YC=kC,XC=jC,ZC=NC,QC=IC,$C=RC,ew=BC,tw=`ContextMenu`,[nw,yre]=nf(tw,[Fx]),rw=Fx(),[iw,aw]=nw(tw),ow=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:a,modal:o=!0}=e,s=j.useRef(!1);{let e=j.useRef(!1);j.useEffect(()=>{i===!0&&!s.current&&!e.current&&(e.current=!0,console.warn("ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport."))},[i])}let[c,l]=hh({prop:i,defaultProp:!1,onChange:r,caller:tw}),u=rw(t);return(0,M.jsx)(iw,{scope:t,open:c,onOpenChange:l,modal:o,hasInteractedRef:s,children:(0,M.jsx)(WS,{...u,dir:a,open:c,onOpenChange:l,modal:o,children:n})})};ow.displayName=tw;var sw=`ContextMenuTrigger`,cw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=aw(sw,n),o=rw(n),s=j.useRef({x:0,y:0}),c=j.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=j.useRef(0),u=j.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{a.hasInteractedRef.current=!0,s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return j.useEffect(()=>u,[u]),j.useEffect(()=>void(r&&u()),[r,u]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(GS,{...o,virtualRef:c}),(0,M.jsx)(yf.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:F(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:F(e.onPointerDown,Lw(e=>{u(),a.open&&a.onOpenChange(!1),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:F(e.onPointerMove,Lw(u)),onPointerCancel:r?e.onPointerCancel:F(e.onPointerCancel,Lw(u)),onPointerUp:r?e.onPointerUp:F(e.onPointerUp,Lw(u))})]})});cw.displayName=sw;var lw=`ContextMenuPortal`,uw=e=>{let{__scopeContextMenu:t,...n}=e,r=rw(t);return(0,M.jsx)(KS,{...r,...n})};uw.displayName=lw;var dw=`ContextMenuContent`,fw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=aw(dw,n),a=rw(n),o=j.useRef(!1);return(0,M.jsx)(qS,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});fw.displayName=dw;var pw=`ContextMenuGroup`,mw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(JS,{...i,...r,ref:t})});mw.displayName=pw;var hw=`ContextMenuLabel`,gw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(YS,{...i,...r,ref:t})});gw.displayName=hw;var _w=`ContextMenuItem`,vw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(XS,{...i,...r,ref:t})});vw.displayName=_w;var yw=`ContextMenuCheckboxItem`,bw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(ZS,{...i,...r,ref:t})});bw.displayName=yw;var xw=`ContextMenuRadioGroup`,Sw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(QS,{...i,...r,ref:t})});Sw.displayName=xw;var Cw=`ContextMenuRadioItem`,ww=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)($S,{...i,...r,ref:t})});ww.displayName=Cw;var Tw=`ContextMenuItemIndicator`,Ew=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(eC,{...i,...r,ref:t})});Ew.displayName=Tw;var Dw=`ContextMenuSeparator`,Ow=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(tC,{...i,...r,ref:t})});Ow.displayName=Dw;var kw=`ContextMenuArrow`,Aw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(nC,{...i,...r,ref:t})});Aw.displayName=kw;var jw=`ContextMenuSub`,Mw=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=rw(t),[s,c]=hh({prop:i,defaultProp:a??!1,onChange:r,caller:jw});return(0,M.jsx)(rC,{...o,open:s,onOpenChange:c,children:n})};Mw.displayName=jw;var Nw=`ContextMenuSubTrigger`,Pw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(iC,{...i,...r,ref:t})});Pw.displayName=Nw;var Fw=`ContextMenuSubContent`,Iw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(aC,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Iw.displayName=Fw;function Lw(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Rw=ow,zw=cw,Bw=uw,Vw=fw,Hw=gw,Uw=vw,Ww=bw,Gw=Sw,Kw=ww,qw=Ew,Jw=Ow,Yw=Mw,Xw=Pw,Zw=Iw,Qw=Object.defineProperty,$w=(e,t)=>Qw(e,`name`,{value:t,configurable:!0});function eT(e,[t,n]){return Math.min(n,Math.max(t,e))}$w(eT,`clamp`);var tT=Object.defineProperty,nT=(e,t)=>tT(e,`name`,{value:t,configurable:!0}),rT=!!(typeof window<`u`&&window.document&&window.document.createElement);function iT(e,t,{checkForDefaultPrevented:n=!0}={}){return nT(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}nT(iT,`composeEventHandlers`);function aT(e){if(!rT)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}nT(aT,`getOwnerWindow`);function oT(e){if(!rT)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}nT(oT,`getOwnerDocument`);function sT(e,t=!1){let{activeElement:n}=oT(e);if(!n?.nodeName)return null;if(cT(n)&&n.contentDocument)return sT(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=oT(n).getElementById(e);if(t)return t}}return n}nT(sT,`getActiveElement`);function cT(e){return e.tagName===`IFRAME`}nT(cT,`isFrame`);var lT=Object.defineProperty,uT=(e,t)=>lT(e,`name`,{value:t,configurable:!0});function dT(e,t){let n=j.createContext(t);n.displayName=e+`Context`;let r=uT(e=>{let{children:t,...r}=e,i=j.useMemo(()=>r,Object.values(r));return(0,M.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=j.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return uT(i,`useContext`),[r,i]}uT(dT,`createContext`);function fT(e,t=[]){let n=[];function r(t,r){let i=j.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=uT(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=j.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=j.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return uT(s,`useContext`),[o,s]}uT(r,`createContext`);let i=uT(()=>{let t=n.map(e=>j.createContext(e));return uT(function(n){let r=n?.[e]||t;return j.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,pT(i,...t)]}uT(fT,`createContextScope`);function pT(...e){let t=e[0];if(e.length===1)return t;let n=uT(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return uT(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}uT(pT,`composeContextScopes`);var mT=Object.defineProperty,hT=(e,t)=>mT(e,`name`,{value:t,configurable:!0});function gT(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}hT(gT,`setRef`);function _T(...e){return t=>{let n=!1,r=e.map(e=>{let r=gT(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():gT(e[t],null)}}}}hT(_T,`composeRefs`);function vT(...e){return j.useCallback(_T(...e),e)}hT(vT,`useComposedRefs`);var yT=Object.defineProperty,bT=(e,t)=>yT(e,`name`,{value:t,configurable:!0});function xT(e){let t=j.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];kT(r)&&typeof NT==`function`&&(r=NT(r._payload)),j.Children.forEach(r,e=>{if(DT(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;kT(n)&&typeof NT==`function`&&(n=NT(n._payload)),a=wT(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=j.cloneElement(a,void 0,s):!o&&j.Children.count(r)===1&&j.isValidElement(r)&&(a=r);let c=a?ET(a):void 0,l=vT(n,c);if(!a){if(r||r===0)throw Error(o?MT(e):jT(e));return r}let u=TT(i,a.props??{});return a.type!==j.Fragment&&(u.ref=n?l:c),j.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}bT(xT,`createSlot`);var ST=Symbol.for(`radix.slottable`);function CT(e){let t=bT(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=ST,t}bT(CT,`createSlottable`);var wT=bT((e,t)=>{if(`child`in e.props){let t=e.props.child;return j.isValidElement(t)?j.cloneElement(t,void 0,e.props.children(t.props.children)):null}return j.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function TT(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}bT(TT,`mergeProps`);function ET(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}bT(ET,`getElementRef`);function DT(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ST}bT(DT,`isSlottable`);var OT=Symbol.for(`react.lazy`);function kT(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===OT&&`_payload`in e&&AT(e._payload)}bT(kT,`isLazyComponent`);function AT(e){return typeof e==`object`&&!!e&&`then`in e}bT(AT,`isPromiseLike`);var jT=bT(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),MT=bT(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),NT=j.use,PT=Object.defineProperty,FT=(e,t)=>PT(e,`name`,{value:t,configurable:!0});function IT(e){let t=e+`CollectionProvider`,[n,r]=fT(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=FT(e=>{let{scope:t,children:n}=e,r=j.useRef(null),a=j.useRef(new Map).current;return(0,M.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=xT(s),l=j.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(c,{ref:vT(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=xT(u),p=j.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=j.useRef(null),s=vT(t,o),c=a(u,n);return j.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,M.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return j.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return FT(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}FT(IT,`createCollection`);var LT=new WeakMap,RT=class e extends Map{static{FT(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],LT.set(this,!0)}set(e,t){return LT.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=VT(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t===void 0?!1:this.delete(t)}at(e){let t=zT(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=zT(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return zT(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function zT(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=BT(e,t);return n===-1?void 0:e[n]}FT(zT,`at`);function BT(e,t){let n=e.length,r=VT(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}FT(BT,`toSafeIndex`);function VT(e){return e!==e||e===0?0:Math.trunc(e)}FT(VT,`toSafeInteger`);function HT(e){let t=e+`CollectionProvider`,[n,r]=fT(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new RT,setItemMap:FT(()=>void 0,`setItemMap`)}),o=FT(({state:e,...t})=>e?(0,M.jsx)(c,{...t,state:e}):(0,M.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=FT(e=>{let t=h();return(0,M.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=FT(e=>{let{scope:t,children:n,state:r}=e,a=j.useRef(null),[o,s]=j.useState(null),c=vT(a,s),[l,u]=r;return j.useEffect(()=>{if(!o)return;let e=KT(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,M.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=xT(l),d=j.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(u,{ref:vT(t,a(l,n).collectionRef),children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=xT(f),m=j.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=j.useRef(null),[s,c]=j.useState(null),l=vT(t,o,c),{setItemMap:u}=a(f,n),d=j.useRef(i);UT(d.current,i)||(d.current=i);let m=d.current;return j.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(GT):(t.set(s,{...e,element:s}),t.toSorted(GT)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new RT(e)))}},[s,m,u]),(0,M.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return j.useState(new RT)}FT(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return FT(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}FT(HT,`createCollection`);function UT(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)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)||e[r]!==t[r])return!1;return!0}FT(UT,`shallowEqual`);function WT(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}FT(WT,`isElementPreceding`);function GT(e,t){return!e[1].element||!t[1].element?0:WT(e[1].element,t[1].element)?-1:1}FT(GT,`sortByDocumentPosition`);function KT(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}FT(KT,`getChildListObserver`);var qT=Object.defineProperty,JT=(e,t)=>qT(e,`name`,{value:t,configurable:!0}),YT=j.createContext(void 0);function XT(e){let t=j.useContext(YT);return e||t||`ltr`}JT(XT,`useDirection`);var ZT=Object.defineProperty,QT=(e,t)=>ZT(e,`name`,{value:t,configurable:!0}),$T=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=xT(`Primitive.${t}`),r=j.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function eE(e,t){e&&af.flushSync(()=>e.dispatchEvent(t))}QT(eE,`dispatchDiscreteCustomEvent`);var tE=Object.defineProperty,nE=(e,t)=>tE(e,`name`,{value:t,configurable:!0});function rE(e){let t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>((...e)=>t.current?.(...e)),[])}nE(rE,`useCallbackRef`);var iE=Object.defineProperty,aE=(e,t)=>iE(e,`name`,{value:t,configurable:!0}),oE=`dismissableLayer.update`,sE=`dismissableLayer.pointerDownOutside`,cE=`dismissableLayer.focusOutside`,lE,uE=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),dE=j.forwardRef(aE(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=j.useContext(uE),[d,f]=j.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=j.useState({}),h=vT(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=j.useRef(!1),C=mE(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:j.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=hE(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=rE(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return j.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),j.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(lE=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),gE(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=lE))}},[d,p,n,u]),j.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),gE())},[d,u]),j.useEffect(()=>{let e=aE(()=>m({}),`handleUpdate`);return document.addEventListener(oE,e),()=>document.removeEventListener(oE,e)},[]),(0,M.jsx)($T.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:iT(e.onFocusCapture,w.onFocusCapture),onBlurCapture:iT(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:iT(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function fE(){let e=j.useContext(uE),[t,n]=j.useState(null);return j.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}aE(fE,`useDismissableLayerSurface`);var pE=aE(()=>!0,`IS_TRUE`);function mE(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=pE}=t,s=rE(e),c=j.useRef(!1),l=j.useRef(!1),u=j.useRef(new Map),d=j.useRef(()=>{});return j.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}aE(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}aE(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}aE(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}aE(p,`handleInteractionBubble`);let m=aE(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||_E(sE,s,p,{discrete:!0})};if(aE(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:aE(()=>c.current=!0,`onPointerDownCapture`)}}aE(mE,`usePointerDownOutside`);function hE(e,t=globalThis?.document){let n=rE(e),r=j.useRef(!1);return j.useEffect(()=>{let e=aE(e=>{e.target&&!r.current&&_E(cE,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:aE(()=>r.current=!0,`onFocusCapture`),onBlurCapture:aE(()=>r.current=!1,`onBlurCapture`)}}aE(hE,`useFocusOutside`);function gE(){let e=new CustomEvent(oE);document.dispatchEvent(e)}aE(gE,`dispatchUpdate`);function _E(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?eE(i,a):i.dispatchEvent(a)}aE(_E,`handleAndDispatchCustomEvent`);var vE=Object.defineProperty,yE=(e,t)=>vE(e,`name`,{value:t,configurable:!0}),bE=0,xE=null;function SE(e){return CE(),e.children}yE(SE,`FocusGuards`);function CE(){j.useEffect(()=>{xE||={start:wE(),end:wE()};let{start:e,end:t}=xE;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),bE++,()=>{bE===1&&(xE?.start.remove(),xE?.end.remove(),xE=null),bE=Math.max(0,bE-1)}},[])}yE(CE,`useFocusGuards`);function wE(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}yE(wE,`createFocusGuard`);var TE=Object.defineProperty,EE=(e,t)=>TE(e,`name`,{value:t,configurable:!0}),DE=`focusScope.autoFocusOnMount`,OE=`focusScope.autoFocusOnUnmount`,kE={bubbles:!1,cancelable:!0},AE=j.forwardRef(EE(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=j.useState(null),l=rE(i),u=rE(a),d=j.useRef(null),f=vT(t,c),p=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:LE(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||LE(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&LE(s)};EE(e,`handleFocusIn`),EE(t,`handleFocusOut`),EE(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),j.useEffect(()=>{if(s){RE.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(DE,kE);s.addEventListener(DE,l),s.dispatchEvent(t),t.defaultPrevented||(jE(VE(NE(s)),{select:!0}),document.activeElement===e&&LE(s))}return()=>{s.removeEventListener(DE,l),setTimeout(()=>{let t=new CustomEvent(OE,kE);s.addEventListener(OE,u),s.dispatchEvent(t),t.defaultPrevented||LE(e??document.body,{select:!0}),s.removeEventListener(OE,u),RE.remove(p)},0)}}},[s,l,u,p]);let m=j.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ME(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&LE(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&LE(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,M.jsx)($T.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function jE(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(LE(r,{select:t}),document.activeElement!==n)return}EE(jE,`focusFirst`);function ME(e){let t=NE(e);return[PE(t,e),PE(t.reverse(),e)]}EE(ME,`getTabbableEdges`);function NE(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:EE(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}EE(NE,`getTabbableCandidates`);function PE(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):FE(r,{upTo:t})))return r}EE(PE,`findVisible`);function FE(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}EE(FE,`isHidden`);function IE(e){return e instanceof HTMLInputElement&&`select`in e}EE(IE,`isSelectableInput`);function LE(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&IE(e)&&t&&e.select()}}EE(LE,`focus`);var RE=zE();function zE(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=BE(e,t),e.unshift(t)},remove(t){e=BE(e,t),e[0]?.resume()}}}EE(zE,`createFocusScopesStack`);function BE(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}EE(BE,`arrayRemove`);function VE(e){return e.filter(e=>e.tagName!==`A`)}EE(VE,`removeLinks`);var HE=globalThis?.document?j.useLayoutEffect:()=>{},UE=Object.defineProperty,WE=(e,t)=>UE(e,`name`,{value:t,configurable:!0}),GE=j.useId||(()=>void 0),KE=0;function qE(e){let[t,n]=j.useState(GE());return HE(()=>{e||n(e=>e??String(KE++))},[e]),e||(t?`radix-${t}`:``)}WE(qE,`useId`);var JE=Object.defineProperty,YE=(e,t)=>JE(e,`name`,{value:t,configurable:!0});function XE(e){let[t,n]=j.useState(void 0);return HE(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}YE(XE,`useSize`);var ZE=Object.defineProperty,QE=(e,t)=>ZE(e,`name`,{value:t,configurable:!0}),$E=`Popper`,[eD,tD]=fT($E),[nD,rD]=eD($E),iD=QE(e=>{let{__scopePopper:t,children:n}=e,[r,i]=j.useState(null),[a,o]=j.useState(void 0);return(0,M.jsx)(nD,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),aD=`PopperAnchor`,oD=j.forwardRef(QE(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=rD(aD,n),o=j.useRef(null),s=a.onAnchorChange,c=vT(t,j.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=j.useRef(null);j.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&fD(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,M.jsx)($T.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),sD=`PopperContent`,[cD,bre]=eD(sD),lD=j.forwardRef(QE(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=rD(sD,n),[_,v]=j.useState(null),y=vT(t,v),[b,x]=j.useState(null),S=XE(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,ee={padding:E,boundary:D.filter(uD),altBoundary:O},{refs:te,floatingStyles:ne,placement:k,isPositioned:re,middlewareData:ie}=zm({strategy:`fixed`,placement:T,whileElementsMounted:QE((...e)=>Em(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Bm({mainAxis:i+w,alignmentAxis:o}),c&&Vm({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Hm():void 0,...ee}),c&&Um({...ee}),Wm({...ee,apply:QE(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&Km({element:b,padding:s}),dD({arrowWidth:C,arrowHeight:w}),f&&Gm({strategy:`referenceHidden`,...ee,boundary:O?ee.boundary:void 0})]}),ae=g.setPlacementState;HE(()=>(ae(k),()=>{ae(void 0)}),[k,ae]);let[A,oe]=fD(k),se=rE(m);HE(()=>{re&&se?.()},[re,se]);let ce=ie.arrow?.x,le=ie.arrow?.y,ue=ie.arrow?.centerOffset!==0,[de,fe]=j.useState();return HE(()=>{_&&fe(window.getComputedStyle(_).zIndex)},[_]),(0,M.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:re?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,M.jsx)(cD,{scope:n,placedSide:A,placedAlign:oe,onArrowChange:x,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,M.jsx)($T.div,{"data-side":A,"data-align":oe,...h,ref:y,style:{...h.style,animation:re?h.style?.animation:`none`}})})})},`PopperContent`));function uD(e){return e!==null}QE(uD,`isNotNull`);var dD=QE(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=fD(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function fD(e){let[t,n=`center`]=e.split(`-`);return[t,n]}QE(fD,`getSideAndAlignFromPlacement`);var pD=iD,mD=oD,hD=lD,gD=Object.defineProperty,_D=j.forwardRef(((e,t)=>gD(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=j.useState(!1);HE(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?af.createPortal((0,M.jsx)($T.div,{...r,ref:t}),o):null},`Portal`)),vD=Object.defineProperty,yD=(e,t)=>vD(e,`name`,{value:t,configurable:!0});function bD(e,t){return j.useReducer((e,n)=>t[e][n]??e,e)}yD(bD,`useStateMachine`);var xD=yD(e=>{let{present:t,children:n}=e,r=SD(t),i=typeof n==`function`?n({present:r.isPresent}):j.Children.only(n),a=wD(r.ref,ED(i));return typeof n==`function`||r.isPresent?j.cloneElement(i,{ref:a}):null},`Presence`);function SD(e){let[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef(`none`),o=j.useRef(void 0),[s,c]=bD(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return j.useEffect(()=>{s===`mounted`?(a.current=o.current??TD(r.current),o.current=void 0):a.current=`none`},[s]),HE(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=TD(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),HE(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=yD(a=>{let o=TD(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=yD(e=>{e.target===t&&(a.current=TD(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:j.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=TD(t)}else r.current=null;n(e)},[])}}yD(SD,`usePresence`);function CD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}yD(CD,`setRef`);function wD(...e){let t=j.useRef(e);return t.current=e,j.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=CD(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():CD(n[e],null)}}},[])}yD(wD,`useStableComposedRefs`);function TD(e){return e?.animationName||`none`}yD(TD,`getAnimationName`);function ED(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}yD(ED,`getElementRef`);var DD=Object.defineProperty,OD=(e,t)=>DD(e,`name`,{value:t,configurable:!0}),kD=j.useEffectEvent,AD=j.useInsertionEffect;function jD(e){if(typeof kD==`function`)return kD(e);let t=j.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof AD==`function`?AD(()=>{t.current=e}):HE(()=>{t.current=e}),j.useMemo(()=>((...e)=>t.current?.(...e)),[])}OD(jD,`useEffectEvent`);var MD=Object.defineProperty,ND=(e,t)=>MD(e,`name`,{value:t,configurable:!0}),PD=j.useInsertionEffect||HE;function FD({prop:e,defaultProp:t,onChange:n=ND(()=>{},`onChange`),caller:r}){let[i,a,o]=ID({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,j.useCallback(t=>{if(s){let n=LD(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}ND(FD,`useControllableState`);function ID({defaultProp:e,onChange:t}){let[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return PD(()=>{a.current=t},[t]),j.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}ND(ID,`useUncontrolledState`);function LD(e){return typeof e==`function`}ND(LD,`isFunction`);var RD=Symbol(`RADIX:SYNC_STATE`);function zD(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=jD(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=j.useReducer((t,n)=>{if(n.type===RD)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=j.useRef(p);j.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=j.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return j.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:RD,state:i})},[i,d.state,c]),[h,f]}ND(zD,`useControllableStateReducer`);var BD=Object.defineProperty,VD=(e,t)=>BD(e,`name`,{value:t,configurable:!0});function HD(e){let t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}VD(HD,`usePrevious`);var UD=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),WD=Object.defineProperty,GD=(e,t)=>WD(e,`name`,{value:t,configurable:!0}),KD=[` `,`Enter`,`ArrowUp`,`ArrowDown`],qD=[` `,`Enter`],JD=`Select`,[YD,XD,ZD]=IT(JD),[QD,xre]=fT(JD,[ZD,tD]),$D=tD(),[eO,tO]=QD(JD),[nO,rO]=QD(JD);function iO(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=$D(t),[_,v]=j.useState(null),[y,b]=j.useState(null),[x,S]=j.useState(!1),C=XT(l),[w,T]=FD({prop:r,defaultProp:i??!1,onChange:a,caller:JD}),[E,D]=FD({prop:o,defaultProp:s,onChange:c,caller:JD}),O=j.useRef(null),ee=j.useRef(E);j.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=GD(()=>D(ee.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,D]);let te=_?!!m||!!_.closest(`form`):!0,[ne,k]=j.useState(new Set),re=qE(),ie=Array.from(ne).map(e=>e.props.value).join(`;`),ae=j.useCallback(e=>{k(t=>new Set(t).add(e))},[]),A=j.useCallback(e=>{k(t=>{let n=new Set(t);return n.delete(e),n})},[]),oe={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:re,value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:ne,nativeSelectKey:ie,isFormControl:te};return(0,M.jsx)(pD,{...g,children:(0,M.jsx)(eO,{scope:t,...oe,children:(0,M.jsx)(YD.Provider,{scope:t,children:(0,M.jsx)(nO,{scope:t,onNativeOptionAdd:ae,onNativeOptionRemove:A,children:RO(h)?h(oe):n})})})})}GD(iO,`SelectProvider`);var aO=GD(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,M.jsx)(iO,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[n,e?(0,M.jsx)(LO,{__scopeSelect:t}):null]})})},`Select`),oO=`SelectTrigger`,sO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=$D(n),o=tO(oO,n),s=o.disabled||r,c=vT(t,o.onTriggerChange),l=XD(n),u=j.useRef(`touch`),[d,f,p]=BO(e=>{let t=l().filter(e=>!e.disabled),n=VO(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=GD(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,M.jsx)(mD,{asChild:!0,...a,children:(0,M.jsx)($T.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":zO(o.value)?``:void 0,...i,ref:c,onClick:iT(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:iT(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:iT(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&KD.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),cO=`SelectValue`,lO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=tO(cO,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=vT(t,c.onValueNodeChange);HE(()=>{l(u)},[l,u]);let f=zO(c.value);return(0,M.jsx)($T.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,M.jsx)(j.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),uO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,M.jsx)($T.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[dO,fO]=QD(`SelectPortal`,{forceMount:void 0}),pO=GD(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,M.jsx)(dO,{scope:e.__scopeSelect,forceMount:n,children:(0,M.jsx)(_D,{asChild:!0,...r})})},`SelectPortal`),mO=`SelectContent`,hO=j.forwardRef(GD(function(e,t){let n=fO(mO,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=tO(mO,e.__scopeSelect),[o,s]=j.useState();return HE(()=>{s(new DocumentFragment)},[]),(0,M.jsx)(xD,{present:r||a.open,children:({present:e})=>e?(0,M.jsx)(xO,{...i,ref:t}):(0,M.jsx)(gO,{...i,fragment:o})})},`SelectContent`)),gO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?af.createPortal((0,M.jsx)(vO,{scope:n,children:(0,M.jsx)(YD.Slot,{scope:n,children:(0,M.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),_O=10,[vO,yO]=QD(mO),bO=xT(`SelectContent.RemoveScroll`),xO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=tO(mO,n),[y,b]=j.useState(null),[x,S]=j.useState(null),C=vT(t,b),[w,T]=j.useState(null),[E,D]=j.useState(null),O=XD(n),[ee,te]=j.useState(!1),ne=j.useRef(!1);j.useEffect(()=>{if(y)return ng(y)},[y]),CE();let k=j.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),re=j.useCallback(()=>k([w,y]),[k,w,y]);j.useEffect(()=>{ee&&re()},[ee,re]);let{onOpenChange:ie,triggerPointerDownPosRef:ae}=v;j.useEffect(()=>{if(y){let e={x:0,y:0},t=GD(t=>{e={x:Math.abs(Math.round(t.pageX)-(ae.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ae.current?.y??0))}},`handlePointerMove`),n=GD(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||ie(!1),document.removeEventListener(`pointermove`,t),ae.current=null},`handlePointerUp`);return ae.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,ie,ae]),j.useEffect(()=>{let e=GD(()=>ie(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ie]);let[A,oe]=BO(e=>{let t=O().filter(e=>!e.disabled),n=VO(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),se=j.useCallback((e,t,n)=>{let r=!ne.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(ne.current=!0))},[v.value]),ce=j.useCallback(()=>y?.focus(),[y]),le=j.useCallback((e,t,n)=>{let r=!ne.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),ue=r===`popper`?CO:SO,de=ue===CO?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,M.jsx)(vO,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:se,selectedItem:w,onItemLeave:ce,itemTextRefCallback:le,focusSelectedItem:re,selectedItemText:E,position:r,isPositioned:ee,searchRef:A,children:(0,M.jsx)(o_,{as:bO,allowPinchZoom:!0,children:(0,M.jsx)(AE,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:iT(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,M.jsx)(dE,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,M.jsx)(ue,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...de,onPlaced:()=>te(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:iT(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&oe(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>k(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),SO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=tO(mO,n),o=yO(mO,n),[s,c]=j.useState(null),[l,u]=j.useState(null),d=vT(t,u),f=XD(n),p=j.useRef(!1),m=j.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=j.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-_O,d=eT(a,[_O,Math.max(_O,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-_O,d=eT(a,[_O,Math.max(_O,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-_O*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-_O,D=c-E,O=g.offsetHeight/2,ee=g.offsetTop+O,te=m+v+ee,ne=x-te;if(te<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=te+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+ne;s.style.height=t+`px`,h.scrollTop=te-E+h.offsetTop}s.style.margin=`${_O}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);HE(()=>y(),[y]);let[b,x]=j.useState();return HE(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,M.jsx)(wO,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:j.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,M.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,M.jsx)($T.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),CO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=_O,...a}=e,o=$D(n);return(0,M.jsx)(hD,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[wO,TO]=QD(mO,{}),EO=`SelectViewport`,DO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=yO(EO,n),o=TO(EO,n),s=vT(t,a.onViewportChange),c=j.useRef(0);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,M.jsx)(YD.Slot,{scope:n,children:(0,M.jsx)($T.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:iT(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-_O*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Sre,Cre]=QD(`SelectGroup`),OO=`SelectItem`,[kO,AO]=QD(OO),jO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=tO(OO,n),c=yO(OO,n),l=s.value===r,[u,d]=j.useState(a??``),[f,p]=j.useState(!1),m=vT(t,rE(e=>c.itemRefCallback?.(e,r,i))),h=qE(),g=j.useRef(`touch`),_=GD(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,M.jsx)(kO,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:j.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,M.jsx)(YD.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,M.jsx)($T.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:iT(o.onFocus,()=>p(!0)),onBlur:iT(o.onBlur,()=>p(!1)),onClick:iT(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:iT(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:iT(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:iT(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:iT(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:iT(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(qD.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),MO=`SelectItemText`,NO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=tO(MO,n),s=yO(MO,n),c=AO(MO,n),l=rO(MO,n),[u,d]=j.useState(null),f=rE(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=vT(t,d,c.onItemTextChange,f),m=u?.textContent,h=j.useMemo(()=>(0,M.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return HE(()=>(g(h),()=>_(h)),[g,_,h]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)($T.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!zO(o.value)?af.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),PO=`SelectItemIndicator`,FO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,...r}=e;return AO(PO,n).isSelected?(0,M.jsx)($T.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),IO=`SelectBubbleInput`,LO=j.forwardRef(GD(function({__scopeSelect:e,...t},n){let r=tO(IO,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=j.useRef(null),m=vT(n,p),h=i??``,g=HD(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return j.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,M.jsxs)($T.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...UD,...t.style},ref:m,defaultValue:h,children:[zO(i)&&!_?(0,M.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function RO(e){return typeof e==`function`}GD(RO,`isFunction`);function zO(e){return e===``||e===void 0}GD(zO,`shouldShowPlaceholder`);function BO(e){let t=rE(e),n=j.useRef(``),r=j.useRef(0),i=j.useCallback(e=>{let i=n.current+e;t(i),GD((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=j.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return j.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}GD(BO,`useTypeaheadSearch`);function VO(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=HO(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}GD(VO,`findNextItem`);function HO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}GD(HO,`wrapArray`);function UO(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function WO(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var GO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qO={};function JO(e,t){return((t||qO).jsx?KO:GO).test(e)}var YO=/[ \t\n\f\r]/g;function XO(e){return typeof e==`object`?e.type===`text`?ZO(e.value):!1:ZO(e)}function ZO(e){return e.replace(YO,``)===``}var QO=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};QO.prototype.normal={},QO.prototype.property={},QO.prototype.space=void 0;function $O(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new QO(n,r,t)}function ek(e){return e.toLowerCase()}var tk=class{constructor(e,t){this.attribute=t,this.property=e}};tk.prototype.attribute=``,tk.prototype.booleanish=!1,tk.prototype.boolean=!1,tk.prototype.commaOrSpaceSeparated=!1,tk.prototype.commaSeparated=!1,tk.prototype.defined=!1,tk.prototype.mustUseProperty=!1,tk.prototype.number=!1,tk.prototype.overloadedBoolean=!1,tk.prototype.property=``,tk.prototype.spaceSeparated=!1,tk.prototype.space=void 0;var nk=r({boolean:()=>ik,booleanish:()=>ak,commaOrSpaceSeparated:()=>lk,commaSeparated:()=>ck,number:()=>I,overloadedBoolean:()=>ok,spaceSeparated:()=>sk}),rk=0,ik=uk(),ak=uk(),ok=uk(),I=uk(),sk=uk(),ck=uk(),lk=uk();function uk(){return 2**++rk}var dk=Object.keys(nk),fk=class extends tk{constructor(e,t,n,r){let i=-1;if(super(e,t),pk(this,`space`,r),typeof n==`number`)for(;++i<dk.length;){let e=dk[i];pk(this,dk[i],(n&nk[e])===nk[e])}}};fk.prototype.defined=!0;function pk(e,t,n){n&&(e[t]=n)}function mk(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new fk(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ek(r)]=r,n[ek(a.attribute)]=r}return new QO(t,n,e.space)}var hk=mk({properties:{ariaActiveDescendant:null,ariaAtomic:ak,ariaAutoComplete:null,ariaBusy:ak,ariaChecked:ak,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:sk,ariaCurrent:null,ariaDescribedBy:sk,ariaDetails:null,ariaDisabled:ak,ariaDropEffect:sk,ariaErrorMessage:null,ariaExpanded:ak,ariaFlowTo:sk,ariaGrabbed:ak,ariaHasPopup:null,ariaHidden:ak,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:sk,ariaLevel:I,ariaLive:null,ariaModal:ak,ariaMultiLine:ak,ariaMultiSelectable:ak,ariaOrientation:null,ariaOwns:sk,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:ak,ariaReadOnly:ak,ariaRelevant:null,ariaRequired:ak,ariaRoleDescription:sk,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:ak,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function gk(e,t){return t in e?e[t]:t}function _k(e,t){return gk(e,t.toLowerCase())}var wre=mk({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ck,acceptCharset:sk,accessKey:sk,action:null,allow:null,allowFullScreen:ik,allowPaymentRequest:ik,allowUserMedia:ik,alpha:ik,alt:null,as:null,async:ik,autoCapitalize:null,autoComplete:sk,autoFocus:ik,autoPlay:ik,blocking:sk,capture:null,charSet:null,checked:ik,cite:null,className:sk,closedBy:null,colorSpace:null,cols:I,colSpan:I,command:null,commandFor:null,content:null,contentEditable:ak,controls:ik,controlsList:sk,coords:I|ck,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ik,defer:ik,dir:null,dirName:null,disabled:ik,download:ok,draggable:ak,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ik,formTarget:null,headers:sk,height:I,hidden:ok,high:I,href:null,hrefLang:null,htmlFor:sk,httpEquiv:sk,id:null,imageSizes:null,imageSrcSet:null,inert:ik,inputMode:null,integrity:null,is:null,isMap:ik,itemId:null,itemProp:sk,itemRef:sk,itemScope:ik,itemType:sk,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ik,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:ik,muted:ik,name:null,nonce:null,noModule:ik,noValidate:ik,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ik,optimum:I,pattern:null,ping:sk,placeholder:null,playsInline:ik,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ik,referrerPolicy:null,rel:sk,required:ik,reversed:ik,rows:I,rowSpan:I,sandbox:sk,scope:null,scoped:ik,seamless:ik,selected:ik,shadowRootClonable:ik,shadowRootCustomElementRegistry:ik,shadowRootDelegatesFocus:ik,shadowRootMode:null,shadowRootSerializable:ik,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:ak,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:ik,useMap:null,value:ak,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:sk,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ik,declare:ik,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:ik,noHref:ik,noShade:ik,noWrap:ik,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:ak,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ik,disablePictureInPicture:ik,disableRemotePlayback:ik,exportParts:ck,part:sk,prefix:null,property:null,results:I,security:null,unselectable:null},space:`html`,transform:_k}),Tre=mk({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:lk,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:sk,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:ik,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ck,g2:ck,glyphName:ck,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:lk,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:I,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:sk,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lk,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lk,rev:lk,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lk,requiredFeatures:lk,requiredFonts:lk,requiredFormats:lk,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:lk,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lk,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lk,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:gk}),vk=mk({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),yk=mk({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:_k}),bk=mk({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ere={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Dre=/[A-Z]/g,xk=/-[a-z]/g,Ore=/^data[-\w.:]+$/i;function Sk(e,t){let n=ek(t),r=t,i=tk;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Ore.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(xk,Are);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!xk.test(e)){let n=e.replace(Dre,kre);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=fk}return new i(r,t)}function kre(e){return`-`+e.toLowerCase()}function Are(e){return e.charAt(1).toUpperCase()}var Ck=$O([hk,wre,vk,yk,bk],`html`),wk=$O([hk,Tre,vk,yk,bk],`svg`);function Tk(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ek(e){return e.join(` `).trim()}var jre=i(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
44
+ `},Rg=0,zg=[];function Bg(e){var t=j.useRef([]),n=j.useRef([0,0]),r=j.useRef(),i=j.useState(Rg++)[0],a=j.useState(fg)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Dne([e.lockRef.current],(e.shards||[]).map(Fg),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=j.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ng(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Ag(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Ag(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Fne(h,t,e,h===`h`?s:c,!0)},[]),c=j.useCallback(function(e){var n=e;if(!(!zg.length||zg[zg.length-1]!==a)){var r=`deltaY`in n?Pg(n):Ng(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ig(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Fg).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=j.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Vg(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=j.useCallback(function(e){n.current=Ng(e),r.current=void 0},[]),d=j.useCallback(function(t){l(t.type,Pg(t),t.target,s(t,e.lockRef.current))},[]),f=j.useCallback(function(t){l(t.type,Ng(t),t.target,s(t,e.lockRef.current))},[]);j.useEffect(function(){return zg.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Tg),document.addEventListener(`touchmove`,c,Tg),document.addEventListener(`touchstart`,u,Tg),function(){zg=zg.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Tg),document.removeEventListener(`touchmove`,c,Tg),document.removeEventListener(`touchstart`,u,Tg)}},[]);var p=e.removeScrollBar,m=e.inert;return j.createElement(j.Fragment,null,m?j.createElement(a,{styles:Lg(i)}):null,p?j.createElement(Sg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Vg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Hg=tg(ng,Bg),Ug=j.forwardRef(function(e,t){return j.createElement(ig,Wh({},e,{ref:t,sideCar:Hg}))});Ug.classNames=ig.classNames;var Wg=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Gg=new WeakMap,Kg=new WeakMap,qg={},Jg=0,Yg=function(e){return e&&(e.host||Yg(e.parentNode))},Xg=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Yg(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Zg=function(e,t,n,r){var i=Xg(t,Array.isArray(e)?e:[e]);qg[n]||(qg[n]=new WeakMap);var a=qg[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Gg.get(e)||0)+1,l=(a.get(e)||0)+1;Gg.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Kg.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Jg++,function(){o.forEach(function(e){var t=Gg.get(e)-1,i=a.get(e)-1;Gg.set(e,t),a.set(e,i),t||(Kg.has(e)||e.removeAttribute(r),Kg.delete(e)),i||e.removeAttribute(n)}),Jg--,Jg||(Gg=new WeakMap,Gg=new WeakMap,Kg=new WeakMap,qg={})}},Qg=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Wg(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Zg(r,i,n,`aria-hidden`)):function(){return null}},$g=`Dialog`,[e_,Ine]=$d($g),[t_,n_]=e_($g),r_=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=j.useRef(null),c=j.useRef(null),[l,u]=fh({prop:r,defaultProp:i??!1,onChange:a,caller:$g});return(0,M.jsx)(t_,{scope:t,triggerRef:s,contentRef:c,contentId:zf(),titleId:zf(),descriptionId:zf(),open:l,onOpenChange:u,onOpenToggle:j.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};r_.displayName=$g;var i_=`DialogTrigger`,a_=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=n_(i_,n),a=Qd(t,i.triggerRef);return(0,M.jsx)(gf.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":T_(i.open),...r,ref:a,onClick:F(e.onClick,i.onOpenToggle)})});a_.displayName=i_;var o_=`DialogPortal`,[s_,c_]=e_(o_,{forceMount:void 0}),l_=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=n_(o_,t);return(0,M.jsx)(s_,{scope:t,forceMount:n,children:j.Children.map(r,e=>(0,M.jsx)(lh,{present:n||a.open,children:(0,M.jsx)(ch,{asChild:!0,container:i,children:e})}))})};l_.displayName=o_;var u_=`DialogOverlay`,d_=j.forwardRef((e,t)=>{let n=c_(u_,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=n_(u_,e.__scopeDialog);return a.modal?(0,M.jsx)(lh,{present:r||a.open,children:(0,M.jsx)(p_,{...i,ref:t})}):null});d_.displayName=u_;var f_=nf(`DialogOverlay.RemoveScroll`),p_=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=n_(u_,n),a=Qd(t,Mf());return(0,M.jsx)(Ug,{as:f_,allowPinchZoom:!0,shards:[i.contentRef],children:(0,M.jsx)(gf.div,{"data-state":T_(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),m_=`DialogContent`,h_=j.forwardRef((e,t)=>{let n=c_(m_,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=n_(m_,e.__scopeDialog);return(0,M.jsx)(lh,{present:r||a.open,children:a.modal?(0,M.jsx)(g_,{...i,ref:t}):(0,M.jsx)(__,{...i,ref:t})})});h_.displayName=m_;var g_=j.forwardRef((e,t)=>{let n=n_(m_,e.__scopeDialog),r=j.useRef(null),i=Qd(t,n.contentRef,r);return j.useEffect(()=>{let e=r.current;if(e)return Qg(e)},[]),(0,M.jsx)(v_,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault())})}),__=j.forwardRef((e,t)=>{let n=n_(m_,e.__scopeDialog),r=j.useRef(!1),i=j.useRef(!1);return(0,M.jsx)(v_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),v_=j.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=n_(m_,n);return Hh(),(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(Ph,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(kf,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":T_(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),y_=`DialogTitle`,b_=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=n_(y_,n);return(0,M.jsx)(gf.h2,{id:i.titleId,...r,ref:t})});b_.displayName=y_;var x_=`DialogDescription`,S_=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=n_(x_,n);return(0,M.jsx)(gf.p,{id:i.descriptionId,...r,ref:t})});S_.displayName=x_;var C_=`DialogClose`,w_=j.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=n_(C_,n);return(0,M.jsx)(gf.button,{type:`button`,...r,ref:t,onClick:F(e.onClick,()=>i.onOpenChange(!1))})});w_.displayName=C_;function T_(e){return e?`open`:`closed`}function E_(e){let t=e+`CollectionProvider`,[n,r]=$d(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=j.useRef(null),a=j.useRef(new Map).current;return(0,M.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=nf(s),l=j.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(c,{ref:Qd(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=nf(u),p=j.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=j.useRef(null),s=Qd(t,o),c=a(u,n);return j.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,M.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return j.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var D_=j.createContext(void 0);function O_(e){let t=j.useContext(D_);return e||t||`ltr`}var k_=`rovingFocusGroup.onEntryFocus`,A_={bubbles:!1,cancelable:!0},j_=`RovingFocusGroup`,[M_,N_,P_]=E_(j_),[F_,I_]=$d(j_,[P_]),[L_,R_]=F_(j_),z_=j.forwardRef((e,t)=>(0,M.jsx)(M_.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(M_.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(B_,{...e,ref:t})})}));z_.displayName=j_;var B_=j.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=j.useRef(null),p=Qd(t,f),m=O_(a),[h,g]=fh({prop:o,defaultProp:s??null,onChange:c,caller:j_}),[_,v]=j.useState(!1),y=vf(l),b=N_(n),x=j.useRef(!1),[S,C]=j.useState(0);return j.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(k_,y),()=>e.removeEventListener(k_,y)},[y]),(0,M.jsx)(L_,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:j.useCallback(e=>g(e),[g]),onItemShiftTab:j.useCallback(()=>v(!0),[]),onFocusableItemAdd:j.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:j.useCallback(()=>C(e=>e-1),[]),children:(0,M.jsx)(gf.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:F(e.onMouseDown,()=>{x.current=!0}),onFocus:F(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(k_,A_);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);K_([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:F(e.onBlur,()=>v(!1))})})}),V_=`RovingFocusGroupItem`,H_=j.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=zf(),l=a||c,u=R_(V_,n),d=u.currentTabStopId===l,f=N_(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return j.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,M.jsx)(M_.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,M.jsx)(gf.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:F(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:F(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:F(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=G_(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?q_(n,r+1):n.slice(r+1)}setTimeout(()=>K_(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});H_.displayName=V_;var U_={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function W_(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function G_(e,t,n){let r=W_(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return U_[r]}function K_(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function q_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var J_=z_,Y_=H_,X_=[`Enter`,` `],Z_=[`ArrowDown`,`PageUp`,`Home`],Q_=[`ArrowUp`,`PageDown`,`End`],Lne=[...Z_,...Q_],Rne={ltr:[...X_,`ArrowRight`],rtl:[...X_,`ArrowLeft`]},zne={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},$_=`Menu`,[ev,Bne,Vne]=E_($_),[tv,nv]=$d($_,[Vne,Jm,I_]),rv=Jm(),iv=I_(),[av,ov]=tv($_),[Hne,sv]=tv($_),cv=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=rv(t),[c,l]=j.useState(null),u=j.useRef(!1),d=vf(a),f=O_(i);return j.useEffect(()=>{let e=()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>u.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),j.useEffect(()=>{if(!n)return;let e=()=>d(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,M.jsx)(ih,{...s,children:(0,M.jsx)(av,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,M.jsx)(Hne,{scope:t,onClose:j.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})};cv.displayName=$_;var Une=`MenuAnchor`,lv=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=rv(n);return(0,M.jsx)(ah,{...i,...r,ref:t})});lv.displayName=Une;var uv=`MenuPortal`,[dv,fv]=tv(uv,{forceMount:void 0}),pv=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=ov(uv,t);return(0,M.jsx)(dv,{scope:t,forceMount:n,children:(0,M.jsx)(lh,{present:n||a.open,children:(0,M.jsx)(ch,{asChild:!0,container:i,children:r})})})};pv.displayName=uv;var mv=`MenuContent`,[hv,gv]=tv(mv),_v=j.forwardRef((e,t)=>{let n=fv(mv,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=ov(mv,e.__scopeMenu),o=sv(mv,e.__scopeMenu);return(0,M.jsx)(ev.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(lh,{present:r||a.open,children:(0,M.jsx)(ev.Slot,{scope:e.__scopeMenu,children:o.modal?(0,M.jsx)(vv,{...i,ref:t}):(0,M.jsx)(yv,{...i,ref:t})})})})}),vv=j.forwardRef((e,t)=>{let n=ov(mv,e.__scopeMenu),r=j.useRef(null),i=Qd(t,r);return j.useEffect(()=>{let e=r.current;if(e)return Qg(e)},[]),(0,M.jsx)(xv,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),yv=j.forwardRef((e,t)=>{let n=ov(mv,e.__scopeMenu);return(0,M.jsx)(xv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),bv=nf(`MenuContent.ScrollLock`),xv=j.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=ov(mv,n),_=sv(mv,n),v=rv(n),y=iv(n),b=Bne(n),[x,S]=j.useState(null),C=j.useRef(null),w=Qd(t,C,g.onContentChange),T=j.useRef(0),E=j.useRef(``),D=j.useRef(0),O=j.useRef(null),ee=j.useRef(`right`),te=j.useRef(0),ne=m?Ug:j.Fragment,k=m?{as:bv,allowPinchZoom:!0}:void 0,re=e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=ay(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};j.useEffect(()=>()=>window.clearTimeout(T.current),[]),Hh();let ie=j.useCallback(e=>ee.current===O.current?.side&&sy(e,O.current?.area),[]);return(0,M.jsx)(hv,{scope:n,searchRef:E,onItemEnter:j.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),onItemLeave:j.useCallback(e=>{ie(e)||(C.current?.focus(),S(null))},[ie]),onTriggerLeave:j.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),pointerGraceTimerRef:D,onPointerGraceIntentChange:j.useCallback(e=>{O.current=e},[]),children:(0,M.jsx)(ne,{...k,children:(0,M.jsx)(Ph,{asChild:!0,trapped:i,onMountAutoFocus:F(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,M.jsx)(kf,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,M.jsx)(J_,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:F(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,M.jsx)(oh,{role:`menu`,"aria-orientation":`vertical`,"data-state":ey(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:F(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&re(e.key));let i=C.current;if(e.target!==i||!Lne.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Q_.includes(e.key)&&a.reverse(),ry(a)}),onBlur:F(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:F(e.onPointerMove,cy(e=>{let t=e.target,n=te.current!==e.clientX;e.currentTarget.contains(t)&&n&&(ee.current=e.clientX>te.current?`right`:`left`,te.current=e.clientX)}))})})})})})})});_v.displayName=mv;var Sv=`MenuGroup`,Cv=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,M.jsx)(gf.div,{role:`group`,...r,ref:t})});Cv.displayName=Sv;var wv=`MenuLabel`,Tv=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,M.jsx)(gf.div,{...r,ref:t})});Tv.displayName=wv;var Ev=`MenuItem`,Dv=`menu.itemSelect`,Ov=j.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=j.useRef(null),o=sv(Ev,e.__scopeMenu),s=gv(Ev,e.__scopeMenu),c=Qd(t,a),l=j.useRef(!1),u=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Dv,{bubbles:!0,cancelable:!0});e.addEventListener(Dv,e=>r?.(e),{once:!0}),_f(e,t),t.defaultPrevented?l.current=!1:o.onClose()}};return(0,M.jsx)(kv,{...i,ref:c,disabled:n,onClick:F(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:F(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:F(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||X_.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Ov.displayName=Ev;var kv=j.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=gv(Ev,n),s=iv(n),c=j.useRef(null),l=Qd(t,c),[u,d]=j.useState(!1),[f,p]=j.useState(``);return j.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,M.jsx)(ev.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,M.jsx)(Y_,{asChild:!0,...s,focusable:!r,children:(0,M.jsx)(gf.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:F(e.onPointerMove,cy(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:F(e.onPointerLeave,cy(e=>o.onItemLeave(e))),onFocus:F(e.onFocus,()=>d(!0)),onBlur:F(e.onBlur,()=>d(!1))})})})}),Av=`MenuCheckboxItem`,jv=j.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,M.jsx)(zv,{scope:e.__scopeMenu,checked:n,children:(0,M.jsx)(Ov,{role:`menuitemcheckbox`,"aria-checked":ty(n)?`mixed`:n,...i,ref:t,"data-state":ny(n),onSelect:F(i.onSelect,()=>r?.(ty(n)?!0:!n),{checkForDefaultPrevented:!1})})})});jv.displayName=Av;var Mv=`MenuRadioGroup`,[Nv,Pv]=tv(Mv,{value:void 0,onValueChange:()=>{}}),Fv=j.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=vf(r);return(0,M.jsx)(Nv,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,M.jsx)(Cv,{...i,ref:t})})});Fv.displayName=Mv;var Iv=`MenuRadioItem`,Lv=j.forwardRef((e,t)=>{let{value:n,...r}=e,i=Pv(Iv,e.__scopeMenu),a=n===i.value;return(0,M.jsx)(zv,{scope:e.__scopeMenu,checked:a,children:(0,M.jsx)(Ov,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":ny(a),onSelect:F(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Lv.displayName=Iv;var Rv=`MenuItemIndicator`,[zv,Bv]=tv(Rv,{checked:!1}),Vv=j.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Bv(Rv,n);return(0,M.jsx)(lh,{present:r||ty(a.checked)||a.checked===!0,children:(0,M.jsx)(gf.span,{...i,ref:t,"data-state":ny(a.checked)})})});Vv.displayName=Rv;var Hv=`MenuSeparator`,Uv=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,M.jsx)(gf.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Uv.displayName=Hv;var Wv=`MenuArrow`,Gv=j.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=rv(n);return(0,M.jsx)(sh,{...i,...r,ref:t})});Gv.displayName=Wv;var Kv=`MenuSub`,[qv,Jv]=tv(Kv),Yv=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=ov(Kv,t),o=rv(t),[s,c]=j.useState(null),[l,u]=j.useState(null),d=vf(i);return j.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,M.jsx)(ih,{...o,children:(0,M.jsx)(av,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,M.jsx)(qv,{scope:t,contentId:zf(),triggerId:zf(),trigger:s,onTriggerChange:c,children:n})})})};Yv.displayName=Kv;var Xv=`MenuSubTrigger`,Zv=j.forwardRef((e,t)=>{let n=ov(Xv,e.__scopeMenu),r=sv(Xv,e.__scopeMenu),i=Jv(Xv,e.__scopeMenu),a=gv(Xv,e.__scopeMenu),o=j.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=j.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);j.useEffect(()=>u,[u]),j.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=Qd(t,i.onTriggerChange);return(0,M.jsx)(lv,{asChild:!0,...l,children:(0,M.jsx)(kv,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":ey(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:F(e.onPointerMove,cy(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:F(e.onPointerLeave,cy(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:F(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||Rne[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Zv.displayName=Xv;var Qv=`MenuSubContent`,$v=j.forwardRef((e,t)=>{let n=fv(mv,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=ov(mv,e.__scopeMenu),s=sv(mv,e.__scopeMenu),c=Jv(Qv,e.__scopeMenu),l=j.useRef(null),u=Qd(t,l);return(0,M.jsx)(ev.Provider,{scope:e.__scopeMenu,children:(0,M.jsx)(lh,{present:r||o.open,children:(0,M.jsx)(ev.Slot,{scope:e.__scopeMenu,children:(0,M.jsx)(xv,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:F(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:F(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:F(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=zne[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});$v.displayName=Qv;function ey(e){return e?`open`:`closed`}function ty(e){return e===`indeterminate`}function ny(e){return ty(e)?`indeterminate`:e?`checked`:`unchecked`}function ry(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function iy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ay(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=iy(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function oy(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function sy(e,t){return t?oy({x:e.clientX,y:e.clientY},t):!1}function cy(e){return t=>t.pointerType===`mouse`?e(t):void 0}var ly=cv,uy=lv,dy=pv,fy=_v,py=Cv,my=Tv,hy=Ov,gy=jv,_y=Fv,vy=Lv,yy=Vv,by=Uv,xy=Gv,Sy=Yv,Cy=Zv,wy=$v,Ty=`DropdownMenu`,[Ey,Wne]=$d(Ty,[nv]),Dy=nv(),[Oy,ky]=Ey(Ty),Ay=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Dy(t),l=j.useRef(null),[u,d]=fh({prop:i,defaultProp:a??!1,onChange:o,caller:Ty});return(0,M.jsx)(Oy,{scope:t,triggerId:zf(),triggerRef:l,contentId:zf(),open:u,onOpenChange:d,onOpenToggle:j.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,M.jsx)(ly,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};Ay.displayName=Ty;var jy=`DropdownMenuTrigger`,My=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=ky(jy,n),o=Dy(n),s=Qd(t,a.triggerRef);return(0,M.jsx)(uy,{asChild:!0,...o,children:(0,M.jsx)(gf.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:F(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:F(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});My.displayName=jy;var Ny=`DropdownMenuPortal`,Py=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Dy(t);return(0,M.jsx)(dy,{...r,...n})};Py.displayName=Ny;var Fy=`DropdownMenuContent`,Iy=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=ky(Fy,n),a=Dy(n),o=j.useRef(!1);return(0,M.jsx)(fy,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:F(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Iy.displayName=Fy;var Ly=`DropdownMenuGroup`,Ry=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(py,{...i,...r,ref:t})});Ry.displayName=Ly;var zy=`DropdownMenuLabel`,By=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(my,{...i,...r,ref:t})});By.displayName=zy;var Vy=`DropdownMenuItem`,Hy=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(hy,{...i,...r,ref:t})});Hy.displayName=Vy;var Uy=`DropdownMenuCheckboxItem`,Wy=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(gy,{...i,...r,ref:t})});Wy.displayName=Uy;var Gy=`DropdownMenuRadioGroup`,Ky=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(_y,{...i,...r,ref:t})});Ky.displayName=Gy;var qy=`DropdownMenuRadioItem`,Jy=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(vy,{...i,...r,ref:t})});Jy.displayName=qy;var Yy=`DropdownMenuItemIndicator`,Xy=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(yy,{...i,...r,ref:t})});Xy.displayName=Yy;var Zy=`DropdownMenuSeparator`,Qy=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(by,{...i,...r,ref:t})});Qy.displayName=Zy;var $y=`DropdownMenuArrow`,eb=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(xy,{...i,...r,ref:t})});eb.displayName=$y;var tb=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Dy(t),[s,c]=fh({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,M.jsx)(Sy,{...o,open:s,onOpenChange:c,children:n})},nb=`DropdownMenuSubTrigger`,rb=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(Cy,{...i,...r,ref:t})});rb.displayName=nb;var ib=`DropdownMenuSubContent`,ab=j.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Dy(n);return(0,M.jsx)(wy,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ab.displayName=ib;var ob=Ay,sb=My,cb=Py,lb=Iy,ub=By,db=Hy,fb=Wy,pb=Ky,mb=Jy,hb=Xy,gb=Qy,_b=tb,vb=rb,yb=ab,bb=`Popover`,[xb,Gne]=$d(bb,[Jm]),Sb=Jm(),[Cb,wb]=xb(bb),Tb=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Sb(t),c=j.useRef(null),[l,u]=j.useState(!1),[d,f]=fh({prop:r,defaultProp:i??!1,onChange:a,caller:bb});return(0,M.jsx)(ih,{...s,children:(0,M.jsx)(Cb,{scope:t,contentId:zf(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:j.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:j.useCallback(()=>u(!0),[]),onCustomAnchorRemove:j.useCallback(()=>u(!1),[]),modal:o,children:n})})};Tb.displayName=bb;var Eb=`PopoverAnchor`,Db=j.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=wb(Eb,n),a=Sb(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return j.useEffect(()=>(o(),()=>s()),[o,s]),(0,M.jsx)(ah,{...a,...r,ref:t})});Db.displayName=Eb;var Ob=`PopoverTrigger`,kb=j.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=wb(Ob,n),a=Sb(n),o=Qd(t,i.triggerRef),s=(0,M.jsx)(gf.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Ub(i.open),...r,ref:o,onClick:F(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,M.jsx)(ah,{asChild:!0,...a,children:s})});kb.displayName=Ob;var Ab=`PopoverPortal`,[Kne,jb]=xb(Ab,{forceMount:void 0}),Mb=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=wb(Ab,t);return(0,M.jsx)(Kne,{scope:t,forceMount:n,children:(0,M.jsx)(lh,{present:n||a.open,children:(0,M.jsx)(ch,{asChild:!0,container:i,children:r})})})};Mb.displayName=Ab;var Nb=`PopoverContent`,Pb=j.forwardRef((e,t)=>{let n=jb(Nb,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=wb(Nb,e.__scopePopover);return(0,M.jsx)(lh,{present:r||a.open,children:a.modal?(0,M.jsx)(Ib,{...i,ref:t}):(0,M.jsx)(Lb,{...i,ref:t})})});Pb.displayName=Nb;var Fb=nf(`PopoverContent.RemoveScroll`),Ib=j.forwardRef((e,t)=>{let n=wb(Nb,e.__scopePopover),r=j.useRef(null),i=Qd(t,r),a=j.useRef(!1);return j.useEffect(()=>{let e=r.current;if(e)return Qg(e)},[]),(0,M.jsx)(Ug,{as:Fb,allowPinchZoom:!0,children:(0,M.jsx)(Rb,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Lb=j.forwardRef((e,t)=>{let n=wb(Nb,e.__scopePopover),r=j.useRef(!1),i=j.useRef(!1);return(0,M.jsx)(Rb,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Rb=j.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=wb(Nb,n),p=Sb(n);return Hh(),(0,M.jsx)(Ph,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,M.jsx)(kf,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,M.jsx)(oh,{"data-state":Ub(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),zb=`PopoverClose`,Bb=j.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=wb(zb,n);return(0,M.jsx)(gf.button,{type:`button`,...r,ref:t,onClick:F(e.onClick,()=>i.onOpenChange(!1))})});Bb.displayName=zb;var Vb=`PopoverArrow`,Hb=j.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Sb(n);return(0,M.jsx)(sh,{...i,...r,ref:t})});Hb.displayName=Vb;function Ub(e){return e?`open`:`closed`}var Wb=Tb,Gb=Db,Kb=kb,qb=Mb,Jb=Pb,Yb=Bb;function Xb(e,t=[]){let n=[];function r(t,r){let i=j.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=j.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=j.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>j.createContext(e));return function(n){let r=n?.[e]||t;return j.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,qne(i,...t)]}function qne(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}typeof window<`u`&&window.document&&window.document.createElement;function Zb(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var Qb=globalThis?.document?j.useLayoutEffect:()=>{},Jne=j.useInsertionEffect||Qb;function $b({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Yne({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=j.useRef(e!==void 0);j.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,j.useCallback(t=>{if(s){let n=Xne(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Yne({defaultProp:e,onChange:t}){let[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return Jne(()=>{a.current=t},[t]),j.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Xne(e){return typeof e==`function`}function Zne(e){let t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Qne(e){let[t,n]=j.useState(void 0);return Qb(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}function $ne(e,t){return j.useReducer((e,n)=>t[e][n]??e,e)}var ex=e=>{let{present:t,children:n}=e,r=ere(t),i=typeof n==`function`?n({present:r.isPresent}):j.Children.only(n),a=$l(r.ref,tre(i));return typeof n==`function`||r.isPresent?j.cloneElement(i,{ref:a}):null};ex.displayName=`Presence`;function ere(e){let[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef(`none`),[o,s]=$ne(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return j.useEffect(()=>{let e=tx(r.current);a.current=o===`mounted`?e:`none`},[o]),Qb(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=tx(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Qb(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=tx(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=tx(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:j.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function tx(e){return e?.animationName||`none`}function tre(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function nx(e){let t=nre(e),n=j.forwardRef((e,n)=>{let{children:r,...i}=e,a=j.Children.toArray(r),o=a.find(ire);if(o){let e=o.props.children,r=a.map(t=>t===o?j.Children.count(e)>1?j.Children.only(null):j.isValidElement(e)?e.props.children:null:t);return(0,M.jsx)(t,{...i,ref:n,children:j.isValidElement(e)?j.cloneElement(e,void 0,r):null})}return(0,M.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function nre(e){let t=j.forwardRef((e,t)=>{let{children:n,...r}=e;if(j.isValidElement(n)){let e=ore(n),i=are(r,n.props);return n.type!==j.Fragment&&(i.ref=t?Ql(t,e):e),j.cloneElement(n,i)}return j.Children.count(n)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rre=Symbol(`radix.slottable`);function ire(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===rre}function are(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ore(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rx=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=nx(`Primitive.${t}`),r=j.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ix=`Checkbox`,[sre,cre]=Xb(ix),[lre,ax]=sre(ix);function ure(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=$b({prop:n,defaultProp:i??!1,onChange:c,caller:ix}),[m,h]=j.useState(null),[g,_]=j.useState(null),v=j.useRef(!1),y=m?!!o||!!m.closest(`form`):!0,b={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:px(i)?!1:i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,M.jsx)(lre,{scope:t,...b,children:dre(d)?d(b):r})}var ox=`CheckboxTrigger`,sx=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=ax(ox,e),h=$l(i,u),g=j.useRef(c);return j.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,M.jsx)(rx.button,{type:`button`,role:`checkbox`,"aria-checked":px(c)?`mixed`:c,"aria-required":l,"data-state":mx(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:Zb(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Zb(n,e=>{d(e=>px(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});sx.displayName=ox;var cx=j.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,M.jsx)(ure,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(sx,{...d,ref:t,__scopeCheckbox:n}),e&&(0,M.jsx)(fx,{__scopeCheckbox:n})]})})});cx.displayName=ix;var lx=`CheckboxIndicator`,ux=j.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=ax(lx,n);return(0,M.jsx)(ex,{present:r||px(a.checked)||a.checked===!0,children:(0,M.jsx)(rx.span,{"data-state":mx(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});ux.displayName=lx;var dx=`CheckboxBubbleInput`,fx=j.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=ax(dx,e),m=$l(n,p),h=Zne(a),g=Qne(r);j.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=px(a),n.call(e,px(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=j.useRef(px(a)?!1:a);return(0,M.jsx)(rx.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});fx.displayName=dx;function dre(e){return typeof e==`function`}function px(e){return e===`indeterminate`}function mx(e){return px(e)?`indeterminate`:e?`checked`:`unchecked`}function hx(e){let t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var gx=`Radio`,[fre,_x]=$d(gx),[pre,vx]=fre(gx);function yx(e){let{__scopeRadio:t,checked:n=!1,children:r,disabled:i,form:a,name:o,onCheck:s,required:c,value:l=`on`,internal_do_not_use_render:u}=e,[d,f]=j.useState(null),[p,m]=j.useState(null),h={checked:n,disabled:i,required:c,name:o,form:a,value:l,control:d,setControl:f,hasConsumerStoppedPropagationRef:j.useRef(!1),isFormControl:d?!!a||!!d.closest(`form`):!0,bubbleInput:p,setBubbleInput:m,onCheck:()=>s?.()};return(0,M.jsx)(pre,{scope:t,...h,children:hre(u)?u(h):r})}var bx=`RadioTrigger`,xx=j.forwardRef(({__scopeRadio:e,onClick:t,...n},r)=>{let{checked:i,disabled:a,value:o,setControl:s,onCheck:c,hasConsumerStoppedPropagationRef:l,isFormControl:u,bubbleInput:d}=vx(bx,e),f=Qd(r,s);return(0,M.jsx)(gf.button,{type:`button`,role:`radio`,"aria-checked":i,"data-state":Ex(i),"data-disabled":a?``:void 0,disabled:a,value:o,...n,ref:f,onClick:F(t,e=>{i||c(),d&&u&&(l.current=e.isPropagationStopped(),l.current||e.stopPropagation())})})});xx.displayName=bx;var mre=j.forwardRef((e,t)=>{let{__scopeRadio:n,name:r,checked:i,required:a,disabled:o,value:s,onCheck:c,form:l,...u}=e;return(0,M.jsx)(yx,{__scopeRadio:n,checked:i,disabled:o,required:a,onCheck:c,name:r,form:l,value:s,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(xx,{...u,ref:t,__scopeRadio:n}),e&&(0,M.jsx)(Tx,{__scopeRadio:n})]})})});mre.displayName=gx;var Sx=`RadioIndicator`,Cx=j.forwardRef((e,t)=>{let{__scopeRadio:n,forceMount:r,...i}=e,a=vx(Sx,n);return(0,M.jsx)(lh,{present:r||a.checked,children:(0,M.jsx)(gf.span,{"data-state":Ex(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})})});Cx.displayName=Sx;var wx=`RadioBubbleInput`,Tx=j.forwardRef(({__scopeRadio:e,...t},n)=>{let{control:r,checked:i,required:a,disabled:o,name:s,value:c,form:l,bubbleInput:u,setBubbleInput:d,hasConsumerStoppedPropagationRef:f}=vx(wx,e),p=Qd(n,d),m=hx(i),h=Gm(r);j.useEffect(()=>{let e=u;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!f.current;if(m!==i&&n){let t=new Event(`click`,{bubbles:r});n.call(e,i),e.dispatchEvent(t)}},[u,m,i,f]);let g=j.useRef(i);return(0,M.jsx)(gf.input,{type:`radio`,"aria-hidden":!0,defaultChecked:g.current,required:a,disabled:o,name:s,value:c,form:l,...t,tabIndex:-1,ref:p,style:{...t.style,...h,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});Tx.displayName=wx;function hre(e){return typeof e==`function`}function Ex(e){return e?`checked`:`unchecked`}var Dx=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],Ox=`RadioGroup`,[kx,gre]=$d(Ox,[I_,_x]),Ax=I_(),jx=_x(),[Mx,Nx]=kx(Ox),Px=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,name:r,defaultValue:i,value:a,required:o=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:d,...f}=e,p=Ax(n),m=O_(l),[h,g]=fh({prop:a,defaultProp:i??null,onChange:d,caller:Ox});return(0,M.jsx)(Mx,{scope:n,name:r,required:o,disabled:s,value:h,onValueChange:g,children:(0,M.jsx)(J_,{asChild:!0,...p,orientation:c,dir:m,loop:u,children:(0,M.jsx)(gf.div,{role:`radiogroup`,"aria-required":o,"aria-orientation":c,"data-disabled":s?``:void 0,dir:m,...f,ref:t})})})});Px.displayName=Ox;var Fx=`RadioGroupItem`,Ix=`RadioGroupItemProvider`,Lx=`RadioGroupItemTrigger`,Rx=`RadioGroupItemBubbleInput`;function zx(e){let{__scopeRadioGroup:t,value:n,disabled:r,children:i,internal_do_not_use_render:a}=e,o=Nx(Ix,t),s=jx(t),c=o.disabled||r;return(0,M.jsx)(yx,{...s,checked:o.value===n,disabled:c,required:o.required,name:o.name,value:n,onCheck:()=>o.onValueChange(n),internal_do_not_use_render:a,children:i})}var Bx=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e,i=Ax(n),a=jx(n),{checked:o,disabled:s}=vx(Lx,a.__scopeRadio),c=j.useRef(null),l=Qd(t,c),u=j.useRef(!1);return j.useEffect(()=>{let e=e=>{Dx.includes(e.key)&&(u.current=!0)},t=()=>u.current=!1;return document.addEventListener(`keydown`,e),document.addEventListener(`keyup`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`keyup`,t)}},[]),(0,M.jsx)(Y_,{asChild:!0,...i,focusable:!s,active:o,children:(0,M.jsx)(xx,{...a,...r,ref:l,onKeyDown:F(r.onKeyDown,e=>{e.key===`Enter`&&e.preventDefault()}),onFocus:F(r.onFocus,()=>{u.current&&c.current?.click()})})})});Bx.displayName=Lx;var Vx=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,value:r,disabled:i,...a}=e;return(0,M.jsx)(zx,{__scopeRadioGroup:n,value:r,disabled:i,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(Bx,{...a,ref:t,__scopeRadioGroup:n}),e&&(0,M.jsx)(Hx,{__scopeRadioGroup:n})]})})});Vx.displayName=Fx;var Hx=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,M.jsx)(Tx,{...jx(n),...r,ref:t})});Hx.displayName=Rx;var Ux=`RadioGroupIndicator`,Wx=j.forwardRef((e,t)=>{let{__scopeRadioGroup:n,...r}=e;return(0,M.jsx)(Cx,{...jx(n),...r,ref:t})});Wx.displayName=Ux;function Gx(e){let t=e+`CollectionProvider`,[n,r]=Xb(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=j.useRef(null),a=j.useRef(new Map).current;return(0,M.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=nx(s),l=j.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(c,{ref:$l(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=nx(u),p=j.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=j.useRef(null),s=$l(t,o),c=a(u,n);return j.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,M.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return j.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var Kx=j.useId||(()=>void 0),qx=0;function Jx(e){let[t,n]=j.useState(Kx());return Qb(()=>{e||n(e=>e??String(qx++))},[e]),e||(t?`radix-${t}`:``)}function Yx(e){let t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...e)=>t.current?.(...e),[])}var Xx=j.createContext(void 0);function Zx(e){let t=j.useContext(Xx);return e||t||`ltr`}var Qx=`rovingFocusGroup.onEntryFocus`,$x={bubbles:!1,cancelable:!0},eS=`RovingFocusGroup`,[tS,nS,rS]=Gx(eS),[iS,aS]=Xb(eS,[rS]),[oS,sS]=iS(eS),cS=j.forwardRef((e,t)=>(0,M.jsx)(tS.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(tS.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,M.jsx)(lS,{...e,ref:t})})}));cS.displayName=eS;var lS=j.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=j.useRef(null),p=$l(t,f),m=Zx(a),[h,g]=$b({prop:o,defaultProp:s??null,onChange:c,caller:eS}),[_,v]=j.useState(!1),y=Yx(l),b=nS(n),x=j.useRef(!1),[S,C]=j.useState(0);return j.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Qx,y),()=>e.removeEventListener(Qx,y)},[y]),(0,M.jsx)(oS,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:j.useCallback(e=>g(e),[g]),onItemShiftTab:j.useCallback(()=>v(!0),[]),onFocusableItemAdd:j.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:j.useCallback(()=>C(e=>e-1),[]),children:(0,M.jsx)(rx.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Zb(e.onMouseDown,()=>{x.current=!0}),onFocus:Zb(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Qx,$x);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);hS([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:Zb(e.onBlur,()=>v(!1))})})}),uS=`RovingFocusGroupItem`,dS=j.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Jx(),l=a||c,u=sS(uS,n),d=u.currentTabStopId===l,f=nS(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return j.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,M.jsx)(tS.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,M.jsx)(rx.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Zb(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Zb(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Zb(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=mS(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?gS(n,r+1):n.slice(r+1)}setTimeout(()=>hS(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});dS.displayName=uS;var fS={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function pS(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function mS(e,t,n){let r=pS(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return fS[r]}function hS(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function gS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _S=cS,vS=dS,yS=`Tabs`,[bS,_re]=Xb(yS,[aS]),xS=aS(),[SS,CS]=bS(yS),wS=j.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Zx(s),[d,f]=$b({prop:r,onChange:i,defaultProp:a??``,caller:yS});return(0,M.jsx)(SS,{scope:n,baseId:Jx(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,M.jsx)(rx.div,{dir:u,"data-orientation":o,...l,ref:t})})});wS.displayName=yS;var TS=`TabsList`,ES=j.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=CS(TS,n),o=xS(n);return(0,M.jsx)(_S,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,M.jsx)(rx.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});ES.displayName=TS;var DS=`TabsTrigger`,OS=j.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=CS(DS,n),s=xS(n),c=jS(o.baseId,r),l=MS(o.baseId,r),u=r===o.value;return(0,M.jsx)(vS,{asChild:!0,...s,focusable:!i,active:u,children:(0,M.jsx)(rx.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Zb(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:Zb(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Zb(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});OS.displayName=DS;var kS=`TabsContent`,AS=j.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=CS(kS,n),c=jS(s.baseId,r),l=MS(s.baseId,r),u=r===s.value,d=j.useRef(u);return j.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,M.jsx)(ex,{present:i||u,children:({present:n})=>(0,M.jsx)(rx.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});AS.displayName=kS;function jS(e,t){return`${e}-trigger-${t}`}function MS(e,t){return`${e}-content-${t}`}var NS=wS,PS=ES,FS=OS,IS=AS;function LS(e,[t,n]){return Math.min(n,Math.max(t,e))}var RS=[`PageUp`,`PageDown`],zS=[`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],BS={"from-left":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-right":[`Home`,`PageDown`,`ArrowDown`,`ArrowRight`],"from-bottom":[`Home`,`PageDown`,`ArrowDown`,`ArrowLeft`],"from-top":[`Home`,`PageDown`,`ArrowUp`,`ArrowLeft`]},VS=`Slider`,[HS,US,WS]=E_(VS),[GS,vre]=$d(VS,[WS]),[KS,qS]=GS(VS),JS=j.forwardRef((e,t)=>{let{name:n,min:r=0,max:i=100,step:a=1,orientation:o=`horizontal`,disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:f=()=>{},inverted:p=!1,form:m,...h}=e,g=j.useRef(new Set),_=j.useRef(0),v=j.useRef(!1),y=o===`horizontal`?ZS:QS,[b=[],x]=fh({prop:u,defaultProp:l,onChange:e=>{[...g.current][_.current]?.focus({preventScroll:!0,focusVisible:v.current}),v.current=!1,d(e)}}),S=j.useRef(b);function C(e){E(e,_C(b,e))}function w(e){E(e,_.current)}function T(){let e=S.current[_.current];b[_.current]!==e&&f(b)}function E(e,t,{commit:n}={commit:!1}){let o=SC(a),s=LS(CC(Math.round((e-r)/a)*a+r,o),[r,i]);x((e=[])=>{let r=mC(e,s,t);if(bC(r,c*a)){_.current=r.indexOf(s);let t=String(r)!==String(e);return t&&n&&f(r),t?r:e}else return e})}return(0,M.jsx)(KS,{scope:e.__scopeSlider,name:n,disabled:s,min:r,max:i,valueIndexToChangeRef:_,thumbs:g.current,values:b,orientation:o,form:m,children:(0,M.jsx)(HS.Provider,{scope:e.__scopeSlider,children:(0,M.jsx)(HS.Slot,{scope:e.__scopeSlider,children:(0,M.jsx)(y,{"aria-disabled":s,"data-disabled":s?``:void 0,...h,ref:t,onPointerDown:F(h.onPointerDown,()=>{s||(S.current=b,v.current=!1)}),min:r,max:i,inverted:p,onSlideStart:s?void 0:C,onSlideMove:s?void 0:w,onSlideEnd:s?void 0:T,onHomeKeyDown:()=>{s||(v.current=!0,E(r,0,{commit:!0}))},onEndKeyDown:()=>{s||(v.current=!0,E(i,b.length-1,{commit:!0}))},onStepKeyDown:({event:e,direction:t})=>{if(!s){v.current=!0;let n=RS.includes(e.key)||e.shiftKey&&zS.includes(e.key)?10:1,r=_.current,i=b[r];E(i+a*n*t,r,{commit:!0})}}})})})})});JS.displayName=VS;var[YS,XS]=GS(VS,{startEdge:`left`,endEdge:`right`,size:`width`,direction:1}),ZS=j.forwardRef((e,t)=>{let{min:n,max:r,dir:i,inverted:a,onSlideStart:o,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,f]=j.useState(null),p=Qd(t,f),m=j.useRef(void 0),h=O_(i),g=h===`ltr`,_=g&&!a||!g&&a;function v(e){let t=m.current||d.getBoundingClientRect(),i=xC([0,t.width],_?[n,r]:[r,n]);return m.current=t,i(e-t.left)}return(0,M.jsx)(YS,{scope:e.__scopeSlider,startEdge:_?`left`:`right`,endEdge:_?`right`:`left`,direction:_?1:-1,size:`width`,children:(0,M.jsx)($S,{dir:h,"data-orientation":`horizontal`,...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":`translateX(-50%)`},onSlideStart:e=>{let t=v(e.clientX);o?.(t)},onSlideMove:e=>{let t=v(e.clientX);s?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=BS[_?`from-left`:`from-right`].includes(e.key);l?.({event:e,direction:t?-1:1})}})})}),QS=j.forwardRef((e,t)=>{let{min:n,max:r,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:s,onStepKeyDown:c,...l}=e,u=j.useRef(null),d=Qd(t,u),f=j.useRef(void 0),p=!i;function m(e){let t=f.current||u.current.getBoundingClientRect(),i=xC([0,t.height],p?[r,n]:[n,r]);return f.current=t,i(e-t.top)}return(0,M.jsx)(YS,{scope:e.__scopeSlider,startEdge:p?`bottom`:`top`,endEdge:p?`top`:`bottom`,size:`height`,direction:p?1:-1,children:(0,M.jsx)($S,{"data-orientation":`vertical`,...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":`translateY(50%)`},onSlideStart:e=>{let t=m(e.clientY);a?.(t)},onSlideMove:e=>{let t=m(e.clientY);o?.(t)},onSlideEnd:()=>{f.current=void 0,s?.()},onStepKeyDown:e=>{let t=BS[p?`from-bottom`:`from-top`].includes(e.key);c?.({event:e,direction:t?-1:1})}})})}),$S=j.forwardRef((e,t)=>{let{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:o,onEndKeyDown:s,onStepKeyDown:c,...l}=e,u=qS(VS,n);return(0,M.jsx)(gf.span,{...l,ref:t,onKeyDown:F(e.onKeyDown,e=>{e.key===`Home`?(o(e),e.preventDefault()):e.key===`End`?(s(e),e.preventDefault()):RS.concat(zS).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:F(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus({preventScroll:!0,focusVisible:!1}):r(e)}),onPointerMove:F(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)}),onPointerUp:F(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))})})}),eC=`SliderTrack`,tC=j.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=qS(eC,n);return(0,M.jsx)(gf.span,{"data-disabled":i.disabled?``:void 0,"data-orientation":i.orientation,...r,ref:t})});tC.displayName=eC;var nC=`SliderRange`,rC=j.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=qS(nC,n),a=XS(nC,n),o=Qd(t,j.useRef(null)),s=i.values.length,c=i.values.map(e=>hC(e,i.min,i.max)),l=s>1?Math.min(...c):0,u=100-Math.max(...c);return(0,M.jsx)(gf.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,...r,ref:o,style:{...e.style,[a.startEdge]:l+`%`,[a.endEdge]:u+`%`}})});rC.displayName=nC;var iC=`SliderThumb`,[aC,oC]=GS(iC),sC=`SliderThumbProvider`;function cC(e){let{__scopeSlider:t,name:n,children:r,internal_do_not_use_render:i}=e,a=qS(sC,t),o=US(t),[s,c]=j.useState(null),l=j.useMemo(()=>s?o().findIndex(e=>e.ref.current===s):-1,[o,s]),u=Gm(s),d=s?!!a.form||!!s.closest(`form`):!0,f=a.values[l],p=n??(a.name?a.name+(a.values.length>1?`[]`:``):void 0),m=f===void 0?0:hC(f,a.min,a.max);j.useEffect(()=>{if(s)return a.thumbs.add(s),()=>{a.thumbs.delete(s)}},[s,a.thumbs]);let h={value:f,name:p,form:a.form,isFormControl:d,index:l,thumb:s,onThumbChange:c,percent:m,size:u};return(0,M.jsx)(aC,{scope:t,...h,children:wC(i)?i(h):r})}cC.displayName=sC;var lC=`SliderThumbTrigger`,uC=j.forwardRef((e,t)=>{let{__scopeSlider:n,...r}=e,i=qS(lC,n),a=XS(lC,n),{index:o,value:s,percent:c,size:l,onThumbChange:u}=oC(lC,n),d=Qd(t,u),f=gC(o,i.values.length),p=l?.[a.size],m=p?vC(p,c,a.direction):0;return(0,M.jsx)(`span`,{style:{transform:`var(--radix-slider-thumb-transform)`,position:`absolute`,[a.startEdge]:`calc(${c}% + ${m}px)`},children:(0,M.jsx)(HS.ItemSlot,{scope:n,children:(0,M.jsx)(gf.span,{role:`slider`,"aria-label":e[`aria-label`]||f,"aria-valuemin":i.min,"aria-valuenow":s,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?``:void 0,tabIndex:i.disabled?void 0:0,...r,ref:d,style:s===void 0?{display:`none`}:e.style,onFocus:F(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})})})});uC.displayName=lC;var dC=j.forwardRef((e,t)=>{let{__scopeSlider:n,name:r,...i}=e;return(0,M.jsx)(cC,{__scopeSlider:n,name:r,internal_do_not_use_render:({index:e,isFormControl:r})=>(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(uC,{...i,ref:t,__scopeSlider:n}),r?(0,M.jsx)(pC,{__scopeSlider:n},e):null]})})});dC.displayName=iC;var fC=`SliderBubbleInput`,pC=j.forwardRef(({__scopeSlider:e,...t},n)=>{let{value:r,name:i,form:a}=oC(fC,e),o=j.useRef(null),s=Qd(o,n),c=hx(r);return j.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(c!==r&&n){let t=new Event(`input`,{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}},[c,r]),(0,M.jsx)(gf.input,{style:{display:`none`},name:i,form:a,...t,ref:s,defaultValue:r})});pC.displayName=fC;function mC(e=[],t,n){let r=[...e];return r[n]=t,r.sort((e,t)=>e-t)}function hC(e,t,n){return LS(100/(n-t)*(e-t),[0,100])}function gC(e,t){if(t>2)return`Value ${e+1} of ${t}`;if(t===2)return[`Minimum`,`Maximum`][e]}function _C(e,t){if(e.length===1)return 0;let n=e.map(e=>Math.abs(e-t)),r=Math.min(...n);return n.indexOf(r)}function vC(e,t,n){let r=e/2;return(r-xC([0,50],[0,r])(t)*n)*n}function yC(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function bC(e,t){if(t>0){let n=yC(e);return Math.min(...n)>=t}return!0}function xC(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function SC(e){if(!Number.isFinite(e))return 0;let t=e.toString();if(t.includes(`e`)){let[e,n]=t.split(`e`),r=e.split(`.`)[1]||``,i=Number(n);return Math.max(0,r.length-i)}let n=t.split(`.`)[1];return n?n.length:0}function CC(e,t){let n=10**t;return Math.round(e*n)/n}function wC(e){return typeof e==`function`}function TC(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var EC=e=>{switch(e){case`success`:return kC;case`info`:return jC;case`warning`:return AC;case`error`:return MC;default:return null}},DC=Array(12).fill(0),OC=({visible:e,className:t})=>j.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},j.createElement(`div`,{className:`sonner-spinner`},DC.map((e,t)=>j.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),kC=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},j.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),AC=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},j.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),jC=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},j.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),MC=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},j.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),NC=j.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},j.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),j.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),PC=()=>{let[e,t]=j.useState(document.hidden);return j.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},FC=1,IC=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:FC++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],j.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(RC(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!j.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!j.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!j.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!j.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||FC++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},LC=(e,t)=>{let n=t?.id||FC++;return IC.addToast({title:e,...t,id:n}),n},RC=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,zC=Object.assign(LC,{success:IC.success,info:IC.info,warning:IC.warning,error:IC.error,custom:IC.custom,message:IC.message,promise:IC.promise,dismiss:IC.dismiss,loading:IC.loading},{getHistory:()=>IC.toasts,getToasts:()=>IC.getActiveToasts()});TC(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function BC(e){return e.label!==void 0}var VC=3,HC=`24px`,UC=`16px`,WC=4e3,GC=356,KC=14,qC=45,JC=200;function YC(...e){return e.filter(Boolean).join(` `)}function XC(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var ZC=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=j.useState(null),[O,ee]=j.useState(null),[te,ne]=j.useState(!1),[k,re]=j.useState(!1),[ie,ae]=j.useState(!1),[A,oe]=j.useState(!1),[se,ce]=j.useState(!1),[le,ue]=j.useState(0),[de,fe]=j.useState(0),pe=j.useRef(n.duration||y||WC),me=j.useRef(null),he=j.useRef(null),ge=c===0,_e=c+1<=o,ve=n.type,ye=n.dismissible!==!1,be=n.className||``,xe=n.descriptionClassName||``,Se=j.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Ce=j.useMemo(()=>n.closeButton??p,[n.closeButton,p]),we=j.useMemo(()=>n.duration||y||WC,[n.duration,y]),Te=j.useRef(0),Ee=j.useRef(0),De=j.useRef(0),Oe=j.useRef(null),[ke,Ae]=b.split(`-`),je=j.useMemo(()=>s.reduce((e,t,n)=>n>=Se?e:e+t.height,0),[s,Se]),Me=PC(),Ne=n.invert||t,Pe=ve===`loading`;Ee.current=j.useMemo(()=>Se*x+je,[Se,je]),j.useEffect(()=>{pe.current=we},[we]),j.useEffect(()=>{ne(!0)},[]),j.useEffect(()=>{let e=he.current;if(e){let t=e.getBoundingClientRect().height;return fe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),j.useLayoutEffect(()=>{if(!te)return;let e=he.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,fe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[te,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Fe=j.useCallback(()=>{re(!0),ue(Ee.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},JC)},[n,d,a,Ee]);j.useEffect(()=>{if(n.promise&&ve===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Me?(()=>{if(De.current<Te.current){let e=new Date().getTime()-Te.current;pe.current-=e}De.current=new Date().getTime()})():pe.current!==1/0&&(Te.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Fe()},pe.current)),()=>clearTimeout(e)},[u,i,n,ve,Me,Fe]),j.useEffect(()=>{n.delete&&(Fe(),n.onDismiss==null||n.onDismiss.call(n,n))},[Fe,n.delete]);function Ie(){return w?.loading?j.createElement(`div`,{className:YC(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":ve===`loading`},w.loading):j.createElement(OC,{className:YC(C?.loader,n?.classNames?.loader),visible:ve===`loading`})}let Le=n.icon||w?.[ve]||EC(ve);return j.createElement(`li`,{tabIndex:0,ref:he,className:YC(_,be,C?.toast,n?.classNames?.toast,C?.default,C?.[ve],n?.classNames?.[ve]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":te,"data-promise":!!n.promise,"data-swiped":se,"data-removed":k,"data-visible":_e,"data-y-position":ke,"data-x-position":Ae,"data-index":c,"data-front":ge,"data-swiping":ie,"data-dismissible":ye,"data-type":ve,"data-invert":Ne,"data-swipe-out":A,"data-swipe-direction":O,"data-expanded":!!(u||S&&te),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${k?le:Ee.current}px`,"--initial-height":S?`auto`:`${de}px`,...m,...n.style},onDragEnd:()=>{ae(!1),D(null),Oe.current=null},onPointerDown:e=>{e.button!==2&&(Pe||!ye||(me.current=new Date,ue(Ee.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ae(!0),Oe.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(A||!ye)return;Oe.current=null;let e=Number(he.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(he.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-me.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=qC||a>.11){ue(Ee.current),n.onDismiss==null||n.onDismiss.call(n,n),ee(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Fe(),oe(!0);return}else{var o,s;(o=he.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=he.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}ce(!1),ae(!1),D(null)},onPointerMove:t=>{var n,r;if(!Oe.current||!ye||window.getSelection()?.toString().length>0)return;let i=t.clientY-Oe.current.y,a=t.clientX-Oe.current.x,o=e.swipeDirections??XC(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(E===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&ce(!0),(n=he.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=he.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},Ce&&!n.jsx&&ve!==`loading`?j.createElement(`button`,{"aria-label":T,"data-disabled":Pe,"data-close-button":!0,onClick:Pe||!ye?()=>{}:()=>{Fe(),n.onDismiss==null||n.onDismiss.call(n,n)},className:YC(C?.closeButton,n?.classNames?.closeButton)},w?.close??NC):null,(ve||n.icon||n.promise)&&n.icon!==null&&(w?.[ve]!==null||n.icon)?j.createElement(`div`,{"data-icon":``,className:YC(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ie():null,n.type===`loading`?null:Le):null,j.createElement(`div`,{"data-content":``,className:YC(C?.content,n?.classNames?.content)},j.createElement(`div`,{"data-title":``,className:YC(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?j.createElement(`div`,{"data-description":``,className:YC(v,xe,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),j.isValidElement(n.cancel)?n.cancel:n.cancel&&BC(n.cancel)?j.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{BC(n.cancel)&&ye&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Fe())},className:YC(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,j.isValidElement(n.action)?n.action:n.action&&BC(n.action)?j.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{BC(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Fe())},className:YC(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function QC(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function $C(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?UC:HC;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ew=j.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=VC,toastOptions:g,dir:_=QC(),gap:v=KC,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=j.useState([]),C=j.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=j.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[T,E]=j.useState([]),[D,O]=j.useState(!1),[ee,te]=j.useState(!1),[ne,k]=j.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),re=j.useRef(null),ie=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),ae=j.useRef(null),A=j.useRef(!1),oe=j.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||IC.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return j.useEffect(()=>IC.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{tf.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),j.useEffect(()=>{if(d!==`system`){k(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?k(`dark`):k(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{k(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{k(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),j.useEffect(()=>{x.length<=1&&O(!1)},[x]),j.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=re.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===re.current||re.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),j.useEffect(()=>{if(re.current)return()=>{ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null,A.current=!1)}},[re.current]),j.createElement(`section`,{ref:t,"aria-label":`${b} ${ie}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?j.createElement(`ol`,{key:t,dir:_===`auto`?QC():_,tabIndex:-1,ref:re,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ne,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${GC}px`,"--gap":`${v}px`,...m,...$C(l,u)},onBlur:e=>{A.current&&!e.currentTarget.contains(e.relatedTarget)&&(A.current=!1,ae.current&&=(ae.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||A.current||(A.current=!0,ae.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{ee||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||te(!0)},onPointerUp:()=>te(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>j.createElement(ZC,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:ee,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:oe,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:e.swipeDirections}))):null}))}),tw=`ContextMenu`,[nw,yre]=$d(tw,[nv]),rw=nv(),[iw,aw]=nw(tw),ow=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:a,modal:o=!0}=e,s=j.useRef(!1);{let e=j.useRef(!1);j.useEffect(()=>{i===!0&&!s.current&&!e.current&&(e.current=!0,console.warn("ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport."))},[i])}let[c,l]=fh({prop:i,defaultProp:!1,onChange:r,caller:tw}),u=rw(t);return(0,M.jsx)(iw,{scope:t,open:c,onOpenChange:l,modal:o,hasInteractedRef:s,children:(0,M.jsx)(ly,{...u,dir:a,open:c,onOpenChange:l,modal:o,children:n})})};ow.displayName=tw;var sw=`ContextMenuTrigger`,cw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=aw(sw,n),o=rw(n),s=j.useRef({x:0,y:0}),c=j.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=j.useRef(0),u=j.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{a.hasInteractedRef.current=!0,s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return j.useEffect(()=>u,[u]),j.useEffect(()=>void(r&&u()),[r,u]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(uy,{...o,virtualRef:c}),(0,M.jsx)(gf.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:F(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:F(e.onPointerDown,Lw(e=>{u(),a.open&&a.onOpenChange(!1),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:F(e.onPointerMove,Lw(u)),onPointerCancel:r?e.onPointerCancel:F(e.onPointerCancel,Lw(u)),onPointerUp:r?e.onPointerUp:F(e.onPointerUp,Lw(u))})]})});cw.displayName=sw;var lw=`ContextMenuPortal`,uw=e=>{let{__scopeContextMenu:t,...n}=e,r=rw(t);return(0,M.jsx)(dy,{...r,...n})};uw.displayName=lw;var dw=`ContextMenuContent`,fw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=aw(dw,n),a=rw(n),o=j.useRef(!1);return(0,M.jsx)(fy,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});fw.displayName=dw;var pw=`ContextMenuGroup`,mw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(py,{...i,...r,ref:t})});mw.displayName=pw;var hw=`ContextMenuLabel`,gw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(my,{...i,...r,ref:t})});gw.displayName=hw;var _w=`ContextMenuItem`,vw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(hy,{...i,...r,ref:t})});vw.displayName=_w;var yw=`ContextMenuCheckboxItem`,bw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(gy,{...i,...r,ref:t})});bw.displayName=yw;var xw=`ContextMenuRadioGroup`,Sw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(_y,{...i,...r,ref:t})});Sw.displayName=xw;var Cw=`ContextMenuRadioItem`,ww=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(vy,{...i,...r,ref:t})});ww.displayName=Cw;var Tw=`ContextMenuItemIndicator`,Ew=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(yy,{...i,...r,ref:t})});Ew.displayName=Tw;var Dw=`ContextMenuSeparator`,Ow=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(by,{...i,...r,ref:t})});Ow.displayName=Dw;var kw=`ContextMenuArrow`,Aw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(xy,{...i,...r,ref:t})});Aw.displayName=kw;var jw=`ContextMenuSub`,Mw=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=rw(t),[s,c]=fh({prop:i,defaultProp:a??!1,onChange:r,caller:jw});return(0,M.jsx)(Sy,{...o,open:s,onOpenChange:c,children:n})};Mw.displayName=jw;var Nw=`ContextMenuSubTrigger`,Pw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(Cy,{...i,...r,ref:t})});Pw.displayName=Nw;var Fw=`ContextMenuSubContent`,Iw=j.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=rw(n);return(0,M.jsx)(wy,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Iw.displayName=Fw;function Lw(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Rw=ow,zw=cw,Bw=uw,Vw=fw,Hw=gw,Uw=vw,Ww=bw,Gw=Sw,Kw=ww,qw=Ew,Jw=Ow,Yw=Mw,Xw=Pw,Zw=Iw,Qw=Object.defineProperty,$w=(e,t)=>Qw(e,`name`,{value:t,configurable:!0});function eT(e,[t,n]){return Math.min(n,Math.max(t,e))}$w(eT,`clamp`);var tT=Object.defineProperty,nT=(e,t)=>tT(e,`name`,{value:t,configurable:!0}),rT=!!(typeof window<`u`&&window.document&&window.document.createElement);function iT(e,t,{checkForDefaultPrevented:n=!0}={}){return nT(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}nT(iT,`composeEventHandlers`);function aT(e){if(!rT)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}nT(aT,`getOwnerWindow`);function oT(e){if(!rT)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}nT(oT,`getOwnerDocument`);function sT(e,t=!1){let{activeElement:n}=oT(e);if(!n?.nodeName)return null;if(cT(n)&&n.contentDocument)return sT(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=oT(n).getElementById(e);if(t)return t}}return n}nT(sT,`getActiveElement`);function cT(e){return e.tagName===`IFRAME`}nT(cT,`isFrame`);var lT=Object.defineProperty,uT=(e,t)=>lT(e,`name`,{value:t,configurable:!0});function dT(e,t){let n=j.createContext(t);n.displayName=e+`Context`;let r=uT(e=>{let{children:t,...r}=e,i=j.useMemo(()=>r,Object.values(r));return(0,M.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=j.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return uT(i,`useContext`),[r,i]}uT(dT,`createContext`);function fT(e,t=[]){let n=[];function r(t,r){let i=j.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=uT(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=j.useMemo(()=>o,Object.values(o));return(0,M.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=j.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return uT(s,`useContext`),[o,s]}uT(r,`createContext`);let i=uT(()=>{let t=n.map(e=>j.createContext(e));return uT(function(n){let r=n?.[e]||t;return j.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,pT(i,...t)]}uT(fT,`createContextScope`);function pT(...e){let t=e[0];if(e.length===1)return t;let n=uT(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return uT(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}uT(pT,`composeContextScopes`);var mT=Object.defineProperty,hT=(e,t)=>mT(e,`name`,{value:t,configurable:!0});function gT(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}hT(gT,`setRef`);function _T(...e){return t=>{let n=!1,r=e.map(e=>{let r=gT(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():gT(e[t],null)}}}}hT(_T,`composeRefs`);function vT(...e){return j.useCallback(_T(...e),e)}hT(vT,`useComposedRefs`);var yT=Object.defineProperty,bT=(e,t)=>yT(e,`name`,{value:t,configurable:!0});function xT(e){let t=j.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];kT(r)&&typeof NT==`function`&&(r=NT(r._payload)),j.Children.forEach(r,e=>{if(DT(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;kT(n)&&typeof NT==`function`&&(n=NT(n._payload)),a=wT(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=j.cloneElement(a,void 0,s):!o&&j.Children.count(r)===1&&j.isValidElement(r)&&(a=r);let c=a?ET(a):void 0,l=vT(n,c);if(!a){if(r||r===0)throw Error(o?MT(e):jT(e));return r}let u=TT(i,a.props??{});return a.type!==j.Fragment&&(u.ref=n?l:c),j.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}bT(xT,`createSlot`);var ST=Symbol.for(`radix.slottable`);function CT(e){let t=bT(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=ST,t}bT(CT,`createSlottable`);var wT=bT((e,t)=>{if(`child`in e.props){let t=e.props.child;return j.isValidElement(t)?j.cloneElement(t,void 0,e.props.children(t.props.children)):null}return j.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function TT(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}bT(TT,`mergeProps`);function ET(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}bT(ET,`getElementRef`);function DT(e){return j.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ST}bT(DT,`isSlottable`);var OT=Symbol.for(`react.lazy`);function kT(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===OT&&`_payload`in e&&AT(e._payload)}bT(kT,`isLazyComponent`);function AT(e){return typeof e==`object`&&!!e&&`then`in e}bT(AT,`isPromiseLike`);var jT=bT(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),MT=bT(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),NT=j.use,PT=Object.defineProperty,FT=(e,t)=>PT(e,`name`,{value:t,configurable:!0});function IT(e){let t=e+`CollectionProvider`,[n,r]=fT(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=FT(e=>{let{scope:t,children:n}=e,r=j.useRef(null),a=j.useRef(new Map).current;return(0,M.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=xT(s),l=j.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(c,{ref:vT(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=xT(u),p=j.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=j.useRef(null),s=vT(t,o),c=a(u,n);return j.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,M.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return j.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return FT(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}FT(IT,`createCollection`);var LT=new WeakMap,RT=class e extends Map{static{FT(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],LT.set(this,!0)}set(e,t){return LT.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=VT(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t===void 0?!1:this.delete(t)}at(e){let t=zT(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=zT(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return zT(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function zT(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=BT(e,t);return n===-1?void 0:e[n]}FT(zT,`at`);function BT(e,t){let n=e.length,r=VT(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}FT(BT,`toSafeIndex`);function VT(e){return e!==e||e===0?0:Math.trunc(e)}FT(VT,`toSafeInteger`);function HT(e){let t=e+`CollectionProvider`,[n,r]=fT(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new RT,setItemMap:FT(()=>void 0,`setItemMap`)}),o=FT(({state:e,...t})=>e?(0,M.jsx)(c,{...t,state:e}):(0,M.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=FT(e=>{let t=h();return(0,M.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=FT(e=>{let{scope:t,children:n,state:r}=e,a=j.useRef(null),[o,s]=j.useState(null),c=vT(a,s),[l,u]=r;return j.useEffect(()=>{if(!o)return;let e=KT(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,M.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=xT(l),d=j.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,M.jsx)(u,{ref:vT(t,a(l,n).collectionRef),children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=xT(f),m=j.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=j.useRef(null),[s,c]=j.useState(null),l=vT(t,o,c),{setItemMap:u}=a(f,n),d=j.useRef(i);UT(d.current,i)||(d.current=i);let m=d.current;return j.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(GT):(t.set(s,{...e,element:s}),t.toSorted(GT)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new RT(e)))}},[s,m,u]),(0,M.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return j.useState(new RT)}FT(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return FT(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}FT(HT,`createCollection`);function UT(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)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)||e[r]!==t[r])return!1;return!0}FT(UT,`shallowEqual`);function WT(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}FT(WT,`isElementPreceding`);function GT(e,t){return!e[1].element||!t[1].element?0:WT(e[1].element,t[1].element)?-1:1}FT(GT,`sortByDocumentPosition`);function KT(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}FT(KT,`getChildListObserver`);var qT=Object.defineProperty,JT=(e,t)=>qT(e,`name`,{value:t,configurable:!0}),YT=j.createContext(void 0);function XT(e){let t=j.useContext(YT);return e||t||`ltr`}JT(XT,`useDirection`);var ZT=Object.defineProperty,QT=(e,t)=>ZT(e,`name`,{value:t,configurable:!0}),$T=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=xT(`Primitive.${t}`),r=j.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function eE(e,t){e&&tf.flushSync(()=>e.dispatchEvent(t))}QT(eE,`dispatchDiscreteCustomEvent`);var tE=Object.defineProperty,nE=(e,t)=>tE(e,`name`,{value:t,configurable:!0});function rE(e){let t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>((...e)=>t.current?.(...e)),[])}nE(rE,`useCallbackRef`);var iE=Object.defineProperty,aE=(e,t)=>iE(e,`name`,{value:t,configurable:!0}),oE=`dismissableLayer.update`,sE=`dismissableLayer.pointerDownOutside`,cE=`dismissableLayer.focusOutside`,lE,uE=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),dE=j.forwardRef(aE(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=j.useContext(uE),[d,f]=j.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=j.useState({}),h=vT(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=j.useRef(!1),C=mE(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:j.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=hE(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=rE(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return j.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),j.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(lE=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),gE(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=lE))}},[d,p,n,u]),j.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),gE())},[d,u]),j.useEffect(()=>{let e=aE(()=>m({}),`handleUpdate`);return document.addEventListener(oE,e),()=>document.removeEventListener(oE,e)},[]),(0,M.jsx)($T.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:iT(e.onFocusCapture,w.onFocusCapture),onBlurCapture:iT(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:iT(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function fE(){let e=j.useContext(uE),[t,n]=j.useState(null);return j.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}aE(fE,`useDismissableLayerSurface`);var pE=aE(()=>!0,`IS_TRUE`);function mE(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=pE}=t,s=rE(e),c=j.useRef(!1),l=j.useRef(!1),u=j.useRef(new Map),d=j.useRef(()=>{});return j.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}aE(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}aE(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}aE(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}aE(p,`handleInteractionBubble`);let m=aE(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||_E(sE,s,p,{discrete:!0})};if(aE(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:aE(()=>c.current=!0,`onPointerDownCapture`)}}aE(mE,`usePointerDownOutside`);function hE(e,t=globalThis?.document){let n=rE(e),r=j.useRef(!1);return j.useEffect(()=>{let e=aE(e=>{e.target&&!r.current&&_E(cE,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:aE(()=>r.current=!0,`onFocusCapture`),onBlurCapture:aE(()=>r.current=!1,`onBlurCapture`)}}aE(hE,`useFocusOutside`);function gE(){let e=new CustomEvent(oE);document.dispatchEvent(e)}aE(gE,`dispatchUpdate`);function _E(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?eE(i,a):i.dispatchEvent(a)}aE(_E,`handleAndDispatchCustomEvent`);var vE=Object.defineProperty,yE=(e,t)=>vE(e,`name`,{value:t,configurable:!0}),bE=0,xE=null;function SE(e){return CE(),e.children}yE(SE,`FocusGuards`);function CE(){j.useEffect(()=>{xE||={start:wE(),end:wE()};let{start:e,end:t}=xE;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),bE++,()=>{bE===1&&(xE?.start.remove(),xE?.end.remove(),xE=null),bE=Math.max(0,bE-1)}},[])}yE(CE,`useFocusGuards`);function wE(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}yE(wE,`createFocusGuard`);var TE=Object.defineProperty,EE=(e,t)=>TE(e,`name`,{value:t,configurable:!0}),DE=`focusScope.autoFocusOnMount`,OE=`focusScope.autoFocusOnUnmount`,kE={bubbles:!1,cancelable:!0},AE=j.forwardRef(EE(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=j.useState(null),l=rE(i),u=rE(a),d=j.useRef(null),f=vT(t,c),p=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:LE(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||LE(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&LE(s)};EE(e,`handleFocusIn`),EE(t,`handleFocusOut`),EE(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),j.useEffect(()=>{if(s){RE.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(DE,kE);s.addEventListener(DE,l),s.dispatchEvent(t),t.defaultPrevented||(jE(VE(NE(s)),{select:!0}),document.activeElement===e&&LE(s))}return()=>{s.removeEventListener(DE,l),setTimeout(()=>{let t=new CustomEvent(OE,kE);s.addEventListener(OE,u),s.dispatchEvent(t),t.defaultPrevented||LE(e??document.body,{select:!0}),s.removeEventListener(OE,u),RE.remove(p)},0)}}},[s,l,u,p]);let m=j.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=ME(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&LE(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&LE(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,M.jsx)($T.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function jE(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(LE(r,{select:t}),document.activeElement!==n)return}EE(jE,`focusFirst`);function ME(e){let t=NE(e);return[PE(t,e),PE(t.reverse(),e)]}EE(ME,`getTabbableEdges`);function NE(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:EE(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}EE(NE,`getTabbableCandidates`);function PE(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):FE(r,{upTo:t})))return r}EE(PE,`findVisible`);function FE(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}EE(FE,`isHidden`);function IE(e){return e instanceof HTMLInputElement&&`select`in e}EE(IE,`isSelectableInput`);function LE(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&IE(e)&&t&&e.select()}}EE(LE,`focus`);var RE=zE();function zE(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=BE(e,t),e.unshift(t)},remove(t){e=BE(e,t),e[0]?.resume()}}}EE(zE,`createFocusScopesStack`);function BE(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}EE(BE,`arrayRemove`);function VE(e){return e.filter(e=>e.tagName!==`A`)}EE(VE,`removeLinks`);var HE=globalThis?.document?j.useLayoutEffect:()=>{},UE=Object.defineProperty,WE=(e,t)=>UE(e,`name`,{value:t,configurable:!0}),GE=j.useId||(()=>void 0),KE=0;function qE(e){let[t,n]=j.useState(GE());return HE(()=>{e||n(e=>e??String(KE++))},[e]),e||(t?`radix-${t}`:``)}WE(qE,`useId`);var JE=Object.defineProperty,YE=(e,t)=>JE(e,`name`,{value:t,configurable:!0});function XE(e){let[t,n]=j.useState(void 0);return HE(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}YE(XE,`useSize`);var ZE=Object.defineProperty,QE=(e,t)=>ZE(e,`name`,{value:t,configurable:!0}),$E=`Popper`,[eD,tD]=fT($E),[nD,rD]=eD($E),iD=QE(e=>{let{__scopePopper:t,children:n}=e,[r,i]=j.useState(null),[a,o]=j.useState(void 0);return(0,M.jsx)(nD,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),aD=`PopperAnchor`,oD=j.forwardRef(QE(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=rD(aD,n),o=j.useRef(null),s=a.onAnchorChange,c=vT(t,j.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=j.useRef(null);j.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&fD(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,M.jsx)($T.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),sD=`PopperContent`,[cD,bre]=eD(sD),lD=j.forwardRef(QE(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=rD(sD,n),[_,v]=j.useState(null),y=vT(t,v),[b,x]=j.useState(null),S=XE(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,ee={padding:E,boundary:D.filter(uD),altBoundary:O},{refs:te,floatingStyles:ne,placement:k,isPositioned:re,middlewareData:ie}=Im({strategy:`fixed`,placement:T,whileElementsMounted:QE((...e)=>Cm(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Lm({mainAxis:i+w,alignmentAxis:o}),c&&Rm({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?zm():void 0,...ee}),c&&Bm({...ee}),Vm({...ee,apply:QE(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&Um({element:b,padding:s}),dD({arrowWidth:C,arrowHeight:w}),f&&Hm({strategy:`referenceHidden`,...ee,boundary:O?ee.boundary:void 0})]}),ae=g.setPlacementState;HE(()=>(ae(k),()=>{ae(void 0)}),[k,ae]);let[A,oe]=fD(k),se=rE(m);HE(()=>{re&&se?.()},[re,se]);let ce=ie.arrow?.x,le=ie.arrow?.y,ue=ie.arrow?.centerOffset!==0,[de,fe]=j.useState();return HE(()=>{_&&fe(window.getComputedStyle(_).zIndex)},[_]),(0,M.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:re?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:de,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,M.jsx)(cD,{scope:n,placedSide:A,placedAlign:oe,onArrowChange:x,arrowX:ce,arrowY:le,shouldHideArrow:ue,children:(0,M.jsx)($T.div,{"data-side":A,"data-align":oe,...h,ref:y,style:{...h.style,animation:re?h.style?.animation:`none`}})})})},`PopperContent`));function uD(e){return e!==null}QE(uD,`isNotNull`);var dD=QE(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=fD(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function fD(e){let[t,n=`center`]=e.split(`-`);return[t,n]}QE(fD,`getSideAndAlignFromPlacement`);var pD=iD,mD=oD,hD=lD,gD=Object.defineProperty,_D=j.forwardRef(((e,t)=>gD(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=j.useState(!1);HE(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?tf.createPortal((0,M.jsx)($T.div,{...r,ref:t}),o):null},`Portal`)),vD=Object.defineProperty,yD=(e,t)=>vD(e,`name`,{value:t,configurable:!0});function bD(e,t){return j.useReducer((e,n)=>t[e][n]??e,e)}yD(bD,`useStateMachine`);var xD=yD(e=>{let{present:t,children:n}=e,r=SD(t),i=typeof n==`function`?n({present:r.isPresent}):j.Children.only(n),a=wD(r.ref,ED(i));return typeof n==`function`||r.isPresent?j.cloneElement(i,{ref:a}):null},`Presence`);function SD(e){let[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef(`none`),o=j.useRef(void 0),[s,c]=bD(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return j.useEffect(()=>{s===`mounted`?(a.current=o.current??TD(r.current),o.current=void 0):a.current=`none`},[s]),HE(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=TD(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),HE(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=yD(a=>{let o=TD(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=yD(e=>{e.target===t&&(a.current=TD(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:j.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=TD(t)}else r.current=null;n(e)},[])}}yD(SD,`usePresence`);function CD(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}yD(CD,`setRef`);function wD(...e){let t=j.useRef(e);return t.current=e,j.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=CD(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():CD(n[e],null)}}},[])}yD(wD,`useStableComposedRefs`);function TD(e){return e?.animationName||`none`}yD(TD,`getAnimationName`);function ED(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}yD(ED,`getElementRef`);var DD=Object.defineProperty,OD=(e,t)=>DD(e,`name`,{value:t,configurable:!0}),kD=j.useEffectEvent,AD=j.useInsertionEffect;function jD(e){if(typeof kD==`function`)return kD(e);let t=j.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof AD==`function`?AD(()=>{t.current=e}):HE(()=>{t.current=e}),j.useMemo(()=>((...e)=>t.current?.(...e)),[])}OD(jD,`useEffectEvent`);var MD=Object.defineProperty,ND=(e,t)=>MD(e,`name`,{value:t,configurable:!0}),PD=j.useInsertionEffect||HE;function FD({prop:e,defaultProp:t,onChange:n=ND(()=>{},`onChange`),caller:r}){let[i,a,o]=ID({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,j.useCallback(t=>{if(s){let n=LD(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}ND(FD,`useControllableState`);function ID({defaultProp:e,onChange:t}){let[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return PD(()=>{a.current=t},[t]),j.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}ND(ID,`useUncontrolledState`);function LD(e){return typeof e==`function`}ND(LD,`isFunction`);var RD=Symbol(`RADIX:SYNC_STATE`);function zD(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=jD(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=j.useReducer((t,n)=>{if(n.type===RD)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=j.useRef(p);j.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=j.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return j.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:RD,state:i})},[i,d.state,c]),[h,f]}ND(zD,`useControllableStateReducer`);var BD=Object.defineProperty,VD=(e,t)=>BD(e,`name`,{value:t,configurable:!0});function HD(e){let t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}VD(HD,`usePrevious`);var UD=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),WD=Object.defineProperty,GD=(e,t)=>WD(e,`name`,{value:t,configurable:!0}),KD=[` `,`Enter`,`ArrowUp`,`ArrowDown`],qD=[` `,`Enter`],JD=`Select`,[YD,XD,ZD]=IT(JD),[QD,xre]=fT(JD,[ZD,tD]),$D=tD(),[eO,tO]=QD(JD),[nO,rO]=QD(JD);function iO(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=$D(t),[_,v]=j.useState(null),[y,b]=j.useState(null),[x,S]=j.useState(!1),C=XT(l),[w,T]=FD({prop:r,defaultProp:i??!1,onChange:a,caller:JD}),[E,D]=FD({prop:o,defaultProp:s,onChange:c,caller:JD}),O=j.useRef(null),ee=j.useRef(E);j.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=GD(()=>D(ee.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,D]);let te=_?!!m||!!_.closest(`form`):!0,[ne,k]=j.useState(new Set),re=qE(),ie=Array.from(ne).map(e=>e.props.value).join(`;`),ae=j.useCallback(e=>{k(t=>new Set(t).add(e))},[]),A=j.useCallback(e=>{k(t=>{let n=new Set(t);return n.delete(e),n})},[]),oe={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:re,value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:ne,nativeSelectKey:ie,isFormControl:te};return(0,M.jsx)(pD,{...g,children:(0,M.jsx)(eO,{scope:t,...oe,children:(0,M.jsx)(YD.Provider,{scope:t,children:(0,M.jsx)(nO,{scope:t,onNativeOptionAdd:ae,onNativeOptionRemove:A,children:RO(h)?h(oe):n})})})})}GD(iO,`SelectProvider`);var aO=GD(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,M.jsx)(iO,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,M.jsxs)(M.Fragment,{children:[n,e?(0,M.jsx)(LO,{__scopeSelect:t}):null]})})},`Select`),oO=`SelectTrigger`,sO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=$D(n),o=tO(oO,n),s=o.disabled||r,c=vT(t,o.onTriggerChange),l=XD(n),u=j.useRef(`touch`),[d,f,p]=BO(e=>{let t=l().filter(e=>!e.disabled),n=VO(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=GD(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,M.jsx)(mD,{asChild:!0,...a,children:(0,M.jsx)($T.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":zO(o.value)?``:void 0,...i,ref:c,onClick:iT(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:iT(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:iT(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&KD.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),cO=`SelectValue`,lO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=tO(cO,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=vT(t,c.onValueNodeChange);HE(()=>{l(u)},[l,u]);let f=zO(c.value);return(0,M.jsx)($T.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,M.jsx)(j.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),uO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,M.jsx)($T.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[dO,fO]=QD(`SelectPortal`,{forceMount:void 0}),pO=GD(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,M.jsx)(dO,{scope:e.__scopeSelect,forceMount:n,children:(0,M.jsx)(_D,{asChild:!0,...r})})},`SelectPortal`),mO=`SelectContent`,hO=j.forwardRef(GD(function(e,t){let n=fO(mO,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=tO(mO,e.__scopeSelect),[o,s]=j.useState();return HE(()=>{s(new DocumentFragment)},[]),(0,M.jsx)(xD,{present:r||a.open,children:({present:e})=>e?(0,M.jsx)(xO,{...i,ref:t}):(0,M.jsx)(gO,{...i,fragment:o})})},`SelectContent`)),gO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?tf.createPortal((0,M.jsx)(vO,{scope:n,children:(0,M.jsx)(YD.Slot,{scope:n,children:(0,M.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),_O=10,[vO,yO]=QD(mO),bO=xT(`SelectContent.RemoveScroll`),xO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=tO(mO,n),[y,b]=j.useState(null),[x,S]=j.useState(null),C=vT(t,b),[w,T]=j.useState(null),[E,D]=j.useState(null),O=XD(n),[ee,te]=j.useState(!1),ne=j.useRef(!1);j.useEffect(()=>{if(y)return Qg(y)},[y]),CE();let k=j.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),re=j.useCallback(()=>k([w,y]),[k,w,y]);j.useEffect(()=>{ee&&re()},[ee,re]);let{onOpenChange:ie,triggerPointerDownPosRef:ae}=v;j.useEffect(()=>{if(y){let e={x:0,y:0},t=GD(t=>{e={x:Math.abs(Math.round(t.pageX)-(ae.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ae.current?.y??0))}},`handlePointerMove`),n=GD(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||ie(!1),document.removeEventListener(`pointermove`,t),ae.current=null},`handlePointerUp`);return ae.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,ie,ae]),j.useEffect(()=>{let e=GD(()=>ie(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ie]);let[A,oe]=BO(e=>{let t=O().filter(e=>!e.disabled),n=VO(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),se=j.useCallback((e,t,n)=>{let r=!ne.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(ne.current=!0))},[v.value]),ce=j.useCallback(()=>y?.focus(),[y]),le=j.useCallback((e,t,n)=>{let r=!ne.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),ue=r===`popper`?CO:SO,de=ue===CO?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,M.jsx)(vO,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:se,selectedItem:w,onItemLeave:ce,itemTextRefCallback:le,focusSelectedItem:re,selectedItemText:E,position:r,isPositioned:ee,searchRef:A,children:(0,M.jsx)(Ug,{as:bO,allowPinchZoom:!0,children:(0,M.jsx)(AE,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:iT(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,M.jsx)(dE,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,M.jsx)(ue,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...de,onPlaced:()=>te(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:iT(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&oe(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>k(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),SO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=tO(mO,n),o=yO(mO,n),[s,c]=j.useState(null),[l,u]=j.useState(null),d=vT(t,u),f=XD(n),p=j.useRef(!1),m=j.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=j.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-_O,d=eT(a,[_O,Math.max(_O,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-_O,d=eT(a,[_O,Math.max(_O,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-_O*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-_O,D=c-E,O=g.offsetHeight/2,ee=g.offsetTop+O,te=m+v+ee,ne=x-te;if(te<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=te+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+ne;s.style.height=t+`px`,h.scrollTop=te-E+h.offsetTop}s.style.margin=`${_O}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);HE(()=>y(),[y]);let[b,x]=j.useState();return HE(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,M.jsx)(wO,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:j.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,M.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,M.jsx)($T.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),CO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=_O,...a}=e,o=$D(n);return(0,M.jsx)(hD,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[wO,TO]=QD(mO,{}),EO=`SelectViewport`,DO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=yO(EO,n),o=TO(EO,n),s=vT(t,a.onViewportChange),c=j.useRef(0);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,M.jsx)(YD.Slot,{scope:n,children:(0,M.jsx)($T.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:iT(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-_O*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Sre,Cre]=QD(`SelectGroup`),OO=`SelectItem`,[kO,AO]=QD(OO),jO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=tO(OO,n),c=yO(OO,n),l=s.value===r,[u,d]=j.useState(a??``),[f,p]=j.useState(!1),m=vT(t,rE(e=>c.itemRefCallback?.(e,r,i))),h=qE(),g=j.useRef(`touch`),_=GD(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,M.jsx)(kO,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:j.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,M.jsx)(YD.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,M.jsx)($T.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:iT(o.onFocus,()=>p(!0)),onBlur:iT(o.onBlur,()=>p(!1)),onClick:iT(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:iT(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:iT(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:iT(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:iT(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:iT(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(qD.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),MO=`SelectItemText`,NO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=tO(MO,n),s=yO(MO,n),c=AO(MO,n),l=rO(MO,n),[u,d]=j.useState(null),f=rE(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=vT(t,d,c.onItemTextChange,f),m=u?.textContent,h=j.useMemo(()=>(0,M.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return HE(()=>(g(h),()=>_(h)),[g,_,h]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)($T.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!zO(o.value)?tf.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),PO=`SelectItemIndicator`,FO=j.forwardRef(GD(function(e,t){let{__scopeSelect:n,...r}=e;return AO(PO,n).isSelected?(0,M.jsx)($T.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),IO=`SelectBubbleInput`,LO=j.forwardRef(GD(function({__scopeSelect:e,...t},n){let r=tO(IO,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=j.useRef(null),m=vT(n,p),h=i??``,g=HD(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return j.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,M.jsxs)($T.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...UD,...t.style},ref:m,defaultValue:h,children:[zO(i)&&!_?(0,M.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function RO(e){return typeof e==`function`}GD(RO,`isFunction`);function zO(e){return e===``||e===void 0}GD(zO,`shouldShowPlaceholder`);function BO(e){let t=rE(e),n=j.useRef(``),r=j.useRef(0),i=j.useCallback(e=>{let i=n.current+e;t(i),GD((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=j.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return j.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}GD(BO,`useTypeaheadSearch`);function VO(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=HO(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}GD(VO,`findNextItem`);function HO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}GD(HO,`wrapArray`);function UO(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function WO(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var GO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qO={};function JO(e,t){return((t||qO).jsx?KO:GO).test(e)}var YO=/[ \t\n\f\r]/g;function XO(e){return typeof e==`object`?e.type===`text`?ZO(e.value):!1:ZO(e)}function ZO(e){return e.replace(YO,``)===``}var QO=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};QO.prototype.normal={},QO.prototype.property={},QO.prototype.space=void 0;function $O(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new QO(n,r,t)}function ek(e){return e.toLowerCase()}var tk=class{constructor(e,t){this.attribute=t,this.property=e}};tk.prototype.attribute=``,tk.prototype.booleanish=!1,tk.prototype.boolean=!1,tk.prototype.commaOrSpaceSeparated=!1,tk.prototype.commaSeparated=!1,tk.prototype.defined=!1,tk.prototype.mustUseProperty=!1,tk.prototype.number=!1,tk.prototype.overloadedBoolean=!1,tk.prototype.property=``,tk.prototype.spaceSeparated=!1,tk.prototype.space=void 0;var nk=r({boolean:()=>ik,booleanish:()=>ak,commaOrSpaceSeparated:()=>lk,commaSeparated:()=>ck,number:()=>I,overloadedBoolean:()=>ok,spaceSeparated:()=>sk}),rk=0,ik=uk(),ak=uk(),ok=uk(),I=uk(),sk=uk(),ck=uk(),lk=uk();function uk(){return 2**++rk}var dk=Object.keys(nk),fk=class extends tk{constructor(e,t,n,r){let i=-1;if(super(e,t),pk(this,`space`,r),typeof n==`number`)for(;++i<dk.length;){let e=dk[i];pk(this,dk[i],(n&nk[e])===nk[e])}}};fk.prototype.defined=!0;function pk(e,t,n){n&&(e[t]=n)}function mk(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new fk(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ek(r)]=r,n[ek(a.attribute)]=r}return new QO(t,n,e.space)}var hk=mk({properties:{ariaActiveDescendant:null,ariaAtomic:ak,ariaAutoComplete:null,ariaBusy:ak,ariaChecked:ak,ariaColCount:I,ariaColIndex:I,ariaColSpan:I,ariaControls:sk,ariaCurrent:null,ariaDescribedBy:sk,ariaDetails:null,ariaDisabled:ak,ariaDropEffect:sk,ariaErrorMessage:null,ariaExpanded:ak,ariaFlowTo:sk,ariaGrabbed:ak,ariaHasPopup:null,ariaHidden:ak,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:sk,ariaLevel:I,ariaLive:null,ariaModal:ak,ariaMultiLine:ak,ariaMultiSelectable:ak,ariaOrientation:null,ariaOwns:sk,ariaPlaceholder:null,ariaPosInSet:I,ariaPressed:ak,ariaReadOnly:ak,ariaRelevant:null,ariaRequired:ak,ariaRoleDescription:sk,ariaRowCount:I,ariaRowIndex:I,ariaRowSpan:I,ariaSelected:ak,ariaSetSize:I,ariaSort:null,ariaValueMax:I,ariaValueMin:I,ariaValueNow:I,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function gk(e,t){return t in e?e[t]:t}function _k(e,t){return gk(e,t.toLowerCase())}var wre=mk({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:ck,acceptCharset:sk,accessKey:sk,action:null,allow:null,allowFullScreen:ik,allowPaymentRequest:ik,allowUserMedia:ik,alpha:ik,alt:null,as:null,async:ik,autoCapitalize:null,autoComplete:sk,autoFocus:ik,autoPlay:ik,blocking:sk,capture:null,charSet:null,checked:ik,cite:null,className:sk,closedBy:null,colorSpace:null,cols:I,colSpan:I,command:null,commandFor:null,content:null,contentEditable:ak,controls:ik,controlsList:sk,coords:I|ck,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ik,defer:ik,dir:null,dirName:null,disabled:ik,download:ok,draggable:ak,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ik,formTarget:null,headers:sk,height:I,hidden:ok,high:I,href:null,hrefLang:null,htmlFor:sk,httpEquiv:sk,id:null,imageSizes:null,imageSrcSet:null,inert:ik,inputMode:null,integrity:null,is:null,isMap:ik,itemId:null,itemProp:sk,itemRef:sk,itemScope:ik,itemType:sk,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ik,low:I,manifest:null,max:null,maxLength:I,media:null,method:null,min:null,minLength:I,multiple:ik,muted:ik,name:null,nonce:null,noModule:ik,noValidate:ik,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ik,optimum:I,pattern:null,ping:sk,placeholder:null,playsInline:ik,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ik,referrerPolicy:null,rel:sk,required:ik,reversed:ik,rows:I,rowSpan:I,sandbox:sk,scope:null,scoped:ik,seamless:ik,selected:ik,shadowRootClonable:ik,shadowRootCustomElementRegistry:ik,shadowRootDelegatesFocus:ik,shadowRootMode:null,shadowRootSerializable:ik,shape:null,size:I,sizes:null,slot:null,span:I,spellCheck:ak,src:null,srcDoc:null,srcLang:null,srcSet:null,start:I,step:null,style:null,tabIndex:I,target:null,title:null,translate:null,type:null,typeMustMatch:ik,useMap:null,value:ak,width:I,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:sk,axis:null,background:null,bgColor:null,border:I,borderColor:null,bottomMargin:I,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ik,declare:ik,event:null,face:null,frame:null,frameBorder:null,hSpace:I,leftMargin:I,link:null,longDesc:null,lowSrc:null,marginHeight:I,marginWidth:I,noResize:ik,noHref:ik,noShade:ik,noWrap:ik,object:null,profile:null,prompt:null,rev:null,rightMargin:I,rules:null,scheme:null,scrolling:ak,standby:null,summary:null,text:null,topMargin:I,valueType:null,version:null,vAlign:null,vLink:null,vSpace:I,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ik,disablePictureInPicture:ik,disableRemotePlayback:ik,exportParts:ck,part:sk,prefix:null,property:null,results:I,security:null,unselectable:null},space:`html`,transform:_k}),Tre=mk({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:lk,accentHeight:I,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:I,amplitude:I,arabicForm:null,ascent:I,attributeName:null,attributeType:null,azimuth:I,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:I,by:null,calcMode:null,capHeight:I,className:sk,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:I,diffuseConstant:I,direction:null,display:null,dur:null,divisor:I,dominantBaseline:null,download:ik,dx:null,dy:null,edgeMode:null,editable:null,elevation:I,enableBackground:null,end:null,event:null,exponent:I,externalResourcesRequired:null,fill:null,fillOpacity:I,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ck,g2:ck,glyphName:ck,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:I,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:I,horizOriginX:I,horizOriginY:I,id:null,ideographic:I,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:I,k:I,k1:I,k2:I,k3:I,k4:I,kernelMatrix:lk,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:I,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:I,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:I,overlineThickness:I,paintOrder:null,panose1:null,path:null,pathLength:I,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:sk,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:I,pointsAtY:I,pointsAtZ:I,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lk,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lk,rev:lk,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lk,requiredFeatures:lk,requiredFonts:lk,requiredFormats:lk,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:I,specularExponent:I,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:I,strikethroughThickness:I,string:null,stroke:null,strokeDashArray:lk,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:I,strokeOpacity:I,strokeWidth:null,style:null,surfaceScale:I,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lk,tabIndex:I,tableValues:null,target:null,targetX:I,targetY:I,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lk,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:I,underlineThickness:I,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:I,values:null,vAlphabetic:I,vMathematical:I,vectorEffect:null,vHanging:I,vIdeographic:I,version:null,vertAdvY:I,vertOriginX:I,vertOriginY:I,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:I,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:gk}),vk=mk({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),yk=mk({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:_k}),bk=mk({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ere={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Dre=/[A-Z]/g,xk=/-[a-z]/g,Ore=/^data[-\w.:]+$/i;function Sk(e,t){let n=ek(t),r=t,i=tk;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Ore.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(xk,Are);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!xk.test(e)){let n=e.replace(Dre,kre);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=fk}return new i(r,t)}function kre(e){return`-`+e.toLowerCase()}function Are(e){return e.charAt(1).toUpperCase()}var Ck=$O([hk,wre,vk,yk,bk],`html`),wk=$O([hk,Tre,vk,yk,bk],`svg`);function Tk(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ek(e){return e.join(` `).trim()}var jre=i(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
45
45
  `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Mre=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(jre());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Nre=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Pre=i(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Mre()),r=Nre();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Dk=kk(`end`),Ok=kk(`start`);function kk(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Ak(e){let t=Ok(e),n=Dk(e);if(t&&n)return{start:t,end:n}}function jk(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Nk(e.position):`start`in e||`end`in e?Nk(e):`line`in e||`column`in e?Mk(e):``}function Mk(e){return Pk(e&&e.line)+`:`+Pk(e&&e.column)}function Nk(e){return Mk(e&&e.start)+`-`+Mk(e&&e.end)}function Pk(e){return e&&typeof e==`number`?e:1}var Fk=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=jk(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Fk.prototype.file=``,Fk.prototype.name=``,Fk.prototype.reason=``,Fk.prototype.message=``,Fk.prototype.stack=``,Fk.prototype.column=void 0,Fk.prototype.line=void 0,Fk.prototype.ancestors=void 0,Fk.prototype.cause=void 0,Fk.prototype.fatal=void 0,Fk.prototype.place=void 0,Fk.prototype.ruleId=void 0,Fk.prototype.source=void 0;var Fre=n(Pre(),1),Ik={}.hasOwnProperty,Ire=new Map,Lre=/[A-Z]/g,Rre=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),zre=new Set([`td`,`th`]),Lk=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Bre(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Jre(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=qre(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?wk:Ck,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Rk(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Rk(e,t,n){if(t.type===`element`)return Vre(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Hre(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Wre(e,t,n);if(t.type===`mdxjsEsm`)return Ure(e,t);if(t.type===`root`)return Gre(e,t,n);if(t.type===`text`)return Kre(e,t)}function Vre(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=wk,e.schema=i),e.ancestors.push(t);let a=Hk(e,t.tagName,!1),o=Yre(e,t),s=Vk(e,t);return Rre.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!XO(e):!0})),zk(e,o,a,t),Bk(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Hre(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Uk(e,t.position)}function Ure(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Uk(e,t.position)}function Wre(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=wk,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Hk(e,t.name,!0),o=Xre(e,t),s=Vk(e,t);return zk(e,o,a,t),Bk(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Gre(e,t,n){let r={};return Bk(r,Vk(e,t)),e.create(t,e.Fragment,r,n)}function Kre(e,t){return t.value}function zk(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bk(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function qre(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Jre(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Ok(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Yre(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ik.call(t.properties,i)){let a=Zre(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&zre.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Xre(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Uk(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Uk(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Vk(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ire;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Rk(e,a,o);s!==void 0&&n.push(s)}return n}function Zre(e,t,n){let r=Sk(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?WO(n):Ek(n)),r.property===`style`){let t=typeof n==`object`?n:Qre(e,String(n));return e.stylePropertyNameCase===`css`&&(t=$re(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ere[r.property]||r.property:r.attribute,n]}}function Qre(e,t){try{return(0,Fre.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Fk("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Lk+`#cannot-parse-style-attribute`,r}}function Hk(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=JO(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=JO(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ik.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Uk(e)}function Uk(e,t){let n=new Fk("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Lk+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function $re(e){let t={},n;for(n in e)Ik.call(e,n)&&(t[eie(n)]=e[n]);return t}function eie(e){let t=e.replace(Lre,tie);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function tie(e){return`-`+e.toLowerCase()}var Wk={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},nie={};function Gk(e,t){let n=t||nie;return Kk(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function Kk(e,t,n){if(rie(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return qk(e.children,t,n)}return Array.isArray(e)?qk(e,t,n):``}function qk(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Kk(e[i],t,n);return r.join(``)}function rie(e){return!!(e&&typeof e==`object`)}var Jk=document.createElement(`i`);function Yk(e){let t=`&`+e+`;`;Jk.innerHTML=t;let n=Jk.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Xk(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Zk(e,t){return e.length>0?(Xk(e,e.length,0,t),e):t}var Qk={}.hasOwnProperty;function $k(e){let t={},n=-1;for(;++n<e.length;)iie(t,e[n]);return t}function iie(e,t){let n;for(n in t){let r=(Qk.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Qk.call(r,a)||(r[a]=[]);let e=i[a];aie(r[a],Array.isArray(e)?e:e?[e]:[])}}}function aie(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Xk(e,0,0,r)}function eA(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function tA(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var nA=uA(/[A-Za-z]/),rA=uA(/[\dA-Za-z]/),oie=uA(/[#-'*+\--9=?A-Z^-~]/);function iA(e){return e!==null&&(e<32||e===127)}var aA=uA(/\d/),sie=uA(/[\dA-Fa-f]/),cie=uA(/[!-/:-@[-`{-~]/);function L(e){return e!==null&&e<-2}function oA(e){return e!==null&&(e<0||e===32)}function sA(e){return e===-2||e===-1||e===32}var cA=uA(/\p{P}|\p{S}/u),lA=uA(/\s/);function uA(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function dA(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&rA(e.charCodeAt(n+1))&&rA(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function fA(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return sA(r)?(e.enter(n),s(r)):t(r)}function s(r){return sA(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var lie={tokenize:uie};function uie(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),fA(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return L(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var die={tokenize:fie},pA={tokenize:pie};function fie(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Xk(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(pA,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(pA,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return L(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Xk(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function pie(e,t,n){return fA(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function mA(e){if(e===null||oA(e)||lA(e))return 1;if(cA(e))return 2}function hA(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var gA={name:`attention`,resolveAll:mie,tokenize:hie};function mie(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};_A(d,-c),_A(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Zk(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=Zk(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=Zk(l,hA(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Zk(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=Zk(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Xk(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function hie(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=mA(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=mA(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function _A(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var gie={name:`autolink`,tokenize:_ie};function _ie(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return nA(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||rA(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||rA(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||iA(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):oie(t)?(e.consume(t),l):n(t)}function u(e){return rA(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||rA(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var vA={partial:!0,tokenize:vie};function vie(e,t,n){return r;function r(t){return sA(t)?fA(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||L(e)?t(e):n(e)}}var yA={continuation:{tokenize:bie},exit:xie,name:`blockQuote`,tokenize:yie};function yie(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return sA(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function bie(e,t,n){let r=this;return i;function i(t){return sA(t)?fA(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(yA,t,n)(r)}}function xie(e){e.exit(`blockQuote`)}var bA={name:`characterEscape`,tokenize:Sie};function Sie(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return cie(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var xA={name:`characterReference`,tokenize:Cie};function Cie(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=rA,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=sie,u):(e.enter(`characterReferenceValue`),a=7,o=aA,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===rA&&!Yk(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var SA={partial:!0,tokenize:Tie},CA={concrete:!0,name:`codeFenced`,tokenize:wie};function wie(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),sA(t)?fA(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||L(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(SA,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||L(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):sA(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),fA(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||L(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||L(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&sA(t)?fA(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||L(t)?e.check(SA,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||L(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),sA(t)?fA(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),sA(t)?fA(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||L(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Tie(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var wA={name:`codeIndented`,tokenize:Die},Eie={partial:!0,tokenize:Oie};function Die(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),fA(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):L(t)?e.attempt(Eie,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||L(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Oie(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):fA(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):L(e)?i(e):n(e)}}var kie={name:`codeText`,previous:jie,resolve:Aie,tokenize:Mie};function Aie(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function jie(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Mie(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||L(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Nie=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&TA(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),TA(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),TA(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);TA(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);TA(this.left,t.reverse())}}};function TA(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function EA(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Nie(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Pie(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Xk(e,0,1/0,u.slice(0)),!l}function Pie(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Fie={resolve:Lie,tokenize:Rie},Iie={partial:!0,tokenize:zie};function Lie(e){return EA(e),e}function Rie(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):L(t)?e.check(Iie,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function zie(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),fA(e,a,`linePrefix`)}function a(i){if(i===null||L(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function DA(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||iA(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||L(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||oA(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||iA(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function OA(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):L(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||L(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!sA(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function kA(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),fA(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||L(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function AA(e,t){let n;return r;function r(i){return L(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):sA(i)?fA(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Bie={name:`definition`,tokenize:Hie},Vie={partial:!0,tokenize:Uie};function Hie(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return OA.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=tA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return oA(t)?AA(e,l)(t):l(t)}function l(t){return DA(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Vie,d,d)(t)}function d(t){return sA(t)?fA(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||L(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Uie(e,t,n){return r;function r(t){return oA(t)?AA(e,i)(t):n(t)}function i(t){return kA(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return sA(t)?fA(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||L(e)?t(e):n(e)}}var Wie={name:`hardBreakEscape`,tokenize:Gie};function Gie(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return L(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Kie={name:`headingAtx`,resolve:qie,tokenize:Jie};function qie(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Xk(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Jie(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||oA(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||L(n)?(e.exit(`atxHeading`),t(n)):sA(n)?fA(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||oA(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Yie=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),jA=[`pre`,`script`,`style`,`textarea`],Xie={concrete:!0,name:`htmlFlow`,resolveTo:$ie,tokenize:eae},Zie={partial:!0,tokenize:nae},Qie={partial:!0,tokenize:tae};function $ie(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function eae(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:A):nA(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):nA(a)?(e.consume(a),i=4,r.interrupt?t:A):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:A):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return nA(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||oA(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&jA.includes(l)?(i=1,r.interrupt?t(s):O(s)):Yie.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||rA(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return sA(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||nA(t)?(e.consume(t),b):sA(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||rA(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):sA(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):sA(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||L(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||oA(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||sA(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||L(t)?O(t):sA(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),k):t===60&&i===1?(e.consume(t),re):t===62&&i===4?(e.consume(t),oe):t===63&&i===3?(e.consume(t),A):t===93&&i===5?(e.consume(t),ae):L(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Zie,se,ee)(t)):t===null||L(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(Qie,te,se)(t)}function te(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return t===null||L(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function k(t){return t===45?(e.consume(t),A):O(t)}function re(t){return t===47?(e.consume(t),o=``,ie):O(t)}function ie(t){if(t===62){let n=o.toLowerCase();return jA.includes(n)?(e.consume(t),oe):O(t)}return nA(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ie):O(t)}function ae(t){return t===93?(e.consume(t),A):O(t)}function A(t){return t===62?(e.consume(t),oe):t===45&&i===2?(e.consume(t),A):O(t)}function oe(t){return t===null||L(t)?(e.exit(`htmlFlowData`),se(t)):(e.consume(t),oe)}function se(n){return e.exit(`htmlFlow`),t(n)}}function tae(e,t,n){let r=this;return i;function i(t){return L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function nae(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(vA,t,n)}}var rae={name:`htmlText`,tokenize:iae};function iae(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):nA(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):nA(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):L(t)?(o=d,re(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?k(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):L(t)?(o=h,re(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?k(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?k(t):L(t)?(o=v,re(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):L(t)?(o=y,re(t)):(e.consume(t),y)}function b(e){return e===62?k(e):y(e)}function x(t){return nA(t)?(e.consume(t),S):n(t)}function S(t){return t===45||rA(t)?(e.consume(t),S):C(t)}function C(t){return L(t)?(o=C,re(t)):sA(t)?(e.consume(t),C):k(t)}function w(t){return t===45||rA(t)?(e.consume(t),w):t===47||t===62||oA(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),k):t===58||t===95||nA(t)?(e.consume(t),E):L(t)?(o=T,re(t)):sA(t)?(e.consume(t),T):k(t)}function E(t){return t===45||t===46||t===58||t===95||rA(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):L(t)?(o=D,re(t)):sA(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):L(t)?(o=O,re(t)):sA(t)?(e.consume(t),O):(e.consume(t),te)}function ee(t){return t===i?(e.consume(t),i=void 0,ne):t===null?n(t):L(t)?(o=ee,re(t)):(e.consume(t),ee)}function te(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||oA(t)?T(t):(e.consume(t),te)}function ne(e){return e===47||e===62||oA(e)?T(e):n(e)}function k(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function re(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return sA(t)?fA(e,ae,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ae(t)}function ae(t){return e.enter(`htmlTextData`),o(t)}}var MA={name:`labelEnd`,resolveAll:cae,resolveTo:lae,tokenize:uae},aae={tokenize:dae},oae={tokenize:fae},sae={tokenize:pae};function cae(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Xk(e,0,e.length,n),e}function lae(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=Zk(s,e.slice(a+1,a+r+3)),s=Zk(s,[[`enter`,u,t]]),s=Zk(s,hA(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Zk(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=Zk(s,e.slice(o+1)),s=Zk(s,[[`exit`,c,t]]),Xk(e,a,e.length,s),e}function uae(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(tA(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(aae,u,o?u:d)(t):t===91?e.attempt(oae,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(sae,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function dae(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return oA(t)?AA(e,a)(t):a(t)}function a(t){return t===41?u(t):DA(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return oA(t)?AA(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?kA(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return oA(t)?AA(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function fae(e,t,n){let r=this;return i;function i(t){return OA.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(tA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function pae(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var mae={name:`labelStartImage`,resolveAll:MA.resolveAll,tokenize:hae};function hae(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var gae={name:`labelStartLink`,resolveAll:MA.resolveAll,tokenize:_ae};function _ae(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var NA={name:`lineEnding`,tokenize:vae};function vae(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),fA(e,t,`linePrefix`)}}var PA={name:`thematicBreak`,tokenize:yae};function yae(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||L(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),sA(t)?fA(e,s,`whitespace`)(t):s(t))}}var FA={continuation:{tokenize:Cae},exit:Tae,name:`list`,tokenize:Sae},bae={partial:!0,tokenize:Eae},xae={partial:!0,tokenize:wae};function Sae(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:aA(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(PA,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return aA(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(vA,r.interrupt?n:u,e.attempt(bae,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return sA(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Cae(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(vA,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fA(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!sA(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xae,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,fA(e,e.attempt(FA,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function wae(e,t,n){let r=this;return fA(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Tae(e){e.exit(this.containerState.type)}function Eae(e,t,n){let r=this;return fA(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!sA(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var IA={name:`setextUnderline`,resolveTo:Dae,tokenize:Oae};function Dae(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Oae(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),sA(t)?fA(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||L(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var kae={tokenize:Aae};function Aae(e){let t=this,n=e.attempt(vA,r,e.attempt(this.parser.constructs.flowInitial,i,fA(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Fie,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var jae={resolveAll:RA()},Mae=LA(`string`),Nae=LA(`text`);function LA(e){return{resolveAll:RA(e===`text`?Pae:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function RA(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Pae(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Fae=r({attentionMarkers:()=>Uae,contentInitial:()=>Lae,disable:()=>Wae,document:()=>Iae,flow:()=>zae,flowInitial:()=>Rae,insideSpan:()=>Hae,string:()=>Bae,text:()=>Vae}),Iae={42:FA,43:FA,45:FA,48:FA,49:FA,50:FA,51:FA,52:FA,53:FA,54:FA,55:FA,56:FA,57:FA,62:yA},Lae={91:Bie},Rae={[-2]:wA,[-1]:wA,32:wA},zae={35:Kie,42:PA,45:[IA,PA],60:Xie,61:IA,95:PA,96:CA,126:CA},Bae={38:xA,92:bA},Vae={[-5]:NA,[-4]:NA,[-3]:NA,33:mae,38:xA,42:gA,60:[gie,rae],91:gae,92:[Wie,bA],93:MA,95:gA,96:kie},Hae={null:[gA,jae]},Uae={null:[42,95]},Wae={null:[]};function Gae(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Zk(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=hA(a,l.events,l),l.events):[]}function f(e,t){return qae(p(e),t)}function p(e){return Kae(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){L(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Xk(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Kae(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function qae(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
46
46
  `;break;case-3:o=`\r
47
47
  `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Jae(e){let t={constructs:$k([Fae,...(e||{}).extensions||[]]),content:n(lie),defined:[],document:n(die),flow:n(kae),lazy:{},string:n(Mae),text:n(Nae)};return t;function n(e){return n;function n(n){return Gae(t,e,n)}}}function Yae(e){for(;!EA(e););return e}var zA=/[\0\t\n\r]/g;function Xae(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(zA.lastIndex=u,c=zA.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Zae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qae(e){return e.replace(Zae,$ae)}function $ae(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return eA(n.slice(t?2:1),t?16:10)}return Yk(n)||e}var BA={}.hasOwnProperty;function eoe(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),toe(n)(Yae(Jae(n).document().write(Xae()(e,t,!0))))}function toe(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(we),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(be),blockQuote:a(he),characterEscape:T,characterReference:T,codeFenced:a(ge),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ge,o),codeText:a(_e,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ve),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ye),hardBreakEscape:a(xe),hardBreakTrailing:a(xe),htmlFlow:a(Se,o),htmlFlowData:T,htmlText:a(Se,o),htmlTextData:T,image:a(Ce),label:o,link:a(we),listItem:a(Ee),listItemValue:f,listOrdered:a(Te,d),listUnordered:a(Te),paragraph:a(De),reference:ce,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(be),strong:a(Oe),thematicBreak:a(Ae)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:me,autolinkProtocol:pe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:de,characterReference:fe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(ne),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(te),htmlTextData:E,image:c(re),label:ae,labelText:ie,lineEnding:D,link:c(k),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:le,resourceDestinationString:A,resourceTitleString:oe,resource:se,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};HA(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];BA.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||UA).call(a,void 0,e[0])}for(r.position={start:VA(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:VA(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:VA(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||UA).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+jk({start:e.start,end:e.end})+`): it’s not open`);n.position.end=VA(e.end)}function u(){return Gk(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tA(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=ke(),n.position={start:VA(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=VA(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=VA(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function re(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ie(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Qae(t),n.identifier=tA(t).toLowerCase()}function ae(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function se(){this.data.inReference=void 0}function ce(){this.data.referenceType=`collapsed`}function le(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=tA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ue(e){this.data.characterReferenceType=e.type}function de(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=eA(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Yk(t);let i=this.stack[this.stack.length-1];i.value+=r}function fe(e){let t=this.stack.pop();t.position.end=VA(e.end)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function he(){return{type:`blockquote`,children:[]}}function ge(){return{type:`code`,lang:null,meta:null,value:``}}function _e(){return{type:`inlineCode`,value:``}}function ve(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ye(){return{type:`emphasis`,children:[]}}function be(){return{type:`heading`,depth:0,children:[]}}function xe(){return{type:`break`}}function Se(){return{type:`html`,value:``}}function Ce(){return{type:`image`,title:null,url:``,alt:null}}function we(){return{type:`link`,title:null,url:``,children:[]}}function Te(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Ee(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function De(){return{type:`paragraph`,children:[]}}function Oe(){return{type:`strong`,children:[]}}function ke(){return{type:`text`,value:``}}function Ae(){return{type:`thematicBreak`}}}function VA(e){return{line:e.line,column:e.column,offset:e.offset}}function HA(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?HA(e,r):noe(e,r)}}function noe(e,t){let n;for(n in t)if(BA.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function UA(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+jk({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jk({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+jk({start:t.start,end:t.end})+`) is still open`)}function WA(e){let t=this;t.parser=n;function n(n){return eoe(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function roe(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ioe(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
@@ -73,7 +73,7 @@ import{a as e,n as t,o as n,r,t as i}from"./rolldown-runtime-BM3Ffeng.js";import
73
73
  `,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(VN(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
74
74
  `,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
75
75
  `),i&&(c+=a.move(i+`
76
- `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var GF={tokenize:qF,concrete:!0,name:`mathFlow`},KF={tokenize:JF,partial:!0};function qF(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),fA(e,l,`whitespace`)(t))}function l(t){return t===null||L(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||L(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(KF,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?fA(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):L(t)?e.attempt(KF,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||L(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return fA(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),fA(e,c,`whitespace`)(t))}function c(r){return r===null||L(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function JF(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function YF(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:XF,previous:ZF,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||L(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function XF(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ZF(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function QF(e){return{flow:{36:GF},text:{36:YF(e)}}}var $F={};function eI(e){let t=this,n=e||$F,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(QF(n)),a.push(UF()),o.push(WF(n))}var tI=0,nI=1,rI=2,iI=4;function aI(e){return()=>e}function oI(e){e()}function sI(e,t){return n=>e(t(n))}function cI(e,t){return()=>e(t)}function lI(e,t){return n=>e(t,n)}function uI(e){return e!==void 0}function dI(...e){return()=>{e.map(oI)}}function fI(){}function pI(e,t){return t(e),e}function mI(e,t){return t(e)}function hI(...e){return e}function gI(e,t){return e(nI,t)}function _I(e,t){e(tI,t)}function vI(e){e(rI)}function yI(e){return e(iI)}function R(e,t){return gI(e,lI(t,tI))}function bI(e,t){let n=e(nI,e=>{n(),t(e)});return n}function xI(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function SI(e,t){return e===t}function CI(e=SI){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function z(e){return t=>n=>{e(n)&&t(n)}}function B(e){return t=>sI(t,e)}function wI(e){return t=>()=>{t(e)}}function V(e,...t){let n=kI(...t);return((t,r)=>{switch(t){case rI:vI(e);return;case nI:return gI(e,n(r))}})}function TI(e,t){return n=>r=>{n(t=e(t,r))}}function EI(e){return t=>n=>{e>0?e--:t(n)}}function DI(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function OI(...e){let t=Array(e.length),n=0,r=null,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;gI(e,e=>{let s=n;n|=o,t[a]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>a=>{let o=()=>{e([a].concat(t))};n===i?o():r=o}}function kI(...e){return t=>e.reduceRight(mI,t)}function AI(e){let t,n,r=()=>t?.();return function(i,a){switch(i){case nI:return a?n===a?void 0:(r(),n=a,t=gI(e,a),t):(r(),fI);case rI:r(),n=null;return}}}function H(e){let t=e,n=MI();return((e,r)=>{switch(e){case tI:t=r;break;case nI:r(t);break;case iI:return t}return n(e,r)})}function jI(e,t){return pI(H(t),t=>R(e,t))}function MI(){let e=[];return((t,n)=>{switch(t){case tI:e.slice().forEach(e=>{e(n)});return;case rI:e.splice(0,e.length);return;case nI:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}})}function NI(e){return pI(MI(),t=>R(e,t))}function PI(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:FI(),singleton:n}}var FI=()=>Symbol();function II(e){let t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);let o=e(r.map(e=>n(e)));return a&&t.set(i,o),o};return n(e)}function LI(...e){let t=MI(),n=Array(e.length),r=0,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;gI(e,e=>{n[a]=e,r|=o,r===i&&_I(t,n)})}),function(e,a){switch(e){case rI:vI(t);return;case nI:return r===i&&a(n),gI(t,a)}}}function RI(e,t=SI){return V(e,CI(t))}function zI(...e){return function(t,n){switch(t){case rI:return;case nI:return dI(...e.map(e=>gI(e,n)))}}}var BI={DEBUG:0,INFO:1,WARN:2,ERROR:3},VI={[BI.DEBUG]:`debug`,[BI.ERROR]:`error`,[BI.INFO]:`log`,[BI.WARN]:`warn`},HI=()=>typeof globalThis>`u`?window:globalThis,UI=PI(()=>{let e=H(BI.ERROR);return{log:H((t,n,r=BI.INFO)=>{r>=(HI().VIRTUOSO_LOG_LEVEL??yI(e))&&console[VI[r]](`%creact-virtuoso: %c%s %o`,`color: #0253b3; font-weight: bold`,`color: initial`,t,n)}),logLevel:e}},[],{singleton:!0}),WI=new WeakMap;function GI(e){return`self`in e?e.document.documentElement:e}function KI(e){let t=GI(e),n=WI.get(t);if(n!==void 0)return n;let r=t.ownerDocument.defaultView.getComputedStyle(t).direction===`rtl`;return WI.set(t,r),r}function qI(e){WI.delete(GI(e))}function JI(e,t){return KI(e)?-t:t}var YI=JI;function XI(e,t){return JI(e,t)}function ZI(e,t,n){return QI(e,t,n).callbackRef}function QI(e,t,n){let r=j.useRef(null),i=e=>{},a=j.useMemo(()=>typeof ResizeObserver<`u`?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;n.offsetParent!==null&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return i=e=>{e&&t?(a?.observe(e),r.current=e):(r.current&&a?.unobserve(r.current),r.current=null)},{callbackRef:i,ref:r}}function $I(e,t,n,r,i,a,o,s,c){return QI(j.useCallback(n=>{let c=eL(n.children,t,s?`offsetWidth`:`offsetHeight`,i),l=n.parentElement;for(;l.dataset.virtuosoScroller===void 0;)l=l.parentElement;let u=l.lastElementChild.dataset.viewportType===`window`,d;u&&(d=l.ownerDocument.defaultView);let f=o?s?o.scrollWidth:o.scrollHeight:u?s?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight:s?l.scrollWidth:l.scrollHeight,p=o?s?o.offsetWidth:o.offsetHeight:u?s?d.innerWidth:d.innerHeight:s?l.offsetWidth:l.offsetHeight,m=o?s?YI(o,o.scrollLeft):o.scrollTop:u?s?YI(d,d.scrollX||d.document.documentElement.scrollLeft):d.scrollY||d.document.documentElement.scrollTop:s?YI(l,l.scrollLeft):l.scrollTop;r({scrollHeight:f,scrollTop:Math.max(m,0),viewportHeight:p}),a?.(s?tL(`column-gap`,getComputedStyle(n).columnGap,i):tL(`row-gap`,getComputedStyle(n).rowGap,i)),c!==null&&e(c)},[e,t,i,a,o,r,s]),n,c)}function eL(e,t,n,r){let i=e.length;if(i===0)return null;let a=[];for(let o=0;o<i;o++){let i=e.item(o);if(i.dataset.index===void 0)continue;let s=parseInt(i.dataset.index),c=parseFloat(i.dataset.knownSize),l=t(i,n);if(l===0&&r(`Zero-sized element, this should not happen`,{child:i},BI.ERROR),l===c)continue;let u=a[a.length-1];a.length===0||u.size!==l||u.endIndex!==s-1?a.push({endIndex:s,size:l,startIndex:s}):a[a.length-1].endIndex++}return a}function tL(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,BI.WARN),t===`normal`?0:parseInt(t??`0`,10)}function nL(e,t,n){let r=j.useRef(null),i=j.useCallback(n=>{if(!n?.offsetParent)return;let i=n.getBoundingClientRect(),a=i.width,s,c;if(t){let e=t.getBoundingClientRect(),n=i.top-e.top;c=e.height-Math.max(0,n),s=n+t.scrollTop}else{let e=o.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,i.top),s=i.top+e.scrollY}r.current={listHeight:i.height,offsetTop:s,visibleHeight:c,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:a,ref:o}=QI(i,!0,n),s=j.useCallback(()=>{i(o.current)},[i,o]);return j.useEffect(()=>{if(t){t.addEventListener(`scroll`,s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener(`scroll`,s),e.unobserve(t)}}let e=o.current?.ownerDocument.defaultView;return e?.addEventListener(`scroll`,s),e?.addEventListener(`resize`,s),()=>{e?.removeEventListener(`scroll`,s),e?.removeEventListener(`resize`,s)}},[s,t,o]),a}var rL=PI(()=>{let e=MI(),t=MI(),n=H(0),r=MI(),i=H(0),a=MI(),o=MI(),s=H(0),c=H(0),l=H(0),u=H(0),d=MI(),f=MI(),p=H(!1),m=H(!1),h=H(!1);return R(V(e,B(({scrollTop:e})=>e)),t),R(V(e,B(({scrollHeight:e})=>e)),o),R(t,i),{deviation:n,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),iL={lvl:0};function aL(e,t){let n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]),a=[];for(let o=1;o<n;o++){let{index:n,value:s}=t(e[o]);a.push({end:n-1,start:r,value:i}),r=n,i=s}return a.push({end:1/0,start:r,value:i}),a}function oL(e){return e===iL}function sL(e,t){if(!oL(e))return t===e.k?e.v:t<e.k?sL(e.l,t):sL(e.r,t)}function cL(e,t,n=`k`){if(oL(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=cL(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return cL(e.l,t,n)}function lL(e,t,n){return oL(e)?bL(t,n,1):t===e.k?gL(e,{k:t,v:n}):t<e.k?xL(gL(e,{l:lL(e.l,t,n)})):xL(gL(e,{r:lL(e.r,t,n)}))}function uL(){return iL}function dL(e,t,n){if(oL(e))return[];let r=cL(e,t)[0];return wL(mL(e,r,n))}function fL(e,t){if(oL(e))return iL;let{k:n,l:r,r:i}=e;if(t===n){if(oL(r))return i;if(oL(i))return r;let[t,n]=yL(r);return hL(gL(e,{k:t,l:_L(r),v:n}))}return hL(t<n?gL(e,{l:fL(r,t)}):gL(e,{r:fL(i,t)}))}function pL(e){return oL(e)?[]:[...pL(e.l),{k:e.k,v:e.v},...pL(e.r)]}function mL(e,t,n){if(oL(e))return[];let{k:r,l:i,r:a,v:o}=e,s=[];return r>t&&(s=s.concat(mL(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(mL(a,t,n))),s}function hL(e){let{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(vL(t))return SL(gL(e,{lvl:n-1}));if(!oL(t)&&!oL(t.r))return gL(t.r,{l:gL(t,{r:t.r.l}),lvl:n,r:gL(e,{l:t.r.r,lvl:n-1})});throw Error(`Unexpected empty nodes`)}if(vL(e))return CL(gL(e,{lvl:n-1}));if(!oL(r)&&!oL(r.l)){let t=r.l,i=vL(t)?r.lvl-1:r.lvl;return gL(t,{l:gL(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:CL(gL(r,{l:t.r,lvl:i}))})}throw Error(`Unexpected empty nodes`)}function gL(e,t){return bL(t.k===void 0?e.k:t.k,t.v===void 0?e.v:t.v,t.lvl===void 0?e.lvl:t.lvl,t.l===void 0?e.l:t.l,t.r===void 0?e.r:t.r)}function _L(e){return oL(e.r)?e.l:hL(gL(e,{r:_L(e.r)}))}function vL(e){return oL(e)||e.lvl>e.r.lvl}function yL(e){return oL(e.r)?[e.k,e.v]:yL(e.r)}function bL(e,t,n,r=iL,i=iL){return{k:e,l:r,lvl:n,r:i,v:t}}function xL(e){return CL(SL(e))}function SL(e){let{l:t}=e;return!oL(t)&&t.lvl===e.lvl?gL(t,{r:gL(e,{l:t.r})}):e}function CL(e){let{lvl:t,r:n}=e;return!oL(n)&&!oL(n.r)&&n.lvl===t&&n.r.lvl===t?gL(n,{l:gL(e,{r:n.l}),lvl:t+1}):e}function wL(e){return aL(e,({k:e,v:t})=>({index:e,value:t}))}function TL(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function EL(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}var DL=PI(()=>({recalcInProgress:H(!1)}),[],{singleton:!0});function OL(e,t,n){return e[kL(e,t,n)]}function kL(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw Error(`Failed binary finding record in array - ${e.join(`,`)}, searched for ${t}`)}function AL(e,t,n,r){let i=kL(e,t,r),a=kL(e,n,r,i);return e.slice(i,a+1)}function jL(e,t){return Math.round(e.getBoundingClientRect()[t])}function ML(e){return!oL(e.groupOffsetTree)}function NL({index:e},t){return t===e?0:t<e?-1:1}function PL(){return{groupIndices:[],groupOffsetTree:uL(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:uL()}}function FL(e,t){let n=oL(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),oL(e)){e=lL(e,0,i);continue}let o=dL(e,a-1,t+1);if(o.some(qL(r)))continue;let s=!1,c=!1;for(let{end:n,start:r,value:a}of o)s?(t>=r||i===a)&&(e=fL(e,r)):(c=a!==i,s=!0),n>t&&t>=r&&a!==i&&(e=lL(e,t+1,a));c&&(e=lL(e,a,i))}return[e,n]}function IL(e){return typeof e.groupIndex<`u`}function LL({offset:e},t){return t===e?0:t<e?-1:1}function RL(e,t,n){if(t.length===0)return 0;let{index:r,offset:i,size:a}=OL(t,e,NL),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function zL(e,t){if(!ML(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function BL(e,t,n){if(IL(e))return t.groupIndices[e.groupIndex]+1;let r=zL(e.index===`LAST`?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}function VL(e,t,n,r=0){return r>0&&(t=Math.max(t,OL(e,r,NL).offset)),aL(AL(e,t,n,LL),KL)}function HL(e,[t,n,r,i]){t.length>0&&r(`received item sizes`,t,BI.DEBUG);let a=e.sizeTree,o=a,s=0;if(n.length>0&&oL(a)&&t.length===2){let e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>lL(lL(t,n,e),n+1,r),o)}else [o,s]=FL(o,t);if(o===a)return e;let{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=GL(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>lL(e,t,RL(t,d,i)),uL()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function UL(e){return pL(e).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i===void 0?1/0:i.k-1,size:t,startIndex:e}})}function WL(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function GL(e,t,n,r){let i=e,a=0,o=0,s=0,c=0;if(t!==0){c=kL(i,t-1,NL),s=i[c].offset;let e=cL(n,t-1);a=e[0],o=e[1],i.length&&i[c].size===cL(n,t)[1]&&--c,i=i.slice(0,c+1)}else i=[];for(let{start:e,value:c}of dL(n,t,1/0)){let t=e-a,n=t*o+s+t*r;i.push({index:e,offset:n,size:c}),a=e,s=n,o=c}return{lastIndex:a,lastOffset:s,lastSize:o,offsetTree:i}}function KL(e){return{index:e.index,value:e}}function qL(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}var JL={offsetHeight:`height`,offsetWidth:`width`},YL=PI(([{log:e},{recalcInProgress:t}])=>{let n=MI(),r=MI(),i=jI(r,0),a=MI(),o=MI(),s=H(0),c=H([]),l=H(void 0),u=H(void 0),d=H(void 0),f=H(void 0),p=H((e,t)=>jL(e,JL[t])),m=H(void 0),h=H(0),g=PL(),_=jI(V(n,OI(c,e,h),TI(HL,g),CI()),g),v=jI(V(c,CI(),TI((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),B(({prev:e})=>e)),[]);R(V(c,z(e=>e.length>0),OI(_,h),B(([e,t,n])=>{let r=e.reduce((e,r,i)=>lL(e,r,RL(r,t.offsetTree,n)||i),uL());return{...t,groupIndices:e,groupOffsetTree:r}})),_),R(V(r,OI(_),z(([e,{lastIndex:t}])=>e<t),B(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),R(l,u);let y=jI(V(l,B(e=>e===void 0)),!0);R(V(u,z(e=>e!==void 0&&oL(yI(_).sizeTree)),B(e=>{let t=yI(d),n=yI(c).length>0;return t!==void 0&&t!==0?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),R(V(f,z(e=>e!==void 0&&e.length>0&&oL(yI(_).sizeTree)),B(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let a=e[i];a!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=a,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),R(V(c,OI(d,u),z(([,e,t])=>e!==void 0&&t!==void 0),B(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=e[i+1];r.push({startIndex:a,endIndex:a,size:t}),o!==void 0&&r.push({startIndex:a+1,endIndex:o-1,size:n})}return r})),n);let b=NI(V(n,OI(_),TI(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),B(e=>e.changed)));gI(V(s,TI((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),B(e=>e.diff)),e=>{let{groupIndices:n}=yI(_);if(e>0)_I(t,!0),_I(a,e+WL(e,n));else if(e<0){let t=yI(v);t.length>0&&(e-=WL(-e,t)),_I(o,e)}}),gI(V(s,OI(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},BI.ERROR)});let x=NI(a);R(V(a,OI(_),B(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=sL(t.sizeTree,0),a=0,o=0;for(;a<e;){let e=t.groupIndices[o],s=t.groupIndices.length===o+1?1/0:t.groupIndices[o+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),o++,a+=s+1}let s=pL(t.sizeTree);return a!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return t.prevSize!==0&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return pL(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let S=NI(V(o,OI(_,h),B(([e,{offsetTree:t},n])=>RL(-e,t,n))));return R(V(o,OI(_,h),B(([e,t,n])=>{if(t.groupIndices.length>0){if(oL(t.sizeTree))return t;let r=uL(),i=yI(v),a=0,o=0,s=0;for(;a<-e;){s=i[o];let e=i[o+1]-s-1;o++,a+=e+1}if(r=pL(t.sizeTree).reduce((t,{k:n,v:r})=>lL(t,Math.max(0,n+e),r),r),a!==-e){let n=sL(t.sizeTree,s);r=lL(r,0,n);let i=cL(t.sizeTree,-e+1)[1];r=lL(r,1,i)}return{...t,sizeTree:r,...GL(t.offsetTree,0,r,n)}}let r=pL(t.sizeTree).reduce((t,{k:n,v:r})=>lL(t,Math.max(0,n+e),r),uL());return{...t,sizeTree:r,...GL(t.offsetTree,0,r,n)}})),_),{beforeUnshiftWith:x,data:m,defaultItemSize:u,firstItemIndex:s,fixedItemSize:l,fixedGroupSize:d,gap:h,groupIndices:c,heightEstimates:f,itemSize:p,listRefresh:b,shiftWith:o,shiftWithOffset:S,sizeRanges:n,sizes:_,statefulTotalCount:i,totalCount:r,trackItemSizes:y,unshiftWith:a}},hI(UI,DL),{singleton:!0});function XL(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}var ZL=PI(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let a=MI(),o=MI(),s=NI(V(a,B(XL)));return R(V(s,B(e=>e.totalCount)),n),R(V(s,B(e=>e.groupIndices)),e),R(V(LI(i,t,r),z(([e,t])=>ML(t)),B(([e,t,n])=>cL(t.groupOffsetTree,Math.max(e-n,0),`v`)[0]),CI(),B(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},hI(YL,rL)),QL=PI(([{log:e}])=>{let t=H(!1),n=NI(V(t,z(e=>e),CI()));return gI(t,t=>{t&&yI(e)(`props updated`,{},BI.DEBUG)}),{didMount:n,propsReady:t}},hI(UI),{singleton:!0}),$L=typeof document<`u`&&`scrollBehavior`in document.documentElement.style;function eR(e){let t=typeof e==`number`?{index:e}:e;return t.align||=`start`,(!t.behavior||!$L)&&(t.behavior=`auto`),t.offset===void 0&&(t.offset=0),t}var tR=PI(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:s,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{let p=MI(),m=MI(),h=H(0),g=null,_=null,v=null;function y(){g!==null&&(g(),g=null),v!==null&&(v(),v=null),_&&=(clearTimeout(_),null),_I(c,!1)}return R(V(p,OI(n,d,r,h,s,o,f),OI(e,a,i),B(([[e,n,r,i,a,o,s,l],d,f,h])=>{let b=eR(e),{align:x,behavior:S,offset:C}=b,w=i-1,T=BL(b,n,w),E=RL(T,n.offsetTree,d)+o;x===`end`?(E+=f+cL(n.sizeTree,T)[1]-r+h,T===w&&(E+=s)):x===`center`?E+=(f+cL(n.sizeTree,T)[1]-r+h)/2:E-=a,C!==void 0&&C!==0&&(E+=C);let D=t=>{y(),t?(l(`retrying to scroll to`,{location:e},BI.DEBUG),_I(p,e)):(_I(m,!0),l(`list did not change, scroll successful`,{},BI.DEBUG))};if(y(),S===`smooth`){let e=!1;v=gI(t,t=>{e||=t}),g=bI(u,()=>{D(e)})}else g=bI(V(t,nR(150)),D);return _=setTimeout(()=>{y()},1200),_I(c,!0),l(`scrolling from index to`,{behavior:S,index:T,top:E},BI.DEBUG),{behavior:S,top:E}})),l),{scrollTargetReached:m,scrollToIndex:p,topListHeight:h}},hI(YL,rL,UI),{singleton:!0});function nR(e){return t=>{let n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}function rR(e,t){e===0?t():requestAnimationFrame(()=>{rR(e-1,t)})}function iR(e,t){let n=t-1;return typeof e==`number`?e:e.index===`LAST`?n:e.index}var aR=PI(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{let s=H(!0),c=H(0),l=H(!0);return R(V(o,OI(c),z(([e,t])=>t!==0),wI(!1)),s),R(V(o,OI(c),z(([e,t])=>t!==0),wI(!1)),l),gI(V(LI(t,o),OI(s,n,e,l),z(([[,e],t,{sizeTree:n},r,i])=>e&&(!oL(n)||uI(r))&&!t&&!i),OI(c)),([,e])=>{bI(i,()=>{_I(l,!0)}),rR(4,()=>{bI(r,()=>{_I(s,!0)}),_I(a,e)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},hI(YL,rL,tR,QL),{singleton:!0});function oR(e,t){return Math.abs(e-t)<1.01}var sR=`up`,cR=`down`,lR=`none`,uR={atBottom:!1,notAtBottomBecause:`NOT_SHOWING_LAST_ITEM`,state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},dR=0,fR=PI(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{let o=H(!1),s=H(!0),c=MI(),l=MI(),u=H(4),d=H(dR),f=jI(V(zI(V(RI(i),EI(1),wI(!0)),V(RI(i),EI(1),wI(!1),xI(100))),CI()),!1),p=jI(V(zI(V(n,wI(!0)),V(n,wI(!1),xI(200))),CI()),!1);R(V(LI(RI(i),RI(d)),B(([e,t])=>e<=t),CI()),s),R(V(s,DI(50)),l);let m=NI(V(LI(r,RI(a),RI(t),RI(e),RI(u)),TI((e,[{scrollHeight:t,scrollTop:n},r,i,a,o])=>{let s=n+r-t>-o,c={scrollHeight:t,scrollTop:n,viewportHeight:r};if(s){let t,r;return n>e.state.scrollTop?(t=`SCROLLED_DOWN`,r=e.state.scrollTop-n):(t=`SIZE_DECREASED`,r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:c}}let l;return l=c.scrollHeight>e.state.scrollHeight?`SIZE_INCREASED`:r<e.state.viewportHeight?`VIEWPORT_HEIGHT_DECREASING`:n<e.state.scrollTop?`SCROLLING_UPWARDS`:`NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM`,{atBottom:!1,notAtBottomBecause:l,state:c}},uR),CI((e,t)=>e!==void 0&&e.atBottom===t.atBottom))),h=jI(V(r,TI((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!oR(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),z(e=>e.changed),B(e=>e.jump)),0);R(V(m,B(e=>e.atBottom)),o),R(V(o,DI(50)),c);let g=H(cR);R(V(r,B(({scrollTop:e})=>e),CI(),TI((e,t)=>yI(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?sR:cR,prevScrollTop:t},{direction:cR,prevScrollTop:0}),B(e=>e.direction)),g),R(V(r,DI(50),wI(lR)),g);let _=H(0);return R(V(f,z(e=>!e),wI(0)),_),R(V(i,DI(100),OI(f),z(([e,t])=>t),TI(([e,t],[n])=>[t,n],[0,0]),B(([e,t])=>t-e)),_),{atBottomState:m,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:g,scrollVelocity:_}},hI(rL)),pR=`top`,mR=`bottom`,hR=`none`;function gR(e,t,n){return typeof e==`number`?n===sR&&t===pR||n===cR&&t===mR?e:0:n===sR?t===pR?e.main:e.reverse:t===mR?e.main:e.reverse}function _R(e,t){return typeof e==`number`?e:e[t]??0}var vR=PI(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let a=MI(),o=H(0),s=H(0),c=H(0);return{increaseViewportBy:s,listBoundary:a,overscan:c,topListHeight:o,visibleRange:jI(V(LI(RI(r),RI(i),RI(n),RI(a,EL),RI(c),RI(o),RI(t),RI(e),RI(s)),B(([e,t,n,[r,i],a,o,s,c,l])=>{let u=e-c,d=o+s,f=Math.max(n-u,0),p=hR,m=_R(l,pR),h=_R(l,mR);return r-=c,r+=n+s,i+=n+s,i-=c,r>e+d-m&&(p=sR),i<e-f+t+h&&(p=cR),p===hR?null:[Math.max(u-n-gR(a,pR,p)-m,0),u-f-s+t+gR(a,mR,p)+h]}),z(e=>e!==null),CI(EL)),[0,0])}},hI(rL),{singleton:!0});function yR(e,t,n){if(ML(t)){let r=zL(e,t);return[{index:cL(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}var bR={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function xR(e,t,n,r,i,a){let{lastIndex:o,lastOffset:s,lastSize:c}=i,l=0,u=0;if(e.length>0){l=e[0].offset;let t=e[e.length-1];u=t.offset+t.size}let d=n-o,f=s+d*c+(d-1)*r,p=l,m=f-u;return{bottom:u,firstItemIndex:a,items:CR(e,i,a),offsetBottom:m,offsetTop:l,top:p,topItems:CR(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function SR(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-o>=e)break;o++}let s=e+o,c=iR(t,s);return xR(Array.from({length:s}).map((e,t)=>({data:a[t+c],index:t+c,offset:0,size:0})),[],s,i,n,r)}function CR(e,t,n){if(e.length===0)return[];if(!ML(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,a=[],o=dL(t.groupOffsetTree,r,i),s,c=0;for(let r of e){(!s||s.end<r.index)&&(s=o.shift(),c=t.groupIndices.indexOf(s.start));let e;e=r.index===s.start?{index:c,type:`group`}:{groupIndex:c,index:r.index-(c+1)+n},a.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return a}function wR(e,t){return e===void 0?0:typeof e==`number`?e:e[t]??0}var TR=PI(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:m}])=>{let h=H([]),g=H(0),_=MI(),v=H(0);R(a.topItemsIndexes,h);let y=jI(V(LI(p,m,RI(c,EL),RI(i),RI(r),RI(l),u,RI(h),RI(t),RI(n),RI(v),e),z(([e,t,,n,,,,,,,,r])=>{let i=r!==void 0&&r.length!==n;return e&&!t&&!i}),B(([,,[e,t],n,r,i,a,o,s,c,l,u])=>{let d=r,{offsetTree:f,sizeTree:p}=d,m=yI(g);if(n===0)return{...bR,totalCount:n};if(e===0&&t===0)return m===0?{...bR,totalCount:n}:SR(m,i,r,s,c,u||[]);if(oL(p))return m>0?null:xR(yR(iR(i,n),d,u),[],n,c,d,s);let h=[];if(o.length>0){let e=o[0],t=o[o.length-1],n=0;for(let r of dL(p,e,t)){let i=r.value,a=Math.max(r.start,e),o=Math.min(r.end,t);for(let e=a;e<=o;e++)h.push({data:u?.[e],index:e,offset:n,size:i}),n+=i}}if(!a)return xR([],h,n,c,d,s);let _=o.length>0?o[o.length-1]+1:0,v=VL(f,e,t,_);if(v.length===0)return null;let y=n-1,b=pI([],n=>{for(let r of v){let i=r.value,a=i.offset,o=r.start,s=i.size;if(i.offset<e){o+=Math.floor((e-i.offset+c)/(s+c));let t=o-r.start;a+=t*s+t*c}o<_&&(a+=(_-o)*s,o=_);let l=Math.min(r.end,y);for(let e=o;e<=l&&!(a>=t);e++)n.push({data:u?.[e],index:e,offset:a,size:s}),a+=s+c}}),x=wR(l,pR),S=wR(l,mR);if(b.length>0&&(x>0||S>0)){let e=b[0],t=b[b.length-1];if(x>0&&e.index>_){let t=Math.min(x,e.index-_),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=dL(p,i,i)[0]?.value??e.size;r-=t+c,n.unshift({data:u?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(S>0&&t.index<y){let e=Math.min(S,y-t.index),n=t.offset+t.size+c;for(let r=t.index+1;r<=t.index+e;r++){let e=dL(p,r,r)[0]?.value??t.size;b.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+c}}}return xR(b,h,n,c,d,s)}),z(e=>e!==null),CI()),bR);R(V(e,z(uI),B(e=>e?.length)),i),R(V(y,B(e=>e.topListHeight)),d),R(d,s),R(V(y,B(e=>[e.top,e.bottom])),o),R(V(y,B(e=>e.items)),_);let b=NI(V(y,z(({items:e})=>e.length>0),OI(i,e),z(([{items:e},t])=>e[e.length-1].originalIndex===t-1),B(([,e,t])=>[e-1,t]),CI(EL),B(([e])=>e))),x=NI(V(y,DI(200),z(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),B(({items:e})=>e[0].index),CI()));return{endReached:b,initialItemCount:g,itemsRendered:_,listState:y,minOverscanItemCount:v,rangeChanged:NI(V(y,z(({items:e})=>e.length>0),B(({items:e})=>{let t=0,n=e.length-1;for(;e[t].type===`group`&&t<n;)t++;for(;e[n].type===`group`&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),CI(TL))),startReached:x,topItemsIndexes:h,...f}},hI(YL,ZL,vR,aR,tR,fR,QL,DL),{singleton:!0}),ER=PI(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let a=MI(),o=jI(V(LI(n,e,r,t,i),B(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return R(RI(o),a),{totalListHeight:o,totalListHeightChanged:a}},hI(rL,TR),{singleton:!0}),DR=PI(([{viewportHeight:e},{totalListHeight:t}])=>{let n=H(!1);return{alignToBottom:n,paddingTopAddition:jI(V(LI(n,e,t),z(([e])=>e),B(([,e,t])=>Math.max(0,e-t)),DI(0),CI()),0)}},hI(rL,ER),{singleton:!0}),OR=PI(()=>({context:H(null)})),kR=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??`start`,...r===void 0?{}:{behavior:r}}:e>a?{...i,align:n??`end`,...r===void 0?{}:{behavior:r}}:null,AR=PI(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{let u=MI();return R(V(u,OI(t,c,n,a,i,r,s),OI(e),B(([[e,t,n,r,i,a,s,c],l])=>{let{calculateViewLocation:u=kR,done:d,...f}=e,p=BL(e,t,r-1),m=RL(p,t.offsetTree,l)+i+a,h=m+cL(t.sizeTree,p)[1],g=c+a,_=u({itemBottom:h,itemTop:m,locationParams:f,viewportBottom:c+n-s,viewportTop:g});return _===null?d?.():d&&bI(V(o,z(e=>!e),EI(yI(o)?1:2)),d),_}),z(e=>e!==null)),l),{scrollIntoView:u}},hI(YL,rL,tR,TR,UI),{singleton:!0});function jR(e){return e===!1?!1:e===`smooth`?`smooth`:`auto`}var MR=(e,t)=>typeof e==`function`?jR(e(t)):t&&jR(e),NR=PI(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:s},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{let m=H(!1),h=MI(),g=null;function _(e){_I(o,{align:`end`,behavior:e,index:`LAST`})}gI(V(LI(V(RI(t),EI(1)),c),OI(RI(m),a,s,d),B(([[e,t],n,r,i,a])=>{let o=t&&i,s=`auto`;return o&&(s=MR(n,r||a),o&&=s!==!1),{followOutputBehavior:s,shouldFollow:o,totalCount:e}}),z(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{g!==null&&(g(),g=null),yI(n)===void 0?g=bI(e,()=>{yI(u)(`following output to `,{totalCount:r},BI.DEBUG),_(t),g=null}):requestAnimationFrame(()=>{yI(u)(`following output to `,{totalCount:r},BI.DEBUG),_(t)})});function v(e){let t=bI(i,t=>{e&&!t.atBottom&&t.notAtBottomBecause===`SIZE_INCREASED`&&g===null&&(yI(u)(`scrolling to bottom due to increased size`,{},BI.DEBUG),_(`auto`))});setTimeout(t,100)}gI(V(LI(RI(m),t,l),z(([e,,t])=>e!==!1&&t),TI(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),z(({refreshed:e})=>e),OI(m,t)),([,e])=>{yI(s)&&v(e!==!1)}),gI(h,()=>{v(yI(m)!==!1)}),gI(LI(RI(m),i),([e,t])=>{e!==!1&&!t.atBottom&&t.notAtBottomBecause===`VIEWPORT_HEIGHT_DECREASING`&&_(`auto`)});let y=H(null),b=MI();return R(zI(V(RI(r),B(e=>e?.length??0)),V(RI(t))),b),gI(V(LI(V(b,EI(1)),c),OI(RI(y),s,d,f),B(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),z(e=>!!e),DI(0)),t=>{g!==null&&(g(),g=null),yI(n)===void 0?g=bI(e,()=>{yI(u)(`scrolling into view`,{}),_I(p,t),g=null}):requestAnimationFrame(()=>{yI(u)(`scrolling into view`,{}),_I(p,t)})}),{autoscrollToBottom:h,followOutput:m,scrollIntoViewOnChange:y}},hI(YL,fR,tR,aR,QL,UI,rL,OR,AR)),PR=PI(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(R(V(s,OI(a),z(([,e])=>e!==0),OI(i,r,t,n,e),B(([[,e],t,n,r,i,a=[]])=>SR(e,t,n,r,i,a))),o),{}),hI(YL,aR,TR,QL),{singleton:!0}),FR=PI(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=H(0);return gI(V(e,OI(r),z(([,e])=>e!==0),B(([,e])=>({top:e}))),e=>{bI(V(n,EI(1),z(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{_I(t,e)})})}),{initialScrollTop:r}},hI(QL,rL,TR),{singleton:!0}),IR=PI(([{scrollVelocity:e}])=>{let t=H(!1),n=MI(),r=H(!1);return R(V(e,OI(r,t,n),z(([e,t])=>t!==!1&&t!==void 0),B(([e,t,n,r])=>{let{enter:i,exit:a}=t;if(n){if(a(e,r))return!1}else if(i(e,r))return!0;return n}),CI()),t),gI(V(LI(t,e,n),OI(r)),([[e,t,n],r])=>{e&&r!==!1&&r!==void 0&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},hI(fR),{singleton:!0}),LR=PI(([{scrollContainerState:e,scrollTo:t}])=>{let n=MI(),r=MI(),i=MI(),a=H(!1),o=H(void 0);return R(V(LI(n,r),B(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),R(V(t,OI(r),B(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},hI(rL)),RR=PI(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:c}])=>{let l=MI(),u=H(void 0),d=H(null),f=H(null);return R(s,d),R(c,f),gI(V(l,OI(t,r,o,d,f,n)),([e,t,n,r,i,a,o])=>{let s=UL(t.sizeTree);r&&i!==null&&a!==null&&(n=i.scrollTop-a.offsetTop),n-=o,e({ranges:s,scrollTop:n})}),R(V(u,z(uI),B(zR)),i),R(V(a,OI(u),z(([,e])=>e!==void 0),CI(),B(([,e])=>e.ranges)),e),{getState:l,restoreStateFrom:u}},hI(YL,rL,aR,QL,LR));function zR(e){return{align:`start`,index:0,offset:e.scrollTop}}var BR=PI(([{topItemsIndexes:e}])=>{let t=H(0);return R(V(t,z(e=>e>=0),B(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},hI(TR));function VR(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}var HR=VR(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),UR=PI(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:s,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g},_,v,y,b,{scrollToIndex:x},S,{topItemCount:C},{groupCounts:w},T])=>{let{listState:E,minOverscanItemCount:D,topItemsIndexes:O,rangeChanged:ee,...te}=b;return R(ee,T.scrollSeekRangeChanged),R(V(T.windowViewportRect,B(e=>e.visibleHeight)),_.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:w,heightEstimates:s,initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g,sizeRanges:l,topItemCount:C,topItemsIndexes:O,totalCount:f,...y,groupIndices:o,itemSize:c,listState:E,minOverscanItemCount:D,scrollToIndex:x,statefulTotalCount:d,trackItemSizes:p,rangeChanged:ee,...te,...T,..._,sizes:u,...v}},hI(YL,aR,rL,RR,NR,TR,tR,PI(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:s},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:m}])=>{let h=NI(V(c,OI(o),TI(([,e,t,n],[{bottom:r,items:i,offsetBottom:a,totalCount:o},s])=>{let c=r+a,l=0;return t===o&&e.length>0&&i.length>0&&(i[0].originalIndex===0&&e[0].originalIndex===0||(l=c-n,l!==0&&(l+=s))),[l,i,o,c]},[0,[],0,0]),z(([e])=>e!==0),OI(r,s,n,i,p,m),z(([,e,t,n,,,r])=>!r&&!n&&e!==0&&t===sR),B(([[e],,,,,t])=>(t(`Upward scrolling compensation`,{amount:e},BI.DEBUG),e))));function g(n){n>0?(_I(t,{behavior:`auto`,top:-n}),_I(e,0)):(_I(e,0),_I(t,{behavior:`auto`,top:-n}))}return gI(V(h,OI(e,a)),([t,n,r])=>{r&&HR()?_I(e,n-t):g(-t)}),gI(V(LI(jI(a,!1),e,m),z(([e,t,n])=>!e&&!n&&t!==0),B(([e,t])=>t),DI(1)),g),R(V(d,B(e=>({top:-e}))),t),gI(V(l,OI(f,u),B(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(t.length===0)return a(e);let o=0,s=sL(r,0),c=0,l=0;for(;c<e;){c++,o+=s;let n=t.length===l+1?1/0:t[l+1]-t[l]-1;c+n>e&&(o-=s,n=e-c+1),c+=n,o+=a(n),l++}return o})),n=>{_I(e,n),requestAnimationFrame(()=>{_I(t,{top:n}),requestAnimationFrame(()=>{_I(e,0),_I(m,!1)})})}),{deviation:e}},hI(rL,fR,TR,YL,UI,DL)),BR,ZL,PI(([e,t,n,r,i,a,o,s,c,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...c,...l,...u}),hI(vR,PR,QL,IR,ER,FR,DR,LR,AR,UI,OR))));function WR(e,t){let n={},r={},i=0,a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}var GR=typeof document<`u`?j.useLayoutEffect:j.useEffect;function KR(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=j.createContext({});function c(e,n){e.propsReady!==void 0&&_I(e.propsReady,!1);for(let i of r){let r=e[t.required[i]];_I(r,n[i])}for(let r of i)if(r in n){let i=e[t.optional[r]];_I(i,n[r])}e.propsReady!==void 0&&_I(e.propsReady,!0)}function l(e){return a.reduce((n,r)=>(n[r]=n=>{let i=e[t.methods[r]];_I(i,n)},n),{})}function u(e){return o.reduce((n,r)=>(n[r]=AI(e[t.events[r]]),n),{})}return{Component:j.forwardRef(function(t,a){let{children:d,...f}=t,[p]=j.useState(()=>pI(II(e),e=>{c(e,f)})),[m]=j.useState(cI(u,p));GR(()=>{for(let e of o)e in f&&gI(m[e],f[e]);return()=>{Object.values(m).map(vI)}},[f,m,p]),GR(()=>{c(p,f)}),j.useImperativeHandle(a,aI(l(p)));let h=n;return(0,M.jsx)(s.Provider,{value:p,children:n===void 0?d:(0,M.jsx)(h,{...WR([...r,...i,...o],f),children:d})})}),useEmitter:(e,t)=>{let n=j.useContext(s)[e];GR(()=>gI(n,t),[t,n])},useEmitterValue:e=>{let t=j.useContext(s)[e],n=j.useCallback(e=>gI(t,e),[t]);return j.useSyncExternalStore(n,()=>yI(t),()=>yI(t))},usePublisher:e=>{let t=j.useContext(s);return j.useCallback(n=>{_I(t[e],n)},[t,e])}}}var qR=j.createContext(void 0),JR=j.createContext(void 0),YR=`-webkit-sticky`,XR=`sticky`,ZR=VR(()=>{if(typeof document>`u`)return XR;let e=document.createElement(`div`);return e.style.position=YR,e.style.position===YR?YR:XR}),QR=typeof document<`u`?j.useLayoutEffect:j.useEffect;function $R(e){return`self`in e}function ez(e){return`body`in e}function tz(e,t,n,r=fI,i,a){let o=j.useRef(null),s=j.useRef(null),c=j.useRef(null),l=j.useCallback(n=>{let r,i,o,l=n.target;if(ez(l)||$R(l)){let e=$R(l)?l:l.defaultView;o=a===!0?YI(e,e.scrollX):e.scrollY,r=a===!0?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a===!0?e.innerWidth:e.innerHeight}else o=a===!0?YI(l,l.scrollLeft):l.scrollTop,r=a===!0?l.scrollWidth:l.scrollHeight,i=a===!0?l.offsetWidth:l.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync===!0?u():af.flushSync(u),s.current!==null&&(o===s.current||o<=0||o===r-i)&&(s.current=null,t(!0),c.current&&=(clearTimeout(c.current),null))},[e,t,a]);j.useEffect(()=>{let e=i||o.current;return qI(e),r(i||o.current),l({suppressFlushSync:!0,target:e}),e.addEventListener(`scroll`,l,{passive:!0}),()=>{qI(e),r(null),e.removeEventListener(`scroll`,l)}},[o,l,n,r,i]);function u(n){let r=o.current;if(!r||(a===!0?`offsetWidth`in r&&r.offsetWidth===0:`offsetHeight`in r&&r.offsetHeight===0))return;let i=n.behavior===`smooth`,l,u,d;$R(r)?(u=Math.max(jL(r.document.documentElement,a===!0?`width`:`height`),a===!0?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),l=a===!0?r.innerWidth:r.innerHeight,d=a===!0?YI(r,r.scrollX):r.scrollY):(u=r[a===!0?`scrollWidth`:`scrollHeight`],l=jL(r,a===!0?`width`:`height`),d=a===!0?YI(r,r.scrollLeft):r.scrollTop);let f=u-l;if(n.top===void 0){r.scrollTo(n);return}let p=Math.ceil(Math.max(Math.min(f,n.top),0));if(n.top=p,oR(l,u)||p===d){e({scrollHeight:u,scrollTop:d,viewportHeight:l}),i&&t(!0);return}i?(s.current=p,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,a===!0&&(n={...n.behavior===void 0?{}:{behavior:n.behavior},left:XI(r,p)}),r.scrollTo(n)}function d(e){a===!0&&(e={...e.behavior===void 0?{}:{behavior:e.behavior},...e.top===void 0?{}:{left:XI(o.current,e.top)}}),o.current.scrollBy(e)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}function nz(e){return e}var rz=PI(([e,t])=>({...e,...t}),hI(UR,PI(()=>{let e=H(e=>`Item ${e}`),t=H(e=>`Group ${e}`),n=H({}),r=H(nz),i=H(`div`),a=H(fI),o=(e,t=null)=>jI(V(n,B(t=>t[e]),CI()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:o(`EmptyPlaceholder`),FooterComponent:o(`Footer`),GroupComponent:o(`Group`,`div`),groupContent:t,HeaderComponent:o(`Header`),HeaderFooterTag:i,ItemComponent:o(`Item`,`div`),itemContent:e,ListComponent:o(`List`,`div`),ScrollerComponent:o(`Scroller`,`div`),scrollerRef:a,ScrollSeekPlaceholder:o(`ScrollSeekPlaceholder`),TopItemListComponent:o(`TopItemList`)}}))),iz=({height:e})=>(0,M.jsx)(`div`,{style:{height:e}}),az={overflowAnchor:`none`,position:ZR(),zIndex:1},oz={overflowAnchor:`none`},sz={...oz,display:`inline-block`,height:`100%`},cz=j.memo(function({showTopList:e=!1}){let t=Tz(`listState`),n=Ez(`sizeRanges`),r=Tz(`useWindowScroll`),i=Tz(`customScrollParent`),a=Ez(`windowScrollContainerState`),o=Ez(`scrollContainerState`),s=i||r?a:o,c=Tz(`itemContent`),l=Tz(`context`),u=Tz(`groupContent`),d=Tz(`trackItemSizes`),f=Tz(`itemSize`),p=Tz(`log`),m=Ez(`gap`),h=Tz(`horizontalDirection`),{callbackRef:g}=$I(n,f,d,e?fI:s,p,m,i,h,Tz(`skipAnimationFrameInResizeObserver`)),[_,v]=j.useState(0);wz(`deviation`,e=>{_!==e&&v(e)});let y=Tz(`EmptyPlaceholder`),b=Tz(`ScrollSeekPlaceholder`)??iz,x=Tz(`ListComponent`),S=Tz(`ItemComponent`),C=Tz(`GroupComponent`),w=Tz(`computeItemKey`),T=Tz(`isSeeking`),E=Tz(`groupIndices`).length>0,D=Tz(`alignToBottom`),O=Tz(`initialItemFinalLocationReached`),ee=e?{}:{boxSizing:`border-box`,...h?{display:`inline-block`,height:`100%`,marginInlineStart:_===0?D?`auto`:0:_,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:`nowrap`}:{marginTop:_===0?D?`auto`:0:_,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...O?{}:{visibility:`hidden`}};return!e&&t.totalCount===0&&y!=null?(0,M.jsx)(y,{...mz(y,l)}):(0,M.jsx)(x,{...mz(x,l),"data-testid":e?`virtuoso-top-item-list`:`virtuoso-item-list`,ref:g,style:ee,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=w(n+t.firstItemIndex,e.data,l);return T?(0,j.createElement)(b,{...mz(b,l),height:e.size,index:e.index,key:r,type:e.type||`item`,...e.type===`group`?{}:{groupIndex:e.groupIndex}}):e.type===`group`?(0,j.createElement)(C,{...mz(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:az},u(e.index,l)):(0,j.createElement)(S,{...mz(S,l),...hz(S,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:h?sz:oz},E?c(e.index,e.groupIndex,e.data,l):c(e.index,e.data,l))})})}),lz={height:`100%`,outline:`none`,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},uz={outline:`none`,overflowX:`auto`,position:`relative`},dz=e=>({height:`100%`,position:`absolute`,top:0,width:`100%`,...e?{display:`flex`,flexDirection:`column`}:void 0}),fz=(e,t,n=0)=>({...dz(e),position:t?`relative`:`absolute`,top:t?-n:0}),pz={position:ZR(),top:0,width:`100%`,zIndex:1};function mz(e,t){if(typeof e!=`string`)return{context:t}}function hz(e,t){return{item:typeof e==`string`?void 0:t}}var gz=j.memo(function(){let e=Tz(`HeaderComponent`),t=Ez(`headerHeight`),n=Tz(`HeaderFooterTag`),r=ZI(j.useMemo(()=>e=>{t(jL(e,`height`))},[t]),!0,Tz(`skipAnimationFrameInResizeObserver`)),i=Tz(`context`);return e==null?null:(0,M.jsx)(n,{ref:r,children:(0,M.jsx)(e,{...mz(e,i)})})}),_z=j.memo(function(){let e=Tz(`FooterComponent`),t=Ez(`footerHeight`),n=Tz(`HeaderFooterTag`),r=ZI(j.useMemo(()=>e=>{t(jL(e,`height`))},[t]),!0,Tz(`skipAnimationFrameInResizeObserver`)),i=Tz(`context`);return e==null?null:(0,M.jsx)(n,{ref:r,children:(0,M.jsx)(e,{...mz(e,i)})})});function vz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return j.memo(function({children:r,style:i,context:a,...o}){let s=n(`scrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`scrollerRef`),d=t(`horizontalDirection`)||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:m}=tz(s,l,c,u,void 0,d);return e(`scrollTo`,m),e(`scrollBy`,f),(0,M.jsx)(c,{"data-testid":`virtuoso-scroller`,"data-virtuoso-scroller":!0,ref:p,style:{...d?uz:lz,...i},tabIndex:0,...o,...mz(c,a),children:r})})}function yz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return j.memo(function({children:r,style:i,context:a,...o}){let s=n(`windowScrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`totalListHeight`),d=t(`deviation`),f=t(`customScrollParent`),p=j.useRef(null),{scrollByCallback:m,scrollerRef:h,scrollToCallback:g}=tz(s,l,c,t(`scrollerRef`),f);return QR(()=>(h.current=f||p.current?.ownerDocument.defaultView,()=>{h.current=null}),[h,f]),e(`windowScrollTo`,g),e(`scrollBy`,m),(0,M.jsx)(c,{ref:p,"data-virtuoso-scroller":!0,style:{position:`relative`,...i,...u===0?void 0:{height:u+d}},...o,...mz(c,a),children:r})})}var bz=({children:e})=>{let t=j.useContext(qR),n=Ez(`viewportHeight`),r=Ez(`fixedItemHeight`),i=Tz(`alignToBottom`),a=Tz(`horizontalDirection`),o=ZI(j.useMemo(()=>sI(n,e=>jL(e,a?`width`:`height`)),[n,a]),!0,Tz(`skipAnimationFrameInResizeObserver`));return j.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,M.jsx)(`div`,{"data-viewport-type":`element`,ref:o,style:dz(i),children:e})},xz=({children:e})=>{let t=j.useContext(qR),n=Ez(`windowViewportRect`),r=Ez(`fixedItemHeight`),i=Tz(`customScrollParent`),a=Tz(`useWindowScroll`),o=Tz(`topListHeight`),s=nL(n,i,Tz(`skipAnimationFrameInResizeObserver`)),c=Tz(`alignToBottom`);return j.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,M.jsx)(`div`,{"data-viewport-type":`window`,ref:s,style:fz(c,a,o),children:e})},Sz=({children:e})=>{let t=Tz(`TopItemListComponent`)??`div`,n=Tz(`headerHeight`);return(0,M.jsx)(t,{style:{...pz,marginTop:`${n}px`},...mz(t,Tz(`context`)),children:e})},{Component:Cz,useEmitter:wz,useEmitterValue:Tz,usePublisher:Ez}=KR(rz,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,scrollIntoViewOnChange:`scrollIntoViewOnChange`,itemContent:`itemContent`,groupContent:`groupContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,groupCounts:`groupCounts`,topItemCount:`topItemCount`,firstItemIndex:`firstItemIndex`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,heightEstimates:`heightEstimates`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`HeaderFooterTag`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,horizontalDirection:`horizontalDirection`,skipAnimationFrameInResizeObserver:`skipAnimationFrameInResizeObserver`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,autoscrollToBottom:`autoscrollToBottom`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},j.memo(function(e){let t=Tz(`useWindowScroll`),n=Tz(`topItemsIndexes`).length>0,r=Tz(`customScrollParent`),i=Tz(`context`);return(0,M.jsxs)(r||t?Oz:Dz,{...e,context:i,children:[n&&(0,M.jsx)(Sz,{children:(0,M.jsx)(cz,{showTopList:!0})}),(0,M.jsxs)(r||t?xz:bz,{children:[(0,M.jsx)(gz,{}),(0,M.jsx)(cz,{}),(0,M.jsx)(_z,{})]})]})})),Dz=vz({useEmitter:wz,useEmitterValue:Tz,usePublisher:Ez}),Oz=yz({useEmitter:wz,useEmitterValue:Tz,usePublisher:Ez}),kz=Cz,Az=PI(([e,t])=>({...e,...t}),hI(UR,PI(()=>{let e=H(e=>(0,M.jsxs)(`td`,{children:[`Item $`,e]})),t=H(null),n=H(e=>(0,M.jsxs)(`td`,{colSpan:1e3,children:[`Group `,e]})),r=H(null),i=H(null),a=H({}),o=H(nz),s=H(fI),c=(e,t=null)=>jI(V(a,B(t=>t[e]),CI()),t);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c(`EmptyPlaceholder`),FillerRow:c(`FillerRow`),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`),TableBodyComponent:c(`TableBody`,`tbody`),TableComponent:c(`Table`,`table`),TableFooterComponent:c(`TableFoot`,`tfoot`),TableHeadComponent:c(`TableHead`,`thead`),TableRowComponent:c(`TableRow`,`tr`),GroupComponent:c(`Group`,`tr`)}}))),jz=({height:e})=>(0,M.jsx)(`tr`,{children:(0,M.jsx)(`td`,{style:{height:e}})}),Mz=({height:e})=>(0,M.jsx)(`tr`,{children:(0,M.jsx)(`td`,{style:{border:0,height:e,padding:0}})}),Nz={overflowAnchor:`none`},Pz={position:ZR(),zIndex:2,overflowAnchor:`none`},Fz=j.memo(function({showTopList:e=!1}){let t=Vz(`listState`),n=Vz(`computeItemKey`),r=Vz(`firstItemIndex`),i=Vz(`context`),a=Vz(`isSeeking`),o=Vz(`fixedHeaderHeight`),s=Vz(`groupIndices`).length>0,c=Vz(`itemContent`),l=Vz(`groupContent`),u=Vz(`ScrollSeekPlaceholder`)??jz,d=Vz(`GroupComponent`),f=Vz(`TableRowComponent`),p=(e?t.topItems:[]).reduce((e,t,n)=>(n===0?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let m=t.originalIndex,h=n(m+r,t.data,i),g=e?m===0?0:p[m-1]:0;return a?(0,j.createElement)(u,{...mz(u,i),height:t.size,index:t.index,key:h,type:t.type||`item`}):t.type===`group`?(0,j.createElement)(d,{...mz(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:h,style:{...Pz,top:o}},l(t.index,i)):(0,j.createElement)(f,{...mz(f,i),...hz(f,t.data),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:h,style:e?{...Pz,top:o+g}:Nz},s?c(t.index,t.groupIndex,t.data,i):c(t.index,t.data,i))})}),Iz=j.memo(function(){let e=Vz(`listState`),t=Vz(`topItemsIndexes`).length>0,n=Hz(`sizeRanges`),r=Vz(`useWindowScroll`),i=Vz(`customScrollParent`),a=Hz(`windowScrollContainerState`),o=Hz(`scrollContainerState`),s=i||r?a:o,c=Vz(`trackItemSizes`),{callbackRef:l,ref:u}=$I(n,Vz(`itemSize`),c,s,Vz(`log`),void 0,i,!1,Vz(`skipAnimationFrameInResizeObserver`)),[d,f]=j.useState(0);Bz(`deviation`,e=>{d!==e&&(u.current.style.marginTop=`${e}px`,f(e))});let p=Vz(`EmptyPlaceholder`),m=Vz(`FillerRow`)??Mz,h=Vz(`TableBodyComponent`),g=Vz(`paddingTopAddition`),_=Vz(`statefulTotalCount`),v=Vz(`context`);if(_===0&&p!=null)return(0,M.jsx)(p,{...mz(p,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),b=e.offsetTop+g+d-y,x=e.offsetBottom,S=b>0?(0,M.jsx)(m,{context:v,height:b},`padding-top`):null,C=x>0?(0,M.jsx)(m,{context:v,height:x},`padding-bottom`):null;return(0,M.jsxs)(h,{"data-testid":`virtuoso-item-list`,ref:l,...mz(h,v),children:[S,t&&(0,M.jsx)(Fz,{showTopList:!0}),(0,M.jsx)(Fz,{}),C]})}),Lz=({children:e})=>{let t=j.useContext(qR),n=Hz(`viewportHeight`),r=Hz(`fixedItemHeight`),i=ZI(j.useMemo(()=>sI(n,e=>jL(e,`height`)),[n]),!0,Vz(`skipAnimationFrameInResizeObserver`));return j.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,M.jsx)(`div`,{"data-viewport-type":`element`,ref:i,style:dz(!1),children:e})},Rz=({children:e})=>{let t=j.useContext(qR),n=Hz(`windowViewportRect`),r=Hz(`fixedItemHeight`),i=Vz(`customScrollParent`),a=Vz(`useWindowScroll`),o=nL(n,i,Vz(`skipAnimationFrameInResizeObserver`));return j.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,M.jsx)(`div`,{"data-viewport-type":`window`,ref:o,style:fz(!1,a),children:e})},{Component:zz,useEmitter:Bz,useEmitterValue:Vz,usePublisher:Hz}=KR(Az,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,firstItemIndex:`firstItemIndex`,itemContent:`itemContent`,groupContent:`groupContent`,fixedHeaderContent:`fixedHeaderContent`,fixedFooterContent:`fixedFooterContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,topItemCount:`topItemCount`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,groupCounts:`groupCounts`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},j.memo(function(e){let t=Vz(`useWindowScroll`),n=Vz(`customScrollParent`),r=Hz(`fixedHeaderHeight`),i=Hz(`fixedFooterHeight`),a=Vz(`fixedHeaderContent`),o=Vz(`fixedFooterContent`),s=Vz(`context`),c=ZI(j.useMemo(()=>sI(r,e=>jL(e,`height`)),[r]),!0,Vz(`skipAnimationFrameInResizeObserver`)),l=ZI(j.useMemo(()=>sI(i,e=>jL(e,`height`)),[i]),!0,Vz(`skipAnimationFrameInResizeObserver`)),u=n||t?Wz:Uz,d=n||t?Rz:Lz,f=Vz(`TableComponent`),p=Vz(`TableHeadComponent`),m=Vz(`TableFooterComponent`),h=a?(0,M.jsx)(p,{ref:c,style:{position:`sticky`,top:0,zIndex:2},...mz(p,s),children:a()},`TableHead`):null,g=o?(0,M.jsx)(m,{ref:l,style:{bottom:0,position:`sticky`,zIndex:1},...mz(m,s),children:o()},`TableFoot`):null;return(0,M.jsx)(u,{...e,...mz(u,s),children:(0,M.jsx)(d,{children:(0,M.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:`none`},...mz(f,s),children:[h,(0,M.jsx)(Iz,{},`TableBody`),g]})})})})),Uz=vz({useEmitter:Bz,useEmitterValue:Vz,usePublisher:Hz}),Wz=yz({useEmitter:Bz,useEmitterValue:Vz,usePublisher:Hz}),Gz=zz,Kz={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},qz={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Jz,floor:Yz,max:Xz,min:Zz,round:Qz}=Math;function $z(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:n===null?null:n[r+e],index:r+e}))}function eB(e){return{...qz,items:e}}function tB(e,t){return e!==void 0&&e.width===t.width&&e.height===t.height}function nB(e,t){return e!==void 0&&e.column===t.column&&e.row===t.row}var rB=PI(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:s,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:m,propsReady:h},{customScrollParent:g,useWindowScroll:_,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b},x])=>{let S=H(0),C=H(0),w=H(Kz),T=H({height:0,width:0}),E=H({height:0,width:0}),D=MI(),O=MI(),ee=H(0),te=H(null),ne=H({column:0,row:0}),k=MI(),re=MI(),ie=H(!1),ae=H(0),A=H(!0),oe=H(!1),se=H(!1);gI(V(m,OI(ae),z(([e,t])=>t!==0)),()=>{_I(A,!1)}),gI(V(LI(m,A,E,T,ae,oe),z(([e,t,n,r,,i])=>e&&!t&&n.height!==0&&r.height!==0&&!i)),([,,,,e])=>{_I(oe,!0),rR(1,()=>{_I(D,e)}),bI(V(l),()=>{_I(t,[0,0]),_I(A,!0)})}),R(V(re,z(e=>e!=null&&e.scrollTop>0),wI(0)),C),gI(V(m,OI(re),z(([,e])=>e!=null)),([,e])=>{e&&(_I(T,e.viewport),_I(E,e.item),_I(ne,e.gap),e.scrollTop>0&&(_I(ie,!0),bI(V(l,EI(1)),e=>{_I(ie,!1)}),_I(c,{top:e.scrollTop})))}),R(V(T,B(({height:e})=>e)),d),R(V(LI(RI(T,tB),RI(E,tB),RI(ne,(e,t)=>e!==void 0&&e.column===t.column&&e.row===t.row),RI(l)),B(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),k),R(V(LI(RI(S),r,RI(ne,nB),RI(E,tB),RI(T,tB),RI(te),RI(C),RI(ie),RI(A),RI(ae)),z(([,,,,,,,e])=>!e),B(([e,[t,n],r,i,a,o,s,,c,l])=>{let{column:u,row:d}=r,{height:f,width:p}=i,{width:m}=a;if(s===0&&(e===0||m===0))return Kz;if(p===0){let t=iR(l,e);return eB($z(t,t+Math.max(s-1,0),o))}let h=iB(m,p,u),g,_;c?t===0&&n===0&&s>0?(g=0,_=s-1):(g=h*Yz((t+d)/(f+d)),_=h*Jz((n+d)/(f+d))-1,_=Zz(e-1,Xz(_,h-1)),g=Zz(_,Xz(0,g))):(g=0,_=-1);let v=$z(g,_,o),{bottom:y,top:b}=aB(a,r,i,v),x=Jz(e/h);return{bottom:y,itemHeight:f,items:v,itemWidth:p,offsetBottom:x*f+(x-1)*d-y,offsetTop:b,top:b}})),w),R(V(te,z(e=>e!==null),B(e=>e.length)),S),R(V(LI(T,E,w,ne),z(([e,t,{items:n}])=>n.length>0&&t.height!==0&&e.height!==0),B(([e,t,{items:n},r])=>{let{bottom:i,top:a}=aB(e,r,t,n);return[a,i]}),CI(EL)),t);let ce=H(!1);R(V(l,OI(ce),B(([e,t])=>t||e!==0)),ce);let le=NI(V(LI(w,S),z(([{items:e}])=>e.length>0),OI(ce),z(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&e.offsetBottom===0&&e.items.length===t)&&r}),B(([[,e]])=>e-1),CI())),ue=NI(V(RI(w),z(({items:e})=>e.length>0&&e[0].index===0),wI(0),CI())),de=NI(V(RI(w),OI(ie),z(([{items:e},t])=>e.length>0&&!t),B(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),CI(TL),DI(0)));R(de,p.scrollSeekRangeChanged),R(V(D,OI(T,E,S,ne),B(([e,t,n,r,i])=>{let a=eR(e),{align:o,behavior:s,offset:c}=a,l=a.index;l===`LAST`&&(l=r-1),l=Xz(0,l,Zz(r-1,l));let u=oB(t,i,n,l);return o===`end`?u=Qz(u-t.height+n.height):o===`center`&&(u=Qz(u-t.height/2+n.height/2)),c!==void 0&&c!==0&&(u+=c),{behavior:s,top:u}})),c);let fe=jI(V(w,B(e=>e.offsetBottom+e.bottom)),0);return R(V(b,B(e=>({height:e.visibleHeight,width:e.visibleWidth}))),T),{customScrollParent:g,data:te,deviation:ee,footerHeight:i,gap:ne,headerHeight:a,increaseViewportBy:e,initialItemCount:C,itemDimensions:E,overscan:n,restoreStateFrom:re,scrollBy:o,scrollContainerState:s,scrollHeight:O,scrollTo:c,scrollToIndex:D,scrollTop:l,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:_,viewportDimensions:T,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b,...p,gridState:w,horizontalDirection:se,initialTopMostItemIndex:ae,totalListHeight:fe,...f,endReached:le,propsReady:h,rangeChanged:de,startReached:ue,stateChanged:k,stateRestoreInProgress:ie,...x}},hI(vR,rL,fR,IR,QL,LR,UI));function iB(e,t,n){return Xz(1,Yz((e+n)/(Yz(t)+n)))}function aB(e,t,n,r){let{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};let a=oB(e,t,n,r[0].index);return{bottom:oB(e,t,n,r[r.length-1].index)+i,top:a}}function oB(e,t,n,r){let i=Yz(r/iB(e.width,n.width,t.column)),a=i*n.height+Xz(0,i-1)*t.row;return a>0?a+t.row:a}var sB=PI(([e,t])=>({...e,...t}),hI(rB,PI(()=>{let e=H(e=>`Item ${e}`),t=H({}),n=H(null),r=H(`virtuoso-grid-item`),i=H(`virtuoso-grid-list`),a=H(nz),o=H(`div`),s=H(fI),c=(e,n=null)=>jI(V(t,B(t=>t[e]),CI()),n),l=H(!1),u=H(!1);return R(RI(u),l),{components:t,computeItemKey:a,context:n,FooterComponent:c(`Footer`),HeaderComponent:c(`Header`),headerFooterTag:o,itemClassName:r,ItemComponent:c(`Item`,`div`),itemContent:e,listClassName:i,ListComponent:c(`List`,`div`),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`,`div`)}}))),cB=j.memo(function(){let e=mB(`gridState`),t=mB(`listClassName`),n=mB(`itemClassName`),r=mB(`itemContent`),i=mB(`computeItemKey`),a=mB(`isSeeking`),o=hB(`scrollHeight`),s=mB(`ItemComponent`),c=mB(`ListComponent`),l=mB(`ScrollSeekPlaceholder`),u=mB(`context`),d=hB(`itemDimensions`),f=hB(`gap`),p=mB(`log`),m=mB(`stateRestoreInProgress`),h=hB(`reportReadyState`),g=ZI(j.useMemo(()=>e=>{let t=e.parentElement.parentElement.scrollHeight;o(t);let n=e.firstChild;if(n!==null){let{height:e,width:t}=n.getBoundingClientRect();d({height:e,width:t})}f({column:vB(`column-gap`,getComputedStyle(e).columnGap,p),row:vB(`row-gap`,getComputedStyle(e).rowGap,p)})},[o,d,f,p]),!0,!1);return QR(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),m?null:(0,M.jsx)(c,{className:t,ref:g,...mz(c,u),"data-testid":`virtuoso-item-list`,style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let o=i(t.index,t.data,u);return a?(0,M.jsx)(l,{...mz(l,u),height:e.itemHeight,index:t.index,width:e.itemWidth},o):(0,j.createElement)(s,{...mz(s,u),className:n,"data-index":t.index,key:o},r(t.index,t.data,u))})})}),lB=j.memo(function(){let e=mB(`HeaderComponent`),t=hB(`headerHeight`),n=mB(`headerFooterTag`),r=ZI(j.useMemo(()=>e=>{t(jL(e,`height`))},[t]),!0,!1),i=mB(`context`);return e==null?null:(0,M.jsx)(n,{ref:r,children:(0,M.jsx)(e,{...mz(e,i)})})}),uB=j.memo(function(){let e=mB(`FooterComponent`),t=hB(`footerHeight`),n=mB(`headerFooterTag`),r=ZI(j.useMemo(()=>e=>{t(jL(e,`height`))},[t]),!0,!1),i=mB(`context`);return e==null?null:(0,M.jsx)(n,{ref:r,children:(0,M.jsx)(e,{...mz(e,i)})})}),dB=({children:e})=>{let t=j.useContext(JR),n=hB(`itemDimensions`),r=hB(`viewportDimensions`),i=ZI(j.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return j.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,M.jsx)(`div`,{ref:i,style:dz(!1),children:e})},fB=({children:e})=>{let t=j.useContext(JR),n=hB(`windowViewportRect`),r=hB(`itemDimensions`),i=mB(`customScrollParent`),a=mB(`useWindowScroll`),o=nL(n,i,!1);return j.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,M.jsx)(`div`,{ref:o,style:fz(!1,a),children:e})},{Component:moe,useEmitter:pB,useEmitterValue:mB,usePublisher:hB}=KR(sB,{optional:{context:`context`,totalCount:`totalCount`,overscan:`overscan`,itemContent:`itemContent`,components:`components`,computeItemKey:`computeItemKey`,data:`data`,initialItemCount:`initialItemCount`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`headerFooterTag`,listClassName:`listClassName`,itemClassName:`itemClassName`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,restoreStateFrom:`restoreStateFrom`,initialTopMostItemIndex:`initialTopMostItemIndex`,increaseViewportBy:`increaseViewportBy`},methods:{scrollTo:`scrollTo`,scrollBy:`scrollBy`,scrollToIndex:`scrollToIndex`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,stateChanged:`stateChanged`,readyStateChanged:`readyStateChanged`}},j.memo(function({...e}){let t=mB(`useWindowScroll`),n=mB(`customScrollParent`),r=n||t?_B:gB,i=n||t?fB:dB,a=mB(`context`);return(0,M.jsx)(r,{...e,...mz(r,a),children:(0,M.jsxs)(i,{children:[(0,M.jsx)(lB,{}),(0,M.jsx)(cB,{}),(0,M.jsx)(uB,{})]})})})),gB=vz({useEmitter:pB,useEmitterValue:mB,usePublisher:hB}),_B=yz({useEmitter:pB,useEmitterValue:mB,usePublisher:hB});function vB(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,BI.WARN),t===`normal`?0:parseInt(t??`0`,10)}var yB=`Collapsible`,[bB,xB]=R_(yB),[SB,CB]=bB(yB),wB=j.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=U_({prop:r,defaultProp:i??!1,onChange:o,caller:yB});return(0,M.jsx)(SB,{scope:n,disabled:a,contentId:vy(),open:c,onOpenToggle:j.useCallback(()=>l(e=>!e),[l]),children:(0,M.jsx)(Q_.div,{"data-state":AB(c),"data-disabled":a?``:void 0,...s,ref:t})})});wB.displayName=yB;var TB=`CollapsibleTrigger`,EB=j.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=CB(TB,n);return(0,M.jsx)(Q_.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":AB(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:B_(e.onClick,i.onOpenToggle)})});EB.displayName=TB;var DB=`CollapsibleContent`,OB=j.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=CB(DB,e.__scopeCollapsible);return(0,M.jsx)(Y_,{present:n||i.open,children:({present:e})=>(0,M.jsx)(kB,{...r,ref:t,present:e})})});OB.displayName=DB;var kB=j.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=CB(DB,n),[s,c]=j.useState(r),l=j.useRef(null),u=nu(t,l),d=j.useRef(0),f=d.current,p=j.useRef(0),m=p.current,h=o.open||s,g=j.useRef(h),_=j.useRef(void 0);return j.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),V_(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,M.jsx)(Q_.div,{"data-state":AB(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function AB(e){return e?`open`:`closed`}var jB=wB,MB=EB,NB=OB,PB=`Accordion`,FB=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[IB,LB,RB]=hy(PB),[zB,hoe]=R_(PB,[RB,xB]),BB=xB(),VB=j.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,M.jsx)(IB.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,M.jsx)(qB,{...a,ref:t}):(0,M.jsx)(KB,{...i,ref:t})})});VB.displayName=PB;var[HB,UB]=zB(PB),[WB,GB]=zB(PB,{collapsible:!1}),KB=j.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=U_({prop:n,defaultProp:r??``,onChange:i,caller:PB});return(0,M.jsx)(HB,{scope:e.__scopeAccordion,value:j.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:j.useCallback(()=>a&&c(``),[a,c]),children:(0,M.jsx)(WB,{scope:e.__scopeAccordion,collapsible:a,children:(0,M.jsx)(XB,{...o,ref:t})})})}),qB=j.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=U_({prop:n,defaultProp:r??[],onChange:i,caller:PB}),c=j.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=j.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,M.jsx)(HB,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,M.jsx)(WB,{scope:e.__scopeAccordion,collapsible:!0,children:(0,M.jsx)(XB,{...a,ref:t})})})}),[JB,YB]=zB(PB),XB=j.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=nu(j.useRef(null),t),c=LB(n),l=xy(i)===`ltr`,u=B_(e.onKeyDown,e=>{if(!FB.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=()=>{o=r+1,o>s&&(o=0)},d=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,M.jsx)(JB,{scope:n,disabled:r,direction:i,orientation:a,children:(0,M.jsx)(IB.Slot,{scope:n,children:(0,M.jsx)(Q_.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),ZB=`AccordionItem`,[QB,$B]=zB(ZB),eV=j.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=YB(ZB,n),o=UB(ZB,n),s=BB(n),c=vy(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,M.jsx)(QB,{scope:n,open:l,disabled:u,triggerId:c,children:(0,M.jsx)(jB,{"data-orientation":a.orientation,"data-state":sV(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});eV.displayName=ZB;var tV=`AccordionHeader`,nV=j.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=YB(PB,n),a=$B(tV,n);return(0,M.jsx)(Q_.h3,{"data-orientation":i.orientation,"data-state":sV(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});nV.displayName=tV;var rV=`AccordionTrigger`,iV=j.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=YB(PB,n),a=$B(rV,n),o=GB(rV,n),s=BB(n);return(0,M.jsx)(IB.ItemSlot,{scope:n,children:(0,M.jsx)(MB,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});iV.displayName=rV;var aV=`AccordionContent`,oV=j.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=YB(PB,n),a=$B(aV,n),o=BB(n);return(0,M.jsx)(NB,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});oV.displayName=aV;function sV(e){return e?`open`:`closed`}var cV=VB,lV=eV,uV=nV,dV=iV,fV=oV,pV=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},mV=(e=>e?pV(e):pV),hV=e=>e;function gV(e,t=hV){let n=j.useSyncExternalStore(e.subscribe,j.useCallback(()=>t(e.getState()),[e,t]),j.useCallback(()=>t(e.getInitialState()),[e,t]));return j.useDebugValue(n),n}var _V=e=>{let t=mV(e),n=e=>gV(t,e);return Object.assign(n,t),n},vV=(e=>e?_V(e):_V);Object.freeze({status:`aborted`});function U(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var yV=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},bV=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},xV={};function SV(e){return e&&Object.assign(xV,e),xV}function CV(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function wV(e,t){return typeof t==`bigint`?t.toString():t}function TV(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function EV(e){return e==null}function DV(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function OV(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var kV=Symbol(`evaluating`);function AV(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==kV)return r===void 0&&(r=kV,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function jV(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function MV(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function NV(e){return JSON.stringify(e)}function PV(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var FV=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function IV(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var LV=TV(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function RV(e){if(IV(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(IV(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function zV(e){return RV(e)?{...e}:Array.isArray(e)?[...e]:e}var BV=new Set([`string`,`number`,`symbol`]);function VV(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function HV(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function W(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function UV(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var WV={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function GV(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return HV(e,MV(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return jV(this,`shape`,e),e},checks:[]}))}function KV(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return HV(e,MV(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return jV(this,`shape`,r),r},checks:[]}))}function qV(e,t){if(!RV(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return HV(e,MV(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return jV(this,`shape`,n),n}}))}function JV(e,t){if(!RV(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return HV(e,MV(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return jV(this,`shape`,n),n}}))}function YV(e,t){return HV(e,MV(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return jV(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function XV(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return HV(t,MV(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return jV(this,`shape`,i),i},checks:[]}))}function ZV(e,t,n){return HV(t,MV(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return jV(this,`shape`,i),i}}))}function QV(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function $V(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function eH(e){return typeof e==`string`?e:e?.message}function tH(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=eH(e.inst?._zod.def?.error?.(e))??eH(t?.error?.(e))??eH(n.customError?.(e))??eH(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function nH(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function rH(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var iH=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,wV,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},aH=U(`$ZodError`,iH),oH=U(`$ZodError`,iH,{Parent:Error});function sH(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function cH(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var lH=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new yV;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>tH(e,a,SV())));throw FV(t,i?.callee),t}return o.value},uH=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>tH(e,a,SV())));throw FV(t,i?.callee),t}return o.value},dH=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new yV;return a.issues.length?{success:!1,error:new(e??aH)(a.issues.map(e=>tH(e,i,SV())))}:{success:!0,data:a.value}},fH=dH(oH),pH=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>tH(e,i,SV())))}:{success:!0,data:a.value}},mH=pH(oH),hH=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return lH(e)(t,n,i)},gH=e=>(t,n,r)=>lH(e)(t,n,r),_H=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return uH(e)(t,n,i)},vH=e=>async(t,n,r)=>uH(e)(t,n,r),yH=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return dH(e)(t,n,i)},bH=e=>(t,n,r)=>dH(e)(t,n,r),xH=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return pH(e)(t,n,i)},SH=e=>async(t,n,r)=>pH(e)(t,n,r),CH=/^[cC][^\s-]{8,}$/,wH=/^[0-9a-z]+$/,TH=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,EH=/^[0-9a-vA-V]{20}$/,DH=/^[A-Za-z0-9]{27}$/,OH=/^[a-zA-Z0-9_-]{21}$/,kH=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,AH=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jH=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,MH=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,NH=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function PH(){return new RegExp(NH,`u`)}var FH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,IH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,LH=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,RH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zH=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,BH=/^[A-Za-z0-9_-]*$/,VH=/^\+[1-9]\d{6,14}$/,HH=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,UH=RegExp(`^${HH}$`);function WH(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function GH(e){return RegExp(`^${WH(e)}$`)}function KH(e){let t=WH({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${HH}T(?:${r})$`)}var qH=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},JH=/^-?\d+$/,YH=/^-?\d+(?:\.\d+)?$/,XH=/^(?:true|false)$/i,ZH=/^null$/i,QH=/^[^A-Z]*$/,$H=/^[^a-z]*$/,eU=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),tU={number:`number`,bigint:`bigint`,object:`date`},nU=U(`$ZodCheckLessThan`,(e,t)=>{eU.init(e,t);let n=tU[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rU=U(`$ZodCheckGreaterThan`,(e,t)=>{eU.init(e,t);let n=tU[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),iU=U(`$ZodCheckMultipleOf`,(e,t)=>{eU.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):OV(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),aU=U(`$ZodCheckNumberFormat`,(e,t)=>{eU.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=WV[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=JH)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),oU=U(`$ZodCheckMaxLength`,(e,t)=>{var n;eU.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!EV(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=nH(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sU=U(`$ZodCheckMinLength`,(e,t)=>{var n;eU.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!EV(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=nH(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),cU=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;eU.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!EV(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=nH(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),lU=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;eU.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),uU=U(`$ZodCheckRegex`,(e,t)=>{lU.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),dU=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=QH,lU.init(e,t)}),fU=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=$H,lU.init(e,t)}),pU=U(`$ZodCheckIncludes`,(e,t)=>{eU.init(e,t);let n=VV(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),mU=U(`$ZodCheckStartsWith`,(e,t)=>{eU.init(e,t);let n=RegExp(`^${VV(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hU=U(`$ZodCheckEndsWith`,(e,t)=>{eU.init(e,t);let n=RegExp(`.*${VV(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),gU=U(`$ZodCheckOverwrite`,(e,t)=>{eU.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),_U=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
76
+ `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var GF={tokenize:qF,concrete:!0,name:`mathFlow`},KF={tokenize:JF,partial:!0};function qF(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),fA(e,l,`whitespace`)(t))}function l(t){return t===null||L(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||L(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(KF,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?fA(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):L(t)?e.attempt(KF,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||L(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return fA(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),fA(e,c,`whitespace`)(t))}function c(r){return r===null||L(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function JF(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function YF(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:XF,previous:ZF,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):L(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||L(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function XF(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ZF(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function QF(e){return{flow:{36:GF},text:{36:YF(e)}}}var $F={};function eI(e){let t=this,n=e||$F,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(QF(n)),a.push(UF()),o.push(WF(n))}var tI=0,nI=1,rI=2,iI=4;function aI(e){return()=>e}function oI(e){e()}function sI(e,t){return n=>e(t(n))}function cI(e,t){return()=>e(t)}function lI(e,t){return n=>e(t,n)}function uI(e){return e!==void 0}function dI(...e){return()=>{e.map(oI)}}function fI(){}function pI(e,t){return t(e),e}function mI(e,t){return t(e)}function hI(...e){return e}function gI(e,t){return e(nI,t)}function _I(e,t){e(tI,t)}function vI(e){e(rI)}function yI(e){return e(iI)}function R(e,t){return gI(e,lI(t,tI))}function bI(e,t){let n=e(nI,e=>{n(),t(e)});return n}function xI(e){let t,n;return r=>i=>{t=i,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function SI(e,t){return e===t}function CI(e=SI){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function z(e){return t=>n=>{e(n)&&t(n)}}function B(e){return t=>sI(t,e)}function wI(e){return t=>()=>{t(e)}}function V(e,...t){let n=kI(...t);return((t,r)=>{switch(t){case rI:vI(e);return;case nI:return gI(e,n(r))}})}function TI(e,t){return n=>r=>{n(t=e(t,r))}}function EI(e){return t=>n=>{e>0?e--:t(n)}}function DI(e){let t=null,n;return r=>i=>{t=i,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function OI(...e){let t=Array(e.length),n=0,r=null,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;gI(e,e=>{let s=n;n|=o,t[a]=e,s!==i&&n===i&&r&&(r(),r=null)})}),e=>a=>{let o=()=>{e([a].concat(t))};n===i?o():r=o}}function kI(...e){return t=>e.reduceRight(mI,t)}function AI(e){let t,n,r=()=>t?.();return function(i,a){switch(i){case nI:return a?n===a?void 0:(r(),n=a,t=gI(e,a),t):(r(),fI);case rI:r(),n=null;return}}}function H(e){let t=e,n=MI();return((e,r)=>{switch(e){case tI:t=r;break;case nI:r(t);break;case iI:return t}return n(e,r)})}function jI(e,t){return pI(H(t),t=>R(e,t))}function MI(){let e=[];return((t,n)=>{switch(t){case tI:e.slice().forEach(e=>{e(n)});return;case rI:e.splice(0,e.length);return;case nI:return e.push(n),()=>{let t=e.indexOf(n);t>-1&&e.splice(t,1)}}})}function NI(e){return pI(MI(),t=>R(e,t))}function PI(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:FI(),singleton:n}}var FI=()=>Symbol();function II(e){let t=new Map,n=({constructor:e,dependencies:r,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);let o=e(r.map(e=>n(e)));return a&&t.set(i,o),o};return n(e)}function LI(...e){let t=MI(),n=Array(e.length),r=0,i=2**e.length-1;return e.forEach((e,a)=>{let o=2**a;gI(e,e=>{n[a]=e,r|=o,r===i&&_I(t,n)})}),function(e,a){switch(e){case rI:vI(t);return;case nI:return r===i&&a(n),gI(t,a)}}}function RI(e,t=SI){return V(e,CI(t))}function zI(...e){return function(t,n){switch(t){case rI:return;case nI:return dI(...e.map(e=>gI(e,n)))}}}var BI={DEBUG:0,INFO:1,WARN:2,ERROR:3},VI={[BI.DEBUG]:`debug`,[BI.ERROR]:`error`,[BI.INFO]:`log`,[BI.WARN]:`warn`},HI=()=>typeof globalThis>`u`?window:globalThis,UI=PI(()=>{let e=H(BI.ERROR);return{log:H((t,n,r=BI.INFO)=>{r>=(HI().VIRTUOSO_LOG_LEVEL??yI(e))&&console[VI[r]](`%creact-virtuoso: %c%s %o`,`color: #0253b3; font-weight: bold`,`color: initial`,t,n)}),logLevel:e}},[],{singleton:!0}),WI=new WeakMap;function GI(e){return`self`in e?e.document.documentElement:e}function KI(e){let t=GI(e),n=WI.get(t);if(n!==void 0)return n;let r=t.ownerDocument.defaultView.getComputedStyle(t).direction===`rtl`;return WI.set(t,r),r}function qI(e){WI.delete(GI(e))}function JI(e,t){return KI(e)?-t:t}var YI=JI;function XI(e,t){return JI(e,t)}function ZI(e,t,n){return QI(e,t,n).callbackRef}function QI(e,t,n){let r=j.useRef(null),i=e=>{},a=j.useMemo(()=>typeof ResizeObserver<`u`?new ResizeObserver(t=>{let r=()=>{let n=t[0].target;n.offsetParent!==null&&e(n)};n?r():requestAnimationFrame(r)}):null,[e,n]);return i=e=>{e&&t?(a?.observe(e),r.current=e):(r.current&&a?.unobserve(r.current),r.current=null)},{callbackRef:i,ref:r}}function $I(e,t,n,r,i,a,o,s,c){return QI(j.useCallback(n=>{let c=eL(n.children,t,s?`offsetWidth`:`offsetHeight`,i),l=n.parentElement;for(;l.dataset.virtuosoScroller===void 0;)l=l.parentElement;let u=l.lastElementChild.dataset.viewportType===`window`,d;u&&(d=l.ownerDocument.defaultView);let f=o?s?o.scrollWidth:o.scrollHeight:u?s?d.document.documentElement.scrollWidth:d.document.documentElement.scrollHeight:s?l.scrollWidth:l.scrollHeight,p=o?s?o.offsetWidth:o.offsetHeight:u?s?d.innerWidth:d.innerHeight:s?l.offsetWidth:l.offsetHeight,m=o?s?YI(o,o.scrollLeft):o.scrollTop:u?s?YI(d,d.scrollX||d.document.documentElement.scrollLeft):d.scrollY||d.document.documentElement.scrollTop:s?YI(l,l.scrollLeft):l.scrollTop;r({scrollHeight:f,scrollTop:Math.max(m,0),viewportHeight:p}),a?.(s?tL(`column-gap`,getComputedStyle(n).columnGap,i):tL(`row-gap`,getComputedStyle(n).rowGap,i)),c!==null&&e(c)},[e,t,i,a,o,r,s]),n,c)}function eL(e,t,n,r){let i=e.length;if(i===0)return null;let a=[];for(let o=0;o<i;o++){let i=e.item(o);if(i.dataset.index===void 0)continue;let s=parseInt(i.dataset.index),c=parseFloat(i.dataset.knownSize),l=t(i,n);if(l===0&&r(`Zero-sized element, this should not happen`,{child:i},BI.ERROR),l===c)continue;let u=a[a.length-1];a.length===0||u.size!==l||u.endIndex!==s-1?a.push({endIndex:s,size:l,startIndex:s}):a[a.length-1].endIndex++}return a}function tL(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,BI.WARN),t===`normal`?0:parseInt(t??`0`,10)}function nL(e,t,n){let r=j.useRef(null),i=j.useCallback(n=>{if(!n?.offsetParent)return;let i=n.getBoundingClientRect(),a=i.width,s,c;if(t){let e=t.getBoundingClientRect(),n=i.top-e.top;c=e.height-Math.max(0,n),s=n+t.scrollTop}else{let e=o.current.ownerDocument.defaultView;c=e.innerHeight-Math.max(0,i.top),s=i.top+e.scrollY}r.current={listHeight:i.height,offsetTop:s,visibleHeight:c,visibleWidth:a},e(r.current)},[e,t]),{callbackRef:a,ref:o}=QI(i,!0,n),s=j.useCallback(()=>{i(o.current)},[i,o]);return j.useEffect(()=>{if(t){t.addEventListener(`scroll`,s);let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>{t.removeEventListener(`scroll`,s),e.unobserve(t)}}let e=o.current?.ownerDocument.defaultView;return e?.addEventListener(`scroll`,s),e?.addEventListener(`resize`,s),()=>{e?.removeEventListener(`scroll`,s),e?.removeEventListener(`resize`,s)}},[s,t,o]),a}var rL=PI(()=>{let e=MI(),t=MI(),n=H(0),r=MI(),i=H(0),a=MI(),o=MI(),s=H(0),c=H(0),l=H(0),u=H(0),d=MI(),f=MI(),p=H(!1),m=H(!1),h=H(!1);return R(V(e,B(({scrollTop:e})=>e)),t),R(V(e,B(({scrollHeight:e})=>e)),o),R(t,i),{deviation:n,fixedFooterHeight:l,fixedHeaderHeight:c,footerHeight:u,headerHeight:s,horizontalDirection:m,scrollBy:f,scrollContainerState:e,scrollHeight:o,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:i,viewportHeight:a}},[],{singleton:!0}),iL={lvl:0};function aL(e,t){let n=e.length;if(n===0)return[];let{index:r,value:i}=t(e[0]),a=[];for(let o=1;o<n;o++){let{index:n,value:s}=t(e[o]);a.push({end:n-1,start:r,value:i}),r=n,i=s}return a.push({end:1/0,start:r,value:i}),a}function oL(e){return e===iL}function sL(e,t){if(!oL(e))return t===e.k?e.v:t<e.k?sL(e.l,t):sL(e.r,t)}function cL(e,t,n=`k`){if(oL(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){let r=cL(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return cL(e.l,t,n)}function lL(e,t,n){return oL(e)?bL(t,n,1):t===e.k?gL(e,{k:t,v:n}):t<e.k?xL(gL(e,{l:lL(e.l,t,n)})):xL(gL(e,{r:lL(e.r,t,n)}))}function uL(){return iL}function dL(e,t,n){if(oL(e))return[];let r=cL(e,t)[0];return wL(mL(e,r,n))}function fL(e,t){if(oL(e))return iL;let{k:n,l:r,r:i}=e;if(t===n){if(oL(r))return i;if(oL(i))return r;let[t,n]=yL(r);return hL(gL(e,{k:t,l:_L(r),v:n}))}return hL(t<n?gL(e,{l:fL(r,t)}):gL(e,{r:fL(i,t)}))}function pL(e){return oL(e)?[]:[...pL(e.l),{k:e.k,v:e.v},...pL(e.r)]}function mL(e,t,n){if(oL(e))return[];let{k:r,l:i,r:a,v:o}=e,s=[];return r>t&&(s=s.concat(mL(i,t,n))),r>=t&&r<=n&&s.push({k:r,v:o}),r<=n&&(s=s.concat(mL(a,t,n))),s}function hL(e){let{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(vL(t))return SL(gL(e,{lvl:n-1}));if(!oL(t)&&!oL(t.r))return gL(t.r,{l:gL(t,{r:t.r.l}),lvl:n,r:gL(e,{l:t.r.r,lvl:n-1})});throw Error(`Unexpected empty nodes`)}if(vL(e))return CL(gL(e,{lvl:n-1}));if(!oL(r)&&!oL(r.l)){let t=r.l,i=vL(t)?r.lvl-1:r.lvl;return gL(t,{l:gL(e,{lvl:n-1,r:t.l}),lvl:t.lvl+1,r:CL(gL(r,{l:t.r,lvl:i}))})}throw Error(`Unexpected empty nodes`)}function gL(e,t){return bL(t.k===void 0?e.k:t.k,t.v===void 0?e.v:t.v,t.lvl===void 0?e.lvl:t.lvl,t.l===void 0?e.l:t.l,t.r===void 0?e.r:t.r)}function _L(e){return oL(e.r)?e.l:hL(gL(e,{r:_L(e.r)}))}function vL(e){return oL(e)||e.lvl>e.r.lvl}function yL(e){return oL(e.r)?[e.k,e.v]:yL(e.r)}function bL(e,t,n,r=iL,i=iL){return{k:e,l:r,lvl:n,r:i,v:t}}function xL(e){return CL(SL(e))}function SL(e){let{l:t}=e;return!oL(t)&&t.lvl===e.lvl?gL(t,{r:gL(e,{l:t.r})}):e}function CL(e){let{lvl:t,r:n}=e;return!oL(n)&&!oL(n.r)&&n.lvl===t&&n.r.lvl===t?gL(n,{l:gL(e,{r:n.l}),lvl:t+1}):e}function wL(e){return aL(e,({k:e,v:t})=>({index:e,value:t}))}function TL(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function EL(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}var DL=PI(()=>({recalcInProgress:H(!1)}),[],{singleton:!0});function OL(e,t,n){return e[kL(e,t,n)]}function kL(e,t,n,r=0){let i=e.length-1;for(;r<=i;){let a=Math.floor((r+i)/2),o=e[a],s=n(o,t);if(s===0)return a;if(s===-1){if(i-r<2)return a-1;i=a-1}else{if(i===r)return a;r=a+1}}throw Error(`Failed binary finding record in array - ${e.join(`,`)}, searched for ${t}`)}function AL(e,t,n,r){let i=kL(e,t,r),a=kL(e,n,r,i);return e.slice(i,a+1)}function jL(e,t){return Math.round(e.getBoundingClientRect()[t])}function ML(e){return!oL(e.groupOffsetTree)}function NL({index:e},t){return t===e?0:t<e?-1:1}function PL(){return{groupIndices:[],groupOffsetTree:uL(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:uL()}}function FL(e,t){let n=oL(e)?0:1/0;for(let r of t){let{endIndex:t,size:i,startIndex:a}=r;if(n=Math.min(n,a),oL(e)){e=lL(e,0,i);continue}let o=dL(e,a-1,t+1);if(o.some(qL(r)))continue;let s=!1,c=!1;for(let{end:n,start:r,value:a}of o)s?(t>=r||i===a)&&(e=fL(e,r)):(c=a!==i,s=!0),n>t&&t>=r&&a!==i&&(e=lL(e,t+1,a));c&&(e=lL(e,a,i))}return[e,n]}function IL(e){return typeof e.groupIndex<`u`}function LL({offset:e},t){return t===e?0:t<e?-1:1}function RL(e,t,n){if(t.length===0)return 0;let{index:r,offset:i,size:a}=OL(t,e,NL),o=e-r,s=a*o+(o-1)*n+i;return s>0?s+n:s}function zL(e,t){if(!ML(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function BL(e,t,n){if(IL(e))return t.groupIndices[e.groupIndex]+1;let r=zL(e.index===`LAST`?n:e.index,t);return r=Math.max(0,r,Math.min(n,r)),r}function VL(e,t,n,r=0){return r>0&&(t=Math.max(t,OL(e,r,NL).offset)),aL(AL(e,t,n,LL),KL)}function HL(e,[t,n,r,i]){t.length>0&&r(`received item sizes`,t,BI.DEBUG);let a=e.sizeTree,o=a,s=0;if(n.length>0&&oL(a)&&t.length===2){let e=t[0].size,r=t[1].size;o=n.reduce((t,n)=>lL(lL(t,n,e),n+1,r),o)}else [o,s]=FL(o,t);if(o===a)return e;let{lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d}=GL(e.offsetTree,s,o,i);return{groupIndices:n,groupOffsetTree:n.reduce((e,t)=>lL(e,t,RL(t,d,i)),uL()),lastIndex:c,lastOffset:l,lastSize:u,offsetTree:d,sizeTree:o}}function UL(e){return pL(e).map(({k:e,v:t},n,r)=>{let i=r[n+1];return{endIndex:i===void 0?1/0:i.k-1,size:t,startIndex:e}})}function WL(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function GL(e,t,n,r){let i=e,a=0,o=0,s=0,c=0;if(t!==0){c=kL(i,t-1,NL),s=i[c].offset;let e=cL(n,t-1);a=e[0],o=e[1],i.length&&i[c].size===cL(n,t)[1]&&--c,i=i.slice(0,c+1)}else i=[];for(let{start:e,value:c}of dL(n,t,1/0)){let t=e-a,n=t*o+s+t*r;i.push({index:e,offset:n,size:c}),a=e,s=n,o=c}return{lastIndex:a,lastOffset:s,lastSize:o,offsetTree:i}}function KL(e){return{index:e.index,value:e}}function qL(e){let{endIndex:t,size:n,startIndex:r}=e;return e=>e.start===r&&(e.end===t||e.end===1/0)&&e.value===n}var JL={offsetHeight:`height`,offsetWidth:`width`},YL=PI(([{log:e},{recalcInProgress:t}])=>{let n=MI(),r=MI(),i=jI(r,0),a=MI(),o=MI(),s=H(0),c=H([]),l=H(void 0),u=H(void 0),d=H(void 0),f=H(void 0),p=H((e,t)=>jL(e,JL[t])),m=H(void 0),h=H(0),g=PL(),_=jI(V(n,OI(c,e,h),TI(HL,g),CI()),g),v=jI(V(c,CI(),TI((e,t)=>({current:t,prev:e.current}),{current:[],prev:[]}),B(({prev:e})=>e)),[]);R(V(c,z(e=>e.length>0),OI(_,h),B(([e,t,n])=>{let r=e.reduce((e,r,i)=>lL(e,r,RL(r,t.offsetTree,n)||i),uL());return{...t,groupIndices:e,groupOffsetTree:r}})),_),R(V(r,OI(_),z(([e,{lastIndex:t}])=>e<t),B(([e,{lastIndex:t,lastSize:n}])=>[{endIndex:t,size:n,startIndex:e}])),n),R(l,u);let y=jI(V(l,B(e=>e===void 0)),!0);R(V(u,z(e=>e!==void 0&&oL(yI(_).sizeTree)),B(e=>{let t=yI(d),n=yI(c).length>0;return t!==void 0&&t!==0?n?[{endIndex:0,size:t,startIndex:0},{endIndex:1,size:e,startIndex:1}]:[]:[{endIndex:0,size:e,startIndex:0}]})),n),R(V(f,z(e=>e!==void 0&&e.length>0&&oL(yI(_).sizeTree)),B(e=>{let t=[],n=e[0],r=0;for(let i=1;i<e.length;i++){let a=e[i];a!==n&&(t.push({endIndex:i-1,size:n,startIndex:r}),n=a,r=i)}return t.push({endIndex:e.length-1,size:n,startIndex:r}),t})),n),R(V(c,OI(d,u),z(([,e,t])=>e!==void 0&&t!==void 0),B(([e,t,n])=>{let r=[];for(let i=0;i<e.length;i++){let a=e[i],o=e[i+1];r.push({startIndex:a,endIndex:a,size:t}),o!==void 0&&r.push({startIndex:a+1,endIndex:o-1,size:n})}return r})),n);let b=NI(V(n,OI(_),TI(({sizes:e},[t,n])=>({changed:n!==e,sizes:n}),{changed:!1,sizes:g}),B(e=>e.changed)));gI(V(s,TI((e,t)=>({diff:e.prev-t,prev:t}),{diff:0,prev:0}),B(e=>e.diff)),e=>{let{groupIndices:n}=yI(_);if(e>0)_I(t,!0),_I(a,e+WL(e,n));else if(e<0){let t=yI(v);t.length>0&&(e-=WL(-e,t)),_I(o,e)}}),gI(V(s,OI(e)),([e,t])=>{e<0&&t("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},BI.ERROR)});let x=NI(a);R(V(a,OI(_),B(([e,t])=>{let n=t.groupIndices.length>0,r=[],i=t.lastSize;if(n){let n=sL(t.sizeTree,0),a=0,o=0;for(;a<e;){let e=t.groupIndices[o],s=t.groupIndices.length===o+1?1/0:t.groupIndices[o+1]-e-1;r.push({endIndex:e,size:n,startIndex:e}),r.push({endIndex:e+1+s-1,size:i,startIndex:e+1}),o++,a+=s+1}let s=pL(t.sizeTree);return a!==e&&s.shift(),s.reduce((t,{k:n,v:r})=>{let i=t.ranges;return t.prevSize!==0&&(i=[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]),{prevIndex:n+e,prevSize:r,ranges:i}},{prevIndex:e,prevSize:0,ranges:r}).ranges}return pL(t.sizeTree).reduce((t,{k:n,v:r})=>({prevIndex:n+e,prevSize:r,ranges:[...t.ranges,{endIndex:n+e-1,size:t.prevSize,startIndex:t.prevIndex}]}),{prevIndex:0,prevSize:i,ranges:[]}).ranges})),n);let S=NI(V(o,OI(_,h),B(([e,{offsetTree:t},n])=>RL(-e,t,n))));return R(V(o,OI(_,h),B(([e,t,n])=>{if(t.groupIndices.length>0){if(oL(t.sizeTree))return t;let r=uL(),i=yI(v),a=0,o=0,s=0;for(;a<-e;){s=i[o];let e=i[o+1]-s-1;o++,a+=e+1}if(r=pL(t.sizeTree).reduce((t,{k:n,v:r})=>lL(t,Math.max(0,n+e),r),r),a!==-e){let n=sL(t.sizeTree,s);r=lL(r,0,n);let i=cL(t.sizeTree,-e+1)[1];r=lL(r,1,i)}return{...t,sizeTree:r,...GL(t.offsetTree,0,r,n)}}let r=pL(t.sizeTree).reduce((t,{k:n,v:r})=>lL(t,Math.max(0,n+e),r),uL());return{...t,sizeTree:r,...GL(t.offsetTree,0,r,n)}})),_),{beforeUnshiftWith:x,data:m,defaultItemSize:u,firstItemIndex:s,fixedItemSize:l,fixedGroupSize:d,gap:h,groupIndices:c,heightEstimates:f,itemSize:p,listRefresh:b,shiftWith:o,shiftWithOffset:S,sizeRanges:n,sizes:_,statefulTotalCount:i,totalCount:r,trackItemSizes:y,unshiftWith:a}},hI(UI,DL),{singleton:!0});function XL(e){return e.reduce((e,t)=>(e.groupIndices.push(e.totalCount),e.totalCount+=t+1,e),{groupIndices:[],totalCount:0})}var ZL=PI(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:i}])=>{let a=MI(),o=MI(),s=NI(V(a,B(XL)));return R(V(s,B(e=>e.totalCount)),n),R(V(s,B(e=>e.groupIndices)),e),R(V(LI(i,t,r),z(([e,t])=>ML(t)),B(([e,t,n])=>cL(t.groupOffsetTree,Math.max(e-n,0),`v`)[0]),CI(),B(e=>[e])),o),{groupCounts:a,topItemsIndexes:o}},hI(YL,rL)),QL=PI(([{log:e}])=>{let t=H(!1),n=NI(V(t,z(e=>e),CI()));return gI(t,t=>{t&&yI(e)(`props updated`,{},BI.DEBUG)}),{didMount:n,propsReady:t}},hI(UI),{singleton:!0}),$L=typeof document<`u`&&`scrollBehavior`in document.documentElement.style;function eR(e){let t=typeof e==`number`?{index:e}:e;return t.align||=`start`,(!t.behavior||!$L)&&(t.behavior=`auto`),t.offset===void 0&&(t.offset=0),t}var tR=PI(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:i,fixedHeaderHeight:a,footerHeight:o,headerHeight:s,scrollingInProgress:c,scrollTo:l,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{let p=MI(),m=MI(),h=H(0),g=null,_=null,v=null;function y(){g!==null&&(g(),g=null),v!==null&&(v(),v=null),_&&=(clearTimeout(_),null),_I(c,!1)}return R(V(p,OI(n,d,r,h,s,o,f),OI(e,a,i),B(([[e,n,r,i,a,o,s,l],d,f,h])=>{let b=eR(e),{align:x,behavior:S,offset:C}=b,w=i-1,T=BL(b,n,w),E=RL(T,n.offsetTree,d)+o;x===`end`?(E+=f+cL(n.sizeTree,T)[1]-r+h,T===w&&(E+=s)):x===`center`?E+=(f+cL(n.sizeTree,T)[1]-r+h)/2:E-=a,C!==void 0&&C!==0&&(E+=C);let D=t=>{y(),t?(l(`retrying to scroll to`,{location:e},BI.DEBUG),_I(p,e)):(_I(m,!0),l(`list did not change, scroll successful`,{},BI.DEBUG))};if(y(),S===`smooth`){let e=!1;v=gI(t,t=>{e||=t}),g=bI(u,()=>{D(e)})}else g=bI(V(t,nR(150)),D);return _=setTimeout(()=>{y()},1200),_I(c,!0),l(`scrolling from index to`,{behavior:S,index:T,top:E},BI.DEBUG),{behavior:S,top:E}})),l),{scrollTargetReached:m,scrollToIndex:p,topListHeight:h}},hI(YL,rL,UI),{singleton:!0});function nR(e){return t=>{let n=setTimeout(()=>{t(!1)},e);return e=>{e&&(t(!0),clearTimeout(n))}}}function rR(e,t){e===0?t():requestAnimationFrame(()=>{rR(e-1,t)})}function iR(e,t){let n=t-1;return typeof e==`number`?e:e.index===`LAST`?n:e.index}var aR=PI(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:i,scrollToIndex:a},{didMount:o}])=>{let s=H(!0),c=H(0),l=H(!0);return R(V(o,OI(c),z(([e,t])=>t!==0),wI(!1)),s),R(V(o,OI(c),z(([e,t])=>t!==0),wI(!1)),l),gI(V(LI(t,o),OI(s,n,e,l),z(([[,e],t,{sizeTree:n},r,i])=>e&&(!oL(n)||uI(r))&&!t&&!i),OI(c)),([,e])=>{bI(i,()=>{_I(l,!0)}),rR(4,()=>{bI(r,()=>{_I(s,!0)}),_I(a,e)})}),{initialItemFinalLocationReached:l,initialTopMostItemIndex:c,scrolledToInitialItem:s}},hI(YL,rL,tR,QL),{singleton:!0});function oR(e,t){return Math.abs(e-t)<1.01}var sR=`up`,cR=`down`,lR=`none`,uR={atBottom:!1,notAtBottomBecause:`NOT_SHOWING_LAST_ITEM`,state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},dR=0,fR=PI(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:i,viewportHeight:a}])=>{let o=H(!1),s=H(!0),c=MI(),l=MI(),u=H(4),d=H(dR),f=jI(V(zI(V(RI(i),EI(1),wI(!0)),V(RI(i),EI(1),wI(!1),xI(100))),CI()),!1),p=jI(V(zI(V(n,wI(!0)),V(n,wI(!1),xI(200))),CI()),!1);R(V(LI(RI(i),RI(d)),B(([e,t])=>e<=t),CI()),s),R(V(s,DI(50)),l);let m=NI(V(LI(r,RI(a),RI(t),RI(e),RI(u)),TI((e,[{scrollHeight:t,scrollTop:n},r,i,a,o])=>{let s=n+r-t>-o,c={scrollHeight:t,scrollTop:n,viewportHeight:r};if(s){let t,r;return n>e.state.scrollTop?(t=`SCROLLED_DOWN`,r=e.state.scrollTop-n):(t=`SIZE_DECREASED`,r=e.state.scrollTop-n||e.scrollTopDelta),{atBottom:!0,atBottomBecause:t,scrollTopDelta:r,state:c}}let l;return l=c.scrollHeight>e.state.scrollHeight?`SIZE_INCREASED`:r<e.state.viewportHeight?`VIEWPORT_HEIGHT_DECREASING`:n<e.state.scrollTop?`SCROLLING_UPWARDS`:`NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM`,{atBottom:!1,notAtBottomBecause:l,state:c}},uR),CI((e,t)=>e!==void 0&&e.atBottom===t.atBottom))),h=jI(V(r,TI((e,{scrollHeight:t,scrollTop:n,viewportHeight:r})=>{if(!oR(e.scrollHeight,t)){let i=t-(n+r)<1;return e.scrollTop!==n&&i?{changed:!0,jump:e.scrollTop-n,scrollHeight:t,scrollTop:n}:{changed:!0,jump:0,scrollHeight:t,scrollTop:n}}return{changed:!1,jump:0,scrollHeight:t,scrollTop:n}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),z(e=>e.changed),B(e=>e.jump)),0);R(V(m,B(e=>e.atBottom)),o),R(V(o,DI(50)),c);let g=H(cR);R(V(r,B(({scrollTop:e})=>e),CI(),TI((e,t)=>yI(p)?{direction:e.direction,prevScrollTop:t}:{direction:t<e.prevScrollTop?sR:cR,prevScrollTop:t},{direction:cR,prevScrollTop:0}),B(e=>e.direction)),g),R(V(r,DI(50),wI(lR)),g);let _=H(0);return R(V(f,z(e=>!e),wI(0)),_),R(V(i,DI(100),OI(f),z(([e,t])=>t),TI(([e,t],[n])=>[t,n],[0,0]),B(([e,t])=>t-e)),_),{atBottomState:m,atBottomStateChange:c,atBottomThreshold:u,atTopStateChange:l,atTopThreshold:d,isAtBottom:o,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:g,scrollVelocity:_}},hI(rL)),pR=`top`,mR=`bottom`,hR=`none`;function gR(e,t,n){return typeof e==`number`?n===sR&&t===pR||n===cR&&t===mR?e:0:n===sR?t===pR?e.main:e.reverse:t===mR?e.main:e.reverse}function _R(e,t){return typeof e==`number`?e:e[t]??0}var vR=PI(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:i}])=>{let a=MI(),o=H(0),s=H(0),c=H(0);return{increaseViewportBy:s,listBoundary:a,overscan:c,topListHeight:o,visibleRange:jI(V(LI(RI(r),RI(i),RI(n),RI(a,EL),RI(c),RI(o),RI(t),RI(e),RI(s)),B(([e,t,n,[r,i],a,o,s,c,l])=>{let u=e-c,d=o+s,f=Math.max(n-u,0),p=hR,m=_R(l,pR),h=_R(l,mR);return r-=c,r+=n+s,i+=n+s,i-=c,r>e+d-m&&(p=sR),i<e-f+t+h&&(p=cR),p===hR?null:[Math.max(u-n-gR(a,pR,p)-m,0),u-f-s+t+gR(a,mR,p)+h]}),z(e=>e!==null),CI(EL)),[0,0])}},hI(rL),{singleton:!0});function yR(e,t,n){if(ML(t)){let r=zL(e,t);return[{index:cL(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}var bR={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function xR(e,t,n,r,i,a){let{lastIndex:o,lastOffset:s,lastSize:c}=i,l=0,u=0;if(e.length>0){l=e[0].offset;let t=e[e.length-1];u=t.offset+t.size}let d=n-o,f=s+d*c+(d-1)*r,p=l,m=f-u;return{bottom:u,firstItemIndex:a,items:CR(e,i,a),offsetBottom:m,offsetTop:l,top:p,topItems:CR(t,i,a),topListHeight:t.reduce((e,t)=>t.size+e,0),totalCount:n}}function SR(e,t,n,r,i,a){let o=0;if(n.groupIndices.length>0)for(let t of n.groupIndices){if(t-o>=e)break;o++}let s=e+o,c=iR(t,s);return xR(Array.from({length:s}).map((e,t)=>({data:a[t+c],index:t+c,offset:0,size:0})),[],s,i,n,r)}function CR(e,t,n){if(e.length===0)return[];if(!ML(t))return e.map(e=>({...e,index:e.index+n,originalIndex:e.index}));let r=e[0].index,i=e[e.length-1].index,a=[],o=dL(t.groupOffsetTree,r,i),s,c=0;for(let r of e){(!s||s.end<r.index)&&(s=o.shift(),c=t.groupIndices.indexOf(s.start));let e;e=r.index===s.start?{index:c,type:`group`}:{groupIndex:c,index:r.index-(c+1)+n},a.push({...e,data:r.data,offset:r.offset,originalIndex:r.index,size:r.size})}return a}function wR(e,t){return e===void 0?0:typeof e==`number`?e:e[t]??0}var TR=PI(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:i},a,{listBoundary:o,topListHeight:s,visibleRange:c},{initialTopMostItemIndex:l,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:m}])=>{let h=H([]),g=H(0),_=MI(),v=H(0);R(a.topItemsIndexes,h);let y=jI(V(LI(p,m,RI(c,EL),RI(i),RI(r),RI(l),u,RI(h),RI(t),RI(n),RI(v),e),z(([e,t,,n,,,,,,,,r])=>{let i=r!==void 0&&r.length!==n;return e&&!t&&!i}),B(([,,[e,t],n,r,i,a,o,s,c,l,u])=>{let d=r,{offsetTree:f,sizeTree:p}=d,m=yI(g);if(n===0)return{...bR,totalCount:n};if(e===0&&t===0)return m===0?{...bR,totalCount:n}:SR(m,i,r,s,c,u||[]);if(oL(p))return m>0?null:xR(yR(iR(i,n),d,u),[],n,c,d,s);let h=[];if(o.length>0){let e=o[0],t=o[o.length-1],n=0;for(let r of dL(p,e,t)){let i=r.value,a=Math.max(r.start,e),o=Math.min(r.end,t);for(let e=a;e<=o;e++)h.push({data:u?.[e],index:e,offset:n,size:i}),n+=i}}if(!a)return xR([],h,n,c,d,s);let _=o.length>0?o[o.length-1]+1:0,v=VL(f,e,t,_);if(v.length===0)return null;let y=n-1,b=pI([],n=>{for(let r of v){let i=r.value,a=i.offset,o=r.start,s=i.size;if(i.offset<e){o+=Math.floor((e-i.offset+c)/(s+c));let t=o-r.start;a+=t*s+t*c}o<_&&(a+=(_-o)*s,o=_);let l=Math.min(r.end,y);for(let e=o;e<=l&&!(a>=t);e++)n.push({data:u?.[e],index:e,offset:a,size:s}),a+=s+c}}),x=wR(l,pR),S=wR(l,mR);if(b.length>0&&(x>0||S>0)){let e=b[0],t=b[b.length-1];if(x>0&&e.index>_){let t=Math.min(x,e.index-_),n=[],r=e.offset;for(let i=e.index-1;i>=e.index-t;i--){let t=dL(p,i,i)[0]?.value??e.size;r-=t+c,n.unshift({data:u?.[i],index:i,offset:r,size:t})}b.unshift(...n)}if(S>0&&t.index<y){let e=Math.min(S,y-t.index),n=t.offset+t.size+c;for(let r=t.index+1;r<=t.index+e;r++){let e=dL(p,r,r)[0]?.value??t.size;b.push({data:u?.[r],index:r,offset:n,size:e}),n+=e+c}}}return xR(b,h,n,c,d,s)}),z(e=>e!==null),CI()),bR);R(V(e,z(uI),B(e=>e?.length)),i),R(V(y,B(e=>e.topListHeight)),d),R(d,s),R(V(y,B(e=>[e.top,e.bottom])),o),R(V(y,B(e=>e.items)),_);let b=NI(V(y,z(({items:e})=>e.length>0),OI(i,e),z(([{items:e},t])=>e[e.length-1].originalIndex===t-1),B(([,e,t])=>[e-1,t]),CI(EL),B(([e])=>e))),x=NI(V(y,DI(200),z(({items:e,topItems:t})=>e.length>0&&e[0].originalIndex===t.length),B(({items:e})=>e[0].index),CI()));return{endReached:b,initialItemCount:g,itemsRendered:_,listState:y,minOverscanItemCount:v,rangeChanged:NI(V(y,z(({items:e})=>e.length>0),B(({items:e})=>{let t=0,n=e.length-1;for(;e[t].type===`group`&&t<n;)t++;for(;e[n].type===`group`&&n>t;)n--;return{endIndex:e[n].index,startIndex:e[t].index}}),CI(TL))),startReached:x,topItemsIndexes:h,...f}},hI(YL,ZL,vR,aR,tR,fR,QL,DL),{singleton:!0}),ER=PI(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:i}])=>{let a=MI(),o=jI(V(LI(n,e,r,t,i),B(([e,t,n,r,i])=>e+t+n+r+i.offsetBottom+i.bottom)),0);return R(RI(o),a),{totalListHeight:o,totalListHeightChanged:a}},hI(rL,TR),{singleton:!0}),DR=PI(([{viewportHeight:e},{totalListHeight:t}])=>{let n=H(!1);return{alignToBottom:n,paddingTopAddition:jI(V(LI(n,e,t),z(([e])=>e),B(([,e,t])=>Math.max(0,e-t)),DI(0),CI()),0)}},hI(rL,ER),{singleton:!0}),OR=PI(()=>({context:H(null)})),kR=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...i},viewportBottom:a,viewportTop:o})=>t<o?{...i,align:n??`start`,...r===void 0?{}:{behavior:r}}:e>a?{...i,align:n??`end`,...r===void 0?{}:{behavior:r}}:null,AR=PI(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,headerHeight:a,scrollingInProgress:o,scrollTop:s,viewportHeight:c},{scrollToIndex:l}])=>{let u=MI();return R(V(u,OI(t,c,n,a,i,r,s),OI(e),B(([[e,t,n,r,i,a,s,c],l])=>{let{calculateViewLocation:u=kR,done:d,...f}=e,p=BL(e,t,r-1),m=RL(p,t.offsetTree,l)+i+a,h=m+cL(t.sizeTree,p)[1],g=c+a,_=u({itemBottom:h,itemTop:m,locationParams:f,viewportBottom:c+n-s,viewportTop:g});return _===null?d?.():d&&bI(V(o,z(e=>!e),EI(yI(o)?1:2)),d),_}),z(e=>e!==null)),l),{scrollIntoView:u}},hI(YL,rL,tR,TR,UI),{singleton:!0});function jR(e){return e===!1?!1:e===`smooth`?`smooth`:`auto`}var MR=(e,t)=>typeof e==`function`?jR(e(t)):t&&jR(e),NR=PI(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:i,isAtBottom:a},{scrollToIndex:o},{scrolledToInitialItem:s},{didMount:c,propsReady:l},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{let m=H(!1),h=MI(),g=null;function _(e){_I(o,{align:`end`,behavior:e,index:`LAST`})}gI(V(LI(V(RI(t),EI(1)),c),OI(RI(m),a,s,d),B(([[e,t],n,r,i,a])=>{let o=t&&i,s=`auto`;return o&&(s=MR(n,r||a),o&&=s!==!1),{followOutputBehavior:s,shouldFollow:o,totalCount:e}}),z(({shouldFollow:e})=>e)),({followOutputBehavior:t,totalCount:r})=>{g!==null&&(g(),g=null),yI(n)===void 0?g=bI(e,()=>{yI(u)(`following output to `,{totalCount:r},BI.DEBUG),_(t),g=null}):requestAnimationFrame(()=>{yI(u)(`following output to `,{totalCount:r},BI.DEBUG),_(t)})});function v(e){let t=bI(i,t=>{e&&!t.atBottom&&t.notAtBottomBecause===`SIZE_INCREASED`&&g===null&&(yI(u)(`scrolling to bottom due to increased size`,{},BI.DEBUG),_(`auto`))});setTimeout(t,100)}gI(V(LI(RI(m),t,l),z(([e,,t])=>e!==!1&&t),TI(({value:e},[,t])=>({refreshed:e===t,value:t}),{refreshed:!1,value:0}),z(({refreshed:e})=>e),OI(m,t)),([,e])=>{yI(s)&&v(e!==!1)}),gI(h,()=>{v(yI(m)!==!1)}),gI(LI(RI(m),i),([e,t])=>{e!==!1&&!t.atBottom&&t.notAtBottomBecause===`VIEWPORT_HEIGHT_DECREASING`&&_(`auto`)});let y=H(null),b=MI();return R(zI(V(RI(r),B(e=>e?.length??0)),V(RI(t))),b),gI(V(LI(V(b,EI(1)),c),OI(RI(y),s,d,f),B(([[e,t],n,r,i,a])=>t&&r&&n?.({context:a,totalCount:e,scrollingInProgress:i})),z(e=>!!e),DI(0)),t=>{g!==null&&(g(),g=null),yI(n)===void 0?g=bI(e,()=>{yI(u)(`scrolling into view`,{}),_I(p,t),g=null}):requestAnimationFrame(()=>{yI(u)(`scrolling into view`,{}),_I(p,t)})}),{autoscrollToBottom:h,followOutput:m,scrollIntoViewOnChange:y}},hI(YL,fR,tR,aR,QL,UI,rL,OR,AR)),PR=PI(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:i},{initialItemCount:a,listState:o},{didMount:s}])=>(R(V(s,OI(a),z(([,e])=>e!==0),OI(i,r,t,n,e),B(([[,e],t,n,r,i,a=[]])=>SR(e,t,n,r,i,a))),o),{}),hI(YL,aR,TR,QL),{singleton:!0}),FR=PI(([{didMount:e},{scrollTo:t},{listState:n}])=>{let r=H(0);return gI(V(e,OI(r),z(([,e])=>e!==0),B(([,e])=>({top:e}))),e=>{bI(V(n,EI(1),z(e=>e.items.length>1)),()=>{requestAnimationFrame(()=>{_I(t,e)})})}),{initialScrollTop:r}},hI(QL,rL,TR),{singleton:!0}),IR=PI(([{scrollVelocity:e}])=>{let t=H(!1),n=MI(),r=H(!1);return R(V(e,OI(r,t,n),z(([e,t])=>t!==!1&&t!==void 0),B(([e,t,n,r])=>{let{enter:i,exit:a}=t;if(n){if(a(e,r))return!1}else if(i(e,r))return!0;return n}),CI()),t),gI(V(LI(t,e,n),OI(r)),([[e,t,n],r])=>{e&&r!==!1&&r!==void 0&&r.change&&r.change(t,n)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},hI(fR),{singleton:!0}),LR=PI(([{scrollContainerState:e,scrollTo:t}])=>{let n=MI(),r=MI(),i=MI(),a=H(!1),o=H(void 0);return R(V(LI(n,r),B(([{scrollTop:e,viewportHeight:t},{offsetTop:n,listHeight:r}])=>({scrollHeight:r,scrollTop:Math.max(0,e-n),viewportHeight:t}))),e),R(V(t,OI(r),B(([e,{offsetTop:t}])=>({...e,top:e.top+t}))),i),{customScrollParent:o,useWindowScroll:a,windowScrollContainerState:n,windowScrollTo:i,windowViewportRect:r}},hI(rL)),RR=PI(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:i},{didMount:a},{useWindowScroll:o,windowScrollContainerState:s,windowViewportRect:c}])=>{let l=MI(),u=H(void 0),d=H(null),f=H(null);return R(s,d),R(c,f),gI(V(l,OI(t,r,o,d,f,n)),([e,t,n,r,i,a,o])=>{let s=UL(t.sizeTree);r&&i!==null&&a!==null&&(n=i.scrollTop-a.offsetTop),n-=o,e({ranges:s,scrollTop:n})}),R(V(u,z(uI),B(zR)),i),R(V(a,OI(u),z(([,e])=>e!==void 0),CI(),B(([,e])=>e.ranges)),e),{getState:l,restoreStateFrom:u}},hI(YL,rL,aR,QL,LR));function zR(e){return{align:`start`,index:0,offset:e.scrollTop}}var BR=PI(([{topItemsIndexes:e}])=>{let t=H(0);return R(V(t,z(e=>e>=0),B(e=>Array.from({length:e}).map((e,t)=>t))),e),{topItemCount:t}},hI(TR));function VR(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}var HR=VR(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),UR=PI(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:i,gap:a,groupIndices:o,heightEstimates:s,itemSize:c,sizeRanges:l,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g},_,v,y,b,{scrollToIndex:x},S,{topItemCount:C},{groupCounts:w},T])=>{let{listState:E,minOverscanItemCount:D,topItemsIndexes:O,rangeChanged:ee,...te}=b;return R(ee,T.scrollSeekRangeChanged),R(V(T.windowViewportRect,B(e=>e.visibleHeight)),_.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:i,gap:a,groupCounts:w,heightEstimates:s,initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:g,sizeRanges:l,topItemCount:C,topItemsIndexes:O,totalCount:f,...y,groupIndices:o,itemSize:c,listState:E,minOverscanItemCount:D,scrollToIndex:x,statefulTotalCount:d,trackItemSizes:p,rangeChanged:ee,...te,...T,..._,sizes:u,...v}},hI(YL,aR,rL,RR,NR,TR,tR,PI(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:i,isScrolling:a,lastJumpDueToItemResize:o,scrollDirection:s},{listState:c},{beforeUnshiftWith:l,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:m}])=>{let h=NI(V(c,OI(o),TI(([,e,t,n],[{bottom:r,items:i,offsetBottom:a,totalCount:o},s])=>{let c=r+a,l=0;return t===o&&e.length>0&&i.length>0&&(i[0].originalIndex===0&&e[0].originalIndex===0||(l=c-n,l!==0&&(l+=s))),[l,i,o,c]},[0,[],0,0]),z(([e])=>e!==0),OI(r,s,n,i,p,m),z(([,e,t,n,,,r])=>!r&&!n&&e!==0&&t===sR),B(([[e],,,,,t])=>(t(`Upward scrolling compensation`,{amount:e},BI.DEBUG),e))));function g(n){n>0?(_I(t,{behavior:`auto`,top:-n}),_I(e,0)):(_I(e,0),_I(t,{behavior:`auto`,top:-n}))}return gI(V(h,OI(e,a)),([t,n,r])=>{r&&HR()?_I(e,n-t):g(-t)}),gI(V(LI(jI(a,!1),e,m),z(([e,t,n])=>!e&&!n&&t!==0),B(([e,t])=>t),DI(1)),g),R(V(d,B(e=>({top:-e}))),t),gI(V(l,OI(f,u),B(([e,{groupIndices:t,lastSize:n,sizeTree:r},i])=>{function a(e){return e*(n+i)}if(t.length===0)return a(e);let o=0,s=sL(r,0),c=0,l=0;for(;c<e;){c++,o+=s;let n=t.length===l+1?1/0:t[l+1]-t[l]-1;c+n>e&&(o-=s,n=e-c+1),c+=n,o+=a(n),l++}return o})),n=>{_I(e,n),requestAnimationFrame(()=>{_I(t,{top:n}),requestAnimationFrame(()=>{_I(e,0),_I(m,!1)})})}),{deviation:e}},hI(rL,fR,TR,YL,UI,DL)),BR,ZL,PI(([e,t,n,r,i,a,o,s,c,l,u])=>({...e,...t,...n,...r,...i,...a,...o,...s,...c,...l,...u}),hI(vR,PR,QL,IR,ER,FR,DR,LR,AR,UI,OR))));function WR(e,t){let n={},r={},i=0,a=e.length;for(;i<a;)r[e[i]]=1,i+=1;for(let e in t)Object.hasOwn(r,e)||(n[e]=t[e]);return n}var GR=typeof document<`u`?j.useLayoutEffect:j.useEffect;function KR(e,t,n){let r=Object.keys(t.required||{}),i=Object.keys(t.optional||{}),a=Object.keys(t.methods||{}),o=Object.keys(t.events||{}),s=j.createContext({});function c(e,n){e.propsReady!==void 0&&_I(e.propsReady,!1);for(let i of r){let r=e[t.required[i]];_I(r,n[i])}for(let r of i)if(r in n){let i=e[t.optional[r]];_I(i,n[r])}e.propsReady!==void 0&&_I(e.propsReady,!0)}function l(e){return a.reduce((n,r)=>(n[r]=n=>{let i=e[t.methods[r]];_I(i,n)},n),{})}function u(e){return o.reduce((n,r)=>(n[r]=AI(e[t.events[r]]),n),{})}return{Component:j.forwardRef(function(t,a){let{children:d,...f}=t,[p]=j.useState(()=>pI(II(e),e=>{c(e,f)})),[m]=j.useState(cI(u,p));GR(()=>{for(let e of o)e in f&&gI(m[e],f[e]);return()=>{Object.values(m).map(vI)}},[f,m,p]),GR(()=>{c(p,f)}),j.useImperativeHandle(a,aI(l(p)));let h=n;return(0,M.jsx)(s.Provider,{value:p,children:n===void 0?d:(0,M.jsx)(h,{...WR([...r,...i,...o],f),children:d})})}),useEmitter:(e,t)=>{let n=j.useContext(s)[e];GR(()=>gI(n,t),[t,n])},useEmitterValue:e=>{let t=j.useContext(s)[e],n=j.useCallback(e=>gI(t,e),[t]);return j.useSyncExternalStore(n,()=>yI(t),()=>yI(t))},usePublisher:e=>{let t=j.useContext(s);return j.useCallback(n=>{_I(t[e],n)},[t,e])}}}var qR=j.createContext(void 0),JR=j.createContext(void 0),YR=`-webkit-sticky`,XR=`sticky`,ZR=VR(()=>{if(typeof document>`u`)return XR;let e=document.createElement(`div`);return e.style.position=YR,e.style.position===YR?YR:XR}),QR=typeof document<`u`?j.useLayoutEffect:j.useEffect;function $R(e){return`self`in e}function ez(e){return`body`in e}function tz(e,t,n,r=fI,i,a){let o=j.useRef(null),s=j.useRef(null),c=j.useRef(null),l=j.useCallback(n=>{let r,i,o,l=n.target;if(ez(l)||$R(l)){let e=$R(l)?l:l.defaultView;o=a===!0?YI(e,e.scrollX):e.scrollY,r=a===!0?e.document.documentElement.scrollWidth:e.document.documentElement.scrollHeight,i=a===!0?e.innerWidth:e.innerHeight}else o=a===!0?YI(l,l.scrollLeft):l.scrollTop,r=a===!0?l.scrollWidth:l.scrollHeight,i=a===!0?l.offsetWidth:l.offsetHeight;let u=()=>{e({scrollHeight:r,scrollTop:Math.max(o,0),viewportHeight:i})};n.suppressFlushSync===!0?u():tf.flushSync(u),s.current!==null&&(o===s.current||o<=0||o===r-i)&&(s.current=null,t(!0),c.current&&=(clearTimeout(c.current),null))},[e,t,a]);j.useEffect(()=>{let e=i||o.current;return qI(e),r(i||o.current),l({suppressFlushSync:!0,target:e}),e.addEventListener(`scroll`,l,{passive:!0}),()=>{qI(e),r(null),e.removeEventListener(`scroll`,l)}},[o,l,n,r,i]);function u(n){let r=o.current;if(!r||(a===!0?`offsetWidth`in r&&r.offsetWidth===0:`offsetHeight`in r&&r.offsetHeight===0))return;let i=n.behavior===`smooth`,l,u,d;$R(r)?(u=Math.max(jL(r.document.documentElement,a===!0?`width`:`height`),a===!0?r.document.documentElement.scrollWidth:r.document.documentElement.scrollHeight),l=a===!0?r.innerWidth:r.innerHeight,d=a===!0?YI(r,r.scrollX):r.scrollY):(u=r[a===!0?`scrollWidth`:`scrollHeight`],l=jL(r,a===!0?`width`:`height`),d=a===!0?YI(r,r.scrollLeft):r.scrollTop);let f=u-l;if(n.top===void 0){r.scrollTo(n);return}let p=Math.ceil(Math.max(Math.min(f,n.top),0));if(n.top=p,oR(l,u)||p===d){e({scrollHeight:u,scrollTop:d,viewportHeight:l}),i&&t(!0);return}i?(s.current=p,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,s.current=null,t(!0)},1e3)):s.current=null,a===!0&&(n={...n.behavior===void 0?{}:{behavior:n.behavior},left:XI(r,p)}),r.scrollTo(n)}function d(e){a===!0&&(e={...e.behavior===void 0?{}:{behavior:e.behavior},...e.top===void 0?{}:{left:XI(o.current,e.top)}}),o.current.scrollBy(e)}return{scrollByCallback:d,scrollerRef:o,scrollToCallback:u}}function nz(e){return e}var rz=PI(([e,t])=>({...e,...t}),hI(UR,PI(()=>{let e=H(e=>`Item ${e}`),t=H(e=>`Group ${e}`),n=H({}),r=H(nz),i=H(`div`),a=H(fI),o=(e,t=null)=>jI(V(n,B(t=>t[e]),CI()),t);return{components:n,computeItemKey:r,EmptyPlaceholder:o(`EmptyPlaceholder`),FooterComponent:o(`Footer`),GroupComponent:o(`Group`,`div`),groupContent:t,HeaderComponent:o(`Header`),HeaderFooterTag:i,ItemComponent:o(`Item`,`div`),itemContent:e,ListComponent:o(`List`,`div`),ScrollerComponent:o(`Scroller`,`div`),scrollerRef:a,ScrollSeekPlaceholder:o(`ScrollSeekPlaceholder`),TopItemListComponent:o(`TopItemList`)}}))),iz=({height:e})=>(0,M.jsx)(`div`,{style:{height:e}}),az={overflowAnchor:`none`,position:ZR(),zIndex:1},oz={overflowAnchor:`none`},sz={...oz,display:`inline-block`,height:`100%`},cz=j.memo(function({showTopList:e=!1}){let t=Tz(`listState`),n=Ez(`sizeRanges`),r=Tz(`useWindowScroll`),i=Tz(`customScrollParent`),a=Ez(`windowScrollContainerState`),o=Ez(`scrollContainerState`),s=i||r?a:o,c=Tz(`itemContent`),l=Tz(`context`),u=Tz(`groupContent`),d=Tz(`trackItemSizes`),f=Tz(`itemSize`),p=Tz(`log`),m=Ez(`gap`),h=Tz(`horizontalDirection`),{callbackRef:g}=$I(n,f,d,e?fI:s,p,m,i,h,Tz(`skipAnimationFrameInResizeObserver`)),[_,v]=j.useState(0);wz(`deviation`,e=>{_!==e&&v(e)});let y=Tz(`EmptyPlaceholder`),b=Tz(`ScrollSeekPlaceholder`)??iz,x=Tz(`ListComponent`),S=Tz(`ItemComponent`),C=Tz(`GroupComponent`),w=Tz(`computeItemKey`),T=Tz(`isSeeking`),E=Tz(`groupIndices`).length>0,D=Tz(`alignToBottom`),O=Tz(`initialItemFinalLocationReached`),ee=e?{}:{boxSizing:`border-box`,...h?{display:`inline-block`,height:`100%`,marginInlineStart:_===0?D?`auto`:0:_,paddingInlineEnd:t.offsetBottom,paddingInlineStart:t.offsetTop,whiteSpace:`nowrap`}:{marginTop:_===0?D?`auto`:0:_,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...O?{}:{visibility:`hidden`}};return!e&&t.totalCount===0&&y!=null?(0,M.jsx)(y,{...mz(y,l)}):(0,M.jsx)(x,{...mz(x,l),"data-testid":e?`virtuoso-top-item-list`:`virtuoso-item-list`,ref:g,style:ee,children:(e?t.topItems:t.items).map(e=>{let n=e.originalIndex,r=w(n+t.firstItemIndex,e.data,l);return T?(0,j.createElement)(b,{...mz(b,l),height:e.size,index:e.index,key:r,type:e.type||`item`,...e.type===`group`?{}:{groupIndex:e.groupIndex}}):e.type===`group`?(0,j.createElement)(C,{...mz(C,l),"data-index":n,"data-item-index":e.index,"data-known-size":e.size,key:r,style:az},u(e.index,l)):(0,j.createElement)(S,{...mz(S,l),...hz(S,e.data),"data-index":n,"data-item-group-index":e.groupIndex,"data-item-index":e.index,"data-known-size":e.size,key:r,style:h?sz:oz},E?c(e.index,e.groupIndex,e.data,l):c(e.index,e.data,l))})})}),lz={height:`100%`,outline:`none`,overflowY:`auto`,position:`relative`,WebkitOverflowScrolling:`touch`},uz={outline:`none`,overflowX:`auto`,position:`relative`},dz=e=>({height:`100%`,position:`absolute`,top:0,width:`100%`,...e?{display:`flex`,flexDirection:`column`}:void 0}),fz=(e,t,n=0)=>({...dz(e),position:t?`relative`:`absolute`,top:t?-n:0}),pz={position:ZR(),top:0,width:`100%`,zIndex:1};function mz(e,t){if(typeof e!=`string`)return{context:t}}function hz(e,t){return{item:typeof e==`string`?void 0:t}}var gz=j.memo(function(){let e=Tz(`HeaderComponent`),t=Ez(`headerHeight`),n=Tz(`HeaderFooterTag`),r=ZI(j.useMemo(()=>e=>{t(jL(e,`height`))},[t]),!0,Tz(`skipAnimationFrameInResizeObserver`)),i=Tz(`context`);return e==null?null:(0,M.jsx)(n,{ref:r,children:(0,M.jsx)(e,{...mz(e,i)})})}),_z=j.memo(function(){let e=Tz(`FooterComponent`),t=Ez(`footerHeight`),n=Tz(`HeaderFooterTag`),r=ZI(j.useMemo(()=>e=>{t(jL(e,`height`))},[t]),!0,Tz(`skipAnimationFrameInResizeObserver`)),i=Tz(`context`);return e==null?null:(0,M.jsx)(n,{ref:r,children:(0,M.jsx)(e,{...mz(e,i)})})});function vz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return j.memo(function({children:r,style:i,context:a,...o}){let s=n(`scrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`scrollerRef`),d=t(`horizontalDirection`)||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:m}=tz(s,l,c,u,void 0,d);return e(`scrollTo`,m),e(`scrollBy`,f),(0,M.jsx)(c,{"data-testid":`virtuoso-scroller`,"data-virtuoso-scroller":!0,ref:p,style:{...d?uz:lz,...i},tabIndex:0,...o,...mz(c,a),children:r})})}function yz({useEmitter:e,useEmitterValue:t,usePublisher:n}){return j.memo(function({children:r,style:i,context:a,...o}){let s=n(`windowScrollContainerState`),c=t(`ScrollerComponent`),l=n(`smoothScrollTargetReached`),u=t(`totalListHeight`),d=t(`deviation`),f=t(`customScrollParent`),p=j.useRef(null),{scrollByCallback:m,scrollerRef:h,scrollToCallback:g}=tz(s,l,c,t(`scrollerRef`),f);return QR(()=>(h.current=f||p.current?.ownerDocument.defaultView,()=>{h.current=null}),[h,f]),e(`windowScrollTo`,g),e(`scrollBy`,m),(0,M.jsx)(c,{ref:p,"data-virtuoso-scroller":!0,style:{position:`relative`,...i,...u===0?void 0:{height:u+d}},...o,...mz(c,a),children:r})})}var bz=({children:e})=>{let t=j.useContext(qR),n=Ez(`viewportHeight`),r=Ez(`fixedItemHeight`),i=Tz(`alignToBottom`),a=Tz(`horizontalDirection`),o=ZI(j.useMemo(()=>sI(n,e=>jL(e,a?`width`:`height`)),[n,a]),!0,Tz(`skipAnimationFrameInResizeObserver`));return j.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,M.jsx)(`div`,{"data-viewport-type":`element`,ref:o,style:dz(i),children:e})},xz=({children:e})=>{let t=j.useContext(qR),n=Ez(`windowViewportRect`),r=Ez(`fixedItemHeight`),i=Tz(`customScrollParent`),a=Tz(`useWindowScroll`),o=Tz(`topListHeight`),s=nL(n,i,Tz(`skipAnimationFrameInResizeObserver`)),c=Tz(`alignToBottom`);return j.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,M.jsx)(`div`,{"data-viewport-type":`window`,ref:s,style:fz(c,a,o),children:e})},Sz=({children:e})=>{let t=Tz(`TopItemListComponent`)??`div`,n=Tz(`headerHeight`);return(0,M.jsx)(t,{style:{...pz,marginTop:`${n}px`},...mz(t,Tz(`context`)),children:e})},{Component:Cz,useEmitter:wz,useEmitterValue:Tz,usePublisher:Ez}=KR(rz,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,scrollIntoViewOnChange:`scrollIntoViewOnChange`,itemContent:`itemContent`,groupContent:`groupContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,groupCounts:`groupCounts`,topItemCount:`topItemCount`,firstItemIndex:`firstItemIndex`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,heightEstimates:`heightEstimates`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`HeaderFooterTag`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,horizontalDirection:`horizontalDirection`,skipAnimationFrameInResizeObserver:`skipAnimationFrameInResizeObserver`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,autoscrollToBottom:`autoscrollToBottom`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},j.memo(function(e){let t=Tz(`useWindowScroll`),n=Tz(`topItemsIndexes`).length>0,r=Tz(`customScrollParent`),i=Tz(`context`);return(0,M.jsxs)(r||t?Oz:Dz,{...e,context:i,children:[n&&(0,M.jsx)(Sz,{children:(0,M.jsx)(cz,{showTopList:!0})}),(0,M.jsxs)(r||t?xz:bz,{children:[(0,M.jsx)(gz,{}),(0,M.jsx)(cz,{}),(0,M.jsx)(_z,{})]})]})})),Dz=vz({useEmitter:wz,useEmitterValue:Tz,usePublisher:Ez}),Oz=yz({useEmitter:wz,useEmitterValue:Tz,usePublisher:Ez}),kz=Cz,Az=PI(([e,t])=>({...e,...t}),hI(UR,PI(()=>{let e=H(e=>(0,M.jsxs)(`td`,{children:[`Item $`,e]})),t=H(null),n=H(e=>(0,M.jsxs)(`td`,{colSpan:1e3,children:[`Group `,e]})),r=H(null),i=H(null),a=H({}),o=H(nz),s=H(fI),c=(e,t=null)=>jI(V(a,B(t=>t[e]),CI()),t);return{components:a,computeItemKey:o,context:t,EmptyPlaceholder:c(`EmptyPlaceholder`),FillerRow:c(`FillerRow`),fixedFooterContent:i,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`),TableBodyComponent:c(`TableBody`,`tbody`),TableComponent:c(`Table`,`table`),TableFooterComponent:c(`TableFoot`,`tfoot`),TableHeadComponent:c(`TableHead`,`thead`),TableRowComponent:c(`TableRow`,`tr`),GroupComponent:c(`Group`,`tr`)}}))),jz=({height:e})=>(0,M.jsx)(`tr`,{children:(0,M.jsx)(`td`,{style:{height:e}})}),Mz=({height:e})=>(0,M.jsx)(`tr`,{children:(0,M.jsx)(`td`,{style:{border:0,height:e,padding:0}})}),Nz={overflowAnchor:`none`},Pz={position:ZR(),zIndex:2,overflowAnchor:`none`},Fz=j.memo(function({showTopList:e=!1}){let t=Vz(`listState`),n=Vz(`computeItemKey`),r=Vz(`firstItemIndex`),i=Vz(`context`),a=Vz(`isSeeking`),o=Vz(`fixedHeaderHeight`),s=Vz(`groupIndices`).length>0,c=Vz(`itemContent`),l=Vz(`groupContent`),u=Vz(`ScrollSeekPlaceholder`)??jz,d=Vz(`GroupComponent`),f=Vz(`TableRowComponent`),p=(e?t.topItems:[]).reduce((e,t,n)=>(n===0?e.push(t.size):e.push(e[n-1]+t.size),e),[]);return(e?t.topItems:t.items).map(t=>{let m=t.originalIndex,h=n(m+r,t.data,i),g=e?m===0?0:p[m-1]:0;return a?(0,j.createElement)(u,{...mz(u,i),height:t.size,index:t.index,key:h,type:t.type||`item`}):t.type===`group`?(0,j.createElement)(d,{...mz(d,i),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,key:h,style:{...Pz,top:o}},l(t.index,i)):(0,j.createElement)(f,{...mz(f,i),...hz(f,t.data),"data-index":m,"data-item-index":t.index,"data-known-size":t.size,"data-item-group-index":t.groupIndex,key:h,style:e?{...Pz,top:o+g}:Nz},s?c(t.index,t.groupIndex,t.data,i):c(t.index,t.data,i))})}),Iz=j.memo(function(){let e=Vz(`listState`),t=Vz(`topItemsIndexes`).length>0,n=Hz(`sizeRanges`),r=Vz(`useWindowScroll`),i=Vz(`customScrollParent`),a=Hz(`windowScrollContainerState`),o=Hz(`scrollContainerState`),s=i||r?a:o,c=Vz(`trackItemSizes`),{callbackRef:l,ref:u}=$I(n,Vz(`itemSize`),c,s,Vz(`log`),void 0,i,!1,Vz(`skipAnimationFrameInResizeObserver`)),[d,f]=j.useState(0);Bz(`deviation`,e=>{d!==e&&(u.current.style.marginTop=`${e}px`,f(e))});let p=Vz(`EmptyPlaceholder`),m=Vz(`FillerRow`)??Mz,h=Vz(`TableBodyComponent`),g=Vz(`paddingTopAddition`),_=Vz(`statefulTotalCount`),v=Vz(`context`);if(_===0&&p!=null)return(0,M.jsx)(p,{...mz(p,v)});let y=(t?e.topItems:[]).reduce((e,t)=>e+t.size,0),b=e.offsetTop+g+d-y,x=e.offsetBottom,S=b>0?(0,M.jsx)(m,{context:v,height:b},`padding-top`):null,C=x>0?(0,M.jsx)(m,{context:v,height:x},`padding-bottom`):null;return(0,M.jsxs)(h,{"data-testid":`virtuoso-item-list`,ref:l,...mz(h,v),children:[S,t&&(0,M.jsx)(Fz,{showTopList:!0}),(0,M.jsx)(Fz,{}),C]})}),Lz=({children:e})=>{let t=j.useContext(qR),n=Hz(`viewportHeight`),r=Hz(`fixedItemHeight`),i=ZI(j.useMemo(()=>sI(n,e=>jL(e,`height`)),[n]),!0,Vz(`skipAnimationFrameInResizeObserver`));return j.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),(0,M.jsx)(`div`,{"data-viewport-type":`element`,ref:i,style:dz(!1),children:e})},Rz=({children:e})=>{let t=j.useContext(qR),n=Hz(`windowViewportRect`),r=Hz(`fixedItemHeight`),i=Vz(`customScrollParent`),a=Vz(`useWindowScroll`),o=nL(n,i,Vz(`skipAnimationFrameInResizeObserver`));return j.useEffect(()=>{t&&(r(t.itemHeight),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),(0,M.jsx)(`div`,{"data-viewport-type":`window`,ref:o,style:fz(!1,a),children:e})},{Component:zz,useEmitter:Bz,useEmitterValue:Vz,usePublisher:Hz}=KR(Az,{optional:{restoreStateFrom:`restoreStateFrom`,context:`context`,followOutput:`followOutput`,firstItemIndex:`firstItemIndex`,itemContent:`itemContent`,groupContent:`groupContent`,fixedHeaderContent:`fixedHeaderContent`,fixedFooterContent:`fixedFooterContent`,overscan:`overscan`,increaseViewportBy:`increaseViewportBy`,minOverscanItemCount:`minOverscanItemCount`,totalCount:`totalCount`,topItemCount:`topItemCount`,initialTopMostItemIndex:`initialTopMostItemIndex`,components:`components`,groupCounts:`groupCounts`,atBottomThreshold:`atBottomThreshold`,atTopThreshold:`atTopThreshold`,computeItemKey:`computeItemKey`,defaultItemHeight:`defaultItemHeight`,fixedGroupHeight:`fixedGroupHeight`,fixedItemHeight:`fixedItemHeight`,itemSize:`itemSize`,scrollSeekConfiguration:`scrollSeekConfiguration`,data:`data`,initialItemCount:`initialItemCount`,initialScrollTop:`initialScrollTop`,alignToBottom:`alignToBottom`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`},methods:{scrollToIndex:`scrollToIndex`,scrollIntoView:`scrollIntoView`,scrollTo:`scrollTo`,scrollBy:`scrollBy`,getState:`getState`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,totalListHeightChanged:`totalListHeightChanged`,itemsRendered:`itemsRendered`,groupIndices:`groupIndices`}},j.memo(function(e){let t=Vz(`useWindowScroll`),n=Vz(`customScrollParent`),r=Hz(`fixedHeaderHeight`),i=Hz(`fixedFooterHeight`),a=Vz(`fixedHeaderContent`),o=Vz(`fixedFooterContent`),s=Vz(`context`),c=ZI(j.useMemo(()=>sI(r,e=>jL(e,`height`)),[r]),!0,Vz(`skipAnimationFrameInResizeObserver`)),l=ZI(j.useMemo(()=>sI(i,e=>jL(e,`height`)),[i]),!0,Vz(`skipAnimationFrameInResizeObserver`)),u=n||t?Wz:Uz,d=n||t?Rz:Lz,f=Vz(`TableComponent`),p=Vz(`TableHeadComponent`),m=Vz(`TableFooterComponent`),h=a?(0,M.jsx)(p,{ref:c,style:{position:`sticky`,top:0,zIndex:2},...mz(p,s),children:a()},`TableHead`):null,g=o?(0,M.jsx)(m,{ref:l,style:{bottom:0,position:`sticky`,zIndex:1},...mz(m,s),children:o()},`TableFoot`):null;return(0,M.jsx)(u,{...e,...mz(u,s),children:(0,M.jsx)(d,{children:(0,M.jsxs)(f,{style:{borderSpacing:0,overflowAnchor:`none`},...mz(f,s),children:[h,(0,M.jsx)(Iz,{},`TableBody`),g]})})})})),Uz=vz({useEmitter:Bz,useEmitterValue:Vz,usePublisher:Hz}),Wz=yz({useEmitter:Bz,useEmitterValue:Vz,usePublisher:Hz}),Gz=zz,Kz={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},qz={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Jz,floor:Yz,max:Xz,min:Zz,round:Qz}=Math;function $z(e,t,n){return Array.from({length:t-e+1}).map((t,r)=>({data:n===null?null:n[r+e],index:r+e}))}function eB(e){return{...qz,items:e}}function tB(e,t){return e!==void 0&&e.width===t.width&&e.height===t.height}function nB(e,t){return e!==void 0&&e.column===t.column&&e.row===t.row}var rB=PI(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:i,headerHeight:a,scrollBy:o,scrollContainerState:s,scrollTo:c,scrollTop:l,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:m,propsReady:h},{customScrollParent:g,useWindowScroll:_,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b},x])=>{let S=H(0),C=H(0),w=H(Kz),T=H({height:0,width:0}),E=H({height:0,width:0}),D=MI(),O=MI(),ee=H(0),te=H(null),ne=H({column:0,row:0}),k=MI(),re=MI(),ie=H(!1),ae=H(0),A=H(!0),oe=H(!1),se=H(!1);gI(V(m,OI(ae),z(([e,t])=>t!==0)),()=>{_I(A,!1)}),gI(V(LI(m,A,E,T,ae,oe),z(([e,t,n,r,,i])=>e&&!t&&n.height!==0&&r.height!==0&&!i)),([,,,,e])=>{_I(oe,!0),rR(1,()=>{_I(D,e)}),bI(V(l),()=>{_I(t,[0,0]),_I(A,!0)})}),R(V(re,z(e=>e!=null&&e.scrollTop>0),wI(0)),C),gI(V(m,OI(re),z(([,e])=>e!=null)),([,e])=>{e&&(_I(T,e.viewport),_I(E,e.item),_I(ne,e.gap),e.scrollTop>0&&(_I(ie,!0),bI(V(l,EI(1)),e=>{_I(ie,!1)}),_I(c,{top:e.scrollTop})))}),R(V(T,B(({height:e})=>e)),d),R(V(LI(RI(T,tB),RI(E,tB),RI(ne,(e,t)=>e!==void 0&&e.column===t.column&&e.row===t.row),RI(l)),B(([e,t,n,r])=>({gap:n,item:t,scrollTop:r,viewport:e}))),k),R(V(LI(RI(S),r,RI(ne,nB),RI(E,tB),RI(T,tB),RI(te),RI(C),RI(ie),RI(A),RI(ae)),z(([,,,,,,,e])=>!e),B(([e,[t,n],r,i,a,o,s,,c,l])=>{let{column:u,row:d}=r,{height:f,width:p}=i,{width:m}=a;if(s===0&&(e===0||m===0))return Kz;if(p===0){let t=iR(l,e);return eB($z(t,t+Math.max(s-1,0),o))}let h=iB(m,p,u),g,_;c?t===0&&n===0&&s>0?(g=0,_=s-1):(g=h*Yz((t+d)/(f+d)),_=h*Jz((n+d)/(f+d))-1,_=Zz(e-1,Xz(_,h-1)),g=Zz(_,Xz(0,g))):(g=0,_=-1);let v=$z(g,_,o),{bottom:y,top:b}=aB(a,r,i,v),x=Jz(e/h);return{bottom:y,itemHeight:f,items:v,itemWidth:p,offsetBottom:x*f+(x-1)*d-y,offsetTop:b,top:b}})),w),R(V(te,z(e=>e!==null),B(e=>e.length)),S),R(V(LI(T,E,w,ne),z(([e,t,{items:n}])=>n.length>0&&t.height!==0&&e.height!==0),B(([e,t,{items:n},r])=>{let{bottom:i,top:a}=aB(e,r,t,n);return[a,i]}),CI(EL)),t);let ce=H(!1);R(V(l,OI(ce),B(([e,t])=>t||e!==0)),ce);let le=NI(V(LI(w,S),z(([{items:e}])=>e.length>0),OI(ce),z(([[e,t],n])=>{let r=e.items[e.items.length-1].index===t-1;return(n||e.bottom>0&&e.itemHeight>0&&e.offsetBottom===0&&e.items.length===t)&&r}),B(([[,e]])=>e-1),CI())),ue=NI(V(RI(w),z(({items:e})=>e.length>0&&e[0].index===0),wI(0),CI())),de=NI(V(RI(w),OI(ie),z(([{items:e},t])=>e.length>0&&!t),B(([{items:e}])=>({endIndex:e[e.length-1].index,startIndex:e[0].index})),CI(TL),DI(0)));R(de,p.scrollSeekRangeChanged),R(V(D,OI(T,E,S,ne),B(([e,t,n,r,i])=>{let a=eR(e),{align:o,behavior:s,offset:c}=a,l=a.index;l===`LAST`&&(l=r-1),l=Xz(0,l,Zz(r-1,l));let u=oB(t,i,n,l);return o===`end`?u=Qz(u-t.height+n.height):o===`center`&&(u=Qz(u-t.height/2+n.height/2)),c!==void 0&&c!==0&&(u+=c),{behavior:s,top:u}})),c);let fe=jI(V(w,B(e=>e.offsetBottom+e.bottom)),0);return R(V(b,B(e=>({height:e.visibleHeight,width:e.visibleWidth}))),T),{customScrollParent:g,data:te,deviation:ee,footerHeight:i,gap:ne,headerHeight:a,increaseViewportBy:e,initialItemCount:C,itemDimensions:E,overscan:n,restoreStateFrom:re,scrollBy:o,scrollContainerState:s,scrollHeight:O,scrollTo:c,scrollToIndex:D,scrollTop:l,smoothScrollTargetReached:u,totalCount:S,useWindowScroll:_,viewportDimensions:T,windowScrollContainerState:v,windowScrollTo:y,windowViewportRect:b,...p,gridState:w,horizontalDirection:se,initialTopMostItemIndex:ae,totalListHeight:fe,...f,endReached:le,propsReady:h,rangeChanged:de,startReached:ue,stateChanged:k,stateRestoreInProgress:ie,...x}},hI(vR,rL,fR,IR,QL,LR,UI));function iB(e,t,n){return Xz(1,Yz((e+n)/(Yz(t)+n)))}function aB(e,t,n,r){let{height:i}=n;if(i===void 0||r.length===0)return{bottom:0,top:0};let a=oB(e,t,n,r[0].index);return{bottom:oB(e,t,n,r[r.length-1].index)+i,top:a}}function oB(e,t,n,r){let i=Yz(r/iB(e.width,n.width,t.column)),a=i*n.height+Xz(0,i-1)*t.row;return a>0?a+t.row:a}var sB=PI(([e,t])=>({...e,...t}),hI(rB,PI(()=>{let e=H(e=>`Item ${e}`),t=H({}),n=H(null),r=H(`virtuoso-grid-item`),i=H(`virtuoso-grid-list`),a=H(nz),o=H(`div`),s=H(fI),c=(e,n=null)=>jI(V(t,B(t=>t[e]),CI()),n),l=H(!1),u=H(!1);return R(RI(u),l),{components:t,computeItemKey:a,context:n,FooterComponent:c(`Footer`),HeaderComponent:c(`Header`),headerFooterTag:o,itemClassName:r,ItemComponent:c(`Item`,`div`),itemContent:e,listClassName:i,ListComponent:c(`List`,`div`),readyStateChanged:l,reportReadyState:u,ScrollerComponent:c(`Scroller`,`div`),scrollerRef:s,ScrollSeekPlaceholder:c(`ScrollSeekPlaceholder`,`div`)}}))),cB=j.memo(function(){let e=mB(`gridState`),t=mB(`listClassName`),n=mB(`itemClassName`),r=mB(`itemContent`),i=mB(`computeItemKey`),a=mB(`isSeeking`),o=hB(`scrollHeight`),s=mB(`ItemComponent`),c=mB(`ListComponent`),l=mB(`ScrollSeekPlaceholder`),u=mB(`context`),d=hB(`itemDimensions`),f=hB(`gap`),p=mB(`log`),m=mB(`stateRestoreInProgress`),h=hB(`reportReadyState`),g=ZI(j.useMemo(()=>e=>{let t=e.parentElement.parentElement.scrollHeight;o(t);let n=e.firstChild;if(n!==null){let{height:e,width:t}=n.getBoundingClientRect();d({height:e,width:t})}f({column:vB(`column-gap`,getComputedStyle(e).columnGap,p),row:vB(`row-gap`,getComputedStyle(e).rowGap,p)})},[o,d,f,p]),!0,!1);return QR(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),m?null:(0,M.jsx)(c,{className:t,ref:g,...mz(c,u),"data-testid":`virtuoso-item-list`,style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(t=>{let o=i(t.index,t.data,u);return a?(0,M.jsx)(l,{...mz(l,u),height:e.itemHeight,index:t.index,width:e.itemWidth},o):(0,j.createElement)(s,{...mz(s,u),className:n,"data-index":t.index,key:o},r(t.index,t.data,u))})})}),lB=j.memo(function(){let e=mB(`HeaderComponent`),t=hB(`headerHeight`),n=mB(`headerFooterTag`),r=ZI(j.useMemo(()=>e=>{t(jL(e,`height`))},[t]),!0,!1),i=mB(`context`);return e==null?null:(0,M.jsx)(n,{ref:r,children:(0,M.jsx)(e,{...mz(e,i)})})}),uB=j.memo(function(){let e=mB(`FooterComponent`),t=hB(`footerHeight`),n=mB(`headerFooterTag`),r=ZI(j.useMemo(()=>e=>{t(jL(e,`height`))},[t]),!0,!1),i=mB(`context`);return e==null?null:(0,M.jsx)(n,{ref:r,children:(0,M.jsx)(e,{...mz(e,i)})})}),dB=({children:e})=>{let t=j.useContext(JR),n=hB(`itemDimensions`),r=hB(`viewportDimensions`),i=ZI(j.useMemo(()=>e=>{r(e.getBoundingClientRect())},[r]),!0,!1);return j.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),(0,M.jsx)(`div`,{ref:i,style:dz(!1),children:e})},fB=({children:e})=>{let t=j.useContext(JR),n=hB(`windowViewportRect`),r=hB(`itemDimensions`),i=mB(`customScrollParent`),a=mB(`useWindowScroll`),o=nL(n,i,!1);return j.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({listHeight:0,offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),(0,M.jsx)(`div`,{ref:o,style:fz(!1,a),children:e})},{Component:moe,useEmitter:pB,useEmitterValue:mB,usePublisher:hB}=KR(sB,{optional:{context:`context`,totalCount:`totalCount`,overscan:`overscan`,itemContent:`itemContent`,components:`components`,computeItemKey:`computeItemKey`,data:`data`,initialItemCount:`initialItemCount`,scrollSeekConfiguration:`scrollSeekConfiguration`,headerFooterTag:`headerFooterTag`,listClassName:`listClassName`,itemClassName:`itemClassName`,useWindowScroll:`useWindowScroll`,customScrollParent:`customScrollParent`,scrollerRef:`scrollerRef`,logLevel:`logLevel`,restoreStateFrom:`restoreStateFrom`,initialTopMostItemIndex:`initialTopMostItemIndex`,increaseViewportBy:`increaseViewportBy`},methods:{scrollTo:`scrollTo`,scrollBy:`scrollBy`,scrollToIndex:`scrollToIndex`},events:{isScrolling:`isScrolling`,endReached:`endReached`,startReached:`startReached`,rangeChanged:`rangeChanged`,atBottomStateChange:`atBottomStateChange`,atTopStateChange:`atTopStateChange`,stateChanged:`stateChanged`,readyStateChanged:`readyStateChanged`}},j.memo(function({...e}){let t=mB(`useWindowScroll`),n=mB(`customScrollParent`),r=n||t?_B:gB,i=n||t?fB:dB,a=mB(`context`);return(0,M.jsx)(r,{...e,...mz(r,a),children:(0,M.jsxs)(i,{children:[(0,M.jsx)(lB,{}),(0,M.jsx)(cB,{}),(0,M.jsx)(uB,{})]})})})),gB=vz({useEmitter:pB,useEmitterValue:mB,usePublisher:hB}),_B=yz({useEmitter:pB,useEmitterValue:mB,usePublisher:hB});function vB(e,t,n){return t!==`normal`&&t?.endsWith(`px`)!==!0&&n(`${e} was not resolved to pixel value correctly`,t,BI.WARN),t===`normal`?0:parseInt(t??`0`,10)}var yB=`Collapsible`,[bB,xB]=Xb(yB),[SB,CB]=bB(yB),wB=j.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=$b({prop:r,defaultProp:i??!1,onChange:o,caller:yB});return(0,M.jsx)(SB,{scope:n,disabled:a,contentId:Jx(),open:c,onOpenToggle:j.useCallback(()=>l(e=>!e),[l]),children:(0,M.jsx)(rx.div,{"data-state":AB(c),"data-disabled":a?``:void 0,...s,ref:t})})});wB.displayName=yB;var TB=`CollapsibleTrigger`,EB=j.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=CB(TB,n);return(0,M.jsx)(rx.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":AB(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:Zb(e.onClick,i.onOpenToggle)})});EB.displayName=TB;var DB=`CollapsibleContent`,OB=j.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=CB(DB,e.__scopeCollapsible);return(0,M.jsx)(ex,{present:n||i.open,children:({present:e})=>(0,M.jsx)(kB,{...r,ref:t,present:e})})});OB.displayName=DB;var kB=j.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=CB(DB,n),[s,c]=j.useState(r),l=j.useRef(null),u=$l(t,l),d=j.useRef(0),f=d.current,p=j.useRef(0),m=p.current,h=o.open||s,g=j.useRef(h),_=j.useRef(void 0);return j.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),Qb(()=>{let e=l.current;if(e){_.current=_.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,g.current||(e.style.transitionDuration=_.current.transitionDuration,e.style.animationName=_.current.animationName),c(r)}},[o.open,r]),(0,M.jsx)(rx.div,{"data-state":AB(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!h,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function AB(e){return e?`open`:`closed`}var jB=wB,MB=EB,NB=OB,PB=`Accordion`,FB=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[IB,LB,RB]=Gx(PB),[zB,hoe]=Xb(PB,[RB,xB]),BB=xB(),VB=j.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,M.jsx)(IB.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,M.jsx)(qB,{...a,ref:t}):(0,M.jsx)(KB,{...i,ref:t})})});VB.displayName=PB;var[HB,UB]=zB(PB),[WB,GB]=zB(PB,{collapsible:!1}),KB=j.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=$b({prop:n,defaultProp:r??``,onChange:i,caller:PB});return(0,M.jsx)(HB,{scope:e.__scopeAccordion,value:j.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:j.useCallback(()=>a&&c(``),[a,c]),children:(0,M.jsx)(WB,{scope:e.__scopeAccordion,collapsible:a,children:(0,M.jsx)(XB,{...o,ref:t})})})}),qB=j.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=$b({prop:n,defaultProp:r??[],onChange:i,caller:PB}),c=j.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=j.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,M.jsx)(HB,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,M.jsx)(WB,{scope:e.__scopeAccordion,collapsible:!0,children:(0,M.jsx)(XB,{...a,ref:t})})})}),[JB,YB]=zB(PB),XB=j.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=$l(j.useRef(null),t),c=LB(n),l=Zx(i)===`ltr`,u=Zb(e.onKeyDown,e=>{if(!FB.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=()=>{o=r+1,o>s&&(o=0)},d=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,M.jsx)(JB,{scope:n,disabled:r,direction:i,orientation:a,children:(0,M.jsx)(IB.Slot,{scope:n,children:(0,M.jsx)(rx.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),ZB=`AccordionItem`,[QB,$B]=zB(ZB),eV=j.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=YB(ZB,n),o=UB(ZB,n),s=BB(n),c=Jx(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,M.jsx)(QB,{scope:n,open:l,disabled:u,triggerId:c,children:(0,M.jsx)(jB,{"data-orientation":a.orientation,"data-state":sV(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});eV.displayName=ZB;var tV=`AccordionHeader`,nV=j.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=YB(PB,n),a=$B(tV,n);return(0,M.jsx)(rx.h3,{"data-orientation":i.orientation,"data-state":sV(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});nV.displayName=tV;var rV=`AccordionTrigger`,iV=j.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=YB(PB,n),a=$B(rV,n),o=GB(rV,n),s=BB(n);return(0,M.jsx)(IB.ItemSlot,{scope:n,children:(0,M.jsx)(MB,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});iV.displayName=rV;var aV=`AccordionContent`,oV=j.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=YB(PB,n),a=$B(aV,n),o=BB(n);return(0,M.jsx)(NB,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});oV.displayName=aV;function sV(e){return e?`open`:`closed`}var cV=VB,lV=eV,uV=nV,dV=iV,fV=oV,pV=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},mV=(e=>e?pV(e):pV),hV=e=>e;function gV(e,t=hV){let n=j.useSyncExternalStore(e.subscribe,j.useCallback(()=>t(e.getState()),[e,t]),j.useCallback(()=>t(e.getInitialState()),[e,t]));return j.useDebugValue(n),n}var _V=e=>{let t=mV(e),n=e=>gV(t,e);return Object.assign(n,t),n},vV=(e=>e?_V(e):_V);Object.freeze({status:`aborted`});function U(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var yV=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},bV=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},xV={};function SV(e){return e&&Object.assign(xV,e),xV}function CV(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function wV(e,t){return typeof t==`bigint`?t.toString():t}function TV(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function EV(e){return e==null}function DV(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function OV(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var kV=Symbol(`evaluating`);function AV(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==kV)return r===void 0&&(r=kV,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function jV(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function MV(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function NV(e){return JSON.stringify(e)}function PV(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var FV=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function IV(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var LV=TV(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function RV(e){if(IV(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(IV(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function zV(e){return RV(e)?{...e}:Array.isArray(e)?[...e]:e}var BV=new Set([`string`,`number`,`symbol`]);function VV(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function HV(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function W(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function UV(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var WV={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function GV(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return HV(e,MV(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return jV(this,`shape`,e),e},checks:[]}))}function KV(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return HV(e,MV(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return jV(this,`shape`,r),r},checks:[]}))}function qV(e,t){if(!RV(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return HV(e,MV(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return jV(this,`shape`,n),n}}))}function JV(e,t){if(!RV(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return HV(e,MV(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return jV(this,`shape`,n),n}}))}function YV(e,t){return HV(e,MV(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return jV(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function XV(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return HV(t,MV(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return jV(this,`shape`,i),i},checks:[]}))}function ZV(e,t,n){return HV(t,MV(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return jV(this,`shape`,i),i}}))}function QV(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function $V(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function eH(e){return typeof e==`string`?e:e?.message}function tH(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=eH(e.inst?._zod.def?.error?.(e))??eH(t?.error?.(e))??eH(n.customError?.(e))??eH(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function nH(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function rH(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var iH=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,wV,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},aH=U(`$ZodError`,iH),oH=U(`$ZodError`,iH,{Parent:Error});function sH(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function cH(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var lH=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new yV;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>tH(e,a,SV())));throw FV(t,i?.callee),t}return o.value},uH=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>tH(e,a,SV())));throw FV(t,i?.callee),t}return o.value},dH=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new yV;return a.issues.length?{success:!1,error:new(e??aH)(a.issues.map(e=>tH(e,i,SV())))}:{success:!0,data:a.value}},fH=dH(oH),pH=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>tH(e,i,SV())))}:{success:!0,data:a.value}},mH=pH(oH),hH=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return lH(e)(t,n,i)},gH=e=>(t,n,r)=>lH(e)(t,n,r),_H=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return uH(e)(t,n,i)},vH=e=>async(t,n,r)=>uH(e)(t,n,r),yH=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return dH(e)(t,n,i)},bH=e=>(t,n,r)=>dH(e)(t,n,r),xH=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return pH(e)(t,n,i)},SH=e=>async(t,n,r)=>pH(e)(t,n,r),CH=/^[cC][^\s-]{8,}$/,wH=/^[0-9a-z]+$/,TH=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,EH=/^[0-9a-vA-V]{20}$/,DH=/^[A-Za-z0-9]{27}$/,OH=/^[a-zA-Z0-9_-]{21}$/,kH=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,AH=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,jH=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,MH=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,NH=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function PH(){return new RegExp(NH,`u`)}var FH=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,IH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,LH=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,RH=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zH=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,BH=/^[A-Za-z0-9_-]*$/,VH=/^\+[1-9]\d{6,14}$/,HH=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,UH=RegExp(`^${HH}$`);function WH(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function GH(e){return RegExp(`^${WH(e)}$`)}function KH(e){let t=WH({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${HH}T(?:${r})$`)}var qH=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},JH=/^-?\d+$/,YH=/^-?\d+(?:\.\d+)?$/,XH=/^(?:true|false)$/i,ZH=/^null$/i,QH=/^[^A-Z]*$/,$H=/^[^a-z]*$/,eU=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),tU={number:`number`,bigint:`bigint`,object:`date`},nU=U(`$ZodCheckLessThan`,(e,t)=>{eU.init(e,t);let n=tU[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rU=U(`$ZodCheckGreaterThan`,(e,t)=>{eU.init(e,t);let n=tU[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),iU=U(`$ZodCheckMultipleOf`,(e,t)=>{eU.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):OV(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),aU=U(`$ZodCheckNumberFormat`,(e,t)=>{eU.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=WV[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=JH)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),oU=U(`$ZodCheckMaxLength`,(e,t)=>{var n;eU.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!EV(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=nH(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sU=U(`$ZodCheckMinLength`,(e,t)=>{var n;eU.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!EV(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=nH(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),cU=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;eU.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!EV(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=nH(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),lU=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;eU.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),uU=U(`$ZodCheckRegex`,(e,t)=>{lU.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),dU=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=QH,lU.init(e,t)}),fU=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=$H,lU.init(e,t)}),pU=U(`$ZodCheckIncludes`,(e,t)=>{eU.init(e,t);let n=VV(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),mU=U(`$ZodCheckStartsWith`,(e,t)=>{eU.init(e,t);let n=RegExp(`^${VV(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hU=U(`$ZodCheckEndsWith`,(e,t)=>{eU.init(e,t);let n=RegExp(`.*${VV(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),gU=U(`$ZodCheckOverwrite`,(e,t)=>{eU.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),_U=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
77
77
  `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
78
78
  `))}},vU={major:4,minor:3,patch:6},yU=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=vU;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=QV(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new yV;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=QV(e,t))});else{if(e.issues.length===t)continue;r||=QV(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(QV(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new yV;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new yV;return o.then(e=>t(e,r,a))}return t(o,r,a)}}AV(e,`~standard`,()=>({validate:t=>{try{let n=fH(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return mH(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),bU=U(`$ZodString`,(e,t)=>{yU.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??qH(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),xU=U(`$ZodStringFormat`,(e,t)=>{lU.init(e,t),bU.init(e,t)}),SU=U(`$ZodGUID`,(e,t)=>{t.pattern??=AH,xU.init(e,t)}),CU=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=jH(e)}else t.pattern??=jH();xU.init(e,t)}),wU=U(`$ZodEmail`,(e,t)=>{t.pattern??=MH,xU.init(e,t)}),TU=U(`$ZodURL`,(e,t)=>{xU.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),EU=U(`$ZodEmoji`,(e,t)=>{t.pattern??=PH(),xU.init(e,t)}),DU=U(`$ZodNanoID`,(e,t)=>{t.pattern??=OH,xU.init(e,t)}),OU=U(`$ZodCUID`,(e,t)=>{t.pattern??=CH,xU.init(e,t)}),kU=U(`$ZodCUID2`,(e,t)=>{t.pattern??=wH,xU.init(e,t)}),AU=U(`$ZodULID`,(e,t)=>{t.pattern??=TH,xU.init(e,t)}),jU=U(`$ZodXID`,(e,t)=>{t.pattern??=EH,xU.init(e,t)}),MU=U(`$ZodKSUID`,(e,t)=>{t.pattern??=DH,xU.init(e,t)}),NU=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=KH(t),xU.init(e,t)}),PU=U(`$ZodISODate`,(e,t)=>{t.pattern??=UH,xU.init(e,t)}),FU=U(`$ZodISOTime`,(e,t)=>{t.pattern??=GH(t),xU.init(e,t)}),IU=U(`$ZodISODuration`,(e,t)=>{t.pattern??=kH,xU.init(e,t)}),LU=U(`$ZodIPv4`,(e,t)=>{t.pattern??=FH,xU.init(e,t),e._zod.bag.format=`ipv4`}),RU=U(`$ZodIPv6`,(e,t)=>{t.pattern??=IH,xU.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),zU=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=LH,xU.init(e,t)}),BU=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=RH,xU.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function VU(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var HU=U(`$ZodBase64`,(e,t)=>{t.pattern??=zH,xU.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{VU(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function UU(e){if(!BH.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return VU(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var WU=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=BH,xU.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{UU(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),GU=U(`$ZodE164`,(e,t)=>{t.pattern??=VH,xU.init(e,t)});function KU(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var qU=U(`$ZodJWT`,(e,t)=>{xU.init(e,t),e._zod.check=n=>{KU(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),JU=U(`$ZodNumber`,(e,t)=>{yU.init(e,t),e._zod.pattern=e._zod.bag.pattern??YH,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),YU=U(`$ZodNumberFormat`,(e,t)=>{aU.init(e,t),JU.init(e,t)}),XU=U(`$ZodBoolean`,(e,t)=>{yU.init(e,t),e._zod.pattern=XH,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ZU=U(`$ZodNull`,(e,t)=>{yU.init(e,t),e._zod.pattern=ZH,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),QU=U(`$ZodUnknown`,(e,t)=>{yU.init(e,t),e._zod.parse=e=>e}),$U=U(`$ZodNever`,(e,t)=>{yU.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function eW(e,t,n){e.issues.length&&t.issues.push(...$V(n,e.issues)),t.value[n]=e.value}var tW=U(`$ZodArray`,(e,t)=>{yU.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>eW(t,n,e))):eW(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function nW(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...$V(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function rW(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=UV(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function iW(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>nW(e,n,i,t,u))):nW(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var aW=U(`$ZodObject`,(e,t)=>{if(yU.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=TV(()=>rW(t));AV(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=IV,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>nW(n,t,e,s,r))):nW(i,t,e,s,r)}return i?iW(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),oW=U(`$ZodObjectJIT`,(e,t)=>{aW.init(e,t);let n=e._zod.parse,r=TV(()=>rW(t)),i=e=>{let t=new _U([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=NV(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=NV(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
79
79
  if (${n}.issues.length) {
@@ -114,8 +114,8 @@ import{a as e,n as t,o as n,r,t as i}from"./rolldown-runtime-BM3Ffeng.js";import
114
114
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function GG(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:JG(t,`input`,e.processors),output:JG(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function KG(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return KG(r.element,n);if(r.type===`set`)return KG(r.valueType,n);if(r.type===`lazy`)return KG(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return KG(r.innerType,n);if(r.type===`intersection`)return KG(r.left,n)||KG(r.right,n);if(r.type===`record`||r.type===`map`)return KG(r.keyType,n)||KG(r.valueType,n);if(r.type===`pipe`)return KG(r.in,n)||KG(r.out,n);if(r.type===`object`){for(let e in r.shape)if(KG(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(KG(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(KG(e,n))return!0;return!!(r.rest&&KG(r.rest,n))}return!1}var qG=(e,t={})=>n=>{let r=HG({...n,processors:t});return UG(e,r),WG(r,e),GG(r,e)},JG=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=HG({...i??{},target:a,io:t,processors:n});return UG(e,o),WG(o,e),GG(o,e)},YG={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},XG=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=YG[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},ZG=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},QG=(e,t,n,r)=>{n.type=`boolean`},$G=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},eK=(e,t,n,r)=>{n.not={}},tK=(e,t,n,r)=>{let i=e._zod.def,a=CV(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},nK=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},rK=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},iK=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},aK=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=UG(a.element,t,{...r,path:[...r.path,`items`]})},oK=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=UG(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=UG(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},sK=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>UG(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},cK=(e,t,n,r)=>{let i=e._zod.def,a=UG(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=UG(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},lK=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=UG(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=UG(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=UG(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},uK=(e,t,n,r)=>{let i=e._zod.def,a=UG(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},dK=(e,t,n,r)=>{let i=e._zod.def;UG(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},fK=(e,t,n,r)=>{let i=e._zod.def;UG(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},pK=(e,t,n,r)=>{let i=e._zod.def;UG(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},mK=(e,t,n,r)=>{let i=e._zod.def;UG(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},hK=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;UG(a,t,r);let o=t.seen.get(e);o.ref=a},gK=(e,t,n,r)=>{let i=e._zod.def;UG(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},_K=(e,t,n,r)=>{let i=e._zod.def;UG(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},vK=U(`ZodISODateTime`,(e,t)=>{NU.init(e,t),WK.init(e,t)});function yK(e){return sG(vK,e)}var bK=U(`ZodISODate`,(e,t)=>{PU.init(e,t),WK.init(e,t)});function xK(e){return cG(bK,e)}var SK=U(`ZodISOTime`,(e,t)=>{FU.init(e,t),WK.init(e,t)});function CK(e){return lG(SK,e)}var wK=U(`ZodISODuration`,(e,t)=>{IU.init(e,t),WK.init(e,t)});function TK(e){return uG(wK,e)}var EK=(e,t)=>{aH.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>cH(e,t)},flatten:{value:t=>sH(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,wV,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,wV,2)}},isEmpty:{get(){return e.issues.length===0}}})};U(`ZodError`,EK);var DK=U(`ZodError`,EK,{Parent:Error}),OK=lH(DK),kK=uH(DK),AK=dH(DK),jK=pH(DK),MK=hH(DK),NK=gH(DK),PK=_H(DK),FK=vH(DK),IK=yH(DK),LK=bH(DK),RK=xH(DK),zK=SH(DK),BK=U(`ZodType`,(e,t)=>(yU.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:JG(e,`input`),output:JG(e,`output`)}}),e.toJSONSchema=qG(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(MV(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>HV(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>OK(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>AK(e,t,n),e.parseAsync=async(t,n)=>kK(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>jK(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>MK(e,t,n),e.decode=(t,n)=>NK(e,t,n),e.encodeAsync=async(t,n)=>PK(e,t,n),e.decodeAsync=async(t,n)=>FK(e,t,n),e.safeEncode=(t,n)=>IK(e,t,n),e.safeDecode=(t,n)=>LK(e,t,n),e.safeEncodeAsync=async(t,n)=>RK(e,t,n),e.safeDecodeAsync=async(t,n)=>zK(e,t,n),e.refine=(t,n)=>e.check(aJ(t,n)),e.superRefine=t=>e.check(oJ(t)),e.overwrite=t=>e.check(MG(t)),e.optional=()=>Vq(e),e.exactOptional=()=>Uq(e),e.nullable=()=>Gq(e),e.nullish=()=>Vq(Gq(e)),e.nonoptional=t=>Zq(e,t),e.array=()=>Cq(e),e.or=t=>Dq([e,t]),e.and=t=>jq(e,t),e.transform=t=>tJ(e,zq(t)),e.default=t=>qq(e,t),e.prefault=t=>Yq(e,t),e.catch=t=>$q(e,t),e.pipe=t=>tJ(e,t),e.readonly=()=>rJ(e),e.describe=t=>{let n=e.clone();return IW.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return IW.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return IW.get(e);let n=e.clone();return IW.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),VK=U(`_ZodString`,(e,t)=>{bU.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XG(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(EG(...t)),e.includes=(...t)=>e.check(kG(...t)),e.startsWith=(...t)=>e.check(AG(...t)),e.endsWith=(...t)=>e.check(jG(...t)),e.min=(...t)=>e.check(wG(...t)),e.max=(...t)=>e.check(CG(...t)),e.length=(...t)=>e.check(TG(...t)),e.nonempty=(...t)=>e.check(wG(1,...t)),e.lowercase=t=>e.check(DG(t)),e.uppercase=t=>e.check(OG(t)),e.trim=()=>e.check(PG()),e.normalize=(...t)=>e.check(NG(...t)),e.toLowerCase=()=>e.check(FG()),e.toUpperCase=()=>e.check(IG()),e.slugify=()=>e.check(LG())}),HK=U(`ZodString`,(e,t)=>{bU.init(e,t),VK.init(e,t),e.email=t=>e.check(zW(GK,t)),e.url=t=>e.check(GW(JK,t)),e.jwt=t=>e.check(oG(lq,t)),e.emoji=t=>e.check(KW(YK,t)),e.guid=t=>e.check(BW(KK,t)),e.uuid=t=>e.check(VW(qK,t)),e.uuidv4=t=>e.check(HW(qK,t)),e.uuidv6=t=>e.check(UW(qK,t)),e.uuidv7=t=>e.check(WW(qK,t)),e.nanoid=t=>e.check(qW(XK,t)),e.guid=t=>e.check(BW(KK,t)),e.cuid=t=>e.check(JW(ZK,t)),e.cuid2=t=>e.check(YW(QK,t)),e.ulid=t=>e.check(XW($K,t)),e.base64=t=>e.check(rG(oq,t)),e.base64url=t=>e.check(iG(sq,t)),e.xid=t=>e.check(ZW(eq,t)),e.ksuid=t=>e.check(QW(tq,t)),e.ipv4=t=>e.check($W(nq,t)),e.ipv6=t=>e.check(eG(rq,t)),e.cidrv4=t=>e.check(tG(iq,t)),e.cidrv6=t=>e.check(nG(aq,t)),e.e164=t=>e.check(aG(cq,t)),e.datetime=t=>e.check(yK(t)),e.date=t=>e.check(xK(t)),e.time=t=>e.check(CK(t)),e.duration=t=>e.check(TK(t))});function UK(e){return LW(HK,e)}var WK=U(`ZodStringFormat`,(e,t)=>{xU.init(e,t),VK.init(e,t)}),GK=U(`ZodEmail`,(e,t)=>{wU.init(e,t),WK.init(e,t)}),KK=U(`ZodGUID`,(e,t)=>{SU.init(e,t),WK.init(e,t)}),qK=U(`ZodUUID`,(e,t)=>{CU.init(e,t),WK.init(e,t)}),JK=U(`ZodURL`,(e,t)=>{TU.init(e,t),WK.init(e,t)}),YK=U(`ZodEmoji`,(e,t)=>{EU.init(e,t),WK.init(e,t)}),XK=U(`ZodNanoID`,(e,t)=>{DU.init(e,t),WK.init(e,t)}),ZK=U(`ZodCUID`,(e,t)=>{OU.init(e,t),WK.init(e,t)}),QK=U(`ZodCUID2`,(e,t)=>{kU.init(e,t),WK.init(e,t)}),$K=U(`ZodULID`,(e,t)=>{AU.init(e,t),WK.init(e,t)}),eq=U(`ZodXID`,(e,t)=>{jU.init(e,t),WK.init(e,t)}),tq=U(`ZodKSUID`,(e,t)=>{MU.init(e,t),WK.init(e,t)}),nq=U(`ZodIPv4`,(e,t)=>{LU.init(e,t),WK.init(e,t)}),rq=U(`ZodIPv6`,(e,t)=>{RU.init(e,t),WK.init(e,t)}),iq=U(`ZodCIDRv4`,(e,t)=>{zU.init(e,t),WK.init(e,t)}),aq=U(`ZodCIDRv6`,(e,t)=>{BU.init(e,t),WK.init(e,t)}),oq=U(`ZodBase64`,(e,t)=>{HU.init(e,t),WK.init(e,t)}),sq=U(`ZodBase64URL`,(e,t)=>{WU.init(e,t),WK.init(e,t)}),cq=U(`ZodE164`,(e,t)=>{GU.init(e,t),WK.init(e,t)}),lq=U(`ZodJWT`,(e,t)=>{qU.init(e,t),WK.init(e,t)}),uq=U(`ZodNumber`,(e,t)=>{JU.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZG(e,t,n,r),e.gt=(t,n)=>e.check(bG(t,n)),e.gte=(t,n)=>e.check(xG(t,n)),e.min=(t,n)=>e.check(xG(t,n)),e.lt=(t,n)=>e.check(vG(t,n)),e.lte=(t,n)=>e.check(yG(t,n)),e.max=(t,n)=>e.check(yG(t,n)),e.int=t=>e.check(pq(t)),e.safe=t=>e.check(pq(t)),e.positive=t=>e.check(bG(0,t)),e.nonnegative=t=>e.check(xG(0,t)),e.negative=t=>e.check(vG(0,t)),e.nonpositive=t=>e.check(yG(0,t)),e.multipleOf=(t,n)=>e.check(SG(t,n)),e.step=(t,n)=>e.check(SG(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function dq(e){return dG(uq,e)}var fq=U(`ZodNumberFormat`,(e,t)=>{YU.init(e,t),uq.init(e,t)});function pq(e){return pG(fq,e)}var mq=U(`ZodBoolean`,(e,t)=>{XU.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QG(e,t,n,r)});function hq(e){return mG(mq,e)}var gq=U(`ZodNull`,(e,t)=>{ZU.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$G(e,t,n,r)});function _q(e){return hG(gq,e)}var vq=U(`ZodUnknown`,(e,t)=>{QU.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function yq(){return gG(vq)}var bq=U(`ZodNever`,(e,t)=>{$U.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eK(e,t,n,r)});function xq(e){return _G(bq,e)}var Sq=U(`ZodArray`,(e,t)=>{tW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aK(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(wG(t,n)),e.nonempty=t=>e.check(wG(1,t)),e.max=(t,n)=>e.check(CG(t,n)),e.length=(t,n)=>e.check(TG(t,n)),e.unwrap=()=>e.element});function Cq(e,t){return RG(Sq,e,t)}var wq=U(`ZodObject`,(e,t)=>{oW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oK(e,t,n,r),AV(e,`shape`,()=>t.shape),e.keyof=()=>Fq(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:yq()}),e.loose=()=>e.clone({...e._zod.def,catchall:yq()}),e.strict=()=>e.clone({...e._zod.def,catchall:xq()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>qV(e,t),e.safeExtend=t=>JV(e,t),e.merge=t=>YV(e,t),e.pick=t=>GV(e,t),e.omit=t=>KV(e,t),e.partial=(...t)=>XV(Bq,e,t[0]),e.required=(...t)=>ZV(Xq,e,t[0])});function Tq(e,t){return new wq({type:`object`,shape:e??{},...W(t)})}var Eq=U(`ZodUnion`,(e,t)=>{cW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sK(e,t,n,r),e.options=t.options});function Dq(e,t){return new Eq({type:`union`,options:e,...W(t)})}var Oq=U(`ZodDiscriminatedUnion`,(e,t)=>{Eq.init(e,t),lW.init(e,t)});function kq(e,t,n){return new Oq({type:`union`,options:t,discriminator:e,...W(n)})}var Aq=U(`ZodIntersection`,(e,t)=>{uW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cK(e,t,n,r)});function jq(e,t){return new Aq({type:`intersection`,left:e,right:t})}var Mq=U(`ZodRecord`,(e,t)=>{pW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lK(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Nq(e,t,n){return new Mq({type:`record`,keyType:e,valueType:t,...W(n)})}var Pq=U(`ZodEnum`,(e,t)=>{mW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tK(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Pq({...t,checks:[],...W(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Pq({...t,checks:[],...W(r),entries:i})}});function Fq(e,t){return new Pq({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...W(t)})}var Iq=U(`ZodLiteral`,(e,t)=>{hW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nK(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Lq(e,t){return new Iq({type:`literal`,values:Array.isArray(e)?e:[e],...W(t)})}var Rq=U(`ZodTransform`,(e,t)=>{gW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iK(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new bV(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(rH(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(rH(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function zq(e){return new Rq({type:`transform`,transform:e})}var Bq=U(`ZodOptional`,(e,t)=>{vW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_K(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vq(e){return new Bq({type:`optional`,innerType:e})}var Hq=U(`ZodExactOptional`,(e,t)=>{yW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_K(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Uq(e){return new Hq({type:`optional`,innerType:e})}var Wq=U(`ZodNullable`,(e,t)=>{bW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uK(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Gq(e){return new Wq({type:`nullable`,innerType:e})}var Kq=U(`ZodDefault`,(e,t)=>{xW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fK(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qq(e,t){return new Kq({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():zV(t)}})}var Jq=U(`ZodPrefault`,(e,t)=>{CW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pK(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yq(e,t){return new Jq({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():zV(t)}})}var Xq=U(`ZodNonOptional`,(e,t)=>{wW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dK(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Zq(e,t){return new Xq({type:`nonoptional`,innerType:e,...W(t)})}var Qq=U(`ZodCatch`,(e,t)=>{EW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mK(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function $q(e,t){return new Qq({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var eJ=U(`ZodPipe`,(e,t)=>{DW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hK(e,t,n,r),e.in=t.in,e.out=t.out});function tJ(e,t){return new eJ({type:`pipe`,in:e,out:t})}var nJ=U(`ZodReadonly`,(e,t)=>{kW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gK(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rJ(e){return new nJ({type:`readonly`,innerType:e})}var iJ=U(`ZodCustom`,(e,t)=>{jW.init(e,t),BK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rK(e,t,n,r)});function aJ(e,t={}){return zG(iJ,e,t)}function oJ(e){return BG(e)}function sJ(e,t){return tJ(zq(e),t)}function cJ(e){return RW(HK,e)}function lJ(e){return fG(uq,e)}var uJ=e=>typeof e==`string`,dJ=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},fJ=e=>e==null?``:String(e),pJ=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},mJ=/###/g,hJ=e=>e&&e.includes(`###`)?e.replace(mJ,`.`):e,gJ=e=>!e||uJ(e),_J=(e,t,n)=>{let r=uJ(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(gJ(e))return{};let t=hJ(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return gJ(e)?{}:{obj:e,k:hJ(r[i])}},vJ=(e,t,n)=>{let{obj:r,k:i}=_J(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=_J(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=_J(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},yJ=(e,t,n,r)=>{let{obj:i,k:a}=_J(e,t,Object);i[a]=i[a]||[],i[a].push(n)},bJ=(e,t)=>{let{obj:n,k:r}=_J(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},xJ=(e,t,n)=>{let r=bJ(e,n);return r===void 0?bJ(t,n):r},SJ=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?uJ(e[r])||e[r]instanceof String||uJ(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):SJ(e[r],t[r],n):e[r]=t[r]);return e},CJ=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),wJ={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},TJ=e=>uJ(e)?e.replace(/[&<>"'\/]/g,e=>wJ[e]):e,EJ=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},DJ=[` `,`,`,`?`,`!`,`;`],OJ=new EJ(20),kJ=(e,t,n)=>{t||=``,n||=``;let r=DJ.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=OJ.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},AJ=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},jJ=e=>e?.replace(/_/g,`-`),MJ={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},NJ=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||MJ,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>uJ(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),uJ(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},PJ=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},FJ=class extends PJ{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):uJ(n)&&i?o.push(...n.split(i)):o.push(n)));let s=bJ(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!uJ(n)?s:AJ(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),vJ(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(uJ(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=bJ(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?SJ(s,n,i):s={...s,...n},vJ(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},IJ={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},LJ=Symbol(`i18next/PATH_KEY`);function RJ(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===LJ?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function zJ(e,t){let{[LJ]:n}=e(RJ()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var BJ=e=>!uJ(e)&&typeof e!=`boolean`&&typeof e!=`number`,VJ=class e extends PJ{constructor(e,t={}){super(),pJ([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=NJ.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=BJ(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!kJ(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:uJ(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:uJ(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=zJ(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?zJ(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!uJ(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=BJ(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(uJ(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:BJ(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&uJ(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=uJ(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!uJ(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=uJ(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=IJ.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return uJ(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?zJ(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!uJ(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(uJ(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!uJ(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},HJ=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=NJ.create(`languageUtils`)}getScriptPartFromCode(e){if(e=jJ(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=jJ(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(uJ(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),uJ(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return uJ(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):uJ(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},UJ={zero:0,one:1,two:2,few:3,many:4,other:5},WJ={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},GJ=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=NJ.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=jJ(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),WJ;if(!e.match(/-|_/))return WJ;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>UJ[e]-UJ[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},KJ=(e,t,n,r=`.`,i=!0)=>{let a=xJ(e,t,n);return!a&&i&&uJ(n)&&(a=AJ(e,n,r),a===void 0&&(a=AJ(t,n,r))),a},qJ=e=>e.replace(/\$/g,`$$$$`),JJ=class{constructor(e={}){this.logger=NJ.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?TJ:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?CJ(i):a||`{{`,this.suffix=o?CJ(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?CJ(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?CJ(l):``,this.nestingPrefix=d?CJ(d):f||CJ(`$t(`),this.nestingSuffix=p?CJ(p):m||CJ(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=KJ(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(KJ(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=uJ(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !uJ(a)&&!this.useRawValueToEscape&&(a=fJ(a));let s=t.safeValue(a);if(e=e.replace(i[0],qJ(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${CJ(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!uJ(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!uJ(i))return i;uJ(i)||(i=fJ(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},YJ=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},XJ=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(jJ(r),i),t[o]=s),s(n)}},ZJ=e=>(t,n,r)=>e(jJ(n),r)(t),QJ=class{constructor(e={}){this.logger=NJ.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?XJ:ZJ;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=XJ(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=YJ(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},$J=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},eY=class extends PJ{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=NJ.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{yJ(n.loaded,[i],a),$J(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();uJ(e)&&(e=this.languageUtils.toResolveHierarchy(e)),uJ(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},tY=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),uJ(e[1])&&(t.defaultValue=e[1]),uJ(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),nY=e=>(uJ(e.ns)&&(e.ns=[e.ns]),uJ(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),uJ(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),rY=()=>{},iY=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},aY=class e extends PJ{constructor(e={},t){if(super(),this.options=nY(e),this.services={},this.logger=NJ,this.modules={external:[]},iY(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(uJ(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=tY();this.options={...n,...this.options,...nY(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?NJ.init(r(this.modules.logger),this.options):NJ.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:QJ;let t=new HJ(this.options);this.store=new FJ(this.options.resources,this.options);let n=this.services;n.logger=NJ,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new GJ(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new JJ(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new eY(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new VJ(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=rY,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=dJ(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=rY){let n=t,r=uJ(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=dJ();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=rY,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&IJ.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=dJ();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=uJ(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(uJ(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=zJ(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=zJ(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=zJ(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return uJ(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=dJ();return this.options.ns?(uJ(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=dJ();uJ(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new HJ(tY());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=rY){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new FJ(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...tY().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new JJ(n)}return a.translator=new VJ(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();aY.createInstance,aY.dir,aY.init,aY.loadResources,aY.reloadResources,aY.use,aY.changeLanguage,aY.getFixedT;var oY=aY.t;aY.exists,aY.setDefaultNamespace,aY.hasLoadedNamespace,aY.loadNamespaces,aY.loadLanguages;var sY={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},cY=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function lY(e){let t={type:`tag`,name:``,voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(sY[n[1]]||e.charAt(e.length-2)===`/`)&&(t.voidElement=!0),t.name.startsWith(`!--`))){let t=e.indexOf(`-->`);return{type:`comment`,comment:t===-1?``:e.slice(4,t)}}let r=new RegExp(cY),i=null;for(;i=r.exec(e),i!==null;)if(i[0].trim())if(i[1]){let e=i[1].trim(),n=[e,null],a=e.indexOf(`=`);a>-1&&(n=[e.slice(0,a),e.slice(a+1)]),t.attrs[n[0]]=n[1],r.lastIndex--}else i[2]&&(t.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return t}var uY=/<!--[\s\S]*?-->|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,dY=/<\/?([^\s]+?)[/\s>]/,fY=/^\s*$/,pY=/^(script|style)$/i,mY=`\0`,hY=Object.create(null);function gY(e){e.forEach(function(e){if(e.type===`text`){e.content=e.content.split(mY).join(`<`);return}if(e.type===`comment`){e.comment=e.comment.split(mY).join(`<`);return}for(let t in e.attrs){let n=e.attrs[t];typeof n==`string`&&n.indexOf(mY)>-1&&(e.attrs[t]=n.split(mY).join(`<`))}e.children.length&&gY(e.children)})}function _Y(e,t){let n=t&&t.components||hY,r=t&&t.allowedTags,i=!1;if(r){let t=typeof r==`function`?r:function(e){return r.indexOf(e)>-1},n=``,a=0;uY.lastIndex=0;let o;for(;o=uY.exec(e);){let r=o[0];n+=e.slice(a,o.index);let s=r.match(dY);r.startsWith(`<!--`)||s&&t(s[1])?(n+=r,a=o.index+r.length):(i=!0,n+=mY,a=o.index+1,uY.lastIndex=a)}e=n+e.slice(a)}let a=[],o=[],s,c=-1,l=!1,u=0,d;if(e.indexOf(`<`)!==0){let t=e.indexOf(`<`);a.push({type:`text`,content:t===-1?e:e.substring(0,t)})}let f=[],p;for(;p=uY.exec(e);)f.push(p);return f.forEach(function(e,t){let n=e[0];if(!n||n.startsWith(`<!--`))return;let r=0,i=0,a=-1,o=null;for(let e=0;e<n.length;e++){let t=n.charAt(e);o?t===o&&(o=null):t===`"`||t===`'`?o=t:t===`<`?(r++,r===2&&(a=e)):t===`>`&&i++}let s=a>-1&&/[a-zA-Z0-9\-!/]/.test(n.charAt(a+1));if(r>i&&s){let e=n.substring(0,a),r=n.substring(e.length);f[t][0]=r,f[t].index+=e.length}}),f.forEach(function(t,r){let i=t[0];if(!i)return;let p=t.index;if(p<u)return;if(l){if(i!==`</`+s.name+`>`)return;l=!1}let m=i.charAt(1)!==`/`,h=i.startsWith(`<!--`),g=p+i.length,_=e.charAt(g),v=f[r+1],y;if(_===`<`&&v){let t=e.substring(g,v.index);y=t.split(`<`).length>t.split(`>`).length}let b;if(h){let t=lY(i);if(c<0)return a.push(t),a;b=o[c],b.children.push(t);let n=e.slice(g,v?v.index:void 0);return n.length>0&&b.children.push({type:`text`,content:n}),a}if(m){c++,s=lY(i),s.type===`tag`&&n[s.name]&&(s.type=`component`,l=!0);let t=!1;if(!l&&!s.voidElement&&pY.test(s.name)){t=!0,d||=e.toLowerCase();let n=d.indexOf(`</`+s.name.toLowerCase()+`>`,g),r=n===-1?e.length:n,i=e.slice(g,r);i&&s.children.push({type:`text`,content:i}),u=r}!s.voidElement&&!l&&!t&&_&&_!==`<`&&s.children.push({type:`text`,content:e.slice(g,v?v.index:void 0)}),c===0&&a.push(s),b=o[c-1],b&&b.children.push(s),o[c]=s}if((!m||s.voidElement)&&(c>-1&&(s.voidElement||s.name===i.slice(2,-1))&&(c--,s=c===-1?a:o[c]),!l&&(_!==`<`||y)&&_)){b=c===-1?a:o[c].children;let t=v?v.index:-1,n=e.slice(g,t===-1?void 0:t);fY.test(n)&&(n=` `),(t>-1&&c+b.length>=0||n!==` `)&&b.push({type:`text`,content:n})}}),i&&gY(a),a}function vY(e){let t=[];for(let n in e)e[n]===null?t.push(n):t.push(n+`="`+String(e[n]).replace(/"/g,`&quot;`)+`"`);return t.length?` `+t.join(` `):``}function yY(e,t){switch(t.type){case`text`:return e+t.content;case`tag`:{let n=t.voidElement&&t.name.toLowerCase()!==`!doctype`?`/>`:`>`;return e+=`<`+t.name+(t.attrs?vY(t.attrs):``)+n,t.voidElement?e:e+t.children.reduce(yY,``)+`</`+t.name+`>`}case`comment`:return e+=`<!--`+t.comment+`-->`,e}}function bY(e){return e.reduce(function(e,t){return e+yY(``,t)},``)}var xY={parse:_Y,stringify:bY},SY=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);kY(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},CY={},wY=(e,t,n,r)=>{kY(n)&&CY[n]||(kY(n)&&(CY[n]=new Date),SY(e,t,n,r))},TY=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},EY=(e,t,n)=>{e.loadNamespaces(t,TY(e,n))},DY=(e,t,n,r)=>{if(kY(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return EY(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,TY(e,r))},OY=(e,t,n={})=>!t.languages||!t.languages.length?(wY(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),kY=e=>typeof e==`string`,AY=e=>typeof e==`object`&&!!e,jY=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,MY={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},NY=e=>MY[e],PY=e=>e.replace(jY,NY),FY={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:PY,transDefaultProps:void 0},IY=(e={})=>{FY={...FY,...e}},LY=()=>FY,RY,zY=e=>{RY=e},BY=()=>RY,VY=(e,t)=>{if(!e)return!1;let n=e.props?.children??e.children;return t?n.length>0:!!n},HY=e=>{if(!e)return[];let t=e.props?.children??e.children;return e.props?.i18nIsDynamicList?WY(t):t},UY=e=>Array.isArray(e)&&e.every(j.isValidElement),WY=e=>Array.isArray(e)?e:[e],GY=(e,t)=>{let n={...t};return n.props={...t.props,...e.props},n},KY=e=>{let t={};if(!e)return t;let n=e=>{WY(e).forEach(e=>{kY(e)||(VY(e)?n(HY(e)):AY(e)&&!(0,j.isValidElement)(e)&&Object.assign(t,e))})};return n(e),t},qY=(e,t,n,r)=>{if(!e)return``;let i=``,a=WY(e),o=t?.transSupportBasicHtmlNodes?t.transKeepBasicHtmlNodesFor??[]:[];return a.forEach((e,a)=>{if(kY(e)){i+=`${e}`;return}if((0,j.isValidElement)(e)){let{props:s,type:c}=e,l=Object.keys(s).length,u=o.indexOf(c)>-1,d=s.children;if(!d&&u&&!l){i+=`<${c}/>`;return}if(!d&&(!u||l)||s.i18nIsDynamicList){i+=`<${a}></${a}>`;return}if(u&&l<=1){let e=kY(d)?d:qY(d,t,n,r);i+=`<${c}>${e}</${c}>`;return}let f=qY(d,t,n,r);i+=`<${a}>${f}</${a}>`;return}if(e===null){SY(n,`TRANS_NULL_VALUE`,`Passed in a null value as child`,{i18nKey:r});return}if(AY(e)){let{format:t,...a}=e,o=Object.keys(a);if(o.length===1){let e=t?`${o[0]}, ${t}`:o[0];i+=`{{${e}}}`;return}SY(n,`TRANS_INVALID_OBJ`,`Invalid child - Object should only have keys {{ value, format }} (format is optional).`,{i18nKey:r,child:e});return}SY(n,`TRANS_INVALID_VAR`,`Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`,{i18nKey:r,child:e})}),i},JY=(e,t,n,r,i,a,o)=>{if(n===``)return[];let s=i.transKeepBasicHtmlNodesFor||[],c=n&&new RegExp(s.map(e=>`<${e}`).join(`|`)).test(n);if(!e&&!t&&!c&&!o)return[n];let l=t??{},u=e=>{WY(e).forEach(e=>{kY(e)||(VY(e)?u(HY(e)):AY(e)&&!(0,j.isValidElement)(e)&&Object.assign(l,e))})};u(e);let d=Object.keys(l),f=xY.parse(`<0>${n}</0>`,{allowedTags:e=>/^\d+$/.test(e)||s.indexOf(e)>-1||d.indexOf(e)>-1}),p={...l,...a},m=(e,t,n)=>{let r=HY(e),i=g(r,t.children,n);return UY(r)&&i.length===0||e.props?.i18nIsDynamicList?r:i},h=(e,t,n,r,i)=>{e.dummy?(e.children=t,n.push((0,j.cloneElement)(e,{key:r},i?void 0:t))):n.push(...j.Children.map([e],e=>{if(e.type===j.Fragment||e.props?.i18nIsDynamicList!==void 0){let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`children`||t===`i18nIsDynamicList`||(n[t]=e.props[t])}),(0,j.createElement)(e.type,n,i?null:t)}let n={key:r};return e&&e.props&&Object.keys(e.props).forEach(t=>{t===`ref`||t===`children`||(n[t]=e.props[t])}),(0,j.cloneElement)(e,n,i?null:t)}))},g=(e,n,a)=>{let l=WY(e),u=WY(n),d={};return u.reduce((e,n,u)=>{let f=n.children?.[0]?.content&&r.services.interpolator.interpolate(n.children[0].content,p,r.language);if(n.type===`tag`){let _=l[parseInt(n.name,10)];!_&&t&&(_=t[n.name]),a.length===1&&!_&&(_=a[0][n.name]),_||={};let v={...n.attrs};o&&Object.keys(v).forEach(e=>{let t=v[e];kY(t)&&(v[e]=PY(t))});let y=Object.keys(v).length===0?_:GY({props:v},_),b=(0,j.isValidElement)(y),x=b&&VY(n,!0)&&!n.voidElement,S=c&&AY(y)&&y.dummy&&!b,C=AY(t)&&Object.hasOwnProperty.call(t,n.name);if(kY(y)){let t=r.services.interpolator.interpolate(y,p,r.language);e.push(t)}else if(VY(y)||x)h(y,m(y,n,a),e,u);else if(S)h(y,g(l,n.children,a),e,u);else if(Number.isNaN(parseFloat(n.name)))if(C)h(y,m(y,n,a),e,u,n.voidElement);else if(i.transSupportBasicHtmlNodes&&s.indexOf(n.name)>-1)if(n.voidElement)e.push((0,j.createElement)(n.name,{key:`${n.name}-${u}`}));else{let t=d[n.name]||0;d[n.name]=t+1;let r,i=0;for(let e=0;e<l.length;e+=1){let a=l[e];if((0,j.isValidElement)(a)&&a.type===n.name){if(i===t){r=a;break}i+=1}}let o=g(r?WY(HY(r)):l,n.children,a);e.push((0,j.createElement)(n.name,{key:`${n.name}-${u}`},o))}else if(n.voidElement)e.push(`<${n.name} />`);else{let t=g(l,n.children,a);e.push(`<${n.name}>${t}</${n.name}>`)}else if(AY(y)&&!b){let t=n.children[0]?f:null;t&&e.push(t)}else h(y,f,e,u,n.children.length!==1||!f)}else if(n.type===`text`){let t=i.transWrapTextNodes,a=typeof i.unescape==`function`?i.unescape:LY().unescape,s=o?a(r.services.interpolator.interpolate(n.content,p,r.language)):r.services.interpolator.interpolate(n.content,p,r.language);t?e.push((0,j.createElement)(t,{key:`${n.name}-${u}`},s)):e.push(s)}return e},[])};return HY(g([{dummy:!0,children:e||[]}],f,WY(e||[]))[0])},YY=(e,t,n)=>{let r=e.key||t,i=(0,j.cloneElement)(e,{key:r});if(!i.props||!i.props.children||n.indexOf(`${t}/>`)<0&&n.indexOf(`${t} />`)<0)return i;function a(){return(0,j.createElement)(j.Fragment,null,i)}return(0,j.createElement)(a,{key:r})},XY=(e,t)=>e.map((e,n)=>YY(e,n,t)),ZY=(e,t)=>{let n={};return Object.keys(e).forEach(r=>{Object.assign(n,{[r]:YY(e[r],r,t)})}),n},QY=(e,t,n,r)=>e?Array.isArray(e)?XY(e,t):AY(e)?ZY(e,t):(wY(n,`TRANS_INVALID_COMPONENTS`,`<Trans /> "components" prop expects an object or array`,{i18nKey:r}),null):null,$Y=e=>!AY(e)||Array.isArray(e)?!1:Object.keys(e).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function eX({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a={},values:o,defaults:s,components:c,ns:l,i18n:u,t:d,shouldUnescape:f,...p}){let m=u||BY();if(!m)return wY(m,`NO_I18NEXT_INSTANCE`,`Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`,{i18nKey:r}),e;let h=d||m.t.bind(m)||(e=>e),g={...LY(),...m.options?.react},_=l||h.ns||m.options?.defaultNS;_=kY(_)?[_]:_||[`translation`];let{transDefaultProps:v}=g,y=v?.tOptions?{...v.tOptions,...a}:a,b=f??v?.shouldUnescape,x=v?.values?{...v.values,...o}:o,S=v?.components?{...v.components,...c}:c,C=qY(e,g,m,r),w=s||y?.defaultValue||C||g.transEmptyNodeValue||(typeof r==`function`?zJ(r):r),{hashTransKey:T}=g,E=r||(T?T(C||w):C||w);o=m.options?.interpolation?.defaultVariables?x&&Object.keys(x).length>0?{...x,...m.options.interpolation.defaultVariables}:{...m.options.interpolation.defaultVariables}:x;let D=KY(e);D&&typeof D.count==`number`&&t===void 0&&(t=D.count);let O=o||t!==void 0&&!m.options?.interpolation?.alwaysFormat||!e?y.interpolation:{interpolation:{...y.interpolation,prefix:`#$?`,suffix:`?$#`}},ee={...y,context:i||y.context,count:t,...o,...O,defaultValue:w,ns:_},te=E?h(E,ee):w;te===E&&w&&(te=w);let ne=QY(S,te,m,r),k=ne||e,re=null;$Y(ne)&&(re=ne,k=e);let ie=JY(k,re,te,m,g,ee,b),ae=n??g.defaultTransParent;return ae?(0,j.createElement)(ae,p,ie):ie}var tX={type:`3rdParty`,init(e){IY(e.options.react),zY(e)}},nX=(0,j.createContext)(),rX=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};function iX({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a={},values:o,defaults:s,components:c,ns:l,i18n:u,t:d,shouldUnescape:f,...p}){let{i18n:m,defaultNS:h}=(0,j.useContext)(nX)||{},g=u||m||BY(),_=d||g?.t.bind(g);return eX({children:e,count:t,parent:n,i18nKey:r,context:i,tOptions:a,values:o,defaults:s,components:c,ns:l||_?.ns||h||g?.options?.defaultNS,i18n:g,t:d,shouldUnescape:f,...p})}var aX=i((e=>{var t=c();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,l=r[1];return o(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),a(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),oX=i(((e,t)=>{t.exports=aX()})),sX=oX(),cX={t:(e,t)=>{if(kY(t))return t;if(AY(t)&&kY(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},lX=()=>()=>{},uX=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,j.useContext)(nX)||{},a=n||r||BY();a&&!a.reportNamespaces&&(a.reportNamespaces=new rX),a||wY(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let o=(0,j.useMemo)(()=>({...LY(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=kY(l)?[l]:l||[`translation`],d=(0,j.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,j.useRef)(0),p=(0,j.useCallback)(e=>{if(!a)return lX;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,j.useRef)(),h=(0,j.useCallback)(()=>{if(!a)return cX;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>OY(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c,{scopeNs:d}),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,j.useState)(0),{t:v,ready:y}=(0,sX.useSyncExternalStore)(p,h,h);(0,j.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?DY(a,t.lng,d,e):EY(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,j.useRef)(null),S=(0,j.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,`__original`,{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,j.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(wY(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y){let e=!1;try{e=!1}catch{}throw e&&wY(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),new Promise(e=>{let n=()=>e();t.lng?DY(a,t.lng,d,n):EY(a,d,n)})}return w},dX=[`__proto__`,`constructor`,`prototype`];function fX(e,t,n){function r(e){return e&&e.indexOf(`###`)>-1?e.replace(/###/g,`.`):e}function i(){return!e||typeof e==`string`}for(var a=typeof t==`string`?t.split(`.`):[].concat(t);a.length>1;){if(i())return{};var o=r(a.shift());if(dX.indexOf(o)>-1)return{};!e[o]&&n&&(e[o]=new n),e=e[o]}if(i())return{};var s=r(a.shift());return dX.indexOf(s)>-1?{}:{obj:e,k:s}}function pX(e,t,n){var r=fX(e,t,Object),i=r.obj,a=r.k;i!==void 0&&(i[a]=n)}function mX(e,t){var n=fX(e,t),r=n.obj,i=n.k;if(r)return r[i]}var hX=[],gX=hX.forEach,_X=hX.slice;function vX(e){return gX.call(_X.call(arguments,1),function(t){if(t)for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];dX.indexOf(i)>-1||e[i]===void 0&&(e[i]=t[i])}}),e}function yX(e,t){let n=t&&t.cache?t.cache:kX,r=t&&t.serializer?t.serializer:DX;return(t&&t.strategy?t.strategy:wX)(e,{cache:n,serializer:r})}function bX(e){return e==null||typeof e==`number`||typeof e==`boolean`}function xX(e,t,n,r){let i=bX(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function SX(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function CX(e,t,n,r,i){return n.bind(t,e,r,i)}function wX(e,t){let n=e.length===1?xX:SX;return CX(e,this,n,t.cache.create(),t.serializer)}function TX(e,t){return CX(e,this,SX,t.cache.create(),t.serializer)}function EX(e,t){return CX(e,this,xX,t.cache.create(),t.serializer)}var DX=function(){return JSON.stringify(arguments)},OX=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}},kX={create:function(){return new OX}},AX={variadic:TX,monadic:EX},jX=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function MX(e){let t={};return e.replace(jX,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var NX=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function PX(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(NX).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function FX(e){return e.replace(/^(.*?)-/,``)}var IX=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,LX=/^(@+)?(\+|#+)?[rs]?$/g,RX=/(\*)(0+)|(#+)(0+)|(0+)/g,zX=/^(0+)$/;function BX(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(LX,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function VX(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function HX(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!zX.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function UX(e){return VX(e)||{}}function WX(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=FX(n.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...UX(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...UX(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(RX,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(zX.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(IX.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(IX,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...BX(e)});continue}if(LX.test(n.stem)){t={...t,...BX(n.stem)};continue}let e=VX(n.stem);e&&(t={...t,...e});let r=HX(n.stem);r&&(t={...t,...r})}return t}var GX=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function KX(e){return e.type===0}function qX(e){return e.type===1}function JX(e){return e.type===2}function YX(e){return e.type===3}function XX(e){return e.type===4}function ZX(e){return e.type===5}function QX(e){return e.type===6}function $X(e){return e.type===7}function eZ(e){return e.type===8}function tZ(e){return!!(e&&typeof e==`object`&&e.type===0)}function nZ(e){return!!(e&&typeof e==`object`&&e.type===1)}var rZ=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,iZ={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function aZ(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`j`){let a=0;for(;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;let o=1+(a&1),s=a<2?1:3+(a>>1),c=oZ(t);for((c==`H`||c==`k`)&&(s=0);s-- >0;)n+=`a`;for(;o-- >0;)n=c+n}else i===`J`?n+=`H`:n+=i}return n}function oZ(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let n=e.language,r;return n!==`root`&&(r=e.maximize().region),(iZ[r||``]||iZ[n||``]||iZ[`${n}-001`]||iZ[`001`])[0]}var sZ=RegExp(`^${rZ.source}*`),cZ=RegExp(`${rZ.source}*$`);function lZ(e,t){return{start:e,end:t}}var uZ=!!Object.fromEntries,dZ=!!String.prototype.trimStart,fZ=!!String.prototype.trimEnd,pZ=uZ?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},mZ=dZ?function(e){return e.trimStart()}:function(e){return e.replace(sZ,``)},hZ=fZ?function(e){return e.trimEnd()}:function(e){return e.replace(cZ,``)},gZ=RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);function _Z(e,t){return gZ.lastIndex=t,gZ.exec(e)[1]??``}function vZ(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r<e.length;){let i=e.charCodeAt(r);switch(i){case 35:case 39:case 60:case 123:case 125:return null}if(i===10)t++,n=1,r++;else if(n++,i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);r+=t>=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var yZ=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=vZ(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,location:lZ(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:lZ(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,lZ(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&bZ(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:lZ(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!bZ(this.char()))return this.error(23,lZ(o,this.clonePosition()));let e=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:8,value:r,children:a,location:lZ(n,this.clonePosition())},err:null}:this.error(23,lZ(o,this.clonePosition()))):this.error(26,lZ(e,this.clonePosition()))}else return this.error(27,lZ(n,this.clonePosition()))}else return this.error(23,lZ(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&SZ(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}let i=lZ(n,this.clonePosition());return{val:{type:0,value:r,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!xZ(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,lZ(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,lZ(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,lZ(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,lZ(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:lZ(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,lZ(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,lZ(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=_Z(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:lZ(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,lZ(i,o));case`number`:case`date`:case`time`:{this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=hZ(n.val);if(r.length===0)return this.error(6,lZ(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:lZ(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=lZ(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=mZ(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}else{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=aZ(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?MX(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:e?.style??null},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,lZ(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,lZ(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=lZ(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:pZ(c.val),location:u},err:null}:{val:{type:6,value:n,options:pZ(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,lZ(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,lZ(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,lZ(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump();break}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=PX(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?WX(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=lZ(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,lZ(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:lZ(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,lZ(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,lZ(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=lZ(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&CZ(this.char());)this.bump()}peek(){if(this.isEOF())return null;let e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function bZ(e){return e>=97&&e<=122||e>=65&&e<=90}function xZ(e){return bZ(e)||e===47}function SZ(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function CZ(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function wZ(e){e.forEach(e=>{if(delete e.location,ZX(e)||QX(e))for(let t in e.options)delete e.options[t].location,wZ(e.options[t].value);else JX(e)&&tZ(e.style)||(YX(e)||XX(e))&&nZ(e.style)?delete e.style.location:eZ(e)&&wZ(e.children)})}function TZ(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new yZ(e,t).parse();if(n.err){let e=SyntaxError(GX[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t?.captureLocation||wZ(n.val),n.val}var EZ=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},DZ=class extends EZ{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},OZ=class extends EZ{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},kZ=class extends EZ{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function AZ(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function jZ(e){return typeof e==`function`}function MZ(e,t,n,r,i,a,o){if(e.length===1&&KX(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(KX(c)){s.push({type:0,value:c.value});continue}if($X(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new kZ(e,o);let l=i[e];if(qX(c)){(!l||typeof l==`string`||typeof l==`number`||typeof l==`bigint`)&&(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});continue}if(YX(c)){let e=typeof c.style==`string`?r.date[c.style]:nZ(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(XX(c)){let e=typeof c.style==`string`?r.time[c.style]:nZ(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)});continue}if(JX(c)){let e=typeof c.style==`string`?r.number[c.style]:tZ(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)});continue}if(eZ(c)){let{children:e,value:l}=c,u=i[l];if(!jZ(u))throw new OZ(l,`function`,o);let d=u(MZ(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(ZX(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new DZ(c.value,l,Object.keys(c.options),o);s.push(...MZ(a.value,t,n,r,i));continue}if(QX(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new EZ(`Intl.PluralRules is not available in this environment.
115
115
  Try polyfilling it using "@formatjs/intl-pluralrules"
116
116
  `,`MISSING_INTL_API`,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new DZ(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...MZ(a.value,t,n,r,i,u-(c.offset||0)));continue}}return AZ(s)}function NZ(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function PZ(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=NZ(e[r],t[r]),n),{...e}):e}function FZ(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function IZ(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:yX((...e)=>new Intl.NumberFormat(...e),{cache:FZ(e.number),strategy:AX.variadic}),getDateTimeFormat:yX((...e)=>new Intl.DateTimeFormat(...e),{cache:FZ(e.dateTime),strategy:AX.variadic}),getPluralRules:yX((...e)=>new Intl.PluralRules(...e),{cache:FZ(e.pluralRules),strategy:AX.variadic})}}var LZ=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==0||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n},this.formatToParts=e=>MZ(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message),this.resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}),this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=PZ(e.formats,r),this.formatters=i&&i.formatters||IZ(this.formatterCache)}static{this.memoizedDefaultLocale=null}static get defaultLocale(){return e.memoizedDefaultLocale||=new Intl.NumberFormat().resolvedOptions().locale,e.memoizedDefaultLocale}static{this.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])}}static{this.__parse=TZ}static{this.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}}}};function RZ(e,t){return UZ(e)||HZ(e,t)||BZ(e,t)||zZ()}function zZ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
117
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BZ(e,t){if(e){if(typeof e==`string`)return VZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VZ(e,t)}}function VZ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function HZ(e,t){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function UZ(e){if(Array.isArray(e))return e}function WZ(e){"@babel/helpers - typeof";return WZ=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},WZ(e)}function GZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GZ(Object(n),!0).forEach(function(t){qZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JZ(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function YZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function XZ(e,t,n){return t&&YZ(e.prototype,t),n&&YZ(e,n),e}function ZZ(){return{memoize:!0,memoizeFallback:!1,bindI18n:``,bindI18nStore:``,parseErrorHandler:function(e,t,n,r){return n},parseLngForICU:function(e){return e},escapeVariables:!1}}var QZ=function(){function e(t){JZ(this,e),this.type=`i18nFormat`,this.mem={},this.init(null,t)}return XZ(e,[{key:`init`,value:function(e,t){var n=this,r=e&&e.options&&e.options.i18nFormat||{};if(this.options=vX(r,t,this.options||{},ZZ()),this.formats=this.options.formats,e){var i=this.options,a=i.bindI18n,o=i.bindI18nStore,s=i.memoize;e.IntlMessageFormat=LZ,e.ICU=this,s&&(a&&e.on(a,function(){return n.clearCache()}),o&&e.store.on(o,function(){return n.clearCache()}))}}},{key:`addUserDefinedFormats`,value:function(e){this.formats=this.formats?KZ(KZ({},this.formats),e):e}},{key:`parse`,value:function(e,t,n,r,i,a){var o=a&&a.resolved&&a.resolved.res,s=this.options.memoize&&`${n}.${r}.${i.replace(/\./g,`###`)}`,c;this.options.memoize&&(c=mX(this.mem,s));try{return c||(c=new LZ(e,this.options.parseLngForICU(n),this.formats,{ignoreTag:!0}),this.options.memoize&&(this.options.memoizeFallback||!a||o)&&pX(this.mem,s,c)),c.format(this.escapeVariableValues(t))}catch(n){return this.options.parseErrorHandler(n,i,e,t)}}},{key:`addLookupKeys`,value:function(e,t,n,r,i){return e}},{key:`clearCache`,value:function(){this.mem={}}},{key:`escapeVariableValues`,value:function(e){if(!this.options.escapeVariables||!e||WZ(e)!==`object`)return e;for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=RZ(r[n],2),a=i[0],o=i[1];typeof o==`string`?t[a]=o.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`):t[a]=o}return t}}]),e}();QZ.type=`i18nFormat`;var $Z;(function(e){e.Unimplemented=`UNIMPLEMENTED`,e.Unavailable=`UNAVAILABLE`})($Z||={});var eQ=class extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}},tQ=e=>e?.androidBridge?`android`:e?.webkit?.messageHandlers?.bridge?`ios`:`web`,nQ=e=>{let t=e.CapacitorCustomPlatform||null,n=e.Capacitor||{},r=n.Plugins=n.Plugins||{},i=()=>t===null?tQ(e):t.name,a=()=>i()!==`web`,o=e=>!!(l.get(e)?.platforms.has(i())||s(e)),s=e=>n.PluginHeaders?.find(t=>t.name===e),c=t=>e.console.error(t),l=new Map;return n.convertFileSrc||=e=>e,n.getPlatform=i,n.handleError=c,n.isNativePlatform=a,n.isPluginAvailable=o,n.registerPlugin=(e,a={})=>{let o=l.get(e);if(o)return console.warn(`Capacitor plugin "${e}" already registered. Cannot register plugins twice.`),o.proxy;let c=i(),u=s(e),d,f=async()=>(!d&&c in a?d=d=typeof a[c]==`function`?await a[c]():a[c]:t!==null&&!d&&`web`in a&&(d=d=typeof a.web==`function`?await a.web():a.web),d),p=(t,r)=>{if(u){let i=u?.methods.find(e=>r===e.name);if(i)return i.rtype===`promise`?t=>n.nativePromise(e,r.toString(),t):(t,i)=>n.nativeCallback(e,r.toString(),t,i);if(t)return t[r]?.bind(t)}else if(t)return t[r]?.bind(t);else throw new eQ(`"${e}" plugin is not implemented on ${c}`,$Z.Unimplemented)},m=t=>{let n,r=(...r)=>{let i=f().then(i=>{let a=p(i,t);if(a){let e=a(...r);return n=e?.remove,e}else throw new eQ(`"${e}.${t}()" is not implemented on ${c}`,$Z.Unimplemented)});return t===`addListener`&&(i.remove=async()=>n()),i};return r.toString=()=>`${t.toString()}() { [capacitor code] }`,Object.defineProperty(r,`name`,{value:t,writable:!1,configurable:!1}),r},h=m(`addListener`),g=m(`removeListener`),_=(e,t)=>{let n=h({eventName:e},t),r=async()=>{g({eventName:e,callbackId:await n},t)},i=new Promise(e=>n.then(()=>e({remove:r})));return i.remove=async()=>{console.warn(`Using addListener() without 'await' is deprecated.`),await r()},i},v=new Proxy({},{get(e,t){switch(t){case`$$typeof`:return;case`toJSON`:return()=>({});case`addListener`:return u?_:h;case`removeListener`:return g;default:return m(t)}}});return r[e]=v,l.set(e,{name:e,proxy:v,platforms:new Set([...Object.keys(a),...u?[c]:[]])}),v},n.Exception=eQ,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},rQ=(e=>e.Capacitor=nQ(e))(typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}),iQ=rQ.registerPlugin,aQ=class{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(e,t){let n=!1;this.listeners[e]||(this.listeners[e]=[],n=!0),this.listeners[e].push(t);let r=this.windowListeners[e];return r&&!r.registered&&this.addWindowListener(r),n&&this.sendRetainedArgumentsForEvent(e),Promise.resolve({remove:async()=>this.removeListener(e,t)})}async removeAllListeners(){this.listeners={};for(let e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t,n){let r=this.listeners[e];if(!r){if(n){let n=this.retainedEventArguments[e];n||=[],n.push(t),this.retainedEventArguments[e]=n}return}r.forEach(e=>e(t))}hasListeners(e){return!!this.listeners[e]?.length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(e=`not implemented`){return new rQ.Exception(e,$Z.Unimplemented)}unavailable(e=`not available`){return new rQ.Exception(e,$Z.Unavailable)}async removeListener(e,t){let n=this.listeners[e];if(!n)return;let r=n.indexOf(t);this.listeners[e].splice(r,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){let t=this.retainedEventArguments[e];t&&(delete this.retainedEventArguments[e],t.forEach(t=>{this.notifyListeners(e,t)}))}},oQ=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),sQ=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent),cQ=class extends aQ{async getCookies(){let e=document.cookie,t={};return e.split(`;`).forEach(e=>{if(e.length<=0)return;let[n,r]=e.replace(/=/,`CAP_COOKIE`).split(`CAP_COOKIE`);n=sQ(n).trim(),r=sQ(r).trim(),t[n]=r}),t}async setCookie(e){try{let t=oQ(e.key),n=oQ(e.value),r=e.expires?`; expires=${e.expires.replace(`expires=`,``)}`:``,i=(e.path||`/`).replace(`path=`,``),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:``;document.cookie=`${t}=${n||``}${r}; path=${i}; ${a};`}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(e){return Promise.reject(e)}}async clearCookies(){try{let e=document.cookie.split(`;`)||[];for(let t of e)document.cookie=t.replace(/^ +/,``).replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}};iQ(`CapacitorCookies`,{web:()=>new cQ});var lQ=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;t(e.indexOf(`,`)>=0?e.split(`,`)[1]:e)},r.onerror=e=>n(e),r.readAsDataURL(e)}),uQ=(e={})=>{let t=Object.keys(e);return Object.keys(e).map(e=>e.toLocaleLowerCase()).reduce((n,r,i)=>(n[r]=e[t[i]],n),{})},dQ=(e,t=!0)=>e?Object.entries(e).reduce((e,n)=>{let[r,i]=n,a,o;return Array.isArray(i)?(o=``,i.forEach(e=>{a=t?encodeURIComponent(e):e,o+=`${r}=${a}&`}),o.slice(0,-1)):(a=t?encodeURIComponent(i):i,o=`${r}=${a}`),`${e}&${o}`},``).substr(1):null,fQ=(e,t={})=>{let n=Object.assign({method:e.method||`GET`,headers:e.headers},t),r=uQ(e.headers)[`content-type`]||``;if(typeof e.data==`string`)n.body=e.data;else if(r.includes(`application/x-www-form-urlencoded`)){let t=new URLSearchParams;for(let[n,r]of Object.entries(e.data||{}))t.set(n,r);n.body=t.toString()}else if(r.includes(`multipart/form-data`)||e.data instanceof FormData){let t=new FormData;if(e.data instanceof FormData)e.data.forEach((e,n)=>{t.append(n,e)});else for(let n of Object.keys(e.data))t.append(n,e.data[n]);n.body=t;let r=new Headers(n.headers);r.delete(`content-type`),n.headers=r}else (r.includes(`application/json`)||typeof e.data==`object`)&&(n.body=JSON.stringify(e.data));return n},pQ=class extends aQ{async request(e){let t=fQ(e,e.webFetchExtra),n=dQ(e.params,e.shouldEncodeUrlParams),r=n?`${e.url}?${n}`:e.url,i=await fetch(r,t),a=i.headers.get(`content-type`)||``,{responseType:o=`text`}=i.ok?e:{};a.includes(`application/json`)&&(o=`json`);let s,c;switch(o){case`arraybuffer`:case`blob`:c=await i.blob(),s=await lQ(c);break;case`json`:s=await i.json();break;default:s=await i.text()}let l={};return i.headers.forEach((e,t)=>{l[t]=e}),{data:s,headers:l,status:i.status,url:i.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:`GET`}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:`POST`}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:`PUT`}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:`PATCH`}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:`DELETE`}))}};iQ(`CapacitorHttp`,{web:()=>new pQ});var mQ;(function(e){e.Dark=`DARK`,e.Light=`LIGHT`,e.Default=`DEFAULT`})(mQ||={});var hQ;(function(e){e.StatusBar=`StatusBar`,e.NavigationBar=`NavigationBar`})(hQ||={});var gQ=class extends aQ{async setStyle(){this.unavailable(`not available for web`)}async setAnimation(){this.unavailable(`not available for web`)}async show(){this.unavailable(`not available for web`)}async hide(){this.unavailable(`not available for web`)}};iQ(`SystemBars`,{web:()=>new gQ});function _Q(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var vQ=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return vQ(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return vQ(t)(e)}}}},yQ=(e,t)=>(n,r,i)=>{let a={storage:_Q(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return vQ(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p};function bQ(e){let t={};if(typeof e.type==`string`&&(t.type=e.type),typeof e.level==`string`&&(t.level=fo(e.level)),typeof e.event_id==`string`&&(t.event_id=e.event_id),typeof e.category==`string`&&(t.category=e.category),typeof e.message==`string`&&(t.message=e.message),typeof e.data==`object`&&e.data!==null&&(t.data=e.data),typeof e.timestamp==`string`){let n=Date.parse(e.timestamp)/1e3;isNaN(n)||(t.timestamp=n)}return t}var xQ=u;function SQ(){return xQ.WEBVIEW_SERVER_URL}function CQ(){return xQ.CAP_SPOTLIGHT_URL}function wQ(e){return{attachStacktrace:e.attachStacktrace,attachThreads:e.attachThreads,debug:e.debug,dist:e.dist,dsn:e.dsn,enabled:e.enabled,enableNdkScopeSync:e.enableNdkScopeSync,enableWatchdogTerminationTracking:e.enableWatchdogTerminationTracking,environment:e.environment,maxBreadcrumbs:e.maxBreadcrumbs,release:e.release,sampleRate:e.sampleRate,sendClientReports:e.sendClientReports,sendDefaultPii:e.sendDefaultPii,sessionTrackingIntervalMillis:e.sessionTrackingIntervalMillis,tracesSampleRate:e.tracesSampleRate,enableCaptureFailedRequests:e.enableCaptureFailedRequests,...e.strictTraceContinuation!==void 0&&{strictTraceContinuation:e.strictTraceContinuation},...e.orgId!==void 0&&{orgId:e.orgId},...TQ(e),...EQ(e),...DQ()}}function TQ(e){return rQ.getPlatform()===`ios`?{enableAppHangTracking:e.enableAppHangTracking,appHangTimeoutInterval:e.appHangTimeoutInterval}:{}}function EQ(e){if(e.enableLogs&&rQ.getPlatform()===`android`)return{enableLogs:!0}}function DQ(){let e=CQ();if(e)return{sidecarUrl:e}}var OQ=iQ(`SentryCapacitor`),kQ=`value`;function AQ(e){let t=Yt()?.getOptions(),n=pr(e,t?.normalizeDepth,t?.normalizeMaxBreadth);return typeof n!=`object`||!n?{[kQ]:n}:n}function jQ(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}var MQ=[],NQ=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;for(let e=0;e<64;++e)MQ[e]=NQ[e];function PQ(e){return MQ[e>>18&63]+MQ[e>>12&63]+MQ[e>>6&63]+MQ[e&63]}function FQ(e,t,n){let r,i=[];for(let a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(PQ(r));return i.join(``)}function IQ(e){let t,n=e.length,r=n%3,i=[],a=16383;for(let t=0,o=n-r;t<o;t+=a)i.push(FQ(e,t,t+a>o?o:t+a));return r===1?(t=e[n-1],i.push(`${MQ[t>>2]+MQ[t<<4&63]}==`)):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(`${MQ[t>>10]+MQ[t>>4&63]+MQ[t<<2&63]}=`)),i.join(``)}var LQ={async sendEnvelope(e){if(!this.enableNative)throw this._DisabledNativeError;if(!this.isNativeClientAvailable())throw this._NativeClientError;let[t,n]=e,r=jQ(JSON.stringify(t));r.push(10);for(let e of n){let[t,n]=this._processItem(e),i,a=[];typeof n==`string`?(i=`text/plain`,a=jQ(n)):n instanceof Uint8Array?(i=typeof t.content_type==`string`?t.content_type:`application/octet-stream`,a=[...n]):(i=typeof t.content_type==`string`?t.content_type:`application/json`,a=jQ(JSON.stringify(n))),t.content_type=i,t.length=a.length;let o=JSON.stringify(t);r.push(...jQ(o)),r.push(10),r=r.concat(a),r.push(10)}let i=200;return await OQ.captureEnvelope({envelope:IQ(r)}).then(e=>e,e=>{D.error(`Failed to capture Envelope: `,e),i=500}),{statusCode:i}},async initNativeSdk(e){if(!e.dsn)return D.warn(`Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized.`),this.enableNative=!1,!1;if(!e.enableNative)return e.enableNativeNagger&&D.warn(`Note: Native Sentry SDK is disabled.`),this.enableNative=!1,!1;if(!this.isNativeClientAvailable())throw this._NativeClientError;let t=wQ(e);return OQ.initNativeSdk({options:t})},async fetchNativeDeviceContexts(){if(!this.enableNative)throw this._DisabledNativeError;if(!this.isNativeClientAvailable())throw this._NativeClientError;return OQ.fetchNativeDeviceContexts()},async fetchNativeLogAttributes(){if(!this.enableNative)throw this._DisabledNativeError;if(!this.isNativeClientAvailable())throw this._NativeClientError;return OQ.fetchNativeLogAttributes()},async fetchNativeRelease(){if(!this.enableNative)throw this._DisabledNativeError;return OQ.fetchNativeRelease()},async fetchNativeSdkInfo(){if(!this.enableNative)throw this._DisabledNativeError;return OQ.fetchNativeSdkInfo()},crash(){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;OQ.crash()}},setUser(e){if(!this.enableNative)return;if(!this.isNativeClientAvailable())throw this._NativeClientError;let t=null,n=null;if(e){let{id:r,ip_address:i,email:a,username:o,...s}=e;t=this._serializeObject({email:a,id:r,ip_address:i,username:o},!0),n=this._serializeObject(s,!0)}OQ.setUser({defaultUserKeys:t,otherUserKeys:n})},setTag(e,t){if(!this.enableNative)return;if(!this.isNativeClientAvailable())throw this._NativeClientError;let n=typeof t==`string`?t:JSON.stringify(t);OQ.setTag({key:e,value:n})},setExtra(e,t){if(!this.enableNative)return;if(!this.isNativeClientAvailable())throw this._NativeClientError;let n=typeof t==`string`?t:JSON.stringify(t);OQ.setExtra({key:e,value:n})},addBreadcrumb(e){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;OQ.addBreadcrumb({...e,level:e.level?this._processLevel(e.level):void 0,data:e.data?AQ(e.data):void 0})}},clearBreadcrumbs(){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;OQ.clearBreadcrumbs()}},closeNativeSdk(){if(!this.enableNative)return D.log(this._DisabledNativeError),Promise.resolve();if(!this.isNativeClientAvailable())throw this._NativeClientError;return OQ.closeNativeSdk().then(()=>{this.enableNative=!1})},setContext(e,t){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;this.platform===`android`?this.setExtra(e,t):OQ.setContext({key:e,value:t===null?null:this._serializeObject(t)})}},pauseAppHangTracking(){if(this.enableNative)if(this.isNativeClientAvailable())this.platform===`ios`?OQ.pauseAppHangTracking():D.warn(`PauseAppHangTracking ${this._IosOnlyMessage}`);else throw this._NativeClientError},resumeAppHangTracking(){if(this.enableNative)if(this.isNativeClientAvailable())this.platform===`ios`?OQ.resumeAppHangTracking():D.warn(`ResumeAppHangTracking ${this._IosOnlyMessage}`);else throw this._NativeClientError},_processItem(e){if(LQ.platform===`android`){let[t,n]=e;if(t.type==`event`||t.type==`transaction`){let e=this._processLevels(n);return`message`in e&&(e.message={message:e.message}),[t,e]}}return e},_serializeObject(e,t){let n={};return Object.keys(e).forEach(r=>{let i=e[r];(t!==!0||i!==void 0)&&(n[r]=typeof i==`string`?i:JSON.stringify(i))}),n},_processLevels(e){return{...e,level:e.level?this._processLevel(e.level):void 0,breadcrumbs:e.breadcrumbs?.map(e=>({...e,level:e.level?this._processLevel(e.level):void 0}))}},_processLevel(e){return e==`log`?`debug`:e==`critical`?`fatal`:e},isModuleLoaded(){return!!OQ},isNativeClientAvailable(){return this.isModuleLoaded()&&rQ.isPluginAvailable(`SentryCapacitor`)},_DisabledNativeError:Error(`Native is disabled`),_NativeClientError:Error(`Native Client is not available, can't start on native.`),_IosOnlyMessage:`is only supported on iOS.`,enableNative:!0,platform:rQ.getPlatform()},RQ=`DeviceContext`,zQ=()=>({name:RQ,processEvent:BQ});async function BQ(e,t,n){try{let t=await LQ.fetchNativeDeviceContexts();if(e.contexts={...t.contexts,...e.contexts},`user`in t){let n=t.user;e.user||={...n}}let r=Array.isArray(t.breadcrumbs)?t.breadcrumbs.map(bQ):void 0;if(r){let t=n?.getOptions().maxBreadcrumbs??100;e.breadcrumbs=r.concat(e.breadcrumbs||[]).sort((e,t)=>(e.timestamp??0)-(t.timestamp??0)).slice(-t)}}catch(e){D.log(`Failed to get device context from native: ${e}`)}return e}var VQ=`EventOrigin`,HQ=()=>({name:VQ,preprocessEvent:UQ});async function UQ(e){return e.tags=e.tags??{},e.tags[`event.origin`]=`javascript`,e.tags[`event.environment`]=`javascript`,e}var WQ=`LogEnricher`,GQ=()=>({name:WQ,setup(e){JQ().then(()=>{e.on(`beforeCaptureLog`,e=>{YQ(e)})},e=>{D.log(e)})}}),KQ=void 0;function qQ(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}async function JQ(){try{let e=await LQ.fetchNativeLogAttributes();KQ={...e?.contexts?.device&&{brand:e.contexts.device?.brand,model:e.contexts.device?.model,family:e.contexts.device?.family},...e?.contexts?.os&&{os:e.contexts.os.name,version:e.contexts.os.version},...e?.release&&{release:e.release}}}catch(e){return Promise.reject(`[LOGS]: Failed to prepare attributes from Native Layer: ${e}`)}return Promise.resolve()}function YQ(e){if(KQ===void 0)return;let t=e.attributes??{};qQ(t,`device.brand`,KQ.brand),qQ(t,`device.model`,KQ.model),qQ(t,`device.family`,KQ.family),qQ(t,`os.name`,KQ.os),qQ(t,`os.version`,KQ.version),qQ(t,`sentry.release`,KQ.release),e.attributes=t}var XQ=`Release`,ZQ=()=>({name:XQ,processEvent:QQ});async function QQ(e,t,n){let r=n.getOptions();if(typeof r?.release==`string`&&(e.release=r.release),typeof r?.dist==`string`&&(e.dist=r.dist),e.release&&e.dist)return e;try{let t=await LQ.fetchNativeRelease();t&&(e.release||=`${t.id}@${t.version}+${t.build}`,e.dist||=`${t.build}`)}catch{}return e}var $Q=()=>ko({iteratee:e$});function e$(e){if(e.filename){let t=/^https?:\/\//.test(e.filename),n=SQ();n?e.filename=e.filename.replace(n,``):e.filename=e.filename.replace(/^https?:\/\/localhost(:\d+)?/,``).replace(/^capacitor:\/\/localhost(:\d+)?/,``),e.filename=e.filename.replace(/^ng:\/\//,``),e.filename===`[native code]`||e.filename===`native`?e.in_app=!1:(t||(e.filename=`app://${e.filename.startsWith(`/`)?e.filename:`/${e.filename}`}`),e.in_app=!0)}return e}var t$=`4.1.0`,n$=`SdkInfo`,r$=null,i$=void 0,a$=()=>({name:n$,processEvent:o$,setup(e){i$=e.getOptions().sendDefaultPii,i$&&e.on(`beforeSendEvent`,(e=>{e.user?.ip_address===`{{auto}}`&&delete e.user.ip_address}))}});async function o$(e){if(LQ.platform===`ios`&&r$===null)try{r$=await LQ.fetchNativeSdkInfo()}catch{D.warn(`[SdkInfo] Native SDK Info retrieval failed...something could be wrong with your Sentry installation.`)}e.platform=e.platform||`javascript`;let t=e.sdk||{};return t.packages=[...t.packages||[],...r$&&[r$]||[],{name:`npm:@sentry/capacitor`,version:t$}],t.settings={infer_ip:i$?`auto`:`never`,...t.settings},e.sdk=t,e}var s$=`SentryNativeLog`,c$;async function l$(e,t,n){let r=await OQ.addListener(s$,e);n()?await r.remove():(t(r),D.log(`Native log listener set up successfully.`))}function u$(e){if(c$)return;let t=rQ.getPlatform();if(t!==`ios`&&t!==`android`){D.log(`Native log listener is only supported on iOS and Android.`);return}let n,r=!1;c$=()=>{r=!0,c$=void 0,n?.remove()},l$(e,e=>{n=e},()=>r).catch(e=>{D.warn(`Failed to set up native log listener:`,e),c$=void 0})}function d$(){c$?.()}function f$(e){let t=`[Native] [${e.component}] ${e.message}`;switch(e.level.toLowerCase()){case`fatal`:case`error`:D.error(t);break;case`warning`:D.warn(t);break;default:D.log(t);break}}function p$(e,t,n){Ue(e,t,n)}function m$(e,t){let n=Ke(e[t]);n&&(e[t]=n)}var h$=new WeakMap;function g$(e){h$.has(e)||(h$.set(e,!0),p$(e,`setUser`,t=>n=>(LQ.setUser(n),t.call(e,n))),p$(e,`setTag`,t=>(n,r)=>(LQ.setTag(n,r),t.call(e,n,r))),p$(e,`setTags`,t=>n=>(Object.keys(n).forEach(e=>{LQ.setTag(e,n[e])}),t.call(e,n))),p$(e,`setExtras`,t=>n=>(Object.keys(n).forEach(e=>{LQ.setExtra(e,n[e])}),t.call(e,n))),p$(e,`setExtra`,t=>(n,r)=>(LQ.setExtra(n,r),t.call(e,n,r))),p$(e,`addBreadcrumb`,t=>(n,r)=>{let i={...n,level:n.level||`info`,data:n.data?AQ(n.data):void 0};t.call(e,i,r);let a=e.getLastBreadcrumb();return a&&LQ.addBreadcrumb(a),e}),p$(e,`clearBreadcrumbs`,t=>()=>(LQ.clearBreadcrumbs(),t.call(e))),p$(e,`setContext`,t=>(n,r)=>(LQ.setContext(n,r),t.call(e,n,r))))}function _$(e){h$.has(e)&&(h$.delete(e),m$(e,`clearBreadcrumbs`),m$(e,`setContext`),m$(e,`setExtra`),m$(e,`setExtras`),m$(e,`setTags`),m$(e,`setTag`),m$(e,`setUser`),m$(e,`addBreadcrumb`))}function v$(e,t){e.enableNative&&(e.transport=t,_$(qt()),_$(Kt()))}function y$(){var e;let t=Yt();if(t){let n=t.getOptions();if(!n._metadata?.sdk)return;let r=n._metadata.sdk;r.name=`${r.name}.capacitor`,r.version=t$,(e=r.packages)==null||e.push({name:`sentry.javascript.capacitor`,version:`4.1.0`}),n._metadata.sdk=r}}function b$(e,t,n,r){LQ.initNativeSdk(t).then(()=>{t.debug&&u$(t.onNativeLog??f$),n(e)}).catch(t=>{console.error(`Native Sentry SDK failed to initialize. Using Sentry JavaScript SDK without native integraiton.
118
- `,{error:t}),v$(e,r),n(e)}).finally(()=>{y$()})}function x$(e){let t=[];return t.push($Q()),t.push(ZQ()),t.push(HQ()),t.push(a$()),e.enableNative?(t.push(zQ()),t.push(GQ())):t.push(ec()),t.push(Ka(),Ga(),Ks(),Gs(),Xs(),co(),mo()),e.enableAutoSessionTracking&&!e.enableNative&&t.push(Js()),t}var S$=()=>{let e=f(),t=e.__SENTRY__=e.__SENTRY__||{};(t[d]=t[`10.52.0`]||{}).encodePolyfill=C$},C$=e=>new Uint8Array(jQ(e)),w$=class{constructor(e={}){this._buffer=ia(e.bufferSize||30)}send(e){return this._buffer.add(()=>LQ.sendEnvelope(e))}flush(e){return this._buffer.drain(e)}};function T$(e={}){return new w$(e)}function E$(e,t={}){return typeof e==`function`?(...n)=>{try{return e(...n)}catch(r){return D.error(t.loggerMessage?t.loggerMessage:`The ${e.name} callback threw an error`,r),n[0]}}:e}var D$=()=>typeof TextEncoder<`u`;function O$(e,t=cc){let n={enableAutoSessionTracking:!0,enableWatchdogTerminationTracking:!0,enableCaptureFailedRequests:!1,...e};n.siblingOptions&&delete n.siblingOptions,n.enabled===!1||LQ.platform===`web`?(n.enableNative=!1,n.enableNativeNagger=!1):(n.enableNativeNagger??=!0,n.enableNative??=!0),n.enableNative&&!e.transport&&LQ.platform!==`web`&&(n.transport=e.transport||T$,n.transportOptions={...e.transportOptions??{},bufferSize:30}),D$()||S$(),n.enableNative&&(g$(qt()),g$(Kt()));let r={...e.siblingOptions?.vueOptions,...e.siblingOptions?.nuxtClientOptions,...n,integrations:E$(e.integrations,{loggerMessage:`The integrations threw an error`}),enableMetrics:n._experiments?.enableMetrics,beforeSendMetric:n._experiments?.beforeSendMetric};r.defaultIntegrations=e.defaultIntegrations===void 0?x$(n):e.defaultIntegrations,b$(r,{...n,enableAutoSessionTracking:LQ.platform!==`web`&&n.enableAutoSessionTracking},t,e.transport)}async function k$(){d$();try{let e=Yt();e&&(await e.close(),await LQ.closeNativeSdk())}catch{D.error(`Failed to close the SDK`)}}var A$;(function(e){e[e.Sunday=1]=`Sunday`,e[e.Monday=2]=`Monday`,e[e.Tuesday=3]=`Tuesday`,e[e.Wednesday=4]=`Wednesday`,e[e.Thursday=5]=`Thursday`,e[e.Friday=6]=`Friday`,e[e.Saturday=7]=`Saturday`})(A$||={});var j$=iQ(`LocalNotifications`,{web:()=>s(()=>import(`./web-Bb3bM_rE.js`).then(e=>new e.LocalNotificationsWeb),[])}),M$=iQ(`Network`,{web:()=>s(()=>import(`./web-ZV0_2EZ9.js`).then(e=>new e.NetworkWeb),[])}),N$=(0,j.createContext)({});function P$(e){let t=(0,j.useRef)(null);return t.current===null&&(t.current=e()),t.current}var F$=typeof window<`u`?j.useLayoutEffect:j.useEffect,I$=(0,j.createContext)(null);function L$(e,t){e.indexOf(t)===-1&&e.push(t)}function R$(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var z$=(e,t,n)=>n>t?t:n<e?e:n,B$={},V$=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),H$=e=>typeof e==`object`&&!!e,U$=e=>/^0[^.\s]+$/u.test(e);function W$(e){let t;return()=>(t===void 0&&(t=e()),t)}var G$=e=>e,K$=(...e)=>e.reduce((e,t)=>n=>t(e(n))),q$=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},J$=class{constructor(){this.subscriptions=[]}add(e){return L$(this.subscriptions,e),()=>R$(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Y$=e=>e*1e3,X$=e=>e/1e3,Z$=(e,t)=>t?1e3/t*e:0,Q$=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},$$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,e1=1e-7,t1=12;function n1(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=$$(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>e1&&++s<t1);return o}function r1(e,t,n,r){if(e===t&&n===r)return G$;let i=t=>n1(t,0,1,e,n);return e=>e===0||e===1?e:$$(i(e),t,r)}var i1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,a1=e=>t=>1-e(1-t),o1=r1(.33,1.53,.69,.99),s1=a1(o1),c1=i1(s1),l1=e=>e>=1?1:(e*=2)<1?.5*s1(e):.5*(2-2**(-10*(e-1))),u1=e=>1-Math.sin(Math.acos(e)),d1=a1(u1),f1=i1(u1),p1=r1(.42,0,1,1),m1=r1(0,0,.58,1),h1=r1(.42,0,.58,1),g1=e=>Array.isArray(e)&&typeof e[0]!=`number`;function _1(e,t){return g1(e)?e[Q$(0,e.length,t)]:e}var v1=e=>Array.isArray(e)&&typeof e[0]==`number`,y1={linear:G$,easeIn:p1,easeInOut:h1,easeOut:m1,circIn:u1,circInOut:f1,circOut:d1,backIn:s1,backInOut:c1,backOut:o1,anticipate:l1},b1=e=>typeof e==`string`,x1=e=>{if(v1(e)){e.length;let[t,n,r,i]=e;return r1(t,n,r,i)}else if(b1(e))return y1[e],`${e}`,y1[e];return e},S1=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function C1(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var w1=40;function T1(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=S1.reduce((e,t)=>(e[t]=C1(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=B$.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,w1),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:S1.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<S1.length;t++)o[S1[t]].cancel(e)},state:i,steps:o}}var{schedule:E1,cancel:D1,state:O1,steps:k1}=T1(typeof requestAnimationFrame<`u`?requestAnimationFrame:G$,!0),A1;function j1(){A1=void 0}var M1={now:()=>(A1===void 0&&M1.set(O1.isProcessing||B$.useManualTiming?O1.timestamp:performance.now()),A1),set:e=>{A1=e,queueMicrotask(j1)}},N1=e=>t=>typeof t==`string`&&t.startsWith(e),P1=N1(`--`),F1=N1(`var(--`),I1=e=>F1(e)?L1.test(e.split(`/*`)[0].trim()):!1,L1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function R1(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var z1={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},B1={...z1,transform:e=>z$(0,1,e)},V1={...z1,default:1},H1=e=>Math.round(e*1e5)/1e5,U1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function W1(e){return e==null}var G1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,K1=(e,t)=>n=>!!(typeof n==`string`&&G1.test(n)&&n.startsWith(e)||t&&!W1(n)&&Object.prototype.hasOwnProperty.call(n,t)),q1=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(U1);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},J1=e=>z$(0,255,e),Y1={...z1,transform:e=>Math.round(J1(e))},X1={test:K1(`rgb`,`red`),parse:q1(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Y1.transform(e)+`, `+Y1.transform(t)+`, `+Y1.transform(n)+`, `+H1(B1.transform(r))+`)`};function Z1(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Q1={test:K1(`#`),parse:Z1,transform:X1.transform},$1=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),e0=$1(`deg`),t0=$1(`%`),G=$1(`px`),n0=$1(`vh`),r0=$1(`vw`),i0={...t0,parse:e=>t0.parse(e)/100,transform:e=>t0.transform(e*100)},a0={test:K1(`hsl`,`hue`),parse:q1(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+t0.transform(H1(t))+`, `+t0.transform(H1(n))+`, `+H1(B1.transform(r))+`)`},o0={test:e=>X1.test(e)||Q1.test(e)||a0.test(e),parse:e=>X1.test(e)?X1.parse(e):a0.test(e)?a0.parse(e):Q1.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?X1.transform(e):a0.transform(e),getAnimatableNone:e=>{let t=o0.parse(e);return t.alpha=0,o0.transform(t)}},s0=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function c0(e){return isNaN(e)&&typeof e==`string`&&(e.match(U1)?.length||0)+(e.match(s0)?.length||0)>0}var l0=`number`,u0=`color`,d0=`var`,f0=`var(`,p0="${}",m0=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function h0(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(m0,e=>(o0.test(e)?(r.color.push(a),i.push(u0),n.push(o0.parse(e))):e.startsWith(f0)?(r.var.push(a),i.push(d0),n.push(e)):(r.number.push(a),i.push(l0),n.push(parseFloat(e))),++a,p0)).split(p0),indexes:r,types:i}}function g0(e){return h0(e).values}function _0({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===l0?i+=H1(r[a]):e===u0?i+=o0.transform(r[a]):i+=r[a]}return i}}function v0(e){return _0(h0(e))}var y0=e=>typeof e==`number`?0:o0.test(e)?o0.getAnimatableNone(e):e,b0=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:y0(e);function x0(e){let t=h0(e);return _0(t)(t.values.map((e,n)=>b0(e,t.split[n])))}var S0={test:c0,parse:g0,createTransformer:v0,getAnimatableNone:x0};function C0(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function w0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=C0(s,r,e+1/3),a=C0(s,r,e),o=C0(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function T0(e,t){return n=>n>0?t:e}var E0=(e,t,n)=>e+(t-e)*n,D0=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},O0=[Q1,X1,a0],k0=e=>O0.find(t=>t.test(e));function A0(e){let t=k0(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===a0&&(n=w0(n)),n}var j0=(e,t)=>{let n=A0(e),r=A0(t);if(!n||!r)return T0(e,t);let i={...n};return e=>(i.red=D0(n.red,r.red,e),i.green=D0(n.green,r.green,e),i.blue=D0(n.blue,r.blue,e),i.alpha=E0(n.alpha,r.alpha,e),X1.transform(i))},M0=new Set([`none`,`hidden`]);function N0(e,t){return M0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function P0(e,t){return n=>E0(e,t,n)}function F0(e){return typeof e==`number`?P0:typeof e==`string`?I1(e)?T0:o0.test(e)?j0:z0:Array.isArray(e)?I0:typeof e==`object`?o0.test(e)?j0:L0:T0}function I0(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>F0(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function L0(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=F0(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function R0(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var z0=(e,t)=>{let n=S0.createTransformer(t),r=h0(e),i=h0(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?M0.has(e)&&!i.values.length||M0.has(t)&&!r.values.length?N0(e,t):K$(I0(R0(r,i),i.values),n):(`${e}${t}`,T0(e,t))};function B0(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?E0(e,t,n):F0(e)(e,t)}var V0=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>E1.update(t,e),stop:()=>D1(t),now:()=>O1.isProcessing?O1.timestamp:M1.now()}},H0=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},U0=2e4;function W0(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function G0(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(W0(r),U0);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:X$(i)}}var K0={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function q0(e,t){return e*Math.sqrt(1-t*t)}var J0=12;function Y0(e,t,n){let r=n;for(let n=1;n<J0;n++)r-=e(r)/t(r);return r}var X0=.001;function Z0({duration:e=K0.duration,bounce:t=K0.bounce,velocity:n=K0.velocity,mass:r=K0.mass}){let i,a;K0.maxDuration;let o=1-t;o=z$(K0.minDamping,K0.maxDamping,o),e=z$(K0.minDuration,K0.maxDuration,X$(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=q0(t,o),c=Math.exp(-i);return X0-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=q0(t**2,o);return(-i(t)+X0>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-X0+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Y0(i,a,s);if(e=Y$(e),isNaN(c))return{stiffness:K0.stiffness,damping:K0.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Q0=[`duration`,`bounce`],$0=[`stiffness`,`damping`,`mass`];function e2(e,t){return t.some(t=>e[t]!==void 0)}function t2(e){let t={velocity:K0.velocity,stiffness:K0.stiffness,damping:K0.damping,mass:K0.mass,isResolvedFromDuration:!1,...e};if(!e2(e,$0)&&e2(e,Q0))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*z$(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:K0.mass,stiffness:i,damping:a}}else{let n=Z0({...e,velocity:0});t={...t,...n,mass:K0.mass},t.isResolvedFromDuration=!0}return t}function n2(e=K0.visualDuration,t=K0.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=t2({...n,velocity:-X$(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=X$(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?K0.restSpeed.granular:K0.restSpeed.default,i||=v?K0.restDelta.granular:K0.restDelta.default;let y,b,x,S,C,w;if(h<1)x=q0(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>Y$(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=Y$(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=Y$(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(W0(T),U0),t=H0(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}n2.applyToOptions=e=>{let t=G0(e,100,n2);return e.ease=t.ease,e.duration=Y$(t.duration),e.type=`keyframes`,e};var r2=5;function i2(e,t,n){let r=Math.max(t-r2,0);return Z$(n-e(r),t-r)}function a2({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=n2({keyframes:[f.value,m(f.value)],velocity:i2(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function o2(e,t,n){let r=[],i=n||B$.mix||B0,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=K$(Array.isArray(t)?t[n]||G$:t,a)),r.push(a)}return r}function s2(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=o2(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=q$(e[r],e[r+1],n);return s[r](i)};return n?t=>l(z$(e[0],e[a-1],t)):l}function c2(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=q$(0,t,r);e.push(E0(n,1,i))}}function l2(e){let t=[0];return c2(t,e.length-1),t}function u2(e,t){return e.map(e=>e*t)}function d2(e,t){return e.map(()=>t||h1).splice(0,e.length-1)}function f2({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=g1(r)?r.map(x1):x1(r),a={done:!1,value:t[0]},o=s2(u2(n&&n.length===t.length?n:l2(t),e),t,{ease:Array.isArray(i)?i:d2(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var p2=e=>e!==null;function m2(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(p2),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var h2={decay:a2,inertia:a2,tween:f2,keyframes:f2,spring:n2};function g2(e){typeof e.type==`string`&&(e.type=h2[e.type])}var _2=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},v2=e=>e/100,y2=class extends _2{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==M1.now()&&this.tick(M1.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;g2(e);let{type:t=f2,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||f2;s!==f2&&typeof o[0]!=`number`&&(this.mixKeyframes=K$(v2,B0(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=W0(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=z$(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==a2&&(b.value=m2(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return X$(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+X$(e)}get time(){return X$(this.currentTime)}set time(e){e=Y$(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return i2(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(M1.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=X$(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=V0,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(M1.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function b2(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var x2=e=>e*180/Math.PI,S2=e=>w2(x2(Math.atan2(e[1],e[0]))),C2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:S2,rotateZ:S2,skewX:e=>x2(Math.atan(e[1])),skewY:e=>x2(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},w2=e=>(e%=360,e<0&&(e+=360),e),T2=S2,E2=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),D2=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),O2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:E2,scaleY:D2,scale:e=>(E2(e)+D2(e))/2,rotateX:e=>w2(x2(Math.atan2(e[6],e[5]))),rotateY:e=>w2(x2(Math.atan2(-e[2],e[0]))),rotateZ:T2,rotate:T2,skewX:e=>x2(Math.atan(e[4])),skewY:e=>x2(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function k2(e){return+!!e.includes(`scale`)}function A2(e,t){if(!e||e===`none`)return k2(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=O2,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=C2,i=t}if(!i)return k2(t);let a=r[t],o=i[1].split(`,`).map(M2);return typeof a==`function`?a(o):o[a]}var j2=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return A2(n,t)};function M2(e){return parseFloat(e.trim())}var N2=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],P2=new Set([...N2,`pathRotation`]),F2=e=>e===z1||e===G,I2=new Set([`x`,`y`,`z`]),L2=N2.filter(e=>!I2.has(e));function R2(e){let t=[];return L2.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var z2={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>A2(t,`x`),y:(e,{transform:t})=>A2(t,`y`)};z2.translateX=z2.x,z2.translateY=z2.y;var B2=new Set,V2=!1,H2=!1,U2=!1;function W2(){if(H2){let e=Array.from(B2).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=R2(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}H2=!1,V2=!1,B2.forEach(e=>e.complete(U2)),B2.clear()}function G2(){B2.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(H2=!0)})}function K2(){U2=!0,G2(),W2(),U2=!1}var q2=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(B2.add(this),V2||(V2=!0,E1.read(G2),E1.resolveKeyframes(W2))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}b2(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),B2.delete(this)}cancel(){this.state===`scheduled`&&(B2.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},J2=e=>e.startsWith(`--`);function Y2(e,t,n){J2(t)?e.style.setProperty(t,n):e.style[t]=n}var X2={};function Z2(e,t){let n=W$(e);return()=>X2[t]??n()}var Q2=Z2(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),$2=Z2(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),e4=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,t4={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:e4([0,.65,.55,1]),circOut:e4([.55,0,1,.45]),backIn:e4([.31,.01,.66,-.59]),backOut:e4([.33,1.53,.69,.99])};function n4(e,t){if(e)return typeof e==`function`?$2()?H0(e,t):`ease-out`:v1(e)?e4(e):Array.isArray(e)?e.map(e=>n4(e,t)||t4.easeOut):t4[e]}function r4(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=n4(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function i4(e){return typeof e==`function`&&`applyToOptions`in e}function a4({type:e,...t}){return i4(e)&&$2()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var o4=class extends _2{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=a4(e);this.animation=r4(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=m2(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Y2(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return X$(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+X$(e)}get time(){return X$(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Y$(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Q2()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),G$):r(this)}},s4={anticipate:l1,backInOut:c1,circInOut:f1};function c4(e){return e in s4}function l4(e){typeof e.ease==`string`&&c4(e.ease)&&(e.ease=s4[e.ease])}var u4=10,d4=class extends o4{constructor(e){l4(e),g2(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new y2({...a,autoplay:!1}),s=Math.max(u4,M1.now()-this.startTime),c=z$(0,u4,s-u4),l=o.sample(s).value,{name:u}=this.options;i&&u&&Y2(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},f4=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(S0.test(e)||e===`0`)&&!e.startsWith(`url(`));function p4(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function m4(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=f4(i,t),s=f4(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:p4(e)||(n===`spring`||i4(n))&&r}function h4(e){e.duration=0,e.type=`keyframes`}var g4=new Set([`opacity`,`clipPath`,`filter`,`transform`]),_4=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function v4(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&_4.test(e[t]))return!0;return!1}var y4=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),b4=W$(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function x4(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return b4()&&n&&(g4.has(n)||y4.has(n)&&v4(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var S4=40,C4=class extends _2{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=M1.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||q2;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=M1.now();let u=!0;m4(e,i,a,o)||(u=!1,(B$.instantAnimations||!s)&&l?.(m2(e,n,t)),e[0]=e[e.length-1],h4(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>S4?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&x4(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new d4({...d,element:p})}catch{m=new y2(d)}else m=new y2(d);m.finished.then(()=>{this.notifyFinished()}).catch(G$),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),K2()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},w4=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return T4(this.animations,`duration`)}get iterationDuration(){return T4(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function T4(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var E4=class extends w4{then(e,t){return this.finished.finally(e).then(()=>{})}};function D4(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var O4=30,k4=e=>!isNaN(parseFloat(e)),A4={current:void 0},j4=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=M1.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=M1.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=k4(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new J$);let n=this.events[e].add(t);return e===`change`?()=>{n(),E1.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return A4.current&&A4.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=M1.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>O4)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,O4);return Z$(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function M4(e,t){return new j4(e,t)}function N4(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function P4(e,t){let n=e?.[t]??e?.default??e;return n===e?n:N4(n,e)}var F4={type:`spring`,stiffness:500,damping:25,restSpeed:10},I4=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),L4={type:`keyframes`,duration:.8},R4={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},z4=(e,{keyframes:t})=>t.length>2?L4:P2.has(e)?e.startsWith(`scale`)?I4(t[1]):F4:R4,B4=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function V4(e){for(let t in e)if(!B4.has(t))return!0;return!1}var H4=(e,t,n,r={},i,a)=>o=>{let s=P4(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Y$(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};V4(s)||Object.assign(u,z4(e,u)),u.duration&&=Y$(u.duration),u.repeatDelay&&=Y$(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(h4(u),u.delay===0&&(d=!0)),(B$.instantAnimations||B$.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,h4(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=m2(u.keyframes,s);if(e!==void 0){E1.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new y2(u):new C4(u)},U4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function W4(e){let t=U4.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function G4(e,t,n=1){`${e}`;let[r,i]=W4(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return V$(e)?parseFloat(e):e}return I1(i)?G4(i,t,n+1):i}function K4(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function q4(e,t,n,r){if(typeof t==`function`){let[i,a]=K4(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=K4(r);t=t(n===void 0?e.custom:n,i,a)}return t}function J4(e,t,n){let r=e.getProps();return q4(r,t,n===void 0?r.custom:n,e)}var Y4=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...N2]),X4=e=>Array.isArray(e);function Z4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,M4(n))}function Q4(e){return X4(e)?e[e.length-1]||0:e}function $4(e,t){let{transitionEnd:n={},transition:r={},...i}=J4(e,t)||{};i={...i,...n};for(let t in i)Z4(e,t,Q4(i[t]))}var e3=e=>!!(e&&e.getVelocity);function t3(e){return!!(e3(e)&&e.add)}function n3(e,t){let n=e.getValue(`willChange`);if(t3(n))return n.add(t);if(!n&&B$.WillChange){let n=new B$.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function r3(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var i3=`data-`+r3(`framerAppearId`);function a3(e){return e.props[i3]}function goe({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function o3(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?N4(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&goe(f,t))continue;let o={delay:n,...P4(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){E1.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=a3(e);if(n){let e=window.MotionHandoffAnimation(n,t,E1);e!==null&&(o.startTime=e,p=!0)}}n3(e,t);let m=l??e.shouldReduceMotion;r.start(H4(t,r,i,m&&Y4.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>E1.update(()=>{o&&$4(e,o)});d.length?Promise.all(d).then(t):t()}return d}function s3(e,t,n={}){let r=J4(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(o3(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return _oe(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function _oe(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(s3(c,t,{...o,delay:n+(typeof r==`function`?0:r)+D4(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function c3(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>s3(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=s3(e,t,n);else{let i=typeof t==`function`?J4(e,t,n.custom):t;r=Promise.all(o3(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var voe={test:e=>e===`auto`,parse:e=>e},l3=e=>t=>t.test(e),u3=[z1,G,t0,e0,r0,n0,voe],d3=e=>u3.find(l3(e));function yoe(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||U$(e)}var boe=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function xoe(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(U1)||[];if(!r)return e;let i=n.replace(r,``),a=+!!boe.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Soe=/\b([a-z-]*)\(.*?\)/gu,f3={...S0,getAnimatableNone:e=>{let t=e.match(Soe);return t?t.map(xoe).join(` `):e}},p3={...S0,getAnimatableNone:e=>{let t=S0.parse(e);return S0.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},m3={...z1,transform:Math.round},h3={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,inset:G,insetBlock:G,insetBlockStart:G,insetBlockEnd:G,insetInline:G,insetInlineStart:G,insetInlineEnd:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,paddingBlock:G,paddingBlockStart:G,paddingBlockEnd:G,paddingInline:G,paddingInlineStart:G,paddingInlineEnd:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,marginBlock:G,marginBlockStart:G,marginBlockEnd:G,marginInline:G,marginInlineStart:G,marginInlineEnd:G,fontSize:G,backgroundPositionX:G,backgroundPositionY:G,rotate:e0,pathRotation:e0,rotateX:e0,rotateY:e0,rotateZ:e0,scale:V1,scaleX:V1,scaleY:V1,scaleZ:V1,skew:e0,skewX:e0,skewY:e0,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:B1,originX:i0,originY:i0,originZ:G,zIndex:m3,fillOpacity:B1,strokeOpacity:B1,numOctaves:m3},Coe={...h3,color:o0,backgroundColor:o0,outlineColor:o0,fill:o0,stroke:o0,borderColor:o0,borderTopColor:o0,borderRightColor:o0,borderBottomColor:o0,borderLeftColor:o0,filter:f3,WebkitFilter:f3,mask:p3,WebkitMask:p3},g3=e=>Coe[e],woe=new Set([f3,p3]);function _3(e,t){let n=g3(e);return woe.has(n)||(n=S0),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Toe=new Set([`auto`,`none`,`0`]);function Eoe(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Toe.has(t)&&h0(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=_3(n,i)}var Doe=class extends q2{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),I1(r))){let i=G4(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Y4.has(n)||e.length!==2)return;let[r,i]=e,a=d3(r),o=d3(i);if(R1(r)!==R1(i)&&z2[n]){this.needsMeasurement=!0;return}if(a!==o)if(F2(a)&&F2(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else z2[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||yoe(e[t]))&&n.push(t);n.length&&Eoe(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=z2[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=z2[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},v3=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function y3(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var b3=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function x3(e){return H$(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:S3,cancel:Ooe}=T1(queueMicrotask,!1),C3={x:!1,y:!1};function w3(){return C3.x||C3.y}function koe(e){return e===`x`||e===`y`?C3[e]?null:(C3[e]=!0,()=>{C3[e]=!1}):C3.x||C3.y?null:(C3.x=C3.y=!0,()=>{C3.x=C3.y=!1})}function T3(e,t){let n=y3(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Aoe(e){return!(e.pointerType===`touch`||w3())}function joe(e,t,n={}){let[r,i,a]=T3(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Aoe(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var E3=(e,t)=>t?e===t?!0:E3(e,t.parentElement):!1,D3=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Moe=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Noe(e){return Moe.has(e.tagName)||e.isContentEditable===!0}var Poe=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Foe(e){return Poe.has(e.tagName)||e.isContentEditable===!0}var O3=new WeakSet;function k3(e){return t=>{t.key===`Enter`&&e(t)}}function A3(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ioe=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=k3(()=>{if(O3.has(n))return;A3(n,`down`);let e=k3(()=>{A3(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>A3(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function j3(e){return D3(e)&&!w3()}var M3=new WeakSet;function Loe(e,t,n={}){let[r,i,a]=T3(e,n),o=e=>{let r=e.currentTarget;if(!j3(e)||M3.has(e))return;O3.add(r),n.stopPropagation&&M3.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),O3.has(r)&&O3.delete(r),j3(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||E3(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),x3(e)&&(e.addEventListener(`focus`,e=>Ioe(e,i)),!Noe(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function N3(e){return H$(e)&&`ownerSVGElement`in e}var P3=new WeakMap,F3,I3=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:N3(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Roe=I3(`inline`,`width`,`offsetWidth`),zoe=I3(`block`,`height`,`offsetHeight`);function Boe({target:e,borderBoxSize:t}){P3.get(e)?.forEach(n=>{n(e,{get width(){return Roe(e,t)},get height(){return zoe(e,t)}})})}function Voe(e){e.forEach(Boe)}function Hoe(){typeof ResizeObserver>`u`||(F3=new ResizeObserver(Voe))}function Uoe(e,t){F3||Hoe();let n=y3(e);return n.forEach(e=>{let n=P3.get(e);n||(n=new Set,P3.set(e,n)),n.add(t),F3?.observe(e)}),()=>{n.forEach(e=>{let n=P3.get(e);n?.delete(t),n?.size||F3?.unobserve(e)})}}var L3=new Set,R3;function Woe(){R3=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};L3.forEach(t=>t(e))},window.addEventListener(`resize`,R3)}function Goe(e){return L3.add(e),R3||Woe(),()=>{L3.delete(e),!L3.size&&typeof R3==`function`&&(window.removeEventListener(`resize`,R3),R3=void 0)}}function z3(e,t){return typeof e==`function`?Goe(e):Uoe(e,t)}var B3={value:null,addProjectionMetrics:null};function V3(e){return N3(e)&&e.tagName===`svg`}function Koe(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=s2(i,a,o);return t?s(r):s}function qoe(e,t,n={}){let r=e.get(),i=null,a=r,o,s=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,c=()=>{i&&=(i.stop(),null),e.animation=void 0},l=()=>{let t=U3(e.get()),r=U3(a);if(t===r){c();return}let s=i?i.getGeneratorVelocity():e.getVelocity();c(),i=new y2({keyframes:[t,r],velocity:s,type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:o})},u=()=>{l(),e.animation=i??void 0,e.events.animationStart?.notify(),i?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{a=e,o=e=>t(H3(e,s)),E1.postRender(u)},c),e3(t)){let r=n.skipInitialAnimation===!0,i=t.on(`change`,t=>{r?(r=!1,e.jump(H3(t,s),!1)):e.set(H3(t,s))}),a=e.on(`destroy`,i);return()=>{i(),a()}}return c}function H3(e,t){return t?e+t:e}function U3(e){return typeof e==`number`?e:parseFloat(e)}var Joe=[...u3,o0,S0],Yoe=e=>Joe.find(l3(e)),W3=()=>({translate:0,scale:1,origin:0,originPoint:0}),G3=()=>({x:W3(),y:W3()}),K3=()=>({min:0,max:0}),q3=()=>({x:K3(),y:K3()}),J3=new WeakMap;function Y3(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function X3(e){return typeof e==`string`||Array.isArray(e)}var Z3=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Q3=[`initial`,...Z3];function $3(e){return Y3(e.animate)||Q3.some(t=>X3(e[t]))}function e6(e){return!!($3(e)||e.variants)}function Xoe(e,t,n){for(let r in t){let i=t[r],a=n[r];if(e3(i))e.addValue(r,i);else if(e3(a))e.addValue(r,M4(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,M4(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var t6={current:null},n6={current:!1},Zoe=typeof window<`u`;function r6(){if(n6.current=!0,Zoe)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>t6.current=e.matches;e.addEventListener(`change`,t),t()}else t6.current=!1}var i6=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],a6={};function o6(e){a6=e}function Qoe(){return a6}var s6=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=q2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=M1.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,E1.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=$3(t),this.isVariantNode=e6(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&e3(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,J3.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(n6.current||r6(),this.shouldReduceMotion=t6.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),D1(this.notifyUpdate),D1(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&g4.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new o4({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Y$(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=P2.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&E1.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in a6){let t=a6[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):q3()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<i6.length;t++){let n=i6[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Xoe(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=M4(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(V$(n)||U$(n))?n=parseFloat(n):!Yoe(n)&&S0.test(t)&&(n=_3(e,t)),this.setBaseTarget(e,e3(n)?n.get():n)),e3(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=q4(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!e3(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new J$),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){S3.render(this.render)}},c6=class extends s6{constructor(){super(...arguments),this.KeyframeResolver=Doe}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;e3(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},l6=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function u6({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $oe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ese(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function d6(e){return e===void 0||e===1}function f6({scale:e,scaleX:t,scaleY:n}){return!d6(e)||!d6(t)||!d6(n)}function p6(e){return f6(e)||m6(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function m6(e){return h6(e.x)||h6(e.y)}function h6(e){return e&&e!==`0%`}function g6(e,t,n){return n+t*(e-n)}function _6(e,t,n,r,i){return i!==void 0&&(e=g6(e,i,r)),g6(e,n,r)+t}function v6(e,t=0,n=1,r,i){e.min=_6(e.min,t,n,r,i),e.max=_6(e.max,t,n,r,i)}function y6(e,{x:t,y:n}){v6(e.x,t.translate,t.scale,t.originPoint),v6(e.y,n.translate,n.scale,n.originPoint)}var b6=.999999999999,x6=1.0000000000001;function tse(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(S6(e.x,-a.scroll.offset.x),S6(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,y6(e,o)),r&&p6(a.latestValues)&&T6(e,a.latestValues,a.layout?.layoutBox))}t.x<x6&&t.x>b6&&(t.x=1),t.y<x6&&t.y>b6&&(t.y=1)}function S6(e,t){e.min+=t,e.max+=t}function C6(e,t,n,r,i=.5){v6(e,t,n,E0(e.min,e.max,i),r)}function w6(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function T6(e,t,n){let r=n??e;C6(e.x,w6(t.x,r.x),t.scaleX,t.scale,t.originX),C6(e.y,w6(t.y,r.y),t.scaleY,t.scale,t.originY)}function E6(e,t){return u6(ese(e.getBoundingClientRect(),t))}function nse(e,t,n){let r=E6(e,n),{scroll:i}=t;return i&&(S6(r.x,i.offset.x),S6(r.y,i.offset.y)),r}var rse={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ise=N2.length;function ase(e,t,n){let r=``,i=!0;for(let a=0;a<ise;a++){let o=N2[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=b3(s,h3[o]);if(!c){i=!1;let t=rse[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${b3(a,h3.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function D6(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(P2.has(e)){o=!0;continue}else if(P1(e)){i[e]=n;continue}else{let t=b3(n,h3[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=ase(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function O6(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function k6(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var A6={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(G.test(e))e=parseFloat(e);else return e;return`${k6(e,t.target.x)}% ${k6(e,t.target.y)}%`}},ose={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=S0.parse(e);if(i.length>5)return r;let a=S0.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=E0(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},j6={borderRadius:{...A6,applyTo:[...v3]},borderTopLeftRadius:A6,borderTopRightRadius:A6,borderBottomLeftRadius:A6,borderBottomRightRadius:A6,boxShadow:ose};function M6(e,{layout:t,layoutId:n}){return P2.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!j6[e]||e===`opacity`)}function N6(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(e3(r[t])||i&&e3(i[t])||M6(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function sse(e){return window.getComputedStyle(e)}var P6=class extends c6{constructor(){super(...arguments),this.type=`html`,this.renderInstance=O6}readValueFromInstance(e,t){if(P2.has(t))return this.projection?.isProjecting?k2(t):j2(e,t);{let n=sse(e),r=(P1(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return E6(e,t)}build(e,t,n){D6(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return N6(e,t,n)}};function cse(e,t){return e in t}var lse=class extends s6{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(cse(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return q3()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},use={offset:`stroke-dashoffset`,array:`stroke-dasharray`},dse={offset:`strokeDashoffset`,array:`strokeDasharray`};function fse(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?use:dse;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var pse=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function F6(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(D6(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of pse)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&fse(d,i,a,o,!1)}var I6=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),L6=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function mse(e,t,n,r){O6(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(I6.has(n)?n:r3(n),t.attrs[n])}function R6(e,t,n){let r=N6(e,t,n);for(let n in e)if(e3(e[n])||e3(t[n])){let t=N2.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var z6=class extends c6{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=q3}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(P2.has(t)){let e=g3(t);return e&&e.default||0}return t=I6.has(t)?t:r3(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return R6(e,t,n)}build(e,t,n){F6(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){mse(e,t,n,r)}mount(e){this.isSVGTag=L6(e.tagName),super.mount(e)}},hse=Q3.length;function B6(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&B6(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<hse;n++){let r=Q3[n],i=e.props[r];(X3(i)||i===!1)&&(t[r]=i)}return t}function V6(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var gse=[...Z3].reverse(),_se=Z3.length;function vse(e){return t=>Promise.all(t.map(({animation:t,options:n})=>c3(e,t,n)))}function yse(e){let t=vse(e),n=U6(),r=!0,i=!1,a=t=>(n,r)=>{let i=J4(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=B6(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<_se;t++){let p=gse[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=X3(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Y3(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=bse(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=X4(t)&&X4(n)?!V6(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=J4(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=D4(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=J4(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=U6(),i=!0}}}function bse(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!V6(t,e):!1}function H6(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function U6(){return{animate:H6(!0),whileInView:H6(),whileHover:H6(),whileTap:H6(),whileDrag:H6(),whileFocus:H6(),exit:H6()}}function W6(e,t){e.min=t.min,e.max=t.max}function G6(e,t){W6(e.x,t.x),W6(e.y,t.y)}function K6(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var q6=1e-4,xse=1-q6,Sse=1+q6,J6=.01,Cse=0-J6,wse=0+J6;function Y6(e){return e.max-e.min}function Tse(e,t,n){return Math.abs(e-t)<=n}function X6(e,t,n,r=.5){e.origin=r,e.originPoint=E0(t.min,t.max,e.origin),e.scale=Y6(n)/Y6(t),e.translate=E0(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xse&&e.scale<=Sse||isNaN(e.scale))&&(e.scale=1),(e.translate>=Cse&&e.translate<=wse||isNaN(e.translate))&&(e.translate=0)}function Z6(e,t,n,r){X6(e.x,t.x,n.x,r?r.originX:void 0),X6(e.y,t.y,n.y,r?r.originY:void 0)}function Q6(e,t,n,r=0){e.min=(r?E0(n.min,n.max,r):n.min)+t.min,e.max=e.min+Y6(t)}function Ese(e,t,n,r){Q6(e.x,t.x,n.x,r?.x),Q6(e.y,t.y,n.y,r?.y)}function $6(e,t,n,r=0){let i=r?E0(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Y6(t)}function e8(e,t,n,r){$6(e.x,t.x,n.x,r?.x),$6(e.y,t.y,n.y,r?.y)}function t8(e,t,n,r,i){return e-=t,e=g6(e,1/n,r),i!==void 0&&(e=g6(e,1/i,r)),e}function Dse(e,t=0,n=1,r=.5,i,a=e,o=e){if(t0.test(t)&&(t=parseFloat(t),t=E0(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=E0(a.min,a.max,r);e===a&&(s-=t),e.min=t8(e.min,t,n,s,i),e.max=t8(e.max,t,n,s,i)}function n8(e,t,[n,r,i],a,o){Dse(e,t[n],t[r],t[i],t.scale,a,o)}var Ose=[`x`,`scaleX`,`originX`],kse=[`y`,`scaleY`,`originY`];function r8(e,t,n,r){n8(e.x,t,Ose,n?n.x:void 0,r?r.x:void 0),n8(e.y,t,kse,n?n.y:void 0,r?r.y:void 0)}function i8(e){return e.translate===0&&e.scale===1}function a8(e){return i8(e.x)&&i8(e.y)}function o8(e,t){return e.min===t.min&&e.max===t.max}function Ase(e,t){return o8(e.x,t.x)&&o8(e.y,t.y)}function s8(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function c8(e,t){return s8(e.x,t.x)&&s8(e.y,t.y)}function l8(e){return Y6(e.x)/Y6(e.y)}function u8(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function d8(e){return[e(`x`),e(`y`)]}function jse(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Mse=v3.length,f8=e=>typeof e==`string`?parseFloat(e):e,p8=e=>typeof e==`number`||G.test(e);function Nse(e,t,n,r,i,a){i?(e.opacity=E0(0,n.opacity??1,Pse(r)),e.opacityExit=E0(t.opacity??1,0,Fse(r))):a&&(e.opacity=E0(t.opacity??1,n.opacity??1,r));for(let i=0;i<Mse;i++){let a=v3[i],o=m8(t,a),s=m8(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||p8(o)===p8(s)?(e[a]=Math.max(E0(f8(o),f8(s),r),0),(t0.test(s)||t0.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=E0(t.rotate||0,n.rotate||0,r))}function m8(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Pse=h8(0,.5,d1),Fse=h8(.5,.95,G$);function h8(e,t,n){return r=>r<e?0:r>t?1:n(q$(e,t,r))}function g8(e,t,n){let r=e3(e)?e:M4(e);return r.start(H4(``,r,t,n)),r.animation}function _8(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Ise=(e,t)=>e.depth-t.depth,Lse=class{constructor(){this.children=[],this.isDirty=!1}add(e){L$(this.children,e),this.isDirty=!0}remove(e){R$(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ise),this.isDirty=!1,this.children.forEach(e)}};function Rse(e,t){let n=M1.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(D1(r),e(a-t))};return E1.setup(r,!0),()=>D1(r)}function v8(e){return e3(e)?e.get():e}var zse=class{constructor(){this.members=[]}add(e){L$(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(R$(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(R$(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},y8={hasAnimatedSinceResize:!0,hasEverUpdated:!1},b8={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},x8=[``,`X`,`Y`,`Z`],Bse=1e3,Vse=0;function S8(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function C8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=a3(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,E1,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&C8(r)}function w8({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Vse++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,B3.value&&(b8.nodes=b8.calculatedTargetDeltas=b8.calculatedProjections=0),this.nodes.forEach(Wse),this.nodes.forEach(Xse),this.nodes.forEach(Zse),this.nodes.forEach(Gse),B3.addProjectionMetrics&&B3.addProjectionMetrics(b8)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Lse)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new J$),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=N3(t)&&!V3(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;E1.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Rse(i,250),y8.hasAnimatedSinceResize&&(y8.hasAnimatedSinceResize=!1,this.nodes.forEach(D8)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||nce,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!c8(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...P4(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||D8(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),D1(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Qse),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&C8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(qse),this.nodes.forEach(T8);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(E8);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Jse),this.nodes.forEach(Yse),this.nodes.forEach(Hse),this.nodes.forEach(Use)):this.nodes.forEach(E8),this.clearAllSnapshots();let e=M1.now();O1.delta=z$(0,1e3/60,e-O1.timestamp),O1.timestamp=e,O1.isProcessing=!0,k1.update.process(O1),k1.preRender.process(O1),k1.render.process(O1),O1.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,S3.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kse),this.sharedNodes.forEach($se)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E1.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E1.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Y6(this.snapshot.measuredBox.x)&&!Y6(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=q3(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!a8(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||p6(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),rce(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return q3();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ice))){let{scroll:e}=this.root;e&&(S6(t.x,e.offset.x),S6(t.y,e.offset.y))}return t}removeElementScroll(e){let t=q3();if(G6(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&G6(t,e),S6(t.x,i.offset.x),S6(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||q3();G6(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(S6(r.x,-n.scroll.offset.x),S6(r.y,-n.scroll.offset.y)),p6(n.latestValues)&&T6(r,n.latestValues,n.layout?.layoutBox)}return p6(this.latestValues)&&T6(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=q3();G6(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!p6(n.latestValues))continue;let r;n.instance&&(f6(n.latestValues)&&n.updateSnapshot(),r=q3(),G6(r,n.measurePageBox())),r8(t,n.latestValues,n.snapshot?.layoutBox,r)}return p6(this.latestValues)&&r8(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O1.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=O1.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=q3(),this.targetWithTransforms=q3()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ese(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):G6(this.target,this.layout.layoutBox),y6(this.target,this.targetDelta)):G6(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),B3.value&&b8.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||f6(this.parent.latestValues)||m6(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=q3(),this.relativeTargetOrigin=q3(),e8(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),G6(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===O1.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;G6(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;tse(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=q3());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(K6(this.prevProjectionDelta.x,this.projectionDelta.x),K6(this.prevProjectionDelta.y,this.projectionDelta.y)),Z6(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!u8(this.projectionDelta.x,this.prevProjectionDelta.x)||!u8(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),B3.value&&b8.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=G3(),this.projectionDelta=G3(),this.projectionDeltaWithTransform=G3()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=G3();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=q3(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(tce));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=E0(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=E0(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(O8(o.x,e.x,n),O8(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(e8(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ece(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Ase(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=q3(),G6(f,this.relativeTarget)),c&&(this.animationValues=a,Nse(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(D1(this.pendingAnimation),void 0),this.pendingAnimation=E1.update(()=>{y8.hasAnimatedSinceResize=!0,this.motionValue||=M4(0),this.motionValue.jump(0,!1),this.currentAnimation=g8(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Bse),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&N8(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||q3();let t=Y6(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Y6(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}G6(t,n),T6(t,i),Z6(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new zse),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&S8(`z`,e,r,this.animationValues);for(let t=0;t<x8.length;t++)S8(`rotate${x8[t]}`,e,r,this.animationValues),S8(`skew${x8[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=v8(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=v8(t?.pointerEvents)||``),this.hasProjected&&!p6(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=jse(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in j6){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=j6[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?v8(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(T8),this.root.sharedNodes.clear()}}}function Hse(e){e.updateLayout()}function Use(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)d8(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Y6(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;W6(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else N8(i,t.layoutBox,n)&&d8(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Y6(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=G3();Z6(o,n,t.layoutBox);let s=G3();a?Z6(s,e.applyTransform(r,!0),t.measuredBox):Z6(s,n,t.layoutBox);let c=!a8(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=q3();e8(s,t.layoutBox,i.layoutBox,o);let c=q3();e8(c,n,a.layoutBox,o),c8(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Wse(e){B3.value&&b8.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Gse(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kse(e){e.clearSnapshot()}function T8(e){e.clearMeasurements()}function qse(e){e.isLayoutDirty=!0,e.updateLayout()}function E8(e){e.isLayoutDirty=!1}function Jse(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Yse(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function D8(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Xse(e){e.resolveTargetDelta()}function Zse(e){e.calcProjection()}function Qse(e){e.resetSkewAndRotation()}function $se(e){e.removeLeadSnapshot()}function O8(e,t,n){e.translate=E0(t.translate,0,n),e.scale=E0(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function k8(e,t,n,r){e.min=E0(t.min,n.min,r),e.max=E0(t.max,n.max,r)}function ece(e,t,n,r){k8(e.x,t.x,n.x,r),k8(e.y,t.y,n.y,r)}function tce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var nce={duration:.45,ease:[.4,0,.1,1]},A8=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),j8=A8(`applewebkit/`)&&!A8(`chrome/`)?Math.round:G$;function M8(e){e.min=j8(e.min),e.max=j8(e.max)}function rce(e){M8(e.x),M8(e.y)}function N8(e,t,n){return e===`position`||e===`preserve-aspect`&&!Tse(l8(t),l8(n),.2)}function ice(e){return e!==e.root&&e.scroll?.wasRoot}var ace=w8({attachResizeListener:(e,t)=>_8(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),P8={current:void 0},F8=w8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!P8.current){let e=new ace({});e.mount(window),e.setOptions({layoutScroll:!0}),P8.current=e}return P8.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),I8=(0,j.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function L8(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function oce(...e){return t=>{let n=!1,r=e.map(e=>{let r=L8(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():L8(e[t],null)}}}}function sce(...e){return j.useCallback(oce(...e),e)}var cce=class extends j.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(x3(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=x3(e)&&e.offsetWidth||0,r=x3(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function lce({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,j.useId)(),s=(0,j.useRef)(null),c=(0,j.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,j.useContext)(I8),u=sce(s,e.props?.ref??e?.ref);return(0,j.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
117
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BZ(e,t){if(e){if(typeof e==`string`)return VZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VZ(e,t)}}function VZ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function HZ(e,t){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function UZ(e){if(Array.isArray(e))return e}function WZ(e){"@babel/helpers - typeof";return WZ=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},WZ(e)}function GZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GZ(Object(n),!0).forEach(function(t){qZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JZ(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function YZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function XZ(e,t,n){return t&&YZ(e.prototype,t),n&&YZ(e,n),e}function ZZ(){return{memoize:!0,memoizeFallback:!1,bindI18n:``,bindI18nStore:``,parseErrorHandler:function(e,t,n,r){return n},parseLngForICU:function(e){return e},escapeVariables:!1}}var QZ=function(){function e(t){JZ(this,e),this.type=`i18nFormat`,this.mem={},this.init(null,t)}return XZ(e,[{key:`init`,value:function(e,t){var n=this,r=e&&e.options&&e.options.i18nFormat||{};if(this.options=vX(r,t,this.options||{},ZZ()),this.formats=this.options.formats,e){var i=this.options,a=i.bindI18n,o=i.bindI18nStore,s=i.memoize;e.IntlMessageFormat=LZ,e.ICU=this,s&&(a&&e.on(a,function(){return n.clearCache()}),o&&e.store.on(o,function(){return n.clearCache()}))}}},{key:`addUserDefinedFormats`,value:function(e){this.formats=this.formats?KZ(KZ({},this.formats),e):e}},{key:`parse`,value:function(e,t,n,r,i,a){var o=a&&a.resolved&&a.resolved.res,s=this.options.memoize&&`${n}.${r}.${i.replace(/\./g,`###`)}`,c;this.options.memoize&&(c=mX(this.mem,s));try{return c||(c=new LZ(e,this.options.parseLngForICU(n),this.formats,{ignoreTag:!0}),this.options.memoize&&(this.options.memoizeFallback||!a||o)&&pX(this.mem,s,c)),c.format(this.escapeVariableValues(t))}catch(n){return this.options.parseErrorHandler(n,i,e,t)}}},{key:`addLookupKeys`,value:function(e,t,n,r,i){return e}},{key:`clearCache`,value:function(){this.mem={}}},{key:`escapeVariableValues`,value:function(e){if(!this.options.escapeVariables||!e||WZ(e)!==`object`)return e;for(var t={},n=0,r=Object.entries(e);n<r.length;n++){var i=RZ(r[n],2),a=i[0],o=i[1];typeof o==`string`?t[a]=o.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`):t[a]=o}return t}}]),e}();QZ.type=`i18nFormat`;var $Z;(function(e){e.Unimplemented=`UNIMPLEMENTED`,e.Unavailable=`UNAVAILABLE`})($Z||={});var eQ=class extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}},tQ=e=>e?.androidBridge?`android`:e?.webkit?.messageHandlers?.bridge?`ios`:`web`,nQ=e=>{let t=e.CapacitorCustomPlatform||null,n=e.Capacitor||{},r=n.Plugins=n.Plugins||{},i=()=>t===null?tQ(e):t.name,a=()=>i()!==`web`,o=e=>!!(l.get(e)?.platforms.has(i())||s(e)),s=e=>n.PluginHeaders?.find(t=>t.name===e),c=t=>e.console.error(t),l=new Map;return n.convertFileSrc||=e=>e,n.getPlatform=i,n.handleError=c,n.isNativePlatform=a,n.isPluginAvailable=o,n.registerPlugin=(e,a={})=>{let o=l.get(e);if(o)return console.warn(`Capacitor plugin "${e}" already registered. Cannot register plugins twice.`),o.proxy;let c=i(),u=s(e),d,f=async()=>(!d&&c in a?d=d=typeof a[c]==`function`?await a[c]():a[c]:t!==null&&!d&&`web`in a&&(d=d=typeof a.web==`function`?await a.web():a.web),d),p=(t,r)=>{if(u){let i=u?.methods.find(e=>r===e.name);if(i)return i.rtype===`promise`?t=>n.nativePromise(e,r.toString(),t):(t,i)=>n.nativeCallback(e,r.toString(),t,i);if(t)return t[r]?.bind(t)}else if(t)return t[r]?.bind(t);else throw new eQ(`"${e}" plugin is not implemented on ${c}`,$Z.Unimplemented)},m=t=>{let n,r=(...r)=>{let i=f().then(i=>{let a=p(i,t);if(a){let e=a(...r);return n=e?.remove,e}else throw new eQ(`"${e}.${t}()" is not implemented on ${c}`,$Z.Unimplemented)});return t===`addListener`&&(i.remove=async()=>n()),i};return r.toString=()=>`${t.toString()}() { [capacitor code] }`,Object.defineProperty(r,`name`,{value:t,writable:!1,configurable:!1}),r},h=m(`addListener`),g=m(`removeListener`),_=(e,t)=>{let n=h({eventName:e},t),r=async()=>{g({eventName:e,callbackId:await n},t)},i=new Promise(e=>n.then(()=>e({remove:r})));return i.remove=async()=>{console.warn(`Using addListener() without 'await' is deprecated.`),await r()},i},v=new Proxy({},{get(e,t){switch(t){case`$$typeof`:return;case`toJSON`:return()=>({});case`addListener`:return u?_:h;case`removeListener`:return g;default:return m(t)}}});return r[e]=v,l.set(e,{name:e,proxy:v,platforms:new Set([...Object.keys(a),...u?[c]:[]])}),v},n.Exception=eQ,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},rQ=(e=>e.Capacitor=nQ(e))(typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}),iQ=rQ.registerPlugin,aQ=class{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(e,t){let n=!1;this.listeners[e]||(this.listeners[e]=[],n=!0),this.listeners[e].push(t);let r=this.windowListeners[e];return r&&!r.registered&&this.addWindowListener(r),n&&this.sendRetainedArgumentsForEvent(e),Promise.resolve({remove:async()=>this.removeListener(e,t)})}async removeAllListeners(){this.listeners={};for(let e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t,n){let r=this.listeners[e];if(!r){if(n){let n=this.retainedEventArguments[e];n||=[],n.push(t),this.retainedEventArguments[e]=n}return}r.forEach(e=>e(t))}hasListeners(e){return!!this.listeners[e]?.length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(e=`not implemented`){return new rQ.Exception(e,$Z.Unimplemented)}unavailable(e=`not available`){return new rQ.Exception(e,$Z.Unavailable)}async removeListener(e,t){let n=this.listeners[e];if(!n)return;let r=n.indexOf(t);this.listeners[e].splice(r,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){let t=this.retainedEventArguments[e];t&&(delete this.retainedEventArguments[e],t.forEach(t=>{this.notifyListeners(e,t)}))}},oQ=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),sQ=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent),cQ=class extends aQ{async getCookies(){let e=document.cookie,t={};return e.split(`;`).forEach(e=>{if(e.length<=0)return;let[n,r]=e.replace(/=/,`CAP_COOKIE`).split(`CAP_COOKIE`);n=sQ(n).trim(),r=sQ(r).trim(),t[n]=r}),t}async setCookie(e){try{let t=oQ(e.key),n=oQ(e.value),r=e.expires?`; expires=${e.expires.replace(`expires=`,``)}`:``,i=(e.path||`/`).replace(`path=`,``),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:``;document.cookie=`${t}=${n||``}${r}; path=${i}; ${a};`}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(e){return Promise.reject(e)}}async clearCookies(){try{let e=document.cookie.split(`;`)||[];for(let t of e)document.cookie=t.replace(/^ +/,``).replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}};iQ(`CapacitorCookies`,{web:()=>new cQ});var lQ=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;t(e.indexOf(`,`)>=0?e.split(`,`)[1]:e)},r.onerror=e=>n(e),r.readAsDataURL(e)}),uQ=(e={})=>{let t=Object.keys(e);return Object.keys(e).map(e=>e.toLocaleLowerCase()).reduce((n,r,i)=>(n[r]=e[t[i]],n),{})},dQ=(e,t=!0)=>e?Object.entries(e).reduce((e,n)=>{let[r,i]=n,a,o;return Array.isArray(i)?(o=``,i.forEach(e=>{a=t?encodeURIComponent(e):e,o+=`${r}=${a}&`}),o.slice(0,-1)):(a=t?encodeURIComponent(i):i,o=`${r}=${a}`),`${e}&${o}`},``).substr(1):null,fQ=(e,t={})=>{let n=Object.assign({method:e.method||`GET`,headers:e.headers},t),r=uQ(e.headers)[`content-type`]||``;if(typeof e.data==`string`)n.body=e.data;else if(r.includes(`application/x-www-form-urlencoded`)){let t=new URLSearchParams;for(let[n,r]of Object.entries(e.data||{}))t.set(n,r);n.body=t.toString()}else if(r.includes(`multipart/form-data`)||e.data instanceof FormData){let t=new FormData;if(e.data instanceof FormData)e.data.forEach((e,n)=>{t.append(n,e)});else for(let n of Object.keys(e.data))t.append(n,e.data[n]);n.body=t;let r=new Headers(n.headers);r.delete(`content-type`),n.headers=r}else (r.includes(`application/json`)||typeof e.data==`object`)&&(n.body=JSON.stringify(e.data));return n},pQ=class extends aQ{async request(e){let t=fQ(e,e.webFetchExtra),n=dQ(e.params,e.shouldEncodeUrlParams),r=n?`${e.url}?${n}`:e.url,i=await fetch(r,t),a=i.headers.get(`content-type`)||``,{responseType:o=`text`}=i.ok?e:{};a.includes(`application/json`)&&(o=`json`);let s,c;switch(o){case`arraybuffer`:case`blob`:c=await i.blob(),s=await lQ(c);break;case`json`:s=await i.json();break;default:s=await i.text()}let l={};return i.headers.forEach((e,t)=>{l[t]=e}),{data:s,headers:l,status:i.status,url:i.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:`GET`}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:`POST`}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:`PUT`}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:`PATCH`}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:`DELETE`}))}};iQ(`CapacitorHttp`,{web:()=>new pQ});var mQ;(function(e){e.Dark=`DARK`,e.Light=`LIGHT`,e.Default=`DEFAULT`})(mQ||={});var hQ;(function(e){e.StatusBar=`StatusBar`,e.NavigationBar=`NavigationBar`})(hQ||={});var gQ=class extends aQ{async setStyle(){this.unavailable(`not available for web`)}async setAnimation(){this.unavailable(`not available for web`)}async show(){this.unavailable(`not available for web`)}async hide(){this.unavailable(`not available for web`)}};iQ(`SystemBars`,{web:()=>new gQ});function _Q(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var vQ=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return vQ(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return vQ(t)(e)}}}},yQ=(e,t)=>(n,r,i)=>{let a={storage:_Q(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return vQ(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p};function bQ(e){let t={};if(typeof e.type==`string`&&(t.type=e.type),typeof e.level==`string`&&(t.level=so(e.level)),typeof e.event_id==`string`&&(t.event_id=e.event_id),typeof e.category==`string`&&(t.category=e.category),typeof e.message==`string`&&(t.message=e.message),typeof e.data==`object`&&e.data!==null&&(t.data=e.data),typeof e.timestamp==`string`){let n=Date.parse(e.timestamp)/1e3;isNaN(n)||(t.timestamp=n)}return t}var xQ=u;function SQ(){return xQ.WEBVIEW_SERVER_URL}function CQ(){return xQ.CAP_SPOTLIGHT_URL}function wQ(e){return{attachStacktrace:e.attachStacktrace,attachThreads:e.attachThreads,debug:e.debug,dist:e.dist,dsn:e.dsn,enabled:e.enabled,enableNdkScopeSync:e.enableNdkScopeSync,enableWatchdogTerminationTracking:e.enableWatchdogTerminationTracking,environment:e.environment,maxBreadcrumbs:e.maxBreadcrumbs,release:e.release,sampleRate:e.sampleRate,sendClientReports:e.sendClientReports,sendDefaultPii:e.sendDefaultPii,sessionTrackingIntervalMillis:e.sessionTrackingIntervalMillis,tracesSampleRate:e.tracesSampleRate,enableCaptureFailedRequests:e.enableCaptureFailedRequests,...e.strictTraceContinuation!==void 0&&{strictTraceContinuation:e.strictTraceContinuation},...e.orgId!==void 0&&{orgId:e.orgId},...TQ(e),...EQ(e),...DQ()}}function TQ(e){return rQ.getPlatform()===`ios`?{enableAppHangTracking:e.enableAppHangTracking,appHangTimeoutInterval:e.appHangTimeoutInterval}:{}}function EQ(e){if(e.enableLogs&&rQ.getPlatform()===`android`)return{enableLogs:!0}}function DQ(){let e=CQ();if(e)return{sidecarUrl:e}}var OQ=iQ(`SentryCapacitor`),kQ=`value`;function AQ(e){let t=Jt()?.getOptions(),n=dr(e,t?.normalizeDepth,t?.normalizeMaxBreadth);return typeof n!=`object`||!n?{[kQ]:n}:n}function jQ(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}var MQ=[],NQ=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;for(let e=0;e<64;++e)MQ[e]=NQ[e];function PQ(e){return MQ[e>>18&63]+MQ[e>>12&63]+MQ[e>>6&63]+MQ[e&63]}function FQ(e,t,n){let r,i=[];for(let a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(PQ(r));return i.join(``)}function IQ(e){let t,n=e.length,r=n%3,i=[],a=16383;for(let t=0,o=n-r;t<o;t+=a)i.push(FQ(e,t,t+a>o?o:t+a));return r===1?(t=e[n-1],i.push(`${MQ[t>>2]+MQ[t<<4&63]}==`)):r===2&&(t=(e[n-2]<<8)+e[n-1],i.push(`${MQ[t>>10]+MQ[t>>4&63]+MQ[t<<2&63]}=`)),i.join(``)}var LQ={async sendEnvelope(e){if(!this.enableNative)throw this._DisabledNativeError;if(!this.isNativeClientAvailable())throw this._NativeClientError;let[t,n]=e,r=jQ(JSON.stringify(t));r.push(10);for(let e of n){let[t,n]=this._processItem(e),i,a=[];typeof n==`string`?(i=`text/plain`,a=jQ(n)):n instanceof Uint8Array?(i=typeof t.content_type==`string`?t.content_type:`application/octet-stream`,a=[...n]):(i=typeof t.content_type==`string`?t.content_type:`application/json`,a=jQ(JSON.stringify(n))),t.content_type=i,t.length=a.length;let o=JSON.stringify(t);r.push(...jQ(o)),r.push(10),r=r.concat(a),r.push(10)}let i=200;return await OQ.captureEnvelope({envelope:IQ(r)}).then(e=>e,e=>{D.error(`Failed to capture Envelope: `,e),i=500}),{statusCode:i}},async initNativeSdk(e){if(!e.dsn)return D.warn(`Warning: No DSN was provided. The Sentry SDK will be disabled. Native SDK will also not be initalized.`),this.enableNative=!1,!1;if(!e.enableNative)return e.enableNativeNagger&&D.warn(`Note: Native Sentry SDK is disabled.`),this.enableNative=!1,!1;if(!this.isNativeClientAvailable())throw this._NativeClientError;let t=wQ(e);return OQ.initNativeSdk({options:t})},async fetchNativeDeviceContexts(){if(!this.enableNative)throw this._DisabledNativeError;if(!this.isNativeClientAvailable())throw this._NativeClientError;return OQ.fetchNativeDeviceContexts()},async fetchNativeLogAttributes(){if(!this.enableNative)throw this._DisabledNativeError;if(!this.isNativeClientAvailable())throw this._NativeClientError;return OQ.fetchNativeLogAttributes()},async fetchNativeRelease(){if(!this.enableNative)throw this._DisabledNativeError;return OQ.fetchNativeRelease()},async fetchNativeSdkInfo(){if(!this.enableNative)throw this._DisabledNativeError;return OQ.fetchNativeSdkInfo()},crash(){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;OQ.crash()}},setUser(e){if(!this.enableNative)return;if(!this.isNativeClientAvailable())throw this._NativeClientError;let t=null,n=null;if(e){let{id:r,ip_address:i,email:a,username:o,...s}=e;t=this._serializeObject({email:a,id:r,ip_address:i,username:o},!0),n=this._serializeObject(s,!0)}OQ.setUser({defaultUserKeys:t,otherUserKeys:n})},setTag(e,t){if(!this.enableNative)return;if(!this.isNativeClientAvailable())throw this._NativeClientError;let n=typeof t==`string`?t:JSON.stringify(t);OQ.setTag({key:e,value:n})},setExtra(e,t){if(!this.enableNative)return;if(!this.isNativeClientAvailable())throw this._NativeClientError;let n=typeof t==`string`?t:JSON.stringify(t);OQ.setExtra({key:e,value:n})},addBreadcrumb(e){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;OQ.addBreadcrumb({...e,level:e.level?this._processLevel(e.level):void 0,data:e.data?AQ(e.data):void 0})}},clearBreadcrumbs(){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;OQ.clearBreadcrumbs()}},closeNativeSdk(){if(!this.enableNative)return D.log(this._DisabledNativeError),Promise.resolve();if(!this.isNativeClientAvailable())throw this._NativeClientError;return OQ.closeNativeSdk().then(()=>{this.enableNative=!1})},setContext(e,t){if(this.enableNative){if(!this.isNativeClientAvailable())throw this._NativeClientError;this.platform===`android`?this.setExtra(e,t):OQ.setContext({key:e,value:t===null?null:this._serializeObject(t)})}},pauseAppHangTracking(){if(this.enableNative)if(this.isNativeClientAvailable())this.platform===`ios`?OQ.pauseAppHangTracking():D.warn(`PauseAppHangTracking ${this._IosOnlyMessage}`);else throw this._NativeClientError},resumeAppHangTracking(){if(this.enableNative)if(this.isNativeClientAvailable())this.platform===`ios`?OQ.resumeAppHangTracking():D.warn(`ResumeAppHangTracking ${this._IosOnlyMessage}`);else throw this._NativeClientError},_processItem(e){if(LQ.platform===`android`){let[t,n]=e;if(t.type==`event`||t.type==`transaction`){let e=this._processLevels(n);return`message`in e&&(e.message={message:e.message}),[t,e]}}return e},_serializeObject(e,t){let n={};return Object.keys(e).forEach(r=>{let i=e[r];(t!==!0||i!==void 0)&&(n[r]=typeof i==`string`?i:JSON.stringify(i))}),n},_processLevels(e){return{...e,level:e.level?this._processLevel(e.level):void 0,breadcrumbs:e.breadcrumbs?.map(e=>({...e,level:e.level?this._processLevel(e.level):void 0}))}},_processLevel(e){return e==`log`?`debug`:e==`critical`?`fatal`:e},isModuleLoaded(){return!!OQ},isNativeClientAvailable(){return this.isModuleLoaded()&&rQ.isPluginAvailable(`SentryCapacitor`)},_DisabledNativeError:Error(`Native is disabled`),_NativeClientError:Error(`Native Client is not available, can't start on native.`),_IosOnlyMessage:`is only supported on iOS.`,enableNative:!0,platform:rQ.getPlatform()},RQ=`DeviceContext`,zQ=()=>({name:RQ,processEvent:BQ});async function BQ(e,t,n){try{let t=await LQ.fetchNativeDeviceContexts();if(e.contexts={...t.contexts,...e.contexts},`user`in t){let n=t.user;e.user||={...n}}let r=Array.isArray(t.breadcrumbs)?t.breadcrumbs.map(bQ):void 0;if(r){let t=n?.getOptions().maxBreadcrumbs??100;e.breadcrumbs=r.concat(e.breadcrumbs||[]).sort((e,t)=>(e.timestamp??0)-(t.timestamp??0)).slice(-t)}}catch(e){D.log(`Failed to get device context from native: ${e}`)}return e}var VQ=`EventOrigin`,HQ=()=>({name:VQ,preprocessEvent:UQ});async function UQ(e){return e.tags=e.tags??{},e.tags[`event.origin`]=`javascript`,e.tags[`event.environment`]=`javascript`,e}var WQ=`LogEnricher`,GQ=()=>({name:WQ,setup(e){JQ().then(()=>{e.on(`beforeCaptureLog`,e=>{YQ(e)})},e=>{D.log(e)})}}),KQ=void 0;function qQ(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}async function JQ(){try{let e=await LQ.fetchNativeLogAttributes();KQ={...e?.contexts?.device&&{brand:e.contexts.device?.brand,model:e.contexts.device?.model,family:e.contexts.device?.family},...e?.contexts?.os&&{os:e.contexts.os.name,version:e.contexts.os.version},...e?.release&&{release:e.release}}}catch(e){return Promise.reject(`[LOGS]: Failed to prepare attributes from Native Layer: ${e}`)}return Promise.resolve()}function YQ(e){if(KQ===void 0)return;let t=e.attributes??{};qQ(t,`device.brand`,KQ.brand),qQ(t,`device.model`,KQ.model),qQ(t,`device.family`,KQ.family),qQ(t,`os.name`,KQ.os),qQ(t,`os.version`,KQ.version),qQ(t,`sentry.release`,KQ.release),e.attributes=t}var XQ=`Release`,ZQ=()=>({name:XQ,processEvent:QQ});async function QQ(e,t,n){let r=n.getOptions();if(typeof r?.release==`string`&&(e.release=r.release),typeof r?.dist==`string`&&(e.dist=r.dist),e.release&&e.dist)return e;try{let t=await LQ.fetchNativeRelease();t&&(e.release||=`${t.id}@${t.version}+${t.build}`,e.dist||=`${t.build}`)}catch{}return e}var $Q=()=>To({iteratee:e$});function e$(e){if(e.filename){let t=/^https?:\/\//.test(e.filename),n=SQ();n?e.filename=e.filename.replace(n,``):e.filename=e.filename.replace(/^https?:\/\/localhost(:\d+)?/,``).replace(/^capacitor:\/\/localhost(:\d+)?/,``),e.filename=e.filename.replace(/^ng:\/\//,``),e.filename===`[native code]`||e.filename===`native`?e.in_app=!1:(t||(e.filename=`app://${e.filename.startsWith(`/`)?e.filename:`/${e.filename}`}`),e.in_app=!0)}return e}var t$=`4.1.0`,n$=`SdkInfo`,r$=null,i$=void 0,a$=()=>({name:n$,processEvent:o$,setup(e){i$=e.getOptions().sendDefaultPii,i$&&e.on(`beforeSendEvent`,(e=>{e.user?.ip_address===`{{auto}}`&&delete e.user.ip_address}))}});async function o$(e){if(LQ.platform===`ios`&&r$===null)try{r$=await LQ.fetchNativeSdkInfo()}catch{D.warn(`[SdkInfo] Native SDK Info retrieval failed...something could be wrong with your Sentry installation.`)}e.platform=e.platform||`javascript`;let t=e.sdk||{};return t.packages=[...t.packages||[],...r$&&[r$]||[],{name:`npm:@sentry/capacitor`,version:t$}],t.settings={infer_ip:i$?`auto`:`never`,...t.settings},e.sdk=t,e}var s$=`SentryNativeLog`,c$;async function l$(e,t,n){let r=await OQ.addListener(s$,e);n()?await r.remove():(t(r),D.log(`Native log listener set up successfully.`))}function u$(e){if(c$)return;let t=rQ.getPlatform();if(t!==`ios`&&t!==`android`){D.log(`Native log listener is only supported on iOS and Android.`);return}let n,r=!1;c$=()=>{r=!0,c$=void 0,n?.remove()},l$(e,e=>{n=e},()=>r).catch(e=>{D.warn(`Failed to set up native log listener:`,e),c$=void 0})}function d$(){c$?.()}function f$(e){let t=`[Native] [${e.component}] ${e.message}`;switch(e.level.toLowerCase()){case`fatal`:case`error`:D.error(t);break;case`warning`:D.warn(t);break;default:D.log(t);break}}function p$(e,t,n){Ue(e,t,n)}function m$(e,t){let n=Ke(e[t]);n&&(e[t]=n)}var h$=new WeakMap;function g$(e){h$.has(e)||(h$.set(e,!0),p$(e,`setUser`,t=>n=>(LQ.setUser(n),t.call(e,n))),p$(e,`setTag`,t=>(n,r)=>(LQ.setTag(n,r),t.call(e,n,r))),p$(e,`setTags`,t=>n=>(Object.keys(n).forEach(e=>{LQ.setTag(e,n[e])}),t.call(e,n))),p$(e,`setExtras`,t=>n=>(Object.keys(n).forEach(e=>{LQ.setExtra(e,n[e])}),t.call(e,n))),p$(e,`setExtra`,t=>(n,r)=>(LQ.setExtra(n,r),t.call(e,n,r))),p$(e,`addBreadcrumb`,t=>(n,r)=>{let i={...n,level:n.level||`info`,data:n.data?AQ(n.data):void 0};t.call(e,i,r);let a=e.getLastBreadcrumb();return a&&LQ.addBreadcrumb(a),e}),p$(e,`clearBreadcrumbs`,t=>()=>(LQ.clearBreadcrumbs(),t.call(e))),p$(e,`setContext`,t=>(n,r)=>(LQ.setContext(n,r),t.call(e,n,r))))}function _$(e){h$.has(e)&&(h$.delete(e),m$(e,`clearBreadcrumbs`),m$(e,`setContext`),m$(e,`setExtra`),m$(e,`setExtras`),m$(e,`setTags`),m$(e,`setTag`),m$(e,`setUser`),m$(e,`addBreadcrumb`))}function v$(e,t){e.enableNative&&(e.transport=t,_$(Kt()),_$(Gt()))}function y$(){var e;let t=Jt();if(t){let n=t.getOptions();if(!n._metadata?.sdk)return;let r=n._metadata.sdk;r.name=`${r.name}.capacitor`,r.version=t$,(e=r.packages)==null||e.push({name:`sentry.javascript.capacitor`,version:`4.1.0`}),n._metadata.sdk=r}}function b$(e,t,n,r){LQ.initNativeSdk(t).then(()=>{t.debug&&u$(t.onNativeLog??f$),n(e)}).catch(t=>{console.error(`Native Sentry SDK failed to initialize. Using Sentry JavaScript SDK without native integraiton.
118
+ `,{error:t}),v$(e,r),n(e)}).finally(()=>{y$()})}function x$(e){let t=[];return t.push($Q()),t.push(ZQ()),t.push(HQ()),t.push(a$()),e.enableNative?(t.push(zQ()),t.push(GQ())):t.push(Zs()),t.push(Ka(),Ga(),Us(),Hs(),qs(),io(),lo()),e.enableAutoSessionTracking&&!e.enableNative&&t.push(Gs()),t}var S$=()=>{let e=f(),t=e.__SENTRY__=e.__SENTRY__||{};(t[d]=t[`10.52.0`]||{}).encodePolyfill=C$},C$=e=>new Uint8Array(jQ(e)),w$=class{constructor(e={}){this._buffer=ia(e.bufferSize||30)}send(e){return this._buffer.add(()=>LQ.sendEnvelope(e))}flush(e){return this._buffer.drain(e)}};function T$(e={}){return new w$(e)}function E$(e,t={}){return typeof e==`function`?(...n)=>{try{return e(...n)}catch(r){return D.error(t.loggerMessage?t.loggerMessage:`The ${e.name} callback threw an error`,r),n[0]}}:e}var D$=()=>typeof TextEncoder<`u`;function O$(e,t=ac){let n={enableAutoSessionTracking:!0,enableWatchdogTerminationTracking:!0,enableCaptureFailedRequests:!1,...e};n.siblingOptions&&delete n.siblingOptions,n.enabled===!1||LQ.platform===`web`?(n.enableNative=!1,n.enableNativeNagger=!1):(n.enableNativeNagger??=!0,n.enableNative??=!0),n.enableNative&&!e.transport&&LQ.platform!==`web`&&(n.transport=e.transport||T$,n.transportOptions={...e.transportOptions??{},bufferSize:30}),D$()||S$(),n.enableNative&&(g$(Kt()),g$(Gt()));let r={...e.siblingOptions?.vueOptions,...e.siblingOptions?.nuxtClientOptions,...n,integrations:E$(e.integrations,{loggerMessage:`The integrations threw an error`}),enableMetrics:n._experiments?.enableMetrics,beforeSendMetric:n._experiments?.beforeSendMetric};r.defaultIntegrations=e.defaultIntegrations===void 0?x$(n):e.defaultIntegrations,b$(r,{...n,enableAutoSessionTracking:LQ.platform!==`web`&&n.enableAutoSessionTracking},t,e.transport)}async function k$(){d$();try{let e=Jt();e&&(await e.close(),await LQ.closeNativeSdk())}catch{D.error(`Failed to close the SDK`)}}var A$;(function(e){e[e.Sunday=1]=`Sunday`,e[e.Monday=2]=`Monday`,e[e.Tuesday=3]=`Tuesday`,e[e.Wednesday=4]=`Wednesday`,e[e.Thursday=5]=`Thursday`,e[e.Friday=6]=`Friday`,e[e.Saturday=7]=`Saturday`})(A$||={});var j$=iQ(`LocalNotifications`,{web:()=>s(()=>import(`./web-BIq0eRiB.js`).then(e=>new e.LocalNotificationsWeb),[])}),M$=iQ(`Network`,{web:()=>s(()=>import(`./web-BMzfWFM-.js`).then(e=>new e.NetworkWeb),[])}),N$=(0,j.createContext)({});function P$(e){let t=(0,j.useRef)(null);return t.current===null&&(t.current=e()),t.current}var F$=typeof window<`u`?j.useLayoutEffect:j.useEffect,I$=(0,j.createContext)(null);function L$(e,t){e.indexOf(t)===-1&&e.push(t)}function R$(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var z$=(e,t,n)=>n>t?t:n<e?e:n,B$={},V$=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),H$=e=>typeof e==`object`&&!!e,U$=e=>/^0[^.\s]+$/u.test(e);function W$(e){let t;return()=>(t===void 0&&(t=e()),t)}var G$=e=>e,K$=(...e)=>e.reduce((e,t)=>n=>t(e(n))),q$=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},J$=class{constructor(){this.subscriptions=[]}add(e){return L$(this.subscriptions,e),()=>R$(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Y$=e=>e*1e3,X$=e=>e/1e3,Z$=(e,t)=>t?1e3/t*e:0,Q$=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},$$=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,e1=1e-7,t1=12;function n1(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=$$(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>e1&&++s<t1);return o}function r1(e,t,n,r){if(e===t&&n===r)return G$;let i=t=>n1(t,0,1,e,n);return e=>e===0||e===1?e:$$(i(e),t,r)}var i1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,a1=e=>t=>1-e(1-t),o1=r1(.33,1.53,.69,.99),s1=a1(o1),c1=i1(s1),l1=e=>e>=1?1:(e*=2)<1?.5*s1(e):.5*(2-2**(-10*(e-1))),u1=e=>1-Math.sin(Math.acos(e)),d1=a1(u1),f1=i1(u1),p1=r1(.42,0,1,1),m1=r1(0,0,.58,1),h1=r1(.42,0,.58,1),g1=e=>Array.isArray(e)&&typeof e[0]!=`number`;function _1(e,t){return g1(e)?e[Q$(0,e.length,t)]:e}var v1=e=>Array.isArray(e)&&typeof e[0]==`number`,y1={linear:G$,easeIn:p1,easeInOut:h1,easeOut:m1,circIn:u1,circInOut:f1,circOut:d1,backIn:s1,backInOut:c1,backOut:o1,anticipate:l1},b1=e=>typeof e==`string`,x1=e=>{if(v1(e)){e.length;let[t,n,r,i]=e;return r1(t,n,r,i)}else if(b1(e))return y1[e],`${e}`,y1[e];return e},S1=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function C1(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var w1=40;function T1(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=S1.reduce((e,t)=>(e[t]=C1(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=B$.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,w1),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:S1.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<S1.length;t++)o[S1[t]].cancel(e)},state:i,steps:o}}var{schedule:E1,cancel:D1,state:O1,steps:k1}=T1(typeof requestAnimationFrame<`u`?requestAnimationFrame:G$,!0),A1;function j1(){A1=void 0}var M1={now:()=>(A1===void 0&&M1.set(O1.isProcessing||B$.useManualTiming?O1.timestamp:performance.now()),A1),set:e=>{A1=e,queueMicrotask(j1)}},N1=e=>t=>typeof t==`string`&&t.startsWith(e),P1=N1(`--`),F1=N1(`var(--`),I1=e=>F1(e)?L1.test(e.split(`/*`)[0].trim()):!1,L1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function R1(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var z1={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},B1={...z1,transform:e=>z$(0,1,e)},V1={...z1,default:1},H1=e=>Math.round(e*1e5)/1e5,U1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function W1(e){return e==null}var G1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,K1=(e,t)=>n=>!!(typeof n==`string`&&G1.test(n)&&n.startsWith(e)||t&&!W1(n)&&Object.prototype.hasOwnProperty.call(n,t)),q1=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(U1);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},J1=e=>z$(0,255,e),Y1={...z1,transform:e=>Math.round(J1(e))},X1={test:K1(`rgb`,`red`),parse:q1(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Y1.transform(e)+`, `+Y1.transform(t)+`, `+Y1.transform(n)+`, `+H1(B1.transform(r))+`)`};function Z1(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Q1={test:K1(`#`),parse:Z1,transform:X1.transform},$1=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),e0=$1(`deg`),t0=$1(`%`),G=$1(`px`),n0=$1(`vh`),r0=$1(`vw`),i0={...t0,parse:e=>t0.parse(e)/100,transform:e=>t0.transform(e*100)},a0={test:K1(`hsl`,`hue`),parse:q1(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+t0.transform(H1(t))+`, `+t0.transform(H1(n))+`, `+H1(B1.transform(r))+`)`},o0={test:e=>X1.test(e)||Q1.test(e)||a0.test(e),parse:e=>X1.test(e)?X1.parse(e):a0.test(e)?a0.parse(e):Q1.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?X1.transform(e):a0.transform(e),getAnimatableNone:e=>{let t=o0.parse(e);return t.alpha=0,o0.transform(t)}},s0=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function c0(e){return isNaN(e)&&typeof e==`string`&&(e.match(U1)?.length||0)+(e.match(s0)?.length||0)>0}var l0=`number`,u0=`color`,d0=`var`,f0=`var(`,p0="${}",m0=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function h0(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(m0,e=>(o0.test(e)?(r.color.push(a),i.push(u0),n.push(o0.parse(e))):e.startsWith(f0)?(r.var.push(a),i.push(d0),n.push(e)):(r.number.push(a),i.push(l0),n.push(parseFloat(e))),++a,p0)).split(p0),indexes:r,types:i}}function g0(e){return h0(e).values}function _0({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===l0?i+=H1(r[a]):e===u0?i+=o0.transform(r[a]):i+=r[a]}return i}}function v0(e){return _0(h0(e))}var y0=e=>typeof e==`number`?0:o0.test(e)?o0.getAnimatableNone(e):e,b0=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:y0(e);function x0(e){let t=h0(e);return _0(t)(t.values.map((e,n)=>b0(e,t.split[n])))}var S0={test:c0,parse:g0,createTransformer:v0,getAnimatableNone:x0};function C0(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function w0({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=C0(s,r,e+1/3),a=C0(s,r,e),o=C0(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function T0(e,t){return n=>n>0?t:e}var E0=(e,t,n)=>e+(t-e)*n,D0=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},O0=[Q1,X1,a0],k0=e=>O0.find(t=>t.test(e));function A0(e){let t=k0(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===a0&&(n=w0(n)),n}var j0=(e,t)=>{let n=A0(e),r=A0(t);if(!n||!r)return T0(e,t);let i={...n};return e=>(i.red=D0(n.red,r.red,e),i.green=D0(n.green,r.green,e),i.blue=D0(n.blue,r.blue,e),i.alpha=E0(n.alpha,r.alpha,e),X1.transform(i))},M0=new Set([`none`,`hidden`]);function N0(e,t){return M0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function P0(e,t){return n=>E0(e,t,n)}function F0(e){return typeof e==`number`?P0:typeof e==`string`?I1(e)?T0:o0.test(e)?j0:z0:Array.isArray(e)?I0:typeof e==`object`?o0.test(e)?j0:L0:T0}function I0(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>F0(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function L0(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=F0(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function R0(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var z0=(e,t)=>{let n=S0.createTransformer(t),r=h0(e),i=h0(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?M0.has(e)&&!i.values.length||M0.has(t)&&!r.values.length?N0(e,t):K$(I0(R0(r,i),i.values),n):(`${e}${t}`,T0(e,t))};function B0(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?E0(e,t,n):F0(e)(e,t)}var V0=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>E1.update(t,e),stop:()=>D1(t),now:()=>O1.isProcessing?O1.timestamp:M1.now()}},H0=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},U0=2e4;function W0(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function G0(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(W0(r),U0);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:X$(i)}}var K0={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function q0(e,t){return e*Math.sqrt(1-t*t)}var J0=12;function Y0(e,t,n){let r=n;for(let n=1;n<J0;n++)r-=e(r)/t(r);return r}var X0=.001;function Z0({duration:e=K0.duration,bounce:t=K0.bounce,velocity:n=K0.velocity,mass:r=K0.mass}){let i,a;K0.maxDuration;let o=1-t;o=z$(K0.minDamping,K0.maxDamping,o),e=z$(K0.minDuration,K0.maxDuration,X$(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=q0(t,o),c=Math.exp(-i);return X0-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=q0(t**2,o);return(-i(t)+X0>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-X0+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Y0(i,a,s);if(e=Y$(e),isNaN(c))return{stiffness:K0.stiffness,damping:K0.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Q0=[`duration`,`bounce`],$0=[`stiffness`,`damping`,`mass`];function e2(e,t){return t.some(t=>e[t]!==void 0)}function t2(e){let t={velocity:K0.velocity,stiffness:K0.stiffness,damping:K0.damping,mass:K0.mass,isResolvedFromDuration:!1,...e};if(!e2(e,$0)&&e2(e,Q0))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*z$(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:K0.mass,stiffness:i,damping:a}}else{let n=Z0({...e,velocity:0});t={...t,...n,mass:K0.mass},t.isResolvedFromDuration=!0}return t}function n2(e=K0.visualDuration,t=K0.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=t2({...n,velocity:-X$(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=X$(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?K0.restSpeed.granular:K0.restSpeed.default,i||=v?K0.restDelta.granular:K0.restDelta.default;let y,b,x,S,C,w;if(h<1)x=q0(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>Y$(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=Y$(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=Y$(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(W0(T),U0),t=H0(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}n2.applyToOptions=e=>{let t=G0(e,100,n2);return e.ease=t.ease,e.duration=Y$(t.duration),e.type=`keyframes`,e};var r2=5;function i2(e,t,n){let r=Math.max(t-r2,0);return Z$(n-e(r),t-r)}function a2({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=n2({keyframes:[f.value,m(f.value)],velocity:i2(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function o2(e,t,n){let r=[],i=n||B$.mix||B0,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=K$(Array.isArray(t)?t[n]||G$:t,a)),r.push(a)}return r}function s2(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=o2(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=q$(e[r],e[r+1],n);return s[r](i)};return n?t=>l(z$(e[0],e[a-1],t)):l}function c2(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=q$(0,t,r);e.push(E0(n,1,i))}}function l2(e){let t=[0];return c2(t,e.length-1),t}function u2(e,t){return e.map(e=>e*t)}function d2(e,t){return e.map(()=>t||h1).splice(0,e.length-1)}function f2({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=g1(r)?r.map(x1):x1(r),a={done:!1,value:t[0]},o=s2(u2(n&&n.length===t.length?n:l2(t),e),t,{ease:Array.isArray(i)?i:d2(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var p2=e=>e!==null;function m2(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(p2),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var h2={decay:a2,inertia:a2,tween:f2,keyframes:f2,spring:n2};function g2(e){typeof e.type==`string`&&(e.type=h2[e.type])}var _2=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},v2=e=>e/100,y2=class extends _2{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==M1.now()&&this.tick(M1.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;g2(e);let{type:t=f2,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||f2;s!==f2&&typeof o[0]!=`number`&&(this.mixKeyframes=K$(v2,B0(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=W0(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=z$(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==a2&&(b.value=m2(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return X$(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+X$(e)}get time(){return X$(this.currentTime)}set time(e){e=Y$(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return i2(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(M1.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=X$(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=V0,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(M1.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function b2(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var x2=e=>e*180/Math.PI,S2=e=>w2(x2(Math.atan2(e[1],e[0]))),C2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:S2,rotateZ:S2,skewX:e=>x2(Math.atan(e[1])),skewY:e=>x2(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},w2=e=>(e%=360,e<0&&(e+=360),e),T2=S2,E2=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),D2=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),O2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:E2,scaleY:D2,scale:e=>(E2(e)+D2(e))/2,rotateX:e=>w2(x2(Math.atan2(e[6],e[5]))),rotateY:e=>w2(x2(Math.atan2(-e[2],e[0]))),rotateZ:T2,rotate:T2,skewX:e=>x2(Math.atan(e[4])),skewY:e=>x2(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function k2(e){return+!!e.includes(`scale`)}function A2(e,t){if(!e||e===`none`)return k2(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=O2,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=C2,i=t}if(!i)return k2(t);let a=r[t],o=i[1].split(`,`).map(M2);return typeof a==`function`?a(o):o[a]}var j2=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return A2(n,t)};function M2(e){return parseFloat(e.trim())}var N2=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],P2=new Set([...N2,`pathRotation`]),F2=e=>e===z1||e===G,I2=new Set([`x`,`y`,`z`]),L2=N2.filter(e=>!I2.has(e));function R2(e){let t=[];return L2.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var z2={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>A2(t,`x`),y:(e,{transform:t})=>A2(t,`y`)};z2.translateX=z2.x,z2.translateY=z2.y;var B2=new Set,V2=!1,H2=!1,U2=!1;function W2(){if(H2){let e=Array.from(B2).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=R2(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}H2=!1,V2=!1,B2.forEach(e=>e.complete(U2)),B2.clear()}function G2(){B2.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(H2=!0)})}function K2(){U2=!0,G2(),W2(),U2=!1}var q2=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(B2.add(this),V2||(V2=!0,E1.read(G2),E1.resolveKeyframes(W2))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}b2(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),B2.delete(this)}cancel(){this.state===`scheduled`&&(B2.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},J2=e=>e.startsWith(`--`);function Y2(e,t,n){J2(t)?e.style.setProperty(t,n):e.style[t]=n}var X2={};function Z2(e,t){let n=W$(e);return()=>X2[t]??n()}var Q2=Z2(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),$2=Z2(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),e4=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,t4={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:e4([0,.65,.55,1]),circOut:e4([.55,0,1,.45]),backIn:e4([.31,.01,.66,-.59]),backOut:e4([.33,1.53,.69,.99])};function n4(e,t){if(e)return typeof e==`function`?$2()?H0(e,t):`ease-out`:v1(e)?e4(e):Array.isArray(e)?e.map(e=>n4(e,t)||t4.easeOut):t4[e]}function r4(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=n4(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function i4(e){return typeof e==`function`&&`applyToOptions`in e}function a4({type:e,...t}){return i4(e)&&$2()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var o4=class extends _2{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=a4(e);this.animation=r4(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=m2(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Y2(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return X$(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+X$(e)}get time(){return X$(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Y$(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Q2()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),G$):r(this)}},s4={anticipate:l1,backInOut:c1,circInOut:f1};function c4(e){return e in s4}function l4(e){typeof e.ease==`string`&&c4(e.ease)&&(e.ease=s4[e.ease])}var u4=10,d4=class extends o4{constructor(e){l4(e),g2(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new y2({...a,autoplay:!1}),s=Math.max(u4,M1.now()-this.startTime),c=z$(0,u4,s-u4),l=o.sample(s).value,{name:u}=this.options;i&&u&&Y2(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},f4=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(S0.test(e)||e===`0`)&&!e.startsWith(`url(`));function p4(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function m4(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=f4(i,t),s=f4(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:p4(e)||(n===`spring`||i4(n))&&r}function h4(e){e.duration=0,e.type=`keyframes`}var g4=new Set([`opacity`,`clipPath`,`filter`,`transform`]),_4=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function v4(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&_4.test(e[t]))return!0;return!1}var y4=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),b4=W$(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function x4(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return b4()&&n&&(g4.has(n)||y4.has(n)&&v4(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var S4=40,C4=class extends _2{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=M1.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||q2;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=M1.now();let u=!0;m4(e,i,a,o)||(u=!1,(B$.instantAnimations||!s)&&l?.(m2(e,n,t)),e[0]=e[e.length-1],h4(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>S4?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&x4(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new d4({...d,element:p})}catch{m=new y2(d)}else m=new y2(d);m.finished.then(()=>{this.notifyFinished()}).catch(G$),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),K2()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},w4=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return T4(this.animations,`duration`)}get iterationDuration(){return T4(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function T4(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var E4=class extends w4{then(e,t){return this.finished.finally(e).then(()=>{})}};function D4(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var O4=30,k4=e=>!isNaN(parseFloat(e)),A4={current:void 0},j4=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=M1.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=M1.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=k4(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new J$);let n=this.events[e].add(t);return e===`change`?()=>{n(),E1.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return A4.current&&A4.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=M1.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>O4)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,O4);return Z$(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function M4(e,t){return new j4(e,t)}function N4(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function P4(e,t){let n=e?.[t]??e?.default??e;return n===e?n:N4(n,e)}var F4={type:`spring`,stiffness:500,damping:25,restSpeed:10},I4=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),L4={type:`keyframes`,duration:.8},R4={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},z4=(e,{keyframes:t})=>t.length>2?L4:P2.has(e)?e.startsWith(`scale`)?I4(t[1]):F4:R4,B4=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function V4(e){for(let t in e)if(!B4.has(t))return!0;return!1}var H4=(e,t,n,r={},i,a)=>o=>{let s=P4(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Y$(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};V4(s)||Object.assign(u,z4(e,u)),u.duration&&=Y$(u.duration),u.repeatDelay&&=Y$(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(h4(u),u.delay===0&&(d=!0)),(B$.instantAnimations||B$.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,h4(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=m2(u.keyframes,s);if(e!==void 0){E1.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new y2(u):new C4(u)},U4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function W4(e){let t=U4.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function G4(e,t,n=1){`${e}`;let[r,i]=W4(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return V$(e)?parseFloat(e):e}return I1(i)?G4(i,t,n+1):i}function K4(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function q4(e,t,n,r){if(typeof t==`function`){let[i,a]=K4(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=K4(r);t=t(n===void 0?e.custom:n,i,a)}return t}function J4(e,t,n){let r=e.getProps();return q4(r,t,n===void 0?r.custom:n,e)}var Y4=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...N2]),X4=e=>Array.isArray(e);function Z4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,M4(n))}function Q4(e){return X4(e)?e[e.length-1]||0:e}function $4(e,t){let{transitionEnd:n={},transition:r={},...i}=J4(e,t)||{};i={...i,...n};for(let t in i)Z4(e,t,Q4(i[t]))}var e3=e=>!!(e&&e.getVelocity);function t3(e){return!!(e3(e)&&e.add)}function n3(e,t){let n=e.getValue(`willChange`);if(t3(n))return n.add(t);if(!n&&B$.WillChange){let n=new B$.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function r3(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var i3=`data-`+r3(`framerAppearId`);function a3(e){return e.props[i3]}function goe({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function o3(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?N4(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&goe(f,t))continue;let o={delay:n,...P4(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){E1.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=a3(e);if(n){let e=window.MotionHandoffAnimation(n,t,E1);e!==null&&(o.startTime=e,p=!0)}}n3(e,t);let m=l??e.shouldReduceMotion;r.start(H4(t,r,i,m&&Y4.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>E1.update(()=>{o&&$4(e,o)});d.length?Promise.all(d).then(t):t()}return d}function s3(e,t,n={}){let r=J4(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(o3(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return _oe(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function _oe(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(s3(c,t,{...o,delay:n+(typeof r==`function`?0:r)+D4(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function c3(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>s3(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=s3(e,t,n);else{let i=typeof t==`function`?J4(e,t,n.custom):t;r=Promise.all(o3(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var voe={test:e=>e===`auto`,parse:e=>e},l3=e=>t=>t.test(e),u3=[z1,G,t0,e0,r0,n0,voe],d3=e=>u3.find(l3(e));function yoe(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||U$(e)}var boe=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function xoe(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(U1)||[];if(!r)return e;let i=n.replace(r,``),a=+!!boe.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Soe=/\b([a-z-]*)\(.*?\)/gu,f3={...S0,getAnimatableNone:e=>{let t=e.match(Soe);return t?t.map(xoe).join(` `):e}},p3={...S0,getAnimatableNone:e=>{let t=S0.parse(e);return S0.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},m3={...z1,transform:Math.round},h3={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,inset:G,insetBlock:G,insetBlockStart:G,insetBlockEnd:G,insetInline:G,insetInlineStart:G,insetInlineEnd:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,paddingBlock:G,paddingBlockStart:G,paddingBlockEnd:G,paddingInline:G,paddingInlineStart:G,paddingInlineEnd:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,marginBlock:G,marginBlockStart:G,marginBlockEnd:G,marginInline:G,marginInlineStart:G,marginInlineEnd:G,fontSize:G,backgroundPositionX:G,backgroundPositionY:G,rotate:e0,pathRotation:e0,rotateX:e0,rotateY:e0,rotateZ:e0,scale:V1,scaleX:V1,scaleY:V1,scaleZ:V1,skew:e0,skewX:e0,skewY:e0,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:B1,originX:i0,originY:i0,originZ:G,zIndex:m3,fillOpacity:B1,strokeOpacity:B1,numOctaves:m3},Coe={...h3,color:o0,backgroundColor:o0,outlineColor:o0,fill:o0,stroke:o0,borderColor:o0,borderTopColor:o0,borderRightColor:o0,borderBottomColor:o0,borderLeftColor:o0,filter:f3,WebkitFilter:f3,mask:p3,WebkitMask:p3},g3=e=>Coe[e],woe=new Set([f3,p3]);function _3(e,t){let n=g3(e);return woe.has(n)||(n=S0),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Toe=new Set([`auto`,`none`,`0`]);function Eoe(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Toe.has(t)&&h0(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=_3(n,i)}var Doe=class extends q2{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),I1(r))){let i=G4(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Y4.has(n)||e.length!==2)return;let[r,i]=e,a=d3(r),o=d3(i);if(R1(r)!==R1(i)&&z2[n]){this.needsMeasurement=!0;return}if(a!==o)if(F2(a)&&F2(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else z2[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||yoe(e[t]))&&n.push(t);n.length&&Eoe(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=z2[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=z2[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},v3=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function y3(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var b3=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function x3(e){return H$(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:S3,cancel:Ooe}=T1(queueMicrotask,!1),C3={x:!1,y:!1};function w3(){return C3.x||C3.y}function koe(e){return e===`x`||e===`y`?C3[e]?null:(C3[e]=!0,()=>{C3[e]=!1}):C3.x||C3.y?null:(C3.x=C3.y=!0,()=>{C3.x=C3.y=!1})}function T3(e,t){let n=y3(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Aoe(e){return!(e.pointerType===`touch`||w3())}function joe(e,t,n={}){let[r,i,a]=T3(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Aoe(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var E3=(e,t)=>t?e===t?!0:E3(e,t.parentElement):!1,D3=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Moe=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Noe(e){return Moe.has(e.tagName)||e.isContentEditable===!0}var Poe=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Foe(e){return Poe.has(e.tagName)||e.isContentEditable===!0}var O3=new WeakSet;function k3(e){return t=>{t.key===`Enter`&&e(t)}}function A3(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ioe=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=k3(()=>{if(O3.has(n))return;A3(n,`down`);let e=k3(()=>{A3(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>A3(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function j3(e){return D3(e)&&!w3()}var M3=new WeakSet;function Loe(e,t,n={}){let[r,i,a]=T3(e,n),o=e=>{let r=e.currentTarget;if(!j3(e)||M3.has(e))return;O3.add(r),n.stopPropagation&&M3.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),O3.has(r)&&O3.delete(r),j3(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||E3(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),x3(e)&&(e.addEventListener(`focus`,e=>Ioe(e,i)),!Noe(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function N3(e){return H$(e)&&`ownerSVGElement`in e}var P3=new WeakMap,F3,I3=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:N3(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Roe=I3(`inline`,`width`,`offsetWidth`),zoe=I3(`block`,`height`,`offsetHeight`);function Boe({target:e,borderBoxSize:t}){P3.get(e)?.forEach(n=>{n(e,{get width(){return Roe(e,t)},get height(){return zoe(e,t)}})})}function Voe(e){e.forEach(Boe)}function Hoe(){typeof ResizeObserver>`u`||(F3=new ResizeObserver(Voe))}function Uoe(e,t){F3||Hoe();let n=y3(e);return n.forEach(e=>{let n=P3.get(e);n||(n=new Set,P3.set(e,n)),n.add(t),F3?.observe(e)}),()=>{n.forEach(e=>{let n=P3.get(e);n?.delete(t),n?.size||F3?.unobserve(e)})}}var L3=new Set,R3;function Woe(){R3=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};L3.forEach(t=>t(e))},window.addEventListener(`resize`,R3)}function Goe(e){return L3.add(e),R3||Woe(),()=>{L3.delete(e),!L3.size&&typeof R3==`function`&&(window.removeEventListener(`resize`,R3),R3=void 0)}}function z3(e,t){return typeof e==`function`?Goe(e):Uoe(e,t)}var B3={value:null,addProjectionMetrics:null};function V3(e){return N3(e)&&e.tagName===`svg`}function Koe(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=s2(i,a,o);return t?s(r):s}function qoe(e,t,n={}){let r=e.get(),i=null,a=r,o,s=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,c=()=>{i&&=(i.stop(),null),e.animation=void 0},l=()=>{let t=U3(e.get()),r=U3(a);if(t===r){c();return}let s=i?i.getGeneratorVelocity():e.getVelocity();c(),i=new y2({keyframes:[t,r],velocity:s,type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:o})},u=()=>{l(),e.animation=i??void 0,e.events.animationStart?.notify(),i?.then(()=>{e.animation=void 0,e.events.animationComplete?.notify()})};if(e.attach((e,t)=>{a=e,o=e=>t(H3(e,s)),E1.postRender(u)},c),e3(t)){let r=n.skipInitialAnimation===!0,i=t.on(`change`,t=>{r?(r=!1,e.jump(H3(t,s),!1)):e.set(H3(t,s))}),a=e.on(`destroy`,i);return()=>{i(),a()}}return c}function H3(e,t){return t?e+t:e}function U3(e){return typeof e==`number`?e:parseFloat(e)}var Joe=[...u3,o0,S0],Yoe=e=>Joe.find(l3(e)),W3=()=>({translate:0,scale:1,origin:0,originPoint:0}),G3=()=>({x:W3(),y:W3()}),K3=()=>({min:0,max:0}),q3=()=>({x:K3(),y:K3()}),J3=new WeakMap;function Y3(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function X3(e){return typeof e==`string`||Array.isArray(e)}var Z3=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Q3=[`initial`,...Z3];function $3(e){return Y3(e.animate)||Q3.some(t=>X3(e[t]))}function e6(e){return!!($3(e)||e.variants)}function Xoe(e,t,n){for(let r in t){let i=t[r],a=n[r];if(e3(i))e.addValue(r,i);else if(e3(a))e.addValue(r,M4(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,M4(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var t6={current:null},n6={current:!1},Zoe=typeof window<`u`;function r6(){if(n6.current=!0,Zoe)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>t6.current=e.matches;e.addEventListener(`change`,t),t()}else t6.current=!1}var i6=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],a6={};function o6(e){a6=e}function Qoe(){return a6}var s6=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=q2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=M1.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,E1.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=$3(t),this.isVariantNode=e6(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&e3(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,J3.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(n6.current||r6(),this.shouldReduceMotion=t6.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),D1(this.notifyUpdate),D1(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&g4.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new o4({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Y$(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=P2.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&E1.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in a6){let t=a6[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):q3()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<i6.length;t++){let n=i6[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Xoe(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=M4(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(V$(n)||U$(n))?n=parseFloat(n):!Yoe(n)&&S0.test(t)&&(n=_3(e,t)),this.setBaseTarget(e,e3(n)?n.get():n)),e3(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=q4(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!e3(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new J$),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){S3.render(this.render)}},c6=class extends s6{constructor(){super(...arguments),this.KeyframeResolver=Doe}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;e3(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},l6=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function u6({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function $oe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ese(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function d6(e){return e===void 0||e===1}function f6({scale:e,scaleX:t,scaleY:n}){return!d6(e)||!d6(t)||!d6(n)}function p6(e){return f6(e)||m6(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function m6(e){return h6(e.x)||h6(e.y)}function h6(e){return e&&e!==`0%`}function g6(e,t,n){return n+t*(e-n)}function _6(e,t,n,r,i){return i!==void 0&&(e=g6(e,i,r)),g6(e,n,r)+t}function v6(e,t=0,n=1,r,i){e.min=_6(e.min,t,n,r,i),e.max=_6(e.max,t,n,r,i)}function y6(e,{x:t,y:n}){v6(e.x,t.translate,t.scale,t.originPoint),v6(e.y,n.translate,n.scale,n.originPoint)}var b6=.999999999999,x6=1.0000000000001;function tse(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(S6(e.x,-a.scroll.offset.x),S6(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,y6(e,o)),r&&p6(a.latestValues)&&T6(e,a.latestValues,a.layout?.layoutBox))}t.x<x6&&t.x>b6&&(t.x=1),t.y<x6&&t.y>b6&&(t.y=1)}function S6(e,t){e.min+=t,e.max+=t}function C6(e,t,n,r,i=.5){v6(e,t,n,E0(e.min,e.max,i),r)}function w6(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function T6(e,t,n){let r=n??e;C6(e.x,w6(t.x,r.x),t.scaleX,t.scale,t.originX),C6(e.y,w6(t.y,r.y),t.scaleY,t.scale,t.originY)}function E6(e,t){return u6(ese(e.getBoundingClientRect(),t))}function nse(e,t,n){let r=E6(e,n),{scroll:i}=t;return i&&(S6(r.x,i.offset.x),S6(r.y,i.offset.y)),r}var rse={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ise=N2.length;function ase(e,t,n){let r=``,i=!0;for(let a=0;a<ise;a++){let o=N2[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=b3(s,h3[o]);if(!c){i=!1;let t=rse[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${b3(a,h3.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function D6(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(P2.has(e)){o=!0;continue}else if(P1(e)){i[e]=n;continue}else{let t=b3(n,h3[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=ase(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function O6(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function k6(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var A6={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(G.test(e))e=parseFloat(e);else return e;return`${k6(e,t.target.x)}% ${k6(e,t.target.y)}%`}},ose={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=S0.parse(e);if(i.length>5)return r;let a=S0.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=E0(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},j6={borderRadius:{...A6,applyTo:[...v3]},borderTopLeftRadius:A6,borderTopRightRadius:A6,borderBottomLeftRadius:A6,borderBottomRightRadius:A6,boxShadow:ose};function M6(e,{layout:t,layoutId:n}){return P2.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!j6[e]||e===`opacity`)}function N6(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(e3(r[t])||i&&e3(i[t])||M6(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function sse(e){return window.getComputedStyle(e)}var P6=class extends c6{constructor(){super(...arguments),this.type=`html`,this.renderInstance=O6}readValueFromInstance(e,t){if(P2.has(t))return this.projection?.isProjecting?k2(t):j2(e,t);{let n=sse(e),r=(P1(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return E6(e,t)}build(e,t,n){D6(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return N6(e,t,n)}};function cse(e,t){return e in t}var lse=class extends s6{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(cse(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return q3()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},use={offset:`stroke-dashoffset`,array:`stroke-dasharray`},dse={offset:`strokeDashoffset`,array:`strokeDasharray`};function fse(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?use:dse;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var pse=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function F6(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(D6(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of pse)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&fse(d,i,a,o,!1)}var I6=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),L6=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function mse(e,t,n,r){O6(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(I6.has(n)?n:r3(n),t.attrs[n])}function R6(e,t,n){let r=N6(e,t,n);for(let n in e)if(e3(e[n])||e3(t[n])){let t=N2.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var z6=class extends c6{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=q3}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(P2.has(t)){let e=g3(t);return e&&e.default||0}return t=I6.has(t)?t:r3(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return R6(e,t,n)}build(e,t,n){F6(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){mse(e,t,n,r)}mount(e){this.isSVGTag=L6(e.tagName),super.mount(e)}},hse=Q3.length;function B6(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&B6(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<hse;n++){let r=Q3[n],i=e.props[r];(X3(i)||i===!1)&&(t[r]=i)}return t}function V6(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var gse=[...Z3].reverse(),_se=Z3.length;function vse(e){return t=>Promise.all(t.map(({animation:t,options:n})=>c3(e,t,n)))}function yse(e){let t=vse(e),n=U6(),r=!0,i=!1,a=t=>(n,r)=>{let i=J4(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=B6(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<_se;t++){let p=gse[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=X3(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Y3(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=bse(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=X4(t)&&X4(n)?!V6(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=J4(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=D4(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=J4(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=U6(),i=!0}}}function bse(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!V6(t,e):!1}function H6(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function U6(){return{animate:H6(!0),whileInView:H6(),whileHover:H6(),whileTap:H6(),whileDrag:H6(),whileFocus:H6(),exit:H6()}}function W6(e,t){e.min=t.min,e.max=t.max}function G6(e,t){W6(e.x,t.x),W6(e.y,t.y)}function K6(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var q6=1e-4,xse=1-q6,Sse=1+q6,J6=.01,Cse=0-J6,wse=0+J6;function Y6(e){return e.max-e.min}function Tse(e,t,n){return Math.abs(e-t)<=n}function X6(e,t,n,r=.5){e.origin=r,e.originPoint=E0(t.min,t.max,e.origin),e.scale=Y6(n)/Y6(t),e.translate=E0(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xse&&e.scale<=Sse||isNaN(e.scale))&&(e.scale=1),(e.translate>=Cse&&e.translate<=wse||isNaN(e.translate))&&(e.translate=0)}function Z6(e,t,n,r){X6(e.x,t.x,n.x,r?r.originX:void 0),X6(e.y,t.y,n.y,r?r.originY:void 0)}function Q6(e,t,n,r=0){e.min=(r?E0(n.min,n.max,r):n.min)+t.min,e.max=e.min+Y6(t)}function Ese(e,t,n,r){Q6(e.x,t.x,n.x,r?.x),Q6(e.y,t.y,n.y,r?.y)}function $6(e,t,n,r=0){let i=r?E0(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Y6(t)}function e8(e,t,n,r){$6(e.x,t.x,n.x,r?.x),$6(e.y,t.y,n.y,r?.y)}function t8(e,t,n,r,i){return e-=t,e=g6(e,1/n,r),i!==void 0&&(e=g6(e,1/i,r)),e}function Dse(e,t=0,n=1,r=.5,i,a=e,o=e){if(t0.test(t)&&(t=parseFloat(t),t=E0(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=E0(a.min,a.max,r);e===a&&(s-=t),e.min=t8(e.min,t,n,s,i),e.max=t8(e.max,t,n,s,i)}function n8(e,t,[n,r,i],a,o){Dse(e,t[n],t[r],t[i],t.scale,a,o)}var Ose=[`x`,`scaleX`,`originX`],kse=[`y`,`scaleY`,`originY`];function r8(e,t,n,r){n8(e.x,t,Ose,n?n.x:void 0,r?r.x:void 0),n8(e.y,t,kse,n?n.y:void 0,r?r.y:void 0)}function i8(e){return e.translate===0&&e.scale===1}function a8(e){return i8(e.x)&&i8(e.y)}function o8(e,t){return e.min===t.min&&e.max===t.max}function Ase(e,t){return o8(e.x,t.x)&&o8(e.y,t.y)}function s8(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function c8(e,t){return s8(e.x,t.x)&&s8(e.y,t.y)}function l8(e){return Y6(e.x)/Y6(e.y)}function u8(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function d8(e){return[e(`x`),e(`y`)]}function jse(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Mse=v3.length,f8=e=>typeof e==`string`?parseFloat(e):e,p8=e=>typeof e==`number`||G.test(e);function Nse(e,t,n,r,i,a){i?(e.opacity=E0(0,n.opacity??1,Pse(r)),e.opacityExit=E0(t.opacity??1,0,Fse(r))):a&&(e.opacity=E0(t.opacity??1,n.opacity??1,r));for(let i=0;i<Mse;i++){let a=v3[i],o=m8(t,a),s=m8(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||p8(o)===p8(s)?(e[a]=Math.max(E0(f8(o),f8(s),r),0),(t0.test(s)||t0.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=E0(t.rotate||0,n.rotate||0,r))}function m8(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Pse=h8(0,.5,d1),Fse=h8(.5,.95,G$);function h8(e,t,n){return r=>r<e?0:r>t?1:n(q$(e,t,r))}function g8(e,t,n){let r=e3(e)?e:M4(e);return r.start(H4(``,r,t,n)),r.animation}function _8(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var Ise=(e,t)=>e.depth-t.depth,Lse=class{constructor(){this.children=[],this.isDirty=!1}add(e){L$(this.children,e),this.isDirty=!0}remove(e){R$(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ise),this.isDirty=!1,this.children.forEach(e)}};function Rse(e,t){let n=M1.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(D1(r),e(a-t))};return E1.setup(r,!0),()=>D1(r)}function v8(e){return e3(e)?e.get():e}var zse=class{constructor(){this.members=[]}add(e){L$(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(R$(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(R$(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},y8={hasAnimatedSinceResize:!0,hasEverUpdated:!1},b8={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},x8=[``,`X`,`Y`,`Z`],Bse=1e3,Vse=0;function S8(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function C8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=a3(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,E1,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&C8(r)}function w8({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Vse++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,B3.value&&(b8.nodes=b8.calculatedTargetDeltas=b8.calculatedProjections=0),this.nodes.forEach(Wse),this.nodes.forEach(Xse),this.nodes.forEach(Zse),this.nodes.forEach(Gse),B3.addProjectionMetrics&&B3.addProjectionMetrics(b8)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Lse)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new J$),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=N3(t)&&!V3(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;E1.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Rse(i,250),y8.hasAnimatedSinceResize&&(y8.hasAnimatedSinceResize=!1,this.nodes.forEach(D8)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||nce,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!c8(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...P4(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||D8(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),D1(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Qse),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&C8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(qse),this.nodes.forEach(T8);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(E8);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Jse),this.nodes.forEach(Yse),this.nodes.forEach(Hse),this.nodes.forEach(Use)):this.nodes.forEach(E8),this.clearAllSnapshots();let e=M1.now();O1.delta=z$(0,1e3/60,e-O1.timestamp),O1.timestamp=e,O1.isProcessing=!0,k1.update.process(O1),k1.preRender.process(O1),k1.render.process(O1),O1.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,S3.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kse),this.sharedNodes.forEach($se)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E1.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E1.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Y6(this.snapshot.measuredBox.x)&&!Y6(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=q3(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!a8(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||p6(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),rce(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return q3();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ice))){let{scroll:e}=this.root;e&&(S6(t.x,e.offset.x),S6(t.y,e.offset.y))}return t}removeElementScroll(e){let t=q3();if(G6(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&G6(t,e),S6(t.x,i.offset.x),S6(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||q3();G6(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(S6(r.x,-n.scroll.offset.x),S6(r.y,-n.scroll.offset.y)),p6(n.latestValues)&&T6(r,n.latestValues,n.layout?.layoutBox)}return p6(this.latestValues)&&T6(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=q3();G6(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!p6(n.latestValues))continue;let r;n.instance&&(f6(n.latestValues)&&n.updateSnapshot(),r=q3(),G6(r,n.measurePageBox())),r8(t,n.latestValues,n.snapshot?.layoutBox,r)}return p6(this.latestValues)&&r8(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O1.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=O1.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=q3(),this.targetWithTransforms=q3()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ese(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):G6(this.target,this.layout.layoutBox),y6(this.target,this.targetDelta)):G6(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),B3.value&&b8.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||f6(this.parent.latestValues)||m6(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=q3(),this.relativeTargetOrigin=q3(),e8(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),G6(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===O1.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;G6(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;tse(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=q3());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(K6(this.prevProjectionDelta.x,this.projectionDelta.x),K6(this.prevProjectionDelta.y,this.projectionDelta.y)),Z6(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!u8(this.projectionDelta.x,this.prevProjectionDelta.x)||!u8(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),B3.value&&b8.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=G3(),this.projectionDelta=G3(),this.projectionDeltaWithTransform=G3()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=G3();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=q3(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(tce));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=E0(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=E0(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(O8(o.x,e.x,n),O8(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(e8(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ece(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Ase(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=q3(),G6(f,this.relativeTarget)),c&&(this.animationValues=a,Nse(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(D1(this.pendingAnimation),void 0),this.pendingAnimation=E1.update(()=>{y8.hasAnimatedSinceResize=!0,this.motionValue||=M4(0),this.motionValue.jump(0,!1),this.currentAnimation=g8(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Bse),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&N8(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||q3();let t=Y6(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Y6(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}G6(t,n),T6(t,i),Z6(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new zse),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&S8(`z`,e,r,this.animationValues);for(let t=0;t<x8.length;t++)S8(`rotate${x8[t]}`,e,r,this.animationValues),S8(`skew${x8[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=v8(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=v8(t?.pointerEvents)||``),this.hasProjected&&!p6(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=jse(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in j6){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=j6[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?v8(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(T8),this.root.sharedNodes.clear()}}}function Hse(e){e.updateLayout()}function Use(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)d8(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Y6(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;W6(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else N8(i,t.layoutBox,n)&&d8(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Y6(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=G3();Z6(o,n,t.layoutBox);let s=G3();a?Z6(s,e.applyTransform(r,!0),t.measuredBox):Z6(s,n,t.layoutBox);let c=!a8(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=q3();e8(s,t.layoutBox,i.layoutBox,o);let c=q3();e8(c,n,a.layoutBox,o),c8(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Wse(e){B3.value&&b8.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Gse(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Kse(e){e.clearSnapshot()}function T8(e){e.clearMeasurements()}function qse(e){e.isLayoutDirty=!0,e.updateLayout()}function E8(e){e.isLayoutDirty=!1}function Jse(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Yse(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function D8(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Xse(e){e.resolveTargetDelta()}function Zse(e){e.calcProjection()}function Qse(e){e.resetSkewAndRotation()}function $se(e){e.removeLeadSnapshot()}function O8(e,t,n){e.translate=E0(t.translate,0,n),e.scale=E0(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function k8(e,t,n,r){e.min=E0(t.min,n.min,r),e.max=E0(t.max,n.max,r)}function ece(e,t,n,r){k8(e.x,t.x,n.x,r),k8(e.y,t.y,n.y,r)}function tce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var nce={duration:.45,ease:[.4,0,.1,1]},A8=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),j8=A8(`applewebkit/`)&&!A8(`chrome/`)?Math.round:G$;function M8(e){e.min=j8(e.min),e.max=j8(e.max)}function rce(e){M8(e.x),M8(e.y)}function N8(e,t,n){return e===`position`||e===`preserve-aspect`&&!Tse(l8(t),l8(n),.2)}function ice(e){return e!==e.root&&e.scroll?.wasRoot}var ace=w8({attachResizeListener:(e,t)=>_8(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),P8={current:void 0},F8=w8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!P8.current){let e=new ace({});e.mount(window),e.setOptions({layoutScroll:!0}),P8.current=e}return P8.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),I8=(0,j.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function L8(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function oce(...e){return t=>{let n=!1,r=e.map(e=>{let r=L8(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():L8(e[t],null)}}}}function sce(...e){return j.useCallback(oce(...e),e)}var cce=class extends j.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(x3(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=x3(e)&&e.offsetWidth||0,r=x3(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function lce({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,j.useId)(),s=(0,j.useRef)(null),c=(0,j.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,j.useContext)(I8),u=sce(s,e.props?.ref??e?.ref);return(0,j.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
119
119
  [data-motion-pop-id="${o}"] {
120
120
  position: absolute !important;
121
121
  width: ${e}px !important;
@@ -123,5 +123,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
123
123
  ${_}px !important;
124
124
  ${v}px !important;
125
125
  }
126
- `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,M.jsx)(cce,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:j.cloneElement(e,{ref:u})})}var uce=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=P$(dce),d=(0,j.useId)(),f=(0,j.useRef)(n),p=(0,j.useRef)(r);F$(()=>{f.current=n,p.current=r});let m=!0,h=(0,j.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,j.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),j.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,M.jsx)(lce,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,M.jsx)(I$.Provider,{value:h,children:e})};function dce(){return new Map}function R8(e=!0){let t=(0,j.useContext)(I$);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,j.useId)();(0,j.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,j.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}function fce(){return pce((0,j.useContext)(I$))}function pce(e){return e===null?!0:e.isPresent}var z8=e=>e.key||``;function B8(e){let t=[];return j.Children.forEach(e,e=>{(0,j.isValidElement)(e)&&t.push(e)}),t}var mce=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=R8(o),f=(0,j.useMemo)(()=>B8(e),[e]),p=o&&!u?[]:f.map(z8),m=(0,j.useRef)(!0),h=(0,j.useRef)(f),g=P$(()=>new Map),_=(0,j.useRef)(new Set),[v,y]=(0,j.useState)(f),[b,x]=(0,j.useState)(f);F$(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=z8(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=z8(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(B8(e)),y(f),null}let{forceRender:C}=(0,j.useContext)(N$);return(0,M.jsx)(M.Fragment,{children:b.map(e=>{let v=z8(e),y=o&&!u?!1:f===b||p.includes(v);return(0,M.jsx)(uce,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},V8=(0,j.createContext)({strict:!1}),H8={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},U8=!1;function hce(){if(U8)return;let e={};for(let t in H8)e[t]={isEnabled:e=>H8[t].some(t=>!!e[t])};o6(e),U8=!0}function W8(){return hce(),Qoe()}function gce(e){let t=W8();for(let n in e)t[n]={...t[n],...e[n]};o6(t)}var _ce=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function G8(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||_ce.has(e)}var vce=r({default:()=>K8}),K8,yce=t((()=>{throw K8={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),q8=e=>!G8(e);function bce(e){typeof e==`function`&&(q8=t=>t.startsWith(`on`)?!G8(t):e(t))}try{bce((yce(),e(vce)).default)}catch{}function xce(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||e3(e[i])||(q8(i)||n===!0&&G8(i)||!t&&!G8(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var J8=(0,j.createContext)({});function Sce(e,t){if($3(e)){let{initial:t,animate:n}=e;return{initial:t===!1||X3(t)?t:void 0,animate:X3(n)?n:void 0}}return e.inherit===!1?{}:t}function Cce(e){let{initial:t,animate:n}=Sce(e,(0,j.useContext)(J8));return(0,j.useMemo)(()=>({initial:t,animate:n}),[Y8(t),Y8(n)])}function Y8(e){return Array.isArray(e)?e.join(` `):e}var X8=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Z8(e,t,n){for(let r in t)!e3(t[r])&&!M6(r,n)&&(e[r]=t[r])}function wce({transformTemplate:e},t){return(0,j.useMemo)(()=>{let n=X8();return D6(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Tce(e,t){let n=e.style||{},r={};return Z8(r,n,e),Object.assign(r,wce(e,t)),r}function Ece(e,t){let n={},r=Tce(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Q8=()=>({...X8(),attrs:{}});function Dce(e,t,n,r){let i=(0,j.useMemo)(()=>{let n=Q8();return F6(n,t,L6(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Z8(t,e.style,e),i.style={...t,...i.style}}return i}var Oce=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function $8(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Oce.indexOf(e)>-1||/[A-Z]/u.test(e))}function kce(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??$8(e)?Dce:Ece)(t,r,i,e),c=xce(t,typeof e==`string`,a),l=e===j.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,j.useMemo)(()=>e3(u)?u.get():u,[u]);return(0,j.createElement)(e,{...l,children:d})}function Ace({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:jce(n,r,i,e),renderState:t()}}function jce(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=v8(a[e]);let{initial:o,animate:s}=e,c=$3(e),l=e6(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Y3(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=q4(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var e5=e=>(t,n)=>{let r=(0,j.useContext)(J8),i=(0,j.useContext)(I$),a=()=>Ace(e,t,r,i);return n?a():P$(a)},Mce=e5({scrapeMotionValuesFromProps:N6,createRenderState:X8}),Nce=e5({scrapeMotionValuesFromProps:R6,createRenderState:Q8}),Pce=Symbol.for(`motionComponentSymbol`);function Fce(e,t,n){let r=(0,j.useRef)(n);(0,j.useInsertionEffect)(()=>{r.current=n});let i=(0,j.useRef)(null);return(0,j.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var t5=(0,j.createContext)({});function n5(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ice(e,t,n,r,i,a){let{visualElement:o}=(0,j.useContext)(J8),s=(0,j.useContext)(V8),c=(0,j.useContext)(I$),l=(0,j.useContext)(I8),u=l.reducedMotion,d=l.skipAnimations,f=(0,j.useRef)(null),p=(0,j.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,j.useContext)(t5);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Lce(f.current,n,i,h);let g=(0,j.useRef)(!1);(0,j.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[i3],v=(0,j.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return F$(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,j.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Lce(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:r5(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&n5(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function r5(e){if(e)return e.options.allowProjection===!1?r5(e.parent):e.projection}function i5(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&gce(r);let a=n?n===`svg`:$8(e),o=a?Nce:Mce;function s(n,s){let c,l={...(0,j.useContext)(I8),...n,layoutId:Rce(n)},{isStatic:u}=l,d=Cce(n),f=o(n,u);if(!u&&typeof window<`u`){zce(l,r);let t=Bce(l);c=t.MeasureLayout,d.visualElement=Ice(e,f,l,i,t.ProjectionNode,a)}return(0,M.jsxs)(J8.Provider,{value:d,children:[c&&d.visualElement?(0,M.jsx)(c,{visualElement:d.visualElement,...l}):null,kce(e,n,Fce(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,j.forwardRef)(s);return c[Pce]=e,c}function Rce({layoutId:e}){let t=(0,j.useContext)(N$).id;return t&&e!==void 0?t+`-`+e:e}function zce(e,t){(0,j.useContext)(V8).strict}function Bce(e){let{drag:t,layout:n}=W8();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Vce(e,t){if(typeof Proxy>`u`)return i5;let n=new Map,r=(n,r)=>i5(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,i5(a,void 0,e,t)),n.get(a))})}var Hce=(e,t)=>t.isSVG??$8(e)?new z6(t):new P6(t,{allowProjection:e!==j.Fragment}),Uce=class extends l6{constructor(e){super(e),e.animationState||=yse(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Y3(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Wce=0,Gce={animation:{Feature:Uce},exit:{Feature:class extends l6{constructor(){super(...arguments),this.id=Wce++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=J4(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function a5(e){return{point:{x:e.pageX,y:e.pageY}}}var Kce=e=>t=>D3(t)&&e(t,a5(t));function o5(e,t,n,r){return _8(e,t,Kce(n),r)}var s5=({current:e})=>e?e.ownerDocument.defaultView:null,c5=(e,t)=>Math.abs(e-t);function qce(e,t){let n=c5(e.x,t.x),r=c5(e.y,t.y);return Math.sqrt(n**2+r**2)}var l5=new Set([`auto`,`scroll`]),u5=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=d5(this.lastRawMoveEventInfo,this.transformPagePoint));let e=p5(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=qce(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=O1;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=d5(t,this.transformPagePoint),E1.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=p5(e.type===`pointercancel`?this.lastMoveEventInfo:d5(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!D3(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=d5(a5(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=O1;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,p5(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=K$(o5(this.contextWindow,`pointermove`,this.handlePointerMove,d),o5(this.contextWindow,`pointerup`,this.handlePointerUp,d),o5(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(l5.has(e.overflowX)||l5.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),E1.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),D1(this.updatePoint)}};function d5(e,t){return t?{point:t(e.point)}:e}function f5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function p5({point:e},t){return{point:e,delta:f5(e,m5(t)),offset:f5(e,Jce(t)),velocity:Yce(t,.1)}}function Jce(e){return e[0]}function m5(e){return e[e.length-1]}function Yce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=m5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Y$(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Y$(t)*2&&(r=e[1]);let a=X$(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Xce(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?E0(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?E0(n,e,r.max):Math.min(e,n)),e}function h5(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Zce(e,{top:t,left:n,bottom:r,right:i}){return{x:h5(e.x,n,i),y:h5(e.y,t,r)}}function g5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Qce(e,t){return{x:g5(e.x,t.x),y:g5(e.y,t.y)}}function $ce(e,t){let n=.5,r=Y6(e),i=Y6(t);return i>r?n=q$(t.min,t.max-r,e.min):r>i&&(n=q$(e.min,e.max-i,t.min)),z$(0,1,n)}function ele(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var _5=.35;function tle(e=_5){return e===!1?e=0:e===!0&&(e=_5),{x:v5(e,`left`,`right`),y:v5(e,`top`,`bottom`)}}function v5(e,t,n){return{min:y5(e,t),max:y5(e,n)}}function y5(e,t){return typeof e==`number`?e:e[t]||0}var nle=new WeakMap,rle=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=q3(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(a5(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=koe(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),d8(e=>{let t=this.getAxisMotionValue(e).get()||0;if(t0.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Y6(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&E1.update(()=>i(e,t),!1,!0),n3(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=ale(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&E1.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new u5(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:s5(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&E1.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!x5(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Xce(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&n5(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Zce(n.layoutBox,e):this.constraints=!1,this.elastic=tle(t),r!==this.constraints&&!n5(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&d8(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ele(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!n5(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=nse(n,r.root,this.visualElement.getTransformPagePoint()),a=Qce(r.layout.layoutBox,i);if(t){let e=t($oe(a));this.hasMutatedConstraints=!!e,e&&(a=u6(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=d8(o=>{if(!x5(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return n3(this.visualElement,e),n.start(H4(e,n,0,t,this.visualElement,!1))}stopAnimation(){d8(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){d8(t=>{let{drag:n}=this.getProps();if(!x5(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-E0(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!n5(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};d8(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=$ce({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),d8(t=>{if(!x5(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(E0(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;nle.set(this.visualElement,this);let e=this.visualElement.current,t=o5(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Foe(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();n5(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=ile(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),E1.read(r);let o=_8(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(d8(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=_5,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function b5(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ile(e,t,n){let r=z3(e,b5(n)),i=z3(t,b5(n));return()=>{r(),i()}}function x5(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ale(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var ole=class extends l6{constructor(e){super(e),this.removeGroupControls=G$,this.removeListeners=G$,this.controls=new rle(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G$}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},S5=e=>(t,n)=>{e&&E1.update(()=>e(t,n),!1,!0)},sle=class extends l6{constructor(){super(...arguments),this.removePointerDownListener=G$}onPointerDown(e){this.session=new u5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:s5(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:S5(e),onStart:S5(t),onMove:S5(n),onEnd:(e,t)=>{delete this.session,r&&E1.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=o5(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},C5=!1,cle=class extends j.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),C5&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),y8.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),C5=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||E1.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),S3.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;C5=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function w5(e){let[t,n]=R8(),r=(0,j.useContext)(N$);return(0,M.jsx)(cle,{...e,layoutGroup:r,switchLayoutGroup:(0,j.useContext)(t5),isPresent:t,safeToRemove:n})}var lle={pan:{Feature:sle},drag:{Feature:ole,ProjectionNode:F8,MeasureLayout:w5}};function T5(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&E1.postRender(()=>i(t,a5(t)))}var ule=class extends l6{mount(){let{current:e}=this.node;e&&(this.unmount=joe(e,(e,t)=>(T5(this.node,t,`Start`),e=>T5(this.node,e,`End`))))}unmount(){}},dle=class extends l6{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=K$(_8(this.node.current,`focus`,()=>this.onFocus()),_8(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function E5(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&E1.postRender(()=>i(t,a5(t)))}var fle=class extends l6{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Loe(e,(e,t)=>(E5(this.node,t,`Start`),(e,{success:t})=>E5(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},D5=new WeakMap,O5=new WeakMap,ple=e=>{let t=D5.get(e.target);t&&t(e)},mle=e=>{e.forEach(ple)};function hle({root:e,...t}){let n=e||document;O5.has(n)||O5.set(n,{});let r=O5.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(mle,{root:e,...t})),r[i]}function gle(e,t,n){let r=hle(t);return D5.set(e,n),r.observe(e),()=>{D5.delete(e),r.unobserve(e)}}var _le={some:0,all:1},vle=class extends l6{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:_le[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=gle(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(yle(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function yle({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var ble={inView:{Feature:vle},tap:{Feature:fle},focus:{Feature:dle},hover:{Feature:ule}},xle={layout:{ProjectionNode:F8,MeasureLayout:w5}},Sle=Vce({...Gce,...ble,...lle,...xle},Hce);function k5(e){let t=P$(()=>M4(e)),{isStatic:n}=(0,j.useContext)(I8);if(n){let[,n]=(0,j.useState)(e);(0,j.useEffect)(()=>t.on(`change`,n),[])}return t}function A5(e,t){let n=k5(t()),r=()=>n.set(t());return r(),F$(()=>{let t=()=>E1.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),D1(r)}}),n}function Cle(e){A4.current=[],e();let t=A5(A4.current,e);return A4.current=void 0,t}function j5(e,t,n,r){if(typeof e==`function`)return Cle(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return wle(e,t,n,r);let i=typeof t==`function`?t:Koe(t,n,r),a=Array.isArray(e)?M5(e,i):M5([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function M5(e,t){let n=P$(()=>[]);return A5(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function wle(e,t,n,r){let i=P$(()=>Object.keys(n)),a=P$(()=>({}));for(let o of i)a[o]=j5(e,t,n[o],r);return a}function Tle(e,t={}){let{isStatic:n}=(0,j.useContext)(I8),r=()=>e3(e)?e.get():e;if(n)return j5(r);let i=k5(r());return(0,j.useInsertionEffect)(()=>qoe(i,e,t),[i,JSON.stringify(t)]),i}function Ele(e,t={}){return Tle(e,{type:`spring`,...t})}function Dle(){!n6.current&&r6();let[e]=(0,j.useState)(t6.current);return e}function Ole(e){e.values.forEach(e=>e.stop())}function N5(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&$4(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{N5(e,t)})})}function kle(e,t){if(Array.isArray(t))return N5(e,t);if(typeof t==`string`)return N5(e,[t]);$4(e,t)}function Ale(){let e=new Set,t={subscribe(t){return e.add(t),()=>void e.delete(t)},start(t,n){let r=[];return e.forEach(e=>{r.push(c3(e,t,{transitionOverride:n}))}),Promise.all(r)},set(t){return e.forEach(e=>{kle(e,t)})},stop(){e.forEach(e=>{Ole(e)})},mount(){return()=>{t.stop()}}};return t}function P5(e){return typeof e==`object`&&!Array.isArray(e)}function F5(e,t,n,r){return e==null?[]:typeof e==`string`&&P5(t)?y3(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function jle(e,t,n){return e*(t+1)+n*t}function I5(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Mle(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(R$(e,i),r--)}}function Nle(e,t,n,r,i,a){Mle(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:E0(i,a,r[o]),easing:_1(n,o)})}function Ple(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Fle(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Ile=`easeInOut`,L5=20;function Lle(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,I5(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=I5(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Rle(e),{delay:l=0,times:u=l2(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=i4(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Vle(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=Y$(b));let r=G0(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&c2(u,T),c.length===1&&c.unshift(null),m&&`${m}${L5}`,m&&m<L5){let e=b>0?_/b:0;b=jle(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?a1(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:_1(f,e-1))}Ple(u,m,e)}let E=w+b;Nle(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(e3(p)){let e=R5(p,s);_(m,h,z5(`default`,e))}else{let e=F5(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=R5(r,s);for(let e in m)_(m[e],zle(h,e),z5(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Fle);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(q$(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(Ile)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function R5(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function z5(e,t){return t[e]||(t[e]=[]),t[e]}function Rle(e){return Array.isArray(e)?e:[e]}function zle(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Ble=e=>typeof e==`number`,Vle=e=>e.every(Ble);function Hle(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=N3(e)&&!V3(e)?new z6(t):new P6(t);n.mount(e),J3.set(e,n)}function Ule(e){let t=new lse({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),J3.set(e,t)}function Wle(e,t){return e3(e)||typeof e==`number`||typeof e==`string`&&!P5(t)}function B5(e,t,n,r){let i=[];if(Wle(e,t))i.push(g8(e,P5(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=F5(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?Hle:Ule;J3.has(r)||s(r);let c=J3.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...o3(c,{...t,transition:l},{}))}}return i}function Gle(e,t,n){let r=[];return Lle(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=M4(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:n2}).forEach(({keyframes:e,transition:t},n)=>{r.push(...B5(n,e,t))}),r}function Kle(e){return Array.isArray(e)&&e.some(Array.isArray)}function qle(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),Kle(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Gle(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=B5(e,i,{...c,...r},t)}let l=new E4(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{R$(t.animations,l)})),l}return i}var Jle=qle();function Yle(){let e=P$(Ale);return F$(e.mount,[]),e}var Xle=class{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}cancel(){this.componentControls.forEach(e=>{e.cancel()})}stop(){this.componentControls.forEach(e=>{e.stop()})}},Zle=()=>new Xle;function Qle(){return P$(Zle)}var $le=iQ(`CameraPreview`,{web:()=>s(()=>import(`./web-B_ZkQa17.js`).then(e=>new e.CameraPreviewWeb),[])}),V5=e=>Symbol.iterator in e,H5=e=>`entries`in e,U5=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},eue=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function tue(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:V5(e)&&V5(t)?H5(e)&&H5(t)?U5(e,t):eue(e,t):U5({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function nue(e){let t=j.useRef(void 0);return n=>{let r=e(n);return tue(t.current,r)?t.current:t.current=r}}var rue=`/assistant/assets/pdf.worker.min-Dr1KORA9.mjs`,W5=/[#.]/g;function iue(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){W5.lastIndex=i;let e=W5.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function G5(e,t,n){let r=n?cue(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=iue(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,aue(i))a.unshift(i);else for(let[t,n]of Object.entries(i))oue(e,o.properties,t,n)}for(let e of a)K5(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function aue(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function oue(e,t,n,r){let i=Sk(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Tk(r):i.commaSeparated?UO(r):i.commaOrSpaceSeparated?Tk(UO(r).join(` `)):q5(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?sue(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(q5(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function K5(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)K5(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?K5(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function q5(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||ek(n)===ek(t)))return!0}return n}function sue(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function cue(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var lue=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),J5=G5(Ck,`div`),Y5=G5(wk,`g`,lue);function uue(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=X5(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=X5(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function X5(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
127
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Z5={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Q5={}.hasOwnProperty,due=Object.prototype;function fue(e,t){let n=t||{};return $5({file:n.file||void 0,location:!1,schema:n.space===`svg`?wk:Ck,verbose:n.verbose||!1},e)}function $5(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},t7(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:e7(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=uue(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},t7(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},t7(e,r,n),n}default:return n=pue(e,t),n}}function e7(e,t){let n=-1,r=[];for(;++n<t.length;){let i=$5(e,t[n]);r.push(i)}return r}function pue(e,t){let n=e.schema;e.schema=t.namespaceURI===Z5.svg?wk:Ck;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Q5.call(due,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Y5:J5)(t.tagName,i,e7(e,t.childNodes));if(t7(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&n7(r.startTag),o=r&&r.endTag&&n7(r.endTag),s=$5(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function t7(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=mue(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function mue(e,t,n){let r=n7(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Q5.call(n.attrs,i)&&(r[Sk(e.schema,i).property]=n7(n.attrs[i]));n.startTag;let a=n7(n.startTag),o=n.endTag?n7(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function n7(e){let t=r7({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=r7({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function r7(e){return e.line&&e.column?e:void 0}var hue={},gue={}.hasOwnProperty,i7=FN(`type`,{handlers:{root:vue,element:Cue,text:xue,comment:Sue,doctype:bue}});function _ue(e,t){let n=(t||hue).space;return i7(e,n===`svg`?wk:Ck)}function vue(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=a7(e.children,n,t),o7(e,n),n}function yue(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=a7(e.children,n,t),o7(e,n),n}function bue(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return o7(e,t),t}function xue(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return o7(e,t),t}function Sue(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return o7(e,t),t}function Cue(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=wk);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&gue.call(e.properties,a)){let t=wue(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Z5[o],childNodes:[],parentNode:null};return s.childNodes=a7(e.children,s,r),o7(e,s),e.tagName===`template`&&e.content&&(s.content=yue(e.content,r)),s}function wue(e,t,n){let r=Sk(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?WO(n):Ek(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=Z5[r.space]}return i}function a7(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=i7(e[r],n);a.parentNode=t,i.push(a)}return i}function o7(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Tue=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Eue=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),K;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(K||={});var s7={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function c7(e){return e>=55296&&e<=57343}function Due(e){return e>=56320&&e<=57343}function Oue(e,t){return(e-55296)*1024+9216+t}function l7(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function u7(e){return e>=64976&&e<=65007||Eue.has(e)}var q;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(q||={});var kue=65536,Aue=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=kue,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(Due(t))return this.pos++,this._addGap(),Oue(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,K.EOF;return this._err(q.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,K.EOF;let n=this.html.charCodeAt(t);return n===K.CARRIAGE_RETURN?K.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,K.EOF;let e=this.html.charCodeAt(this.pos);return e===K.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,K.LINE_FEED):e===K.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,c7(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===K.LINE_FEED||e===K.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){l7(e)?this._err(q.controlCharacterInInputStream):u7(e)&&this._err(q.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},d7;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(d7||={});function f7(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var jue=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),Mue=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function Nue(e){return e>=55296&&e<=57343||e>1114111?65533:Mue.get(e)??e}var p7;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(p7||={});var Pue=32,m7;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(m7||={});function h7(e){return e>=p7.ZERO&&e<=p7.NINE}function Fue(e){return e>=p7.UPPER_A&&e<=p7.UPPER_F||e>=p7.LOWER_A&&e<=p7.LOWER_F}function Iue(e){return e>=p7.UPPER_A&&e<=p7.UPPER_Z||e>=p7.LOWER_A&&e<=p7.LOWER_Z||h7(e)}function Lue(e){return e===p7.EQUALS||Iue(e)}var g7;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(g7||={});var _7;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(_7||={});var Rue=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=g7.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_7.Strict}startEntity(e){this.decodeMode=e,this.state=g7.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case g7.EntityStart:return e.charCodeAt(t)===p7.NUM?(this.state=g7.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=g7.NamedEntity,this.stateNamedEntity(e,t));case g7.NumericStart:return this.stateNumericStart(e,t);case g7.NumericDecimal:return this.stateNumericDecimal(e,t);case g7.NumericHex:return this.stateNumericHex(e,t);case g7.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Pue)===p7.LOWER_X?(this.state=g7.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=g7.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(h7(r)||Fue(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(h7(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===p7.SEMI)this.consumed+=1;else if(this.decodeMode===_7.Strict)return 0;return this.emitCodePoint(Nue(this.result),this.consumed),this.errors&&(e!==p7.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&m7.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=zue(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===_7.Attribute&&(i===0||Lue(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&m7.VALUE_LENGTH)>>14,i!==0){if(a===p7.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==_7.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&m7.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~m7.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case g7.NamedEntity:return this.result!==0&&(this.decodeMode!==_7.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case g7.NumericDecimal:return this.emitNumericEntity(0,2);case g7.NumericHex:return this.emitNumericEntity(0,3);case g7.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case g7.EntityStart:return 0}}};function zue(e,t,n,r){let i=(t&m7.BRANCH_LENGTH)>>7,a=t&m7.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var J;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(J||={});var v7;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(v7||={});var y7;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(y7||={});var Y;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(Y||={});var X;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(X||={});var Bue=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function b7(e){return Bue.get(e)??X.UNKNOWN}var Z=X,Vue={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},x7=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);new Set([Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT]);var Q;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Q||={});var S7={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function Hue(e){return e>=K.DIGIT_0&&e<=K.DIGIT_9}function C7(e){return e>=K.LATIN_CAPITAL_A&&e<=K.LATIN_CAPITAL_Z}function Uue(e){return e>=K.LATIN_SMALL_A&&e<=K.LATIN_SMALL_Z}function w7(e){return Uue(e)||C7(e)}function T7(e){return w7(e)||Hue(e)}function E7(e){return e+32}function D7(e){return e===K.SPACE||e===K.LINE_FEED||e===K.TABULATION||e===K.FORM_FEED}function O7(e){return D7(e)||e===K.SOLIDUS||e===K.GREATER_THAN_SIGN}function Wue(e){return e===K.NULL?q.nullCharacterReference:e>1114111?q.characterReferenceOutsideUnicodeRange:c7(e)?q.surrogateCharacterReference:u7(e)?q.noncharacterCharacterReference:l7(e)||e===K.CARRIAGE_RETURN?q.controlCharacterReference:null}var Gue=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Aue(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Rue(jue,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Wue(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:d7.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:d7.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:d7.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:d7.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(f7(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(q.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=b7(e.tagName),e.type===d7.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(q.endTagWithAttributes),e.selfClosing&&this._err(q.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case d7.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case d7.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case d7.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:d7.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=D7(e)?d7.WHITESPACE_CHARACTER:e===K.NULL?d7.NULL_CHARACTER:d7.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(d7.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?_7.Attribute:_7.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitCodePoint(e);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case K.AMPERSAND:this._startCharacterReference();break;case K.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(w7(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case K.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case K.QUESTION_MARK:this._err(q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(w7(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.GREATER_THAN_SIGN:this._err(q.missingEndTagName),this.state=Q.DATA;break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.tagName+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(C7(e)?E7(e):e)}}_stateRcdataLessThanSign(e){e===K.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){w7(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case K.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case K.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===K.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){w7(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case K.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case K.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){w7(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===K.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:w7(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){w7(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(s7.SCRIPT,!1)&&O7(this.preprocessor.peek(s7.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<s7.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===K.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(s7.SCRIPT,!1)&&O7(this.preprocessor.peek(s7.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<s7.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._err(q.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:this._err(q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(C7(e)?E7(e):e)}}_stateAfterAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case K.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case K.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.AMPERSAND:this._startCharacterReference();break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:case K.EQUALS_SIGN:case K.GRAVE_ACCENT:this._err(q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case K.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(s7.DASH_DASH,!0)?(this._createCommentToken(s7.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(s7.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(s7.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(s7.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(q.cdataInHtmlContent),this._createCommentToken(s7.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case K.GREATER_THAN_SIGN:{this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.GREATER_THAN_SIGN:this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case K.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case K.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case K.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==K.GREATER_THAN_SIGN&&e!==K.EOF&&this._err(q.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case K.HYPHEN_MINUS:t.data+=`-`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case K.GREATER_THAN_SIGN:this._err(q.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case K.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(C7(e))this._createDoctypeToken(String.fromCharCode(E7(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.NULL:this._err(q.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:{this._err(q.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case K.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.NULL:this._err(q.unexpectedNullCharacter),t.name+=`�`;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(C7(e)?E7(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(s7.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(s7.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(q.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.NULL:this._err(q.unexpectedNullCharacter);break;case K.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case K.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case K.EOF:this._err(q.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===K.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA;break;case K.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(K.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&T7(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){T7(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===K.SEMICOLON&&this._err(q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},k7=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),A7=new Set([...k7,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),j7=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),Kue=new Set([...j7,X.OL,X.UL]),que=new Set([...j7,X.BUTTON]),M7=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),N7=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),Jue=new Set([X.TR,X.TEMPLATE,X.HTML]),Yue=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),Xue=new Set([X.TABLE,X.TEMPLATE,X.HTML]),Zue=new Set([X.TD,X.TH]),Que=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==J.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(x7,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Zue,J.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Xue,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Yue,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(Jue,J.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===X.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===X.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(N7.has(r))return!1;break;case J.MATHML:if(M7.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,j7)}hasInListItemScope(e){return this.hasInDynamicScope(e,Kue)}hasInButtonScope(e){return this.hasInDynamicScope(e,que)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(x7.has(t))return!0;if(j7.has(t))return!1;break;case J.SVG:if(N7.has(t))return!1;break;case J.MATHML:if(M7.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&k7.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&A7.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&A7.has(this.currentTagId);)this.pop()}},P7=3,F7;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(F7||={});var I7={type:F7.Marker},$ue=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===F7.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<P7)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<P7)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=P7&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(I7)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:F7.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:F7.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(I7);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===F7.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===F7.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===F7.Element&&t.element===e)}},L7={createDocument(){return{nodeName:`#document`,mode:y7.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};L7.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(L7.isTextNode(n)){n.value+=t;return}}L7.appendChild(e,L7.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&L7.isTextNode(r)?r.value+=t:L7.insertBefore(e,L7.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},R7=`html`,ede=`about:legacy-compat`,tde=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,z7=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),nde=[...z7,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],rde=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),B7=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],ide=[...B7,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function V7(e,t){return t.some(t=>e.startsWith(t))}function ade(e){return e.name===R7&&e.publicId===null&&(e.systemId===null||e.systemId===ede)}function ode(e){if(e.name!==R7)return y7.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===tde)return y7.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),rde.has(n))return y7.QUIRKS;let e=t===null?nde:z7;if(V7(n,e))return y7.QUIRKS;if(e=t===null?B7:ide,V7(n,e))return y7.LIMITED_QUIRKS}return y7.NO_QUIRKS}var H7={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},sde=`definitionurl`,cde=`definitionURL`,lde=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),ude=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),dde=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),fde=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function pde(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===v7.COLOR||e===v7.SIZE||e===v7.FACE)||fde.has(t)}function U7(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===sde){e.attrs[t].name=cde;break}}function W7(e){for(let t=0;t<e.attrs.length;t++){let n=lde.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function G7(e){for(let t=0;t<e.attrs.length;t++){let n=ude.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function mde(e){let t=dde.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=b7(e.tagName))}function hde(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function gde(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===v7.ENCODING){let t=n[e].value.toLowerCase();return t===H7.TEXT_HTML||t===H7.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function _de(e,t,n,r){return(!r||r===J.HTML)&&gde(e,t,n)||(!r||r===J.MATHML)&&hde(e,t)}var vde=`hidden`,yde=8,bde=3,$;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})($||={});var xde={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},K7=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),q7={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:L7,onParseError:null},J7=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...q7,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Gue(this.options,this),this.activeFormattingElements=new $ue(this.treeAdapter),this.fragmentContextID=n?b7(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Que(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...q7,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??xde,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=S7.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=S7.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=S7.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=S7.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=S7.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===d7.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case d7.CHARACTER:this.onCharacter(e);break;case d7.NULL_CHARACTER:this.onNullCharacter(e);break;case d7.COMMENT:this.onComment(e);break;case d7.DOCTYPE:this.onDoctype(e);break;case d7.START_TAG:this._processStartTag(e);break;case d7.END_TAG:this.onEndTag(e);break;case d7.EOF:this.onEof(e);break;case d7.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return _de(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===F7.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}break}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return K7.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Vue[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Zfe(this,e);return}switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:$7(this,e);break;case $.BEFORE_HEAD:e9(this,e);break;case $.IN_HEAD:r9(this,e);break;case $.IN_HEAD_NO_SCRIPT:i9(this,e);break;case $.AFTER_HEAD:a9(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:c9(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:_9(this,e);break;case $.IN_TABLE_TEXT:S9(this,e);break;case $.IN_COLUMN_GROUP:E9(this,e);break;case $.AFTER_BODY:F9(this,e);break;case $.AFTER_AFTER_BODY:I9(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Xfe(this,e);return}switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:$7(this,e);break;case $.BEFORE_HEAD:e9(this,e);break;case $.IN_HEAD:r9(this,e);break;case $.IN_HEAD_NO_SCRIPT:i9(this,e);break;case $.AFTER_HEAD:a9(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:_9(this,e);break;case $.IN_COLUMN_GROUP:E9(this,e);break;case $.AFTER_BODY:F9(this,e);break;case $.AFTER_AFTER_BODY:I9(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){X7(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:X7(this,e);break;case $.IN_TABLE_TEXT:C9(this,e);break;case $.AFTER_BODY:Ode(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:kde(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:Ade(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,q.misplacedDoctype);break;case $.IN_TABLE_TEXT:C9(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Qfe(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:jde(this,e);break;case $.BEFORE_HEAD:Nde(this,e);break;case $.IN_HEAD:t9(this,e);break;case $.IN_HEAD_NO_SCRIPT:Ide(this,e);break;case $.AFTER_HEAD:Rde(this,e);break;case $.IN_BODY:p9(this,e);break;case $.IN_TABLE:v9(this,e);break;case $.IN_TABLE_TEXT:C9(this,e);break;case $.IN_CAPTION:Pfe(this,e);break;case $.IN_COLUMN_GROUP:T9(this,e);break;case $.IN_TABLE_BODY:D9(this,e);break;case $.IN_ROW:k9(this,e);break;case $.IN_CELL:Lfe(this,e);break;case $.IN_SELECT:j9(this,e);break;case $.IN_SELECT_IN_TABLE:zfe(this,e);break;case $.IN_TEMPLATE:Vfe(this,e);break;case $.AFTER_BODY:Ufe(this,e);break;case $.IN_FRAMESET:Wfe(this,e);break;case $.AFTER_FRAMESET:Kfe(this,e);break;case $.AFTER_AFTER_BODY:Jfe(this,e);break;case $.AFTER_AFTER_FRAMESET:Yfe(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?$fe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:Mde(this,e);break;case $.BEFORE_HEAD:Pde(this,e);break;case $.IN_HEAD:Fde(this,e);break;case $.IN_HEAD_NO_SCRIPT:Lde(this,e);break;case $.AFTER_HEAD:zde(this,e);break;case $.IN_BODY:h9(this,e);break;case $.TEXT:wfe(this,e);break;case $.IN_TABLE:y9(this,e);break;case $.IN_TABLE_TEXT:C9(this,e);break;case $.IN_CAPTION:Ffe(this,e);break;case $.IN_COLUMN_GROUP:Ife(this,e);break;case $.IN_TABLE_BODY:O9(this,e);break;case $.IN_ROW:A9(this,e);break;case $.IN_CELL:Rfe(this,e);break;case $.IN_SELECT:M9(this,e);break;case $.IN_SELECT_IN_TABLE:Bfe(this,e);break;case $.IN_TEMPLATE:Hfe(this,e);break;case $.AFTER_BODY:P9(this,e);break;case $.IN_FRAMESET:Gfe(this,e);break;case $.AFTER_FRAMESET:qfe(this,e);break;case $.AFTER_AFTER_BODY:I9(this,e);break;default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:$7(this,e);break;case $.BEFORE_HEAD:e9(this,e);break;case $.IN_HEAD:r9(this,e);break;case $.IN_HEAD_NO_SCRIPT:i9(this,e);break;case $.AFTER_HEAD:a9(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:g9(this,e);break;case $.TEXT:Tfe(this,e);break;case $.IN_TABLE_TEXT:C9(this,e);break;case $.IN_TEMPLATE:N9(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:Z7(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===K.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:s9(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:_9(this,e);break;case $.IN_TABLE_TEXT:x9(this,e);break;default:}}};function Sde(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):m9(e,t),n}function Cde(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function wde(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=bde;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Tde(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Tde(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Ede(e,t,n){let r=b7(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Dde(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Y7(e,t){for(let n=0;n<yde;n++){let n=Sde(e,t);if(!n)break;let r=Cde(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=wde(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&Ede(e,a,i),Dde(e,r,n)}}function X7(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ode(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kde(e,t){e._appendCommentNode(t,e.document)}function Z7(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Ade(e,t){e._setDocumentType(t);let n=t.forceQuirks?y7.QUIRKS:ode(t);ade(t)||e._err(t,q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function Q7(e,t){e._err(t,q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,y7.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function jde(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):$7(e,t)}function Mde(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&$7(e,t)}function $7(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function Nde(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:e9(e,t)}}function Pde(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?e9(e,t):e._err(t,q.endTagWithoutMatchingOpenElement)}function e9(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function t9(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,S7.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,S7.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,S7.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,S7.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:r9(e,t)}}function Fde(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:r9(e,t);break;case X.TEMPLATE:n9(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function n9(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,q.endTagWithoutMatchingOpenElement)}function r9(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function Ide(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:t9(e,t);break;case X.NOSCRIPT:e._err(t,q.nestedNoscriptInHead);break;default:i9(e,t)}}function Lde(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:i9(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function i9(e,t){let n=t.type===d7.EOF?q.openElementsLeftAfterEof:q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function Rde(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,q.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),t9(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:a9(e,t)}}function zde(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:a9(e,t);break;case X.TEMPLATE:n9(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function a9(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,o9(e,t)}function o9(e,t){switch(t.type){case d7.CHARACTER:c9(e,t);break;case d7.WHITESPACE_CHARACTER:s9(e,t);break;case d7.COMMENT:X7(e,t);break;case d7.START_TAG:p9(e,t);break;case d7.END_TAG:h9(e,t);break;case d7.EOF:g9(e,t);break;default:}}function s9(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function c9(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Bde(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Vde(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Hde(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function Ude(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function Wde(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&x7.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function Gde(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Kde(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function qde(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function Jde(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=S7.PLAINTEXT}function Yde(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function Xde(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(Y7(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Zde(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Qde(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(Y7(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $de(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function efe(e,t){e.treeAdapter.getDocumentMode(e.document)!==y7.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function l9(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function u9(e){let t=f7(e,v7.TYPE);return t!=null&&t.toLowerCase()===vde}function tfe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),u9(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function nfe(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function rfe(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ife(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,l9(e,t)}function afe(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=S7.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function ofe(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,S7.RAWTEXT)}function sfe(e,t){e.framesetOk=!1,e._switchToTextParsing(t,S7.RAWTEXT)}function d9(e,t){e._switchToTextParsing(t,S7.RAWTEXT)}function cfe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function lfe(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function ufe(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function dfe(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function ffe(e,t){e._reconstructActiveFormattingElements(),U7(t),G7(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function pfe(e,t){e._reconstructActiveFormattingElements(),W7(t),G7(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function f9(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function p9(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:Zde(e,t);break;case X.A:Xde(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:Wde(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:Ude(e,t);break;case X.LI:case X.DD:case X.DT:qde(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:l9(e,t);break;case X.HR:rfe(e,t);break;case X.RB:case X.RTC:ufe(e,t);break;case X.RT:case X.RP:dfe(e,t);break;case X.PRE:case X.LISTING:Gde(e,t);break;case X.XMP:ofe(e,t);break;case X.SVG:pfe(e,t);break;case X.HTML:Bde(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:t9(e,t);break;case X.BODY:Vde(e,t);break;case X.FORM:Kde(e,t);break;case X.NOBR:Qde(e,t);break;case X.MATH:ffe(e,t);break;case X.TABLE:efe(e,t);break;case X.INPUT:tfe(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:nfe(e,t);break;case X.IMAGE:ife(e,t);break;case X.BUTTON:Yde(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:$de(e,t);break;case X.IFRAME:sfe(e,t);break;case X.SELECT:cfe(e,t);break;case X.OPTION:case X.OPTGROUP:lfe(e,t);break;case X.NOEMBED:case X.NOFRAMES:d9(e,t);break;case X.FRAMESET:Hde(e,t);break;case X.TEXTAREA:afe(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?d9(e,t):f9(e,t);break;case X.PLAINTEXT:Jde(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:f9(e,t)}}function mfe(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function hfe(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,P9(e,t))}function gfe(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function _fe(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function vfe(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function yfe(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function bfe(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function xfe(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Sfe(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Cfe(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function m9(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==X.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function h9(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:Y7(e,t);break;case X.P:vfe(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:gfe(e,t);break;case X.LI:yfe(e);break;case X.DD:case X.DT:bfe(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:xfe(e);break;case X.BR:Cfe(e);break;case X.BODY:mfe(e,t);break;case X.HTML:hfe(e,t);break;case X.FORM:_fe(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:Sfe(e,t);break;case X.TEMPLATE:n9(e,t);break;default:m9(e,t)}}function g9(e,t){e.tmplInsertionModeStack.length>0?N9(e,t):Z7(e,t)}function wfe(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Tfe(e,t){e._err(t,q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _9(e,t){if(e.openElements.currentTagId!==void 0&&K7.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case d7.CHARACTER:S9(e,t);break;case d7.WHITESPACE_CHARACTER:x9(e,t);break}else b9(e,t)}function Efe(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function Dfe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function Ofe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,T9(e,t)}function kfe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function Afe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,D9(e,t)}function jfe(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Mfe(e,t){u9(t)?e._appendElement(t,J.HTML):b9(e,t),t.ackSelfClosing=!0}function Nfe(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function v9(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:Afe(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:t9(e,t);break;case X.COL:Ofe(e,t);break;case X.FORM:Nfe(e,t);break;case X.TABLE:jfe(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:kfe(e,t);break;case X.INPUT:Mfe(e,t);break;case X.CAPTION:Efe(e,t);break;case X.COLGROUP:Dfe(e,t);break;default:b9(e,t)}}function y9(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:n9(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:b9(e,t)}}function b9(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,o9(e,t),e.fosterParentingEnabled=n}function x9(e,t){e.pendingCharacterTokens.push(t)}function S9(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function C9(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)b9(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var w9=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function Pfe(e,t){let n=t.tagID;w9.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,v9(e,t)):p9(e,t)}function Ffe(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&y9(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:h9(e,t)}}function T9(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:t9(e,t);break;default:E9(e,t)}}function Ife(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:n9(e,t);break;case X.COL:break;default:E9(e,t)}}function E9(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function D9(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,k9(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,v9(e,t));break;default:v9(e,t)}}function O9(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,y9(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:y9(e,t)}}function k9(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,D9(e,t));break;default:v9(e,t)}}function A9(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,O9(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,O9(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:y9(e,t)}}function Lfe(e,t){let n=t.tagID;w9.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),k9(e,t)):p9(e,t)}function Rfe(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),A9(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:h9(e,t)}}function j9(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:t9(e,t);break;default:}}function M9(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:n9(e,t);break;default:}}function zfe(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):j9(e,t)}function Bfe(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):M9(e,t)}function Vfe(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:t9(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,v9(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,T9(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,D9(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,k9(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,p9(e,t)}}function Hfe(e,t){t.tagID===X.TEMPLATE&&n9(e,t)}function N9(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Z7(e,t)}function Ufe(e,t){t.tagID===X.HTML?p9(e,t):F9(e,t)}function P9(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else F9(e,t)}function F9(e,t){e.insertionMode=$.IN_BODY,o9(e,t)}function Wfe(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:t9(e,t);break;default:}}function Gfe(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function Kfe(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.NOFRAMES:t9(e,t);break;default:}}function qfe(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function Jfe(e,t){t.tagID===X.HTML?p9(e,t):I9(e,t)}function I9(e,t){e.insertionMode=$.IN_BODY,o9(e,t)}function Yfe(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.NOFRAMES:t9(e,t);break;default:}}function Xfe(e,t){t.chars=`�`,e._insertCharacters(t)}function Zfe(e,t){e._insertCharacters(t),e.framesetOk=!1}function L9(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Qfe(e,t){if(pde(t))L9(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?U7(t):r===J.SVG&&(mde(t),W7(t)),G7(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function $fe(e,t){if(t.tagID===X.P||t.tagID===X.BR){L9(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===J.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR]);var epe=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,tpe=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),R9={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function z9(e,t){let n=dpe(e),r=FN(`type`,{handlers:{root:npe,element:rpe,text:ipe,comment:V9,doctype:ape,raw:spe},unknown:cpe}),i={parser:n?new J7(R9):J7.getFragmentParser(void 0,R9),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),H9(i,Ok());let a=fue(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&zj(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function B9(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function npe(e,t){B9(e.children,t)}function rpe(e,t){lpe(e,t),B9(e.children,t),upe(e,t)}function ipe(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:d7.CHARACTER,chars:e.value,location:W9(e)};H9(t,Ok(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ape(e,t){let n={type:d7.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:W9(e)};H9(t,Ok(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ope(e,t){t.stitches=!0;let n=fpe(e);`children`in e&&`children`in n&&(n.children=z9({type:`root`,children:e.children},t.options).children),V9({type:`comment`,value:{stitch:n}},t)}function V9(e,t){let n=e.value,r={type:d7.COMMENT,data:n,location:W9(e)};H9(t,Ok(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function spe(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,U9(t,Ok(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(epe,`&lt;$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function cpe(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ope(n,t);else{let e=``;throw tpe.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function H9(e,t){U9(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=S7.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function U9(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function lpe(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===S7.PLAINTEXT)return;H9(t,Ok(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Z5.html;i===Z5.html&&n===`svg`&&(i=Z5.svg);let a=_ue({...e,children:[]},{space:i===Z5.svg?`svg`:`html`}),o={type:d7.START_TAG,tagName:n,tagID:b7(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:W9(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function upe(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Tue.includes(n)||t.parser.tokenizer.state===S7.PLAINTEXT)return;H9(t,Dk(e));let r={type:d7.END_TAG,tagName:n,tagID:b7(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:W9(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===S7.RCDATA||t.parser.tokenizer.state===S7.RAWTEXT||t.parser.tokenizer.state===S7.SCRIPT_DATA)&&(t.parser.tokenizer.state=S7.DATA)}function dpe(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function W9(e){let t=Ok(e)||{line:void 0,column:void 0,offset:void 0},n=Dk(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function fpe(e){return`children`in e?Cj({...e,children:[]}):Cj(e)}function ppe(e){return function(t,n){return z9(t,{...e,file:n})}}var G9=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],K9={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...G9,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...G9],h2:[[`className`,`sr-only`]],img:[...G9,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...G9,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...G9],table:[...G9],ul:[...G9,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},q9={}.hasOwnProperty;function mpe(e,t){let n={type:`root`,children:[]},r=J9({schema:t?{...K9,...t}:K9,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function J9(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return hpe(e,n);case`doctype`:return gpe(e,n);case`element`:return _pe(e,n);case`root`:return vpe(e,n);case`text`:return ype(e,n);default:}}}function hpe(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Q9(r,t),r}}function gpe(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Q9(e,t),e}}function _pe(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Y9(e,t.children),i=bpe(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&q9.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return Q9(o,t),o}function vpe(e,t){let n={type:`root`,children:Y9(e,t.children)};return Q9(n,t),n}function ype(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Q9(n,t),n}function Y9(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=J9(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function bpe(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&q9.call(r,n)?r[n]:void 0,o=r&&q9.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(q9.call(s,l)){let t=s[l],n=X9(e,$9(a,l),l,t);n??=X9(e,$9(o,l),l,t),n!=null&&(c[l]=n)}if(i&&q9.call(i,n)){let e=i[n];for(l in e)q9.call(e,l)&&!q9.call(c,l)&&(c[l]=e[l])}return c}function X9(e,t,n,r){return t?Array.isArray(r)?xpe(e,t,n,r):Z9(e,t,n,r):void 0}function xpe(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Z9(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Z9(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&Spe(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Spe(e,t,n){let r=e.schema.protocols&&q9.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function Q9(e,t){let n=Ak(t);t.data&&(e.data=Cj(t.data)),n&&(e.position=n)}function $9(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function Cpe(e){return function(t){return mpe(t,e)}}export{fV as $,Pl as $n,Cx as $t,QZ as A,fne as An,Bw as At,_q as B,Om as Bn,WC as Bt,O$ as C,L_ as Cn,lO as Ct,aQ as D,P_ as Dn,Uw as Dt,rQ as E,M_ as En,Vw as Et,aY as F,Nm as Fn,Yw as Ft,dq as G,cu as Gn,JC as Gt,hq as H,Qd as Hn,XC as Ht,oY as I,km as In,Zw as It,Nq as J,Ql as Jn,ZC as Jt,Tq as K,fu as Kn,YC as Kt,lJ as L,jm as Ln,Xw as Lt,oX as M,mne as Mn,Kw as Mt,iX as N,Mm as Nn,Rw as Nt,fQ as O,gne as On,qw as Ot,tX as P,Ete as Pn,Jw as Pt,vV as Q,ql as Qn,HC as Qt,cJ as R,Dte as Rn,zw as Rt,k$ as S,N_ as Sn,sO as St,yQ as T,F_ as Tn,Ww as Tt,kq as U,bu as Un,GC as Ut,Cq as V,Am as Vn,KC as Vt,Lq as W,_u as Wn,UC as Wt,Dq as X,Xl as Xn,ew as Xt,UK as Y,Zl as Yn,QC as Yt,yq as Z,Yl as Zn,$C as Zt,mce as _,iy as _n,uO as _t,Y5 as a,ox as an,qc as ar,Gz as at,j$ as b,rv as bn,NO as bt,$le as c,tx as cn,uc as cr,IM as ct,Jle as d,Fb as dn,mee as dr,Ij as dt,sre as en,Nl as er,uV as et,Dle as f,Tb as fn,gee as fr,Lj as ft,Sle as g,ab as gn,hO as gt,k5 as h,rb as hn,Gt as hr,aO as ht,J5 as i,px as in,Zc as ir,kz as it,uX as j,pne as jn,Gw as jt,iQ as k,hne as kn,Hw as kt,Qle as l,vb as ln,Va as lr,BM as lt,j5 as m,ib as mn,Yt as mr,WA as mt,ppe as n,hx as nn,nl as nr,cV as nt,rue as o,ix as on,jc as or,eI as ot,Ele as p,ob as pn,Zr as pr,Dj as pt,sJ as q,$l as qn,VC as qt,Z5 as r,cx as rn,Qc as rr,dV as rt,nue as s,dx as sn,gc as sr,HF as st,Cpe as t,$b as tn,jl as tr,lV as tt,Yle as u,Db as un,ji as ur,SM as ut,fce as v,my as vn,jO as vt,_Q as w,I_ as wn,DO as wt,A$ as x,av as xn,pO as xt,M$ as y,dy as yn,FO as yt,Fq as z,Dm as zn,qC as zt};
126
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,M.jsx)(cce,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:j.cloneElement(e,{ref:u})})}var uce=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=P$(dce),d=(0,j.useId)(),f=(0,j.useRef)(n),p=(0,j.useRef)(r);F$(()=>{f.current=n,p.current=r});let m=!0,h=(0,j.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,j.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),j.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,M.jsx)(lce,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,M.jsx)(I$.Provider,{value:h,children:e})};function dce(){return new Map}function R8(e=!0){let t=(0,j.useContext)(I$);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,j.useId)();(0,j.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,j.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}function fce(){return pce((0,j.useContext)(I$))}function pce(e){return e===null?!0:e.isPresent}var z8=e=>e.key||``;function B8(e){let t=[];return j.Children.forEach(e,e=>{(0,j.isValidElement)(e)&&t.push(e)}),t}var mce=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=R8(o),f=(0,j.useMemo)(()=>B8(e),[e]),p=o&&!u?[]:f.map(z8),m=(0,j.useRef)(!0),h=(0,j.useRef)(f),g=P$(()=>new Map),_=(0,j.useRef)(new Set),[v,y]=(0,j.useState)(f),[b,x]=(0,j.useState)(f);F$(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=z8(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=z8(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(B8(e)),y(f),null}let{forceRender:C}=(0,j.useContext)(N$);return(0,M.jsx)(M.Fragment,{children:b.map(e=>{let v=z8(e),y=o&&!u?!1:f===b||p.includes(v);return(0,M.jsx)(uce,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},V8=(0,j.createContext)({strict:!1}),H8={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},U8=!1;function hce(){if(U8)return;let e={};for(let t in H8)e[t]={isEnabled:e=>H8[t].some(t=>!!e[t])};o6(e),U8=!0}function W8(){return hce(),Qoe()}function gce(e){let t=W8();for(let n in e)t[n]={...t[n],...e[n]};o6(t)}var _ce=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function G8(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||_ce.has(e)}var vce=r({default:()=>K8}),K8,yce=t((()=>{throw K8={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),q8=e=>!G8(e);function bce(e){typeof e==`function`&&(q8=t=>t.startsWith(`on`)?!G8(t):e(t))}try{bce((yce(),e(vce)).default)}catch{}function xce(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||e3(e[i])||(q8(i)||n===!0&&G8(i)||!t&&!G8(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var J8=(0,j.createContext)({});function Sce(e,t){if($3(e)){let{initial:t,animate:n}=e;return{initial:t===!1||X3(t)?t:void 0,animate:X3(n)?n:void 0}}return e.inherit===!1?{}:t}function Cce(e){let{initial:t,animate:n}=Sce(e,(0,j.useContext)(J8));return(0,j.useMemo)(()=>({initial:t,animate:n}),[Y8(t),Y8(n)])}function Y8(e){return Array.isArray(e)?e.join(` `):e}var X8=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Z8(e,t,n){for(let r in t)!e3(t[r])&&!M6(r,n)&&(e[r]=t[r])}function wce({transformTemplate:e},t){return(0,j.useMemo)(()=>{let n=X8();return D6(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Tce(e,t){let n=e.style||{},r={};return Z8(r,n,e),Object.assign(r,wce(e,t)),r}function Ece(e,t){let n={},r=Tce(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Q8=()=>({...X8(),attrs:{}});function Dce(e,t,n,r){let i=(0,j.useMemo)(()=>{let n=Q8();return F6(n,t,L6(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Z8(t,e.style,e),i.style={...t,...i.style}}return i}var Oce=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function $8(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Oce.indexOf(e)>-1||/[A-Z]/u.test(e))}function kce(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??$8(e)?Dce:Ece)(t,r,i,e),c=xce(t,typeof e==`string`,a),l=e===j.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,j.useMemo)(()=>e3(u)?u.get():u,[u]);return(0,j.createElement)(e,{...l,children:d})}function Ace({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:jce(n,r,i,e),renderState:t()}}function jce(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=v8(a[e]);let{initial:o,animate:s}=e,c=$3(e),l=e6(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Y3(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=q4(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var e5=e=>(t,n)=>{let r=(0,j.useContext)(J8),i=(0,j.useContext)(I$),a=()=>Ace(e,t,r,i);return n?a():P$(a)},Mce=e5({scrapeMotionValuesFromProps:N6,createRenderState:X8}),Nce=e5({scrapeMotionValuesFromProps:R6,createRenderState:Q8}),Pce=Symbol.for(`motionComponentSymbol`);function Fce(e,t,n){let r=(0,j.useRef)(n);(0,j.useInsertionEffect)(()=>{r.current=n});let i=(0,j.useRef)(null);return(0,j.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var t5=(0,j.createContext)({});function n5(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Ice(e,t,n,r,i,a){let{visualElement:o}=(0,j.useContext)(J8),s=(0,j.useContext)(V8),c=(0,j.useContext)(I$),l=(0,j.useContext)(I8),u=l.reducedMotion,d=l.skipAnimations,f=(0,j.useRef)(null),p=(0,j.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,j.useContext)(t5);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Lce(f.current,n,i,h);let g=(0,j.useRef)(!1);(0,j.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[i3],v=(0,j.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return F$(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,j.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Lce(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:r5(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&n5(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function r5(e){if(e)return e.options.allowProjection===!1?r5(e.parent):e.projection}function i5(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&gce(r);let a=n?n===`svg`:$8(e),o=a?Nce:Mce;function s(n,s){let c,l={...(0,j.useContext)(I8),...n,layoutId:Rce(n)},{isStatic:u}=l,d=Cce(n),f=o(n,u);if(!u&&typeof window<`u`){zce(l,r);let t=Bce(l);c=t.MeasureLayout,d.visualElement=Ice(e,f,l,i,t.ProjectionNode,a)}return(0,M.jsxs)(J8.Provider,{value:d,children:[c&&d.visualElement?(0,M.jsx)(c,{visualElement:d.visualElement,...l}):null,kce(e,n,Fce(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,j.forwardRef)(s);return c[Pce]=e,c}function Rce({layoutId:e}){let t=(0,j.useContext)(N$).id;return t&&e!==void 0?t+`-`+e:e}function zce(e,t){(0,j.useContext)(V8).strict}function Bce(e){let{drag:t,layout:n}=W8();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Vce(e,t){if(typeof Proxy>`u`)return i5;let n=new Map,r=(n,r)=>i5(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,i5(a,void 0,e,t)),n.get(a))})}var Hce=(e,t)=>t.isSVG??$8(e)?new z6(t):new P6(t,{allowProjection:e!==j.Fragment}),Uce=class extends l6{constructor(e){super(e),e.animationState||=yse(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Y3(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Wce=0,Gce={animation:{Feature:Uce},exit:{Feature:class extends l6{constructor(){super(...arguments),this.id=Wce++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=J4(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function a5(e){return{point:{x:e.pageX,y:e.pageY}}}var Kce=e=>t=>D3(t)&&e(t,a5(t));function o5(e,t,n,r){return _8(e,t,Kce(n),r)}var s5=({current:e})=>e?e.ownerDocument.defaultView:null,c5=(e,t)=>Math.abs(e-t);function qce(e,t){let n=c5(e.x,t.x),r=c5(e.y,t.y);return Math.sqrt(n**2+r**2)}var l5=new Set([`auto`,`scroll`]),u5=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=d5(this.lastRawMoveEventInfo,this.transformPagePoint));let e=p5(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=qce(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=O1;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=d5(t,this.transformPagePoint),E1.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=p5(e.type===`pointercancel`?this.lastMoveEventInfo:d5(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!D3(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=d5(a5(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=O1;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,p5(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=K$(o5(this.contextWindow,`pointermove`,this.handlePointerMove,d),o5(this.contextWindow,`pointerup`,this.handlePointerUp,d),o5(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(l5.has(e.overflowX)||l5.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),E1.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),D1(this.updatePoint)}};function d5(e,t){return t?{point:t(e.point)}:e}function f5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function p5({point:e},t){return{point:e,delta:f5(e,m5(t)),offset:f5(e,Jce(t)),velocity:Yce(t,.1)}}function Jce(e){return e[0]}function m5(e){return e[e.length-1]}function Yce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=m5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Y$(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Y$(t)*2&&(r=e[1]);let a=X$(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Xce(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?E0(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?E0(n,e,r.max):Math.min(e,n)),e}function h5(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Zce(e,{top:t,left:n,bottom:r,right:i}){return{x:h5(e.x,n,i),y:h5(e.y,t,r)}}function g5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Qce(e,t){return{x:g5(e.x,t.x),y:g5(e.y,t.y)}}function $ce(e,t){let n=.5,r=Y6(e),i=Y6(t);return i>r?n=q$(t.min,t.max-r,e.min):r>i&&(n=q$(e.min,e.max-i,t.min)),z$(0,1,n)}function ele(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var _5=.35;function tle(e=_5){return e===!1?e=0:e===!0&&(e=_5),{x:v5(e,`left`,`right`),y:v5(e,`top`,`bottom`)}}function v5(e,t,n){return{min:y5(e,t),max:y5(e,n)}}function y5(e,t){return typeof e==`number`?e:e[t]||0}var nle=new WeakMap,rle=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=q3(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(a5(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=koe(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),d8(e=>{let t=this.getAxisMotionValue(e).get()||0;if(t0.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Y6(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&E1.update(()=>i(e,t),!1,!0),n3(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=ale(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&E1.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new u5(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:s5(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&E1.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!x5(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Xce(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&n5(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Zce(n.layoutBox,e):this.constraints=!1,this.elastic=tle(t),r!==this.constraints&&!n5(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&d8(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ele(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!n5(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=nse(n,r.root,this.visualElement.getTransformPagePoint()),a=Qce(r.layout.layoutBox,i);if(t){let e=t($oe(a));this.hasMutatedConstraints=!!e,e&&(a=u6(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=d8(o=>{if(!x5(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return n3(this.visualElement,e),n.start(H4(e,n,0,t,this.visualElement,!1))}stopAnimation(){d8(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){d8(t=>{let{drag:n}=this.getProps();if(!x5(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-E0(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!n5(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};d8(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=$ce({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),d8(t=>{if(!x5(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(E0(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;nle.set(this.visualElement,this);let e=this.visualElement.current,t=o5(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Foe(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();n5(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=ile(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),E1.read(r);let o=_8(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(d8(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=_5,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function b5(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ile(e,t,n){let r=z3(e,b5(n)),i=z3(t,b5(n));return()=>{r(),i()}}function x5(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function ale(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var ole=class extends l6{constructor(e){super(e),this.removeGroupControls=G$,this.removeListeners=G$,this.controls=new rle(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G$}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},S5=e=>(t,n)=>{e&&E1.update(()=>e(t,n),!1,!0)},sle=class extends l6{constructor(){super(...arguments),this.removePointerDownListener=G$}onPointerDown(e){this.session=new u5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:s5(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:S5(e),onStart:S5(t),onMove:S5(n),onEnd:(e,t)=>{delete this.session,r&&E1.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=o5(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},C5=!1,cle=class extends j.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),C5&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),y8.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),C5=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||E1.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),S3.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;C5=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function w5(e){let[t,n]=R8(),r=(0,j.useContext)(N$);return(0,M.jsx)(cle,{...e,layoutGroup:r,switchLayoutGroup:(0,j.useContext)(t5),isPresent:t,safeToRemove:n})}var lle={pan:{Feature:sle},drag:{Feature:ole,ProjectionNode:F8,MeasureLayout:w5}};function T5(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&E1.postRender(()=>i(t,a5(t)))}var ule=class extends l6{mount(){let{current:e}=this.node;e&&(this.unmount=joe(e,(e,t)=>(T5(this.node,t,`Start`),e=>T5(this.node,e,`End`))))}unmount(){}},dle=class extends l6{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=K$(_8(this.node.current,`focus`,()=>this.onFocus()),_8(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function E5(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&E1.postRender(()=>i(t,a5(t)))}var fle=class extends l6{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Loe(e,(e,t)=>(E5(this.node,t,`Start`),(e,{success:t})=>E5(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},D5=new WeakMap,O5=new WeakMap,ple=e=>{let t=D5.get(e.target);t&&t(e)},mle=e=>{e.forEach(ple)};function hle({root:e,...t}){let n=e||document;O5.has(n)||O5.set(n,{});let r=O5.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(mle,{root:e,...t})),r[i]}function gle(e,t,n){let r=hle(t);return D5.set(e,n),r.observe(e),()=>{D5.delete(e),r.unobserve(e)}}var _le={some:0,all:1},vle=class extends l6{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:_le[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=gle(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(yle(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function yle({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var ble={inView:{Feature:vle},tap:{Feature:fle},focus:{Feature:dle},hover:{Feature:ule}},xle={layout:{ProjectionNode:F8,MeasureLayout:w5}},Sle=Vce({...Gce,...ble,...lle,...xle},Hce);function k5(e){let t=P$(()=>M4(e)),{isStatic:n}=(0,j.useContext)(I8);if(n){let[,n]=(0,j.useState)(e);(0,j.useEffect)(()=>t.on(`change`,n),[])}return t}function A5(e,t){let n=k5(t()),r=()=>n.set(t());return r(),F$(()=>{let t=()=>E1.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),D1(r)}}),n}function Cle(e){A4.current=[],e();let t=A5(A4.current,e);return A4.current=void 0,t}function j5(e,t,n,r){if(typeof e==`function`)return Cle(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return wle(e,t,n,r);let i=typeof t==`function`?t:Koe(t,n,r),a=Array.isArray(e)?M5(e,i):M5([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function M5(e,t){let n=P$(()=>[]);return A5(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function wle(e,t,n,r){let i=P$(()=>Object.keys(n)),a=P$(()=>({}));for(let o of i)a[o]=j5(e,t,n[o],r);return a}function Tle(e,t={}){let{isStatic:n}=(0,j.useContext)(I8),r=()=>e3(e)?e.get():e;if(n)return j5(r);let i=k5(r());return(0,j.useInsertionEffect)(()=>qoe(i,e,t),[i,JSON.stringify(t)]),i}function Ele(e,t={}){return Tle(e,{type:`spring`,...t})}function Dle(){!n6.current&&r6();let[e]=(0,j.useState)(t6.current);return e}function Ole(e){e.values.forEach(e=>e.stop())}function N5(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&$4(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{N5(e,t)})})}function kle(e,t){if(Array.isArray(t))return N5(e,t);if(typeof t==`string`)return N5(e,[t]);$4(e,t)}function Ale(){let e=new Set,t={subscribe(t){return e.add(t),()=>void e.delete(t)},start(t,n){let r=[];return e.forEach(e=>{r.push(c3(e,t,{transitionOverride:n}))}),Promise.all(r)},set(t){return e.forEach(e=>{kle(e,t)})},stop(){e.forEach(e=>{Ole(e)})},mount(){return()=>{t.stop()}}};return t}function P5(e){return typeof e==`object`&&!Array.isArray(e)}function F5(e,t,n,r){return e==null?[]:typeof e==`string`&&P5(t)?y3(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function jle(e,t,n){return e*(t+1)+n*t}function I5(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Mle(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(R$(e,i),r--)}}function Nle(e,t,n,r,i,a){Mle(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:E0(i,a,r[o]),easing:_1(n,o)})}function Ple(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Fle(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Ile=`easeInOut`,L5=20;function Lle(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,I5(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=I5(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Rle(e),{delay:l=0,times:u=l2(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=i4(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Vle(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=Y$(b));let r=G0(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&c2(u,T),c.length===1&&c.unshift(null),m&&`${m}${L5}`,m&&m<L5){let e=b>0?_/b:0;b=jle(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?a1(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:_1(f,e-1))}Ple(u,m,e)}let E=w+b;Nle(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(e3(p)){let e=R5(p,s);_(m,h,z5(`default`,e))}else{let e=F5(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=R5(r,s);for(let e in m)_(m[e],zle(h,e),z5(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Fle);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(q$(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(Ile)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function R5(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function z5(e,t){return t[e]||(t[e]=[]),t[e]}function Rle(e){return Array.isArray(e)?e:[e]}function zle(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Ble=e=>typeof e==`number`,Vle=e=>e.every(Ble);function Hle(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=N3(e)&&!V3(e)?new z6(t):new P6(t);n.mount(e),J3.set(e,n)}function Ule(e){let t=new lse({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),J3.set(e,t)}function Wle(e,t){return e3(e)||typeof e==`number`||typeof e==`string`&&!P5(t)}function B5(e,t,n,r){let i=[];if(Wle(e,t))i.push(g8(e,P5(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=F5(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?Hle:Ule;J3.has(r)||s(r);let c=J3.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...o3(c,{...t,transition:l},{}))}}return i}function Gle(e,t,n){let r=[];return Lle(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=M4(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:n2}).forEach(({keyframes:e,transition:t},n)=>{r.push(...B5(n,e,t))}),r}function Kle(e){return Array.isArray(e)&&e.some(Array.isArray)}function qle(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),Kle(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Gle(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=B5(e,i,{...c,...r},t)}let l=new E4(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{R$(t.animations,l)})),l}return i}var Jle=qle();function Yle(){let e=P$(Ale);return F$(e.mount,[]),e}var Xle=class{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,t){this.componentControls.forEach(n=>{n.start(e.nativeEvent||e,t)})}cancel(){this.componentControls.forEach(e=>{e.cancel()})}stop(){this.componentControls.forEach(e=>{e.stop()})}},Zle=()=>new Xle;function Qle(){return P$(Zle)}var $le=iQ(`CameraPreview`,{web:()=>s(()=>import(`./web-DGjg0P8a.js`).then(e=>new e.CameraPreviewWeb),[])}),V5=e=>Symbol.iterator in e,H5=e=>`entries`in e,U5=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},eue=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function tue(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:V5(e)&&V5(t)?H5(e)&&H5(t)?U5(e,t):eue(e,t):U5({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function nue(e){let t=j.useRef(void 0);return n=>{let r=e(n);return tue(t.current,r)?t.current:t.current=r}}var rue=`/assistant/assets/pdf.worker.min-Dr1KORA9.mjs`,W5=/[#.]/g;function iue(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){W5.lastIndex=i;let e=W5.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function G5(e,t,n){let r=n?cue(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=iue(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,aue(i))a.unshift(i);else for(let[t,n]of Object.entries(i))oue(e,o.properties,t,n)}for(let e of a)K5(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function aue(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function oue(e,t,n,r){let i=Sk(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Tk(r):i.commaSeparated?UO(r):i.commaOrSpaceSeparated?Tk(UO(r).join(` `)):q5(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?sue(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(q5(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function K5(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)K5(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?K5(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function q5(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||ek(n)===ek(t)))return!0}return n}function sue(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function cue(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var lue=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),J5=G5(Ck,`div`),Y5=G5(wk,`g`,lue);function uue(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=X5(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=X5(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function X5(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
127
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Z5={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Q5={}.hasOwnProperty,due=Object.prototype;function fue(e,t){let n=t||{};return $5({file:n.file||void 0,location:!1,schema:n.space===`svg`?wk:Ck,verbose:n.verbose||!1},e)}function $5(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},t7(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:e7(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=uue(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},t7(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},t7(e,r,n),n}default:return n=pue(e,t),n}}function e7(e,t){let n=-1,r=[];for(;++n<t.length;){let i=$5(e,t[n]);r.push(i)}return r}function pue(e,t){let n=e.schema;e.schema=t.namespaceURI===Z5.svg?wk:Ck;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Q5.call(due,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Y5:J5)(t.tagName,i,e7(e,t.childNodes));if(t7(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&n7(r.startTag),o=r&&r.endTag&&n7(r.endTag),s=$5(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function t7(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=mue(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function mue(e,t,n){let r=n7(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Q5.call(n.attrs,i)&&(r[Sk(e.schema,i).property]=n7(n.attrs[i]));n.startTag;let a=n7(n.startTag),o=n.endTag?n7(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function n7(e){let t=r7({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=r7({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function r7(e){return e.line&&e.column?e:void 0}var hue={},gue={}.hasOwnProperty,i7=FN(`type`,{handlers:{root:vue,element:Cue,text:xue,comment:Sue,doctype:bue}});function _ue(e,t){let n=(t||hue).space;return i7(e,n===`svg`?wk:Ck)}function vue(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=a7(e.children,n,t),o7(e,n),n}function yue(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=a7(e.children,n,t),o7(e,n),n}function bue(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return o7(e,t),t}function xue(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return o7(e,t),t}function Sue(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return o7(e,t),t}function Cue(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=wk);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&gue.call(e.properties,a)){let t=wue(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Z5[o],childNodes:[],parentNode:null};return s.childNodes=a7(e.children,s,r),o7(e,s),e.tagName===`template`&&e.content&&(s.content=yue(e.content,r)),s}function wue(e,t,n){let r=Sk(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?WO(n):Ek(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=Z5[r.space]}return i}function a7(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=i7(e[r],n);a.parentNode=t,i.push(a)}return i}function o7(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Tue=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Eue=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),K;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(K||={});var s7={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function c7(e){return e>=55296&&e<=57343}function Due(e){return e>=56320&&e<=57343}function Oue(e,t){return(e-55296)*1024+9216+t}function l7(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function u7(e){return e>=64976&&e<=65007||Eue.has(e)}var q;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(q||={});var kue=65536,Aue=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=kue,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(Due(t))return this.pos++,this._addGap(),Oue(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,K.EOF;return this._err(q.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,K.EOF;let n=this.html.charCodeAt(t);return n===K.CARRIAGE_RETURN?K.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,K.EOF;let e=this.html.charCodeAt(this.pos);return e===K.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,K.LINE_FEED):e===K.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,c7(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===K.LINE_FEED||e===K.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){l7(e)?this._err(q.controlCharacterInInputStream):u7(e)&&this._err(q.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},d7;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(d7||={});function f7(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var jue=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),Mue=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function Nue(e){return e>=55296&&e<=57343||e>1114111?65533:Mue.get(e)??e}var p7;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(p7||={});var Pue=32,m7;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(m7||={});function h7(e){return e>=p7.ZERO&&e<=p7.NINE}function Fue(e){return e>=p7.UPPER_A&&e<=p7.UPPER_F||e>=p7.LOWER_A&&e<=p7.LOWER_F}function Iue(e){return e>=p7.UPPER_A&&e<=p7.UPPER_Z||e>=p7.LOWER_A&&e<=p7.LOWER_Z||h7(e)}function Lue(e){return e===p7.EQUALS||Iue(e)}var g7;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(g7||={});var _7;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(_7||={});var Rue=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=g7.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_7.Strict}startEntity(e){this.decodeMode=e,this.state=g7.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case g7.EntityStart:return e.charCodeAt(t)===p7.NUM?(this.state=g7.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=g7.NamedEntity,this.stateNamedEntity(e,t));case g7.NumericStart:return this.stateNumericStart(e,t);case g7.NumericDecimal:return this.stateNumericDecimal(e,t);case g7.NumericHex:return this.stateNumericHex(e,t);case g7.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Pue)===p7.LOWER_X?(this.state=g7.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=g7.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(h7(r)||Fue(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(h7(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===p7.SEMI)this.consumed+=1;else if(this.decodeMode===_7.Strict)return 0;return this.emitCodePoint(Nue(this.result),this.consumed),this.errors&&(e!==p7.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&m7.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=zue(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===_7.Attribute&&(i===0||Lue(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&m7.VALUE_LENGTH)>>14,i!==0){if(a===p7.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==_7.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&m7.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~m7.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case g7.NamedEntity:return this.result!==0&&(this.decodeMode!==_7.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case g7.NumericDecimal:return this.emitNumericEntity(0,2);case g7.NumericHex:return this.emitNumericEntity(0,3);case g7.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case g7.EntityStart:return 0}}};function zue(e,t,n,r){let i=(t&m7.BRANCH_LENGTH)>>7,a=t&m7.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var J;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(J||={});var v7;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(v7||={});var y7;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(y7||={});var Y;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(Y||={});var X;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(X||={});var Bue=new Map([[Y.A,X.A],[Y.ADDRESS,X.ADDRESS],[Y.ANNOTATION_XML,X.ANNOTATION_XML],[Y.APPLET,X.APPLET],[Y.AREA,X.AREA],[Y.ARTICLE,X.ARTICLE],[Y.ASIDE,X.ASIDE],[Y.B,X.B],[Y.BASE,X.BASE],[Y.BASEFONT,X.BASEFONT],[Y.BGSOUND,X.BGSOUND],[Y.BIG,X.BIG],[Y.BLOCKQUOTE,X.BLOCKQUOTE],[Y.BODY,X.BODY],[Y.BR,X.BR],[Y.BUTTON,X.BUTTON],[Y.CAPTION,X.CAPTION],[Y.CENTER,X.CENTER],[Y.CODE,X.CODE],[Y.COL,X.COL],[Y.COLGROUP,X.COLGROUP],[Y.DD,X.DD],[Y.DESC,X.DESC],[Y.DETAILS,X.DETAILS],[Y.DIALOG,X.DIALOG],[Y.DIR,X.DIR],[Y.DIV,X.DIV],[Y.DL,X.DL],[Y.DT,X.DT],[Y.EM,X.EM],[Y.EMBED,X.EMBED],[Y.FIELDSET,X.FIELDSET],[Y.FIGCAPTION,X.FIGCAPTION],[Y.FIGURE,X.FIGURE],[Y.FONT,X.FONT],[Y.FOOTER,X.FOOTER],[Y.FOREIGN_OBJECT,X.FOREIGN_OBJECT],[Y.FORM,X.FORM],[Y.FRAME,X.FRAME],[Y.FRAMESET,X.FRAMESET],[Y.H1,X.H1],[Y.H2,X.H2],[Y.H3,X.H3],[Y.H4,X.H4],[Y.H5,X.H5],[Y.H6,X.H6],[Y.HEAD,X.HEAD],[Y.HEADER,X.HEADER],[Y.HGROUP,X.HGROUP],[Y.HR,X.HR],[Y.HTML,X.HTML],[Y.I,X.I],[Y.IMG,X.IMG],[Y.IMAGE,X.IMAGE],[Y.INPUT,X.INPUT],[Y.IFRAME,X.IFRAME],[Y.KEYGEN,X.KEYGEN],[Y.LABEL,X.LABEL],[Y.LI,X.LI],[Y.LINK,X.LINK],[Y.LISTING,X.LISTING],[Y.MAIN,X.MAIN],[Y.MALIGNMARK,X.MALIGNMARK],[Y.MARQUEE,X.MARQUEE],[Y.MATH,X.MATH],[Y.MENU,X.MENU],[Y.META,X.META],[Y.MGLYPH,X.MGLYPH],[Y.MI,X.MI],[Y.MO,X.MO],[Y.MN,X.MN],[Y.MS,X.MS],[Y.MTEXT,X.MTEXT],[Y.NAV,X.NAV],[Y.NOBR,X.NOBR],[Y.NOFRAMES,X.NOFRAMES],[Y.NOEMBED,X.NOEMBED],[Y.NOSCRIPT,X.NOSCRIPT],[Y.OBJECT,X.OBJECT],[Y.OL,X.OL],[Y.OPTGROUP,X.OPTGROUP],[Y.OPTION,X.OPTION],[Y.P,X.P],[Y.PARAM,X.PARAM],[Y.PLAINTEXT,X.PLAINTEXT],[Y.PRE,X.PRE],[Y.RB,X.RB],[Y.RP,X.RP],[Y.RT,X.RT],[Y.RTC,X.RTC],[Y.RUBY,X.RUBY],[Y.S,X.S],[Y.SCRIPT,X.SCRIPT],[Y.SEARCH,X.SEARCH],[Y.SECTION,X.SECTION],[Y.SELECT,X.SELECT],[Y.SOURCE,X.SOURCE],[Y.SMALL,X.SMALL],[Y.SPAN,X.SPAN],[Y.STRIKE,X.STRIKE],[Y.STRONG,X.STRONG],[Y.STYLE,X.STYLE],[Y.SUB,X.SUB],[Y.SUMMARY,X.SUMMARY],[Y.SUP,X.SUP],[Y.TABLE,X.TABLE],[Y.TBODY,X.TBODY],[Y.TEMPLATE,X.TEMPLATE],[Y.TEXTAREA,X.TEXTAREA],[Y.TFOOT,X.TFOOT],[Y.TD,X.TD],[Y.TH,X.TH],[Y.THEAD,X.THEAD],[Y.TITLE,X.TITLE],[Y.TR,X.TR],[Y.TRACK,X.TRACK],[Y.TT,X.TT],[Y.U,X.U],[Y.UL,X.UL],[Y.SVG,X.SVG],[Y.VAR,X.VAR],[Y.WBR,X.WBR],[Y.XMP,X.XMP]]);function b7(e){return Bue.get(e)??X.UNKNOWN}var Z=X,Vue={[J.HTML]:new Set([Z.ADDRESS,Z.APPLET,Z.AREA,Z.ARTICLE,Z.ASIDE,Z.BASE,Z.BASEFONT,Z.BGSOUND,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.BUTTON,Z.CAPTION,Z.CENTER,Z.COL,Z.COLGROUP,Z.DD,Z.DETAILS,Z.DIR,Z.DIV,Z.DL,Z.DT,Z.EMBED,Z.FIELDSET,Z.FIGCAPTION,Z.FIGURE,Z.FOOTER,Z.FORM,Z.FRAME,Z.FRAMESET,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HEADER,Z.HGROUP,Z.HR,Z.HTML,Z.IFRAME,Z.IMG,Z.INPUT,Z.LI,Z.LINK,Z.LISTING,Z.MAIN,Z.MARQUEE,Z.MENU,Z.META,Z.NAV,Z.NOEMBED,Z.NOFRAMES,Z.NOSCRIPT,Z.OBJECT,Z.OL,Z.P,Z.PARAM,Z.PLAINTEXT,Z.PRE,Z.SCRIPT,Z.SECTION,Z.SELECT,Z.SOURCE,Z.STYLE,Z.SUMMARY,Z.TABLE,Z.TBODY,Z.TD,Z.TEMPLATE,Z.TEXTAREA,Z.TFOOT,Z.TH,Z.THEAD,Z.TITLE,Z.TR,Z.TRACK,Z.UL,Z.WBR,Z.XMP]),[J.MATHML]:new Set([Z.MI,Z.MO,Z.MN,Z.MS,Z.MTEXT,Z.ANNOTATION_XML]),[J.SVG]:new Set([Z.TITLE,Z.FOREIGN_OBJECT,Z.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},x7=new Set([Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6]);new Set([Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT]);var Q;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Q||={});var S7={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function Hue(e){return e>=K.DIGIT_0&&e<=K.DIGIT_9}function C7(e){return e>=K.LATIN_CAPITAL_A&&e<=K.LATIN_CAPITAL_Z}function Uue(e){return e>=K.LATIN_SMALL_A&&e<=K.LATIN_SMALL_Z}function w7(e){return Uue(e)||C7(e)}function T7(e){return w7(e)||Hue(e)}function E7(e){return e+32}function D7(e){return e===K.SPACE||e===K.LINE_FEED||e===K.TABULATION||e===K.FORM_FEED}function O7(e){return D7(e)||e===K.SOLIDUS||e===K.GREATER_THAN_SIGN}function Wue(e){return e===K.NULL?q.nullCharacterReference:e>1114111?q.characterReferenceOutsideUnicodeRange:c7(e)?q.surrogateCharacterReference:u7(e)?q.noncharacterCharacterReference:l7(e)||e===K.CARRIAGE_RETURN?q.controlCharacterReference:null}var Gue=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new Aue(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Rue(jue,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Wue(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:d7.START_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:d7.END_TAG,tagName:``,tagID:X.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:d7.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:d7.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(f7(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(q.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=b7(e.tagName),e.type===d7.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(q.endTagWithAttributes),e.selfClosing&&this._err(q.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case d7.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case d7.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case d7.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:d7.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=D7(e)?d7.WHITESPACE_CHARACTER:e===K.NULL?d7.NULL_CHARACTER:d7.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(d7.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?_7.Attribute:_7.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitCodePoint(e);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case K.AMPERSAND:this._startCharacterReference();break;case K.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(w7(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case K.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case K.QUESTION_MARK:this._err(q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(w7(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case K.GREATER_THAN_SIGN:this._err(q.missingEndTagName),this.state=Q.DATA;break;case K.EOF:this._err(q.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.tagName+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(C7(e)?E7(e):e)}}_stateRcdataLessThanSign(e){e===K.SOLIDUS?this.state=Q.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){w7(e)?(this.state=Q.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Q.BEFORE_ATTRIBUTE_NAME,!1;case K.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Q.SELF_CLOSING_START_TAG,!1;case K.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Q.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===K.SOLIDUS?this.state=Q.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){w7(e)?(this.state=Q.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case K.SOLIDUS:this.state=Q.SCRIPT_DATA_END_TAG_OPEN;break;case K.EXCLAMATION_MARK:this.state=Q.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){w7(e)?(this.state=Q.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===K.HYPHEN_MINUS?(this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Q.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===K.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:w7(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){w7(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(s7.SCRIPT,!1)&&O7(this.preprocessor.peek(s7.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<s7.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case K.HYPHEN_MINUS:this._emitChars(`-`);break;case K.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case K.GREATER_THAN_SIGN:this.state=Q.SCRIPT_DATA,this._emitChars(`>`);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case K.EOF:this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===K.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(s7.SCRIPT,!1)&&O7(this.preprocessor.peek(s7.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<s7.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._err(q.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:case K.SOLIDUS:case K.GREATER_THAN_SIGN:case K.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case K.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:this._err(q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(C7(e)?E7(e):e)}}_stateAfterAttributeName(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case K.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case K.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case K.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case K.AMPERSAND:this._startCharacterReference();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.AMPERSAND:this._startCharacterReference();break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case K.QUOTATION_MARK:case K.APOSTROPHE:case K.LESS_THAN_SIGN:case K.EQUALS_SIGN:case K.GRAVE_ACCENT:this._err(q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case K.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case K.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case K.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case K.EOF:this._err(q.eofInTag),this._emitEOFToken();break;default:this._err(q.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(s7.DASH_DASH,!0)?(this._createCommentToken(s7.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch(s7.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(s7.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch(s7.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(q.cdataInHtmlContent),this._createCommentToken(s7.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case K.GREATER_THAN_SIGN:{this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.GREATER_THAN_SIGN:this._err(q.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case K.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.data+=`�`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case K.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case K.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===K.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==K.GREATER_THAN_SIGN&&e!==K.EOF&&this._err(q.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case K.HYPHEN_MINUS:t.data+=`-`;break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case K.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case K.GREATER_THAN_SIGN:this._err(q.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case K.EOF:this._err(q.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case K.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(C7(e))this._createDoctypeToken(String.fromCharCode(E7(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.NULL:this._err(q.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:{this._err(q.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case K.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.NULL:this._err(q.unexpectedNullCharacter),t.name+=`�`;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(C7(e)?E7(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(s7.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(s7.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(q.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.publicId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case K.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.QUOTATION_MARK:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case K.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case K.GREATER_THAN_SIGN:this._err(q.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case K.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case K.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case K.NULL:this._err(q.unexpectedNullCharacter),t.systemId+=`�`;break;case K.GREATER_THAN_SIGN:this._err(q.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case K.SPACE:case K.LINE_FEED:case K.TABULATION:case K.FORM_FEED:break;case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.EOF:this._err(q.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case K.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case K.NULL:this._err(q.unexpectedNullCharacter);break;case K.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case K.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case K.EOF:this._err(q.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===K.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case K.GREATER_THAN_SIGN:this.state=Q.DATA;break;case K.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(K.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&T7(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){T7(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===K.SEMICOLON&&this._err(q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},k7=new Set([X.DD,X.DT,X.LI,X.OPTGROUP,X.OPTION,X.P,X.RB,X.RP,X.RT,X.RTC]),A7=new Set([...k7,X.CAPTION,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]),j7=new Set([X.APPLET,X.CAPTION,X.HTML,X.MARQUEE,X.OBJECT,X.TABLE,X.TD,X.TEMPLATE,X.TH]),Kue=new Set([...j7,X.OL,X.UL]),que=new Set([...j7,X.BUTTON]),M7=new Set([X.ANNOTATION_XML,X.MI,X.MN,X.MO,X.MS,X.MTEXT]),N7=new Set([X.DESC,X.FOREIGN_OBJECT,X.TITLE]),Jue=new Set([X.TR,X.TEMPLATE,X.HTML]),Yue=new Set([X.TBODY,X.TFOOT,X.THEAD,X.TEMPLATE,X.HTML]),Xue=new Set([X.TABLE,X.TEMPLATE,X.HTML]),Zue=new Set([X.TD,X.TH]),Que=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=X.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===X.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===J.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==J.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(x7,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Zue,J.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Xue,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Yue,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(Jue,J.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===X.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===X.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case J.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case J.SVG:if(N7.has(r))return!1;break;case J.MATHML:if(M7.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,j7)}hasInListItemScope(e){return this.hasInDynamicScope(e,Kue)}hasInButtonScope(e){return this.hasInDynamicScope(e,que)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case J.HTML:if(x7.has(t))return!0;if(j7.has(t))return!1;break;case J.SVG:if(N7.has(t))return!1;break;case J.MATHML:if(M7.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===J.HTML)switch(this.tagIDs[e]){case X.TBODY:case X.THEAD:case X.TFOOT:return!0;case X.TABLE:case X.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===J.HTML)switch(this.tagIDs[t]){case e:return!0;case X.OPTION:case X.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&k7.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&A7.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&A7.has(this.currentTagId);)this.pop()}},P7=3,F7;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(F7||={});var I7={type:F7.Marker},$ue=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===F7.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<P7)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<P7)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=P7&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(I7)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:F7.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:F7.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(I7);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===F7.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===F7.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===F7.Element&&t.element===e)}},L7={createDocument(){return{nodeName:`#document`,mode:y7.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};L7.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(L7.isTextNode(n)){n.value+=t;return}}L7.appendChild(e,L7.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&L7.isTextNode(r)?r.value+=t:L7.insertBefore(e,L7.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},R7=`html`,ede=`about:legacy-compat`,tde=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,z7=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),nde=[...z7,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],rde=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),B7=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],ide=[...B7,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function V7(e,t){return t.some(t=>e.startsWith(t))}function ade(e){return e.name===R7&&e.publicId===null&&(e.systemId===null||e.systemId===ede)}function ode(e){if(e.name!==R7)return y7.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===tde)return y7.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),rde.has(n))return y7.QUIRKS;let e=t===null?nde:z7;if(V7(n,e))return y7.QUIRKS;if(e=t===null?B7:ide,V7(n,e))return y7.LIMITED_QUIRKS}return y7.NO_QUIRKS}var H7={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},sde=`definitionurl`,cde=`definitionURL`,lde=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),ude=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:J.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:J.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:J.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:J.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:J.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:J.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:J.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:J.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:J.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:J.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:J.XMLNS}]]),dde=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),fde=new Set([X.B,X.BIG,X.BLOCKQUOTE,X.BODY,X.BR,X.CENTER,X.CODE,X.DD,X.DIV,X.DL,X.DT,X.EM,X.EMBED,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HR,X.I,X.IMG,X.LI,X.LISTING,X.MENU,X.META,X.NOBR,X.OL,X.P,X.PRE,X.RUBY,X.S,X.SMALL,X.SPAN,X.STRONG,X.STRIKE,X.SUB,X.SUP,X.TABLE,X.TT,X.U,X.UL,X.VAR]);function pde(e){let t=e.tagID;return t===X.FONT&&e.attrs.some(({name:e})=>e===v7.COLOR||e===v7.SIZE||e===v7.FACE)||fde.has(t)}function U7(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===sde){e.attrs[t].name=cde;break}}function W7(e){for(let t=0;t<e.attrs.length;t++){let n=lde.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function G7(e){for(let t=0;t<e.attrs.length;t++){let n=ude.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function mde(e){let t=dde.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=b7(e.tagName))}function hde(e,t){return t===J.MATHML&&(e===X.MI||e===X.MO||e===X.MN||e===X.MS||e===X.MTEXT)}function gde(e,t,n){if(t===J.MATHML&&e===X.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===v7.ENCODING){let t=n[e].value.toLowerCase();return t===H7.TEXT_HTML||t===H7.APPLICATION_XML}}return t===J.SVG&&(e===X.FOREIGN_OBJECT||e===X.DESC||e===X.TITLE)}function _de(e,t,n,r){return(!r||r===J.HTML)&&gde(e,t,n)||(!r||r===J.MATHML)&&hde(e,t)}var vde=`hidden`,yde=8,bde=3,$;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})($||={});var xde={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},K7=new Set([X.TABLE,X.TBODY,X.TFOOT,X.THEAD,X.TR]),q7={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:L7,onParseError:null},J7=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...q7,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Gue(this.options,this),this.activeFormattingElements=new $ue(this.treeAdapter),this.fragmentContextID=n?b7(this.treeAdapter.getTagName(n)):X.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Que(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...q7,...t};e??=n.treeAdapter.createElement(Y.TEMPLATE,J.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,J.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===X.TEMPLATE&&i.tmplInsertionModeStack.unshift($.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??xde,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===J.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,J.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=S7.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Y.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==J.HTML))switch(this.fragmentContextID){case X.TITLE:case X.TEXTAREA:this.tokenizer.state=S7.RCDATA;break;case X.STYLE:case X.XMP:case X.IFRAME:case X.NOEMBED:case X.NOFRAMES:case X.NOSCRIPT:this.tokenizer.state=S7.RAWTEXT;break;case X.SCRIPT:this.tokenizer.state=S7.SCRIPT_DATA;break;case X.PLAINTEXT:this.tokenizer.state=S7.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,J.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,J.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(Y.HTML,J.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,X.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===d7.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===X.SVG&&this.treeAdapter.getTagName(t)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===J.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===X.MGLYPH||e.tagID===X.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,J.HTML)}_processToken(e){switch(e.type){case d7.CHARACTER:this.onCharacter(e);break;case d7.NULL_CHARACTER:this.onNullCharacter(e);break;case d7.COMMENT:this.onComment(e);break;case d7.DOCTYPE:this.onDoctype(e);break;case d7.START_TAG:this._processStartTag(e);break;case d7.END_TAG:this.onEndTag(e);break;case d7.EOF:this.onEof(e);break;case d7.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return _de(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===F7.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(X.P),this.openElements.popUntilTagNamePopped(X.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case X.TR:this.insertionMode=$.IN_ROW;return;case X.TBODY:case X.THEAD:case X.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case X.CAPTION:this.insertionMode=$.IN_CAPTION;return;case X.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case X.TABLE:this.insertionMode=$.IN_TABLE;return;case X.BODY:this.insertionMode=$.IN_BODY;return;case X.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case X.SELECT:this._resetInsertionModeForSelect(e);return;case X.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case X.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case X.TD:case X.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case X.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}break}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===X.TEMPLATE)break;if(e===X.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return K7.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case X.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case X.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Vue[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Zfe(this,e);return}switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:$7(this,e);break;case $.BEFORE_HEAD:e9(this,e);break;case $.IN_HEAD:r9(this,e);break;case $.IN_HEAD_NO_SCRIPT:i9(this,e);break;case $.AFTER_HEAD:a9(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:c9(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:_9(this,e);break;case $.IN_TABLE_TEXT:S9(this,e);break;case $.IN_COLUMN_GROUP:E9(this,e);break;case $.AFTER_BODY:F9(this,e);break;case $.AFTER_AFTER_BODY:I9(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Xfe(this,e);return}switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:$7(this,e);break;case $.BEFORE_HEAD:e9(this,e);break;case $.IN_HEAD:r9(this,e);break;case $.IN_HEAD_NO_SCRIPT:i9(this,e);break;case $.AFTER_HEAD:a9(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:_9(this,e);break;case $.IN_COLUMN_GROUP:E9(this,e);break;case $.AFTER_BODY:F9(this,e);break;case $.AFTER_AFTER_BODY:I9(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){X7(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:X7(this,e);break;case $.IN_TABLE_TEXT:C9(this,e);break;case $.AFTER_BODY:Ode(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:kde(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:Ade(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,q.misplacedDoctype);break;case $.IN_TABLE_TEXT:C9(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?Qfe(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:jde(this,e);break;case $.BEFORE_HEAD:Nde(this,e);break;case $.IN_HEAD:t9(this,e);break;case $.IN_HEAD_NO_SCRIPT:Ide(this,e);break;case $.AFTER_HEAD:Rde(this,e);break;case $.IN_BODY:p9(this,e);break;case $.IN_TABLE:v9(this,e);break;case $.IN_TABLE_TEXT:C9(this,e);break;case $.IN_CAPTION:Pfe(this,e);break;case $.IN_COLUMN_GROUP:T9(this,e);break;case $.IN_TABLE_BODY:D9(this,e);break;case $.IN_ROW:k9(this,e);break;case $.IN_CELL:Lfe(this,e);break;case $.IN_SELECT:j9(this,e);break;case $.IN_SELECT_IN_TABLE:zfe(this,e);break;case $.IN_TEMPLATE:Vfe(this,e);break;case $.AFTER_BODY:Ufe(this,e);break;case $.IN_FRAMESET:Wfe(this,e);break;case $.AFTER_FRAMESET:Kfe(this,e);break;case $.AFTER_AFTER_BODY:Jfe(this,e);break;case $.AFTER_AFTER_FRAMESET:Yfe(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?$fe(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:Mde(this,e);break;case $.BEFORE_HEAD:Pde(this,e);break;case $.IN_HEAD:Fde(this,e);break;case $.IN_HEAD_NO_SCRIPT:Lde(this,e);break;case $.AFTER_HEAD:zde(this,e);break;case $.IN_BODY:h9(this,e);break;case $.TEXT:wfe(this,e);break;case $.IN_TABLE:y9(this,e);break;case $.IN_TABLE_TEXT:C9(this,e);break;case $.IN_CAPTION:Ffe(this,e);break;case $.IN_COLUMN_GROUP:Ife(this,e);break;case $.IN_TABLE_BODY:O9(this,e);break;case $.IN_ROW:A9(this,e);break;case $.IN_CELL:Rfe(this,e);break;case $.IN_SELECT:M9(this,e);break;case $.IN_SELECT_IN_TABLE:Bfe(this,e);break;case $.IN_TEMPLATE:Hfe(this,e);break;case $.AFTER_BODY:P9(this,e);break;case $.IN_FRAMESET:Gfe(this,e);break;case $.AFTER_FRAMESET:qfe(this,e);break;case $.AFTER_AFTER_BODY:I9(this,e);break;default:}}onEof(e){switch(this.insertionMode){case $.INITIAL:Q7(this,e);break;case $.BEFORE_HTML:$7(this,e);break;case $.BEFORE_HEAD:e9(this,e);break;case $.IN_HEAD:r9(this,e);break;case $.IN_HEAD_NO_SCRIPT:i9(this,e);break;case $.AFTER_HEAD:a9(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:g9(this,e);break;case $.TEXT:Tfe(this,e);break;case $.IN_TABLE_TEXT:C9(this,e);break;case $.IN_TEMPLATE:N9(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:Z7(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===K.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:s9(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:_9(this,e);break;case $.IN_TABLE_TEXT:x9(this,e);break;default:}}};function Sde(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):m9(e,t),n}function Cde(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function wde(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=bde;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Tde(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Tde(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Ede(e,t,n){let r=b7(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===X.TEMPLATE&&i===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Dde(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Y7(e,t){for(let n=0;n<yde;n++){let n=Sde(e,t);if(!n)break;let r=Cde(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=wde(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&Ede(e,a,i),Dde(e,r,n)}}function X7(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ode(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kde(e,t){e._appendCommentNode(t,e.document)}function Z7(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Ade(e,t){e._setDocumentType(t);let n=t.forceQuirks?y7.QUIRKS:ode(t);ade(t)||e._err(t,q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function Q7(e,t){e._err(t,q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,y7.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function jde(e,t){t.tagID===X.HTML?(e._insertElement(t,J.HTML),e.insertionMode=$.BEFORE_HEAD):$7(e,t)}function Mde(e,t){let n=t.tagID;(n===X.HTML||n===X.HEAD||n===X.BODY||n===X.BR)&&$7(e,t)}function $7(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function Nde(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.HEAD:e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:e9(e,t)}}function Pde(e,t){let n=t.tagID;n===X.HEAD||n===X.BODY||n===X.HTML||n===X.BR?e9(e,t):e._err(t,q.endTagWithoutMatchingOpenElement)}function e9(e,t){e._insertFakeElement(Y.HEAD,X.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function t9(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TITLE:e._switchToTextParsing(t,S7.RCDATA);break;case X.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,S7.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case X.NOFRAMES:case X.STYLE:e._switchToTextParsing(t,S7.RAWTEXT);break;case X.SCRIPT:e._switchToTextParsing(t,S7.SCRIPT_DATA);break;case X.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:r9(e,t)}}function Fde(e,t){switch(t.tagID){case X.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case X.BODY:case X.BR:case X.HTML:r9(e,t);break;case X.TEMPLATE:n9(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function n9(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==X.TEMPLATE&&e._err(t,q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,q.endTagWithoutMatchingOpenElement)}function r9(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function Ide(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.BASEFONT:case X.BGSOUND:case X.HEAD:case X.LINK:case X.META:case X.NOFRAMES:case X.STYLE:t9(e,t);break;case X.NOSCRIPT:e._err(t,q.nestedNoscriptInHead);break;default:i9(e,t)}}function Lde(e,t){switch(t.tagID){case X.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case X.BR:i9(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function i9(e,t){let n=t.type===d7.EOF?q.openElementsLeftAfterEof:q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function Rde(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.BODY:e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case X.FRAMESET:e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET;break;case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:e._err(t,q.abandonedHeadElementChild),e.openElements.push(e.headElement,X.HEAD),t9(e,t),e.openElements.remove(e.headElement);break;case X.HEAD:e._err(t,q.misplacedStartTagForHeadElement);break;default:a9(e,t)}}function zde(e,t){switch(t.tagID){case X.BODY:case X.HTML:case X.BR:a9(e,t);break;case X.TEMPLATE:n9(e,t);break;default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function a9(e,t){e._insertFakeElement(Y.BODY,X.BODY),e.insertionMode=$.IN_BODY,o9(e,t)}function o9(e,t){switch(t.type){case d7.CHARACTER:c9(e,t);break;case d7.WHITESPACE_CHARACTER:s9(e,t);break;case d7.COMMENT:X7(e,t);break;case d7.START_TAG:p9(e,t);break;case d7.END_TAG:h9(e,t);break;case d7.EOF:g9(e,t);break;default:}}function s9(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function c9(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Bde(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Vde(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Hde(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_FRAMESET)}function Ude(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function Wde(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&x7.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function Gde(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Kde(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function qde(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===X.LI&&r===X.LI||(n===X.DD||n===X.DT)&&(r===X.DD||r===X.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==X.ADDRESS&&r!==X.DIV&&r!==X.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function Jde(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=S7.PLAINTEXT}function Yde(e,t){e.openElements.hasInScope(X.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function Xde(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(Y7(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Zde(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Qde(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(X.NOBR)&&(Y7(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $de(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function efe(e,t){e.treeAdapter.getDocumentMode(e.document)!==y7.QUIRKS&&e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function l9(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function u9(e){let t=f7(e,v7.TYPE);return t!=null&&t.toLowerCase()===vde}function tfe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),u9(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function nfe(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function rfe(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ife(e,t){t.tagName=Y.IMG,t.tagID=X.IMG,l9(e,t)}function afe(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=S7.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function ofe(e,t){e.openElements.hasInButtonScope(X.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,S7.RAWTEXT)}function sfe(e,t){e.framesetOk=!1,e._switchToTextParsing(t,S7.RAWTEXT)}function d9(e,t){e._switchToTextParsing(t,S7.RAWTEXT)}function cfe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function lfe(e,t){e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function ufe(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function dfe(e,t){e.openElements.hasInScope(X.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(X.RTC),e._insertElement(t,J.HTML)}function ffe(e,t){e._reconstructActiveFormattingElements(),U7(t),G7(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function pfe(e,t){e._reconstructActiveFormattingElements(),W7(t),G7(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function f9(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function p9(e,t){switch(t.tagID){case X.I:case X.S:case X.B:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.SMALL:case X.STRIKE:case X.STRONG:Zde(e,t);break;case X.A:Xde(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:Wde(e,t);break;case X.P:case X.DL:case X.OL:case X.UL:case X.DIV:case X.DIR:case X.NAV:case X.MAIN:case X.MENU:case X.ASIDE:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.DETAILS:case X.ADDRESS:case X.ARTICLE:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:Ude(e,t);break;case X.LI:case X.DD:case X.DT:qde(e,t);break;case X.BR:case X.IMG:case X.WBR:case X.AREA:case X.EMBED:case X.KEYGEN:l9(e,t);break;case X.HR:rfe(e,t);break;case X.RB:case X.RTC:ufe(e,t);break;case X.RT:case X.RP:dfe(e,t);break;case X.PRE:case X.LISTING:Gde(e,t);break;case X.XMP:ofe(e,t);break;case X.SVG:pfe(e,t);break;case X.HTML:Bde(e,t);break;case X.BASE:case X.LINK:case X.META:case X.STYLE:case X.TITLE:case X.SCRIPT:case X.BGSOUND:case X.BASEFONT:case X.TEMPLATE:t9(e,t);break;case X.BODY:Vde(e,t);break;case X.FORM:Kde(e,t);break;case X.NOBR:Qde(e,t);break;case X.MATH:ffe(e,t);break;case X.TABLE:efe(e,t);break;case X.INPUT:tfe(e,t);break;case X.PARAM:case X.TRACK:case X.SOURCE:nfe(e,t);break;case X.IMAGE:ife(e,t);break;case X.BUTTON:Yde(e,t);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:$de(e,t);break;case X.IFRAME:sfe(e,t);break;case X.SELECT:cfe(e,t);break;case X.OPTION:case X.OPTGROUP:lfe(e,t);break;case X.NOEMBED:case X.NOFRAMES:d9(e,t);break;case X.FRAMESET:Hde(e,t);break;case X.TEXTAREA:afe(e,t);break;case X.NOSCRIPT:e.options.scriptingEnabled?d9(e,t):f9(e,t);break;case X.PLAINTEXT:Jde(e,t);break;case X.COL:case X.TH:case X.TD:case X.TR:case X.HEAD:case X.FRAME:case X.TBODY:case X.TFOOT:case X.THEAD:case X.CAPTION:case X.COLGROUP:break;default:f9(e,t)}}function mfe(e,t){if(e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function hfe(e,t){e.openElements.hasInScope(X.BODY)&&(e.insertionMode=$.AFTER_BODY,P9(e,t))}function gfe(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function _fe(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(X.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(X.FORM):n&&e.openElements.remove(n))}function vfe(e){e.openElements.hasInButtonScope(X.P)||e._insertFakeElement(Y.P,X.P),e._closePElement()}function yfe(e){e.openElements.hasInListItemScope(X.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(X.LI),e.openElements.popUntilTagNamePopped(X.LI))}function bfe(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function xfe(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Sfe(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Cfe(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,X.BR),e.openElements.pop(),e.framesetOk=!1}function m9(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==X.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function h9(e,t){switch(t.tagID){case X.A:case X.B:case X.I:case X.S:case X.U:case X.EM:case X.TT:case X.BIG:case X.CODE:case X.FONT:case X.NOBR:case X.SMALL:case X.STRIKE:case X.STRONG:Y7(e,t);break;case X.P:vfe(e);break;case X.DL:case X.UL:case X.OL:case X.DIR:case X.DIV:case X.NAV:case X.PRE:case X.MAIN:case X.MENU:case X.ASIDE:case X.BUTTON:case X.CENTER:case X.FIGURE:case X.FOOTER:case X.HEADER:case X.HGROUP:case X.DIALOG:case X.ADDRESS:case X.ARTICLE:case X.DETAILS:case X.SEARCH:case X.SECTION:case X.SUMMARY:case X.LISTING:case X.FIELDSET:case X.BLOCKQUOTE:case X.FIGCAPTION:gfe(e,t);break;case X.LI:yfe(e);break;case X.DD:case X.DT:bfe(e,t);break;case X.H1:case X.H2:case X.H3:case X.H4:case X.H5:case X.H6:xfe(e);break;case X.BR:Cfe(e);break;case X.BODY:mfe(e,t);break;case X.HTML:hfe(e,t);break;case X.FORM:_fe(e);break;case X.APPLET:case X.OBJECT:case X.MARQUEE:Sfe(e,t);break;case X.TEMPLATE:n9(e,t);break;default:m9(e,t)}}function g9(e,t){e.tmplInsertionModeStack.length>0?N9(e,t):Z7(e,t)}function wfe(e,t){var n;t.tagID===X.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Tfe(e,t){e._err(t,q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _9(e,t){if(e.openElements.currentTagId!==void 0&&K7.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case d7.CHARACTER:S9(e,t);break;case d7.WHITESPACE_CHARACTER:x9(e,t);break}else b9(e,t)}function Efe(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CAPTION}function Dfe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function Ofe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,X.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,T9(e,t)}function kfe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_TABLE_BODY}function Afe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,X.TBODY),e.insertionMode=$.IN_TABLE_BODY,D9(e,t)}function jfe(e,t){e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Mfe(e,t){u9(t)?e._appendElement(t,J.HTML):b9(e,t),t.ackSelfClosing=!0}function Nfe(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function v9(e,t){switch(t.tagID){case X.TD:case X.TH:case X.TR:Afe(e,t);break;case X.STYLE:case X.SCRIPT:case X.TEMPLATE:t9(e,t);break;case X.COL:Ofe(e,t);break;case X.FORM:Nfe(e,t);break;case X.TABLE:jfe(e,t);break;case X.TBODY:case X.TFOOT:case X.THEAD:kfe(e,t);break;case X.INPUT:Mfe(e,t);break;case X.CAPTION:Efe(e,t);break;case X.COLGROUP:Dfe(e,t);break;default:b9(e,t)}}function y9(e,t){switch(t.tagID){case X.TABLE:e.openElements.hasInTableScope(X.TABLE)&&(e.openElements.popUntilTagNamePopped(X.TABLE),e._resetInsertionMode());break;case X.TEMPLATE:n9(e,t);break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:b9(e,t)}}function b9(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,o9(e,t),e.fosterParentingEnabled=n}function x9(e,t){e.pendingCharacterTokens.push(t)}function S9(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function C9(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)b9(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var w9=new Set([X.CAPTION,X.COL,X.COLGROUP,X.TBODY,X.TD,X.TFOOT,X.TH,X.THEAD,X.TR]);function Pfe(e,t){let n=t.tagID;w9.has(n)?e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,v9(e,t)):p9(e,t)}function Ffe(e,t){let n=t.tagID;switch(n){case X.CAPTION:case X.TABLE:e.openElements.hasInTableScope(X.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(X.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===X.TABLE&&y9(e,t));break;case X.BODY:case X.COL:case X.COLGROUP:case X.HTML:case X.TBODY:case X.TD:case X.TFOOT:case X.TH:case X.THEAD:case X.TR:break;default:h9(e,t)}}function T9(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.COL:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.TEMPLATE:t9(e,t);break;default:E9(e,t)}}function Ife(e,t){switch(t.tagID){case X.COLGROUP:e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TEMPLATE:n9(e,t);break;case X.COL:break;default:E9(e,t)}}function E9(e,t){e.openElements.currentTagId===X.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function D9(e,t){switch(t.tagID){case X.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_ROW;break;case X.TH:case X.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,X.TR),e.insertionMode=$.IN_ROW,k9(e,t);break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,v9(e,t));break;default:v9(e,t)}}function O9(e,t){let n=t.tagID;switch(t.tagID){case X.TBODY:case X.TFOOT:case X.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break;case X.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,y9(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:case X.TR:break;default:y9(e,t)}}function k9(e,t){switch(t.tagID){case X.TH:case X.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break;case X.CAPTION:case X.COL:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,D9(e,t));break;default:v9(e,t)}}function A9(e,t){switch(t.tagID){case X.TR:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break;case X.TABLE:e.openElements.hasInTableScope(X.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,O9(e,t));break;case X.TBODY:case X.TFOOT:case X.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(X.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,O9(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:case X.TD:case X.TH:break;default:y9(e,t)}}function Lfe(e,t){let n=t.tagID;w9.has(n)?(e.openElements.hasInTableScope(X.TD)||e.openElements.hasInTableScope(X.TH))&&(e._closeTableCell(),k9(e,t)):p9(e,t)}function Rfe(e,t){let n=t.tagID;switch(n){case X.TD:case X.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break;case X.TABLE:case X.TBODY:case X.TFOOT:case X.THEAD:case X.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),A9(e,t));break;case X.BODY:case X.CAPTION:case X.COL:case X.COLGROUP:case X.HTML:break;default:h9(e,t)}}function j9(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.OPTGROUP:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break;case X.HR:e.openElements.currentTagId===X.OPTION&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.INPUT:case X.KEYGEN:case X.TEXTAREA:case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),t.tagID!==X.SELECT&&e._processStartTag(t));break;case X.SCRIPT:case X.TEMPLATE:t9(e,t);break;default:}}function M9(e,t){switch(t.tagID){case X.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===X.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===X.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===X.OPTGROUP&&e.openElements.pop();break;case X.OPTION:e.openElements.currentTagId===X.OPTION&&e.openElements.pop();break;case X.SELECT:e.openElements.hasInSelectScope(X.SELECT)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode());break;case X.TEMPLATE:n9(e,t);break;default:}}function zfe(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e._processStartTag(t)):j9(e,t)}function Bfe(e,t){let n=t.tagID;n===X.CAPTION||n===X.TABLE||n===X.TBODY||n===X.TFOOT||n===X.THEAD||n===X.TR||n===X.TD||n===X.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(X.SELECT),e._resetInsertionMode(),e.onEndTag(t)):M9(e,t)}function Vfe(e,t){switch(t.tagID){case X.BASE:case X.BASEFONT:case X.BGSOUND:case X.LINK:case X.META:case X.NOFRAMES:case X.SCRIPT:case X.STYLE:case X.TEMPLATE:case X.TITLE:t9(e,t);break;case X.CAPTION:case X.COLGROUP:case X.TBODY:case X.TFOOT:case X.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,v9(e,t);break;case X.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,T9(e,t);break;case X.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,D9(e,t);break;case X.TD:case X.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,k9(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,p9(e,t)}}function Hfe(e,t){t.tagID===X.TEMPLATE&&n9(e,t)}function N9(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(X.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Z7(e,t)}function Ufe(e,t){t.tagID===X.HTML?p9(e,t):F9(e,t)}function P9(e,t){if(t.tagID===X.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===X.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else F9(e,t)}function F9(e,t){e.insertionMode=$.IN_BODY,o9(e,t)}function Wfe(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.FRAMESET:e._insertElement(t,J.HTML);break;case X.FRAME:e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break;case X.NOFRAMES:t9(e,t);break;default:}}function Gfe(e,t){t.tagID===X.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==X.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function Kfe(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.NOFRAMES:t9(e,t);break;default:}}function qfe(e,t){t.tagID===X.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function Jfe(e,t){t.tagID===X.HTML?p9(e,t):I9(e,t)}function I9(e,t){e.insertionMode=$.IN_BODY,o9(e,t)}function Yfe(e,t){switch(t.tagID){case X.HTML:p9(e,t);break;case X.NOFRAMES:t9(e,t);break;default:}}function Xfe(e,t){t.chars=`�`,e._insertCharacters(t)}function Zfe(e,t){e._insertCharacters(t),e.framesetOk=!1}function L9(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Qfe(e,t){if(pde(t))L9(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===J.MATHML?U7(t):r===J.SVG&&(mde(t),W7(t)),G7(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function $fe(e,t){if(t.tagID===X.P||t.tagID===X.BR){L9(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===J.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR]);var epe=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,tpe=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),R9={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function z9(e,t){let n=dpe(e),r=FN(`type`,{handlers:{root:npe,element:rpe,text:ipe,comment:V9,doctype:ape,raw:spe},unknown:cpe}),i={parser:n?new J7(R9):J7.getFragmentParser(void 0,R9),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),H9(i,Ok());let a=fue(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&zj(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function B9(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function npe(e,t){B9(e.children,t)}function rpe(e,t){lpe(e,t),B9(e.children,t),upe(e,t)}function ipe(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:d7.CHARACTER,chars:e.value,location:W9(e)};H9(t,Ok(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ape(e,t){let n={type:d7.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:W9(e)};H9(t,Ok(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ope(e,t){t.stitches=!0;let n=fpe(e);`children`in e&&`children`in n&&(n.children=z9({type:`root`,children:e.children},t.options).children),V9({type:`comment`,value:{stitch:n}},t)}function V9(e,t){let n=e.value,r={type:d7.COMMENT,data:n,location:W9(e)};H9(t,Ok(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function spe(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,U9(t,Ok(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(epe,`&lt;$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function cpe(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ope(n,t);else{let e=``;throw tpe.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function H9(e,t){U9(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=S7.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function U9(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function lpe(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===S7.PLAINTEXT)return;H9(t,Ok(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Z5.html;i===Z5.html&&n===`svg`&&(i=Z5.svg);let a=_ue({...e,children:[]},{space:i===Z5.svg?`svg`:`html`}),o={type:d7.START_TAG,tagName:n,tagID:b7(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:W9(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function upe(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Tue.includes(n)||t.parser.tokenizer.state===S7.PLAINTEXT)return;H9(t,Dk(e));let r={type:d7.END_TAG,tagName:n,tagID:b7(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:W9(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===S7.RCDATA||t.parser.tokenizer.state===S7.RAWTEXT||t.parser.tokenizer.state===S7.SCRIPT_DATA)&&(t.parser.tokenizer.state=S7.DATA)}function dpe(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function W9(e){let t=Ok(e)||{line:void 0,column:void 0,offset:void 0},n=Dk(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function fpe(e){return`children`in e?Cj({...e,children:[]}):Cj(e)}function ppe(e){return function(t,n){return z9(t,{...e,file:n})}}var G9=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],K9={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...G9,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...G9],h2:[[`className`,`sr-only`]],img:[...G9,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...G9,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...G9],table:[...G9],ul:[...G9,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},q9={}.hasOwnProperty;function mpe(e,t){let n={type:`root`,children:[]},r=J9({schema:t?{...K9,...t}:K9,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function J9(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return hpe(e,n);case`doctype`:return gpe(e,n);case`element`:return _pe(e,n);case`root`:return vpe(e,n);case`text`:return ype(e,n);default:}}}function hpe(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Q9(r,t),r}}function gpe(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Q9(e,t),e}}function _pe(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Y9(e,t.children),i=bpe(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&q9.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return Q9(o,t),o}function vpe(e,t){let n={type:`root`,children:Y9(e,t.children)};return Q9(n,t),n}function ype(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Q9(n,t),n}function Y9(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=J9(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function bpe(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&q9.call(r,n)?r[n]:void 0,o=r&&q9.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(q9.call(s,l)){let t=s[l],n=X9(e,$9(a,l),l,t);n??=X9(e,$9(o,l),l,t),n!=null&&(c[l]=n)}if(i&&q9.call(i,n)){let e=i[n];for(l in e)q9.call(e,l)&&!q9.call(c,l)&&(c[l]=e[l])}return c}function X9(e,t,n,r){return t?Array.isArray(r)?xpe(e,t,n,r):Z9(e,t,n,r):void 0}function xpe(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Z9(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Z9(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&Spe(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Spe(e,t,n){let r=e.schema.protocols&&q9.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function Q9(e,t){let n=Ak(t);t.data&&(e.data=Cj(t.data)),n&&(e.position=n)}function $9(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function Cpe(e){return function(t){return mpe(t,e)}}export{fV as $,jl as $n,ux as $t,QZ as A,hne as An,Bw as At,_q as B,Tm as Bn,zC as Bt,O$ as C,S_ as Cn,lO as Ct,aQ as D,a_ as Dn,Uw as Dt,rQ as E,b_ as En,Vw as Et,aY as F,Am as Fn,Yw as Ft,dq as G,au as Gn,IS as Gt,hq as H,Yd as Hn,rC as Ht,oY as I,Em as In,Zw as It,Nq as J,Yl as Jn,FS as Jt,Tq as K,lu as Kn,PS as Kt,lJ as L,Om as Ln,Xw as Lt,oX as M,_ne as Mn,Kw as Mt,iX as N,km as Nn,Rw as Nt,fQ as O,yne as On,qw as Ot,tX as P,kte as Pn,Jw as Pt,vV as Q,Wl as Qn,cx as Qt,cJ as R,Ate as Rn,zw as Rt,k$ as S,h_ as Sn,sO as St,yQ as T,l_ as Tn,Ww as Tt,kq as U,_u as Un,dC as Ut,Cq as V,Dm as Vn,JS as Vt,Lq as W,mu as Wn,tC as Wt,Dq as X,ql as Xn,Wx as Xt,UK as Y,Jl as Yn,Px as Yt,yq as Z,Kl as Zn,Vx as Zt,mce as _,yb as _n,uO as _t,Y5 as a,Kb as an,Wc as ar,Gz as at,j$ as b,r_ as bn,NO as bt,$le as c,db as cn,sc as cr,IM as ct,Jle as d,cb as dn,gee as dr,Ij as dt,Gb as en,Al as er,uV as et,Dle as f,pb as fn,vee as fr,Lj as ft,Sle as g,_b as gn,hO as gt,k5 as h,gb as hn,Wt as hr,aO as ht,J5 as i,Wb as in,Jc as ir,kz as it,uX as j,gne as jn,Gw as jt,iQ as k,vne as kn,Hw as kt,Qle as l,hb as ln,Ha as lr,BM as lt,j5 as m,ob as mn,Jt as mr,WA as mt,ppe as n,Jb as nn,$c as nr,cV as nt,rue as o,fb as on,Oc as or,eI as ot,Ele as p,mb as pn,Yr as pr,Dj as pt,sJ as q,Xl as qn,NS as qt,Z5 as r,qb as rn,Yc as rr,dV as rt,nue as s,lb as sn,pc as sr,HF as st,Cpe as t,Yb as tn,Ol as tr,lV as tt,Yle as u,ub as un,ki as ur,SM as ut,fce as v,vb as vn,jO as vt,_Q as w,d_ as wn,DO as wt,A$ as x,w_ as xn,pO as xt,M$ as y,sb as yn,FO as yt,Fq as z,wm as zn,ew as zt};