@remit/web-client-dist 0.0.696 → 0.0.698

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 (218) hide show
  1. package/assets/{BriefPane-DqAium13.js → BriefPane-OvZiBDtW.js} +1 -1
  2. package/assets/{CalendarEventEditor-53hot8oY.js → CalendarEventEditor-JBfO_GQa.js} +1 -1
  3. package/assets/{CalendarEventPopup-BBlKWgkP.js → CalendarEventPopup-U6Ndkn2v.js} +1 -1
  4. package/assets/{CalendarLoadFailed-D9O_t7aS.js → CalendarLoadFailed-CNaVKDtW.js} +1 -1
  5. package/assets/{CalendarQuickCreate-B39DWHxB.js → CalendarQuickCreate-C-yc6zce.js} +1 -1
  6. package/assets/{CalendarSession-CjGsYSn3.js → CalendarSession-C_XnZoOI.js} +1 -1
  7. package/assets/{CollectionPane-DH6KjfeW.js → CollectionPane-C6EYtyWc.js} +1 -1
  8. package/assets/{DesktopChrome-DrLXNfAF.js → DesktopChrome-DXIJ6wUA.js} +1 -1
  9. package/assets/{DropdownMenu-CgMO6e8h.js → DropdownMenu-DsxemHc4.js} +1 -1
  10. package/assets/{EmptyState-FjON9Ve2.js → EmptyState-Dv8xCRkX.js} +1 -1
  11. package/assets/{ErrorState-DHsQU1XS.js → ErrorState-BptbbJAv.js} +1 -1
  12. package/assets/{FullCompose-karPPSLh.js → FullCompose-BGLjrGst.js} +1 -1
  13. package/assets/{LabelApplyTrigger-BLIxuWTi.js → LabelApplyTrigger-DzgVUcax.js} +1 -1
  14. package/assets/{MailShell-jW6JmRUB.js → MailShell-DE0ZN2ct.js} +1 -1
  15. package/assets/{MailViewChrome-By52WjOW.js → MailViewChrome-DoBZYTxQ.js} +1 -1
  16. package/assets/MailboxPane-CxaGFC0R.js +135 -0
  17. package/assets/{MessageBody-bibpHbC1.js → MessageBody-BYYCZieC.js} +1 -1
  18. package/assets/MessageToolbar-CnhMX7Ap.js +1 -0
  19. package/assets/{NavMenuButton-DMqlg3at.js → NavMenuButton-B28Nb9kR.js} +1 -1
  20. package/assets/{OnboardingWizard-BVm-45mM.js → OnboardingWizard-dQ9c99Ni.js} +1 -1
  21. package/assets/{OutboxPane-BwIG-6n1.js → OutboxPane-ByJt4RDv.js} +1 -1
  22. package/assets/{ReportLink-DbjCeZ9_.js → ReportLink-D0tCso5T.js} +1 -1
  23. package/assets/_calendarObjectId-DA9THlEZ.js +1 -0
  24. package/assets/_labelId-QQEJSaaH.js +1 -0
  25. package/assets/_mailboxId-CjHcitFP.js +1 -0
  26. package/assets/_messageId-BR_TgwKr.js +1 -0
  27. package/assets/_messageId-CAxQBVFC.js +1 -0
  28. package/assets/_messageId-CO7AhNVu.js +1 -0
  29. package/assets/_messageId-D0sfforj.js +1 -0
  30. package/assets/_outboxMessageId-CuYUqctH.js +1 -0
  31. package/assets/_recurrenceId-CLQuwNQw.js +1 -0
  32. package/assets/{_slotId-ipxsVzxt.js → _slotId-BgSRkGdw.js} +1 -1
  33. package/assets/_threadId-BGKDrxuA.js +1 -0
  34. package/assets/_threadId-Ba8E2aAx.js +1 -0
  35. package/assets/_threadId-Br_FU4M4.js +1 -0
  36. package/assets/_threadId-D9ge4hnK.js +1 -0
  37. package/assets/_view._date-BCOouUgc.js +1 -0
  38. package/assets/{account-service-status-jau7OHM-.js → account-service-status-C6hq8flJ.js} +1 -1
  39. package/assets/{accounts-Dv0XYTrh.js → accounts-B2HAE5Mp.js} +1 -1
  40. package/assets/{advanced-Co1jIx2-.js → advanced-BBWKSR4H.js} +1 -1
  41. package/assets/{agenda-time--0lz2pGX.js → agenda-time-C9jExuVe.js} +1 -1
  42. package/assets/{app-chrome-BtWv1mrl.js → app-chrome-CS-vT-4r.js} +1 -1
  43. package/assets/{appearance-CIaVIf5W.js → appearance-oUeDfZvm.js} +1 -1
  44. package/assets/{avatar-BLhNXW-W.js → avatar-B60PZejm.js} +1 -1
  45. package/assets/{badge-CoJzTE5F.js → badge-DYFkBshe.js} +1 -1
  46. package/assets/{bottom-sheet-BSnl2giv.js → bottom-sheet-B0y_-mKC.js} +1 -1
  47. package/assets/brief--Wmhw18k.js +1 -0
  48. package/assets/{brief-BIpUj9JN.js → brief-DBLwMpYO.js} +1 -1
  49. package/assets/{calendar-B4zVNn1v.js → calendar-Cf7D8za1.js} +1 -1
  50. package/assets/{calendar-BRsmtlld.js → calendar-DON3hXqq.js} +1 -1
  51. package/assets/{calendar-event-popup-DsOb1y1u.js → calendar-event-popup-BqE6svk6.js} +1 -1
  52. package/assets/{calendar-event-sidebar-Bi4U7yon.js → calendar-event-sidebar-BGvCPmWa.js} +1 -1
  53. package/assets/{calendar-failure-note-DlpRkxBL.js → calendar-failure-note-sEjmPcbo.js} +1 -1
  54. package/assets/{calendar-guests-BQoxXEOG.js → calendar-guests-CuFcAD3k.js} +1 -1
  55. package/assets/{calendar-suggestion-CJMwfDpf.js → calendar-suggestion-CZ6ssHct.js} +1 -1
  56. package/assets/calendars-9OZeuRv6.js +1 -0
  57. package/assets/{card-CAuqZLKK.js → card-13z0qC0r.js} +1 -1
  58. package/assets/{checkbox-ImKY_DpK.js → checkbox-ZdvWSWRN.js} +1 -1
  59. package/assets/{chevron-down-CHMH78GK.js → chevron-down-wpFtElCn.js} +1 -1
  60. package/assets/{chevron-left-Brxnh-p_.js → chevron-left-HeNgNNR2.js} +1 -1
  61. package/assets/{circle-check-bdTVfKb7.js → circle-check-Q9IHsvBp.js} +1 -1
  62. package/assets/{circle-check-big-D7T0Fr-Y.js → circle-check-big-C2cm1OoH.js} +1 -1
  63. package/assets/{circle-question-mark-BJ-7TUgf.js → circle-question-mark-CYsyue28.js} +1 -1
  64. package/assets/{classification-IsZmGA3c.js → classification-BxsZLEnC.js} +1 -1
  65. package/assets/{clock-CcJSq9G-.js → clock-D8a14yMJ.js} +1 -1
  66. package/assets/{cloud-off-KCT2nWKe.js → cloud-off-I2wH-wZi.js} +1 -1
  67. package/assets/compose._-_outboxMessageId_-BGkih4eY.js +1 -0
  68. package/assets/compose._-_outboxMessageId_-CivLnC_Q.js +1 -0
  69. package/assets/compose._-_outboxMessageId_-DhaK6pb5.js +1 -0
  70. package/assets/compose._-_outboxMessageId_-cX-iEK_S.js +1 -0
  71. package/assets/compose._-_outboxMessageId_-nFk2BCjJ.js +1 -0
  72. package/assets/{config-import-CDPSmiwE.js → config-import-DTqOa38a.js} +1 -1
  73. package/assets/{confirm-dialog-Nw9MwHVJ.js → confirm-dialog-CsttDS5u.js} +1 -1
  74. package/assets/{copy-CBfiykpW.js → copy-V6gKiItu.js} +1 -1
  75. package/assets/{credential-steps-DijGQsa7.js → credential-steps-BPun50HH.js} +1 -1
  76. package/assets/{download-BGcYYhWw.js → download-CHIm9QMw.js} +1 -1
  77. package/assets/{draft-BIlfX99J.js → draft-CUl68Y86.js} +1 -1
  78. package/assets/edit-CO4QGWtB.js +1 -0
  79. package/assets/edit-DRr0H801.js +1 -0
  80. package/assets/{external-link-D7g7AAZP.js → external-link-DinDD_TS.js} +1 -1
  81. package/assets/{file-braces-GrxXAr-8.js → file-braces-DSnr6-a7.js} +1 -1
  82. package/assets/filters-BOpD_izN.js +1 -0
  83. package/assets/flagged-BLzcJrUz.js +1 -0
  84. package/assets/{flagged-B833_7J0.js → flagged-Cj4ARwpT.js} +1 -1
  85. package/assets/folder-failure-BphZCUyZ.js +1 -0
  86. package/assets/{folder-input-uYHmZSIB.js → folder-input-BqAxe_6s.js} +1 -1
  87. package/assets/folders-NwCVYN5L.js +1 -0
  88. package/assets/{help-copy-DWTmr8ZJ.js → help-copy-EtAi1Aq7.js} +1 -1
  89. package/assets/{import-S0-kKNSZ.js → import-DJMjk1Ri.js} +1 -1
  90. package/assets/index-6MdUWIJB.js +1 -0
  91. package/assets/index-B3pRGruo.js +1 -0
  92. package/assets/index-BDF8UTpu.js +1 -0
  93. package/assets/{index-Baytk5ez.js → index-BQ2vE6gp.js} +4 -4
  94. package/assets/index-BoKIe_Hw.js +1 -0
  95. package/assets/index-CKFdaY9c.js +222 -0
  96. package/assets/index-CO7AhNVu.js +1 -0
  97. package/assets/index-CR5Op_4t.js +1 -0
  98. package/assets/index-D0sfforj.js +1 -0
  99. package/assets/index-DLuz5acm.js +1 -0
  100. package/assets/index-DqCcXbbs.js +1 -0
  101. package/assets/index-GZXGsbCN.js +1 -0
  102. package/assets/index-PBPFqVVA.js +1 -0
  103. package/assets/index-h2rbe_XB.js +1 -0
  104. package/assets/{kbd-BD-ER_Yv.js → kbd-qpWA48X9.js} +1 -1
  105. package/assets/{label-chip-D6mHiJlY.js → label-chip-zwUAXSWu.js} +1 -1
  106. package/assets/labels-CwGUliq_.js +1 -0
  107. package/assets/list-pages-BCUbyyea.js +1 -0
  108. package/assets/mail-B-_K5JCo.js +1 -0
  109. package/assets/{mail-DZhnB5_L.js → mail-Bsgov7FY.js} +1 -1
  110. package/assets/{menu-BQAGsNoE.js → menu-CKmdL0us.js} +1 -1
  111. package/assets/{nav-link-BaRr8ufx.js → nav-link-YOSchPy9.js} +1 -1
  112. package/assets/new-DKJdGwfE.js +1 -0
  113. package/assets/{onboarding-completion-CEthyLI-.js → onboarding-completion-cX9HM-aL.js} +1 -1
  114. package/assets/onboarding-pnezHKXj.js +1 -0
  115. package/assets/outbox-CLnMeXYO.js +1 -0
  116. package/assets/{pencil-Dp-S5che.js → pencil-C6KO5975.js} +1 -1
  117. package/assets/{people-CFuQvhz_.js → people-BhhvdCU4.js} +1 -1
  118. package/assets/{plus-ivySO7aD.js → plus-DsSkq30M.js} +1 -1
  119. package/assets/{popover-menu-CNRsrfGN.js → popover-menu-DP-hyKpu.js} +1 -1
  120. package/assets/{refresh-cw-D43K-uJ_.js → refresh-cw-CCcTeH3S.js} +1 -1
  121. package/assets/{reply-CdhmgK8D.js → reply-SkF_KCOk.js} +1 -1
  122. package/assets/{rich-text-BNnd4RhC.js → rich-text-By6rXXKy.js} +1 -1
  123. package/assets/{rich-text-spellcheck-worker-provider-D35wa69O.js → rich-text-spellcheck-worker-provider-DQbI8hMR.js} +1 -1
  124. package/assets/{rotate-ccw-DY-C3cnl.js → rotate-ccw-lh0BmpDo.js} +1 -1
  125. package/assets/{roving-focus-CfNxjWPW.js → roving-focus-DlzLpO4G.js} +1 -1
  126. package/assets/{row-actions-DMyxcQFg.js → row-actions-0g39M7ib.js} +1 -1
  127. package/assets/{search-mirror-PLEys8yY.js → search-mirror-D9nwr5km.js} +1 -1
  128. package/assets/{search-scope-DowTds7f.js → search-scope-DNDpRNp9.js} +1 -1
  129. package/assets/{search-token-index-Qe9FLPUx.js → search-token-index-cy3uaYXm.js} +1 -1
  130. package/assets/{sections-aErIO9A7.js → sections-ZsRsk30_.js} +1 -1
  131. package/assets/{segmented-control-CZRUmZT-.js → segmented-control-CeqFpYfk.js} +1 -1
  132. package/assets/{select-Bar5gCGO.js → select-yGv73aji.js} +1 -1
  133. package/assets/senders-lMWjFLIX.js +1 -0
  134. package/assets/settings-C8z99CK0.js +1 -0
  135. package/assets/{settings-screen-DjVJZ-eS.js → settings-screen-C8z8YwuM.js} +1 -1
  136. package/assets/{shield-check-C-ddv9so.js → shield-check-CIZoP3AE.js} +1 -1
  137. package/assets/spam-D6paxCM2.js +1 -0
  138. package/assets/{suggest-list-BU1CAWaS.js → suggest-list-czu9q5H4.js} +1 -1
  139. package/assets/{suggested-vips-CVTKxBdO.js → suggested-vips-DXCCMmOn.js} +1 -1
  140. package/assets/suggestion._suggestionId-zlbObxkn.js +1 -0
  141. package/assets/{switch-C60zzRNi.js → switch-BezKd3gx.js} +1 -1
  142. package/assets/task._calendarTaskId-CgBc-n43.js +1 -0
  143. package/assets/{undo-2-D6HzUJ41.js → undo-2-CgG5m84e.js} +1 -1
  144. package/assets/{useCalendarData-n3x_s1Nb.js → useCalendarData-CgRGDHYQ.js} +1 -1
  145. package/assets/{useCalendarScheduling-B3bHM8TC.js → useCalendarScheduling-BhFuxgru.js} +1 -1
  146. package/assets/useCalendarSuggestions-BaIFwYBZ.js +1 -0
  147. package/assets/{useCalendarTasks-CC9jcVTp.js → useCalendarTasks-CnP7DfUR.js} +1 -1
  148. package/assets/{useClassificationSettings-DDXeuHc9.js → useClassificationSettings-Bk89yu99.js} +1 -1
  149. package/assets/{useCollectionThreads-bR-HQDXT.js → useCollectionThreads-BMsppZhN.js} +1 -1
  150. package/assets/{useDebouncedValue-nIbP08sa.js → useDebouncedValue-BpDHcfPe.js} +1 -1
  151. package/assets/{useFilters-C3QPNclJ.js → useFilters-Cv2IfE4J.js} +1 -1
  152. package/assets/{useInfiniteQuery-CneHLmnO.js → useInfiniteQuery-DwTTxcsy.js} +1 -1
  153. package/assets/{useJunkMailboxIds-BCvLXlA_.js → useJunkMailboxIds-CDFS8XJA.js} +1 -1
  154. package/assets/useLabels-BIArT792.js +1 -0
  155. package/assets/{useLayoutTier-c01ZWqQ0.js → useLayoutTier-Y7Z9Nnsm.js} +1 -1
  156. package/assets/{useMediaQuery-BL50IiYB.js → useMediaQuery-CjE8xNMz.js} +1 -1
  157. package/assets/{useMessageBodyContent-DdX1ZZwR.js → useMessageBodyContent-D5mskS3v.js} +1 -1
  158. package/assets/{useQueries-B2w-f15M.js → useQueries-CQ_R-NWg.js} +1 -1
  159. package/assets/{useRefreshControl-C-8PJltS.js → useRefreshControl-DwtRYeei.js} +1 -1
  160. package/assets/{useResultFolderIndex-BTY9xXDW.js → useResultFolderIndex-ZNSoZByc.js} +1 -1
  161. package/assets/{useSignature-DQ-8mjVB.js → useSignature-CnLh1XFv.js} +1 -1
  162. package/assets/{warnings-iL5faBYa.js → warnings-zZSUr-_I.js} +1 -1
  163. package/index.html +2 -2
  164. package/package.json +1 -1
  165. package/assets/MailboxPane-dO1WtQIE.js +0 -135
  166. package/assets/MessageToolbar-BK8iddsy.js +0 -1
  167. package/assets/_calendarObjectId-DcrqQ1pT.js +0 -1
  168. package/assets/_labelId-B-uoAJUi.js +0 -1
  169. package/assets/_mailboxId-B_BsU1d4.js +0 -1
  170. package/assets/_messageId-BBhFHooJ.js +0 -1
  171. package/assets/_messageId-BC4E5AdD.js +0 -1
  172. package/assets/_messageId-BFceTya0.js +0 -1
  173. package/assets/_messageId-CaLvmUYl.js +0 -1
  174. package/assets/_outboxMessageId-D3RH7suq.js +0 -1
  175. package/assets/_recurrenceId-BmFnTbJZ.js +0 -1
  176. package/assets/_threadId-BdAvQAKq.js +0 -1
  177. package/assets/_threadId-Ok6MuUb2.js +0 -1
  178. package/assets/_threadId-PwztExmU.js +0 -1
  179. package/assets/_threadId-oAltpOkl.js +0 -1
  180. package/assets/_view._date-kxLdB_iw.js +0 -1
  181. package/assets/brief-E24hWVP8.js +0 -1
  182. package/assets/calendars-0hXvo4Yo.js +0 -1
  183. package/assets/compose._-_outboxMessageId_-5h4Thyui.js +0 -1
  184. package/assets/compose._-_outboxMessageId_-CG67dlL2.js +0 -1
  185. package/assets/compose._-_outboxMessageId_-Dm_l3weH.js +0 -1
  186. package/assets/compose._-_outboxMessageId_-TYmtS11N.js +0 -1
  187. package/assets/compose._-_outboxMessageId_-wdQo3fol.js +0 -1
  188. package/assets/edit-DPWo7v-f.js +0 -1
  189. package/assets/edit-DZEKnuQ0.js +0 -1
  190. package/assets/filters-DfUsL7bX.js +0 -1
  191. package/assets/flagged-zsMPG8wt.js +0 -1
  192. package/assets/folder-failure-CqkVSsrb.js +0 -1
  193. package/assets/folders-B2KHLLXQ.js +0 -1
  194. package/assets/index-9QMShYZC.js +0 -213
  195. package/assets/index-BBhFHooJ.js +0 -1
  196. package/assets/index-BC4E5AdD.js +0 -1
  197. package/assets/index-BeYdWLSr.js +0 -1
  198. package/assets/index-BlWjdYaS.js +0 -1
  199. package/assets/index-CgyMBBs4.js +0 -1
  200. package/assets/index-D2U9KSTT.js +0 -1
  201. package/assets/index-DB540_Zp.js +0 -1
  202. package/assets/index-DX3L0os1.js +0 -1
  203. package/assets/index-DwKXH-XS.js +0 -1
  204. package/assets/index-dE8tDfaV.js +0 -1
  205. package/assets/index-gg1vreMW.js +0 -1
  206. package/assets/index-opRNV15g.js +0 -1
  207. package/assets/labels-SmD1KE3F.js +0 -1
  208. package/assets/mail-AiBxTd_5.js +0 -1
  209. package/assets/new-CBzvvAzX.js +0 -1
  210. package/assets/onboarding-Boe7D95J.js +0 -1
  211. package/assets/outbox-BqHfAcnr.js +0 -1
  212. package/assets/senders-6bWn5dUX.js +0 -1
  213. package/assets/settings-BfuOXGy8.js +0 -1
  214. package/assets/spam-CfM26JXy.js +0 -1
  215. package/assets/suggestion._suggestionId-LOmWNAzV.js +0 -1
  216. package/assets/task._calendarTaskId-CwbcSZL4.js +0 -1
  217. package/assets/useCalendarSuggestions-dbmN8tRh.js +0 -1
  218. package/assets/useLabels-BiYidhrJ.js +0 -1
@@ -0,0 +1,222 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/calendar-Cf7D8za1.js","assets/DesktopChrome-DXIJ6wUA.js","assets/useLayoutTier-Y7Z9Nnsm.js","assets/useMediaQuery-CjE8xNMz.js","assets/nav-link-YOSchPy9.js","assets/reply-SkF_KCOk.js","assets/sections-ZsRsk30_.js","assets/avatar-B60PZejm.js","assets/popover-menu-DP-hyKpu.js","assets/roving-focus-DlzLpO4G.js","assets/mail-Bsgov7FY.js","assets/app-chrome-CS-vT-4r.js","assets/calendar-DON3hXqq.js","assets/ErrorState-BptbbJAv.js","assets/import-DJMjk1Ri.js","assets/credential-steps-BPun50HH.js","assets/select-yGv73aji.js","assets/chevron-down-wpFtElCn.js","assets/badge-DYFkBshe.js","assets/card-13z0qC0r.js","assets/config-import-DTqOa38a.js","assets/file-braces-DSnr6-a7.js","assets/onboarding-completion-cX9HM-aL.js","assets/mail-B-_K5JCo.js","assets/useMessageBodyContent-D5mskS3v.js","assets/pencil-C6KO5975.js","assets/MailShell-DE0ZN2ct.js","assets/FullCompose-BGLjrGst.js","assets/index-BQ2vE6gp.js","assets/useSignature-CnLh1XFv.js","assets/account-form-helpers-DhckT_PN.js","assets/useDebouncedValue-BpDHcfPe.js","assets/suggest-list-czu9q5H4.js","assets/confirm-dialog-CsttDS5u.js","assets/search-scope-DNDpRNp9.js","assets/useRefreshControl-DwtRYeei.js","assets/circle-check-big-C2cm1OoH.js","assets/refresh-cw-CCcTeH3S.js","assets/useQueries-CQ_R-NWg.js","assets/search-token-index-cy3uaYXm.js","assets/useLabels-BIArT792.js","assets/list-pages-BCUbyyea.js","assets/menu-CKmdL0us.js","assets/useResultFolderIndex-ZNSoZByc.js","assets/useCollectionThreads-BMsppZhN.js","assets/useInfiniteQuery-DwTTxcsy.js","assets/folder-failure-BphZCUyZ.js","assets/outbox-status-BlKn6P0x.js","assets/account-service-status-C6hq8flJ.js","assets/kbd-qpWA48X9.js","assets/onboarding-pnezHKXj.js","assets/OnboardingWizard-dQ9c99Ni.js","assets/checkbox-ZdvWSWRN.js","assets/_mailboxId-CjHcitFP.js","assets/MailboxPane-CxaGFC0R.js","assets/MessageToolbar-CnhMX7Ap.js","assets/MessageBody-BYYCZieC.js","assets/useJunkMailboxIds-CDFS8XJA.js","assets/undo-2-CgG5m84e.js","assets/DropdownMenu-DsxemHc4.js","assets/download-CHIm9QMw.js","assets/EmptyState-Dv8xCRkX.js","assets/circle-question-mark-CYsyue28.js","assets/useFilters-Cv2IfE4J.js","assets/plus-DsSkq30M.js","assets/calendar-suggestion-CZ6ssHct.js","assets/useCalendarSuggestions-BaIFwYBZ.js","assets/agenda-time-C9jExuVe.js","assets/calendar-format-BwCpz-JZ.js","assets/calendar-failure-note-sEjmPcbo.js","assets/clock-D8a14yMJ.js","assets/segmented-control-CeqFpYfk.js","assets/folder-input-BqAxe_6s.js","assets/label-chip-zwUAXSWu.js","assets/cloud-off-I2wH-wZi.js","assets/LabelApplyTrigger-DzgVUcax.js","assets/MailViewChrome-DoBZYTxQ.js","assets/NavMenuButton-B28Nb9kR.js","assets/shield-check-CIZoP3AE.js","assets/bottom-sheet-B0y_-mKC.js","assets/circle-check-Q9IHsvBp.js","assets/search-mirror-D9nwr5km.js","assets/brief-DBLwMpYO.js","assets/brief--Wmhw18k.js","assets/BriefPane-OvZiBDtW.js","assets/wizard-selection-zWa1qc6-.js","assets/flagged-Cj4ARwpT.js","assets/flagged-BLzcJrUz.js","assets/CollectionPane-C6EYtyWc.js","assets/outbox-CLnMeXYO.js","assets/OutboxPane-ByJt4RDv.js","assets/row-actions-0g39M7ib.js","assets/rotate-ccw-lh0BmpDo.js","assets/_slotId-BgSRkGdw.js","assets/settings-screen-C8z8YwuM.js","assets/chevron-left-HeNgNNR2.js","assets/accounts-B2HAE5Mp.js","assets/switch-BezKd3gx.js","assets/help-copy-EtAi1Aq7.js","assets/advanced-BBWKSR4H.js","assets/external-link-DinDD_TS.js","assets/appearance-oUeDfZvm.js","assets/calendars-9OZeuRv6.js","assets/useCalendarScheduling-BhFuxgru.js","assets/calendar-guests-CuFcAD3k.js","assets/calendar-event-popup-BqE6svk6.js","assets/copy-V6gKiItu.js","assets/classification-BxsZLEnC.js","assets/useClassificationSettings-Bk89yu99.js","assets/ReportLink-D0tCso5T.js","assets/filters-BOpD_izN.js","assets/folders-NwCVYN5L.js","assets/labels-CwGUliq_.js","assets/people-BhhvdCU4.js","assets/senders-lMWjFLIX.js","assets/spam-D6paxCM2.js","assets/warnings-zZSUr-_I.js","assets/_view._date-BCOouUgc.js","assets/useCalendarTasks-CnP7DfUR.js","assets/useCalendarData-CgRGDHYQ.js","assets/CalendarLoadFailed-CNaVKDtW.js","assets/CalendarQuickCreate-C-yc6zce.js","assets/draft-CUl68Y86.js","assets/CalendarSession-C_XnZoOI.js","assets/_view-CtgngRpB.css","assets/index-BoKIe_Hw.js","assets/index-h2rbe_XB.js","assets/index-6MdUWIJB.js","assets/_labelId-QQEJSaaH.js","assets/index-PBPFqVVA.js","assets/new-DKJdGwfE.js","assets/CalendarEventEditor-JBfO_GQa.js","assets/calendar-event-sidebar-BGvCPmWa.js","assets/index-CO7AhNVu.js","assets/_messageId-CO7AhNVu.js","assets/compose._-_outboxMessageId_-CivLnC_Q.js","assets/index-D0sfforj.js","assets/_messageId-D0sfforj.js","assets/compose._-_outboxMessageId_-BGkih4eY.js","assets/index-CR5Op_4t.js","assets/_messageId-BR_TgwKr.js","assets/compose._-_outboxMessageId_-nFk2BCjJ.js","assets/index-DqCcXbbs.js","assets/compose._-_outboxMessageId_-cX-iEK_S.js","assets/_outboxMessageId-CuYUqctH.js","assets/index-GZXGsbCN.js","assets/CalendarEventPopup-U6Ndkn2v.js","assets/edit-DRr0H801.js","assets/suggestion._suggestionId-zlbObxkn.js","assets/task._calendarTaskId-CgBc-n43.js","assets/index-BDF8UTpu.js","assets/_messageId-CAxQBVFC.js","assets/compose._-_outboxMessageId_-DhaK6pb5.js","assets/index-DLuz5acm.js","assets/edit-CO4QGWtB.js"])))=>i.map(i=>d[i]);
2
+ function XL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();var Mp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K0={exports:{}},md={};var sM;function Gq(){if(sM)return md;sM=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,a){var l=null;if(a!==void 0&&(l=""+a),o.key!==void 0&&(l=""+o.key),"key"in o){a={};for(var c in o)c!=="key"&&(a[c]=o[c])}else a=o;return o=a.ref,{$$typeof:e,type:r,key:l,ref:o!==void 0?o:null,props:a}}return md.Fragment=t,md.jsx=n,md.jsxs=n,md}var iM;function Kq(){return iM||(iM=1,K0.exports=Gq()),K0.exports}var R=Kq();const Zq="Logging",Yq="x-amz-user-agent",Qq="NoHubcallbackProvidedException";var Tr;(function(e){e.DEBUG="DEBUG",e.ERROR="ERROR",e.INFO="INFO",e.WARN="WARN",e.VERBOSE="VERBOSE",e.NONE="NONE"})(Tr||(Tr={}));const lM={VERBOSE:1,DEBUG:2,INFO:3,WARN:4,ERROR:5,NONE:6};class $n{constructor(t,n=Tr.WARN){this.name=t,this.level=n,this._pluggables=[]}_padding(t){return t<10?"0"+t:""+t}_ts(){const t=new Date;return[this._padding(t.getMinutes()),this._padding(t.getSeconds())].join(":")+"."+t.getMilliseconds()}configure(t){return t?(this._config=t,this._config):this._config}_log(t,...n){let r=this.level;$n.LOG_LEVEL&&(r=$n.LOG_LEVEL),typeof window<"u"&&window.LOG_LEVEL&&(r=window.LOG_LEVEL);const o=lM[r];if(!(lM[t]>=o))return;let l=console.log.bind(console);t===Tr.ERROR&&console.error&&(l=console.error.bind(console)),t===Tr.WARN&&console.warn&&(l=console.warn.bind(console)),$n.BIND_ALL_LOG_LEVELS&&(t===Tr.INFO&&console.info&&(l=console.info.bind(console)),t===Tr.DEBUG&&console.debug&&(l=console.debug.bind(console)));const c=`[${t}] ${this._ts()} ${this.name}`;let d="";if(n.length===1&&typeof n[0]=="string")d=`${c} - ${n[0]}`,l(d);else if(n.length===1)d=`${c} ${n[0]}`,l(c,n[0]);else if(typeof n[0]=="string"){let f=n.slice(1);f.length===1&&(f=f[0]),d=`${c} - ${n[0]} ${f}`,l(`${c} - ${n[0]}`,f)}else d=`${c} ${n}`,l(c,n);for(const f of this._pluggables){const p={message:d,timestamp:Date.now()};f.pushLogs([p])}}log(...t){this._log(Tr.INFO,...t)}info(...t){this._log(Tr.INFO,...t)}warn(...t){this._log(Tr.WARN,...t)}error(...t){this._log(Tr.ERROR,...t)}debug(...t){this._log(Tr.DEBUG,...t)}verbose(...t){this._log(Tr.VERBOSE,...t)}addPluggable(t){t&&t.getCategoryName()===Zq&&(this._pluggables.push(t),t.configure(this._config))}listPluggables(){return this._pluggables}}$n.LOG_LEVEL=null;$n.BIND_ALL_LOG_LEVELS=!1;class dr extends Error{constructor({message:t,name:n,recoverySuggestion:r,underlyingError:o,metadata:a}){if(super(t),this.name=n,this.underlyingError=o,this.recoverySuggestion=r,a){const{extendedRequestId:l,httpStatusCode:c,requestId:d}=a;this.metadata={extendedRequestId:l,httpStatusCode:c,requestId:d}}this.constructor=dr,Object.setPrototypeOf(this,dr.prototype)}}var Ns;(function(e){e.NoEndpointId="NoEndpointId",e.PlatformNotSupported="PlatformNotSupported",e.Unknown="Unknown",e.NetworkError="NetworkError"})(Ns||(Ns={}));const Wg=(e,t=dr)=>(n,r,o)=>{const{message:a,recoverySuggestion:l}=e[r];if(!n)throw new t({name:r,message:o?`${a} ${o}`:a,recoverySuggestion:l})},Do=typeof Symbol<"u"?Symbol("amplify_default"):"@@amplify_default",gd=new $n("Hub");class JL{constructor(t){this.listeners=new Map,this.protectedChannels=["core","auth","api","analytics","interactions","pubsub","storage","ui","xr"],this.name=t}_remove(t,n){const r=this.listeners.get(t);if(!r){gd.warn(`No listeners for ${t}`);return}this.listeners.set(t,[...r.filter(({callback:o})=>o!==n)])}dispatch(t,n,r,o){typeof t=="string"&&this.protectedChannels.indexOf(t)>-1&&(o===Do||gd.warn(`WARNING: ${t} is protected and dispatching on it can have unintended consequences`));const a={channel:t,payload:{...n},source:r,patternInfo:[]};try{this._toListeners(a)}catch(l){gd.error(l)}}listen(t,n,r="noname"){let o;if(typeof n!="function")throw new dr({name:Qq,message:"No callback supplied to Hub"});o=n;let a=this.listeners.get(t);return a||(a=[],this.listeners.set(t,a)),a.push({name:r,callback:o}),()=>{this._remove(t,o)}}_toListeners(t){const{channel:n,payload:r}=t,o=this.listeners.get(n);o&&o.forEach(a=>{gd.debug(`Dispatching to ${n} with `,r);try{a.callback(t)}catch(l){gd.error(l)}})}}const Lo=new JL("__default__"),Zm=new JL("internal-hub"),y_=()=>{if(typeof window=="object"&&typeof window.crypto=="object")return window.crypto;if(typeof crypto=="object")return crypto;throw new dr({name:"MissingPolyfill",message:"Cannot resolve the `crypto` function from the environment."})},Xq=()=>{if(typeof window<"u"&&typeof window.btoa=="function")return window.btoa;if(typeof btoa=="function")return btoa;throw new dr({name:"Base64EncoderError",message:"Cannot resolve the `btoa` function from the environment."})},Jq=()=>{if(typeof window<"u"&&typeof window.atob=="function")return window.atob;if(typeof atob=="function")return atob;throw new dr({name:"Base64EncoderError",message:"Cannot resolve the `atob` function from the environment."})},b_={convert(e,t){let n=e;return t?.urlSafe&&(n=n.replace(/-/g,"+").replace(/_/g,"/")),Jq()(n)}};var No;(function(e){e.AuthTokenConfigException="AuthTokenConfigException",e.AuthUserPoolAndIdentityPoolException="AuthUserPoolAndIdentityPoolException",e.AuthUserPoolException="AuthUserPoolException",e.InvalidIdentityPoolIdException="InvalidIdentityPoolIdException",e.OAuthNotConfigureException="OAuthNotConfigureException"})(No||(No={}));const eV={[No.AuthTokenConfigException]:{message:"Auth Token Provider not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app."},[No.AuthUserPoolAndIdentityPoolException]:{message:"Auth UserPool or IdentityPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with UserPoolId and IdentityPoolId."},[No.AuthUserPoolException]:{message:"Auth UserPool not configured.",recoverySuggestion:"Make sure to call Amplify.configure in your app with userPoolId and userPoolClientId."},[No.InvalidIdentityPoolIdException]:{message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."},[No.OAuthNotConfigureException]:{message:"oauth param not configured.",recoverySuggestion:"Make sure to call Amplify.configure with oauth parameter in your app."}},S_=Wg(eV);function nt(e){let t=!0;e?t=!!e.userPoolId&&!!e.userPoolClientId:t=!1,S_(t,No.AuthUserPoolException)}function Gg(e){const t=!!e?.loginWith?.oauth?.domain&&!!e?.loginWith?.oauth?.redirectSignOut&&!!e?.loginWith?.oauth?.redirectSignIn&&!!e?.loginWith?.oauth?.responseType;S_(t,No.OAuthNotConfigureException)}function xm(e){const t=!!e?.identityPoolId;S_(t,No.InvalidIdentityPoolIdException)}function Ia(e){const t=e.split(".");if(t.length!==3)throw new Error("Invalid token");try{const r=t[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(b_.convert(r).split("").map(l=>`%${`00${l.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")),a=JSON.parse(o);return{toString:()=>e,payload:a}}catch{throw new Error("Invalid token payload")}}const e6=e=>{const t=Reflect.ownKeys(e);for(const n of t){const r=e[n];(r&&typeof r=="object"||typeof r=="function")&&e6(r)}return Object.freeze(e)},tV=new $n("parseAWSExports"),nV={API_KEY:"apiKey",AWS_IAM:"iam",AMAZON_COGNITO_USER_POOLS:"userPool",OPENID_CONNECT:"oidc",NONE:"none",AWS_LAMBDA:"lambda",LAMBDA:"lambda"},rV=(e={})=>{if(!Object.prototype.hasOwnProperty.call(e,"aws_project_region"))throw new dr({name:"InvalidParameterException",message:"Invalid config parameter.",recoverySuggestion:"Ensure passing the config object imported from `amplifyconfiguration.json`."});const{aws_appsync_apiKey:t,aws_appsync_authenticationType:n,aws_appsync_graphqlEndpoint:r,aws_appsync_region:o,aws_bots_config:a,aws_cognito_identity_pool_id:l,aws_cognito_sign_up_verification_method:c,aws_cognito_mfa_configuration:d,aws_cognito_mfa_types:f,aws_cognito_password_protection_settings:p,aws_cognito_verification_mechanisms:m,aws_cognito_signup_attributes:g,aws_cognito_social_providers:v,aws_cognito_username_attributes:S,aws_mandatory_sign_in:C,aws_mobile_analytics_app_id:w,aws_mobile_analytics_app_region:x,aws_user_files_s3_bucket:I,aws_user_files_s3_bucket_region:T,aws_user_files_s3_dangerously_connect_to_http_endpoint_for_testing:O,aws_user_pools_id:D,aws_user_pools_web_client_id:P,geo:M,oauth:L,predictions:z,aws_cloud_logic_custom:G,Notifications:j,modelIntrospection:F}=e,q={};w&&(q.Analytics={Pinpoint:{appId:w,region:x}});const{InAppMessaging:X,Push:Se}=j??{};if(X?.AWSPinpoint||Se?.AWSPinpoint){if(X?.AWSPinpoint){const{appId:ce,region:be}=X.AWSPinpoint;q.Notifications={InAppMessaging:{Pinpoint:{appId:ce,region:be}}}}if(Se?.AWSPinpoint){const{appId:ce,region:be}=Se.AWSPinpoint;q.Notifications={...q.Notifications,PushNotification:{Pinpoint:{appId:ce,region:be}}}}}if(Array.isArray(a)&&(q.Interactions={LexV1:Object.fromEntries(a.map(ce=>[ce.name,ce]))}),r){const ce=nV[n];ce||tV.debug(`Invalid authentication type ${n}. Falling back to IAM.`),q.API={GraphQL:{endpoint:r,apiKey:t,region:o,defaultAuthMode:ce??"iam"}},F&&(q.API.GraphQL.modelIntrospection=F)}const W=d?{status:d&&d.toLowerCase(),totpEnabled:f?.includes("TOTP")??!1,smsEnabled:f?.includes("SMS")??!1}:void 0,ee=p?{minLength:p.passwordPolicyMinLength,requireLowercase:p.passwordPolicyCharacters?.includes("REQUIRES_LOWERCASE")??!1,requireUppercase:p.passwordPolicyCharacters?.includes("REQUIRES_UPPERCASE")??!1,requireNumbers:p.passwordPolicyCharacters?.includes("REQUIRES_NUMBERS")??!1,requireSpecialCharacters:p.passwordPolicyCharacters?.includes("REQUIRES_SYMBOLS")??!1}:void 0,ge=Array.from(new Set([...m??[],...g??[]])).reduce((ce,be)=>({...ce,[be.toLowerCase()]:{required:!0}}),{}),Te=S?.includes("EMAIL")??!1,$=S?.includes("PHONE_NUMBER")??!1;(l||D)&&(q.Auth={Cognito:{identityPoolId:l,allowGuestAccess:C!=="enable",signUpVerificationMethod:c,userAttributes:ge,userPoolClientId:P,userPoolId:D,mfa:W,passwordFormat:ee,loginWith:{username:!(Te||$),email:Te,phone:$}}});const te=L?Object.keys(L).length>0:!1,fe=v?v.length>0:!1;if(q.Auth&&te&&(q.Auth.Cognito.loginWith={...q.Auth.Cognito.loginWith,oauth:{...oV(L),...fe&&{providers:aV(v)}}}),I&&(q.Storage={S3:{bucket:I,region:T,dangerouslyConnectToHttpEndpointForTesting:O}}),M){const{amazon_location_service:ce}=M;q.Geo={LocationService:{maps:ce.maps,geofenceCollections:ce.geofenceCollections,searchIndices:ce.search_indices,region:ce.region}}}if(G&&(q.API={...q.API,REST:G.reduce((ce,be)=>{const{name:Fe,endpoint:ke,region:ae,service:Ae}=be;return{...ce,[Fe]:{endpoint:ke,...Ae?{service:Ae}:void 0,...ae?{region:ae}:void 0}}},{})}),z){const{VoiceId:ce}=z?.convert?.speechGenerator?.defaults??{};q.Predictions=ce?{...z,convert:{...z.convert,speechGenerator:{...z.convert.speechGenerator,defaults:{voiceId:ce}}}}:z}return q},cM=e=>e?.split(",")??[],oV=({domain:e,scope:t,redirectSignIn:n,redirectSignOut:r,responseType:o})=>({domain:e,scopes:t,redirectSignIn:cM(n),redirectSignOut:cM(r),responseType:o}),aV=e=>e.map(t=>{const n=t.toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}),t6=Symbol("oauth-listener"),Ln=[];for(let e=0;e<256;++e)Ln.push((e+256).toString(16).slice(1));function sV(e,t=0){return(Ln[e[t+0]]+Ln[e[t+1]]+Ln[e[t+2]]+Ln[e[t+3]]+"-"+Ln[e[t+4]]+Ln[e[t+5]]+"-"+Ln[e[t+6]]+Ln[e[t+7]]+"-"+Ln[e[t+8]]+Ln[e[t+9]]+"-"+Ln[e[t+10]]+Ln[e[t+11]]+Ln[e[t+12]]+Ln[e[t+13]]+Ln[e[t+14]]+Ln[e[t+15]]).toLowerCase()}let Z0;const iV=new Uint8Array(16);function lV(){if(!Z0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Z0=crypto.getRandomValues.bind(crypto)}return Z0(iV)}const cV=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),uM={randomUUID:cV};function uV(e,t,n){e=e||{};const r=e.random??e.rng?.()??lV();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n=n||0,n<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[n+o]=r[o];return t}return sV(r)}function Tc(e,t,n){return uM.randomUUID&&!t&&!e?uM.randomUUID():uV(e,t,n)}function dV(e){const{version:t}=e;return t?t.startsWith("1"):!1}function fV(e){if(!e)return;const{bucket_name:t,aws_region:n,buckets:r}=e;return{S3:{bucket:t,region:n,buckets:r&&wV(r)}}}function hV(e){if(!e)return;const{user_pool_id:t,user_pool_client_id:n,identity_pool_id:r,password_policy:o,mfa_configuration:a,mfa_methods:l,unauthenticated_identities_enabled:c,oauth:d,username_attributes:f,standard_required_attributes:p,groups:m,passwordless:g}=e,v={Cognito:{userPoolId:t,userPoolClientId:n,groups:m}};return r&&(v.Cognito={...v.Cognito,identityPoolId:r}),o&&(v.Cognito.passwordFormat={requireLowercase:o.require_lowercase,requireNumbers:o.require_numbers,requireUppercase:o.require_uppercase,requireSpecialCharacters:o.require_symbols,minLength:o.min_length??6}),a&&(v.Cognito.mfa={status:EV(a),smsEnabled:l?.includes("SMS"),totpEnabled:l?.includes("TOTP")}),c&&(v.Cognito.allowGuestAccess=c),d&&(v.Cognito.loginWith={oauth:{domain:d.domain,redirectSignIn:d.redirect_sign_in_uri,redirectSignOut:d.redirect_sign_out_uri,responseType:d.response_type==="token"?"token":"code",scopes:d.scopes,providers:CV(d.identity_providers)}}),f&&(v.Cognito.loginWith={...v.Cognito.loginWith,email:f.includes("email"),phone:f.includes("phone_number"),username:f.includes("username")}),p&&(v.Cognito.userAttributes=p.reduce((S,C)=>({...S,[C]:{required:!0}}),{})),g&&(v.Cognito.passwordless={emailOtpEnabled:g.email_otp_enabled,smsOtpEnabled:g.sms_otp_enabled,webAuthn:g.web_authn?{relyingPartyId:g.web_authn.relying_party_id,userVerification:g.web_authn.user_verification}:void 0,preferredChallenge:g.preferred_challenge}),v}function pV(e){if(!e?.amazon_pinpoint)return;const{amazon_pinpoint:t}=e;return{Pinpoint:{appId:t.app_id,region:t.aws_region}}}function mV(e){if(!e)return;const{aws_region:t,geofence_collections:n,maps:r,search_indices:o}=e;return{LocationService:{region:t,searchIndices:o,geofenceCollections:n,maps:r}}}function gV(e){if(!e)return;const{aws_region:t,default_authorization_type:n,url:r,api_key:o,model_introspection:a}=e;return{GraphQL:{endpoint:r,defaultAuthMode:n6(n),region:t,apiKey:o,modelIntrospection:a}}}function vV(e){if(!e?.events)return;const{url:t,aws_region:n,api_key:r,default_authorization_type:o}=e.events;return{Events:{endpoint:t,defaultAuthMode:n6(o),region:n,apiKey:r}}}function yV(e){if(!e)return;const{aws_region:t,channels:n,amazon_pinpoint_app_id:r}=e,o=n.includes("IN_APP_MESSAGING"),a=n.includes("APNS")||n.includes("FCM");if(!(o||a))return;const l={};return o&&(l.InAppMessaging={Pinpoint:{appId:r,region:t}}),a&&(l.PushNotification={Pinpoint:{appId:r,region:t}}),l}function bV(e){const t={};if(e.storage&&(t.Storage=fV(e.storage)),e.auth&&(t.Auth=hV(e.auth)),e.analytics&&(t.Analytics=pV(e.analytics)),e.geo&&(t.Geo=mV(e.geo)),e.data&&(t.API=gV(e.data)),e.custom){const n=vV(e.custom);n&&"Events"in n&&(t.API={...t.API,...n})}return e.notifications&&(t.Notifications=yV(e.notifications)),t}const SV={AMAZON_COGNITO_USER_POOLS:"userPool",API_KEY:"apiKey",AWS_IAM:"iam",AWS_LAMBDA:"lambda",OPENID_CONNECT:"oidc"};function n6(e){return SV[e]}const dM={GOOGLE:"Google",LOGIN_WITH_AMAZON:"Amazon",FACEBOOK:"Facebook",SIGN_IN_WITH_APPLE:"Apple"};function CV(e=[]){return e.reduce((t,n)=>(dM[n]!==void 0&&t.push(dM[n]),t),[])}function EV(e){return e==="OPTIONAL"?"optional":e==="REQUIRED"?"on":"off"}function wV(e){const t={};return e.forEach(({name:n,bucket_name:r,aws_region:o,paths:a})=>{if(n in t)throw new Error(`Duplicate friendly name found: ${n}. Name must be unique.`);const l=a?Object.entries(a).reduce((c,[d,f])=>(f!==void 0&&(c[d]=f),c),{}):void 0;t[n]={bucketName:r,region:o,paths:l}}),t}const r6=e=>Object.keys(e).some(t=>t.startsWith("aws_"))?rV(e):dV(e)?bV(e):e;var fM=function(){return fM=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},fM.apply(this,arguments)};function B5e(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function xV(e,t,n,r){function o(a){return a instanceof n?a:new n(function(l){l(a)})}return new(n||(n=Promise))(function(a,l){function c(p){try{f(r.next(p))}catch(m){l(m)}}function d(p){try{f(r.throw(p))}catch(m){l(m)}}function f(p){p.done?a(p.value):o(p.value).then(c,d)}f((r=r.apply(e,t||[])).next())})}function _V(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,l=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return l.next=c(0),l.throw=c(1),l.return=c(2),typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function c(f){return function(p){return d([f,p])}}function d(f){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,f[0]&&(n=0)),n;)try{if(r=1,o&&(a=f[0]&2?o.return:f[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,f[1])).done)return a;switch(o=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,o=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){n.label=f[1];break}if(f[0]===6&&n.label<a[1]){n.label=a[1],a=f;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(f);break}a[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(p){f=[6,p],o=0}finally{r=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function H5e(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Zr=64,IV=32,AV=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),TV=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],RV=Math.pow(2,53)-1,_m=(function(){function e(){this.state=Int32Array.from(TV),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>RV)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===Zr&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%Zr>=Zr-8){for(var o=this.bufferLength;o<Zr;o++)n.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<Zr-8;o++)n.setUint8(o,0);n.setUint32(Zr-8,Math.floor(t/4294967296),!0),n.setUint32(Zr-4,t),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(IV),o=0;o<8;o++)a[o*4]=this.state[o]>>>24&255,a[o*4+1]=this.state[o]>>>16&255,a[o*4+2]=this.state[o]>>>8&255,a[o*4+3]=this.state[o]>>>0&255;return a},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,o=r[0],a=r[1],l=r[2],c=r[3],d=r[4],f=r[5],p=r[6],m=r[7],g=0;g<Zr;g++){if(g<16)this.temp[g]=(n[g*4]&255)<<24|(n[g*4+1]&255)<<16|(n[g*4+2]&255)<<8|n[g*4+3]&255;else{var v=this.temp[g-2],S=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10;v=this.temp[g-15];var C=(v>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;this.temp[g]=(S+this.temp[g-7]|0)+(C+this.temp[g-16]|0)}var w=(((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&f^~d&p)|0)+(m+(AV[g]+this.temp[g]|0)|0)|0,x=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&a^o&l^a&l)|0;m=p,p=f,f=d,d=c+w|0,c=l,l=a,a=o,o=w+x|0}r[0]+=o,r[1]+=a,r[2]+=l,r[3]+=c,r[4]+=d,r[5]+=f,r[6]+=p,r[7]+=m},e})();const OV=e=>new TextEncoder().encode(e);var MV=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:OV;function o6(e){return e instanceof Uint8Array?e:typeof e=="string"?MV(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function NV(e){return typeof e=="string"?e.length===0:e.byteLength===0}var ji=(function(){function e(t){this.secret=t,this.hash=new _m,this.reset()}return e.prototype.update=function(t){if(!(NV(t)||this.error))try{this.hash.update(o6(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return xV(this,void 0,void 0,function(){return _V(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new _m,this.secret){this.outer=new _m;var t=PV(this.secret),n=new Uint8Array(Zr);n.set(t);for(var r=0;r<Zr;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e})();function PV(e){var t=o6(e);if(t.byteLength>Zr){var n=new _m;n.update(t),t=n.digest()}var r=new Uint8Array(Zr);return r.set(t),r}for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`)}var fn;(function(e){e.WebUnknown="0",e.React="1",e.NextJs="2",e.Angular="3",e.VueJs="4",e.Nuxt="5",e.Svelte="6",e.ServerSideUnknown="100",e.ReactSSR="101",e.NextJsSSR="102",e.AngularSSR="103",e.VueJsSSR="104",e.NuxtSSR="105",e.SvelteSSR="106",e.ReactNative="201",e.Expo="202"})(fn||(fn={}));var to;(function(e){e.AI="ai",e.API="api",e.Auth="auth",e.Analytics="analytics",e.DataStore="datastore",e.Geo="geo",e.InAppMessaging="inappmessaging",e.Interactions="interactions",e.Predictions="predictions",e.PubSub="pubsub",e.PushNotification="pushnotification",e.Storage="storage"})(to||(to={}));var ga;(function(e){e.CreateConversation="1",e.GetConversation="2",e.ListConversations="3",e.DeleteConversation="4",e.SendMessage="5",e.ListMessages="6",e.OnMessage="7",e.Generation="8",e.UpdateConversation="9"})(ga||(ga={}));var hM;(function(e){e.Record="1",e.IdentifyUser="2"})(hM||(hM={}));var pM;(function(e){e.GraphQl="1",e.Get="2",e.Post="3",e.Put="4",e.Patch="5",e.Del="6",e.Head="7"})(pM||(pM={}));var We;(function(e){e.SignUp="1",e.ConfirmSignUp="2",e.ResendSignUpCode="3",e.SignIn="4",e.FetchMFAPreference="6",e.UpdateMFAPreference="7",e.SetUpTOTP="10",e.VerifyTOTPSetup="11",e.ConfirmSignIn="12",e.DeleteUserAttributes="15",e.DeleteUser="16",e.UpdateUserAttributes="17",e.FetchUserAttributes="18",e.ConfirmUserAttribute="22",e.SignOut="26",e.UpdatePassword="27",e.ResetPassword="28",e.ConfirmResetPassword="29",e.FederatedSignIn="30",e.RememberDevice="32",e.ForgetDevice="33",e.FetchDevices="34",e.SendUserAttributeVerificationCode="35",e.SignInWithRedirect="36",e.StartWebAuthnRegistration="37",e.CompleteWebAuthnRegistration="38",e.ListWebAuthnCredentials="39",e.DeleteWebAuthnCredential="40"})(We||(We={}));var mM;(function(e){e.Subscribe="1",e.GraphQl="2"})(mM||(mM={}));var Qd;(function(e){e.SearchByText="0",e.SearchByCoordinates="1",e.SearchForSuggestions="2",e.SearchByPlaceId="3",e.SaveGeofences="4",e.GetGeofence="5",e.ListGeofences="6",e.DeleteGeofences="7"})(Qd||(Qd={}));var Pw;(function(e){e.SyncMessages="1",e.IdentifyUser="2",e.NotifyMessageInteraction="3"})(Pw||(Pw={}));var gM;(function(e){e.None="0"})(gM||(gM={}));var vM;(function(e){e.Convert="1",e.Identify="2",e.Interpret="3"})(vM||(vM={}));var yM;(function(e){e.Subscribe="1"})(yM||(yM={}));var bM;(function(e){e.InitializePushNotifications="1",e.IdentifyUser="2"})(bM||(bM={}));var ho;(function(e){e.UploadData="1",e.DownloadData="2",e.List="3",e.Copy="4",e.Remove="5",e.GetProperties="6",e.GetUrl="7",e.GetDataAccess="8",e.ListCallerAccessGrants="9"})(ho||(ho={}));const kV="6.18.0",Kg=()=>typeof global<"u",Jc=()=>typeof window<"u",a6=()=>typeof document<"u",C_=()=>typeof process<"u",hf=(e,t)=>!!Object.keys(e).find(n=>n.startsWith(t));var SM={};function DV(){const e=r=>r.startsWith("_react")||r.startsWith("__react"),t=r=>Object.keys(r).find(e),n=()=>Array.from(document.querySelectorAll("[id]"));return a6()&&n().some(t)}function LV(){return C_()&&typeof SM<"u"&&!!Object.keys(SM).find(e=>e.includes("react"))}function UV(){return Jc()&&hf(window,"__VUE")}function FV(){return Kg()&&hf(global,"__VUE")}var CM={};function zV(){return Jc()&&hf(window,"__SVELTE")}function $V(){return C_()&&typeof CM<"u"&&!!Object.keys(CM).find(e=>e.includes("svelte"))}function jV(){return Jc()&&window.next&&typeof window.next=="object"}function BV(){return Kg()&&(hf(global,"__next")||hf(global,"__NEXT"))}function HV(){return Jc()&&(window.__NUXT__!==void 0||window.$nuxt!==void 0)}function qV(){return Kg()&&typeof global.__NUXT_PATHS__<"u"}var EM={};function VV(){const e=!!(a6()&&document.querySelector("[ng-version]")),t=!!(Jc()&&typeof window.ng<"u");return e||t}function WV(){return C_()&&typeof EM=="object"&&EM.npm_lifecycle_script?.startsWith("ng ")||!1}function GV(){return typeof navigator<"u"&&typeof navigator.product<"u"&&navigator.product==="ReactNative"}function KV(){return Kg()&&typeof global.expo<"u"}function ZV(){return Jc()}const YV=[{platform:fn.Expo,detectionMethod:KV},{platform:fn.ReactNative,detectionMethod:GV},{platform:fn.NextJs,detectionMethod:jV},{platform:fn.Nuxt,detectionMethod:HV},{platform:fn.Angular,detectionMethod:VV},{platform:fn.React,detectionMethod:DV},{platform:fn.VueJs,detectionMethod:UV},{platform:fn.Svelte,detectionMethod:zV},{platform:fn.WebUnknown,detectionMethod:ZV},{platform:fn.NextJsSSR,detectionMethod:BV},{platform:fn.NuxtSSR,detectionMethod:qV},{platform:fn.ReactSSR,detectionMethod:LV},{platform:fn.VueJsSSR,detectionMethod:FV},{platform:fn.AngularSSR,detectionMethod:WV},{platform:fn.SvelteSSR,detectionMethod:$V}];function QV(){return YV.find(e=>e.detectionMethod())?.platform||fn.ServerSideUnknown}let Xd;const Y0=[];let kw=!1;const XV=10,JV=10,eW=1e3,s6=()=>{if(!Xd){if(Xd=QV(),kw)for(;Y0.length;)Y0.pop()?.();else Y0.forEach(e=>{e()});wM(fn.ServerSideUnknown,XV),wM(fn.WebUnknown,JV)}return Xd};function tW(){Xd=void 0}function wM(e,t){Xd===e&&!kw&&setTimeout(()=>{tW(),kw=!0,setTimeout(s6,eW)},t)}const ps={},da=e=>{ps[e.category]=e.apis.reduce((r,o)=>({...r,[o]:{refCount:r[o]?.refCount?r[o].refCount+1:1,additionalDetails:e.additionalDetails}}),ps[e.category]??{});let t=!1;return()=>{t||(t=!0,e.apis.forEach(r=>{const o=ps[e.category][r].refCount;o>1?ps[e.category][r].refCount=o-1:(delete ps[e.category][r],Object.keys(ps[e.category]).length||delete ps[e.category])}))}},nW=(e,t)=>ps[e]?.[t]?.additionalDetails,rW="aws-amplify",oW=e=>e.replace(/\+.*/,""),aW=({category:e,action:t}={})=>{const n=[[rW,oW(kV)]];if(e&&n.push([e,t]),n.push(["framework",s6()]),e&&t){const r=nW(e,t);r&&r.forEach(o=>{n.push(o)})}return n},Zg=e=>aW(e).map(([r,o])=>r&&o?`${r}/${o}`:r).join(" "),Yg=()=>typeof window<"u"&&typeof window.document<"u",xM=new $n("Auth");class sW{configure(t,n){this.authConfig=t,this.authOptions=n,t&&t.Cognito?.userPoolEndpoint&&xM.warn(_M("Amazon Cognito User Pool")),t&&t.Cognito?.identityPoolEndpoint&&xM.warn(_M("Amazon Cognito Identity Pool"))}async fetchAuthSession(t={}){let n,r;const o=await this.getTokens(t);return o?(r=o.accessToken?.payload?.sub,n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,tokens:o,authenticated:!0,forceRefresh:t.forceRefresh})):n=await this.authOptions?.credentialsProvider?.getCredentialsAndIdentityId({authConfig:this.authConfig,authenticated:!1,forceRefresh:t.forceRefresh}),{tokens:o,credentials:n?.credentials,identityId:n?.identityId,userSub:r}}async clearCredentials(){await this.authOptions?.credentialsProvider?.clearCredentialsAndIdentityId()}async getTokens(t){return await this.authOptions?.tokenProvider?.getTokens(t)??void 0}}const _M=e=>`You are using a custom Amazon ${e} endpoint, ensure the endpoint is correct.`;class iW{constructor(){this.oAuthListener=void 0,this.isConfigured=!1,this.resourcesConfig={},this.libraryOptions={},this.Auth=new sW}configure(t,n){const r=r6(t);this.resourcesConfig=r,n&&(this.libraryOptions=n),this.resourcesConfig=e6(this.resourcesConfig),this.Auth.configure(this.resourcesConfig.Auth,this.libraryOptions.Auth),(this.resourcesConfig.Analytics?.Pinpoint||this.resourcesConfig.Notifications?.InAppMessaging?.Pinpoint||this.resourcesConfig.Notifications?.PushNotification?.Pinpoint)&&console.warn("AWS will end support for Amazon Pinpoint on October 30, 2026. The guidance is to use AWS End User Messaging for push notifications and SMS, Amazon Simple Email Service for sending emails, Amazon Connect for campaigns, journeys, endpoints, and engagement analytics. Pinpoint recommends Amazon Kinesis for event collection and mobile analytics."),Lo.dispatch("core",{event:"configure",data:this.resourcesConfig},"Configure",Do),this.notifyOAuthListener(),this.isConfigured=!0}getConfig(){return this.isConfigured||console.warn("Amplify has not been configured. Please call Amplify.configure() before using this service."),this.resourcesConfig}[t6](t){this.resourcesConfig.Auth?.Cognito.loginWith?.oauth?t(this.resourcesConfig.Auth?.Cognito):this.oAuthListener=t}notifyOAuthListener(){!this.resourcesConfig.Auth?.Cognito.loginWith?.oauth||!this.oAuthListener||(this.oAuthListener(this.resourcesConfig.Auth?.Cognito),this.oAuthListener=void 0)}}const Pt=new iW,i6=(e,t)=>e.Auth.fetchAuthSession(t),Qg=e=>i6(Pt,e);function l6(){return Pt.Auth.clearCredentials()}const Xg=e=>{const{headers:t,statusCode:n}=e;return{...lW(e)?e.$metadata:{},httpStatusCode:n,requestId:t["x-amzn-requestid"]??t["x-amzn-request-id"]??t["x-amz-request-id"],extendedRequestId:t["x-amz-id-2"],cfId:t["x-amz-cf-id"]}},lW=e=>typeof e?.$metadata=="object",eu=async e=>{if(!e||e.statusCode<300)return;const t=await Bf(e),r=(l=>{const[c]=l.toString().split(/[,:]+/);return c.includes("#")?c.split("#")[1]:c})(e.headers["x-amzn-errortype"]??t.code??t.__type??"UnknownError"),o=t.message??t.Message??"Unknown error",a=new Error(o);return Object.assign(a,{name:r,$metadata:Xg(e)})},Bf=async e=>{if(!e.body)throw new Error("Missing response payload");const t=await e.body.json();return Object.assign(t,{$metadata:Xg(e)})},pn=(e,t,n,r)=>async(o,a)=>{const l={...r,...o},c=await l.endpointResolver(l,a),d=await t(a,c),f=await e(d,{...l});return n(f)},cW=300*1e3;function uW(e=cW){return r=>{const o=2**r*100+100*Math.random();return o>e?!1:o}}const c6=3,IM="amz-sdk-invocation-id",dW="amz-sdk-request",AM=300*1e3,u6=e=>{const n=uW(AM)(e);return n===!1?AM:n},fW=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch","BadRequestException"],hW=e=>!!e&&fW.includes(e),d6=e=>async(t,n)=>{const r=n??await e(t)??void 0,o=r?.code||r?.name,a=t?.statusCode;return{retryable:vW(n)||gW(a,o)||hW(o)||yW(a,o)}},pW=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException"],mW=["TimeoutError","RequestTimeout","RequestTimeoutException"],gW=(e,t)=>e===429||!!t&&pW.includes(t),vW=e=>[Ns.NetworkError,"ERR_NETWORK"].includes(e?.name),yW=(e,t)=>!!e&&[500,502,503,504].includes(e)||!!t&&mW.includes(t),f6="cognito-identity",h6={service:f6,retryDecider:d6(eu),computeDelay:u6,cache:"no-store"},bW=({maxAttempts:e=c6,retryDecider:t,computeDelay:n,abortSignal:r})=>{if(e<1)throw new Error("maxAttempts must be greater than 0");return(o,a)=>async function(c){let d,f=a.attemptsCount??0,p;const m=()=>{if(p)return TM(p,f),p;throw TM(d,f),d};for(;!r?.aborted&&f<e;){try{p=await o(c),d=void 0}catch(S){d=S,p=void 0}f=(a.attemptsCount??0)>f?a.attemptsCount??0:f+1,a.attemptsCount=f;const{isCredentialsExpiredError:g,retryable:v}=await t(p,d,a);if(v){if(a.isCredentialsExpired=!!g,!r?.aborted&&f<e){const S=n(f);await SW(S,r)}continue}else return m()}if(r?.aborted)throw new Error("Request aborted.");return m()}},SW=(e,t)=>{if(t?.aborted)return Promise.resolve();let n,r;const o=new Promise(a=>{r=a,n=setTimeout(a,e)});return t?.addEventListener("abort",function a(l){clearTimeout(n),t?.removeEventListener("abort",a),r()}),o},TM=(e,t)=>{Object.prototype.toString.call(e)==="[object Object]"&&(e.$metadata={...e.$metadata??{},attempts:t})},CW=Tc,EW=()=>e=>async function(n){return n.headers[IM]||(n.headers[IM]=CW()),e(n)},wW=({maxAttempts:e=c6})=>(t,n)=>async function(o){const a=n.attemptsCount??0;return o.headers[dW]=`attempt=${a+1}; max=${e}`,t(o)},xW=({userAgentHeader:e="x-amz-user-agent",userAgentValue:t=""})=>n=>async function(o){if(t.trim().length===0)return await n(o);{const a=e.toLowerCase();return o.headers[a]=o.headers[a]?`${o.headers[a]} ${t}`:t,await n(o)}},E_=(e,t)=>(n,r)=>{const o={};let a=l=>e(l,r);for(let l=t.length-1;l>=0;l--){const c=t[l];a=c(r)(a,o)}return a(n)},Q0=e=>{let t;return()=>(t||(t=e()),t)},_W=e=>!["HEAD","GET"].includes(e.toUpperCase()),IW=async({url:e,method:t,headers:n,body:r},{abortSignal:o,cache:a,withCrossDomainCredentials:l})=>{let c;try{c=await fetch(e,{method:t,headers:n,body:_W(t)?r:void 0,signal:o,cache:a,credentials:l?"include":"same-origin"})}catch(m){throw m instanceof TypeError?new dr({name:Ns.NetworkError,message:"A network error has occurred.",underlyingError:m}):m}const d={};c.headers?.forEach((m,g)=>{d[g.toLowerCase()]=m});const f={statusCode:c.status,headers:d,body:null},p=Object.assign(c.body??{},{text:Q0(()=>c.text()),blob:Q0(()=>c.blob()),json:Q0(()=>c.json())});return{...f,body:p}},p6=E_(IW,[xW,EW,bW,wW]),AW=()=>e=>async function(n){return n.headers["cache-control"]="no-store",e(n)},m6=E_(p6,[AW]),g6=e=>(t,n)=>{const r=TW(e),o=JSON.stringify(t);return RW(n,r,o)},TW=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}),RW=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"}),RM=e=>pn(m6,g6("GetCredentialsForIdentity"),OW,{...h6,...e,userAgentValue:Zg()}),OW=async e=>{if(e.statusCode>=300)throw await eu(e);const t=await Bf(e);return{IdentityId:t.IdentityId,Credentials:MW(t.Credentials),$metadata:Xg(e)}},MW=({Expiration:e,...t}={})=>({...t,Expiration:e&&new Date(e*1e3)}),NW=e=>pn(m6,g6("GetId"),PW,{...h6,...e,userAgentValue:Zg()}),PW=async e=>{if(e.statusCode>=300)throw await eu(e);return{IdentityId:(await Bf(e)).IdentityId,$metadata:Xg(e)}},v6={id:"aws",outputs:{dnsSuffix:"amazonaws.com"},regionRegex:"^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",regions:["aws-global"]},kW={partitions:[v6,{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn"},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:["aws-cn-global"]}]},y6=e=>{const{partitions:t}=kW;for(const{regions:n,outputs:r,regionRegex:o}of t){const a=new RegExp(o);if(n.includes(e)||a.test(e))return r.dnsSuffix}return v6.outputs.dnsSuffix},qs=URL,DW=({region:e})=>({url:new qs(`https://${f6}.${e}.${y6(e)}`)});class Ud extends dr{constructor(){super({name:Ns.PlatformNotSupported,message:"Function not supported on current platform"})}}class b6{constructor(t){this.storage=t}async setItem(t,n){if(!this.storage)throw new Ud;this.storage.setItem(t,n)}async getItem(t){if(!this.storage)throw new Ud;return this.storage.getItem(t)}async removeItem(t){if(!this.storage)throw new Ud;this.storage.removeItem(t)}async clear(){if(!this.storage)throw new Ud;this.storage.clear()}}class S6{constructor(){this.storage=new Map}get length(){return this.storage.size}key(t){return t>this.length-1?null:Array.from(this.storage.keys())[t]}setItem(t,n){this.storage.set(t,n)}getItem(t){return this.storage.get(t)??null}removeItem(t){this.storage.delete(t)}clear(){this.storage.clear()}}const C6=new $n("CoreStorageUtils"),LW=()=>{try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{C6.info("localStorage not found. InMemoryStorage is used as a fallback.")}return new S6},E6=()=>{try{if(typeof window<"u"&&window.sessionStorage)return window.sessionStorage.getItem("test"),window.sessionStorage;throw new Error("sessionStorage is not defined")}catch{return C6.info("sessionStorage not found. InMemoryStorage is used as a fallback."),new S6}};class UW extends b6{constructor(){super(LW())}}class FW extends b6{constructor(){super(E6())}}class zW{constructor(t){this._storage=t}get storage(){if(!this._storage)throw new Ud;return this._storage}setItem(t,n){this.storage.setItem(t,n)}getItem(t){return this.storage.getItem(t)}removeItem(t){this.storage.removeItem(t)}clear(){this.storage.clear()}}class $W extends zW{constructor(){super(E6())}}function Np(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)r!=="__proto__"&&(e[r]=n[r])}return e}var jW={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Dw(e,t){function n(o,a,l){if(!(typeof document>"u")){l=Np({},t,l),typeof l.expires=="number"&&(l.expires=new Date(Date.now()+l.expires*864e5)),l.expires&&(l.expires=l.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var d in l)l[d]&&(c+="; "+d,l[d]!==!0&&(c+="="+l[d].split(";")[0]));return document.cookie=o+"="+e.write(a,o)+c}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var a=document.cookie?document.cookie.split("; "):[],l={},c=0;c<a.length;c++){var d=a[c].split("="),f=d.slice(1).join("=");try{var p=decodeURIComponent(d[0]);if(p in l||(l[p]=e.read(f,p)),o===p)break}catch{}}return o?l[o]:l}}return Object.create({set:n,get:r,remove:function(o,a){n(o,"",Np({},a,{expires:-1}))},withAttributes:function(o){return Dw(this.converter,Np({},this.attributes,o))},withConverter:function(o){return Dw(Np({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Pp=Dw(jW,{path:"/"});class BW{constructor(t={}){const{path:n,domain:r,expires:o,sameSite:a,secure:l}=t;if(this.domain=r,this.path=n||"/",this.expires=Object.prototype.hasOwnProperty.call(t,"expires")?o:365,this.secure=Object.prototype.hasOwnProperty.call(t,"secure")?l:!0,Object.prototype.hasOwnProperty.call(t,"sameSite")){if(!a||!["strict","lax","none"].includes(a))throw new Error('The sameSite value of cookieStorage must be "lax", "strict" or "none".');if(a==="none"&&!this.secure)throw new Error("sameSite = None requires the Secure attribute in latest browser versions.");this.sameSite=a}}async setItem(t,n){Pp.set(t,n,this.getData())}async getItem(t){return Pp.get(t)??null}async removeItem(t){Pp.remove(t,this.getData())}async clear(){const t=Pp.get(),n=Object.keys(t).map(r=>this.removeItem(r));await Promise.all(n)}getData(){return{path:this.path,expires:this.expires,domain:this.domain,secure:this.secure,...this.sameSite&&{sameSite:this.sameSite}}}}const Hf=new UW;new FW;const Sa=new $W,HW=new $n("I18n");let qW=class{constructor(){this._options=null,this._lang=null,this._dict={}}setDefaultLanguage(){!this._lang&&typeof window<"u"&&window&&window.navigator&&(this._lang=window.navigator.language),HW.debug(this._lang)}setLanguage(t){this._lang=t}get(t,n=void 0){if(this.setDefaultLanguage(),!this._lang)return typeof n<"u"?n:t;const r=this._lang;let o=this.getByLanguage(t,r);return o||(r.indexOf("-")>0&&(o=this.getByLanguage(t,r.split("-")[0])),o)?o:typeof n<"u"?n:t}getByLanguage(t,n,r=null){if(!n)return r;const o=this._dict[n];return o?o[t]:r}putVocabulariesForLanguage(t,n){let r=this._dict[t];r||(r=this._dict[t]={}),this._dict[t]={...r,...n}}putVocabularies(t){Object.keys(t).forEach(n=>{this.putVocabulariesForLanguage(n,t[n])})}};var wi;(function(e){e.NotConfigured="NotConfigured"})(wi||(wi={}));const VW={[wi.NotConfigured]:{message:"i18n is not configured."}},kp=Wg(VW),OM=new $n("I18n");let Dp={language:null},co=null,w6=class Ci{static configure(t){return OM.debug("configure I18n"),t&&(Dp=Object.assign({},Dp,t.I18n||t),Ci.createInstance()),Dp}static getModuleName(){return"I18n"}static createInstance(){OM.debug("create I18n instance"),!co&&(co=new qW)}static setLanguage(t){Ci.checkConfig(),kp(!!co,wi.NotConfigured),co.setLanguage(t)}static get(t,n){return Ci.checkConfig(),kp(!!co,wi.NotConfigured),co.get(t,n)}static putVocabulariesForLanguage(t,n){Ci.checkConfig(),kp(!!co,wi.NotConfigured),co.putVocabulariesForLanguage(t,n)}static putVocabularies(t){Ci.checkConfig(),kp(!!co,wi.NotConfigured),co.putVocabularies(t)}static checkConfig(){return co||Ci.createInstance(),!0}};w6.createInstance();const WW=e=>{const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[],r=new Uint8Array(e);y_().getRandomValues(r);for(const o of r)n.push(t[o%t.length]);return n.join("")};function GW(e){return(e.match(/.{2}/g)||[]).map(n=>String.fromCharCode(parseInt(n,16))).join("")}function KW(e){return e.split("").map(t=>t.charCodeAt(0).toString(16).padStart(2,"0")).join("")}const ZW=e=>{let t;return async(...n)=>t||(t=new Promise((r,o)=>{e(...n).then(a=>{r(a)}).catch(a=>{o(a)}).finally(()=>{t=void 0})}),t)};function MM({expiresAt:e,clockDrift:t,tolerance:n=5e3}){return Date.now()+t+n>e}const YW=async()=>{const{userAgentData:e}=navigator;if(!e)return navigator.userAgent;const{platform:t="",platformVersion:n="",model:r="",architecture:o="",fullVersionList:a=[]}=await e.getHighEntropyValues(["platform","platformVersion","architecture","model","fullVersionList"]),l=a.map(d=>`${d.brand}/${d.version}`).join(";");return[t,n,o,r,t,l].filter(d=>d).join(" ")||navigator.userAgent};function QW(e){return Array.from(e,t=>String.fromCodePoint(t)).join("")}const Fc={convert(e,t={urlSafe:!1,skipPadding:!1}){const n=typeof e=="string"?e:QW(e);let r=Xq()(n);return t.urlSafe&&(r=r.replace(/\+/g,"-").replace(/\//g,"_")),t.skipPadding&&(r=r.replace(/=/g,"")),r}};function XW(){return y_().getRandomValues(new Uint32Array(1))[0]}function JW(e){const{words:t}=e,{sigBytes:n}=e,r=[];for(let o=0;o<n;o++){const a=t[o>>>2]>>>24-o%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join("")}class w_{constructor(t,n){this.words=[];let r=t;r=this.words=r||[],n!==void 0?this.sigBytes=n:this.sigBytes=r.length*4}random(t){const n=[];for(let r=0;r<t;r+=4)n.push(XW());return new w_(n,t)}toString(){return JW(this)}}var Ve;(function(e){e.EmptySignInUsername="EmptySignInUsername",e.EmptySignInPassword="EmptySignInPassword",e.CustomAuthSignInPassword="CustomAuthSignInPassword",e.EmptySignUpUsername="EmptySignUpUsername",e.EmptySignUpPassword="EmptySignUpPassword",e.EmptyConfirmSignUpUsername="EmptyConfirmSignUpUsername",e.EmptyConfirmSignUpCode="EmptyConfirmSignUpCode",e.EmptyResendSignUpCodeUsername="EmptyresendSignUpCodeUsername",e.EmptyChallengeResponse="EmptyChallengeResponse",e.EmptyConfirmResetPasswordUsername="EmptyConfirmResetPasswordUsername",e.EmptyConfirmResetPasswordNewPassword="EmptyConfirmResetPasswordNewPassword",e.EmptyConfirmResetPasswordConfirmationCode="EmptyConfirmResetPasswordConfirmationCode",e.EmptyResetPasswordUsername="EmptyResetPasswordUsername",e.EmptyVerifyTOTPSetupCode="EmptyVerifyTOTPSetupCode",e.EmptyConfirmUserAttributeCode="EmptyConfirmUserAttributeCode",e.IncorrectMFAMethod="IncorrectMFAMethod",e.EmptyUpdatePassword="EmptyUpdatePassword",e.InvalidPreferredChallenge="InvalidPreferredChallenge"})(Ve||(Ve={}));const x6={[Ve.EmptyChallengeResponse]:{message:"challengeResponse is required to confirmSignIn"},[Ve.EmptyConfirmResetPasswordUsername]:{message:"username is required to confirmResetPassword"},[Ve.EmptyConfirmSignUpCode]:{message:"code is required to confirmSignUp"},[Ve.EmptyConfirmSignUpUsername]:{message:"username is required to confirmSignUp"},[Ve.EmptyConfirmResetPasswordConfirmationCode]:{message:"confirmationCode is required to confirmResetPassword"},[Ve.EmptyConfirmResetPasswordNewPassword]:{message:"newPassword is required to confirmResetPassword"},[Ve.EmptyResendSignUpCodeUsername]:{message:"username is required to confirmSignUp"},[Ve.EmptyResetPasswordUsername]:{message:"username is required to resetPassword"},[Ve.EmptySignInPassword]:{message:"password is required to signIn"},[Ve.EmptySignInUsername]:{message:"username is required to signIn"},[Ve.EmptySignUpPassword]:{message:"password is required to signUp"},[Ve.EmptySignUpUsername]:{message:"username is required to signUp"},[Ve.CustomAuthSignInPassword]:{message:"A password is not needed when signing in with CUSTOM_WITHOUT_SRP",recoverySuggestion:"Do not include a password in your signIn call."},[Ve.IncorrectMFAMethod]:{message:"Incorrect MFA method was chosen. It should be either SMS, TOTP, or EMAIL",recoverySuggestion:"Try to pass SMS, TOTP, or EMAIL as the challengeResponse"},[Ve.EmptyVerifyTOTPSetupCode]:{message:"code is required to verifyTotpSetup"},[Ve.EmptyUpdatePassword]:{message:"oldPassword and newPassword are required to changePassword"},[Ve.EmptyConfirmUserAttributeCode]:{message:"confirmation code is required to confirmUserAttribute"},[Ve.InvalidPreferredChallenge]:{message:"The preferred challenge is not enabled in your backend configuration",recoverySuggestion:"Ensure the authentication method is enabled in your Amplify backend configuration"}};var _n;(function(e){e.DEFAULT_MSG="Authentication Error",e.EMPTY_EMAIL="Email cannot be empty",e.EMPTY_PHONE="Phone number cannot be empty",e.EMPTY_USERNAME="Username cannot be empty",e.INVALID_USERNAME="The username should either be a string or one of the sign in types",e.EMPTY_PASSWORD="Password cannot be empty",e.EMPTY_CODE="Confirmation code cannot be empty",e.SIGN_UP_ERROR="Error creating account",e.NO_MFA="No valid MFA method provided",e.INVALID_MFA="Invalid MFA type",e.EMPTY_CHALLENGE="Challenge response cannot be empty",e.NO_USER_SESSION="Failed to get the session because the user is empty",e.NETWORK_ERROR="Network Error",e.DEVICE_CONFIG="Device tracking has not been configured in this User Pool",e.AUTOSIGNIN_ERROR="Please use your credentials to sign in",e.OAUTH_ERROR="Couldn't finish OAuth flow, check your User Pool HostedUI settings"})(_n||(_n={}));var Uo;(function(e){e.SignInException="SignInException",e.OAuthSignInError="OAuthSignInException"})(Uo||(Uo={}));class Ue extends dr{constructor(t){super(t),this.constructor=Ue,Object.setPrototypeOf(this,Ue.prototype)}}function en(e,t){const{message:n,recoverySuggestion:r}=x6[t];if(!e)throw new Ue({name:t,message:n,recoverySuggestion:r})}function dt(e){const t=e?.split("_")[0];if(!e||e.indexOf("_")<0||!t||typeof t!="string")throw new Ue({name:"InvalidUserPoolId",message:"Invalid user pool id provided."});return t}function Lw(e){if(!e||!e.includes(":"))throw new Ue({name:"InvalidIdentityPoolIdException",message:"Invalid identity pool id provided.",recoverySuggestion:"Make sure a valid identityPoolId is given in the config."});return e.split(":")[0]}function NM(e){return Object.entries(e).map(([t,n])=>({Name:t,Value:n}))}function eG(e){const t={};return e?.forEach(n=>{n.Name&&(t[n.Name]=n.Value)}),t}var PM;(function(e){e.ConcurrentModificationException="ConcurrentModificationException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException"})(PM||(PM={}));var kM;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(kM||(kM={}));var DM;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UsernameExistsException="UsernameExistsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(DM||(DM={}));var LM;(function(e){e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(LM||(LM={}));var UM;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyFailedAttemptsException="TooManyFailedAttemptsException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(UM||(UM={}));var FM;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(FM||(FM={}));var zM;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(zM||(zM={}));var $M;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})($M||($M={}));var jM;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(jM||(jM={}));var BM;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(BM||(BM={}));var HM;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(HM||(HM={}));var qM;(function(e){e.ExternalServiceException="ExternalServiceException",e.InternalErrorException="InternalErrorException",e.InvalidIdentityPoolConfigurationException="InvalidIdentityPoolConfigurationException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceConflictException="ResourceConflictException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException"})(qM||(qM={}));var VM;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(VM||(VM={}));var WM;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException"})(WM||(WM={}));var Ym;(function(e){e.PasswordResetRequiredException="PasswordResetRequiredException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(Ym||(Ym={}));var GM;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotFoundException="UserNotFoundException"})(GM||(GM={}));var KM;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.MFAMethodNotFoundException="MFAMethodNotFoundException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(KM||(KM={}));var ZM;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(ZM||(ZM={}));var Uw;(function(e){e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidPasswordException="InvalidPasswordException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UsernameExistsException="UsernameExistsException"})(Uw||(Uw={}));var YM;(function(e){e.AliasExistsException="AliasExistsException",e.CodeDeliveryFailureException="CodeDeliveryFailureException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidEmailRoleAccessPolicyException="InvalidEmailRoleAccessPolicyException",e.InvalidLambdaResponseException="InvalidLambdaResponseException",e.InvalidParameterException="InvalidParameterException",e.InvalidSmsRoleAccessPolicyException="InvalidSmsRoleAccessPolicyException",e.InvalidSmsRoleTrustRelationshipException="InvalidSmsRoleTrustRelationshipException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UnexpectedLambdaException="UnexpectedLambdaException",e.UserLambdaValidationException="UserLambdaValidationException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(YM||(YM={}));var QM;(function(e){e.CodeMismatchException="CodeMismatchException",e.EnableSoftwareTokenMFAException="EnableSoftwareTokenMFAException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.SoftwareTokenMFANotFoundException="SoftwareTokenMFANotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(QM||(QM={}));var XM;(function(e){e.AliasExistsException="AliasExistsException",e.CodeMismatchException="CodeMismatchException",e.ExpiredCodeException="ExpiredCodeException",e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.LimitExceededException="LimitExceededException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(XM||(XM={}));var JM;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(JM||(JM={}));var eN;(function(e){e.ForbiddenException="ForbiddenException",e.InternalErrorException="InternalErrorException",e.InvalidParameterException="InvalidParameterException",e.InvalidUserPoolConfigurationException="InvalidUserPoolConfigurationException",e.NotAuthorizedException="NotAuthorizedException",e.PasswordResetRequiredException="PasswordResetRequiredException",e.ResourceNotFoundException="ResourceNotFoundException",e.TooManyRequestsException="TooManyRequestsException",e.UserNotConfirmedException="UserNotConfirmedException",e.UserNotFoundException="UserNotFoundException"})(eN||(eN={}));const Jg="UserUnAuthenticatedException",tG="UserAlreadyAuthenticatedException",nG="DeviceMetadataNotFoundException",_6="AutoSignInException",rG="InvalidRedirectException",oG="InvalidAppSchemeException",aG="InvalidPreferredRedirectUrlException",sG=new Ue({name:rG,message:"signInRedirect or signOutRedirect had an invalid format or was not found.",recoverySuggestion:"Please make sure the signIn/Out redirect in your oauth config is valid."});new Ue({name:oG,message:"A valid non-http app scheme was not found in the config.",recoverySuggestion:"Please make sure a valid custom app scheme is present in the config."});new Ue({name:aG,message:"The given preferredRedirectUrl does not match any items in the redirectSignOutUrls array from the config.",recoverySuggestion:"Please make sure a matching preferredRedirectUrl is provided."});const iG="InvalidOriginException",lG=new Ue({name:iG,message:"redirect is coming from a different origin. The oauth flow needs to be initiated from the same origin",recoverySuggestion:"Please call signInWithRedirect from the same origin."}),cG="OAuthSignOutException",uG="TokenRefreshException",dG="UnexpectedSignInInterruptionException";function tu(e){if(!e||!e.accessToken)throw new Ue({name:Jg,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}function fG(e){if(!e||!e.idToken)throw new Ue({name:Jg,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."})}const hG=new Ue({name:uG,message:`Token refresh is not supported when authenticated with the 'implicit grant' (token) oauth flow.
3
+ Please change your oauth configuration to use 'code grant' flow.`,recoverySuggestion:`Please logout and change your Amplify configuration to use "code grant" flow.
4
+ E.g { responseType: 'code' }`}),pG=new Ue({name:Jg,message:"User needs to be authenticated to call this API.",recoverySuggestion:"Sign in before calling this API again."});function I6(e){if(vG(e))throw hG;if(!gG(e))throw pG}function A6(e){if(!e||!e.deviceKey||!e.deviceGroupKey||!e.randomPassword)throw new Ue({name:nG,message:"Either deviceKey, deviceGroupKey or secretPassword were not found during the sign-in process.",recoverySuggestion:"Make sure to not clear storage after calling the signIn API."})}const mG={inflightOAuth:"inflightOAuth",oauthSignIn:"oauthSignIn",oauthPKCE:"oauthPKCE",oauthState:"oauthState"};function T6(e){return e?.accessToken||e?.idToken}function gG(e){return T6(e)&&e?.refreshToken}function vG(e){return T6(e)&&!e?.refreshToken}const yG=async e=>{const t=e.getConfig().Auth?.Cognito;nt(t);const n=await e.Auth.getTokens({forceRefresh:!1});tu(n);const{"cognito:username":r,sub:o}=n.idToken?.payload??{},a={username:r,userId:o},l=bG(n);return l&&(a.signInDetails=l),a};function bG(e){return e?.signInDetails}const ev=async()=>yG(Pt),xt=(e,t)=>Zg({category:to.Auth,action:e,...t}),In=e=>(t,n)=>{const r=SG(e),o=JSON.stringify(t);return CG(n,r,o)},SG=e=>({"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityProviderService.${e}`}),CG=({url:e},t,n)=>({headers:t,url:e,body:n,method:"POST"});function no(e){if(!e||e.name==="Error"||e instanceof TypeError)throw new Ue({name:Ns.Unknown,message:"An unknown error has occurred.",underlyingError:e})}const jn=()=>async e=>{if(e.statusCode>=300){const t=await eu(e);throw no(t),new Ue({name:t.name,message:t.message,metadata:t.$metadata})}return Bf(e)},EG=()=>(e,t)=>async function(r){return r.headers={...r.headers,"cache-control":"no-store",...await Pt.libraryOptions?.Auth?.headers?.()},e(r)},An=E_(p6,[EG]),R6="cognito-idp",Tn={service:R6,retryDecider:d6(eu),computeDelay:u6,get userAgentValue(){return Zg()},cache:"no-store"},qf=e=>pn(An,In("InitiateAuth"),jn(),{...Tn,...e}),Mr=e=>pn(An,In("RespondToAuthChallenge"),jn(),{...Tn,...e}),wG=e=>pn(An,In("VerifySoftwareToken"),jn(),{...Tn,...e}),xG=e=>pn(An,In("AssociateSoftwareToken"),jn(),{...Tn,...e}),_G=({region:e})=>({url:new qs(`https://${R6}.${e}.${y6(e)}`)}),ft=({endpointOverride:e})=>t=>e?{url:new qs(e)}:_G(t),IG=e=>pn(An,In("GetTokensFromRefreshToken"),jn(),{...Tn,...e}),AG=async({tokens:e,authConfig:t,username:n,clientMetadata:r})=>{nt(t?.Cognito);const{userPoolId:o,userPoolClientId:a,userPoolEndpoint:l}=t.Cognito,c=dt(o);I6(e);const d=IG({endpointResolver:ft({endpointOverride:l})}),{AuthenticationResult:f}=await d({region:c},{ClientId:a,RefreshToken:e.refreshToken,DeviceKey:e.deviceMetadata?.deviceKey,ClientMetadata:r}),p=Ia(f?.AccessToken??""),m=f?.IdToken?Ia(f.IdToken):void 0,{iat:g}=p.payload;if(!g)throw new Ue({name:"iatNotFoundException",message:"iat not found in access token"});const v=g*1e3-new Date().getTime();return{accessToken:p,idToken:m,clockDrift:v,refreshToken:f?.RefreshToken??e.refreshToken,username:n}},TG=ZW(AG),RG={accessToken:"accessToken",idToken:"idToken",oidcProvider:"oidcProvider",clockDrift:"clockDrift",refreshToken:"refreshToken",deviceKey:"deviceKey",randomPasswordKey:"randomPasswordKey",deviceGroupKey:"deviceGroupKey",signInDetails:"signInDetails",oauthMetadata:"oauthMetadata"};var Qm;(function(e){e.InvalidAuthTokens="InvalidAuthTokens"})(Qm||(Qm={}));const OG={[Qm.InvalidAuthTokens]:{message:"Invalid tokens.",recoverySuggestion:"Make sure the tokens are valid."}},MG=Wg(OG),tN="CognitoIdentityServiceProvider";class NG{getKeyValueStorage(){if(!this.keyValueStorage)throw new Ue({name:"KeyValueStorageNotFoundException",message:"KeyValueStorage was not found in TokenStore"});return this.keyValueStorage}setKeyValueStorage(t){this.keyValueStorage=t}setAuthConfig(t){this.authConfig=t}async loadTokens(){try{const t=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(t.accessToken);if(!n)throw new Ue({name:"NoSessionFoundException",message:"Auth session was not found. Make sure to call signIn."});const r=Ia(n),o=await this.getKeyValueStorage().getItem(t.idToken),a=o?Ia(o):void 0,l=await this.getKeyValueStorage().getItem(t.refreshToken)??void 0,c=await this.getKeyValueStorage().getItem(t.clockDrift)??"0",d=Number.parseInt(c),f=await this.getKeyValueStorage().getItem(t.signInDetails),p={accessToken:r,idToken:a,refreshToken:l,deviceMetadata:await this.getDeviceMetadata()??void 0,clockDrift:d,username:await this.getLastAuthUser()};return f&&(p.signInDetails=JSON.parse(f)),p}catch{return null}}async storeTokens(t){MG(t!==void 0,Qm.InvalidAuthTokens);const n=t.username;await this.getKeyValueStorage().setItem(this.getLastAuthUserKey(),n);const r=await this.getAuthKeys();await this.getKeyValueStorage().setItem(r.accessToken,t.accessToken.toString()),t.idToken?await this.getKeyValueStorage().setItem(r.idToken,t.idToken.toString()):await this.getKeyValueStorage().removeItem(r.idToken),t.refreshToken?await this.getKeyValueStorage().setItem(r.refreshToken,t.refreshToken):await this.getKeyValueStorage().removeItem(r.refreshToken),t.deviceMetadata&&(t.deviceMetadata.deviceKey&&await this.getKeyValueStorage().setItem(r.deviceKey,t.deviceMetadata.deviceKey),t.deviceMetadata.deviceGroupKey&&await this.getKeyValueStorage().setItem(r.deviceGroupKey,t.deviceMetadata.deviceGroupKey),await this.getKeyValueStorage().setItem(r.randomPasswordKey,t.deviceMetadata.randomPassword)),t.signInDetails?await this.getKeyValueStorage().setItem(r.signInDetails,JSON.stringify(t.signInDetails)):await this.getKeyValueStorage().removeItem(r.signInDetails),await this.getKeyValueStorage().setItem(r.clockDrift,`${t.clockDrift}`)}async clearTokens(){const t=await this.getAuthKeys();await Promise.all([this.getKeyValueStorage().removeItem(t.accessToken),this.getKeyValueStorage().removeItem(t.idToken),this.getKeyValueStorage().removeItem(t.clockDrift),this.getKeyValueStorage().removeItem(t.refreshToken),this.getKeyValueStorage().removeItem(t.signInDetails),this.getKeyValueStorage().removeItem(this.getLastAuthUserKey()),this.getKeyValueStorage().removeItem(t.oauthMetadata)])}async getDeviceMetadata(t){const n=await this.getAuthKeys(t),r=await this.getKeyValueStorage().getItem(n.deviceKey),o=await this.getKeyValueStorage().getItem(n.deviceGroupKey),a=await this.getKeyValueStorage().getItem(n.randomPasswordKey);return a&&o&&r?{deviceKey:r,deviceGroupKey:o,randomPassword:a}:null}async clearDeviceMetadata(t){const n=await this.getAuthKeys(t);await Promise.all([this.getKeyValueStorage().removeItem(n.deviceKey),this.getKeyValueStorage().removeItem(n.deviceGroupKey),this.getKeyValueStorage().removeItem(n.randomPasswordKey)])}async getAuthKeys(t){nt(this.authConfig?.Cognito);const n=t??await this.getLastAuthUser();return PG(tN,`${this.authConfig.Cognito.userPoolClientId}.${n}`)}getLastAuthUserKey(){nt(this.authConfig?.Cognito);const t=this.authConfig.Cognito.userPoolClientId;return`${tN}.${t}.LastAuthUser`}async getLastAuthUser(){return await this.getKeyValueStorage().getItem(this.getLastAuthUserKey())??"username"}async setOAuthMetadata(t){const{oauthMetadata:n}=await this.getAuthKeys();await this.getKeyValueStorage().setItem(n,JSON.stringify(t))}async getOAuthMetadata(){const{oauthMetadata:t}=await this.getAuthKeys(),n=await this.getKeyValueStorage().getItem(t);return n&&JSON.parse(n)}}const PG=(e,t)=>x_(RG)(`${e}`,t);function x_(e){const t=Object.values({...e});return(n,r)=>t.reduce((o,a)=>({...o,[a]:`${n}.${r}.${a}`}),{})}const nN="amplify-signin-with-hostedUI",Ao="CognitoIdentityServiceProvider";class O6{constructor(t){this.keyValueStorage=t}async clearOAuthInflightData(){nt(this.cognitoConfig);const t=To(Ao,this.cognitoConfig.userPoolClientId);await Promise.all([this.keyValueStorage.removeItem(t.inflightOAuth),this.keyValueStorage.removeItem(t.oauthPKCE),this.keyValueStorage.removeItem(t.oauthState)])}async clearOAuthData(){nt(this.cognitoConfig);const t=To(Ao,this.cognitoConfig.userPoolClientId);return await this.clearOAuthInflightData(),await this.keyValueStorage.removeItem(nN),this.keyValueStorage.removeItem(t.oauthSignIn)}loadOAuthState(){nt(this.cognitoConfig);const t=To(Ao,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthState)}storeOAuthState(t){nt(this.cognitoConfig);const n=To(Ao,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthState,t)}loadPKCE(){nt(this.cognitoConfig);const t=To(Ao,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.getItem(t.oauthPKCE)}storePKCE(t){nt(this.cognitoConfig);const n=To(Ao,this.cognitoConfig.userPoolClientId);return this.keyValueStorage.setItem(n.oauthPKCE,t)}setAuthConfig(t){this.cognitoConfig=t}async loadOAuthInFlight(){nt(this.cognitoConfig);const t=To(Ao,this.cognitoConfig.userPoolClientId);return await this.keyValueStorage.getItem(t.inflightOAuth)==="true"}async storeOAuthInFlight(t){nt(this.cognitoConfig);const n=To(Ao,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(n.inflightOAuth,`${t}`)}async loadOAuthSignIn(){nt(this.cognitoConfig);const t=To(Ao,this.cognitoConfig.userPoolClientId),n=await this.keyValueStorage.getItem(nN),[r,o]=(await this.keyValueStorage.getItem(t.oauthSignIn))?.split(",")??[];return{isOAuthSignIn:r==="true"||n==="true",preferPrivateSession:o==="true"}}async storeOAuthSignIn(t,n=!1){nt(this.cognitoConfig);const r=To(Ao,this.cognitoConfig.userPoolClientId);await this.keyValueStorage.setItem(r.oauthSignIn,`${t},${n}`)}}const To=(e,t)=>x_(mG)(e,t),ir=new O6(Hf),Fw=[],kG=e=>{Fw.push(e)},M6=()=>{for(;Fw.length;)Fw.pop()?.()};class DG{constructor(){this.waitForInflightOAuth=Yg()?async()=>{if(await ir.loadOAuthInFlight())return this.inflightPromise?this.inflightPromise:(this.inflightPromise=new Promise((t,n)=>{kG(t)}),this.inflightPromise)}:async()=>{}}setAuthConfig(t){ir.setAuthConfig(t.Cognito),this.authConfig=t}setTokenRefresher(t){this.tokenRefresher=t}setAuthTokenStore(t){this.tokenStore=t}getTokenStore(){if(!this.tokenStore)throw new Ue({name:"EmptyTokenStoreException",message:"TokenStore not set"});return this.tokenStore}getTokenRefresher(){if(!this.tokenRefresher)throw new Ue({name:"EmptyTokenRefresherException",message:"TokenRefresher not set"});return this.tokenRefresher}setClientMetadataProvider(t){this.clientMetadataProvider=t}async getTokens(t){let n;try{nt(this.authConfig?.Cognito)}catch{return null}await this.waitForInflightOAuth(),this.inflightPromise=void 0,n=await this.getTokenStore().loadTokens();const r=await this.getTokenStore().getLastAuthUser();if(n===null)return null;const o=!!n?.idToken&&MM({expiresAt:(n.idToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0}),a=MM({expiresAt:(n.accessToken?.payload?.exp??0)*1e3,clockDrift:n.clockDrift??0});return(t?.forceRefresh||o||a)&&(n=await this.refreshTokens({tokens:n,username:r,clientMetadata:t?.clientMetadata??await this.clientMetadataProvider?.()}),n===null)?null:{accessToken:n?.accessToken,idToken:n?.idToken,signInDetails:n?.signInDetails}}async refreshTokens({tokens:t,username:n,clientMetadata:r}){try{const{signInDetails:o}=t,a=await this.getTokenRefresher()({tokens:t,authConfig:this.authConfig,username:n,clientMetadata:r});return a.signInDetails=o,await this.setTokens({tokens:a}),Lo.dispatch("auth",{event:"tokenRefresh"},"Auth",Do),a}catch(o){return this.handleErrors(o)}}handleErrors(t){if(no(t),this.isAuthenticationError(t)&&this.clearTokens(),Lo.dispatch("auth",{event:"tokenRefresh_failure",data:{error:t}},"Auth",Do),t.name.startsWith("NotAuthorizedException"))return null;throw t}isAuthenticationError(t){return["NotAuthorizedException","TokenRevokedException","UserNotFoundException","PasswordResetRequiredException","UserNotConfirmedException","RefreshTokenReuseException"].some(r=>t?.name?.startsWith?.(r))}async setTokens({tokens:t}){return this.getTokenStore().storeTokens(t)}async clearTokens(){return this.getTokenStore().clearTokens()}getDeviceMetadata(t){return this.getTokenStore().getDeviceMetadata(t)}clearDeviceMetadata(t){return this.getTokenStore().clearDeviceMetadata(t)}setOAuthMetadata(t){return this.getTokenStore().setOAuthMetadata(t)}getOAuthMetadata(){return this.getTokenStore().getOAuthMetadata()}}class LG{constructor(){this.authTokenStore=new NG,this.authTokenStore.setKeyValueStorage(Hf),this.tokenOrchestrator=new DG,this.tokenOrchestrator.setAuthTokenStore(this.authTokenStore),this.tokenOrchestrator.setTokenRefresher(TG)}getTokens(t={}){return this.tokenOrchestrator.getTokens(t)}setKeyValueStorage(t){this.authTokenStore.setKeyValueStorage(t)}setClientMetadataProvider(t){this.tokenOrchestrator.setClientMetadataProvider(t)}setAuthConfig(t){this.authTokenStore.setAuthConfig(t),this.tokenOrchestrator.setAuthConfig(t)}}const Im=new LG,{tokenOrchestrator:fr}=Im;async function ka(e){if(e.AccessToken){const t=Ia(e.AccessToken),n=(t.payload.iat||0)*1e3,r=new Date().getTime(),o=n>0?n-r:0;let a,l,c;e.RefreshToken&&(l=e.RefreshToken),e.IdToken&&(a=Ia(e.IdToken)),e?.NewDeviceMetadata&&(c=e.NewDeviceMetadata);const d={accessToken:t,idToken:a,refreshToken:l,clockDrift:o,deviceMetadata:c,username:e.username};e?.signInDetails&&(d.signInDetails=e.signInDetails),await fr.setTokens({tokens:d})}else throw new dr({message:"Invalid tokens",name:"InvalidTokens",recoverySuggestion:"Check Cognito UserPool settings"})}const UG="Unable to get user session following successful sign-in.",Vs=async()=>{try{Lo.dispatch("auth",{event:"signedIn",data:await ev()},"Auth",Do)}catch(e){throw e.name===Jg?new Ue({name:dG,message:UG,recoverySuggestion:"This most likely is due to auth tokens not being persisted. If you are using cookie store, please ensure cookies can be correctly set from your server."}):e}};function N6(){return{active:!1}}const FG=(e,t)=>{switch(t.type){case"SET_USERNAME":return{...e,username:t.value};case"SET_SESSION":return{...e,session:t.value};case"START":return{...e,active:!0};case"RESET":return N6();default:return e}},zG=e=>{let t=e(N6(),{type:"RESET"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},_s=zG(FG),$G=180*1e3,Lp="CognitoSignInState",Ca={username:`${Lp}.username`,challengeName:`${Lp}.challengeName`,signInSession:`${Lp}.signInSession`,expiry:`${Lp}.expiry`},jG=(e,t)=>{switch(t.type){case"SET_SIGN_IN_SESSION":return Up({signInSession:t.value}),{...e,signInSession:t.value};case"SET_SIGN_IN_STATE":return Up(t.value),{...t.value};case"SET_CHALLENGE_NAME":return Up({challengeName:t.value}),{...e,challengeName:t.value};case"SET_USERNAME":return Up({username:t.value}),{...e,username:t.value};case"SET_INITIAL_STATE":return HG();case"RESET_STATE":return P6(),__();default:return e}},BG=e=>{const t=Number(e),n=Date.now();return t<=n},So=()=>{Fo.dispatch({type:"RESET_STATE"})},P6=()=>{for(const e of Object.values(Ca))Sa.removeItem(e)},__=()=>({username:void 0,challengeName:void 0,signInSession:void 0}),HG=()=>{const e=Sa.getItem(Ca.expiry);if(!e||BG(e))return P6(),__();const t=Sa.getItem(Ca.username)??void 0,n=Sa.getItem(Ca.challengeName)??void 0,r=Sa.getItem(Ca.signInSession)??void 0;return{username:t,challengeName:n,signInSession:r}},qG=e=>{let t=e(__(),{type:"SET_INITIAL_STATE"});return{getState:()=>t,dispatch:n=>{t=e(t,n)}}},Fo=qG(jG);function el(e){Fo.dispatch({type:"SET_SIGN_IN_STATE",value:e})}const Up=({challengeName:e,signInSession:t,username:n})=>{n&&Sa.setItem(Ca.username,n),e&&Sa.setItem(Ca.challengeName,e),t&&(Sa.setItem(Ca.signInSession,t),Sa.setItem(Ca.expiry,String(Date.now()+$G)))},rN="Passkeys may not be supported on this device. Ensure your application is running in a secure context (HTTPS) and Web Authentication API is supported.";class eo extends dr{constructor(t){super(t),this.constructor=eo,Object.setPrototypeOf(this,eo.prototype)}}var Mt;(function(e){e.PasskeyNotSupported="PasskeyNotSupported",e.PasskeyAlreadyExists="PasskeyAlreadyExists",e.InvalidPasskeyRegistrationOptions="InvalidPasskeyRegistrationOptions",e.InvalidPasskeyAuthenticationOptions="InvalidPasskeyAuthenticationOptions",e.RelyingPartyMismatch="RelyingPartyMismatch",e.PasskeyRegistrationFailed="PasskeyRegistrationFailed",e.PasskeyRetrievalFailed="PasskeyRetrievalFailed",e.PasskeyRegistrationCanceled="PasskeyRegistrationCanceled",e.PasskeyAuthenticationCanceled="PasskeyAuthenticationCanceled",e.PasskeyOperationAborted="PasskeyOperationAborted"})(Mt||(Mt={}));const X0="User may have canceled the ceremony or another interruption has occurred. Check underlying error for details.",oN="Ensure your user pool is configured to support the WEB_AUTHN as an authentication factor.",zc={[Mt.PasskeyNotSupported]:{message:"Passkeys may not be supported on this device.",recoverySuggestion:rN},[Mt.InvalidPasskeyRegistrationOptions]:{message:"Invalid passkey registration options.",recoverySuggestion:oN},[Mt.InvalidPasskeyAuthenticationOptions]:{message:"Invalid passkey authentication options.",recoverySuggestion:oN},[Mt.PasskeyRegistrationFailed]:{message:"Device failed to create passkey.",recoverySuggestion:rN},[Mt.PasskeyRetrievalFailed]:{message:"Device failed to retrieve passkey.",recoverySuggestion:"Passkeys may not be available on this device. Try an alternative authentication factor like PASSWORD, EMAIL_OTP, or SMS_OTP."},[Mt.PasskeyAlreadyExists]:{message:"Passkey already exists in authenticator.",recoverySuggestion:"Proceed with existing passkey or try again after deleting the credential."},[Mt.PasskeyRegistrationCanceled]:{message:"Passkey registration ceremony has been canceled.",recoverySuggestion:X0},[Mt.PasskeyAuthenticationCanceled]:{message:"Passkey authentication ceremony has been canceled.",recoverySuggestion:X0},[Mt.PasskeyOperationAborted]:{message:"Passkey operation has been aborted.",recoverySuggestion:X0},[Mt.RelyingPartyMismatch]:{message:"Relying party does not match current domain.",recoverySuggestion:"Ensure relying party identifier matches current domain."}},nu=Wg(zc,eo),k6=e=>{if(e instanceof Error){if(e.name==="AbortError"){const{message:t,recoverySuggestion:n}=zc[Mt.PasskeyOperationAborted];return new eo({name:Mt.PasskeyOperationAborted,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="SecurityError"){const{message:t,recoverySuggestion:n}=zc[Mt.RelyingPartyMismatch];return new eo({name:Mt.RelyingPartyMismatch,message:t,recoverySuggestion:n,underlyingError:e})}}return new eo({name:Ns.Unknown,message:"An unknown error has occurred.",underlyingError:e})},VG=e=>{if(e instanceof eo)return e;if(e instanceof Error&&e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=zc[Mt.PasskeyAuthenticationCanceled];return new eo({name:Mt.PasskeyAuthenticationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}return k6(e)},D6=()=>Yg()&&window.isSecureContext&&"credentials"in navigator&&typeof window.PublicKeyCredential=="function",Po=e=>Fc.convert(new Uint8Array(e),{urlSafe:!0,skipPadding:!0}),Jd=e=>Uint8Array.from(b_.convert(e,{urlSafe:!0}),t=>t.charCodeAt(0)).buffer,WG=e=>{const t=Jd(e.user.id),n=Jd(e.challenge),r=(e.excludeCredentials||[]).map(o=>({...o,id:Jd(o.id)}));return{...e,excludeCredentials:r,challenge:n,user:{...e.user,id:t}}},GG=e=>{const t={clientDataJSON:Po(e.response.clientDataJSON),attestationObject:Po(e.response.attestationObject),transports:e.response.getTransports(),publicKeyAlgorithm:e.response.getPublicKeyAlgorithm(),authenticatorData:Po(e.response.getAuthenticatorData())},n=e.response.getPublicKey();n&&(t.publicKey=Po(n));const r={type:e.type,id:e.id,rawId:Po(e.rawId),clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(r.authenticatorAttachment=e.authenticatorAttachment),r},KG=e=>{const t=Jd(e.challenge),n=(e.allowCredentials||[]).map(r=>({...r,id:Jd(r.id)}));return{...e,challenge:t,allowCredentials:n}},ZG=e=>{const t={clientDataJSON:Po(e.response.clientDataJSON),authenticatorData:Po(e.response.authenticatorData),signature:Po(e.response.signature)};e.response.userHandle&&(t.userHandle=Po(e.response.userHandle));const n={id:e.id,rawId:Po(e.rawId),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:t};return e.authenticatorAttachment&&(n.authenticatorAttachment=e.authenticatorAttachment),n};function YG(e){nu([!!e,!!e?.challenge,!!e?.user,!!e?.rp,!!e?.pubKeyCredParams].every(Boolean),Mt.InvalidPasskeyRegistrationOptions)}function QG(e){nu(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAttestationResponse,Mt.PasskeyRegistrationFailed)}function XG(e){nu(e&&e instanceof PublicKeyCredential&&e.response instanceof AuthenticatorAssertionResponse,Mt.PasskeyRetrievalFailed)}const JG=async e=>{try{const t=D6();nu(t,Mt.PasskeyNotSupported);const n=KG(e),r=await navigator.credentials.get({publicKey:n});return XG(r),ZG(r)}catch(t){throw VG(t)}},eK=e=>pn(An,In("ConfirmDevice"),jn(),{...Tn,...e}),Am={convert(e){return new TextEncoder().encode(e)}};function Ie(e,t){e!=null&&this.fromString(e,t)}function Xn(){return new Ie(null,null)}let Rs;const tK=0xdeadbeefcafe,aN=(tK&16777215)===15715070;function nK(e,t,n,r,o,a){for(;--a>=0;){const l=t*this[e++]+n[r]+o;o=Math.floor(l/67108864),n[r++]=l&67108863}return o}function rK(e,t,n,r,o,a){const l=t&32767,c=t>>15;for(;--a>=0;){let d=this[e]&32767;const f=this[e++]>>15,p=c*d+f*l;d=l*d+((p&32767)<<15)+n[r]+(o&1073741823),o=(d>>>30)+(p>>>15)+c*f+(o>>>30),n[r++]=d&1073741823}return o}function oK(e,t,n,r,o,a){const l=t&16383,c=t>>14;for(;--a>=0;){let d=this[e]&16383;const f=this[e++]>>14,p=c*d+f*l;d=l*d+((p&16383)<<14)+n[r]+o,o=(d>>28)+(p>>14)+c*f,n[r++]=d&268435455}return o}const sN=typeof navigator<"u";sN&&aN&&navigator.appName==="Microsoft Internet Explorer"?(Ie.prototype.am=rK,Rs=30):sN&&aN&&navigator.appName!=="Netscape"?(Ie.prototype.am=nK,Rs=26):(Ie.prototype.am=oK,Rs=28);Ie.prototype.DB=Rs;Ie.prototype.DM=(1<<Rs)-1;Ie.prototype.DV=1<<Rs;const I_=52;Ie.prototype.FV=Math.pow(2,I_);Ie.prototype.F1=I_-Rs;Ie.prototype.F2=2*Rs-I_;const aK="0123456789abcdefghijklmnopqrstuvwxyz",tv=[];let ru,Qr;ru=48;for(Qr=0;Qr<=9;++Qr)tv[ru++]=Qr;ru=97;for(Qr=10;Qr<36;++Qr)tv[ru++]=Qr;ru=65;for(Qr=10;Qr<36;++Qr)tv[ru++]=Qr;function iN(e){return aK.charAt(e)}function sK(e,t){const n=tv[e.charCodeAt(t)];return n??-1}function iK(e){for(let t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function lK(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function A_(e){const t=Xn();return t.fromInt(e),t}function cK(e,t){let n;if(t===16)n=4;else if(t===8)n=3;else if(t===2)n=1;else if(t===32)n=5;else if(t===4)n=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");this.t=0,this.s=0;let r=e.length,o=!1,a=0;for(;--r>=0;){const l=sK(e,r);if(l<0){e.charAt(r)==="-"&&(o=!0);continue}o=!1,a===0?this[this.t++]=l:a+n>this.DB?(this[this.t-1]|=(l&(1<<this.DB-a)-1)<<a,this[this.t++]=l>>this.DB-a):this[this.t-1]|=l<<a,a+=n,a>=this.DB&&(a-=this.DB)}this.clamp(),o&&Ie.ZERO.subTo(this,this)}function uK(){const e=this.s&this.DM;for(;this.t>0&&this[this.t-1]==e;)--this.t}function dK(e){if(this.s<0)return"-"+this.negate().toString(e);let t;if(e==16)t=4;else if(e===8)t=3;else if(e===2)t=1;else if(e===32)t=5;else if(e===4)t=2;else throw new Error("Only radix 2, 4, 8, 16, 32 are supported");const n=(1<<t)-1;let r,o=!1,a="",l=this.t,c=this.DB-l*this.DB%t;if(l-- >0)for(c<this.DB&&(r=this[l]>>c)>0&&(o=!0,a=iN(r));l>=0;)c<t?(r=(this[l]&(1<<c)-1)<<t-c,r|=this[--l]>>(c+=this.DB-t)):(r=this[l]>>(c-=t)&n,c<=0&&(c+=this.DB,--l)),r>0&&(o=!0),o&&(a+=iN(r));return o?a:"0"}function fK(){const e=Xn();return Ie.ZERO.subTo(this,e),e}function hK(){return this.s<0?this.negate():this}function pK(e){let t=this.s-e.s;if(t!=0)return t;let n=this.t;if(t=n-e.t,t!=0)return this.s<0?-t:t;for(;--n>=0;)if((t=this[n]-e[n])!=0)return t;return 0}function T_(e){let t=1,n;return(n=e>>>16)!==0&&(e=n,t+=16),(n=e>>8)!==0&&(e=n,t+=8),(n=e>>4)!==0&&(e=n,t+=4),(n=e>>2)!==0&&(e=n,t+=2),(n=e>>1)!==0&&(e=n,t+=1),t}function mK(){return this.t<=0?0:this.DB*(this.t-1)+T_(this[this.t-1]^this.s&this.DM)}function gK(e,t){let n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function vK(e,t){for(let n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s}function yK(e,t){const n=e%this.DB,r=this.DB-n,o=(1<<r)-1,a=Math.floor(e/this.DB);let l=this.s<<n&this.DM,c;for(c=this.t-1;c>=0;--c)t[c+a+1]=this[c]>>r|l,l=(this[c]&o)<<n;for(c=a-1;c>=0;--c)t[c]=0;t[a]=l,t.t=this.t+a+1,t.s=this.s,t.clamp()}function bK(e,t){t.s=this.s;const n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}const r=e%this.DB,o=this.DB-r,a=(1<<r)-1;t[0]=this[n]>>r;for(let l=n+1;l<this.t;++l)t[l-n-1]|=(this[l]&a)<<o,t[l-n]=this[l]>>r;r>0&&(t[this.t-n-1]|=(this.s&a)<<o),t.t=this.t-n,t.clamp()}function SK(e,t){let n=0,r=0;const o=Math.min(e.t,this.t);for(;n<o;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()}function CK(e,t){const n=this.abs(),r=e.abs();let o=n.t;for(t.t=o+r.t;--o>=0;)t[o]=0;for(o=0;o<r.t;++o)t[o+n.t]=n.am(0,r[o],t,o,0,n.t);t.s=0,t.clamp(),this.s!==e.s&&Ie.ZERO.subTo(t,t)}function EK(e){const t=this.abs();let n=e.t=2*t.t;for(;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){const r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()}function wK(e,t,n){const r=e.abs();if(r.t<=0)return;const o=this.abs();if(o.t<r.t){t?.fromInt(0),n!=null&&this.copyTo(n);return}n===null&&(n=Xn());const a=Xn(),l=this.s,c=e.s,d=this.DB-T_(r[r.t-1]);d>0?(r.lShiftTo(d,a),o.lShiftTo(d,n)):(r.copyTo(a),o.copyTo(n));const f=a.t,p=a[f-1];if(p===0)return;const m=p*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),g=this.FV/m,v=(1<<this.F1)/m,S=1<<this.F2;let C=n.t,w=C-f;const x=t===null?Xn():t;for(a.dlShiftTo(w,x),n.compareTo(x)>=0&&(n[n.t++]=1,n.subTo(x,n)),Ie.ONE.dlShiftTo(f,x),x.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--w>=0;){let I=n[--C]===p?this.DM:Math.floor(n[C]*g+(n[C-1]+S)*v);if((n[C]+=a.am(0,I,n,w,0,f))<I)for(a.dlShiftTo(w,x),n.subTo(x,n);n[C]<--I;)n.subTo(x,n)}t!==null&&(n.drShiftTo(f,t),l!==c&&Ie.ZERO.subTo(t,t)),n.t=f,n.clamp(),d>0&&n.rShiftTo(d,n),l<0&&Ie.ZERO.subTo(n,n)}function xK(e){const t=Xn();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(Ie.ZERO)>0&&e.subTo(t,t),t}function _K(){if(this.t<1)return 0;const e=this[0];if((e&1)===0)return 0;let t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function IK(e){return this.compareTo(e)===0}function AK(e,t){let n=0,r=0;const o=Math.min(e.t,this.t);for(;n<o;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()}function TK(e){const t=Xn();return this.addTo(e,t),t}function RK(e){const t=Xn();return this.subTo(e,t),t}function OK(e){const t=Xn();return this.multiplyTo(e,t),t}function MK(e){const t=Xn();return this.divRemTo(e,t,null),t}function ou(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function NK(e){const t=Xn();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(Ie.ZERO)>0&&this.m.subTo(t,t),t}function PK(e){const t=Xn();return e.copyTo(t),this.reduce(t),t}function kK(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(let t=0;t<this.m.t;++t){let n=e[t]&32767;const r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function DK(e,t){e.squareTo(t),this.reduce(t)}function LK(e,t,n){e.multiplyTo(t,n),this.reduce(n)}ou.prototype.convert=NK;ou.prototype.revert=PK;ou.prototype.reduce=kK;ou.prototype.mulTo=LK;ou.prototype.sqrTo=DK;function UK(e,t,n){let r=e.bitLength(),o,a=A_(1);const l=new ou(t);if(r<=0)return a;r<18?o=1:r<48?o=3:r<144?o=4:r<768?o=5:o=6;const c=[];let d=3;const f=o-1,p=(1<<o)-1;if(c[1]=l.convert(this),o>1){const x=Xn();for(l.sqrTo(c[1],x);d<=p;)c[d]=Xn(),l.mulTo(x,c[d-2],c[d]),d+=2}let m=e.t-1,g,v=!0,S=Xn(),C;for(r=T_(e[m])-1;m>=0;){for(r>=f?g=e[m]>>r-f&p:(g=(e[m]&(1<<r+1)-1)<<f-r,m>0&&(g|=e[m-1]>>this.DB+r-f)),d=o;(g&1)===0;)g>>=1,--d;if((r-=d)<0&&(r+=this.DB,--m),v)c[g].copyTo(a),v=!1;else{for(;d>1;)l.sqrTo(a,S),l.sqrTo(S,a),d-=2;d>0?l.sqrTo(a,S):(C=a,a=S,S=C),l.mulTo(S,c[g],a)}for(;m>=0&&(e[m]&1<<r)===0;)l.sqrTo(a,S),C=a,a=S,S=C,--r<0&&(r=this.DB-1,--m)}const w=l.revert(a);return n(null,w),w}Ie.prototype.copyTo=iK;Ie.prototype.fromInt=lK;Ie.prototype.fromString=cK;Ie.prototype.clamp=uK;Ie.prototype.dlShiftTo=gK;Ie.prototype.drShiftTo=vK;Ie.prototype.lShiftTo=yK;Ie.prototype.rShiftTo=bK;Ie.prototype.subTo=SK;Ie.prototype.multiplyTo=CK;Ie.prototype.squareTo=EK;Ie.prototype.divRemTo=wK;Ie.prototype.invDigit=_K;Ie.prototype.addTo=AK;Ie.prototype.toString=dK;Ie.prototype.negate=fK;Ie.prototype.abs=hK;Ie.prototype.compareTo=pK;Ie.prototype.bitLength=mK;Ie.prototype.mod=xK;Ie.prototype.equals=IK;Ie.prototype.add=TK;Ie.prototype.subtract=RK;Ie.prototype.multiply=OK;Ie.prototype.divide=MK;Ie.prototype.modPow=UK;Ie.ZERO=A_(0);Ie.ONE=A_(1);const FK=async({a:e,g:t,k:n,x:r,B:o,N:a,U:l})=>new Promise((c,d)=>{t.modPow(r,a,(f,p)=>{if(f){d(f);return}o.subtract(n.multiply(p)).modPow(e.add(l.multiply(r)),a,(m,g)=>{if(m){d(m);return}c(g.mod(a))})})}),zK="FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF",L6={},zw={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),L6[e]=t,zw[t]=e}const $c=e=>{if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(r in zw)t[n/2]=zw[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t},R_=e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=L6[e[n]];return t},$w=e=>{const t=new ji;t.update(e);const n=t.digestSync(),r=R_(n);return new Array(64-r.length).join("0")+r},Tm=e=>$w($c(e)),$K=/^[89a-f]/i,va=e=>{if(!(e instanceof Ie))throw new Error("Not a BigInteger");const t=e.compareTo(Ie.ZERO)<0;let n=e.abs().toString(16);if(n=n.length%2!==0?`0${n}`:n,n=$K.test(n)?`00${n}`:n,t){const r=n.split("").map(a=>{const l=~parseInt(a,16)&15;return"0123456789ABCDEF".charAt(l)}).join("");n=new Ie(r,16).add(Ie.ONE).toString(16),n.toUpperCase().startsWith("FF8")&&(n=n.substring(2))}return n},jK=({A:e,B:t})=>{const n=new Ie(Tm(va(e)+va(t)),16);if(n.equals(Ie.ZERO))throw new Error("U cannot be zero.");return n},BK=(e,t,n)=>{const r=new ji(t);r.update(e);const o=r.digestSync(),a=new ji(o);return a.update(n),a.digestSync().slice(0,16)},O_=e=>{const t=new w_().random(e).toString();return $c(t)},HK=()=>Fc.convert(O_(40));class qK{constructor({userPoolName:t,a:n,g:r,A:o,N:a}){this.encoder=Am,this.userPoolName=t,this.a=n,this.g=r,this.A=o,this.N=a,this.k=new Ie(Tm(`${va(a)}${va(r)}`),16)}getRandomPassword(){if(!this.randomPassword)throw new Ue({name:"EmptyBigIntegerRandomPassword",message:"random password is empty"});return this.randomPassword}getSaltToHashDevices(){if(!this.saltToHashDevices)throw new Ue({name:"EmptyBigIntegersaltToHashDevices",message:"saltToHashDevices is empty"});return this.saltToHashDevices}getVerifierDevices(){if(!this.verifierDevices)throw new Ue({name:"EmptyBigIntegerVerifierDevices",message:"verifyDevices is empty"});return this.verifierDevices}async generateHashDevice(t,n){this.randomPassword=HK();const r=`${t}${n}:${this.randomPassword}`,o=$w(r),a=R_(O_(16));return this.saltToHashDevices=va(new Ie(a,16)),new Promise((l,c)=>{this.g.modPow(new Ie(Tm(this.saltToHashDevices+o),16),this.N,(d,f)=>{if(d){c(d);return}this.verifierDevices=va(f),l()})})}async getPasswordAuthenticationKey({username:t,password:n,serverBValue:r,salt:o}){if(r.mod(this.N).equals(Ie.ZERO))throw new Error("B cannot be zero.");const a=jK({A:this.A,B:r}),l=`${this.userPoolName}${t}:${n}`,c=$w(l),d=new Ie(Tm(va(o)+c),16),f=await FK({a:this.a,g:this.g,k:this.k,x:d,B:r,N:this.N,U:a}),p=this.encoder.convert("Caldera Derived Key"),m=this.encoder.convert(""),g=new Uint8Array(p.byteLength+m.byteLength);return g.set(p,0),g.set(m,p.byteLength),BK($c(va(f)),$c(va(a)),g)}}const VK=async({a:e,g:t,N:n})=>new Promise((r,o)=>{t.modPow(e,n,(a,l)=>{if(a){o(a);return}if(l.mod(n).equals(Ie.ZERO)){o(new Error("Illegal parameter. A mod N cannot be 0."));return}r(l)})}),Vf=async e=>{const t=new Ie(zK,16),n=new Ie("2",16),r=WK(),o=await VK({a:r,g:n,N:t});return new qK({userPoolName:e,a:r,g:n,A:o,N:t})},WK=()=>{const e=R_(O_(128));return new Ie(e,16)};async function tl({userPoolId:e,userPoolEndpoint:t,newDeviceMetadata:n,accessToken:r}){if(!n)return;const o=e.split("_")[1]||"",a=await Vf(o),l=n?.DeviceKey,c=n?.DeviceGroupKey;try{await a.generateHashDevice(c??"",l??"")}catch{return}const d={Salt:Fc.convert($c(a.getSaltToHashDevices())),PasswordVerifier:Fc.convert($c(a.getVerifierDevices()))},f=a.getRandomPassword();try{return await eK({endpointResolver:ft({endpointOverride:t})})({region:dt(e)},{AccessToken:r,DeviceName:await YW(),DeviceKey:n?.DeviceKey,DeviceSecretVerifierConfig:d}),{deviceKey:l,deviceGroupKey:c,randomPassword:f}}catch{return}}async function GK(e){const t=Pt.getConfig().Auth?.Cognito;nt(t);const{username:n,signInSession:r,signInDetails:o,challengeName:a}=Fo.getState();if(a!=="WEB_AUTHN"||!n)throw new Ue({name:Uo.SignInException,message:"Unable to proceed due to invalid sign in state."});const{CREDENTIAL_REQUEST_OPTIONS:l}=e;nu(!!l,Mt.InvalidPasskeyAuthenticationOptions);const c=await JG(JSON.parse(l)),d=Mr({endpointResolver:ft({endpointOverride:t.userPoolEndpoint})}),{ChallengeName:f,ChallengeParameters:p,AuthenticationResult:m,Session:g}=await d({region:dt(t.userPoolId),userAgentValue:xt(We.ConfirmSignIn)},{ChallengeName:"WEB_AUTHN",ChallengeResponses:{USERNAME:n,CREDENTIAL:JSON.stringify(c)},ClientId:t.userPoolClientId,Session:r});if(el({signInSession:g,username:n,challengeName:f,signInDetails:o}),m)return await ka({...m,username:n,NewDeviceMetadata:await tl({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:m.NewDeviceMetadata,accessToken:m.AccessToken}),signInDetails:o}),Fo.dispatch({type:"RESET_STATE"}),await Vs(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}};if(f==="WEB_AUTHN")throw new Ue({name:Uo.SignInException,message:"Sequential WEB_AUTHN challenges returned from underlying service cannot be handled."});return{challengeName:f,challengeParameters:p}}function Rn({username:e,userPoolId:t,userPoolClientId:n}){if(typeof window>"u")return;const r=window.AmazonCognitoAdvancedSecurityData;if(typeof r>"u")return;const o=r.getData(e,t,n);return o?{EncodedData:o}:{}}const KK=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ZK=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],U6=()=>{const e=new Date,t=ZK[e.getUTCDay()],n=KK[e.getUTCMonth()],r=e.getUTCDate();let o=e.getUTCHours();o<10&&(o=`0${o}`);let a=e.getUTCMinutes();a<10&&(a=`0${a}`);let l=e.getUTCSeconds();l<10&&(l=`0${l}`);const c=e.getUTCFullYear();return`${t} ${n} ${r} ${o}:${a}:${l} UTC ${c}`},F6=({userPoolName:e,username:t,challengeParameters:n,dateNow:r,hkdf:o})=>{const a=Am.convert(e),l=Am.convert(t),c=YK(n.SECRET_BLOCK),d=Am.convert(r),f=new Uint8Array(a.byteLength+l.byteLength+c.byteLength+d.byteLength);f.set(a,0),f.set(l,a.byteLength),f.set(c,a.byteLength+l.byteLength),f.set(d,a.byteLength+l.byteLength+c.byteLength);const p=new ji(o);p.update(f);const m=p.digestSync();return Fc.convert(m)},YK=e=>{const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=b_.convert(n),o=new Uint8Array(r.length);for(let a=0;a<r.length;++a)o[a]=r.charCodeAt(a);return o};async function Wf({username:e,config:t,clientMetadata:n,session:r,tokenOrchestrator:o}){const{userPoolId:a,userPoolEndpoint:l}=t,c=t.userPoolClientId,d=await o?.getDeviceMetadata(e);A6(d);const f=await Vf(d.deviceGroupKey),p={USERNAME:e,SRP_A:f.A.toString(16),DEVICE_KEY:d.deviceKey},m={ChallengeName:"DEVICE_SRP_AUTH",ClientId:c,ChallengeResponses:p,ClientMetadata:n,Session:r},g=Mr({endpointResolver:ft({endpointOverride:l})}),{ChallengeParameters:v,Session:S}=await g({region:dt(a)},m);return QK(e,v,n,S,f,t,o)}async function QK(e,t,n,r,o,{userPoolId:a,userPoolClientId:l,userPoolEndpoint:c},d){const f=await d?.getDeviceMetadata(e);A6(f);const p=new Ie(t?.SRP_B,16),m=new Ie(t?.SALT,16),{deviceKey:g}=f,{deviceGroupKey:v}=f,S=await o.getPasswordAuthenticationKey({username:f.deviceKey,password:f.randomPassword,serverBValue:p,salt:m}),C=U6(),w={USERNAME:t?.USERNAME??e,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:C,PASSWORD_CLAIM_SIGNATURE:F6({username:g,userPoolName:v,challengeParameters:t,dateNow:C,hkdf:S}),DEVICE_KEY:g},x=Rn({username:e,userPoolId:a,userPoolClientId:l}),I={ChallengeName:"DEVICE_PASSWORD_VERIFIER",ClientId:l,ChallengeResponses:w,Session:r,ClientMetadata:n,UserContextData:x};return Mr({endpointResolver:ft({endpointOverride:c})})({region:dt(a)},I)}async function M_(e,t,n,r,o,a,l){const{userPoolId:c,userPoolClientId:d,userPoolEndpoint:f}=a,p=c?.split("_")[1]||"",m=new Ie(t?.SRP_B,16),g=new Ie(t?.SALT,16),v=t?.USER_ID_FOR_SRP;if(!v)throw new Ue({name:"EmptyUserIdForSRPException",message:"USER_ID_FOR_SRP was not found in challengeParameters"});const S=await o.getPasswordAuthenticationKey({username:v,password:e,serverBValue:m,salt:g}),C=U6(),w={USERNAME:v,PASSWORD_CLAIM_SECRET_BLOCK:t?.SECRET_BLOCK,TIMESTAMP:C,PASSWORD_CLAIM_SIGNATURE:F6({username:v,userPoolName:p,challengeParameters:t,dateNow:C,hkdf:S})},x=await l.getDeviceMetadata(v);x&&x.deviceKey&&(w.DEVICE_KEY=x.deviceKey);const I=Rn({username:v,userPoolId:c,userPoolClientId:d}),T={ChallengeName:"PASSWORD_VERIFIER",ChallengeResponses:w,ClientMetadata:n,Session:r,ClientId:d,UserContextData:I},D=await Mr({endpointResolver:ft({endpointOverride:f})})({region:dt(c)},T);return D.ChallengeName==="DEVICE_SRP_AUTH"?Wf({username:v,config:a,clientMetadata:n,session:D.Session,tokenOrchestrator:l}):D}async function au(e,t,n,r){try{return await e(...t)}catch(o){if(o instanceof Ue&&o.name==="ResourceNotFoundException"&&o.message.includes("Device does not exist."))return await r.clearDeviceMetadata(n),e(...t);throw o}}function nl(e){const{dispatch:t}=Fo;t({type:"SET_USERNAME",value:e})}async function z6({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:a,preferredChallenge:l}){const{userPoolId:c,userPoolClientId:d,userPoolEndpoint:f}=r,p=c?.split("_")[1]||"",m=await Vf(p),g={USERNAME:e,SRP_A:m.A.toString(16)};a==="USER_AUTH"&&l&&(g.PREFERRED_CHALLENGE=l);const v=Rn({username:e,userPoolId:c,userPoolClientId:d}),S={AuthFlow:a,AuthParameters:g,ClientMetadata:n,ClientId:d,UserContextData:v},w=await qf({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:xt(We.SignIn)},S),{ChallengeParameters:x,Session:I}=w,T=x?.USERNAME??e;return nl(T),w.ChallengeName==="PASSWORD_VERIFIER"?au(M_,[t,x,n,I,m,r,o],T,o):w}async function XK({username:e,session:t,selectedChallenge:n,config:r,clientMetadata:o}){return Mr({endpointResolver:ft({endpointOverride:r.userPoolEndpoint})})({region:dt(r.userPoolId),userAgentValue:xt(We.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:{USERNAME:e,ANSWER:n},ClientId:r.userPoolClientId,Session:t,ClientMetadata:o})}async function JK(e,t,n,r,o){const{userPoolId:a,userPoolClientId:l,userPoolEndpoint:c}=r,d={ANSWER:"PASSWORD",USERNAME:e,PASSWORD:t},f=Rn({username:e,userPoolId:a,userPoolClientId:l}),m=await Mr({endpointResolver:ft({endpointOverride:c})})({region:dt(a),userAgentValue:xt(We.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:d,ClientId:l,ClientMetadata:n,Session:o,UserContextData:f}),g=m.ChallengeParameters?.USERNAME??e;return nl(g),m}async function eZ(e,t,n,r,o,a){const{userPoolId:l,userPoolClientId:c,userPoolEndpoint:d}=r,f=l.split("_")[1]||"",p=await Vf(f),m={ANSWER:"PASSWORD_SRP",USERNAME:e,SRP_A:p.A.toString(16)},g=Rn({username:e,userPoolId:l,userPoolClientId:c}),S=await Mr({endpointResolver:ft({endpointOverride:d})})({region:dt(l),userAgentValue:xt(We.ConfirmSignIn)},{ChallengeName:"SELECT_CHALLENGE",ChallengeResponses:m,ClientId:c,ClientMetadata:n,Session:o,UserContextData:g}),C=S.ChallengeParameters?.USERNAME??e;return nl(C),S.ChallengeName==="PASSWORD_VERIFIER"?au(M_,[t,S.ChallengeParameters,n,S.Session,p,r,a],C,a):S}const jw="userAttributes.";function tZ(e){return"isSignedIn"in e&&"nextStep"in e}async function nZ({challengeResponse:e,clientMetadata:t,session:n,username:r,config:o,tokenOrchestrator:a}){const{userPoolId:l,userPoolClientId:c,userPoolEndpoint:d}=o,f={USERNAME:r,ANSWER:e},p=await a?.getDeviceMetadata(r);p&&p.deviceKey&&(f.DEVICE_KEY=p.deviceKey);const m=Rn({username:r,userPoolId:l,userPoolClientId:c}),g={ChallengeName:"CUSTOM_CHALLENGE",ChallengeResponses:f,Session:n,ClientMetadata:t,ClientId:c,UserContextData:m},S=await Mr({endpointResolver:ft({endpointOverride:d})})({region:dt(l),userAgentValue:xt(We.ConfirmSignIn)},g);return S.ChallengeName==="DEVICE_SRP_AUTH"?Wf({username:r,config:o,clientMetadata:t,session:S.Session,tokenOrchestrator:a}):S}async function rZ({challengeResponse:e,username:t,clientMetadata:n,session:r,deviceName:o,config:a}){const{userPoolId:l,userPoolClientId:c,userPoolEndpoint:d}=a;if(e==="EMAIL")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["EMAIL_OTP"]'},$metadata:{}};if(e==="TOTP")return{ChallengeName:"MFA_SETUP",Session:r,ChallengeParameters:{MFAS_CAN_SETUP:'["SOFTWARE_TOKEN_MFA"]'},$metadata:{}};const f={USERNAME:t};if(/^\d+$/.test(e)){const g=wG({endpointResolver:ft({endpointOverride:d})}),{Session:v}=await g({region:dt(l),userAgentValue:xt(We.ConfirmSignIn)},{UserCode:e,Session:r,FriendlyDeviceName:o});Fo.dispatch({type:"SET_SIGN_IN_SESSION",value:v});const S={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:v,ClientMetadata:n,ClientId:c};return Mr({endpointResolver:ft({endpointOverride:d})})({region:dt(l),userAgentValue:xt(We.ConfirmSignIn)},S)}if(e.includes("@")){f.EMAIL=e;const g={ChallengeName:"MFA_SETUP",ChallengeResponses:f,Session:r,ClientMetadata:n,ClientId:c};return Mr({endpointResolver:ft({endpointOverride:d})})({region:dt(l),userAgentValue:xt(We.ConfirmSignIn)},g)}throw new Ue({name:Uo.SignInException,message:`Cannot proceed with MFA setup using challengeResponse: ${e}`,recoverySuggestion:'Try passing "EMAIL", "TOTP", a valid email, or OTP code as the challengeResponse.'})}async function oZ({challengeResponse:e,username:t,clientMetadata:n,session:r,config:o}){const{userPoolId:a,userPoolClientId:l,userPoolEndpoint:c}=o;en(e==="TOTP"||e==="SMS"||e==="EMAIL",Ve.IncorrectMFAMethod);const d={USERNAME:t,ANSWER:pZ(e)},f=Rn({username:t,userPoolId:a,userPoolClientId:l}),p={ChallengeName:"SELECT_MFA_TYPE",ChallengeResponses:d,Session:r,ClientMetadata:n,ClientId:l,UserContextData:f};return Mr({endpointResolver:ft({endpointOverride:c})})({region:dt(a),userAgentValue:xt(We.ConfirmSignIn)},p)}async function aZ({challengeResponse:e,clientMetadata:t,session:n,username:r,requiredAttributes:o,config:a}){const{userPoolId:l,userPoolClientId:c,userPoolEndpoint:d}=a,f={...fZ(o),NEW_PASSWORD:e,USERNAME:r},p=Rn({username:r,userPoolId:l,userPoolClientId:c}),m={ChallengeName:"NEW_PASSWORD_REQUIRED",ChallengeResponses:f,ClientMetadata:t,Session:n,ClientId:c,UserContextData:p};return Mr({endpointResolver:ft({endpointOverride:d})})({region:dt(l),userAgentValue:xt(We.ConfirmSignIn)},m)}async function sZ(e,t,n,r,o){const{userPoolClientId:a,userPoolId:l,userPoolEndpoint:c}=r,d={USERNAME:e,PASSWORD:t},f=await o.getDeviceMetadata(e);f&&f.deviceKey&&(d.DEVICE_KEY=f.deviceKey);const p=Rn({username:e,userPoolId:l,userPoolClientId:a}),m={AuthFlow:"USER_PASSWORD_AUTH",AuthParameters:d,ClientMetadata:n,ClientId:a,UserContextData:p},v=await qf({endpointResolver:ft({endpointOverride:c})})({region:dt(l),userAgentValue:xt(We.SignIn)},m),S=v.ChallengeParameters?.USERNAME??v.ChallengeParameters?.USER_ID_FOR_SRP??e;return nl(S),v.ChallengeName==="DEVICE_SRP_AUTH"?Wf({username:S,config:r,clientMetadata:n,session:v.Session,tokenOrchestrator:o}):v}async function iZ(e,t,n,r,o){return z6({username:e,password:t,clientMetadata:n,config:r,tokenOrchestrator:o,authFlow:"USER_SRP_AUTH"})}async function lZ(e,t,n,r){const{userPoolClientId:o,userPoolId:a,userPoolEndpoint:l}=n,c={USERNAME:e},d=await r.getDeviceMetadata(e);d&&d.deviceKey&&(c.DEVICE_KEY=d.deviceKey);const f=Rn({username:e,userPoolId:a,userPoolClientId:o}),p={AuthFlow:"CUSTOM_AUTH",AuthParameters:c,ClientMetadata:t,ClientId:o,UserContextData:f},g=await qf({endpointResolver:ft({endpointOverride:l})})({region:dt(a),userAgentValue:xt(We.SignIn)},p),v=g.ChallengeParameters?.USERNAME??e;return nl(v),g.ChallengeName==="DEVICE_SRP_AUTH"?Wf({username:v,config:n,clientMetadata:t,session:g.Session,tokenOrchestrator:r}):g}async function cZ(e,t,n,r,o){nt(r);const{userPoolId:a,userPoolClientId:l,userPoolEndpoint:c}=r,d=a?.split("_")[1]||"",f=await Vf(d),p={USERNAME:e,SRP_A:f.A.toString(16),CHALLENGE_NAME:"SRP_A"},m=Rn({username:e,userPoolId:a,userPoolClientId:l}),g={AuthFlow:"CUSTOM_AUTH",AuthParameters:p,ClientMetadata:n,ClientId:l,UserContextData:m},v=qf({endpointResolver:ft({endpointOverride:c})}),{ChallengeParameters:S,Session:C}=await v({region:dt(a),userAgentValue:xt(We.SignIn)},g),w=S?.USERNAME??e;return nl(w),au(M_,[t,S,n,C,f,r,o],w,o)}async function rl(e){const{challengeName:t,challengeParameters:n,availableChallenges:r}=e,o=Pt.getConfig().Auth?.Cognito;switch(nt(o),t){case"CUSTOM_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_CUSTOM_CHALLENGE",additionalInfo:n}};case"MFA_SETUP":{const{signInSession:a,username:l}=Fo.getState(),c=lN(cN(n.MFAS_CAN_SETUP))||[],d=gZ(c),f=d.includes("TOTP"),p=d.includes("EMAIL");if(f&&p)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION",allowedMFATypes:d}};if(p)return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"}};if(f){const m=xG({endpointResolver:ft({endpointOverride:o.userPoolEndpoint})}),{Session:g,SecretCode:v}=await m({region:dt(o.userPoolId)},{Session:a});return Fo.dispatch({type:"SET_SIGN_IN_SESSION",value:g}),{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_TOTP_SETUP",totpSetupDetails:uZ(v,l)}}}throw new Ue({name:Uo.SignInException,message:`Cannot initiate MFA setup from available types: ${c}`})}case"NEW_PASSWORD_REQUIRED":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",missingAttributes:dZ(n.requiredAttributes)}};case"SELECT_MFA_TYPE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_MFA_SELECTION",allowedMFATypes:lN(cN(n.MFAS_CAN_CHOOSE))}};case"SMS_OTP":case"SMS_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_SMS_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"SOFTWARE_TOKEN_MFA":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_TOTP_CODE"}};case"EMAIL_OTP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_EMAIL_CODE",codeDeliveryDetails:{deliveryMedium:n.CODE_DELIVERY_DELIVERY_MEDIUM,destination:n.CODE_DELIVERY_DESTINATION}}};case"WEB_AUTHN":{const a=await GK(n);return tZ(a)?a:rl(a)}case"PASSWORD":case"PASSWORD_SRP":return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_IN_WITH_PASSWORD"}};case"SELECT_CHALLENGE":return{isSignedIn:!1,nextStep:{signInStep:"CONTINUE_SIGN_IN_WITH_FIRST_FACTOR_SELECTION",availableChallenges:r}}}throw new Ue({name:Uo.SignInException,message:`An error occurred during the sign in process. ${t} challengeName returned by the underlying service was not addressed.`})}function uZ(e,t){return{sharedSecret:e,getSetupUri:(n,r)=>{const o=`otpauth://totp/${n}:${r??t}?secret=${e}&issuer=${n}`;return new qs(o)}}}function su(e){if(e===Ym.PasswordResetRequiredException)return{isSignedIn:!1,nextStep:{signInStep:"RESET_PASSWORD"}};if(e===Ym.UserNotConfirmedException)return{isSignedIn:!1,nextStep:{signInStep:"CONFIRM_SIGN_UP"}}}function dZ(e){return e?JSON.parse(e).map(n=>n.includes(jw)?n.replace(jw,""):n):[]}function fZ(e){if(!e)return{};const t={};return Object.entries(e).forEach(([n,r])=>{r&&(t[`${jw}${n}`]=r)}),t}async function hZ(e,t,n,r,o,a,l,c){const d=c?.userAttributes,f=c?.friendlyDeviceName;switch(t){case"WEB_AUTHN":case"SELECT_CHALLENGE":return r==="PASSWORD_SRP"||r==="PASSWORD"?{ChallengeName:r,Session:n,$metadata:{}}:XK({username:e,session:n,selectedChallenge:r,config:o,clientMetadata:l});case"SELECT_MFA_TYPE":return oZ({challengeResponse:r,clientMetadata:l,session:n,username:e,config:o});case"MFA_SETUP":return rZ({challengeResponse:r,clientMetadata:l,session:n,username:e,deviceName:f,config:o});case"NEW_PASSWORD_REQUIRED":return aZ({challengeResponse:r,clientMetadata:l,session:n,username:e,requiredAttributes:d,config:o});case"CUSTOM_CHALLENGE":return au(nZ,[{challengeResponse:r,clientMetadata:l,session:n,username:e,config:o,tokenOrchestrator:a}],e,a);case"SMS_MFA":case"SOFTWARE_TOKEN_MFA":case"SMS_OTP":case"EMAIL_OTP":return vZ({challengeName:t,challengeResponse:r,clientMetadata:l,session:n,username:e,config:o,tokenOrchestrator:a});case"PASSWORD":return JK(e,r,l,o,n);case"PASSWORD_SRP":return eZ(e,r,l,o,n,a)}throw new Ue({name:Uo.SignInException,message:`An error occurred during the sign in process.
5
+ ${t} challengeName returned by the underlying service was not addressed.`})}function pZ(e){let t="SMS_MFA";return e==="TOTP"&&(t="SOFTWARE_TOKEN_MFA"),e==="EMAIL"&&(t="EMAIL_OTP"),t}function mZ(e){if(e==="SMS_MFA")return"SMS";if(e==="SOFTWARE_TOKEN_MFA")return"TOTP";if(e==="EMAIL_OTP")return"EMAIL"}function lN(e){if(e)return e.map(mZ).filter(Boolean)}function cN(e){return e?JSON.parse(e):[]}function gZ(e){return e.filter(t=>t==="EMAIL"||t==="TOTP")}async function $6(){let e;try{e=await ev()}catch{}if(e&&e.userId&&e.username)throw new Ue({name:tG,message:"There is already a signed in user.",recoverySuggestion:"Call signOut before calling signIn again."})}function Gf(e){return Fo.getState().username??e}async function vZ({challengeName:e,challengeResponse:t,clientMetadata:n,session:r,username:o,config:a,tokenOrchestrator:l}){const{userPoolId:c,userPoolClientId:d,userPoolEndpoint:f}=a,p={USERNAME:o};e==="EMAIL_OTP"&&(p.EMAIL_OTP_CODE=t),e==="SMS_MFA"&&(p.SMS_MFA_CODE=t),e==="SMS_OTP"&&(p.SMS_OTP_CODE=t),e==="SOFTWARE_TOKEN_MFA"&&(p.SOFTWARE_TOKEN_MFA_CODE=t);const m=await l?.getDeviceMetadata(o);m&&m.deviceKey&&(p.DEVICE_KEY=m.deviceKey);const g=Rn({username:o,userPoolId:c,userPoolClientId:d}),v={ChallengeName:e,ChallengeResponses:p,Session:r,ClientMetadata:n,ClientId:d,UserContextData:g},C=await Mr({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:xt(We.ConfirmSignIn)},v);return C.ChallengeName==="DEVICE_SRP_AUTH"?Wf({username:o,config:a,clientMetadata:n,session:C.Session,tokenOrchestrator:l}):C}async function yZ(e){const t=Pt.getConfig().Auth?.Cognito;nt(t);const{username:n,password:r,options:o}=e,a={loginId:n,authFlowType:"CUSTOM_WITHOUT_SRP"},l=o?.clientMetadata;en(!!n,Ve.EmptySignInUsername),en(!r,Ve.CustomAuthSignInPassword);try{const{ChallengeName:c,ChallengeParameters:d,AuthenticationResult:f,Session:p}=await au(lZ,[n,l,t,fr],n,fr),m=Gf(n);return el({signInSession:p,username:m,challengeName:c,signInDetails:a}),f?(await ka({username:m,...f,NewDeviceMetadata:await tl({userPoolId:t.userPoolId,userPoolEndpoint:t.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:a}),So(),await Vs(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):rl({challengeName:c,challengeParameters:d})}catch(c){So(),no(c);const d=su(c.name);if(d)return d;throw c}}async function bZ(e){const{username:t,password:n,options:r}=e,o={loginId:t,authFlowType:"CUSTOM_WITH_SRP"},a=Pt.getConfig().Auth?.Cognito;nt(a);const l=r?.clientMetadata;en(!!t,Ve.EmptySignInUsername),en(!!n,Ve.EmptySignInPassword);try{const{ChallengeName:c,ChallengeParameters:d,AuthenticationResult:f,Session:p}=await cZ(t,n,l,a,fr),m=Gf(t);return el({signInSession:p,username:m,challengeName:c,signInDetails:o}),f?(await ka({username:m,...f,NewDeviceMetadata:await tl({userPoolId:a.userPoolId,userPoolEndpoint:a.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:o}),So(),await Vs(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):rl({challengeName:c,challengeParameters:d})}catch(c){So(),no(c);const d=su(c.name);if(d)return d;throw c}}const j6=async()=>{throw new Ue({name:_6,message:"The autoSignIn flow has not started, or has been cancelled/completed.",recoverySuggestion:"Please try to use the signIn API or log out before starting a new autoSignIn flow."})};let N_=j6;function Bw(e){N_=e}function cr(e=!0){e&&(N_=j6),_s.dispatch({type:"RESET"})}async function uN(e){const{username:t,password:n}=e,r=Pt.getConfig().Auth?.Cognito,o={loginId:t,authFlowType:"USER_SRP_AUTH"};nt(r);const a=e.options?.clientMetadata;en(!!t,Ve.EmptySignInUsername),en(!!n,Ve.EmptySignInPassword);try{const{ChallengeName:l,ChallengeParameters:c,AuthenticationResult:d,Session:f}=await iZ(t,n,a,r,fr),p=Gf(t);return el({signInSession:f,username:p,challengeName:l,signInDetails:o}),d?(await ka({username:p,...d,NewDeviceMetadata:await tl({userPoolId:r.userPoolId,userPoolEndpoint:r.userPoolEndpoint,newDeviceMetadata:d.NewDeviceMetadata,accessToken:d.AccessToken}),signInDetails:o}),So(),await Vs(),cr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):rl({challengeName:l,challengeParameters:c})}catch(l){So(),cr(),no(l);const c=su(l.name);if(c)return c;throw l}}async function SZ(e){const{username:t,password:n,options:r}=e,o=Pt.getConfig().Auth?.Cognito,a={loginId:t,authFlowType:"USER_PASSWORD_AUTH"};nt(o);const l=r?.clientMetadata;en(!!t,Ve.EmptySignInUsername),en(!!n,Ve.EmptySignInPassword);try{const{ChallengeName:c,ChallengeParameters:d,AuthenticationResult:f,Session:p}=await au(sZ,[t,n,l,o,fr],t,fr),m=Gf(t);return el({signInSession:p,username:m,challengeName:c,signInDetails:a}),f?(await ka({...f,username:m,NewDeviceMetadata:await tl({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:f.NewDeviceMetadata,accessToken:f.AccessToken}),signInDetails:a}),So(),await Vs(),cr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):rl({challengeName:c,challengeParameters:d})}catch(c){So(),cr(),no(c);const d=su(c.name);if(d)return d;throw c}}async function CZ({username:e,clientMetadata:t,config:n,tokenOrchestrator:r,preferredChallenge:o,password:a,session:l}){const{userPoolId:c,userPoolClientId:d,userPoolEndpoint:f}=n,p=Rn({username:e,userPoolId:c,userPoolClientId:d}),m={USERNAME:e};if(o){if(n.passwordless&&(o==="EMAIL_OTP"&&!n.passwordless.emailOtpEnabled||o==="SMS_OTP"&&!n.passwordless.smsOtpEnabled||o==="WEB_AUTHN"&&!n.passwordless.webAuthn)&&en(!1,Ve.InvalidPreferredChallenge),o==="PASSWORD_SRP")return en(!!a,Ve.EmptySignInPassword),z6({username:e,password:a,clientMetadata:t,config:n,tokenOrchestrator:r,authFlow:"USER_AUTH",preferredChallenge:o});o==="PASSWORD"&&(en(!!a,Ve.EmptySignInPassword),m.PASSWORD=a),m.PREFERRED_CHALLENGE=o}const g={AuthFlow:"USER_AUTH",AuthParameters:m,ClientMetadata:t,ClientId:d,UserContextData:p};l&&(g.Session=l);const S=await qf({endpointResolver:ft({endpointOverride:f})})({region:dt(c),userAgentValue:xt(We.SignIn)},g);return nl(e),S}async function B6(e){const{username:t,password:n,options:r}=e,o=Pt.getConfig().Auth?.Cognito,a={loginId:t,authFlowType:"USER_AUTH"};nt(o);const l=r?.clientMetadata,c=r?.preferredChallenge??o?.passwordless?.preferredChallenge;en(!!t,Ve.EmptySignInUsername);try{const d={username:t,config:o,tokenOrchestrator:fr,clientMetadata:l,preferredChallenge:c,password:n},f=_s.getState();f.active&&f.username===t&&(d.session=f.session);const p=await CZ(d),m=Gf(t);return el({signInSession:p.Session,username:m,challengeName:p.ChallengeName,signInDetails:a}),p.AuthenticationResult?(await ka({username:m,...p.AuthenticationResult,NewDeviceMetadata:await tl({userPoolId:o.userPoolId,userPoolEndpoint:o.userPoolEndpoint,newDeviceMetadata:p.AuthenticationResult.NewDeviceMetadata,accessToken:p.AuthenticationResult.AccessToken}),signInDetails:a}),So(),await Vs(),cr(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):rl({challengeName:p.ChallengeName,challengeParameters:p.ChallengeParameters,availableChallenges:"AvailableChallenges"in p?p.AvailableChallenges:void 0})}catch(d){So(),cr(),no(d);const f=su(d.name);if(f)return f;throw d}}async function P_(e){cr(!1);const t=e.options?.authFlowType;switch(await $6(),t){case"USER_SRP_AUTH":return uN(e);case"USER_PASSWORD_AUTH":return SZ(e);case"CUSTOM_WITHOUT_SRP":return yZ(e);case"CUSTOM_WITH_SRP":return bZ(e);case"USER_AUTH":return B6(e);default:return uN(e)}}const H6=180*1e3;function EZ(e){const t=Zm.listen("auth-internal",async({payload:r})=>{r.event==="confirmSignUp"&&r.data?.isSignUpComplete&&(Zm.dispatch("auth-internal",{event:"autoSignIn"}),Bw(V6(e)),t())}),n=setTimeout(()=>{t(),clearTimeout(n),cr()},H6)}function q6(e,t){let n;return r=>{n||e(...r),clearTimeout(n),n=setTimeout(()=>{n=void 0},t)}}function wZ(e,t,n){const r=Date.now(),o=setInterval(async()=>{if(Date.now()-r>H6)clearInterval(o),n(new Ue({name:_6,message:"The account was not confirmed on time.",recoverySuggestion:"Try to verify your account by clicking the link sent your email or phone and then login manually."})),cr();else try{const c=await P_(e);c.nextStep.signInStep!=="CONFIRM_SIGN_UP"&&(t(c),clearInterval(o),cr())}catch(c){clearInterval(o),n(c),cr()}},5e3)}const xZ=q6(wZ,300),_Z=q6(AZ,300);function IZ(e){return async()=>new Promise((t,n)=>{xZ([e,t,n])})}async function AZ(e,t,n){try{const r=e?.options?.authFlowType==="USER_AUTH"?await B6(e):await P_(e);t(r),cr()}catch(r){n(r),cr()}}function V6(e){return async()=>new Promise((t,n)=>{_Z([e,t,n])})}const TZ=V6,RZ=()=>async e=>{if(e.statusCode>=300){const t=await eu(e);if(no(t),t.name===Uw.InvalidParameterException&&/'password'/.test(t.message)&&/Member must not be null/.test(t.message)){const n=Ve.EmptySignUpPassword,{message:r,recoverySuggestion:o}=x6[n];throw new Ue({name:n,message:r,recoverySuggestion:o})}throw new Ue({name:t.name,message:t.message})}return Bf(e)},OZ=e=>pn(An,In("SignUp"),RZ(),{...Tn,...e});async function MZ(e){const{username:t,password:n,options:r}=e,o=Pt.getConfig().Auth?.Cognito,a=o?.signUpVerificationMethod??"code",{clientMetadata:l,validationData:c,autoSignIn:d}=e.options??{};nt(o),en(!!t,Ve.EmptySignUpUsername);const f=typeof d!="boolean"?d:void 0,p={username:t,options:f};f?.authFlowType!=="CUSTOM_WITHOUT_SRP"&&(p.password=n);const{userPoolId:m,userPoolClientId:g,userPoolEndpoint:v}=o,S=OZ({endpointResolver:ft({endpointOverride:v})}),C={Username:t,Password:void 0,UserAttributes:r?.userAttributes&&NM(r?.userAttributes),ClientMetadata:l,ValidationData:c&&NM(c),ClientId:g,UserContextData:Rn({username:t,userPoolId:m,userPoolClientId:g})};n&&(C.Password=n);const{UserSub:w,CodeDeliveryDetails:x,UserConfirmed:I,Session:T}=await S({region:dt(m),userAgentValue:xt(We.SignUp)},C);(f||d===!0)&&(_s.dispatch({type:"START"}),_s.dispatch({type:"SET_USERNAME",value:t}),_s.dispatch({type:"SET_SESSION",value:T}));const O={destination:x?.Destination,deliveryMedium:x?.DeliveryMedium,attributeName:x?.AttributeName},D=!!I,P=_s.getState().active;if(D)return P?(Bw(TZ(p)),{isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"},userId:w}):{isSignUpComplete:!0,nextStep:{signUpStep:"DONE"},userId:w};if(P){if(a==="link")return Bw(IZ(p)),{isSignUpComplete:!1,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN",codeDeliveryDetails:O},userId:w};EZ(p)}return{isSignUpComplete:!1,nextStep:{signUpStep:"CONFIRM_SIGN_UP",codeDeliveryDetails:O},userId:w}}const NZ=e=>pn(An,In("ForgotPassword"),jn(),{...Tn,...e});async function W6(e){const{username:t}=e;en(!!t,Ve.EmptyResetPasswordUsername);const n=Pt.getConfig().Auth?.Cognito;nt(n);const{userPoolClientId:r,userPoolId:o,userPoolEndpoint:a}=n,l=e.options?.clientMetadata,c=Rn({username:t,userPoolId:o,userPoolClientId:r}),p=(await NZ({endpointResolver:ft({endpointOverride:a})})({region:dt(o),userAgentValue:xt(We.ResetPassword)},{Username:t,ClientMetadata:l,ClientId:r,UserContextData:c})).CodeDeliveryDetails;return{isPasswordReset:!1,nextStep:{resetPasswordStep:"CONFIRM_RESET_PASSWORD_WITH_CODE",codeDeliveryDetails:{deliveryMedium:p?.DeliveryMedium,destination:p?.Destination,attributeName:p?.AttributeName}}}}const PZ=e=>pn(An,In("ConfirmForgotPassword"),jn(),{...Tn,...e});async function kZ(e){const t=Pt.getConfig().Auth?.Cognito;nt(t);const{userPoolClientId:n,userPoolId:r,userPoolEndpoint:o}=t,{username:a,newPassword:l}=e;en(!!a,Ve.EmptyConfirmResetPasswordUsername),en(!!l,Ve.EmptyConfirmResetPasswordNewPassword);const c=e.confirmationCode;en(!!c,Ve.EmptyConfirmResetPasswordConfirmationCode);const d=e.options?.clientMetadata,f=Rn({username:a,userPoolId:r,userPoolClientId:n});await PZ({endpointResolver:ft({endpointOverride:o})})({region:dt(t.userPoolId),userAgentValue:xt(We.ConfirmResetPassword)},{Username:a,ConfirmationCode:c,Password:l,ClientMetadata:d,ClientId:t.userPoolClientId,UserContextData:f})}const DZ=e=>pn(An,In("ResendConfirmationCode"),jn(),{...Tn,...e});async function LZ(e){const{username:t}=e;en(!!t,Ve.EmptySignUpUsername);const n=Pt.getConfig().Auth?.Cognito;nt(n);const{userPoolClientId:r,userPoolId:o,userPoolEndpoint:a}=n,l=e.options?.clientMetadata,c=Rn({username:t,userPoolId:o,userPoolClientId:r}),d=DZ({endpointResolver:ft({endpointOverride:a})}),{CodeDeliveryDetails:f}=await d({region:dt(n.userPoolId),userAgentValue:xt(We.ResendSignUpCode)},{Username:t,ClientMetadata:l,ClientId:n.userPoolClientId,UserContextData:c}),{DeliveryMedium:p,AttributeName:m,Destination:g}={...f};return{destination:g,deliveryMedium:p,attributeName:m||void 0}}const UZ=e=>pn(An,In("ConfirmSignUp"),jn(),{...Tn,...e});async function FZ(e){const{username:t,confirmationCode:n,options:r}=e,o=Pt.getConfig().Auth?.Cognito;nt(o);const{userPoolId:a,userPoolClientId:l,userPoolEndpoint:c}=o,d=r?.clientMetadata;en(!!t,Ve.EmptyConfirmSignUpUsername),en(!!n,Ve.EmptyConfirmSignUpCode);const f=Rn({username:t,userPoolId:a,userPoolClientId:l}),p=UZ({endpointResolver:ft({endpointOverride:c})}),{Session:m}=await p({region:dt(o.userPoolId),userAgentValue:xt(We.ConfirmSignUp)},{Username:t,ConfirmationCode:n,ClientMetadata:d,ForceAliasCreation:r?.forceAliasCreation,ClientId:o.userPoolClientId,UserContextData:f});return new Promise((g,v)=>{try{const S={isSignUpComplete:!0,nextStep:{signUpStep:"DONE"}},C=_s.getState();if(!C.active||C.username!==t){g(S),cr();return}_s.dispatch({type:"SET_SESSION",value:m});const w=Zm.listen("auth-internal",({payload:x})=>{x.event==="autoSignIn"&&(g({isSignUpComplete:!0,nextStep:{signUpStep:"COMPLETE_AUTO_SIGN_IN"}}),w())});Zm.dispatch("auth-internal",{event:"confirmSignUp",data:S})}catch(S){v(S)}})}async function G6(e){const{challengeResponse:t,options:n}=e,{username:r,challengeName:o,signInSession:a,signInDetails:l}=Fo.getState(),c=Pt.getConfig().Auth?.Cognito;nt(c);const d=n?.clientMetadata;if(en(!!t,Ve.EmptyChallengeResponse),!r||!o||!a)throw new Ue({name:Uo.SignInException,message:`
6
+ An error occurred during the sign in process.
7
+
8
+ This most likely occurred due to:
9
+ 1. signIn was not called before confirmSignIn.
10
+ 2. signIn threw an exception.
11
+ 3. page was refreshed during the sign in flow and session has expired.
12
+ `,recoverySuggestion:"Make sure a successful call to signIn is made before calling confirmSignInand that the session has not expired."});try{const{Session:f,ChallengeName:p,AuthenticationResult:m,ChallengeParameters:g}=await hZ(r,o,a,t,c,fr,d,n);return el({signInSession:f,username:r,challengeName:p,signInDetails:l}),m?(await ka({username:r,...m,NewDeviceMetadata:await tl({userPoolId:c.userPoolId,userPoolEndpoint:c.userPoolEndpoint,newDeviceMetadata:m.NewDeviceMetadata,accessToken:m.AccessToken}),signInDetails:l}),So(),await Vs(),{isSignedIn:!0,nextStep:{signInStep:"DONE"}}):rl({challengeName:p,challengeParameters:g})}catch(f){no(f);const p=su(f.name);if(p)return p;throw f}}const zZ=e=>pn(An,In("GetUser"),jn(),{...Tn,...e}),$Z=e=>pn(An,In("VerifyUserAttribute"),jn(),{...Tn,...e});async function jZ(e){const t=Pt.getConfig().Auth?.Cognito;nt(t);const{userPoolEndpoint:n,userPoolId:r}=t,{confirmationCode:o,userAttributeKey:a}=e;en(!!o,Ve.EmptyConfirmUserAttributeCode);const{tokens:l}=await Qg({forceRefresh:!1});tu(l),await $Z({endpointResolver:ft({endpointOverride:n})})({region:dt(r),userAgentValue:xt(We.ConfirmUserAttribute)},{AccessToken:l.accessToken.toString(),AttributeName:a,Code:o})}new $n("AuthError");const BZ={oauthSignInError:{message:_n.OAUTH_ERROR,log:"Make sure Cognito Hosted UI has been configured correctly"},noConfig:{message:_n.DEFAULT_MSG},missingAuthConfig:{message:_n.DEFAULT_MSG},emptyUsername:{message:_n.EMPTY_USERNAME},invalidUsername:{message:_n.INVALID_USERNAME},emptyPassword:{message:_n.EMPTY_PASSWORD},emptyCode:{message:_n.EMPTY_CODE},signUpError:{message:_n.SIGN_UP_ERROR},noMFA:{message:_n.NO_MFA},invalidMFA:{message:_n.INVALID_MFA},emptyChallengeResponse:{message:_n.EMPTY_CHALLENGE},noUserSession:{message:_n.NO_USER_SESSION},deviceConfig:{message:_n.DEVICE_CONFIG},networkError:{message:_n.NETWORK_ERROR},autoSignInError:{message:_n.AUTOSIGNIN_ERROR},default:{message:_n.DEFAULT_MSG}},Ps=(e,t)=>new Ue({message:e??"An error has occurred during the oauth process.",name:Uo.OAuthSignInError,recoverySuggestion:BZ.oauthSignInError.log});var Hw;(function(e){e.NoConfig="noConfig",e.MissingAuthConfig="missingAuthConfig",e.EmptyUsername="emptyUsername",e.InvalidUsername="invalidUsername",e.EmptyPassword="emptyPassword",e.EmptyCode="emptyCode",e.SignUpError="signUpError",e.NoMFA="noMFA",e.InvalidMFA="invalidMFA",e.EmptyChallengeResponse="emptyChallengeResponse",e.NoUserSession="noUserSession",e.Default="default",e.DeviceConfig="deviceConfig",e.NetworkError="networkError",e.AutoSignInError="autoSignInError",e.OAuthSignInError="oauthSignInError"})(Hw||(Hw={}));const HZ="`signInWithRedirect` has been canceled.",qZ="An error occurred while validating the state.",VZ="Try to initiate an OAuth flow from Amplify",K6=async e=>{const t=await ir.loadOAuthState(),n=e===t?t:void 0;if(!n)throw new Ue({name:Hw.OAuthSignInError,message:e===null?HZ:qZ,recoverySuggestion:e===null?void 0:VZ});return n},Z6=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,responseType:o,domain:a,preferPrivateSession:l})=>{const c=new qs(e),d=c.searchParams.get("error"),f=c.searchParams.get("error_description");if(d)throw Ps(f??d);return o==="code"?WZ({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,domain:a,preferPrivateSession:l}):GZ({currentUrl:e,redirectUri:r,preferPrivateSession:l})},WZ=async({currentUrl:e,userAgentValue:t,clientId:n,redirectUri:r,domain:o,preferPrivateSession:a})=>{const l=new qs(e),c=l.searchParams.get("code"),d=l.searchParams.get("state");if(!c||!d)throw Ps("User cancelled OAuth flow.");const f=await K6(d),p="https://"+o+"/oauth2/token",m=await ir.loadPKCE(),g={grant_type:"authorization_code",code:c,client_id:n,redirect_uri:r,...m?{code_verifier:m}:{}},v=Object.entries(g).map(([P,M])=>`${encodeURIComponent(P)}=${encodeURIComponent(M)}`).join("&"),{access_token:S,refresh_token:C,id_token:w,error:x,error_message:I,token_type:T,expires_in:O}=await(await fetch(p,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded",[Yq]:t},body:v})).json();if(x)throw Ps(I??x);const D=(S&&Ia(S).payload.username)??"username";return await ka({username:D,AccessToken:S,IdToken:w,RefreshToken:C}),Y6({redirectUri:r,state:f,preferPrivateSession:a})},GZ=async({currentUrl:e,redirectUri:t,preferPrivateSession:n})=>{const r=new qs(e),{id_token:o,access_token:a,state:l,token_type:c,expires_in:d,error_description:f,error:p}=(r.hash??"#").substring(1).split("&").map(v=>v.split("=")).reduce((v,[S,C])=>({...v,[S]:C}),{id_token:void 0,access_token:void 0,state:void 0,token_type:void 0,expires_in:void 0,error_description:void 0,error:void 0});if(p)throw Ps(f??p);if(!a)throw Ps("No access token returned from OAuth flow.");const m=await K6(l),g=(a&&Ia(a).payload.username)??"username";return await ka({username:g,AccessToken:a,IdToken:o}),Y6({redirectUri:t,state:m,preferPrivateSession:n})},Y6=async({redirectUri:e,state:t,preferPrivateSession:n})=>{await fr.setOAuthMetadata({oauthSignIn:!0}),await ir.clearOAuthData(),await ir.storeOAuthSignIn(!0,n),M6(),YZ(e),KZ(t)&&Lo.dispatch("auth",{event:"customOAuthState",data:GW(ZZ(t))},"Auth",Do),Lo.dispatch("auth",{event:"signInWithRedirect"},"Auth",Do),await Vs()},KZ=e=>/-/.test(e),ZZ=e=>e.split("-").splice(1).join("-"),YZ=e=>{typeof window<"u"&&typeof window.history<"u"&&window.history.replaceState(window.history.state,"",e)};function k_(e,t){{const n=e?.find(QZ)??e?.find(XZ),r=e?.find(eY)??e?.find(JZ);if(n)return n;throw r?lG:sG}}const QZ=e=>e.startsWith(String(window.location.origin+(window.location.pathname||"/"))),XZ=e=>e.includes(String(window.location.hostname)),JZ=e=>e.startsWith("http://"),eY=e=>e.startsWith("https://"),D_=async e=>{M6(),await ir.clearOAuthInflightData(),Lo.dispatch("auth",{event:"signInWithRedirect_failure",data:{error:e}},"Auth",Do)},tY=async e=>{try{nt(e),Gg(e),ir.setAuthConfig(e)}catch{return}if(await ir.loadOAuthInFlight())try{const t=window.location.href,{loginWith:n,userPoolClientId:r}=e,{domain:o,redirectSignIn:a,responseType:l}=n.oauth,c=k_(a);await Z6({currentUrl:t,clientId:r,domain:o,redirectUri:c,responseType:l,userAgentValue:xt(We.SignInWithRedirect)})}catch(t){await D_(t)}};Yg()&&Pt[t6](tY);const nY={Google:"Google",Facebook:"Facebook",Amazon:"LoginWithAmazon",Apple:"SignInWithApple"},Q6=async e=>{window?.location&&(window.location.href=e.replace("http://","https://"))},dN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",rY=e=>{const t=new Uint8Array(e);y_().getRandomValues(t);let n="",r;for(const o of t)n+=dN.charAt(o%dN.length);return{value:n,method:"S256",toCodeChallenge(){return r||(r=oY(n),r)}}};function oY(e){const t=new ji;return t.update(e),aY(Fc.convert(t.digestSync(),{urlSafe:!0}))}function aY(e){return e.replace(/=/g,"")}const sY=()=>WW(32),iY=e=>{async function t(n){if(n.persisted&&await e.loadOAuthInFlight()){const o=Ps("User cancelled OAuth flow.");await D_(o)}window.removeEventListener("pageshow",t)}window.addEventListener("pageshow",t)};async function X6(e){const t=Pt.getConfig().Auth?.Cognito;nt(t),Gg(t),ir.setAuthConfig(t),e?.options?.prompt||await $6();let n="COGNITO",r;return typeof e?.provider=="string"?n=nY[e.provider]:e?.provider?.custom?n=e.provider.custom:e?.provider?.idpIdentifier&&({idpIdentifier:r}=e.provider),lY({oauthConfig:t.loginWith.oauth,clientId:t.userPoolClientId,provider:n,idpIdentifier:r,customState:e?.customState,preferPrivateSession:e?.options?.preferPrivateSession,options:{loginHint:e?.options?.loginHint,lang:e?.options?.lang,nonce:e?.options?.nonce,prompt:e?.options?.prompt},authSessionOpener:e?.options?.authSessionOpener})}const lY=async({oauthConfig:e,provider:t,idpIdentifier:n,clientId:r,customState:o,preferPrivateSession:a,options:l,authSessionOpener:c})=>{const{domain:d,redirectSignIn:f,responseType:p,scopes:m}=e,{loginHint:g,lang:v,nonce:S,prompt:C}=l??{},w=sY(),x=c||Q6,I=o?`${w}-${KW(o)}`:w,{value:T,method:O,toCodeChallenge:D}=rY(128),P=k_(e.redirectSignIn);Yg()&&ir.storeOAuthInFlight(!0),ir.storeOAuthState(I),ir.storePKCE(T);const M=new URLSearchParams;M.append("redirect_uri",P),M.append("response_type",p),M.append("client_id",r),n?M.append("idp_identifier",n):M.append("identity_provider",t),M.append("scope",m.join(" ")),g&&M.append("login_hint",g),v&&M.append("lang",v),S&&M.append("nonce",S),C&&M.append("prompt",C.toLowerCase()),M.append("state",I),p==="code"&&(M.append("code_challenge",D()),M.append("code_challenge_method",O));const L=`https://${d}/oauth2/authorize?${M.toString()}`;iY(ir);const{type:z,error:G,url:j}=await x(L,f,a)??{};try{if(z==="error")throw Ps(String(G));if(z==="canceled")throw Ps(String(z));z==="success"&&j&&await Z6({currentUrl:j,clientId:r,domain:d,redirectUri:P,responseType:p,userAgentValue:xt(We.SignInWithRedirect),preferPrivateSession:a})}catch(F){throw await D_(F),F}},cY=async e=>{const t=e.getConfig().Auth?.Cognito;nt(t);const{userPoolEndpoint:n,userPoolId:r}=t,{tokens:o}=await i6(e,{forceRefresh:!1});tu(o);const a=zZ({endpointResolver:ft({endpointOverride:n})}),{UserAttributes:l}=await a({region:dt(r),userAgentValue:xt(We.FetchUserAttributes)},{AccessToken:o.accessToken.toString()});return eG(l)},J6=()=>cY(Pt),uY=async e=>{await e.clearOAuthData(),fr.clearTokens(),await l6(),Lo.dispatch("auth",{event:"signedOut"},"Auth",Do)},dY=async(e,t=!1,n)=>{Gg(e);const{loginWith:r,userPoolClientId:o}=e,{domain:a,redirectSignOut:l}=r.oauth,c=k_(l),d=`https://${a}/logout?${Object.entries({client_id:o,logout_uri:encodeURIComponent(c)}).map(([f,p])=>`${f}=${p}`).join("&")}`;return Q6(d)},fY=async(e,t,n,r)=>{const{isOAuthSignIn:o}=await t.loadOAuthSignIn(),a=await n.getOAuthMetadata();if(await uY(t),o||a?.oauthSignIn)return dY(e,!1)},hY=e=>pn(An,In("RevokeToken"),jn(),{...Tn,...e}),pY=new $n("Auth");async function mY(e){const t=Pt.getConfig().Auth?.Cognito;nt(t),await gY(t);let n;try{Gg(t),n=!0}catch{n=!1}if(n){const r=new O6(Hf);r.setAuthConfig(t);const{type:o}=await fY(t,r,fr)??{};if(o==="error")throw new Ue({name:cG,message:"An error occurred when attempting to log out from OAuth provider."})}else fr.clearTokens(),await l6(),Lo.dispatch("auth",{event:"signedOut"},"Auth",Do)}async function gY(e){try{const{userPoolEndpoint:t,userPoolId:n,userPoolClientId:r}=e,o=await fr.getTokenStore().loadTokens();I6(o),vY(o.accessToken)&&await hY({endpointResolver:ft({endpointOverride:t})})({region:dt(n),userAgentValue:xt(We.SignOut)},{ClientId:r,Token:o.refreshToken})}catch{pY.debug("Client signOut error caught but will proceed with token removal")}}const vY=e=>!!e?.payload?.origin_jti,yY=e=>pn(An,In("GetUserAttributeVerificationCode"),jn(),{...Tn,...e}),bY=async e=>{const{userAttributeKey:t,options:n}=e,r=Pt.getConfig().Auth?.Cognito,o=n?.clientMetadata;nt(r);const{userPoolEndpoint:a,userPoolId:l}=r,{tokens:c}=await Qg({forceRefresh:!1});tu(c);const d=yY({endpointResolver:ft({endpointOverride:a})}),{CodeDeliveryDetails:f}=await d({region:dt(l),userAgentValue:xt(We.SendUserAttributeVerificationCode)},{AccessToken:c.accessToken.toString(),ClientMetadata:o,AttributeName:t}),{DeliveryMedium:p,AttributeName:m,Destination:g}={...f};return{destination:g,deliveryMedium:p,attributeName:m}},SY={identityId:"identityId"},CY=new $n("DefaultIdentityIdStore");class eU{setAuthConfig(t){xm(t.Cognito),this.authConfig=t,this._authKeys=EY("Cognito",t.Cognito.identityPoolId)}constructor(t){this._authKeys={},this._hasGuestIdentityId=!1,this.keyValueStorage=t}async loadIdentityId(){xm(this.authConfig?.Cognito);try{if(this._primaryIdentityId)return{id:this._primaryIdentityId,type:"primary"};{const t=await this.keyValueStorage.getItem(this._authKeys.identityId);return t?(this._hasGuestIdentityId=!0,{id:t,type:"guest"}):null}}catch(t){return CY.log("Error getting stored IdentityId.",t),null}}async storeIdentityId(t){xm(this.authConfig?.Cognito),t.type==="guest"?(this.keyValueStorage.setItem(this._authKeys.identityId,t.id),this._primaryIdentityId=void 0,this._hasGuestIdentityId=!0):(this._primaryIdentityId=t.id,this._hasGuestIdentityId&&(this.keyValueStorage.removeItem(this._authKeys.identityId),this._hasGuestIdentityId=!1))}async clearIdentityId(){this._primaryIdentityId=void 0,await this.keyValueStorage.removeItem(this._authKeys.identityId)}}const EY=(e,t)=>x_(SY)(`com.amplify.${e}`,t),qw=({endpointOverride:e})=>t=>e?{url:new qs(e)}:DW(t);function tU(e){const t=Ia(e).payload.iss,n={};if(!t)throw new Ue({name:"InvalidIdTokenException",message:"Invalid Idtoken."});const r=t.replace(/(^\w+:|^)\/\//,"");return n[r]=e,n}async function wY({tokens:e,authConfig:t,identityIdStore:n}){n.setAuthConfig({Cognito:t});const r=await n.loadIdentityId();if(r)return r.id;const o=e?.idToken?tU(e.idToken.toString()):{},a=await xY(o,t);return n.storeIdentityId({id:a,type:e?"primary":"guest"}),a}async function xY(e,t){const n=t?.identityPoolId,r=Lw(n),o=NW({endpointResolver:qw({endpointOverride:t.identityPoolEndpoint})});let a;try{a=(await o({region:r},{IdentityPoolId:n,Logins:e})).IdentityId}catch(l){throw no(l),new Ue(l)}if(!a)throw new Ue({name:"GetIdResponseException",message:"Received undefined response from getId operation",recoverySuggestion:"Make sure to pass a valid identityPoolId in the configuration."});return a}const Fp=new $n("CognitoCredentialsProvider"),fN=3e3*1e3;class nU{constructor(t){this._nextCredentialsRefresh=0,this._identityIdStore=t}async clearCredentialsAndIdentityId(){Fp.debug("Clearing out credentials and identityId"),this._credentialsAndIdentityId=void 0,await this._identityIdStore.clearIdentityId()}async clearCredentials(){Fp.debug("Clearing out in-memory credentials"),this._credentialsAndIdentityId=void 0}async getCredentialsAndIdentityId(t){const n=t.authenticated,{tokens:r}=t,{authConfig:o}=t;try{xm(o?.Cognito)}catch{return}if(!n&&!o.Cognito.allowGuestAccess)return;const{forceRefresh:a}=t,l=this.hasTokenChanged(r),c=await wY({tokens:r,authConfig:o.Cognito,identityIdStore:this._identityIdStore});return(a||l)&&this.clearCredentials(),n?(fG(r),this.credsForOIDCTokens(o.Cognito,r,c)):this.getGuestCredentials(c,o.Cognito)}async getGuestCredentials(t,n){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!1)return Fp.info("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const r=Lw(n.identityPoolId),o=RM({endpointResolver:qw({endpointOverride:n.identityPoolEndpoint})});let a;try{a=await o({region:r},{IdentityId:t})}catch(l){throw no(l),new Ue(l)}if(a?.Credentials?.AccessKeyId&&a?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+fN;const l={credentials:{accessKeyId:a.Credentials.AccessKeyId,secretAccessKey:a.Credentials.SecretKey,sessionToken:a.Credentials.SessionToken,expiration:a.Credentials.Expiration},identityId:t};return a.IdentityId&&(l.identityId=a.IdentityId,this._identityIdStore.storeIdentityId({id:a.IdentityId,type:"guest"})),this._credentialsAndIdentityId={...l,isAuthenticatedCreds:!1},l}else throw new Ue({name:"CredentialsNotFoundException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}async credsForOIDCTokens(t,n,r){if(this._credentialsAndIdentityId&&!this.isPastTTL()&&this._credentialsAndIdentityId.isAuthenticatedCreds===!0)return Fp.debug("returning stored credentials as they neither past TTL nor expired."),this._credentialsAndIdentityId;this.clearCredentials();const o=n.idToken?tU(n.idToken.toString()):{},a=Lw(t.identityPoolId),l=RM({endpointResolver:qw({endpointOverride:t.identityPoolEndpoint})});let c;try{c=await l({region:a},{IdentityId:r,Logins:o})}catch(d){throw no(d),new Ue(d)}if(c?.Credentials?.AccessKeyId&&c?.Credentials?.SecretKey){this._nextCredentialsRefresh=new Date().getTime()+fN;const d={credentials:{accessKeyId:c.Credentials.AccessKeyId,secretAccessKey:c.Credentials.SecretKey,sessionToken:c.Credentials.SessionToken,expiration:c.Credentials.Expiration},identityId:r};return c.IdentityId&&(d.identityId=c.IdentityId,this._identityIdStore.storeIdentityId({id:c.IdentityId,type:"primary"})),this._credentialsAndIdentityId={...d,isAuthenticatedCreds:!0,associatedIdToken:n.idToken?.toString()},d}else throw new Ue({name:"CredentialsException",message:"Cognito did not respond with either Credentials, AccessKeyId or SecretKey."})}isPastTTL(){return this._nextCredentialsRefresh===void 0?!0:this._nextCredentialsRefresh<=Date.now()}hasTokenChanged(t){return!!t&&!!this._credentialsAndIdentityId?.associatedIdToken&&t.idToken?.toString()!==this._credentialsAndIdentityId.associatedIdToken}}const _Y=new nU(new eU(Hf)),rU={configure(e,t){const n=r6(e),r=new BW({sameSite:"lax"}),o=t?.ssr?r:Hf,a=t?.ssr?new nU(new eU(r)):_Y;if(!n.Auth||t?.Auth){Pt.configure(n,t);return}Im.setAuthConfig(n.Auth),Im.setKeyValueStorage(o),Pt.configure(n,{...t,Auth:{tokenProvider:Im,credentialsProvider:a}})},getConfig(){return Pt.getConfig()}},IY="https://github.com/remit-mail/reader/issues/new",AY=["internal","acme","tailscale","off"],TY=["self","managed"],hN=(e,t,n)=>e.find(r=>r===t)??n,iu=()=>{const e=globalThis.__REMIT_CONFIG__??{};return{apiUrl:e.apiUrl??"/api",appOrigin:e.appOrigin??"",betterAuthEnabled:e.betterAuthEnabled??!1,cognito:{userPoolId:e.cognito?.userPoolId??"",clientId:e.cognito?.clientId??"",domain:e.cognito?.domain??"",region:e.cognito?.region??""},rum:{appMonitorId:e.rum?.appMonitorId??"",identityPoolId:e.rum?.identityPoolId??"",region:e.rum?.region??"eu-west-1"},mailboxPollIntervalSeconds:e.mailboxPollIntervalSeconds!=null?String(e.mailboxPollIntervalSeconds):void 0,disableDevtools:e.disableDevtools??!1,tlsMode:hN(AY,e.tlsMode,"off"),issuesUrl:e.issuesUrl??IY,updateMode:hN(TY,e.updateMode,"self")}},oU=()=>{const e=iu(),{userPoolId:t,clientId:n,domain:r,region:o}=e.cognito;return!t||!n?null:{userPoolId:t,userPoolClientId:n,domain:r,region:o,appOrigin:e.appOrigin}},nv=()=>oU()!==null,aU=()=>{const e=oU();if(!e){console.warn("[auth] Cognito user pool is not configured. Running in local dev mode without Cognito auth.");return}const{userPoolId:t,userPoolClientId:n,domain:r,appOrigin:o}=e;rU.configure({Auth:{Cognito:{userPoolId:t,userPoolClientId:n,loginWith:r?{oauth:{domain:r,scopes:["openid","email","profile"],redirectSignIn:o?[o]:[],redirectSignOut:o?[o]:[],responseType:"code"}}:void 0}}})};var RY={};const Rm=Object.create(null),vd=e=>RY||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Rm:globalThis),ms=new Proxy(Rm,{get(e,t){return vd()[t]??Rm[t]},has(e,t){return t in vd()||t in Rm},set(e,t,n){const r=vd(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=vd(!0);return delete n[t],!0},ownKeys(){const e=vd(!0);return Object.keys(e)}});ms.NODE_ENV;var Om=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};const OY=47;function sU(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===OY;)t--;return t===e.length?e:e.slice(0,t)}function MY(e){try{return(sU(new URL(e).pathname)||"/")!=="/"}catch{throw new Om(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function NY(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Om(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Om?t:new Om(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function pN(e,t="/api/auth"){if(NY(e),MY(e))return e;const n=sU(e);return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function PY(e,t,n,r,o){{const a=ms.BETTER_AUTH_URL||ms.NEXT_PUBLIC_BETTER_AUTH_URL||ms.PUBLIC_BETTER_AUTH_URL||ms.NUXT_PUBLIC_BETTER_AUTH_URL||ms.NUXT_PUBLIC_AUTH_URL||(ms.BASE_URL!=="/"?ms.BASE_URL:void 0);if(a)return pN(a,t)}if(typeof window<"u"&&window.location)return pN(window.location.origin,t)}const kY={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},DY=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,mN={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},LY=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function UY(e){return e instanceof Date&&!isNaN(e.getTime())}function FY(e){const t=LY.exec(e);if(!t)return null;const[,n,r,o,a,l,c,d,f,p,m]=t,g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(o,10),parseInt(a,10),parseInt(l,10),parseInt(c,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const v=(parseInt(p,10)*60+parseInt(m,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+v)}return UY(g)?g:null}function zY(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:o,parseDates:a=!0}=t;if(typeof e!="string")return e;const l=e.trim(),c=l.toLowerCase();if(c.length<=9&&c in mN)return mN[c];if(!DY.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(kY).some(([d,f])=>{const p=f.test(l);return p&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),p})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(f,p)=>{if(f==="__proto__"||f==="constructor"&&p&&typeof p=="object"&&"prototype"in p){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(a&&typeof p=="string"){const m=FY(p);if(m)return m}return o?o(f,p):p})}catch(d){if(n)throw d;return e}}function $Y(e,t={strict:!0}){return zY(e,t)}const jY=["javascript:","data:","vbscript:"];function BY(e){let t;try{t=new URL(e)}catch{return!0}return!jY.includes(t.protocol)}const HY={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&BY(e.data.url)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};let mo=[],gs=0;const Mm=4,qY=globalThis.nanostoresGlobal||={epoch:0};let VY=()=>{for(gs=0;gs<mo.length;gs+=Mm)mo[gs](mo[gs+1].value,mo[gs+2],mo[gs+3]);mo.length=0};const iU=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(r){return n.lc=t.push(r),()=>{for(let a=gs+Mm;a<mo.length;)mo[a]===r?mo.splice(a,Mm):a+=Mm;let o=t.indexOf(r);~o&&(t.splice(o,1),--n.lc||n.off())}},notify(r,o){qY.epoch++;let a=!mo.length&&!0;for(let l of t)mo.push(l,n,r,o);a&&VY()},off(){},set(r){let o=n.value;o!==r&&(n.value=r,n.notify(o))},subscribe(r){let o=n.listen(r);return r(n.value),o},value:e};return n},WY=2,GY=5,zp=6,$p=10;let lU=(e,t,n,r)=>(e.events=e.events||{},e.events[n+$p]||(e.events[n+$p]=r(o=>{e.events[n].reduceRight((a,l)=>(l(a),a),{shared:{},...o})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],a=o.indexOf(t);o.splice(a,1),o.length||(delete e.events[n],e.events[n+$p](),delete e.events[n+$p])}),KY=(e,t)=>lU(e,t,WY,n=>{let r=e.set,o=e.setKey;return e.setKey&&(e.setKey=(a,l)=>{let c;if(n({abort:()=>{c=!0},changed:a,newValue:{...e.value,[a]:l}}),!c)return o(a,l)}),e.set=a=>{let l;if(n({abort:()=>{l=!0},newValue:a}),!l)return r(a)},()=>{e.set=r,e.setKey=o}});const cU=1e3;let ZY=(e,t)=>lU(e,r=>{let o=t(r);o&&e.events[zp].push(o)},GY,r=>{let o=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,r()),o(...l));let a=e.off;return e.events[zp]=[],e.off=()=>{a(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[zp])l();e.events[zp]=[]}},cU)},()=>{e.listen=o,e.off=a}});function YY(e,t,n){let r=new Set(t);return e.listen((o,a,l)=>{(l===void 0?t.some(c=>o[c]!==a[c]):r.has(l)||r.has(l.split(/\.|\[/)[0]))&&n(o,a,l)})}function gN(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Xm(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Xm(e[n],t[n]))return!1;return!0}if(gN(e)&&gN(t)){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!(o in t)||!Xm(e[o],t[o]))return!1;return!0}return!1}function QY(e,t){return KY(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}const Vw=Symbol.for("better-auth:auth-query");function XY(e){return Vw in e&&e[Vw]===!0}function JY(e){const t=iU(e);return Object.defineProperty(t,Vw,{value:!0}),t}const J0=Symbol.for("better-auth:broadcast-channel"),eQ=()=>Math.floor(Date.now()/1e3);var tQ=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:eQ()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function eS(e="better-auth.message"){return globalThis[J0]||(globalThis[J0]=new tQ(e)),globalThis[J0]}const tS=Symbol.for("better-auth:focus-manager");var nQ=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function vN(){return globalThis[tS]||(globalThis[tS]=new nQ),globalThis[tS]}const nS=Symbol.for("better-auth:online-manager");var rQ=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function rS(){return globalThis[nS]||(globalThis[nS]=new rQ),globalThis[nS]}const oS=()=>Math.floor(Date.now()/1e3),oQ=5;function aQ(e){const{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:o={}}=e,a=o.sessionOptions?.refetchInterval??0,l=o.sessionOptions?.refetchOnWindowFocus??!0,c=o.sessionOptions?.refetchWhenOffline??!1,d={isInitialized:!1,lastSessionRequest:0},f=()=>c||rS().isOnline,p=T=>{if(f()){if(T?.event==="storage"){t();return}if(T?.event==="poll"){d.lastSessionRequest=oS(),t();return}if(T?.event==="visibilitychange"){if(oS()-d.lastSessionRequest<oQ)return;d.lastSessionRequest=oS(),t();return}t()}},m=T=>{eS().post({event:"session",data:{trigger:T},clientId:Math.random().toString(36).substring(7)})},g=()=>{a&&a>0&&(d.pollInterval=setInterval(()=>{n()&&p({event:"poll"})},a*1e3))},v=()=>{d.unsubscribeBroadcast=eS().subscribe(()=>{p({event:"storage"})})},S=()=>{l&&(d.unsubscribeFocus=vN().subscribe(()=>{p({event:"visibilitychange"})}))},C=()=>{d.unsubscribeOnline=rS().subscribe(T=>{T&&p({event:"visibilitychange"})})},w=()=>{d.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{d.isInitialized||(d.isInitialized=!0,g(),v(),S(),C(),w(),d.cleanupBroadcastSetup=eS().setup(),d.cleanupFocusSetup=vN().setup(),d.cleanupOnlineSetup=rS().setup())},cleanup:()=>{d.isInitialized&&(d.pollInterval&&(clearInterval(d.pollInterval),d.pollInterval=void 0),d.unsubscribeBroadcast&&(d.unsubscribeBroadcast(),d.unsubscribeBroadcast=void 0),d.unsubscribeFocus&&(d.unsubscribeFocus(),d.unsubscribeFocus=void 0),d.unsubscribeOnline&&(d.unsubscribeOnline(),d.unsubscribeOnline=void 0),d.unsubscribeSignal&&(d.unsubscribeSignal(),d.unsubscribeSignal=void 0),d.cleanupBroadcastSetup&&(d.cleanupBroadcastSetup(),d.cleanupBroadcastSetup=void 0),d.cleanupFocusSetup&&(d.cleanupFocusSetup(),d.cleanupFocusSetup=void 0),d.cleanupOnlineSetup&&(d.cleanupOnlineSetup(),d.cleanupOnlineSetup=void 0),d.isInitialized=!1,d.lastSessionRequest=0)},triggerRefetch:p,broadcastSessionUpdate:m}}const sQ=()=>typeof window>"u",iQ=cU;function lQ(e,t){if(typeof window>"u")return;const n=e.get();n.data!==null||t===null||e.set({...n,data:t,error:null,isPending:!1})}function yN(e){return typeof e=="object"&&e!==null&&"data"in e&&"error"in e?e:{data:e,error:null}}function cQ(e){return!e||e.session===null&&e.user===null?null:e}function uQ(e,t){return Xm(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function dQ(e,t){const n=iU(!1);let r,o=0,a=0;n.listen(()=>{a++,o=0});const l=v=>p(v),c=JY({data:null,error:null,isPending:!0,isRefetching:!1,refetch:l});QY(c,uQ);const d=async(v,S)=>{const C=c.value;if(c.set({...C,isPending:C.data===null,isRefetching:!0,error:null,refetch:l}),v.aborted)return"aborted";try{const w=await e("/get-session",{method:"GET",query:S?.query,signal:v});if(v.aborted)return"aborted";let{data:x,error:I}=yN(w),T="fresh";if(x?.needsRefresh)try{const M=await e("/get-session",{method:"POST",signal:v});if(v.aborted)return"aborted";({data:x,error:I}=yN(M))}catch{if(v.aborted)return"aborted";T="stale"}if(I){const M=c.value,L=I?.status===401;return c.set({data:L?null:M.data,error:I,isPending:!1,isRefetching:!1,refetch:l}),"failed"}const O=cQ(x),D=c.value,P=D.data!=null&&O!=null&&Xm(D.data,O)?D.data:O;return c.set({data:P,error:null,isPending:!1,isRefetching:!1,refetch:l}),T}catch(w){if(v.aborted)return"aborted";const x=c.value;return c.set({data:x.data,error:w,isPending:!1,isRefetching:!1,refetch:l}),"failed"}},f=()=>{const v=c.value.data?.session?.expiresAt,S=v instanceof Date?v.getTime():Number.POSITIVE_INFINITY;return Math.min(Date.now()+iQ,S)},p=v=>{o=0,r?.cancel();const S=new AbortController,C={cancel:()=>S.abort(),promise:Promise.resolve().then(()=>S.signal.aborted?"aborted":d(S.signal,v)),revision:a};r=C;const w=x=>{r===C&&(r=void 0,x==="fresh"&&C.revision===a&&(o=f()))};return C.promise.then(w,()=>w("failed")),C.promise.then(()=>{})},m=()=>r?.revision===a?r.promise.then(()=>{}):Date.now()<o?Promise.resolve():p();let g=()=>{};return ZY(c,()=>{let v;sQ()||(v=setTimeout(()=>{m()},0));const S=aQ({fetchSession:p,shouldPollSession:()=>c.value.data!=null,sessionSignal:n,options:t});return S.init(),g=S.broadcastSessionUpdate,()=>{v&&clearTimeout(v),S.cleanup()}}),{session:c,$sessionSignal:n,broadcastSessionUpdate:v=>g(v)}}function aS(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ww(e,t,n=".",r){if(!aS(t))return Ww(e,{},n,r);const o={...t};for(const a of Object.keys(e)){if(a==="__proto__"||a==="constructor")continue;const l=e[a];l!=null&&(r&&r(o,a,l,n)||(Array.isArray(l)&&Array.isArray(o[a])?o[a]=[...l,...o[a]]:aS(l)&&aS(o[a])?o[a]=Ww(l,o[a],(n?`${n}.`:"")+a.toString(),r):o[a]=l))}return o}function fQ(e){return(...t)=>t.reduce((n,r)=>Ww(n,r,"",e),{})}const hQ=fQ();var pQ=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}};const mQ=async(e,t)=>{let n=t||{};const r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(const p of t?.plugins||[]){var o,a,l,c,d;if(p.init){var f;const m=await((f=p.init)===null||f===void 0?void 0:f.call(p,e.toString(),n));n=m.options||n,e=m.url}r.onRequest.push((o=p.hooks)===null||o===void 0?void 0:o.onRequest),r.onResponse.push((a=p.hooks)===null||a===void 0?void 0:a.onResponse),r.onSuccess.push((l=p.hooks)===null||l===void 0?void 0:l.onSuccess),r.onError.push((c=p.hooks)===null||c===void 0?void 0:c.onError),r.onRetry.push((d=p.hooks)===null||d===void 0?void 0:d.onRetry)}return{url:e,options:n,hooks:r}};var bN=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},gQ=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function vQ(e){if(typeof e=="number")return new bN({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new bN(e);case"exponential":return new gQ(e);default:throw new Error("Invalid retry strategy")}}const yQ=["get","post","put","patch","delete"];function L_(e){if(!e.startsWith("@"))return{method:void 0,path:e};const t=e.indexOf("/"),n=e.slice(1,t===-1?void 0:t);return yQ.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}const bQ=e=>e==="."||e==="..",SQ=e=>e.split(":").map(t=>encodeURIComponent(t)).join(":");function CQ(e,t){const n=t.get(e);if(n===void 0)return SQ(e);if(bQ(n))throw new TypeError("Path parameters cannot be reserved path segments");return encodeURIComponent(n)}function EQ(e,t){const{baseURL:n,params:r,query:o}=t||{query:{},params:{},baseURL:""};let a=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";const{path:l}=L_(e);l!==e&&(e=`/${l}`),a.endsWith("/")||(a+="/");let[c,d]=e.replace(a,"").split("?");const f=new URLSearchParams(d);for(const[g,v]of Object.entries(o||{})){if(v==null)continue;let S;if(typeof v=="string")S=v;else if(Array.isArray(v)){for(const C of v)f.append(g,C);continue}else S=JSON.stringify(v);f.set(g,S)}const p=new Map;if(r)if(Array.isArray(r)){const g=c.split("/").filter(v=>v.startsWith(":"));for(const[v,S]of g.entries()){const C=r[v];p.set(S,String(C))}}else for(const[g,v]of Object.entries(r))p.set(`:${g}`,String(v));c=c.split("/").map(g=>CQ(g,p)).join("/"),c=c.replace(/^\/+/,"");let m=f.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",a.startsWith("http")?new URL(`${c}${m}`,a):`${a}${c}${m}`}const wQ=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const[r,o]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!o)return t;t.authorization=`Basic ${btoa(`${r}:${o}`)}`}else if(e.auth.type==="Custom"){const[r,o]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!o)return t;t.authorization=`${r??""} ${o}`}}return t},xQ=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function _Q(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return xQ.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function IQ(e){try{return JSON.parse(e),!0}catch{return!1}}function uU(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function SN(e){try{return JSON.parse(e)}catch{return e}}function CN(e){return typeof e=="function"}function AQ(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&CN(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&CN(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}function dU(...e){const t={};for(const n of e)if(n)if(n instanceof Headers)n.forEach((r,o)=>{t[o]=r});else{const r=Array.isArray(n)?n:Object.entries(n);for(const[o,a]of r)a!=null&&(t[o]=a)}return t}async function TQ(e){const t=new Headers(dU(e?.headers,await wQ(e)));if(!t.has("content-type")){const n=RQ(e?.body);n&&t.set("content-type",n)}return t}function RQ(e){return uU(e)?"application/json":null}function OQ(e){const t=e.get("content-type");return t?t.split(";")[0].trim().toLowerCase():null}function MQ(e,t){const{body:n}=e;return n?!uU(n)||typeof n=="string"?n:OQ(t)==="application/x-www-form-urlencoded"?new URLSearchParams(n).toString():JSON.stringify(n):null}function NQ(e,t){if(t?.method)return t.method.toUpperCase();const{method:n}=L_(e);return n?n.toUpperCase():t?.body?"POST":"GET"}function PQ(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var kQ=class fU extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,fU.prototype)}};async function Fd(e,t){const n=await e["~standard"].validate(t);if(n.issues)throw new kQ(n.issues);return n.value}function pf(e){"@babel/helpers - typeof";return pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pf(e)}function DQ(e,t){if(pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LQ(e){var t=DQ(e,"string");return pf(t)=="symbol"?t:t+""}function UQ(e,t,n){return(t=LQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EN(Object(n),!0).forEach(function(r){UQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const Gw=async(e,t)=>{var n,r,o;const{hooks:a,url:l,options:c}=await mQ(e,t),d=AQ(c),f=new AbortController,p=(n=c.signal)!==null&&n!==void 0?n:f.signal,m=EQ(l,c),g=await TQ(c),v=MQ(c,g),S=NQ(l,c),C=bt(bt({},c),{},{url:m,headers:g,body:v,method:S,signal:p});for(const q of a.onRequest)if(q){const X=await q(C);typeof X=="object"&&X!==null&&Object.assign(C,X)}("pipeTo"in C&&typeof C.pipeTo=="function"||typeof(t==null||(r=t.body)===null||r===void 0?void 0:r.pipe)=="function")&&("duplex"in C||(C.duplex="half"));const{clearTimeout:w}=PQ(c,f);let x=await d(C.url,C);w();const I={response:x,request:C};for(const q of a.onResponse)if(q){var T;const X=await q(bt(bt({},I),{},{response:!(t==null||(T=t.hookOptions)===null||T===void 0)&&T.cloneResponse?x.clone():x}));X instanceof Response?x=X:typeof X=="object"&&X!==null&&(x=X.response)}if(x.ok){if(C.method==="HEAD")return{data:"",error:null};const q=_Q(x),X={data:null,response:x,request:C};if(q==="json"||q==="text"){var O;const Se=await x.text();X.data=await((O=C.jsonParser)!==null&&O!==void 0?O:SN)(Se)}else X.data=await x[q]();C?.output&&C.output&&!C.disableValidation&&(X.data=await Fd(C.output,X.data));for(const Se of a.onSuccess)if(Se){var D;await Se(bt(bt({},X),{},{response:!(t==null||(D=t.hookOptions)===null||D===void 0)&&D.cloneResponse?x.clone():x}))}return t?.throw?X.data:{data:X.data,error:null}}const P=(o=t?.jsonParser)!==null&&o!==void 0?o:SN,M=await x.text(),L=IQ(M),z=L?await P(M):null,G={response:x,responseText:M,request:C,error:bt(bt({},z),{},{status:x.status,statusText:x.statusText})};for(const q of a.onError)if(q){var j;await q(bt(bt({},G),{},{response:!(t==null||(j=t.hookOptions)===null||j===void 0)&&j.cloneResponse?x.clone():x}))}if(t?.retry){var F;const q=vQ(t.retry),X=(F=t.retryAttempt)!==null&&F!==void 0?F:0;if(await q.shouldAttemptRetry(X,x)){for(const W of a.onRetry)W&&await W(I);const Se=q.getDelay(X);return await new Promise(W=>setTimeout(W,Se)),await Gw(e,bt(bt({},t),{},{retryAttempt:X+1}))}}if(t?.throw)throw new pQ(x.status,x.statusText,L?z:M);return{data:null,error:bt(bt({},z),{},{status:x.status,statusText:x.statusText})}},FQ=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r;let o=bt(bt({},n),e.query!==void 0&&{query:bt(bt({},e.query),n?.query)});const a=((r=e.plugins)===null||r===void 0||(r=r.find(f=>{var p;return!((p=f.schema)===null||p===void 0)&&p.config?t.startsWith(f.schema.config.baseURL||"")||t.startsWith(f.schema.config.prefix||""):!1}))===null||r===void 0?void 0:r.schema)||e.schema;if(a){var l,c;let f=t;!((l=a.config)===null||l===void 0)&&l.prefix&&f.startsWith(a.config.prefix)&&(f=f.replace(a.config.prefix,""),a.config.baseURL&&(t=t.replace(a.config.prefix,a.config.baseURL))),!((c=a.config)===null||c===void 0)&&c.baseURL&&f.startsWith(a.config.baseURL)&&(f=f.replace(a.config.baseURL,"")),f.startsWith("/")&&f.charAt(1)==="@"&&(f=f.substring(1));const p=a.schema[f];if(p){var d;const{method:m,path:g}=L_(f);m&&(t=t.slice(0,t.length-f.length)+g);let v=n?.headers;if(p.headers&&!n?.disableValidation){const C={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((I,T)=>{C[T.toLowerCase()]=I});else if(typeof n.headers=="object")for(const[I,T]of Object.entries(n.headers))T!=null&&(C[I.toLowerCase()]=T)}const w=await Fd(p.headers,C),x={};for(const[I,T]of Object.entries(w))x[I.toLowerCase()]=T;v=x}const S=(d=p.method)!==null&&d!==void 0?d:m;if(o=bt(bt(bt(bt({},o),S!==void 0&&{method:S}),p.output!==void 0&&{output:p.output}),v!==void 0&&{headers:v}),!n?.disableValidation){if(p.query&&(o.query=await Fd(p.query,n?.query),o.query!==null&&typeof o.query=="object")){const C=bt({},e.query);for(const w of Object.keys(C))n?.query&&Object.prototype.hasOwnProperty.call(n.query,w)&&(C[w]=n.query[w]);o.query=bt(bt({},C),o.query)}o=bt(bt({},o),{},{body:p.input?await Fd(p.input,n?.body):n?.body,params:p.params?await Fd(p.params,n?.params):n?.params})}return{url:t,options:o}}}return bt({url:t},(n!==void 0||e.query!==void 0)&&{options:o})}}),zQ=e=>{async function t(n,r){const o=bt(bt(bt({},e),r),{},{headers:dU(e?.headers,r?.headers),plugins:[...e?.plugins||[],FQ(e||{}),...r?.plugins||[]]});if(e?.catchAllError)try{return await Gw(n,o)}catch(a){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:a}}}return await Gw(n,o)}return t};var yi={};const $Q=e=>{if(typeof process>"u")return;const t="/api/auth";if(yi.NEXT_PUBLIC_AUTH_URL)return yi.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(yi.NEXTAUTH_URL)try{return yi.NEXTAUTH_URL}catch{}if(yi.VERCEL_URL)try{const n=yi.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${n}${yi.VERCEL_URL}`).origin}${t}`}catch{}}},jQ=e=>e==="/sign-out"||e==="/update-user"||e==="/update-session"||e==="/sign-up/email"||e==="/sign-in/email"||e==="/delete-user"||e==="/verify-email"||e==="/revoke-sessions"||e==="/revoke-session"||e==="/revoke-other-sessions"||e==="/change-email"||e==="/change-password",BQ=(e,t)=>{const n="credentials"in Request.prototype,r=PY(e?.baseURL,e?.basePath)??$Q()??"/api/auth",o=[],a={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:l,onError:c,onRequest:d,onResponse:f,...p}={},m=zQ({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(M){return M?$Y(M,{strict:!1}):null},customFetchImpl:fetch,...p,plugins:[a,...p.plugins||[],HY,...o]}),{$sessionSignal:g,session:v,broadcastSessionUpdate:S}=dQ(m,e);let C=!1;const w=M=>{C||M===null||(C=!0,lQ(v,M))},x=[];let I={};const T={$sessionSignal:g,session:v},O={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},D=[{signal:"$sessionSignal",matcher:jQ,callback(M){M==="/sign-out"?S("signout"):(M==="/update-user"||M==="/update-session")&&S("updateUser")}}];for(const M of x)M.getAtoms&&Object.assign(T,M.getAtoms?.(m)),M.pathMethods&&Object.assign(O,M.pathMethods),M.atomListeners&&D.push(...M.atomListeners);const P={notify:M=>{T[M].set(!T[M].get())},listen:(M,L)=>{T[M].subscribe(L)},atoms:T};for(const M of x)M.getActions&&(I=hQ(M.getActions?.(m,P,e)??{},I));return{get baseURL(){return r},pluginsActions:I,pluginsAtoms:T,pluginPathMethods:O,atomListeners:D,hydrateSession:w,$sessionSignal:g,$fetch:m,$store:P}};function HQ(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function qQ(e){return e.charAt(0).toUpperCase()+e.slice(1)}const VQ=new RegExp("[\\p{Ll}\\d]+|\\p{Lu}+(?!\\p{Ll})|\\p{Lu}[\\p{Ll}\\d]+|\\p{Lo}+","gu"),WQ=/['\u2019]/g;function GQ(e){return e.replace(WQ,"").match(VQ)??[]}function KQ(e){return GQ(e).map(t=>t.toLowerCase()).join("-")}function ZQ(e,t,n){const r=t[e],{fetchOptions:o,query:a,...l}=n||{};return r||(o?.method?o.method:l&&Object.keys(l).length>0?"POST":"GET")}function YQ(e,t,n,r,o){function a(l=[]){return new Proxy(function(){},{get(c,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...l,d];let p=e;for(const m of f)if(p&&typeof p=="object"&&m in p)p=p[m];else{p=void 0;break}return typeof p=="function"||HQ(p)?p:a(f)},apply:async(c,d,f)=>{const p="/"+l.map(KQ).join("/"),m=f[0]||{},g=f[1]||{},{query:v,fetchOptions:S,...C}=m,w={...g,...S},x=ZQ(p,n,m);return await t(p,{...w,body:x==="GET"?void 0:{...C,...w?.body||{}},query:v||w?.query,method:x,async onSuccess(I){if(await w?.onSuccess?.(I),!o||w.disableSignal)return;const T=o.filter(D=>D.matcher(p));if(!T.length)return;const O=new Set;for(const D of T){const P=r[D.signal];if(!P)return;if(O.has(D.signal))continue;O.add(D.signal);const M=P.get();setTimeout(()=>{P.set(!M)},10),D.callback?.(p)}}})}})}return a()}var sS={exports:{}},qe={};var wN;function QQ(){if(wN)return qe;wN=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v($){return $===null||typeof $!="object"?null:($=g&&$[g]||$["@@iterator"],typeof $=="function"?$:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,w={};function x($,te,fe){this.props=$,this.context=te,this.refs=w,this.updater=fe||S}x.prototype.isReactComponent={},x.prototype.setState=function($,te){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,te,"setState")},x.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function I(){}I.prototype=x.prototype;function T($,te,fe){this.props=$,this.context=te,this.refs=w,this.updater=fe||S}var O=T.prototype=new I;O.constructor=T,C(O,x.prototype),O.isPureReactComponent=!0;var D=Array.isArray;function P(){}var M={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function z($,te,fe){var ce=fe.ref;return{$$typeof:e,type:$,key:te,ref:ce!==void 0?ce:null,props:fe}}function G($,te){return z($.type,te,$.props)}function j($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function F($){var te={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(fe){return te[fe]})}var q=/\/+/g;function X($,te){return typeof $=="object"&&$!==null&&$.key!=null?F(""+$.key):te.toString(36)}function Se($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(P,P):($.status="pending",$.then(function(te){$.status==="pending"&&($.status="fulfilled",$.value=te)},function(te){$.status==="pending"&&($.status="rejected",$.reason=te)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function W($,te,fe,ce,be){var Fe=typeof $;(Fe==="undefined"||Fe==="boolean")&&($=null);var ke=!1;if($===null)ke=!0;else switch(Fe){case"bigint":case"string":case"number":ke=!0;break;case"object":switch($.$$typeof){case e:case t:ke=!0;break;case p:return ke=$._init,W(ke($._payload),te,fe,ce,be)}}if(ke)return be=be($),ke=ce===""?"."+X($,0):ce,D(be)?(fe="",ke!=null&&(fe=ke.replace(q,"$&/")+"/"),W(be,te,fe,"",function(Je){return Je})):be!=null&&(j(be)&&(be=G(be,fe+(be.key==null||$&&$.key===be.key?"":(""+be.key).replace(q,"$&/")+"/")+ke)),te.push(be)),1;ke=0;var ae=ce===""?".":ce+":";if(D($))for(var Ae=0;Ae<$.length;Ae++)ce=$[Ae],Fe=ae+X(ce,Ae),ke+=W(ce,te,fe,Fe,be);else if(Ae=v($),typeof Ae=="function")for($=Ae.call($),Ae=0;!(ce=$.next()).done;)ce=ce.value,Fe=ae+X(ce,Ae++),ke+=W(ce,te,fe,Fe,be);else if(Fe==="object"){if(typeof $.then=="function")return W(Se($),te,fe,ce,be);throw te=String($),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return ke}function ee($,te,fe){if($==null)return $;var ce=[],be=0;return W($,ce,"","",function(Fe){return te.call(fe,Fe,be++)}),ce}function me($){if($._status===-1){var te=$._result;te=te(),te.then(function(fe){($._status===0||$._status===-1)&&($._status=1,$._result=fe)},function(fe){($._status===0||$._status===-1)&&($._status=2,$._result=fe)}),$._status===-1&&($._status=0,$._result=te)}if($._status===1)return $._result.default;throw $._result}var ge=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},Te={map:ee,forEach:function($,te,fe){ee($,function(){te.apply(this,arguments)},fe)},count:function($){var te=0;return ee($,function(){te++}),te},toArray:function($){return ee($,function(te){return te})||[]},only:function($){if(!j($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return qe.Activity=m,qe.Children=Te,qe.Component=x,qe.Fragment=n,qe.Profiler=o,qe.PureComponent=T,qe.StrictMode=r,qe.Suspense=d,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,qe.__COMPILER_RUNTIME={__proto__:null,c:function($){return M.H.useMemoCache($)}},qe.cache=function($){return function(){return $.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function($,te,fe){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var ce=C({},$.props),be=$.key;if(te!=null)for(Fe in te.key!==void 0&&(be=""+te.key),te)!L.call(te,Fe)||Fe==="key"||Fe==="__self"||Fe==="__source"||Fe==="ref"&&te.ref===void 0||(ce[Fe]=te[Fe]);var Fe=arguments.length-2;if(Fe===1)ce.children=fe;else if(1<Fe){for(var ke=Array(Fe),ae=0;ae<Fe;ae++)ke[ae]=arguments[ae+2];ce.children=ke}return z($.type,be,ce)},qe.createContext=function($){return $={$$typeof:l,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:a,_context:$},$},qe.createElement=function($,te,fe){var ce,be={},Fe=null;if(te!=null)for(ce in te.key!==void 0&&(Fe=""+te.key),te)L.call(te,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(be[ce]=te[ce]);var ke=arguments.length-2;if(ke===1)be.children=fe;else if(1<ke){for(var ae=Array(ke),Ae=0;Ae<ke;Ae++)ae[Ae]=arguments[Ae+2];be.children=ae}if($&&$.defaultProps)for(ce in ke=$.defaultProps,ke)be[ce]===void 0&&(be[ce]=ke[ce]);return z($,Fe,be)},qe.createRef=function(){return{current:null}},qe.forwardRef=function($){return{$$typeof:c,render:$}},qe.isValidElement=j,qe.lazy=function($){return{$$typeof:p,_payload:{_status:-1,_result:$},_init:me}},qe.memo=function($,te){return{$$typeof:f,type:$,compare:te===void 0?null:te}},qe.startTransition=function($){var te=M.T,fe={};M.T=fe;try{var ce=$(),be=M.S;be!==null&&be(fe,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(P,ge)}catch(Fe){ge(Fe)}finally{te!==null&&fe.types!==null&&(te.types=fe.types),M.T=te}},qe.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},qe.use=function($){return M.H.use($)},qe.useActionState=function($,te,fe){return M.H.useActionState($,te,fe)},qe.useCallback=function($,te){return M.H.useCallback($,te)},qe.useContext=function($){return M.H.useContext($)},qe.useDebugValue=function(){},qe.useDeferredValue=function($,te){return M.H.useDeferredValue($,te)},qe.useEffect=function($,te){return M.H.useEffect($,te)},qe.useEffectEvent=function($){return M.H.useEffectEvent($)},qe.useId=function(){return M.H.useId()},qe.useImperativeHandle=function($,te,fe){return M.H.useImperativeHandle($,te,fe)},qe.useInsertionEffect=function($,te){return M.H.useInsertionEffect($,te)},qe.useLayoutEffect=function($,te){return M.H.useLayoutEffect($,te)},qe.useMemo=function($,te){return M.H.useMemo($,te)},qe.useOptimistic=function($,te){return M.H.useOptimistic($,te)},qe.useReducer=function($,te,fe){return M.H.useReducer($,te,fe)},qe.useRef=function($){return M.H.useRef($)},qe.useState=function($){return M.H.useState($)},qe.useSyncExternalStore=function($,te,fe){return M.H.useSyncExternalStore($,te,fe)},qe.useTransition=function(){return M.H.useTransition()},qe.version="19.2.7",qe}var xN;function Kf(){return xN||(xN=1,sS.exports=QQ()),sS.exports}var _=Kf();const B=Xc(_),XQ=XL({__proto__:null,default:B},[_]);function JQ(e,t={}){const n=_.useRef(e.get()),{keys:r,deps:o=[e,r]}=t,a=_.useCallback(c=>{const d=f=>{n.current!==f&&(n.current=f,c())};return d(e.value),r?.length?YY(e,r,d):e.listen(d)},o),l=()=>n.current;return _.useSyncExternalStore(a,l,XY(e)?()=>e.init:l)}function eX(e){return`use${qQ(e)}`}function tX(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:o,$fetch:a,$store:l,atomListeners:c}=BQ(e),d={};for(const[f,p]of Object.entries(r))d[eX(f)]=()=>JQ(p);return YQ({...n,...d,hydrateSession:o,$fetch:a,$store:l},a,t,r,c)}const nX=10,Rc=[],rX=["x-correlation-id","x-request-id","x-amzn-requestid","x-amzn-trace-id","apigw-requestid","x-trace-id"];function oX(e){const t=typeof e=="string"?e:e instanceof URL?e.href:e.url;try{return new URL(t,window.location.origin).pathname}catch{return t.split(/[?#]/)[0]}}function aX(e,t){return t?.method?t.method.toUpperCase():typeof e!="string"&&!(e instanceof URL)&&e.method?e.method.toUpperCase():"GET"}function sX(e){for(const t of rX){const n=e.headers.get(t);if(n)return n}}function iX(e){Rc.push(e),Rc.length>nX&&Rc.shift()}function _N(e){const{input:t,init:n,response:r,durationMs:o}=e;iX({method:aX(t,n),path:oX(t),status:r?.status??0,durationMs:Math.round(o),correlationId:r?sX(r):void 0,timestamp:new Date().toISOString()})}function lX(){return Rc.slice()}function cX(){for(let e=Rc.length-1;e>=0;e--){const t=Rc[e];if(t.status===0||t.status>=400)return t}}class U_ extends Error{constructor(t){super(t instanceof Error&&t.message?t.message:"The request could not be completed.",{cause:t}),this.name="NetworkError"}}const uX=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError",hU=async(e,t)=>{const n=performance.now();try{const r=await fetch(e,{...t,redirect:"manual"}),o=r.type==="opaqueredirect"?new Response(null,{status:401}):r;return _N({input:e,init:t,response:o,durationMs:performance.now()-n}),o}catch(r){throw uX(r)?r:(_N({input:e,init:t,durationMs:performance.now()-n}),new U_(r))}},F_=()=>{try{return globalThis.sessionStorage??null}catch{return null}},rv=()=>iu().betterAuthEnabled,dX="EMAIL_PASSWORD_SIGN_UP_DISABLED",fX=e=>typeof e=="object"&&e!==null&&e.code===dX,Bi=tX(),hX=60,pX=30,Kw="remit.better-auth.token",mX=()=>{const e=F_()?.getItem(Kw);if(!e)return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"&&typeof t.value=="string"&&typeof t.expiresAt=="number")return{value:t.value,expiresAt:t.expiresAt}}catch{}return null},pU=e=>{const t=F_();if(t)try{if(!e){t.removeItem(Kw);return}t.setItem(Kw,JSON.stringify(e))}catch{}};let xi=null,Jm=0;const gX=()=>xi||(xi=mX(),xi),Ri=()=>Math.floor(Date.now()/1e3),vX=e=>{const[,t]=e.split(".");if(!t)return Ri();try{const n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return typeof n.exp=="number"?n.exp:Ri()}catch{return Ri()}};class eg extends Error{status;constructor(t,n){super(t),this.name="AuthTokenError",this.status=n}}const yX=async()=>{const e=await hU("/api/auth/token",{credentials:"include"});if(!e.ok)throw new eg(`Could not mint a session token: ${e.status} ${e.statusText}`,e.status);const t=await e.json();if(t&&typeof t=="object"&&"token"in t&&typeof t.token=="string")return t.token;throw new eg("The token endpoint returned no token")};let yd=null;const bX=()=>yd||(yd=yX().then(e=>(xi={value:e,expiresAt:vX(e)},pU(xi),Jm=0,e)).finally(()=>{yd=null}),yd),SX=e=>e.expiresAt-hX>Ri(),IN=e=>e.expiresAt>Ri(),CX=e=>e instanceof U_?!0:e instanceof eg?e.status===408||e.status===429||(e.status??0)>=500:!1,EX=e=>e instanceof eg&&(e.status===401||e.status===403),wX=async()=>{const e=gX();if(e&&SX(e)||e&&IN(e)&&Ri()<Jm)return e.value;try{return await bX()}catch(t){if(EX(t))throw z_(),t.status===403&&Bi.$store.notify("$sessionSignal"),t;if(e&&IN(e)&&CX(t))return Jm=Ri()+pX,e.value;throw t}},z_=()=>{Jm=0,pU(null),xi=null};const xX=e=>e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function _X(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:xX(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}const IX=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t};const AX=e=>{const t=IX(e);return t.charAt(0).toUpperCase()+t.slice(1)};const Zw=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const bi={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function iS(e){return e!=null}function TX(e,t={}){const n=t.attributeNames??{},r=g=>n[g]??g,o=e.size??e.width??bi.width,a=e.size??e.height??bi.height,l=e.aliases?.filter(g=>typeof g=="string"&&g.trim()!=="").map(g=>`lucide-${g}`)??[],c=[...e.name?[`lucide-${e.name}`]:[],...l],d=t.className?.split(" ").filter(Boolean)??[],f=t.includeDefaultClasses===!1?Zw(...d):Zw("lucide",...c,...d),p=t.absoluteStrokeWidth?Number(t.strokeWidth??bi["stroke-width"])*Number(e.size??e.width??bi.width)/Number(t.size??t.width??bi.width):t.strokeWidth??bi["stroke-width"];return["svg",{...Object.entries(bi).reduce((g,[v,S])=>(g[r(v)]=S,g),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&iS(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&iS(t.width)&&{[r("width")]:t.width},..."height"in t&&iS(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:p,...f&&{[r("class")]:f},[r("viewBox")]:`0 0 ${o} ${a}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(g=>{const[v,S,C]=g,w=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...S}:S;return C?[v,w,C]:[v,w]})]}function RX(e,t={}){return TX(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const OX=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},MX=_.createContext({}),NX=()=>_.useContext(MX),PX=_.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:o,absoluteStrokeWidth:a,nonScalingStroke:l,className:c="",children:d,iconNode:f=[],icon:p={node:f,aliases:[],size:24},...m},g)=>{const{size:v=24,strokeWidth:S=2,absoluteStrokeWidth:C=!1,nonScalingStroke:w=!1,color:x="currentColor",className:I=""}=NX()??{},T=!!d||OX(m),[O,D,P=[]]=RX(p,{color:e??x,width:n??t??v,height:r??t??v,strokeWidth:o??S,absoluteStrokeWidth:a??C,nonScalingStroke:l??w,className:Zw(I,c),hasA11yProp:T,attributes:m});return _.createElement(O,{ref:g,...D},[...P.map(([M,L])=>_.createElement(M,L)),...Array.isArray(d)?d:[d]])});function Et(e,t=[],n=[]){const r=typeof e=="string"?_X(e,t,n):e,o=_.forwardRef(({className:a,...l},c)=>_.createElement(PX,{ref:c,icon:r,className:a,...l}));return r.name&&(o.displayName=AX(r.name)),o}const mU={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};mU.node;const kX=Et(mU);const gU={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};gU.node;const DX=Et(gU);const vU={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};vU.node;const yU=Et(vU);const bU={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};bU.node;const LX=Et(bU);const SU={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};SU.node;const CU=Et(SU);const EU={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};EU.node;const UX=Et(EU);const wU={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};wU.node;const FX=Et(wU);const xU={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};xU.node;const zX=Et(xU);const _U={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};_U.node;const $X=Et(_U);const IU={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};IU.node;const jX=Et(IU);const AU={name:"folder-tree",size:24,node:[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]};AU.node;const BX=Et(AU);const TU={name:"funnel",size:24,node:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],aliases:["filter"]};TU.node;const HX=Et(TU);const RU={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};RU.node;const OU=Et(RU);const MU={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};MU.node;const qX=Et(MU);const NU={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};NU.node;const PU=Et(NU);const kU={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};kU.node;const AN=Et(kU);const DU={name:"mails",size:24,node:[["path",{d:"M17 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 1-1.732",key:"1vyzll"}],["path",{d:"m22 5.5-6.419 4.179a2 2 0 0 1-2.162 0L7 5.5",key:"k7ramc"}],["rect",{x:"7",y:"3",width:"15",height:"12",rx:"2",key:"17196g"}]]};DU.node;const VX=Et(DU);const LU={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};LU.node;const $_=Et(LU);const UU={name:"palette",size:24,node:[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]};UU.node;const WX=Et(UU);const FU={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};FU.node;const GX=Et(FU);const zU={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};zU.node;const KX=Et(zU);const $U={name:"shield-alert",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]};$U.node;const ZX=Et($U);const jU={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};jU.node;const YX=Et(jU);const BU={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};BU.node;const QX=Et(BU);const HU={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};HU.node;const XX=Et(HU);const qU={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};qU.node;const JX=Et(qU);const VU={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};VU.node;const j_=Et(VU);const WU={name:"user-cog",size:24,node:[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};WU.node;const eJ=Et(WU);const GU={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};GU.node;const tJ=Et(GU);const KU={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};KU.node;const nJ=Et(KU);const ZU={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};ZU.node;const Yw=Et(ZU);function YU(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=YU(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function rJ(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=YU(e))&&(r&&(r+=" "),r+=t);return r}const B_="-",oJ=e=>{const t=sJ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(B_);return c[0]===""&&c.length!==1&&c.shift(),QU(c,t)||aJ(l)},getConflictingClassGroupIds:(l,c)=>{const d=n[l]||[];return c&&r[l]?[...d,...r[l]]:d}}},QU=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?QU(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(B_);return t.validators.find(({validator:l})=>l(a))?.classGroupId},TN=/^\[(.+)\]$/,aJ=e=>{if(TN.test(e)){const t=TN.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},sJ=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return lJ(Object.entries(e.classGroups),n).forEach(([a,l])=>{Qw(l,r,a,t)}),r},Qw=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:RN(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(iJ(o)){Qw(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,l])=>{Qw(l,RN(t,a),n,r)})})},RN=(e,t)=>{let n=e;return t.split(B_).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},iJ=e=>e.isThemeGetter,lJ=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([l,c])=>[t+l,c])):a);return[n,o]}):e,cJ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,l)=>{n.set(a,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let l=n.get(a);if(l!==void 0)return l;if((l=r.get(a))!==void 0)return o(a,l),l},set(a,l){n.has(a)?n.set(a,l):o(a,l)}}},XU="!",uJ=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,l=c=>{const d=[];let f=0,p=0,m;for(let w=0;w<c.length;w++){let x=c[w];if(f===0){if(x===o&&(r||c.slice(w,w+a)===t)){d.push(c.slice(p,w)),p=w+a;continue}if(x==="/"){m=w;continue}}x==="["?f++:x==="]"&&f--}const g=d.length===0?c:c.substring(p),v=g.startsWith(XU),S=v?g.substring(1):g,C=m&&m>p?m-p:void 0;return{modifiers:d,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:C}};return n?c=>n({className:c,parseClassName:l}):l},dJ=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},fJ=e=>({cache:cJ(e.cacheSize),parseClassName:uJ(e),...oJ(e)}),hJ=/\s+/,pJ=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],l=e.trim().split(hJ);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=n(f);let S=!!v,C=r(S?g.substring(0,v):g);if(!C){if(!S){c=f+(c.length>0?" "+c:c);continue}if(C=r(g),!C){c=f+(c.length>0?" "+c:c);continue}S=!1}const w=dJ(p).join(":"),x=m?w+XU:w,I=x+C;if(a.includes(I))continue;a.push(I);const T=o(C,S);for(let O=0;O<T.length;++O){const D=T[O];a.push(x+D)}c=f+(c.length>0?" "+c:c)}return c};function mJ(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=JU(t))&&(r&&(r+=" "),r+=n);return r}const 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};function gJ(e,...t){let n,r,o,a=l;function l(d){const f=t.reduce((p,m)=>m(p),e());return n=fJ(f),r=n.cache.get,o=n.cache.set,a=c,c(d)}function c(d){const f=r(d);if(f)return f;const p=pJ(d,n);return o(d,p),p}return function(){return a(mJ.apply(null,arguments))}}const jt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},e8=/^\[(?:([a-z-]+):)?(.+)\]$/i,vJ=/^\d+\/\d+$/,yJ=new Set(["px","full","screen"]),bJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SJ=/\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$/,CJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,EJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fa=e=>Oc(e)||yJ.has(e)||vJ.test(e),us=e=>lu(e,"length",MJ),Oc=e=>!!e&&!Number.isNaN(Number(e)),lS=e=>lu(e,"number",Oc),bd=e=>!!e&&Number.isInteger(Number(e)),xJ=e=>e.endsWith("%")&&Oc(e.slice(0,-1)),Qe=e=>e8.test(e),ds=e=>bJ.test(e),_J=new Set(["length","size","percentage"]),IJ=e=>lu(e,_J,t8),AJ=e=>lu(e,"position",t8),TJ=new Set(["image","url"]),RJ=e=>lu(e,TJ,PJ),OJ=e=>lu(e,"",NJ),Sd=()=>!0,lu=(e,t,n)=>{const r=e8.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},MJ=e=>SJ.test(e)&&!CJ.test(e),t8=()=>!1,NJ=e=>EJ.test(e),PJ=e=>wJ.test(e),kJ=()=>{const e=jt("colors"),t=jt("spacing"),n=jt("blur"),r=jt("brightness"),o=jt("borderColor"),a=jt("borderRadius"),l=jt("borderSpacing"),c=jt("borderWidth"),d=jt("contrast"),f=jt("grayscale"),p=jt("hueRotate"),m=jt("invert"),g=jt("gap"),v=jt("gradientColorStops"),S=jt("gradientColorStopPositions"),C=jt("inset"),w=jt("margin"),x=jt("opacity"),I=jt("padding"),T=jt("saturate"),O=jt("scale"),D=jt("sepia"),P=jt("skew"),M=jt("space"),L=jt("translate"),z=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",Qe,t],F=()=>[Qe,t],q=()=>["",fa,us],X=()=>["auto",Oc,Qe],Se=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>["start","end","center","between","around","evenly","stretch"],ge=()=>["","0",Qe],Te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[Oc,Qe];return{cacheSize:500,separator:":",theme:{colors:[Sd],spacing:[fa,us],blur:["none","",ds,Qe],brightness:$(),borderColor:[e],borderRadius:["none","","full",ds,Qe],borderSpacing:F(),borderWidth:q(),contrast:$(),grayscale:ge(),hueRotate:$(),invert:ge(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[xJ,us],inset:j(),margin:j(),opacity:$(),padding:F(),saturate:$(),scale:$(),sepia:ge(),skew:$(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",Qe]}],container:["container"],columns:[{columns:[ds]}],"break-after":[{"break-after":Te()}],"break-before":[{"break-before":Te()}],"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"],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:[...Se(),Qe]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",bd,Qe]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Qe]}],grow:[{grow:ge()}],shrink:[{shrink:ge()}],order:[{order:["first","last","none",bd,Qe]}],"grid-cols":[{"grid-cols":[Sd]}],"col-start-end":[{col:["auto",{span:["full",bd,Qe]},Qe]}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":[Sd]}],"row-start-end":[{row:["auto",{span:[bd,Qe]},Qe]}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Qe]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...me()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...me(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...me(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Qe,t]}],"min-w":[{"min-w":[Qe,t,"min","max","fit"]}],"max-w":[{"max-w":[Qe,t,"none","full","min","max","fit","prose",{screen:[ds]},ds]}],h:[{h:[Qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ds,us]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lS]}],"font-family":[{font:[Sd]}],"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:["tighter","tight","normal","wide","wider","widest",Qe]}],"line-clamp":[{"line-clamp":["none",Oc,lS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fa,Qe]}],"list-image":[{"list-image":["none",Qe]}],"list-style-type":[{list:["none","disc","decimal",Qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fa,us]}],"underline-offset":[{"underline-offset":["auto",fa,Qe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Se(),AJ]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",IJ]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},RJ]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...W(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:W()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[fa,Qe]}],"outline-w":[{outline:[fa,us]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[fa,us]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ds,OJ]}],"shadow-color":[{shadow:[Sd]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",ds,Qe]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[T]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Qe]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",Qe]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",Qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[bd,Qe]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Qe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",Qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fa,us,lS]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},DJ=gJ(kJ);function Kt(...e){return DJ(rJ(e))}var cS={exports:{}},Hn={};var ON;function LJ(){if(ON)return Hn;ON=1;var e=Kf();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function a(d,f,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:d,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Hn.createPortal=function(d,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(d,f,null,p)},Hn.flushSync=function(d){var f=l.T,p=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=p,r.d.f()}},Hn.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},Hn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Hn.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,m=c(p,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):p==="script"&&r.d.X(d,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Hn.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},Hn.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,m=c(p,f.crossOrigin);r.d.L(d,p,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Hn.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},Hn.requestFormReset=function(d){r.d.r(d)},Hn.unstable_batchedUpdates=function(d,f){return d(f)},Hn.useFormState=function(d,f,p){return l.H.useFormState(d,f,p)},Hn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Hn.version="19.2.7",Hn}var MN;function n8(){if(MN)return cS.exports;MN=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),cS.exports=LJ(),cS.exports}var UJ=n8();const Cd={action:null,nextPrefix:null,preventDefault:!1},FJ={b:"goBrief",i:"goInbox",s:"goSent",f:"goFlagged",",":"goSettings"},zJ={j:{action:"focusNext"},k:{action:"focusPrevious"},arrowdown:{action:"focusNext"},arrowup:{action:"focusPrevious"},home:{action:"focusFirst"},end:{action:"focusLast"},enter:{action:"openFocused"}," ":{action:"toggleSelect"},delete:{action:"delete"},backspace:{action:"delete"},u:{action:"toggleRead"},x:{action:"toggleSelect"},r:{action:"reply"},a:{action:"replyAll"},f:{action:"forward"},"#":{action:"delete"},s:{action:"toggleStar"},m:{action:"muteSender"},b:{action:"blockSender"},v:{action:"vipSender"},"!":{action:"markJunk"},i:{action:"toggleIntelligence"},d:{action:"toggleDensity"},"/":{action:"focusSearch"},c:{action:"compose"},"?":{action:"help"}};function $J(e,t){const n=e.key.toLowerCase(),r=e.metaKey||e.ctrlKey;if(e.inEditable)return{...Cd,nextPrefix:t==="g"?null:t};if(e.onControl&&(n==="enter"||n===" "))return{...Cd,nextPrefix:t==="g"?null:t};if(r&&n==="n")return{action:"compose",nextPrefix:null,preventDefault:!0};if(r&&n==="a")return{action:"selectAll",nextPrefix:null,preventDefault:!0};if(r)return{...Cd,nextPrefix:t==="g"?null:t};if(n==="escape")return{action:"back",nextPrefix:null,preventDefault:!1};if(t==="g"){const l=FJ[n===","?",":n]??null;return{action:l,nextPrefix:null,preventDefault:l!==null}}if(n==="g"&&!e.shiftKey)return{action:null,nextPrefix:"g",preventDefault:!0};if(e.shiftKey){const a=n==="j"||n==="arrowdown";if(a||(n==="k"||n==="arrowup"))return{action:a?"extendSelectDown":"extendSelectUp",nextPrefix:null,preventDefault:!0}}const o=zJ[n];if(o){const a=o.requireShift===!0,l=n.length===1&&!/[a-z0-9]/.test(n);return!a&&e.shiftKey&&!l?Cd:{action:o.action,nextPrefix:null,preventDefault:!0}}return Cd}function jJ(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}const BJ="data-message-row",HJ='button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"]';function qJ(e){if(!(e instanceof HTMLElement))return!1;const t=e.closest(HJ);return t?!t.hasAttribute(BJ):!1}const VJ=["reply","replyAll","forward","delete","toggleStar","toggleRead","muteSender","blockSender","vipSender","markJunk"],WJ=["focusNext","focusPrevious","focusFirst","focusLast","openFocused","toggleSelect","extendSelectDown","extendSelectUp","selectAll","toggleDensity"],xn=(e,...t)=>({action:e,requires:t});xn("help"),xn("goBrief",{listIsNot:"brief"}),xn("goFlagged",{listIsNot:"flagged"}),xn("goInbox",{listIsNot:"inbox"}),xn("goSent",{listIsNot:"sent"}),xn("goSettings"),xn("compose"),xn("focusSearch"),xn("toggleIntelligence"),[...WJ.map(e=>xn(e,"listVisible")),...VJ.map(e=>xn(e,"aimed")),xn("back","selection")],xn("focusNext","threadOpen",{not:"listVisible"}),xn("focusPrevious","threadOpen",{not:"listVisible"}),xn("reply","threadOpen"),xn("replyAll","threadOpen"),xn("forward","threadOpen"),xn("back");function GJ(e,t){const n=t.at(-1);return n?n.handles.includes(e)?{outcome:"act",target:{kind:"overlay",frame:n}}:{outcome:"contained",by:{kind:"overlay",frame:n}}:null}const KJ="[data-escape-owner]";let jc=[],ZJ=0;const YJ=()=>++ZJ;function r8(){const[e]=_.useState(YJ);return e}const QJ=(e,t)=>e.depth-t.depth;function XJ(){return[...jc].sort(QJ).map(e=>({id:e.id,handles:Object.entries(e.run()).filter(([,t])=>t).map(([t])=>t)}))}function JJ(){let e;for(const t of jc)(!e||t.depth>e.depth)&&(e=t);return e}function V5e(e){return GJ(e,XJ())}function eee(e){if(e.key==="Escape"){const t=document.activeElement;return t instanceof Element&&t.closest(KJ)?null:"back"}return $J({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,inEditable:jJ(e.target),onControl:qJ(e.target)},null).action}function NN(e){const t=JJ();if(!t)return;const n=eee(e);if(!n)return;const r=t.run()[n];r&&(e.preventDefault(),e.stopImmediatePropagation(),r())}function PN(e){const t=jc.length===0;if(jc=e,t!==(e.length===0)){if(e.length>0){window.addEventListener("keydown",NN,!0);return}window.removeEventListener("keydown",NN,!0)}}function ov({id:e,open:t,answers:n={}}){const r=_.useRef(n);r.current=n;const o=r8();_.useEffect(()=>{if(!t)return;const a={id:e,depth:o,run:()=>r.current};return PN([...jc,a]),()=>{PN(jc.filter(l=>l!==a))}},[e,t,o])}const H_="inline-flex items-center justify-center gap-2 rounded-md font-medium whitespace-nowrap transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface disabled:opacity-50 disabled:pointer-events-none",q_={primary:"bg-accent text-accent-fg hover:bg-accent-hover",secondary:"bg-surface text-fg border border-line hover:bg-surface-sunken hover:border-line-strong",ghost:"text-fg-muted hover:bg-surface-sunken hover:text-fg",danger:"bg-danger text-accent-fg hover:opacity-90"},V_={sm:"h-7 px-2.5 text-xs",md:"h-9 px-3.5 text-sm",touch:"h-11 w-11 text-sm"},W5e=({variant:e="primary",size:t="md"})=>Kt(H_,q_[e],V_[t]);function zn({variant:e="primary",size:t="md",icon:n,className:r,children:o,ref:a,...l}){return R.jsxs("button",{type:"button",ref:a,className:Kt(H_,q_[e],V_[t],r),...l,children:[n,o]})}function tee({variant:e="primary",size:t="md",icon:n,external:r,className:o,children:a,...l}){return R.jsxs("a",{className:Kt(H_,q_[e],V_[t],o),...r?{target:"_blank",rel:"noopener noreferrer"}:{},...l,children:[n,a]})}const nee='a[href], button, input, select, textarea, iframe, [tabindex], [contenteditable]:not([contenteditable="false"])';function ree(e){if(Number(e.getAttribute("tabindex")??0)<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"||e.closest("[inert], [hidden], [aria-hidden='true']"))return!1;const t=getComputedStyle(e);return t.display!=="none"&&t.visibility!=="hidden"}function kN(e){const t=e.querySelectorAll('[role="dialog"][aria-modal="true"]');return[...(t[t.length-1]??e).querySelectorAll(nee)].filter(ree)}const Xw=new Set;function oee(e){for(const t of Xw)if(t>e)return!1;return!0}function aee(e,t){return!(t instanceof HTMLElement)||t===document.body||t===document.documentElement?!1:!e.contains(t)}function av(e,t){const n=r8();_.useEffect(()=>{if(t)return Xw.add(n),()=>{Xw.delete(n)}},[t,n]),_.useEffect(()=>{if(!t)return;const r=document.activeElement instanceof HTMLElement?document.activeElement:null,o=e.current;return o&&(kN(o)[0]??o).focus(),()=>{r?.isConnected&&r.focus()}},[t,e]),_.useEffect(()=>{if(!t)return;const r=o=>{if(o.key!=="Tab"||o.defaultPrevented||!oee(n))return;const a=e.current;if(!a)return;const l=document.activeElement;if(aee(a,l))return;const c=kN(a),d=c[0],f=c.at(-1);if(!d||!f){o.preventDefault(),a.focus();return}const p=l instanceof HTMLElement&&c.includes(l);if(o.shiftKey){(!p||l===d)&&(o.preventDefault(),f.focus());return}(!p||l===f)&&(o.preventDefault(),d.focus())};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[t,e,n])}const see=({label:e,onDismiss:t,className:n})=>R.jsx("button",{type:"button","aria-label":e,tabIndex:-1,onClick:t,className:Kt("absolute inset-0 bg-canvas/80",n)}),iee={info:"bg-accent-2/15 text-accent-2 border-accent-2/40",success:"bg-positive/15 text-positive border-positive/40",warning:"bg-warning/15 text-warning border-warning/40",danger:"bg-danger/15 text-danger border-danger/40"},lee={info:"bg-surface-sunken text-fg-muted",success:"bg-positive/10 text-positive",warning:"bg-warning/10 text-warning",danger:"bg-danger-soft text-danger"},cee={info:"status",success:"status",warning:"alert",danger:"alert"};function Xr({tone:e="info",variant:t="framed",onDismiss:n,role:r,className:o,children:a,...l}){const c=t==="soft";return R.jsxs("div",{role:r??cee[e],className:Kt("flex gap-2 px-3 py-2 text-sm",c?Kt("items-start rounded-md",lee[e]):Kt("items-center border",iee[e]),o),...l,children:[R.jsx("div",{className:"flex-1 min-w-0",children:a}),n&&(c?R.jsx(zn,{variant:"ghost",size:"sm",icon:R.jsx(Yw,{className:"size-3.5"}),onClick:n,"aria-label":"Dismiss",className:"-mr-1 shrink-0"}):R.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"shrink-0 rounded-md p-1 hover:bg-fg/10 transition-colors",children:R.jsx(Yw,{className:"size-4","aria-hidden":"true"})}))]})}function DN({open:e,onClose:t,title:n,children:r,className:o,anchor:a="center"}){const l=_.useRef(null);if(ov({id:"dialog",open:e,answers:{back:t}}),av(l,e),!e)return null;const c=a==="left",d=a==="right";return R.jsxs("div",{className:Kt("fixed inset-0 z-50 flex",c?"items-stretch justify-start":d?"items-stretch justify-end":"items-center justify-center px-4"),children:[R.jsx(see,{label:"Dismiss dialog",onDismiss:t}),R.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-labelledby":"dialog-title",tabIndex:-1,className:Kt("relative z-10 overflow-hidden border-line bg-surface shadow-xl",c?"safe-area-frame h-full w-72 max-w-[85vw] border-r":d?"safe-area-frame h-full w-[80vw] max-w-[320px] border-l":"w-full max-w-lg rounded-md border",o),children:[R.jsx("h2",{id:"dialog-title",className:"sr-only",children:n}),r]})]})}function o8({children:e,label:t}){return R.jsxs("span",{className:"relative inline-flex",children:[e,t!==void 0&&R.jsxs(R.Fragment,{children:[R.jsx("span",{"data-testid":"attention-dot",className:"absolute -right-1 -top-1 size-2 rounded-full bg-accent-2"}),R.jsx("span",{className:"sr-only",children:t})]})]})}function sv({children:e,className:t}){return R.jsx("div",{"data-auth-page":!0,className:Kt("flex min-h-dvh w-full flex-col items-center justify-center overflow-y-auto bg-surface-sunken pb-[max(2rem,env(safe-area-inset-bottom,0px))] pl-[max(1rem,env(safe-area-inset-left,0px))] pr-[max(1rem,env(safe-area-inset-right,0px))] pt-[max(2rem,env(safe-area-inset-top,0px))] text-fg",t),style:{backgroundImage:"radial-gradient(at 20% 0%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%), radial-gradient(at 80% 100%, color-mix(in oklch, var(--accent) 8%, transparent) 0px, transparent 50%)"},children:R.jsx("div",{className:"w-full max-w-[26rem]",children:e})})}const uee="Secure sign-in powered by AWS Cognito";function W_(e){const t=e?.note??"Secure sign-in";return R.jsx("div",{className:"text-center pt-5",children:R.jsx("p",{className:"text-xs text-fg-muted",children:t})})}const dee=()=>R.jsxs("svg",{width:"36",height:"36",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"text-accent",children:[R.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),R.jsx("path",{d:"M3 7l9 6 9-6"})]});function iv({wordmark:e="remit,",tagline:t="your email client in the cloud.",mark:n=R.jsx(dee,{})}){return R.jsxs("div",{className:"text-center pb-6",children:[R.jsx("div",{className:"flex items-center justify-center pb-3",children:n}),R.jsx("h1",{className:"text-[1.75rem] font-semibold tracking-[-0.01em] text-fg",children:e}),R.jsx("p",{className:"mt-1 text-sm text-fg-muted",children:t})]})}const fee={default:Kt("flex h-9 items-center gap-2 rounded-md border border-line bg-surface-sunken px-3 text-sm","focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors"),inline:"flex items-center gap-2 bg-transparent text-sm"};function mf({icon:e,className:t,variant:n="default",trailing:r,ref:o,...a}){return R.jsxs("div",{className:Kt(fee[n],t),children:[e&&R.jsx("span",{className:"text-fg-subtle shrink-0",children:e}),R.jsx("input",{ref:o,className:"min-w-0 flex-1 bg-transparent text-fg placeholder:text-fg-subtle outline-none",...a}),r]})}const hee={info:"bg-accent-2",success:"bg-positive",warning:"bg-warning",danger:"bg-danger"};function uS({value:e,max:t,tone:n="info",indeterminate:r=!1,className:o}){const a=r?100:t<=0?0:Math.min(100,Math.max(0,e/t*100));return R.jsx("div",{role:"progressbar","aria-valuenow":r?void 0:e,"aria-valuemin":r?void 0:0,"aria-valuemax":r?void 0:t,className:Kt("h-1.5 w-full overflow-hidden rounded-full bg-surface-sunken",o),children:R.jsx("div",{className:Kt("h-full rounded-full transition-[width] duration-300 ease-out",hee[n],r&&"w-1/3 animate-pulse"),style:r?void 0:{width:`${a}%`}})})}const a8={DmarcFail:"It failed the sender domain's DMARC check.",DkimDmarcFail:"The sender's domain did not sign it, and its authentication failed.",SignerMismatch:"It was signed by a different domain than its sender.",ReplyToMismatch:"Replies would go to a different domain than the sender's.",LinkTextMismatch:"A link's text shows one domain and opens another.",LinkDomainDistant:"A link leads to a domain unrelated to the sender's.",PunycodeDomain:"A domain in it is written in punycode, which can hide lookalike letters.",MixedScriptDomain:"A domain in it mixes letters from different alphabets.",ConfusableDomains:"Two different domains in it look the same.",SingleOffDomainLink:"Its only link leads away from the sender's domain.",GeneratedName:"The sender's address looks machine-generated.",FirstContactDomain:"The sender's domain has sent you nothing before.",RecentlyRegisteredDomain:"The sender's domain was registered recently.",UnknownRegistrationDate:"The sender's domain has no public registration date.",ClassifierSpam:"Remit's classifier rated it as likely spam.",ClassifierPhishing:"Remit's classifier rated it as likely phishing.",ProviderSpam:"Your provider marked it as spam.",DisplayNameForeignAddress:"The display name spells out an address at another domain.",DisplayNameLookalike:"The display name looks like a different domain's name.",ModelImpersonation:"The model judged that it claims an organisation its sender does not belong to.",ModelSpam:"The model judged it spam.",ModelClean:"The model judged it legitimate.",ListedPhishingLink:"A link in it is on a list of known phishing pages."},pee=new Set(["ModelImpersonation","ModelSpam","ModelClean"]),mee=e=>pee.has(e.name),gee="Remit ran a check this version can't describe.",G5e="Remit couldn't check this message",K5e="Only the basic checks ran",vee=e=>Object.hasOwn(a8,e);function yee(e){return vee(e)?a8[e]:void 0}function bee(e){return e.reduce((t,n)=>t&&t.score>=n.score?t:n,void 0)}function Z5e(e){const t=bee(e);return t?yee(t.name)??gee:""}function Y5e(e){if(e.modelOutcome!=="Answered")return;const t=e.reasons.find(mee);if(!(!t||t.options.length===0))return t.options.join(" ")}const See={NotConfigured:"this account has no model set up.",DailyLimit:"this account reached its daily model limit.",RateLimited:"the model provider asked Remit to slow down."};function Q5e(e){const t=e.modelOutcome;if(!(t==="Answered"||t==="OutOfBand"))return See[t]}const X5e={Unreachable:"the spam service could not be reached",TimedOut:"the spam service did not answer in time",ServiceError:"the spam service answered with an error",Unparseable:"Remit could not read the spam service's answer"},s8={RateLimited:"try again in a minute.",DailyCap:"try again tomorrow (daily model limit).",NotSettled:"a move is still settling. Remit will retry it once the move lands.",NotFound:"the message is gone from the server. No retry for this one.",NotPermitted:"the server refused access to this message. No retry for this one."},J5e={NeverSpam:"You marked this sender Never in Spam.",Vip:"This sender is a VIP.",WellKnown:"You know this sender well.",KnownSender:"You have written to this sender before.",Newsletter:"It is a newsletter from a sender you already get mail from."},eDe=e=>`Your filter "${e}" matched it.`,tDe={Spam:"Remit suspects this is spam",Phishing:"Remit suspects this message impersonates someone"},jp=e=>e.toFixed(2),nDe=(e,t)=>t.state==="Set"?`Score ${jp(e)}. Remit warns from ${jp(t.cleanBelow)} and moves to Spam from ${jp(t.spamAt)}.`:`Score ${jp(e)}. The spam service applies its own thresholds.`;function Cee(e){const t=[e.nowSpam>0&&`${e.nowSpam} now reach Spam`,e.nowSuspected>0&&`${e.nowSuspected} ${e.nowSuspected===1?"is":"are"} now suspected`,e.noLongerSuspected>0&&`${e.noLongerSuspected} ${e.noLongerSuspected===1?"is":"are"} no longer suspected`].filter(o=>typeof o=="string"),n=e.nowSpam+e.nowSuspected+e.noLongerSuspected,r=e.nowSpam>0?"Nothing moved. Open a message to move it to Spam.":"Nothing moved.";return n===0?`Nothing changed. ${r}`:`${n} changed: ${t.join(", ")}. ${r}`}const dS=e=>t=>{t.key==="Escape"&&(t.stopPropagation(),e())};function fS({children:e,onKeyDown:t}){return R.jsx("section",{"aria-label":"Check again",onKeyDown:t,className:"w-full max-w-md space-y-3 rounded-lg border border-line bg-surface p-4 text-sm shadow-lg",children:e})}function Eee(e){const t=_.useRef(null),{state:n}=e;if(_.useEffect(()=>{t.current?.focus()},[n]),e.state==="Running")return R.jsxs(fS,{onKeyDown:dS(e.onStop),children:[R.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.checked} of ${e.total}`}),R.jsx(uS,{value:e.checked,max:e.total}),R.jsx("p",{className:"text-fg-muted",children:"Remit sends ten at a time and waits for each answer. Keep this page open until it finishes."}),R.jsx(zn,{ref:t,variant:"secondary",size:"md",onClick:e.onStop,children:"Stop"})]});if(e.state==="Done")return R.jsxs(fS,{onKeyDown:dS(e.onDone),children:[R.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.total} of ${e.total}`}),R.jsx(uS,{value:e.total,max:e.total,tone:"success"}),R.jsx("p",{className:"text-fg-muted",children:Cee(e.summary)}),R.jsx(zn,{ref:t,variant:"primary",size:"md",onClick:e.onDone,children:"Done"})]});const r=e.failures.filter(o=>o.retryable).length;return R.jsxs(fS,{onKeyDown:dS(e.onClose),children:[R.jsx("p",{"aria-live":"polite",className:"font-semibold text-fg tabular-nums",children:`Checked ${e.checked} of ${e.total}. ${e.failures.length} couldn't be checked.`}),R.jsx(uS,{value:e.checked,max:e.total,tone:"warning"}),R.jsx("ul",{className:"list-disc space-y-1 pl-4 text-fg-muted marker:text-fg-subtle",children:e.failures.map(o=>R.jsxs("li",{children:[R.jsx("span",{className:"text-fg",children:o.subject}),":"," ",s8[o.code]]},o.messageId))}),R.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r>0&&R.jsx(zn,{ref:t,variant:"primary",size:"md",onClick:e.onRetry,children:`Try again for ${r}`}),R.jsx(tee,{variant:"ghost",size:"md",href:e.reportIssueHref,external:!0,children:"Report an issue"}),R.jsx(zn,{ref:r>0?void 0:t,variant:"secondary",size:"md",onClick:e.onClose,children:"Close"})]})]})}const wee={error:{container:"border-danger/50 bg-danger-soft",icon:"text-danger",title:"text-danger"},warning:{container:"border-warning/50 bg-warning-soft",icon:"text-warning",title:"text-warning"},info:{container:"border-accent-2/50 bg-accent-2-soft",icon:"text-accent-2",title:"text-accent-2"}},xee={error:CU,warning:j_,info:qX},_ee={error:"Error",warning:"Warning",info:"Information"},Iee=({id:e,severity:t,title:n,detail:r,action:o,onRetry:a,onDismiss:l})=>{const c=wee[t],d=xee[t];return R.jsxs("div",{role:t==="error"?"alert":"status","aria-live":t==="error"?"assertive":"polite",className:Kt("pointer-events-auto flex items-start gap-3 rounded-md border bg-canvas px-3 py-2 shadow-lg",c.container),children:[R.jsx(d,{className:Kt("size-5 shrink-0 mt-0.5",c.icon),"aria-hidden":"true"}),R.jsxs("div",{className:"flex-1 min-w-0",children:[R.jsx("p",{className:Kt("text-sm font-medium",c.title),children:n}),r&&R.jsx("p",{className:"mt-0.5 text-xs text-fg-muted break-words",children:r}),(a||o)&&R.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-4 gap-y-1",children:[a&&R.jsx(zn,{variant:"secondary",size:"sm",onClick:()=>{l(e),a()},children:"Try again"}),o&&R.jsx("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:"inline-block text-xs font-medium text-accent-2 underline underline-offset-2",children:o.label})]})]}),R.jsx("button",{type:"button",onClick:()=>l(e),className:"shrink-0 rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors","aria-label":`Dismiss ${_ee[t].toLowerCase()}`,children:R.jsx(Yw,{className:"size-4","aria-hidden":"true"})})]})},Aee=({errors:e,onDismiss:t})=>e.length===0?null:R.jsx("section",{"aria-label":"Notifications",className:"pointer-events-none fixed inset-x-0 top-0 z-[60] flex flex-col items-center gap-2 px-4 pt-[calc(1rem+env(safe-area-inset-top,0px))] sm:items-end sm:pr-6",children:R.jsx("div",{className:"flex w-full max-w-md flex-col gap-2",children:e.map(n=>R.jsx(Iee,{id:n.id,severity:n.severity,title:n.title,detail:n.detail,action:n.action,onRetry:n.onRetry,onDismiss:t},n.id))})});function Tee({className:e,children:t,...n}){return R.jsx("label",{className:Kt("mb-1 block text-xs font-medium text-fg-muted",e),...n,children:t})}const Ree="Matches on what the messages say about themselves — sender, subject, list. No reading involved.",Oee={From:"From",Subject:"Subject",HasWords:"Has the words",ListId:"List",FromDomain:"Domain"};function Mee(e){return Oee[e]}const Nee={ListId:"The mailing list's List-Id header, matched exactly. New mail is matched as it arrives — mail delivered before this was set up may not carry it yet.",FromDomain:"The sender's registrable domain — matches anyone at it, subdomains included (a look-alike like example.com.evil.test never matches)."};function rDe(e){return Nee[e]}function Pee(e){return e==="HasWords"}function i8(e){return e.clauses.length>0}function l8(e){return e.clauses.filter(t=>Pee(t.field))}const oDe=["From","Subject","HasWords","ListId","FromDomain"],kee={all:"Match all",any:"Match any"};function aDe(e){return kee[e]}function Dee(e){return e==="all"?"and":"or"}function sDe(e){if(e.status==="loading")return"Counting matches…";if(e.status==="error")return e.reason;if(e.count===0)return"No mail matches yet";const t=e.count===1?"message":"messages",n=`${e.count} ${t} match`;return e.stale?`${n} — recounting`:n}const Lee={once:"Just once",standing:"Keep doing this",until:"Until a date"};function iDe(e){return Lee[e]}function lDe(e){return e==="once"?"Apply now":e==="standing"?"Save rule":"Save until then"}const Yr={noMatch:"Add a clause so the rule has something to match.",bodyTextOnce:"Applying once can't read message bodies. Save this as a rule instead, or drop the “has the words” clause.",noAction:"Pick a folder to move into, or a label to apply.",unnamed:"Name this rule so you can find it later.",noUntilDate:"Pick the date this rule should stop on.",counting:"Counting matches — save once the count settles.",recounting:"Recounting matches — save once the count settles."},cDe="Can't count matches — “has the words” reads message bodies, which only a saved rule does.";function c8(e){if(e.status==="loading")return Yr.counting;if(e.status==="ready"&&e.stale)return Yr.recounting}function uDe(e,t){return i8(e)?e.scope==="once"&&l8(e).length>0?Yr.bodyTextOnce:!e.moveMailboxId&&!e.labelId?Yr.noAction:(e.scope==="standing"||e.scope==="until")&&(e.name??"").trim()===""?Yr.unnamed:e.scope==="until"&&!e.until?Yr.noUntilDate:c8(t):Yr.noMatch}const G_=(e,t)=>t.length===0?[e]:e.split(t),Uee=(e,t)=>{const n=G_(e,t);return n[n.length-1]||e},gf=(e,t)=>{if(t.length===0)return"";const n=e.lastIndexOf(t);return n===-1?"":e.slice(0,n)},Fee=(e,t)=>G_(e,t).length-1,vf=(e,t)=>{const n=[];let r=e,o=gf(r,t);for(;o&&o.length<r.length;)n.push(o),r=o,o=gf(r,t);return n},zee=(e,t)=>{const n=new Set(e.map(l=>l.path)),r=new Set,o=[],a=l=>{if(!r.has(l.path)){r.add(l.path),o.push(l);for(const c of e)gf(c.path,t)===l.path&&a(c)}};for(const l of e){const c=gf(l.path,t);c&&n.has(c)||a(l)}return o},u8=(e,t)=>e.label.toLowerCase().includes(t)||e.path.toLowerCase().includes(t),$ee=(e,t,n)=>{const r=new Set;if(!t)return r;for(const o of e)if(u8(o,t))for(const a of vf(o.path,n))r.add(a);return r},jee=(e,t,n,r=new Set)=>{const o=(c,d)=>({folder:c,depth:Fee(c.path,n),context:d,expanded:r.has(c.path)});if(!t)return e.map(c=>o(c,!1));const a=new Set;for(const c of e)u8(c,t)&&a.add(c.path);const l=new Set(a);for(const c of a)for(const d of vf(c,n))l.add(d);return e.filter(c=>l.has(c.path)).map(c=>o(c,!a.has(c.path)))},Bee=(e,t,n)=>{const r=new Set(e.map(o=>o.path));return e.flatMap(o=>{const a=vf(o.path,n).filter(l=>r.has(l));return a.every(l=>t.has(l))?[{folder:o,depth:a.length,context:!1,expanded:t.has(o.path)}]:[]})},Hee=(e,t)=>{if(t.length===0)return e.map((a,l)=>({kind:"folder",row:a,index:l}));const n=[],r=[],o=a=>{for(;r.length>0;){const l=r[r.length-1];if(!l||a?.startsWith(`${l.folder.path}${t}`))break;r.pop(),n.push({kind:"create",parent:l.folder,depth:l.depth+1})}};return e.forEach((a,l)=>{o(a.folder.path),n.push({kind:"folder",row:a,index:l}),a.expanded&&r.push(a)}),o(null),n},qee=e=>typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError",Mo=e=>e!==void 0&&!e.context,hS=e=>e!==void 0&&!e.folder.isCurrent&&!e.context,pS=e=>{for(let t=0;t<e.length;t+=1)if(Mo(e[t]))return t;return-1},Vee=e=>{for(let t=e.length-1;t>=0;t-=1)if(Mo(e[t]))return t;return-1},LN=(e,t,n)=>{const r=e.length;if(r<=0)return-1;const o=t<0?n===1?-1:r:t;for(let a=1;a<=r;a+=1){const l=((o+n*a)%r+r)%r;if(Mo(e[l]))return l}return-1},Wee=(e,t,n)=>{const r=e[t];if(!r)return-1;const o=gf(r.folder.path,n);if(!o)return-1;for(let a=t-1;a>=0;a-=1)if(e[a]?.folder.path===o)return Mo(e[a])?a:-1;return-1},Jw="flex min-h-11 min-w-0 flex-1 items-center gap-2 px-3 py-2.5 text-left text-sm transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",d8=14,Gee=60,ex=({depth:e})=>e>0?R.jsx("span",{"aria-hidden":"true",className:"shrink-0",style:{width:e*d8}}):null,tx=({depth:e})=>R.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute right-0 bottom-0 h-px bg-line",style:{left:Gee+e*d8}}),Kee=({label:e,depth:t,expanded:n,ariaLabel:r,selected:o=!1,context:a=!1,current:l=!1,currentTag:c,messageCount:d,failure:f,separated:p=!1,actions:m,tabIndex:g,onActivate:v,onFocus:S,ref:C})=>{const w=R.jsx(LX,{className:Kt("size-4 shrink-0 text-fg-subtle transition-transform",n&&"rotate-90"),"aria-hidden":"true"}),x=R.jsx($X,{className:"size-4 shrink-0 text-fg-subtle","aria-hidden":"true"}),I=d===void 0?null:R.jsxs("span",{"aria-hidden":"true",className:"shrink-0 text-2xs text-fg-subtle",children:[d," ",d===1?"msg":"msgs"]}),T=R.jsxs("span",{className:"min-w-0 flex-1",children:[R.jsx("span",{className:"block truncate",children:e}),f&&R.jsxs("span",{className:"flex items-center gap-1 text-2xs text-danger",children:[R.jsx(CU,{className:"size-3 shrink-0","aria-hidden":"true"}),R.jsx("span",{className:"truncate",children:f})]})]}),O=f?`${r} — ${f}`:r;return a?R.jsxs("div",{className:"relative flex items-center",children:[R.jsxs("div",{role:"treeitem","aria-level":t+1,"aria-selected":!1,"aria-expanded":n,"aria-label":O,className:Kt(Jw,"opacity-60"),children:[R.jsx(ex,{depth:t}),w,x,T,I]}),m,p&&R.jsx(tx,{depth:t})]}):R.jsxs("div",{className:"relative flex items-center",children:[R.jsxs("button",{ref:C,type:"button",role:"treeitem","aria-level":t+1,"aria-selected":o,"aria-expanded":n,"aria-current":l?"true":void 0,"aria-label":O,tabIndex:g,onClick:v,onFocus:S,className:Kt(Jw,"hover:bg-surface-raised active:bg-surface-sunken",l&&"text-fg-muted"),children:[R.jsx(ex,{depth:t}),w,x,T,I,l&&c&&R.jsx("span",{className:"shrink-0 text-xs text-fg-muted",children:c}),o&&R.jsx(yU,{className:"size-4 shrink-0 text-accent","aria-hidden":"true"})]}),m,p&&R.jsx(tx,{depth:t})]})},UN=({label:e,ariaLabel:t,depth:n=0,prominence:r="prominent",separated:o=!1,onOpen:a})=>R.jsxs("div",{className:Kt("relative",r==="prominent"&&"p-2"),children:[R.jsxs("button",{type:"button",onClick:a,"aria-label":t,"data-prominence":r,className:Kt(Jw,"w-full active:bg-surface-sunken",r==="prominent"?"rounded-lg border border-line-strong border-dashed font-medium text-fg-muted hover:border-accent-2 hover:text-accent-2":"text-fg-subtle hover:bg-surface-raised hover:text-fg-muted"),children:[R.jsx(ex,{depth:n}),R.jsx("span",{"aria-hidden":"true",className:"size-4 shrink-0"}),R.jsx(jX,{className:"size-4 shrink-0","aria-hidden":"true"}),R.jsx("span",{className:"min-w-0 flex-1 truncate",children:e})]}),o&&R.jsx(tx,{depth:n})]}),f8={nameLabel:"Folder name",namePlaceholder:"Hotels",insideLabel:"Inside",create:"Create folder",cancel:"Cancel",createPending:"Creating folder…"},Zee=({parentLabel:e,name:t,onNameChange:n,onSubmit:r,onCancel:o,pending:a=!1,error:l,labels:c})=>{const d={...f8,...c},f=_.useId(),p=_.useRef(null),m=_.useRef(null);return _.useEffect(()=>{p.current?.focus({preventScroll:!0}),m.current?.scrollIntoView({block:"nearest"})},[]),R.jsxs("div",{ref:m,className:"space-y-3 border-y border-line bg-surface-sunken px-3 py-3",children:[R.jsxs("div",{children:[R.jsx(Tee,{htmlFor:f,children:d.nameLabel}),R.jsx(mf,{id:f,ref:p,value:t,placeholder:d.namePlaceholder,onChange:g=>n(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),r()),g.key==="Escape"&&(g.preventDefault(),o())}})]}),R.jsxs("p",{className:"text-xs text-fg-muted",children:[d.insideLabel," ",R.jsx("span",{className:"font-medium text-fg",children:e})]}),l&&R.jsx("p",{className:"text-xs text-danger",role:"alert",children:l}),R.jsxs("div",{className:"flex items-center gap-2",children:[R.jsx(zn,{variant:"ghost",size:"md",onClick:o,className:"min-h-11 shrink-0",children:d.cancel}),R.jsx(zn,{variant:"secondary",size:"md",onClick:r,disabled:a,className:"min-h-11 shrink-0",children:a?d.createPending:d.create})]})]})},Yee={...f8,filterPlaceholder:"Filter folders…",filterAriaLabel:"Filter folders",treeAriaLabel:"Destination folders",currentSuffix:"(current folder)",currentTag:"current",contextSuffix:"(containing folder)",emptyMessage:e=>`No folders match "${e}"`,noFolders:"No folders to show",optionLabel:e=>`Move to ${e.label}`,newFolder:"New folder",newSubfolder:e=>`New folder inside ${e}`,topLevel:"Top level",nameRequired:"Give the folder a name.",createError:"Couldn't create that folder. Please try again."},Qee=({folders:e,selectedId:t,onSelect:n,rowActions:r,rowFailure:o,onCreateFolder:a,onCancel:l,delimiter:c="/",labels:d,autoFocusFilter:f=!1})=>{const p={...Yee,...d},[m,g]=_.useState(""),[v,S]=_.useState(()=>{const ae=e.find(Ae=>Ae.id===t);return new Set(ae?vf(ae.path,c):[])}),[C,w]=_.useState(null),[x,I]=_.useState(""),[T,O]=_.useState(),[D,P]=_.useState(!1),[M,L]=_.useState(-1),z=_.useRef([]),G=_.useRef(null),j=_.useRef(!1),F=_.useRef(null);_.useEffect(()=>()=>F.current?.abort(),[]),_.useEffect(()=>{f&&G.current?.focus()},[f]);const q=m.trim().toLowerCase(),X=_.useMemo(()=>zee(e,c),[e,c]),Se=_.useMemo(()=>{const ae=$ee(X,q,c);return ae.size===0?v:new Set([...v,...ae])},[X,v,q,c]),W=_.useMemo(()=>q?jee(X,q,c,Se):Bee(X,Se,c),[X,q,c,Se]),ee=_.useMemo(()=>a?Hee(W,c):void 0,[W,c,a]);_.useEffect(()=>{L(ae=>Mo(W[ae])?ae:pS(W))},[W]),_.useEffect(()=>{j.current&&(j.current=!1,!(M<0)&&z.current[M]?.focus())},[M]);const me=_.useCallback((ae,Ae)=>{S(Je=>{if(Ae)return new Set([...vf(ae,c),ae]);const we=new Set(Je);return we.delete(ae),we})},[c]),ge=_.useCallback(ae=>{hS(ae)&&n?.(ae.folder.id),me(ae.folder.path,!ae.expanded)},[n,me]),Te=_.useCallback(()=>{F.current?.abort(),w(null),I(""),O(void 0),P(!1)},[]),$=_.useCallback(ae=>{F.current?.abort(),w({anchorId:ae?.id??null,parentPath:ae?.path??"",parentLabel:ae?.label??p.topLevel}),I(""),O(void 0),P(!1)},[p.topLevel]),te=_.useCallback(()=>{if(!a||!C||D)return;const ae=x.trim();if(ae===""){O(p.nameRequired);return}P(!0),O(void 0),F.current?.abort();const Ae=new AbortController;F.current=Ae;const Je=C.parentPath;a(ae,Je,Ae.signal).then(we=>{P(!1),w(null),I(""),Je&&me(Je,!0),n?.(we.id)}).catch(we=>{qee(we)||(O(we instanceof Error?we.message:p.createError),P(!1))})},[a,C,D,x,n,me,p.nameRequired,p.createError]),fe=_.useCallback(ae=>{const Ae=ae.target;if(!(Ae instanceof Element)||!Ae.closest('[role="treeitem"]'))return;const Je=wt=>{ae.preventDefault(),j.current=!0,L(wt)},we=W[M];switch(ae.key){case"ArrowDown":return Je(LN(W,M,1));case"ArrowUp":return Je(LN(W,M,-1));case"Home":return Je(pS(W));case"End":return Je(Vee(W));case"ArrowRight":{if(!Mo(we)||!we)return;if(ae.preventDefault(),!we.expanded){me(we.folder.path,!0);return}const wt=M+1;Mo(W[wt])&&Je(wt);return}case"ArrowLeft":{if(!Mo(we)||!we)return;if(ae.preventDefault(),we.expanded){me(we.folder.path,!1);return}const wt=Wee(W,M,c);wt>=0&&Je(wt);return}case"Enter":case" ":{if(!Mo(we)||!we)return;ae.preventDefault(),ge(we);return}case"Escape":ae.preventDefault(),l?.();return;default:return}},[W,M,c,ge,me,l]),ce=C!==null&&C.anchorId!==null&&(ee?.some(ae=>ae.kind==="create"&&ae.parent.id===C.anchorId)??!1),be=C&&R.jsx(Zee,{parentLabel:C.parentLabel,name:x,onNameChange:ae=>{I(ae),O(void 0)},onSubmit:te,onCancel:Te,pending:D,error:T,labels:p}),Fe=ae=>ae.context?`${ae.folder.label} ${p.contextSuffix}`:hS(ae)?p.optionLabel(ae.folder):`${ae.folder.label} ${p.currentSuffix}`,ke=(ae,Ae,Je)=>{const{folder:we,depth:wt}=ae,Ge=hS(ae);return R.jsx(Kee,{ref:Dt=>{z.current[Ae]=Dt},label:we.label,depth:wt,expanded:ae.expanded,context:ae.context,current:we.isCurrent,currentTag:p.currentTag,messageCount:we.messageCount,selected:Ge&&we.id===t,separated:Je,failure:o?.(we),actions:r?.(we),ariaLabel:Fe(ae),tabIndex:Ae===M?0:-1,onActivate:()=>ge(ae),onFocus:()=>L(Ae)})};return R.jsxs("div",{className:"flex min-h-0 w-full min-w-0 flex-col",children:[R.jsx(mf,{ref:G,variant:"inline",className:"border-b border-line px-3 py-2",icon:R.jsx(GX,{className:"size-4","aria-hidden":"true"}),type:"search",value:m,onChange:ae=>g(ae.target.value),onKeyDown:ae=>{if(ae.key==="Escape"){ae.preventDefault(),l?.();return}if(ae.key!=="ArrowDown")return;ae.preventDefault();const Ae=Mo(W[M])?M:pS(W);Ae<0||(j.current=!0,L(Ae),z.current[Ae]?.focus())},placeholder:p.filterPlaceholder,"aria-label":p.filterAriaLabel}),a&&R.jsx("div",{className:"shrink-0 border-b border-line","data-create-anchor":"top",children:C&&!ce?be:R.jsx(UN,{label:p.newFolder,ariaLabel:p.newFolder,prominence:"prominent",onOpen:()=>$(null)})}),W.length===0?R.jsx("p",{className:"px-3 py-3 text-sm text-fg-muted","aria-live":"polite",children:e.length===0?p.noFolders:p.emptyMessage(m)}):R.jsx("div",{role:"tree","aria-label":p.treeAriaLabel,className:"min-h-0 flex-1 overflow-y-auto overflow-x-hidden pb-24",onKeyDown:fe,children:(ee??W.map((ae,Ae)=>({kind:"folder",row:ae,index:Ae}))).map((ae,Ae,Je)=>{const we=Ae<Je.length-1;return ae.kind==="create"?R.jsx("div",{role:"none","data-create-anchor":ae.parent.id,children:C?.anchorId===ae.parent.id?be:R.jsx(UN,{label:p.newFolder,ariaLabel:p.newSubfolder(ae.parent.label),depth:ae.depth,prominence:"quiet",separated:we,onOpen:()=>$(ae.parent)})},`new:${ae.parent.id}`):R.jsx("div",{role:"none",children:ke(ae.row,ae.index,we)},ae.row.folder.id)})})]})},Xee={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Spam",trash:"Trash",flagged:"Starred",all:"All Mail"};function Jee(e){return Xee[e]}const ete=new Set(["all","flagged"]);function tte(e){return ete.has(e)}const nte=new Set(["[Gmail]","[Google Mail]"]);function rte(e){if(e.role)return tte(e.role)?void 0:Jee(e.role);if(!e.providerPath)return;const t=G_(e.providerPath,e.hierarchyDelimiter);if(!nte.has(t[0]))return Uee(e.providerPath,e.hierarchyDelimiter)}function dDe(e){return e==="inbox"?R.jsx(OU,{className:"size-4"}):e==="drafts"?R.jsx(zX,{className:"size-4"}):e==="sent"?R.jsx(KX,{className:"size-4"}):e==="archive"?R.jsx(kX,{className:"size-4"}):e==="junk"?R.jsx($_,{className:"size-4"}):e==="trash"?R.jsx(JX,{className:"size-4"}):e==="flagged"?R.jsx(QX,{className:"size-4"}):R.jsx(VX,{className:"size-4"})}const ote={Inbox:"Inbox",Drafts:"Drafts",Sent:"Sent",Archive:"Archive",Junk:"Junk",Trash:"Trash",All:"All",Flagged:"Flagged"},fDe={Body:"Body"},hDe={Mail:"Mail",Calendar:"Calendar"},ec={Appointed:"Appointed",Flagged:"Flagged",Reserved:"Reserved",Proposed:"Proposed",Stale:"Stale",None:"None"},Oi={SignInDisabled:"sign_in_disabled",CallerDisabled:"caller_disabled",ForeignOrigin:"foreign_origin",StepUpRequired:"step_up_required",WrongPassword:"wrong_password",StepUpLocked:"step_up_locked",CannotDisableSelf:"cannot_disable_self"},FN={synced:"synced",failed:"failed"},pDe={Saved:"Saved",Deployment:"Deployment",Default:"Default"},mDe={NoBaseUrl:"NoBaseUrl",NoApiKey:"NoApiKey"},gDe={uncategorized:"uncategorized",personal:"personal",newsletter:"newsletter",marketing:"marketing",automated:"automated",transactional:"transactional",social:"social",coldOutreach:"coldOutreach"},vDe={abandoned:"abandoned"},yDe={none:"none",move:"move",delete:"delete"},bDe={MoveToInbox:"MoveToInbox",MoveToJunk:"MoveToJunk"},SDe={Inbox:"inbox",Junk:"junk",Other:"other"},CDe={Confident:"Confident",Unsure:"Unsure"},EDe={SenderBlocked:"sender=blocked",SenderUntrusted:"sender=untrusted",SenderNeverSpam:"sender=never-spam",SenderVip:"sender=vip",SenderWellknown:"sender=wellknown",ClassifierSpam:"classifier=spam",SpamClean:"spam=clean",ProviderSpam:"provider=spam",DkimMismatch:"dkim-mismatch",DmarcFail:"dmarc=fail",DmarcPass:"dmarc=pass",DeferredToLlm:"deferred-to-llm",MissingSignals:"missing-signals",NoConfidentSignal:"no-confident-signal",PlacedInJunk:"placed-in-junk",AlreadyMovedByRemit:"already-moved-by-remit",BodyUnreadable:"body-unreadable",JunkNotRescued:"junk-not-rescued"},wDe={Attachment:"attachment"},xDe={None:"None"},_De={Retrying:"Retrying",GaveUp:"GaveUp"};function h8(e){const[t,n]=_.useState(!1),r=t?FX:UX,o=t?"Hide password":"Show password";return R.jsx(mf,{...e,type:t?"text":"password",trailing:R.jsx("button",{type:"button","aria-label":o,"aria-pressed":t,title:o,onClick:()=>n(a=>!a),className:"-my-1 -mr-2 flex size-11 shrink-0 cursor-pointer items-center justify-center rounded-md text-fg-subtle transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:R.jsx(r,{className:"size-4","aria-hidden":!0})})})}const ate=e=>e===1?"message":"messages",tg=e=>`${e.toLocaleString()} ${ate(e)}`,mS=(e,t)=>e.kind==="delete"?`delete ${tg(e.count)}`:t===void 0?"empty it":`empty ${tg(t)}`,p8=e=>e.kind==="delete"?"Nothing has been deleted.":"Nothing has been emptied.",ste=(e,t,n={})=>{const{trashFolderLabel:r,staleFolderLabel:o,selectedCount:a}=n,l=p8(t);if(e==="none")return{title:"No folder is set as Trash",description:`${l} reader files deleted mail in the folder you set as Trash, and this account has none.`,pickerPrompt:"Which folder does this account use for deleted mail?",confirmLabel:`Set as Trash and ${mS(t,void 0)}`,cancelLabel:"Cancel"};if(e==="stale")return{title:"The Trash folder you chose is gone",description:o?`${l} You set ${o} as this account's Trash and it is no longer on the mail server — another mail app may have renamed or removed it.`:`${l} The folder you set as this account's Trash is no longer on the mail server — another mail app may have renamed or removed it.`,pickerPrompt:"Which folder should reader use instead?",confirmLabel:`Set as Trash and ${mS(t,void 0)}`,cancelLabel:"Cancel"};const c=t.kind==="delete"?`Deleting ${tg(t.count)} there erases them from the mail server, and that cannot be restored.`:"Emptying a folder erases everything in it from the mail server, and that cannot be restored.";return{title:"Confirm this account's Trash folder",description:r?`${l} reader files this account's deleted mail in ${r} because of its name — you never chose it, and the mail server doesn't mark it as Trash. ${c}`:`${l} reader files this account's deleted mail in a folder it matched by name — you never chose it, and the mail server doesn't mark it as Trash. ${c}`,pickerPrompt:r?`Confirm ${r}, or pick the folder this account really uses.`:"Pick the folder this account really uses for deleted mail.",confirmLabel:`Set as Trash and ${mS(t,a)}`,cancelLabel:"Cancel"}},ite=(e,t,n,r)=>e.kind==="appointing"?{headline:"Setting the Trash folder…",status:n}:t.kind==="delete"?{headline:`Deleting ${tg(t.count)}…`,status:r?`Erasing them from ${n}. This can't be undone.`:`Moving them to ${n}`}:{headline:`Emptying ${n}…`,status:"This can't be undone."},lte=(e,t,n,r)=>e==="unconfirmed"&&t.kind==="delete"&&n!==void 0&&r===n,cte=(e,t,n)=>e==="mailbox-pending"?`${n} is still being created on the mail server. Wait for it to finish, then try again.`:`Couldn't set that folder as Trash. ${p8(t)} Please try again.`,ute=({open:e,reason:t,action:n,folders:r,delimiter:o,trashFolderLabel:a,guessedMailboxId:l,staleFolderLabel:c,accountEmail:d,phase:f,selectedId:p,onSelect:m,onCreateFolder:g,onConfirm:v,onCancel:S})=>{const C=_.useRef(null),w=f.kind==="appointing"||f.kind==="acting";_.useEffect(()=>{w&&C.current?.focus()},[w]);const x=r.find(D=>D.id===p),I=ste(t,n,{trashFolderLabel:a,staleFolderLabel:c,selectedCount:x?.messageCount}),T=lte(t,n,l,p),O=n.kind==="emptyTrash"||T;if(!e)return null;if(w){const D=ite(f,n,x?.label??"",T);return R.jsx(DN,{open:e,onClose:()=>{},title:I.title,children:R.jsxs("div",{ref:C,"data-escape-owner":!0,tabIndex:-1,className:"flex flex-col items-center gap-3 px-5 py-10 text-center outline-none",children:[R.jsx(PU,{className:"size-8 animate-spin text-accent-2"}),R.jsx("p",{className:"text-sm font-medium text-fg",children:D.headline}),R.jsx("p",{className:"text-xs text-fg-muted",role:"status","aria-live":"polite",children:D.status})]})})}return R.jsxs(DN,{open:e,onClose:S,title:I.title,children:[R.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[R.jsx(j_,{className:`size-4 shrink-0 ${O?"text-danger":"text-warning"}`}),R.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:I.title})]}),R.jsxs("div",{className:"flex max-h-[70vh] flex-col",children:[R.jsxs("div",{className:"space-y-1 px-5 py-4",children:[R.jsx("p",{className:"text-sm text-fg-muted",children:I.description}),d&&R.jsx("p",{className:"text-xs text-fg-subtle",children:d})]}),f.kind==="appoint-failed"&&R.jsx("div",{className:"px-5 pb-3",children:R.jsx(Xr,{tone:"danger",variant:"soft",children:cte(f.cause,n,x?.label??"That folder")})}),R.jsx("p",{className:"px-5 pb-2 text-sm text-fg-muted",children:I.pickerPrompt}),R.jsx("div",{className:"flex h-[26rem] min-h-0 flex-1 overflow-hidden",children:R.jsx(Qee,{folders:r,selectedId:p,delimiter:o,onSelect:m,onCreateFolder:t==="none"?g:void 0,onCancel:S,labels:{treeAriaLabel:"Folders on this account",optionLabel:D=>`Set ${D.label}${D.messageCount===void 0?"":`, ${D.messageCount} messages`}, as Trash`}})})]}),R.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[R.jsx(zn,{variant:"secondary",size:"sm",onClick:S,children:I.cancelLabel}),x&&R.jsx(zn,{variant:O?"danger":"primary",size:"sm",onClick:()=>v(x.id),children:R.jsx("span",{className:"truncate",children:I.confirmLabel})})]})]})},dte={delete:{label:"Delete",present:"Deleting",past:"Deleted",destructive:!0},move:{label:"Move",present:"Moving",past:"Moved",destructive:!1},junk:{label:"Junk",present:"Marking as junk",past:"Marked as junk",destructive:!0},markRead:{label:"Mark read",present:"Marking read",past:"Marked read",destructive:!1},organize:{label:"Organize",present:"Organizing",past:"Organized",destructive:!1}},fte=e=>dte[e],hte={match:"Apply to",properties:"Properties",folder:"Folder",rule:"Rule",name:"Name",review:"Review",run:"Run"},IDe=e=>hte[e],ADe=({verb:e,mode:t,scope:n,fromSearch:r})=>{const o=r?["properties"]:t==="properties"?["match","properties"]:["match"];return e==="move"?[...o,"folder","review","run"]:e==="organize"?n==="standing"||n==="until"?[...o,"folder","rule","name","review","run"]:[...o,"folder","rule","review","run"]:[...o,"review","run"]},m8=(e,t)=>Math.max(0,e.indexOf(t)),TDe=(e,t)=>m8(e,t)===0||t==="run",g8=(e,t)=>({clauses:[...e.clauses],matchOperator:e.matchOperator,moveMailboxId:e.moveMailboxId,scope:t,until:e.until,name:e.name}),pte=e=>l8(g8(e,e.scope??"once")),zN=e=>{if(!(e.scope!=="standing"&&e.scope!=="until")&&!i8(g8(e,e.scope)))return Yr.noMatch},mte="A rule only works within one account — clear the selection, or pick messages from a single account.",gte="A destination only works within one account — clear the selection, or pick messages from a single account.",RDe="Matching beyond the messages you picked only works within one account — clear the selection, or pick messages from a single account.",vte="A rule only works within one folder — clear the selection, or pick messages from a single folder.",yte="A destination only works within one folder — clear the selection, or pick messages from a single folder.",bte={spansAccounts:{rule:mte,destination:gte},spansFolders:{rule:vte,destination:yte}},Ste="A match this wide applies once — use “Make this a filter” above the results to keep doing it.",ODe=(e,t)=>e==="escalated"?Ste:t.rule,MDe=(e,t)=>{const n=e===void 0?"spansAccounts":t;if(!n)return{accountId:e};const r=bte[n];return{accountId:n==="spansAccounts"?void 0:e,rule:r.rule,destination:r.destination}},NDe=e=>e===void 0?["selected"]:["selected","properties"],Cte="This matches no messages, so there is nothing to do. Go back and change what it applies to.",Ete="Fill in every property, or take the empty one off.",wte="Pick a destination first.",xte="Choose one of the three first.",PDe=(e,t,n)=>{if(e==="properties")return t.clauses.length===0?Yr.noMatch:t.clauses.some(r=>r.value.trim()==="")?Ete:void 0;if(e==="folder")return t.moveMailboxId?void 0:wte;if(e==="rule"){if(!t.scope)return xte;const r=zN(t);return r||(t.scope==="once"&&pte(t).length>0?Yr.bodyTextOnce:t.scope==="until"&&!t.until?.trim()?Yr.noUntilDate:void 0)}if(e==="name"&&!t.name?.trim())return Yr.unnamed;if(e==="review"){const r=zN(t);return r||(n.status==="uncounted"?void 0:n.status==="ready"&&n.count===0&&!n.stale?Cte:c8(n))}},kDe="Nothing matches this yet. Widen a property, or match on a different one.",DDe=({state:e,verb:t,scope:n,matched:r,applied:o,failed:a,failureReason:l})=>{const{label:c,present:d,past:f}=fte(t),p=f.toLowerCase(),m=n==="standing"||n==="until",v={screenTitle:e==="saving"||e==="backApplyRunning"||e==="statusUnknown"||e==="commitFailed"?c:"Done",showProgress:e==="backApplyRunning"||e==="backApplyComplete"||e==="backApplyFailed"||e==="backApplyRestartFailed"||e==="statusUnknown"||e==="runStopped",failureListLabel:`Not ${p}`};return e==="saving"?{...v,title:m?"Saving rule…":"Applying…",detail:"Nothing has been changed yet.",tone:"progress",dismissLabel:"Close"}:e==="backApplyRunning"?{...v,title:m?"Rule saved. Moving the mail already in your mailbox…":`${d} ${r} messages…`,detail:"This keeps running if you close the wizard.",tone:"progress",dismissLabel:"Close",cancelLabel:"Stop the run"}:e==="statusUnknown"?{...v,title:m?"Rule saved. Its progress over your existing mail is unknown":`${d} — progress unknown`,detail:m?"The connection dropped, so the bar shows the last that was read. The pass runs on the mail server, and the rule keeps working on new mail either way. This keeps checking.":"The connection dropped, so the bar shows the last that was read. The run is on the mail server and carries on either way. This keeps checking.",tone:"warning",dismissLabel:"Close",retryLabel:"Check again"}:e==="backApplyComplete"?{...v,title:m?"Rule saved and applied":`${f} ${o}`,detail:m?`${o} of ${r} already in your mailbox ${p}. New mail follows the rule as it arrives.`:`Every message the match reached was ${p}. Your mail server is still catching up, so the list can lag behind.`,tone:"success",dismissLabel:"Done"}:e==="backApplyFailed"?{...v,title:m?"Rule saved — some mail stayed put":`Not everything was ${p}`,detail:`${o} of ${r} ${p} · the mail server rejected ${a}.${m?" The rule itself is saved and keeps working on new mail.":""}`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${a}`}:e==="runStopped"?{...v,title:`Stopped after ${o}`,detail:`${o} of ${r} ${p}. The rest were not sent, apart from the ones already on their way when you stopped — those may still have gone through.`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${a}`}:e==="backApplyRestartFailed"?{...v,title:m?"Rule saved — the retry didn't start":"The retry didn't start",detail:`${o} of ${r} ${p} · the mail server rejected ${a}, which are still where they were.${m?" The rule itself is saved and keeps working on new mail.":""} Check your connection and try again.`,tone:"warning",dismissLabel:"Close",retryLabel:`Retry ${a}`}:e==="backApplyStartFailed"?{...v,title:"Rule saved",detail:"New mail follows it automatically. The pass over the mail already in your mailbox never started.",tone:"warning",dismissLabel:"Not now",retryLabel:"Run it over existing mail"}:e==="filterSaved"?{...v,title:"Filter saved",detail:"There is no mail in your mailbox to apply it to yet. New mail follows it as it arrives. You can see it, and when it expires, under Settings › Filters.",tone:"success",dismissLabel:"Done"}:{...v,title:m?"Couldn't save the rule":`Couldn't start ${c.toLowerCase()}`,detail:l??"Nothing has changed.",tone:"danger",dismissLabel:l===void 0?"Not now":"Close",retryLabel:l===void 0?"Try again":void 0}},_te=e=>`${Mee(e.field)} "${e.value}"`,v8=(e,t)=>e.map(_te).join(` ${Dee(t)} `),Ite=(e,t)=>e==="selected"?`These ${t} messages`:"Its properties",LDe=e=>e==="selected"?"Only the messages ticked in the list.":Ree,Ate=e=>`Every message ${e}`,y8="the list is showing",UDe="This reaches every match on the mail server, including the ones the list has not loaded. The search is already the match, so there is nothing to widen.",FDe="This covers messages not shown in the list, and anything else matching by the time it runs.",zDe=({mode:e,selectedCount:t,clauses:n,matchOperator:r,escalatedScope:o})=>e==="escalated"?Ate(o??y8):e==="properties"?v8(n,r):Ite(e,t),$De=({mode:e,selectedCount:t,clauses:n,matchOperator:r,escalatedScope:o,escalatedCount:a})=>{if(e==="selected")return`${t} messages`;if(e==="escalated"){const l=o??y8;return a===void 0?`every message ${l}`:`all ${a.toLocaleString()} messages ${l}`}return n.length===0?"every message":`every message where ${v8(n,r)}`},Tte={preparing:"Getting the new version ready",restarting:"Restarting Remit",reconnecting:"Waiting for Remit to answer again"};function $N(e){return Tte[e]}function Rte(e){return e<90?"This usually takes about a minute.":e<240?"Longer than usual. Remit is still trying to reach the server.":"Still no answer. Remit keeps trying."}function jDe(e,t=Date.now()){const n=Math.floor((t-e)/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function BDe(e){return new Date(e).toLocaleDateString(void 0,{dateStyle:"medium"})}const jN=["preparing","restarting","reconnecting"],b8="fixed inset-0 z-50 flex flex-col items-center justify-center gap-6 bg-canvas p-6 text-center outline-none";function Ote({target:e,phase:t,elapsedSeconds:n}){const r=_.useRef(null);av(r,!0),ov({id:"self-update",open:!0});const o=jN.indexOf(t);return R.jsxs("div",{ref:r,role:"dialog","aria-modal":"true","aria-labelledby":"self-update-progress-title",tabIndex:-1,className:b8,children:[R.jsxs("div",{className:"max-w-md space-y-2",children:[R.jsxs("h1",{id:"self-update-progress-title",className:"text-lg font-semibold text-fg",children:["Installing Remit ",e]}),R.jsx("p",{className:"text-sm text-fg-muted",children:"Remit is restarting, so this page has no server to talk to for a moment. Leave this open — it reconnects on its own."})]}),R.jsx("ol",{className:"w-full max-w-sm space-y-2 text-left",children:jN.map((a,l)=>{const c=l<o,d=l===o;return R.jsxs("li",{className:Kt("flex items-center gap-3 rounded-sm border px-row-inset py-2 text-sm",d?"border-line-strong bg-surface text-fg":"border-line bg-surface-sunken text-fg-subtle"),children:[c?R.jsx(yU,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}):d?R.jsx(PU,{className:"size-4 shrink-0 animate-spin text-accent-2","aria-hidden":!0}):R.jsx("span",{className:"size-4 shrink-0 rounded-full border border-line-strong"}),$N(a)]},a)})}),R.jsxs("p",{"aria-live":"polite",className:"max-w-md text-xs text-fg-subtle",children:[R.jsx("span",{className:"sr-only",children:`${$N(t)}. `}),Rte(n)]})]})}function Mte({attemptedVersion:e,previousVersion:t,elapsedSeconds:n,logsCommand:r,onRetryConnection:o}){const a=_.useRef(null);av(a,!0);const l=Math.max(1,Math.round(n/60));return R.jsxs("div",{ref:a,role:"alertdialog","aria-modal":"true","aria-labelledby":"self-update-unreachable-title",tabIndex:-1,className:b8,children:[R.jsx($_,{className:"size-12 shrink-0 text-danger","aria-hidden":!0}),R.jsxs("div",{className:"max-w-lg space-y-3",children:[R.jsx("h1",{id:"self-update-unreachable-title",className:"text-lg font-semibold text-fg",children:"Remit has not answered since the restart"}),R.jsxs("p",{className:"text-sm text-fg-muted",children:["Installing ",e," started ",l," minute",l===1?"":"s"," ago and the server has been silent since. Your mail is safe at your provider — it was never part of the update."]}),R.jsxs("p",{className:"text-sm text-fg-muted",children:["Remit rolls back to ",t," on its own when the new version fails to start, but this page cannot confirm that from here. Check the server directly:"]}),R.jsx("code",{className:"block rounded-xs bg-surface-sunken px-3 py-2 text-left text-xs text-fg-muted",children:r})]}),R.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:R.jsx(zn,{size:"sm",onClick:o,children:"Try connecting again"})})]})}const Nte=()=>R.jsxs("div",{className:"hidden h-full w-[17%] min-w-40 max-w-64 shrink-0 flex-col gap-1 border-r border-line p-3 md:flex",children:[R.jsx("div",{className:"mb-3 h-6 w-24 rounded bg-surface-sunken"}),Array.from({length:6}).map((e,t)=>R.jsxs("div",{className:"flex items-center gap-2 py-1.5",children:[R.jsx("div",{className:"size-5 shrink-0 rounded bg-surface-sunken"}),R.jsx("div",{className:"h-3.5 flex-1 rounded bg-surface-sunken"})]},t))]}),Pte=()=>R.jsx("div",{className:"min-w-0 flex-1",children:Array.from({length:8}).map((e,t)=>R.jsxs("div",{className:"flex items-start gap-3 border-b border-line py-2 pl-5 pr-4",children:[R.jsx("div",{className:"mt-0.5 size-7 shrink-0 rounded-full bg-surface-sunken"}),R.jsxs("div",{className:"flex-1 space-y-1.5",children:[R.jsxs("div",{className:"flex justify-between gap-2",children:[R.jsx("div",{className:"h-3.5 w-28 rounded bg-surface-sunken"}),R.jsx("div",{className:"h-3 w-12 rounded bg-surface-sunken"})]}),R.jsx("div",{className:"h-3.5 w-48 rounded bg-surface-sunken"}),R.jsx("div",{className:"h-3 w-full rounded bg-surface-sunken"})]})]},t))}),lv=()=>R.jsxs("div",{className:"flex h-full animate-pulse bg-canvas","aria-hidden":"true",children:[R.jsx(Nte,{}),R.jsx(Pte,{})]}),cv="0998ffe467f2a1d6e39768ff728b0191399c02a3",kte="2026-11-21T02:56:35.460Z",Dte=cv.slice(0,7),Lte=/^[0-9a-f]{40}$/.test(cv),Ute=Lte?`https://github.com/remit-mail/reader/commit/${cv}`:void 0;class Zf extends Error{constructor(t,n,r){super(t),this.status=n,this.body=r,this.name="ApiError"}status;body}const nx=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),ol=e=>{const t=e instanceof Zf?e.body:e;if(!nx(t))return;const{code:n,details:r}=t;if(typeof n=="string")return{code:n,details:nx(r)?r:void 0}},Fte=(e,t)=>{if(nx(e)&&e.message!==void 0&&e.message!==null){const n=String(e.message);if(n)return n}return`Request failed with status ${t}`},zte=(e,t)=>new Zf(Fte(e,t),t,e),mn=e=>{if(e instanceof Zf)return e.status;if(e&&typeof e=="object"){const t=e;if(typeof t.status=="number")return t.status;if(typeof t.statusCode=="number")return t.statusCode}},S8=e=>mn(e)!==void 0,uv=e=>{const t=mn(e);return t!==void 0&&t>=500&&t<=599},dv=e=>!!(typeof DOMException<"u"&&e instanceof DOMException&&e.name==="AbortError"||e&&typeof e=="object"&&"name"in e&&e.name==="AbortError"),$te=()=>typeof navigator<"u"&&navigator.onLine===!1,fv=e=>dv(e)||S8(e)?!1:e instanceof U_?!0:$te(),jte=e=>!S8(e)&&!dv(e)&&!fv(e),C8=e=>uv(e)||jte(e),Bte=e=>e instanceof Error&&e.name==="AuthTokenError"&&mn(e)===403,hv=e=>mn(e)===401||Bte(e),Hte=(e,t)=>{if(t?.softError===!0)return!0;const n=t?.softErrorStatuses;if(!Array.isArray(n))return!1;const r=mn(e);return r!==void 0&&n.includes(r)},qte=[502,503,504],Vte=(e,t)=>{if(t?.restartExpected!==!0)return!1;const n=mn(e);return n!==void 0&&qte.includes(n)},Wte=(e,t)=>uv(e)?!Vte(e,t)&&t?.ownsServerErrors!==!0:dv(e)||fv(e)||hv(e)?!1:C8(e)?!0:!Hte(e,t),K_={softError:!0},pv=(...e)=>({softErrorStatuses:e}),Gte={restartExpected:!0},Kte={ownsServerErrors:!0},E8=e=>mn(e)===404,Zte=e=>uv(e),rx=new Set;let w8=null,x8=null;const Yte=e=>{x8=e},Qte=e=>e instanceof Error?e:new Error(_8(e)),_8=e=>e instanceof Error?e.message||e.name:typeof e=="string"?e:e&&typeof e=="object"&&"message"in e&&typeof e.message=="string"?e.message:"An unexpected server error occurred.",Xte=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`fatal-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,Bc=(e,t)=>{const n={error:e,message:_8(e),correlationId:Xte(),at:Date.now(),recoverable:t?.recoverable??Zte(e),stack:e instanceof Error?e.stack:void 0,componentStack:t?.componentStack};w8=n,one(`Fatal: ${n.message} [${n.correlationId}]`),x8?.recordError(Qte(e),{fatal:"true",correlationId:n.correlationId});for(const r of rx)r(n);return n},Jte=e=>(rx.add(e),()=>{rx.delete(e)}),ene=()=>w8,tne=20,Nm=[],nne=new Set(["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]);function rne(e){return typeof e!="string"?!1:nne.has(e.replace(/\.\s*$/,""))}function Pm(e){Nm.push(e),Nm.length>tne&&Nm.shift()}function one(e){Pm(e)}function ane(e){return e.map(t=>{if(typeof t=="string")return t;if(t instanceof Error)return`${t.name}: ${t.message}`;try{return JSON.stringify(t)}catch{return String(t)}}).join(" ")}function sne(){const e=console.error.bind(console);console.error=(...t)=>{Pm(ane(t)),e(...t)},window.addEventListener("error",t=>{rne(t.message)||(Pm(`Uncaught ${t.error instanceof Error?`${t.error.name}: ${t.error.message}`:String(t.message)} (${t.filename}:${t.lineno})`),Bc(t.error??t.message))}),window.addEventListener("unhandledrejection",t=>{const n=t.reason,r=n instanceof Error?`${n.name}: ${n.message}`:String(n);Pm(`Unhandled rejection: ${r}`),Bc(n)})}function ine(){return Nm.slice()}const lne=8,pc=[];function cne(e){const t=e.split(/[?#]/)[0],n=pc[pc.length-1];n&&n.path===t||(pc.push({path:t,timestamp:new Date().toISOString()}),pc.length>lne&&pc.shift())}function une(){return pc.slice()}const gS=7500,BN=`
13
+ … (truncated — the copy action on this screen has the full report)`;function Hi(e){return{appShortSha:Dte,appCommitUrl:Ute,appBuildTime:kte,userAgent:navigator.userAgent,viewport:`${window.innerWidth}×${window.innerHeight}`,timestamp:new Date().toISOString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,href:window.location.href,recentErrors:ine(),requests:lX(),routes:une(),failingRequest:cX(),errorMessage:e?.errorMessage,stack:e?.stack,componentStack:e?.componentStack,quarantine:e?.quarantine,syncWarning:e?.syncWarning,title:e?.title}}function vS(e){return["```",e,"```"].join(`
14
+ `)}function I8(e){const t=/T(\d{2}:\d{2}:\d{2})/.exec(e);return t?t[1]:e}function dne(e){return`- **Version**: ${e.appCommitUrl?`[\`${e.appShortSha}\`](${e.appCommitUrl})`:`\`${e.appShortSha}\``} built ${e.appBuildTime}`}function fne(e){const t=e.status===0?"no response (transport failure)":`${e.status}`;return["## Failing request",`- **Endpoint**: \`${e.path}\``,`- **Method**: ${e.method}`,`- **Status**: ${t}`,`- **Correlation id**: ${e.correlationId??"(none)"}`,""]}function hne(e){return e.length===0?["## Recent API requests","(none)",""]:["## Recent API requests","| Time | Method | Path | Status | Duration | Correlation |","| --- | --- | --- | --- | --- | --- |",...e.map(n=>{const r=n.status===0?"ERR":`${n.status}`;return`| ${I8(n.timestamp)} | ${n.method} | \`${n.path}\` | ${r} | ${n.durationMs}ms | ${n.correlationId??""} |`}),""]}function pne(e){return e.length===0?["## Navigation trail","(none)",""]:["## Navigation trail",...e.map(n=>`- ${I8(n.timestamp)} \`${n.path}\``),""]}function A8(e,t){const n=e.recentErrors.length>0?e.recentErrors.map(a=>` - ${a}`).join(`
15
+ `):" (none)",r=["## Environment",dne(e),`- **Browser**: ${e.userAgent}`,`- **Viewport**: ${e.viewport}`,`- **Time**: ${e.timestamp} (${e.timezone})`,"","## URL",e.href,""];if(e.errorMessage&&r.push("## Error",e.errorMessage,""),e.failingRequest&&r.push(...fne(e.failingRequest)),e.quarantine){const a=t?.quarantineStructure??e.quarantine.structure;r.push(e.quarantine.head,"",vS(a),"",e.quarantine.disclaimer,"")}e.syncWarning&&r.push(e.syncWarning,"");const o=t?.stack??e.stack;return o&&r.push("## Stacktrace",vS(o),""),e.componentStack&&r.push("## Component stack",vS(e.componentStack),""),r.push(...hne(e.requests)),r.push(...pne(e.routes)),r.push("## Recent console errors",n,"","## Steps to reproduce","1. ","","## Expected behaviour","","## Actual behaviour",""),r.join(`
16
+ `)}function mne(e){if(e.title)return e.title;if(!e.errorMessage)return"Bug: ";const t=e.errorMessage.split(`
17
+ `)[0].trim();return`Bug: ${t.length>120?`${t.slice(0,117)}…`:t}`}function Bp(e,t){const n=new URLSearchParams({title:mne(e),body:A8(e,t)});return`${iu().issuesUrl}?${n.toString()}`}function gne(e){return A8(e)}function cu(e){const t=Bp(e);if(t.length<=gS)return t;const n={...e,componentStack:void 0},r=[];e.stack&&r.push(["stack",e.stack]),e.quarantine?.structure&&r.push(["quarantineStructure",e.quarantine.structure]),r.sort((a,l)=>l[1].length-a[1].length);let o={};for(const[a,l]of r){if(Bp(n,o).length<=gS)break;let c=0,d=l.length,f=0;for(;c<=d;){const p=c+d>>1;Bp(n,{...o,[a]:l.slice(0,p)+BN}).length<=gS?(f=p,c=p+1):d=p-1}o={...o,[a]:l.slice(0,f)+BN}}return Bp(n,o)}function vne(){const e=cu(Hi());window.open(e,"_blank","noopener,noreferrer")}const yne="/mail",T8=()=>{const[e,t]=_.useState(()=>ene());return _.useEffect(()=>Jte(t),[]),e?R.jsx(R8,{fatal:e}):null},HN=e=>({errorMessage:e.message,stack:e.stack,componentStack:e.componentStack}),R8=({fatal:e,onRetry:t})=>{ov({id:"fatal-error",open:!0});const[n,r]=_.useState(!1),o=()=>{window.location.reload()},a=()=>{if(t){t();return}o()},l=()=>{const f=cu(Hi(HN(e)));window.open(f,"_blank","noopener,noreferrer")},c=async()=>{const f=gne(Hi(HN(e)));await navigator.clipboard.writeText(f),r(!0),window.setTimeout(()=>r(!1),2e3)},d=e.recoverable?"The server returned an unexpected error. This is not your fault — nothing was saved or sent. Retry, or report a bug so we can fix it.":"Something went wrong and this page can't recover. This is not your fault — nothing was saved or sent. Go to your inbox, or report a bug so we can fix it.";return R.jsxs("div",{role:"alert","aria-live":"assertive","data-testid":"fatal-error-overlay",className:"fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white",children:[R.jsx($_,{className:"size-16 shrink-0","aria-hidden":"true"}),R.jsxs("div",{className:"max-w-lg space-y-3",children:[R.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Something broke"}),R.jsx("p",{className:"text-base text-red-50",children:d}),R.jsx("p",{className:"break-words font-mono text-sm text-red-100",children:e.message}),R.jsxs("p",{className:"font-mono text-xs text-red-200",children:["Reference: ",e.correlationId]})]}),R.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-3",children:[e.recoverable?R.jsx("button",{type:"button",onClick:a,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Retry"}):R.jsx("a",{href:yne,className:"inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50",children:"Go to inbox"}),R.jsx("button",{type:"button",onClick:l,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:"Report a bug"}),R.jsx("button",{type:"button",onClick:c,className:"inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10",children:n?"Copied":"Copy full details"})]})]})},bne=({betterAuthEnabled:e,cognitoConfigured:t})=>e?"betterAuth":t?"cognito":"none",Z_=e=>bne(e)==="cognito"?uee:void 0,Sne="Fetch Error",Cne=429,Y_=(e,t)=>{if(e&&typeof e=="object"&&t in e){const n=e[t];if(typeof n=="string"&&n.trim().length>0)return n}},yf=e=>Y_(e,"message"),Ene=e=>dv(e)?!1:Y_(e,"statusText")===Sne?!0:mn(e)===void 0,O8=e=>{if(Ene(e))return"network";const t=mn(e);return t===void 0?"fatal":t===Cne?"rateLimited":t===404||t>=500?"fatal":yf(e)?"validation":"fatal"},wne="Can't reach the server. You may be offline — check your connection and try again.",xne="Too many requests from this address. Everyone behind the same address — other people on this network, and every tab you have open — shares one limit. Wait a minute and try again.",_ne=(e,t)=>t==="network"?wne:t==="rateLimited"?xne:yf(e)??"Please check your details and try again.",Ine=e=>{const t=mn(e);if(t===void 0)return"no response";const n=Y_(e,"statusText");return n?`${t} ${n}`:String(t)},Ane=(e,t)=>{const n=Ine(e),r=mn(e)===404?"The endpoint did not respond as expected — check that the backend is running and up to date (see the deployment guide's troubleshooting section).":"The server returned an unexpected response.",o=yf(e),a=o?` Server said: ${o}.`:"";return`${t.method} ${t.path} failed: ${n}. ${r}${a}`},Tne=(e,t)=>{Bc(new Error(Ane(e,t)),{recoverable:!1})},Rne={SIGN_IN_DISABLED:"signInOff",ACCOUNT_DISABLED:"accountDisabled"},Q_=e=>{if(mn(e)!==403||!e||typeof e!="object"||!("code"in e))return;const{code:t}=e;return typeof t=="string"?Rne[t]:void 0},One=/\/reset-password\/([^/]+)\/?$/,Mne=e=>{const t=One.exec(e);return t?.[1]?decodeURIComponent(t[1]):void 0},Nne="Your password was not set",Pne=e=>cu({...Hi({title:`Reset password: ${e}`,errorMessage:e}),href:`${window.location.origin}/reset-password/<token>`}),kne=e=>{if(Q_(e)==="signInOff")return{kind:"signInOff"};const t=e&&typeof e=="object"&&"code"in e?e.code:void 0;if(t==="INVALID_TOKEN")return{kind:"deadLink"};if(t==="PASSWORD_TOO_SHORT"||t==="PASSWORD_TOO_LONG")return{kind:"password",message:yf(e)??"Use 12 to 128 characters."};const n=O8(e);if(n==="network")return{kind:"inline",message:"Can't reach the server. You may be offline. Check your connection and try again."};if(n==="rateLimited")return{kind:"inline",message:"Too many tries from this address. Wait a minute and try again."};const r=mn(e),o=yf(e);return{kind:"server",message:`${Nne}. The server answered ${r??"nothing"}${o?`: ${o}`:""}.`}};function Dne({token:e,onDone:t}){const[n,r]=_.useState(""),[o,a]=_.useState(null),[l,c]=_.useState(!1),d=_.useRef(null);_.useEffect(()=>{d.current?.focus()},[]);const f=async p=>{if(p.preventDefault(),l)return;a(null),c(!0);const m=await Bi.resetPassword({newPassword:n,token:e}).then(g=>g.error??null,g=>g);if(c(!1),!m){t();return}a(kne(m))};return R.jsxs(sv,{children:[R.jsx(iv,{}),R.jsxs("form",{onSubmit:f,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[R.jsx("h1",{className:"text-base font-semibold text-fg",children:"Choose a new password"}),o?.kind==="deadLink"&&R.jsx(Xr,{tone:"danger",children:"This link no longer works. Ask for a new one."}),o?.kind==="signInOff"&&R.jsxs(Xr,{tone:"info",children:[R.jsx("p",{className:"font-medium",children:"Sign-in is turned off on this server."}),R.jsx("p",{className:"mt-1",children:"The link works once the person who runs this server turns sign-in back on."})]}),o?.kind==="inline"&&R.jsx(Xr,{tone:"danger",children:o.message}),o?.kind==="server"&&R.jsxs(Xr,{tone:"danger",children:[R.jsx("p",{children:o.message}),R.jsx("a",{href:Pne(o.message),target:"_blank",rel:"noreferrer",className:"mt-1 inline-block font-medium text-accent hover:underline",children:"Report an issue"})]}),R.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[R.jsx("label",{htmlFor:"reset-new-password",className:"text-fg-muted",children:"New password"}),R.jsx(h8,{ref:d,id:"reset-new-password",autoComplete:"new-password",value:n,onChange:p=>{r(p.target.value),o?.kind==="password"&&a(null)},placeholder:"12 to 128 characters","aria-invalid":o?.kind==="password","aria-describedby":"reset-new-password-hint",required:!0}),R.jsx("p",{id:"reset-new-password-hint",className:"text-xs text-fg-muted",children:o?.kind==="password"?R.jsx("span",{className:"text-danger",role:"alert",children:o.message}):"Use 12 to 128 characters. Spaces and any symbols are fine. A long phrase is easy to remember."})]}),R.jsx(zn,{type:"submit","aria-busy":l,children:"Set password"})]}),R.jsx(W_,{note:Z_({betterAuthEnabled:!0,cognitoConfigured:!1})})]})}const Lne=({onRetry:e,onReport:t})=>R.jsxs(sv,{children:[R.jsx(iv,{}),R.jsxs("div",{className:"flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[R.jsxs(Xr,{tone:"warning",children:[R.jsx("p",{className:"font-medium",children:"Too many requests from this address"}),R.jsx("p",{className:"mt-1",children:"The server is limiting requests from your network address, so it could not check whether you are signed in. You have not been signed out."})]}),R.jsx("p",{className:"text-sm text-fg-muted",children:"Wait a minute and try again. Everyone behind the same address — other people on this network, and every tab you have open — shares one limit."}),R.jsx(zn,{onClick:e,children:"Try again"}),R.jsx(zn,{variant:"ghost",size:"sm",onClick:t,children:"Report an issue"})]})]}),Une=429,Fne=({data:e,isPending:t,error:n})=>{const r=Q_(n);return r?{kind:"refused",refusal:r}:e?{kind:"active"}:t?{kind:"pending"}:mn(n)===Une?{kind:"rateLimited"}:{kind:"signedOut"}},zne={method:"POST",path:"/api/auth/sign-up/email"},$ne={method:"POST",path:"/api/auth/sign-in/email"},jne=({notice:e})=>{const t=_.useRef(null);return _.useEffect(()=>{t.current?.focus()},[]),R.jsxs("div",{ref:t,tabIndex:-1,className:"outline-none",children:[e==="signInOff"&&R.jsxs(Xr,{tone:"info",children:[R.jsx("p",{className:"font-medium",children:"Sign-in is turned off on this server."}),R.jsx("p",{className:"mt-1",children:"The person who runs this server turned it off. Ask them when it is back."})]}),e==="accountDisabled"&&R.jsxs(Xr,{tone:"danger",children:[R.jsx("p",{className:"font-medium",children:"This account is disabled."}),R.jsx("p",{className:"mt-1",children:"Ask the person who runs this server."})]}),e==="passwordChanged"&&R.jsx(Xr,{tone:"success",children:"Password changed. Sign in with your new password."})]})},qN=({notice:e})=>{const[t,n]=_.useState("signIn"),[r,o]=_.useState(""),[a,l]=_.useState(""),[c,d]=_.useState(""),[f,p]=_.useState(null),[m,g]=_.useState(!1),[v,S]=_.useState(!1),[C,w]=_.useState(e),x=C==="signInOff",I=v||x?"signIn":t,T=(D,P)=>{const M=Q_(D);if(M){w(M);return}if(fX(D)){S(!0),n("signIn");return}const L=O8(D);if(L==="fatal"){Tne(D,P);return}p(_ne(D,L))},O=async D=>{if(D.preventDefault(),m)return;p(null),w(void 0),g(!0);const P=I==="signUp"?zne:$ne,M=await(I==="signUp"?Bi.signUp.email({email:a,password:c,name:r}):Bi.signIn.email({email:a,password:c})).then(L=>L.error??null,L=>L);g(!1),M&&T(M,P)};return R.jsxs(R.Fragment,{children:[R.jsx(T8,{}),R.jsxs(sv,{children:[R.jsx(iv,{}),R.jsxs("form",{onSubmit:O,className:"mt-6 flex flex-col gap-4 rounded-lg border border-line bg-surface p-7 shadow-lg",children:[C&&R.jsx(jne,{notice:C},C),x?null:v?R.jsx(Xr,{tone:"info",children:"New signups are currently closed. Sign in with an existing account, or contact your administrator for access."}):R.jsxs("div",{className:"flex gap-1",children:[R.jsx(zn,{size:"sm",variant:I==="signIn"?"secondary":"ghost","aria-pressed":I==="signIn",onClick:()=>n("signIn"),children:"Sign in"}),R.jsx(zn,{size:"sm",variant:I==="signUp"?"secondary":"ghost","aria-pressed":I==="signUp",onClick:()=>n("signUp"),children:"Create account"})]}),f&&R.jsx(Xr,{tone:"danger",children:f}),I==="signUp"&&R.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[R.jsx("label",{htmlFor:"ba-name",className:"text-fg-muted",children:"Name"}),R.jsx(mf,{id:"ba-name",type:"text",autoComplete:"name",value:r,onChange:D=>o(D.target.value),placeholder:"Your name",required:!0})]}),R.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[R.jsx("label",{htmlFor:"ba-email",className:"text-fg-muted",children:"Email"}),R.jsx(mf,{id:"ba-email",type:"email",autoComplete:"email",value:a,onChange:D=>l(D.target.value),placeholder:"you@example.com",required:!0,disabled:x})]}),R.jsxs("div",{className:"flex flex-col gap-1 text-sm",children:[R.jsx("label",{htmlFor:"ba-password",className:"text-fg-muted",children:"Password"}),R.jsx(h8,{id:"ba-password",autoComplete:I==="signUp"?"new-password":"current-password",value:c,onChange:D=>d(D.target.value),placeholder:"Your password",required:!0,disabled:x})]}),R.jsx(zn,{type:"submit",disabled:x,children:I==="signUp"?"Create account":"Sign in"})]}),R.jsx(W_,{note:Z_({betterAuthEnabled:rv(),cognitoConfigured:!1})})]})]})},Bne=({session:e,onRetry:t,notice:n,children:r})=>{const o=Fne(e);return o.kind==="active"?R.jsx(R.Fragment,{children:r}):o.kind==="pending"?R.jsx(lv,{}):o.kind==="rateLimited"?R.jsx(Lne,{onRetry:t,onReport:vne}):o.kind==="refused"?R.jsx(qN,{notice:o.refusal},o.refusal):R.jsx(qN,{notice:n})},Hne=({children:e})=>{const{data:t,isPending:n,error:r,refetch:o}=Bi.useSession(),[a,l]=_.useState(()=>Mne(window.location.pathname)),[c,d]=_.useState(void 0);return a?R.jsx(Dne,{token:a,onDone:()=>{window.history.replaceState(null,"","/"),l(void 0),d("passwordChanged")}}):R.jsx(Bne,{session:{data:t,isPending:n,error:r},onRetry:()=>{o()},notice:c,children:e})},qne=({children:e,fallback:t=null})=>{const{data:n}=Bi.useSession();if(!n)return R.jsx(R.Fragment,{children:t});const r=async()=>{await Bi.signOut(),z_()};return R.jsx(R.Fragment,{children:e({email:n.user.email??null,signOut:r})})},ng={configure:()=>{},getToken:wX,resetToken:z_,Shell:Hne,Account:qne};var yS,VN;function Vne(){if(VN)return yS;VN=1;function e(){this.__data__=[],this.size=0}return yS=e,yS}var bS,WN;function Yf(){if(WN)return bS;WN=1;function e(t,n){return t===n||t!==t&&n!==n}return bS=e,bS}var SS,GN;function mv(){if(GN)return SS;GN=1;var e=Yf();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return SS=t,SS}var CS,KN;function Wne(){if(KN)return CS;KN=1;var e=mv(),t=Array.prototype,n=t.splice;function r(o){var a=this.__data__,l=e(a,o);if(l<0)return!1;var c=a.length-1;return l==c?a.pop():n.call(a,l,1),--this.size,!0}return CS=r,CS}var ES,ZN;function Gne(){if(ZN)return ES;ZN=1;var e=mv();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return ES=t,ES}var wS,YN;function Kne(){if(YN)return wS;YN=1;var e=mv();function t(n){return e(this.__data__,n)>-1}return wS=t,wS}var xS,QN;function Zne(){if(QN)return xS;QN=1;var e=mv();function t(n,r){var o=this.__data__,a=e(o,n);return a<0?(++this.size,o.push([n,r])):o[a][1]=r,this}return xS=t,xS}var _S,XN;function gv(){if(XN)return _S;XN=1;var e=Vne(),t=Wne(),n=Gne(),r=Kne(),o=Zne();function a(l){var c=-1,d=l==null?0:l.length;for(this.clear();++c<d;){var f=l[c];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=o,_S=a,_S}var IS,JN;function Yne(){if(JN)return IS;JN=1;var e=gv();function t(){this.__data__=new e,this.size=0}return IS=t,IS}var AS,eP;function Qne(){if(eP)return AS;eP=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return AS=e,AS}var TS,tP;function Xne(){if(tP)return TS;tP=1;function e(t){return this.__data__.get(t)}return TS=e,TS}var RS,nP;function Jne(){if(nP)return RS;nP=1;function e(t){return this.__data__.has(t)}return RS=e,RS}var OS,rP;function M8(){if(rP)return OS;rP=1;var e=typeof Mp=="object"&&Mp&&Mp.Object===Object&&Mp;return OS=e,OS}var MS,oP;function Ho(){if(oP)return MS;oP=1;var e=M8(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return MS=n,MS}var NS,aP;function vv(){if(aP)return NS;aP=1;var e=Ho(),t=e.Symbol;return NS=t,NS}var PS,sP;function ere(){if(sP)return PS;sP=1;var e=vv(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function a(l){var c=n.call(l,o),d=l[o];try{l[o]=void 0;var f=!0}catch{}var p=r.call(l);return f&&(c?l[o]=d:delete l[o]),p}return PS=a,PS}var kS,iP;function tre(){if(iP)return kS;iP=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return kS=n,kS}var DS,lP;function uu(){if(lP)return DS;lP=1;var e=vv(),t=ere(),n=tre(),r="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?o:r:a&&a in Object(c)?t(c):n(c)}return DS=l,DS}var LS,cP;function Da(){if(cP)return LS;cP=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return LS=e,LS}var US,uP;function X_(){if(uP)return US;uP=1;var e=uu(),t=Da(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",a="[object Proxy]";function l(c){if(!t(c))return!1;var d=e(c);return d==r||d==o||d==n||d==a}return US=l,US}var FS,dP;function nre(){if(dP)return FS;dP=1;var e=Ho(),t=e["__core-js_shared__"];return FS=t,FS}var zS,fP;function rre(){if(fP)return zS;fP=1;var e=nre(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return zS=n,zS}var $S,hP;function N8(){if(hP)return $S;hP=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return $S=n,$S}var jS,pP;function ore(){if(pP)return jS;pP=1;var e=X_(),t=rre(),n=Da(),r=N8(),o=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,d=l.toString,f=c.hasOwnProperty,p=RegExp("^"+d.call(f).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var v=e(g)?p:a;return v.test(r(g))}return jS=m,jS}var BS,mP;function are(){if(mP)return BS;mP=1;function e(t,n){return t?.[n]}return BS=e,BS}var HS,gP;function al(){if(gP)return HS;gP=1;var e=ore(),t=are();function n(r,o){var a=t(r,o);return e(a)?a:void 0}return HS=n,HS}var qS,vP;function J_(){if(vP)return qS;vP=1;var e=al(),t=Ho(),n=e(t,"Map");return qS=n,qS}var VS,yP;function yv(){if(yP)return VS;yP=1;var e=al(),t=e(Object,"create");return VS=t,VS}var WS,bP;function sre(){if(bP)return WS;bP=1;var e=yv();function t(){this.__data__=e?e(null):{},this.size=0}return WS=t,WS}var GS,SP;function ire(){if(SP)return GS;SP=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return GS=e,GS}var KS,CP;function lre(){if(CP)return KS;CP=1;var e=yv(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(a){var l=this.__data__;if(e){var c=l[a];return c===t?void 0:c}return r.call(l,a)?l[a]:void 0}return KS=o,KS}var ZS,EP;function cre(){if(EP)return ZS;EP=1;var e=yv(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var a=this.__data__;return e?a[o]!==void 0:n.call(a,o)}return ZS=r,ZS}var YS,wP;function ure(){if(wP)return YS;wP=1;var e=yv(),t="__lodash_hash_undefined__";function n(r,o){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&o===void 0?t:o,this}return YS=n,YS}var QS,xP;function dre(){if(xP)return QS;xP=1;var e=sre(),t=ire(),n=lre(),r=cre(),o=ure();function a(l){var c=-1,d=l==null?0:l.length;for(this.clear();++c<d;){var f=l[c];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=o,QS=a,QS}var XS,_P;function fre(){if(_P)return XS;_P=1;var e=dre(),t=gv(),n=J_();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return XS=r,XS}var JS,IP;function hre(){if(IP)return JS;IP=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return JS=e,JS}var e1,AP;function bv(){if(AP)return e1;AP=1;var e=hre();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return e1=t,e1}var t1,TP;function pre(){if(TP)return t1;TP=1;var e=bv();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return t1=t,t1}var n1,RP;function mre(){if(RP)return n1;RP=1;var e=bv();function t(n){return e(this,n).get(n)}return n1=t,n1}var r1,OP;function gre(){if(OP)return r1;OP=1;var e=bv();function t(n){return e(this,n).has(n)}return r1=t,r1}var o1,MP;function vre(){if(MP)return o1;MP=1;var e=bv();function t(n,r){var o=e(this,n),a=o.size;return o.set(n,r),this.size+=o.size==a?0:1,this}return o1=t,o1}var a1,NP;function e2(){if(NP)return a1;NP=1;var e=fre(),t=pre(),n=mre(),r=gre(),o=vre();function a(l){var c=-1,d=l==null?0:l.length;for(this.clear();++c<d;){var f=l[c];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=o,a1=a,a1}var s1,PP;function yre(){if(PP)return s1;PP=1;var e=gv(),t=J_(),n=e2(),r=200;function o(a,l){var c=this.__data__;if(c instanceof e){var d=c.__data__;if(!t||d.length<r-1)return d.push([a,l]),this.size=++c.size,this;c=this.__data__=new n(d)}return c.set(a,l),this.size=c.size,this}return s1=o,s1}var i1,kP;function t2(){if(kP)return i1;kP=1;var e=gv(),t=Yne(),n=Qne(),r=Xne(),o=Jne(),a=yre();function l(c){var d=this.__data__=new e(c);this.size=d.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=o,l.prototype.set=a,i1=l,i1}var l1,DP;function bre(){if(DP)return l1;DP=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return l1=t,l1}var c1,LP;function Sre(){if(LP)return c1;LP=1;function e(t){return this.__data__.has(t)}return c1=e,c1}var u1,UP;function Cre(){if(UP)return u1;UP=1;var e=e2(),t=bre(),n=Sre();function r(o){var a=-1,l=o==null?0:o.length;for(this.__data__=new e;++a<l;)this.add(o[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,u1=r,u1}var d1,FP;function Ere(){if(FP)return d1;FP=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return d1=e,d1}var f1,zP;function wre(){if(zP)return f1;zP=1;function e(t,n){return t.has(n)}return f1=e,f1}var h1,$P;function P8(){if($P)return h1;$P=1;var e=Cre(),t=Ere(),n=wre(),r=1,o=2;function a(l,c,d,f,p,m){var g=d&r,v=l.length,S=c.length;if(v!=S&&!(g&&S>v))return!1;var C=m.get(l),w=m.get(c);if(C&&w)return C==c&&w==l;var x=-1,I=!0,T=d&o?new e:void 0;for(m.set(l,c),m.set(c,l);++x<v;){var O=l[x],D=c[x];if(f)var P=g?f(D,O,x,c,l,m):f(O,D,x,l,c,m);if(P!==void 0){if(P)continue;I=!1;break}if(T){if(!t(c,function(M,L){if(!n(T,L)&&(O===M||p(O,M,d,f,m)))return T.push(L)})){I=!1;break}}else if(!(O===D||p(O,D,d,f,m))){I=!1;break}}return m.delete(l),m.delete(c),I}return h1=a,h1}var p1,jP;function k8(){if(jP)return p1;jP=1;var e=Ho(),t=e.Uint8Array;return p1=t,p1}var m1,BP;function xre(){if(BP)return m1;BP=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,a){r[++n]=[a,o]}),r}return m1=e,m1}var g1,HP;function _re(){if(HP)return g1;HP=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return g1=e,g1}var v1,qP;function Ire(){if(qP)return v1;qP=1;var e=vv(),t=k8(),n=Yf(),r=P8(),o=xre(),a=_re(),l=1,c=2,d="[object Boolean]",f="[object Date]",p="[object Error]",m="[object Map]",g="[object Number]",v="[object RegExp]",S="[object Set]",C="[object String]",w="[object Symbol]",x="[object ArrayBuffer]",I="[object DataView]",T=e?e.prototype:void 0,O=T?T.valueOf:void 0;function D(P,M,L,z,G,j,F){switch(L){case I:if(P.byteLength!=M.byteLength||P.byteOffset!=M.byteOffset)return!1;P=P.buffer,M=M.buffer;case x:return!(P.byteLength!=M.byteLength||!j(new t(P),new t(M)));case d:case f:case g:return n(+P,+M);case p:return P.name==M.name&&P.message==M.message;case v:case C:return P==M+"";case m:var q=o;case S:var X=z&l;if(q||(q=a),P.size!=M.size&&!X)return!1;var Se=F.get(P);if(Se)return Se==M;z|=c,F.set(P,M);var W=r(q(P),q(M),z,G,j,F);return F.delete(P),W;case w:if(O)return O.call(P)==O.call(M)}return!1}return v1=D,v1}var y1,VP;function D8(){if(VP)return y1;VP=1;function e(t,n){for(var r=-1,o=n.length,a=t.length;++r<o;)t[a+r]=n[r];return t}return y1=e,y1}var b1,WP;function La(){if(WP)return b1;WP=1;var e=Array.isArray;return b1=e,b1}var S1,GP;function L8(){if(GP)return S1;GP=1;var e=D8(),t=La();function n(r,o,a){var l=o(r);return t(r)?l:e(l,a(r))}return S1=n,S1}var C1,KP;function Are(){if(KP)return C1;KP=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,a=0,l=[];++r<o;){var c=t[r];n(c,r,t)&&(l[a++]=c)}return l}return C1=e,C1}var E1,ZP;function U8(){if(ZP)return E1;ZP=1;function e(){return[]}return E1=e,E1}var w1,YP;function F8(){if(YP)return w1;YP=1;var e=Are(),t=U8(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,a=o?function(l){return l==null?[]:(l=Object(l),e(o(l),function(c){return r.call(l,c)}))}:t;return w1=a,w1}var x1,QP;function Tre(){if(QP)return x1;QP=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return x1=e,x1}var _1,XP;function sl(){if(XP)return _1;XP=1;function e(t){return t!=null&&typeof t=="object"}return _1=e,_1}var I1,JP;function Rre(){if(JP)return I1;JP=1;var e=uu(),t=sl(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return I1=r,I1}var A1,ek;function n2(){if(ek)return A1;ek=1;var e=Rre(),t=sl(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!o.call(l,"callee")};return A1=a,A1}var zd={exports:{}},T1,tk;function Ore(){if(tk)return T1;tk=1;function e(){return!1}return T1=e,T1}zd.exports;var nk;function r2(){return nk||(nk=1,(function(e,t){var n=Ho(),r=Ore(),o=t&&!t.nodeType&&t,a=o&&!0&&e&&!e.nodeType&&e,l=a&&a.exports===o,c=l?n.Buffer:void 0,d=c?c.isBuffer:void 0,f=d||r;e.exports=f})(zd,zd.exports)),zd.exports}var R1,rk;function Sv(){if(rk)return R1;rk=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var a=typeof r;return o=o??e,!!o&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return R1=n,R1}var O1,ok;function o2(){if(ok)return O1;ok=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return O1=t,O1}var M1,ak;function Mre(){if(ak)return M1;ak=1;var e=uu(),t=o2(),n=sl(),r="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",d="[object Function]",f="[object Map]",p="[object Number]",m="[object Object]",g="[object RegExp]",v="[object Set]",S="[object String]",C="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",I="[object Float32Array]",T="[object Float64Array]",O="[object Int8Array]",D="[object Int16Array]",P="[object Int32Array]",M="[object Uint8Array]",L="[object Uint8ClampedArray]",z="[object Uint16Array]",G="[object Uint32Array]",j={};j[I]=j[T]=j[O]=j[D]=j[P]=j[M]=j[L]=j[z]=j[G]=!0,j[r]=j[o]=j[w]=j[a]=j[x]=j[l]=j[c]=j[d]=j[f]=j[p]=j[m]=j[g]=j[v]=j[S]=j[C]=!1;function F(q){return n(q)&&t(q.length)&&!!j[e(q)]}return M1=F,M1}var N1,sk;function Nre(){if(sk)return N1;sk=1;function e(t){return function(n){return t(n)}}return N1=e,N1}var $d={exports:{}};$d.exports;var ik;function Pre(){return ik||(ik=1,(function(e,t){var n=M8(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===r,l=a&&n.process,c=(function(){try{var d=o&&o.require&&o.require("util").types;return d||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})($d,$d.exports)),$d.exports}var P1,lk;function a2(){if(lk)return P1;lk=1;var e=Mre(),t=Nre(),n=Pre(),r=n&&n.isTypedArray,o=r?t(r):e;return P1=o,P1}var k1,ck;function z8(){if(ck)return k1;ck=1;var e=Tre(),t=n2(),n=La(),r=r2(),o=Sv(),a=a2(),l=Object.prototype,c=l.hasOwnProperty;function d(f,p){var m=n(f),g=!m&&t(f),v=!m&&!g&&r(f),S=!m&&!g&&!v&&a(f),C=m||g||v||S,w=C?e(f.length,String):[],x=w.length;for(var I in f)(p||c.call(f,I))&&!(C&&(I=="length"||v&&(I=="offset"||I=="parent")||S&&(I=="buffer"||I=="byteLength"||I=="byteOffset")||o(I,x)))&&w.push(I);return w}return k1=d,k1}var D1,uk;function s2(){if(uk)return D1;uk=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return D1=t,D1}var L1,dk;function $8(){if(dk)return L1;dk=1;function e(t,n){return function(r){return t(n(r))}}return L1=e,L1}var U1,fk;function kre(){if(fk)return U1;fk=1;var e=$8(),t=e(Object.keys,Object);return U1=t,U1}var F1,hk;function Dre(){if(hk)return F1;hk=1;var e=s2(),t=kre(),n=Object.prototype,r=n.hasOwnProperty;function o(a){if(!e(a))return t(a);var l=[];for(var c in Object(a))r.call(a,c)&&c!="constructor"&&l.push(c);return l}return F1=o,F1}var z1,pk;function Cv(){if(pk)return z1;pk=1;var e=X_(),t=o2();function n(r){return r!=null&&t(r.length)&&!e(r)}return z1=n,z1}var $1,mk;function j8(){if(mk)return $1;mk=1;var e=z8(),t=Dre(),n=Cv();function r(o){return n(o)?e(o):t(o)}return $1=r,$1}var j1,gk;function Lre(){if(gk)return j1;gk=1;var e=L8(),t=F8(),n=j8();function r(o){return e(o,n,t)}return j1=r,j1}var B1,vk;function Ure(){if(vk)return B1;vk=1;var e=Lre(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(a,l,c,d,f,p){var m=c&t,g=e(a),v=g.length,S=e(l),C=S.length;if(v!=C&&!m)return!1;for(var w=v;w--;){var x=g[w];if(!(m?x in l:r.call(l,x)))return!1}var I=p.get(a),T=p.get(l);if(I&&T)return I==l&&T==a;var O=!0;p.set(a,l),p.set(l,a);for(var D=m;++w<v;){x=g[w];var P=a[x],M=l[x];if(d)var L=m?d(M,P,x,l,a,p):d(P,M,x,a,l,p);if(!(L===void 0?P===M||f(P,M,c,d,p):L)){O=!1;break}D||(D=x=="constructor")}if(O&&!D){var z=a.constructor,G=l.constructor;z!=G&&"constructor"in a&&"constructor"in l&&!(typeof z=="function"&&z instanceof z&&typeof G=="function"&&G instanceof G)&&(O=!1)}return p.delete(a),p.delete(l),O}return B1=o,B1}var H1,yk;function Fre(){if(yk)return H1;yk=1;var e=al(),t=Ho(),n=e(t,"DataView");return H1=n,H1}var q1,bk;function zre(){if(bk)return q1;bk=1;var e=al(),t=Ho(),n=e(t,"Promise");return q1=n,q1}var V1,Sk;function $re(){if(Sk)return V1;Sk=1;var e=al(),t=Ho(),n=e(t,"Set");return V1=n,V1}var W1,Ck;function jre(){if(Ck)return W1;Ck=1;var e=al(),t=Ho(),n=e(t,"WeakMap");return W1=n,W1}var G1,Ek;function Bre(){if(Ek)return G1;Ek=1;var e=Fre(),t=J_(),n=zre(),r=$re(),o=jre(),a=uu(),l=N8(),c="[object Map]",d="[object Object]",f="[object Promise]",p="[object Set]",m="[object WeakMap]",g="[object DataView]",v=l(e),S=l(t),C=l(n),w=l(r),x=l(o),I=a;return(e&&I(new e(new ArrayBuffer(1)))!=g||t&&I(new t)!=c||n&&I(n.resolve())!=f||r&&I(new r)!=p||o&&I(new o)!=m)&&(I=function(T){var O=a(T),D=O==d?T.constructor:void 0,P=D?l(D):"";if(P)switch(P){case v:return g;case S:return c;case C:return f;case w:return p;case x:return m}return O}),G1=I,G1}var K1,wk;function Hre(){if(wk)return K1;wk=1;var e=t2(),t=P8(),n=Ire(),r=Ure(),o=Bre(),a=La(),l=r2(),c=a2(),d=1,f="[object Arguments]",p="[object Array]",m="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function S(C,w,x,I,T,O){var D=a(C),P=a(w),M=D?p:o(C),L=P?p:o(w);M=M==f?m:M,L=L==f?m:L;var z=M==m,G=L==m,j=M==L;if(j&&l(C)){if(!l(w))return!1;D=!0,z=!1}if(j&&!z)return O||(O=new e),D||c(C)?t(C,w,x,I,T,O):n(C,w,M,x,I,T,O);if(!(x&d)){var F=z&&v.call(C,"__wrapped__"),q=G&&v.call(w,"__wrapped__");if(F||q){var X=F?C.value():C,Se=q?w.value():w;return O||(O=new e),T(X,Se,x,I,O)}}return j?(O||(O=new e),r(C,w,x,I,T,O)):!1}return K1=S,K1}var Z1,xk;function B8(){if(xk)return Z1;xk=1;var e=Hre(),t=sl();function n(r,o,a,l,c){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,a,l,n,c)}return Z1=n,Z1}var Y1={exports:{}},Q1={},X1={exports:{}},J1={};var _k;function qre(){if(_k)return J1;_k=1;var e=Kf();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(m,g){var v=g(),S=r({inst:{value:v,getSnapshot:g}}),C=S[0].inst,w=S[1];return a(function(){C.value=v,C.getSnapshot=g,d(C)&&w({inst:C})},[m,v,g]),o(function(){return d(C)&&w({inst:C}),m(function(){d(C)&&w({inst:C})})},[m]),l(v),v}function d(m){var g=m.getSnapshot;m=m.value;try{var v=g();return!n(m,v)}catch{return!0}}function f(m,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return J1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,J1}var Ik;function Vre(){return Ik||(Ik=1,X1.exports=qre()),X1.exports}var Ak;function Wre(){if(Ak)return Q1;Ak=1;var e=Kf(),t=Vre();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return Q1.useSyncExternalStoreWithSelector=function(f,p,m,g,v){var S=a(null);if(S.current===null){var C={hasValue:!1,value:null};S.current=C}else C=S.current;S=c(function(){function x(P){if(!I){if(I=!0,T=P,P=g(P),v!==void 0&&C.hasValue){var M=C.value;if(v(M,P))return O=M}return O=P}if(M=O,r(T,P))return M;var L=g(P);return v!==void 0&&v(M,L)?(T=P,M):(T=P,O=L)}var I=!1,T,O,D=m===void 0?null:m;return[function(){return x(p())},D===null?void 0:function(){return x(D())}]},[p,m,g,v]);var w=o(f,S[0],S[1]);return l(function(){C.hasValue=!0,C.value=w},[w]),d(w),w},Q1}var Tk;function Gre(){return Tk||(Tk=1,Y1.exports=Wre()),Y1.exports}var H8=Gre();var ve=function(){return ve=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ve.apply(this,arguments)};function i2(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function st(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function gt(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,a=[],l;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(c){l={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return a}function Bt(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var At;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(At||(At={}));var qi;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(qi||(qi={}));var ox=At.Start,l2=At.Stop,Qf=At.Raise,Ev=At.Send,q8=At.Cancel,Kre=At.NullEvent,c2=At.Assign;At.After;At.DoneState;var V8=At.Log,Zre=At.Init,ax=At.Invoke;At.ErrorExecution;var Rk=At.ErrorPlatform,Yre=At.ErrorCustom,u2=At.Update,Qre=At.Choose,Xre=At.Pure,W8=".",Ok={},sx="xstate.guard",Jre="",Hp;function d2(e,t,n){n===void 0&&(n=W8);var r=ef(e,n),o=ef(t,n);return St(o)?St(r)?o===r:!1:St(r)?r in o:Object.keys(r).every(function(a){return a in o?d2(r[a],o[a]):!1})}function G8(e){try{return St(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function ix(e,t){try{return du(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function eoe(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function ef(e,t){if(eoe(e))return e.value;if(du(e))return rg(e);if(typeof e!="string")return e;var n=ix(e,t);return rg(n)}function rg(e){if(e.length===1)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function jd(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var a=r[o];n[a]=t(e[a],a,e,o)}return n}function Mk(e,t,n){var r,o,a={};try{for(var l=st(Object.keys(e)),c=l.next();!c.done;c=l.next()){var d=c.value,f=e[d];n(f)&&(a[d]=t(f,d,e))}}catch(p){r={error:p}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return a}var toe=function(e){return function(t){var n,r,o=t;try{for(var a=st(e),l=a.next();!l.done;l=a.next()){var c=l.value;o=o[c]}}catch(d){n={error:d}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o}};function noe(e,t){return function(n){var r,o,a=n;try{for(var l=st(e),c=l.next();!c.done;c=l.next()){var d=c.value;a=a[t][d]}}catch(f){r={error:f}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return a}}function km(e){if(!e)return[[]];if(St(e))return[[e]];var t=Jt(Object.keys(e).map(function(n){var r=e[n];return typeof r!="string"&&(!r||!Object.keys(r).length)?[[n]]:km(e[n]).map(function(o){return[n].concat(o)})}));return t}function Jt(e){var t;return(t=[]).concat.apply(t,Bt([],gt(e),!1))}function K8(e){return du(e)?e:[e]}function uo(e){return e===void 0?[]:K8(e)}function og(e,t,n){var r,o;if(Ct(e))return e(t,n.data);var a={};try{for(var l=st(Object.keys(e)),c=l.next();!c.done;c=l.next()){var d=c.value,f=e[d];Ct(f)?a[d]=f(t,n.data):a[d]=f}}catch(p){r={error:p}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return a}function roe(e){return/^(done|error)\./.test(e)}function Nk(e){return!!(e instanceof Promise||e!==null&&(Ct(e)||typeof e=="object")&&Ct(e.then))}function ooe(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function aoe(e,t){var n,r,o=gt([[],[]],2),a=o[0],l=o[1];try{for(var c=st(e),d=c.next();!d.done;d=c.next()){var f=d.value;t(f)?a.push(f):l.push(f)}}catch(p){n={error:p}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return[a,l]}function Z8(e,t){return jd(e.states,function(n,r){if(n){var o=(St(t)?void 0:t[r])||(n?n.current:void 0);if(o)return{current:o,states:Z8(n,o)}}})}function soe(e,t){return{current:t,states:Z8(e,t)}}function Pk(e,t,n,r){var o=e&&n.reduce(function(a,l){var c,d,f=l.assignment,p={state:r,action:l,_event:t},m={};if(Ct(f))m=f(a,t.data,p);else try{for(var g=st(Object.keys(f)),v=g.next();!v.done;v=g.next()){var S=v.value,C=f[S];m[S]=Ct(C)?C(a,t.data,p):C}}catch(w){c={error:w}}finally{try{v&&!v.done&&(d=g.return)&&d.call(g)}finally{if(c)throw c.error}}return Object.assign({},a,m)},e);return o}var ioe=function(){};function du(e){return Array.isArray(e)}function Ct(e){return typeof e=="function"}function St(e){return typeof e=="string"}function Y8(e,t){if(e)return St(e)?{type:sx,name:e,predicate:t?t[e]:void 0}:Ct(e)?{type:sx,name:e.name,predicate:e}:e}function loe(e){try{return"subscribe"in e&&Ct(e.subscribe)}catch{return!1}}var Es=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Hp={},Hp[Es]=function(){return this},Hp[Symbol.observable]=function(){return this};function Hc(e){return!!e&&"__xstatenode"in e}function coe(e){return!!e&&typeof e.send=="function"}var uoe=(function(){var e=0;return function(){return e++,e.toString(16)}})();function wv(e,t){return St(e)||typeof e=="number"?ve({type:e},t):e}function Un(e,t){if(!St(e)&&"$$type"in e&&e.$$type==="scxml")return e;var n=wv(e);return ve({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function tc(e,t){var n=K8(t).map(function(r){return typeof r>"u"||typeof r=="string"||Hc(r)?{target:r,event:e}:ve(ve({},r),{event:e})});return n}function doe(e){if(!(e===void 0||e===Jre))return uo(e)}function Q8(e,t,n,r,o){var a=e.options.guards,l={state:o,cond:t,_event:r};if(t.type===sx)return(a?.[t.name]||t.predicate)(n,r.data,l);var c=a?.[t.type];if(!c)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return c(n,r.data,l)}function X8(e){return typeof e=="string"?{type:e}:e}function tf(e,t,n){var r=function(){},o=typeof e=="object",a=o?e:null;return{next:((o?e.next:e)||r).bind(a),error:((o?e.error:t)||r).bind(a),complete:((o?e.complete:n)||r).bind(a)}}function qp(e,t){return"".concat(e,":invocation[").concat(t,"]")}function lx(e){return(e.type===Qf||e.type===Ev&&e.to===qi.Internal)&&typeof e.delay!="number"}var Mi=Un({type:Zre});function ag(e,t){return t&&t[e]||void 0}function qc(e,t){var n;if(St(e)||typeof e=="number"){var r=ag(e,t);Ct(r)?n={type:e,exec:r}:r?n=r:n={type:e,exec:void 0}}else if(Ct(e))n={type:e.name||e.toString(),exec:e};else{var r=ag(e.type,t);if(Ct(r))n=ve(ve({},e),{exec:r});else if(r){var o=r.type||e.type;n=ve(ve(ve({},r),e),{type:o})}else n=e}return n}var ba=function(e,t){if(!e)return[];var n=du(e)?e:[e];return n.map(function(r){return qc(r,t)})};function xv(e){var t=qc(e);return ve(ve({id:St(e)?e:t.id},t),{type:t.type})}function J8(e,t){return{type:Qf,event:typeof e=="function"?e:wv(e),delay:t?t.delay:void 0,id:t?.id}}function eF(e,t,n,r){var o={_event:n},a=Un(Ct(e.event)?e.event(t,n.data,o):e.event),l;if(St(e.delay)){var c=r&&r[e.delay];l=Ct(c)?c(t,n.data,o):c}else l=Ct(e.delay)?e.delay(t,n.data,o):e.delay;return ve(ve({},e),{type:Qf,_event:a,delay:l})}function _v(e,t){return{to:t?t.to:void 0,type:Ev,event:Ct(e)?e:wv(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:Ct(e)?e.name:G8(e)}}function tF(e,t,n,r){var o={_event:n},a=Un(Ct(e.event)?e.event(t,n.data,o):e.event),l;if(St(e.delay)){var c=r&&r[e.delay];l=Ct(c)?c(t,n.data,o):c}else l=Ct(e.delay)?e.delay(t,n.data,o):e.delay;var d=Ct(e.to)?e.to(t,n.data,o):e.to;return ve(ve({},e),{to:d,_event:a,event:a.data,delay:l})}function nF(e,t){return _v(e,ve(ve({},t),{to:qi.Parent}))}function rF(){return nF(u2)}var oF=function(e,t,n){return ve(ve({},e),{value:St(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},aF=function(e){return{type:q8,sendId:e}};function sF(e){var t=xv(e);return{type:At.Start,activity:t,exec:void 0}}function iF(e){var t=Ct(e)?e:xv(e);return{type:At.Stop,activity:t,exec:void 0}}function lF(e,t,n){var r=Ct(e.activity)?e.activity(t,n.data):e.activity,o=typeof r=="string"?{id:r}:r,a={type:At.Stop,activity:o};return a}var cF=function(e){return{type:c2,assignment:e}};function uF(e,t){var n=t?"#".concat(t):"";return"".concat(At.After,"(").concat(e,")").concat(n)}function Bd(e,t){var n="".concat(At.DoneState,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function nf(e,t){var n="".concat(At.DoneInvoke,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function bc(e,t){var n="".concat(At.ErrorPlatform,".").concat(e),r={type:n,data:t};return r.toString=function(){return n},r}function dF(e,t){return _v(function(n,r){return r},ve(ve({},t),{to:e}))}function foe(e){return{type:At.Choose,conds:e}}var hoe=function(e){var t,n,r=[];try{for(var o=st(e),a=o.next();!a.done;a=o.next())for(var l=a.value,c=0;c<l.actions.length;){if(l.actions[c].type===c2){r.push(l.actions[c]),l.actions.splice(c,1);continue}c++}}catch(d){t={error:d}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r};function bf(e,t,n,r,o,a,l){l===void 0&&(l=!1);var c=l?[]:hoe(o),d=c.length?Pk(n,r,c,t):n,f=l?[n]:void 0,p=[];function m(S,C){var w;switch(C.type){case Qf:{var x=eF(C,d,r,e.options.delays);return a&&typeof x.delay=="number"&&a(x,d,r),x}case Ev:var I=tF(C,d,r,e.options.delays);return a&&I.to!==qi.Internal&&(S==="entry"?p.push(I):a(I,d,r)),I;case V8:{var T=oF(C,d,r);return a?.(T,d,r),T}case Qre:{var O=C,D=(w=O.conds.find(function(W){var ee=Y8(W.cond,e.options.guards);return!ee||Q8(e,ee,d,r,a?void 0:t)}))===null||w===void 0?void 0:w.actions;if(!D)return[];var P=gt(bf(e,t,d,r,[{type:S,actions:ba(uo(D),e.options.actions)}],a,l),2),M=P[0],L=P[1];return d=L,f?.push(d),M}case Xre:{var D=C.get(d,r.data);if(!D)return[];var z=gt(bf(e,t,d,r,[{type:S,actions:ba(uo(D),e.options.actions)}],a,l),2),G=z[0],j=z[1];return d=j,f?.push(d),G}case l2:{var T=lF(C,d,r);return a?.(T,n,r),T}case c2:{d=Pk(d,r,[C],a?void 0:t),f?.push(d);break}default:var F=qc(C,e.options.actions),q=F.exec;if(a)a(F,d,r);else if(q&&f){var X=f.length-1,Se=ve(ve({},F),{exec:function(W){for(var ee=[],me=1;me<arguments.length;me++)ee[me-1]=arguments[me];q.apply(void 0,Bt([f[X]],gt(ee),!1))}});F=Se}return F}}function g(S){var C,w,x=[];try{for(var I=st(S.actions),T=I.next();!T.done;T=I.next()){var O=T.value,D=m(S.type,O);D&&(x=x.concat(D))}}catch(P){C={error:P}}finally{try{T&&!T.done&&(w=I.return)&&w.call(I)}finally{if(C)throw C.error}}return p.forEach(function(P){a(P,d,r)}),p.length=0,x}var v=Jt(o.map(g));return[v,d]}const fF=Object.freeze(Object.defineProperty({__proto__:null,after:uF,assign:cF,cancel:aF,choose:foe,done:Bd,doneInvoke:nf,error:bc,forwardTo:dF,getActionFunction:ag,initEvent:Mi,raise:J8,resolveActions:bf,resolveLog:oF,resolveRaise:eF,resolveSend:tF,resolveStop:lF,send:_v,sendParent:nF,sendUpdate:rF,start:sF,stop:iF,toActionObject:qc,toActionObjects:ba,toActivityDefinition:xv},Symbol.toStringTag,{value:"Module"}));var sg=[],mc=function(e,t){sg.push(e);var n=t(e);return sg.pop(),n},poe=function(e){return e(sg[sg.length-1])};function hF(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[Es]=function(){return this},t}function moe(e,t,n,r){var o,a=X8(e.src),l=(o=t?.options.services)===null||o===void 0?void 0:o[a.type],c=e.data?og(e.data,n,r):void 0,d=l?f2(l,e.id,c):hF(e.id);return d.meta=e,d}function f2(e,t,n){var r=hF(t);if(r.deferred=!0,Hc(e)){var o=r.state=mc(void 0,function(){return(n?e.withContext(n):e).initialState});r.getSnapshot=function(){return o}}return r}function goe(e){try{return typeof e.send=="function"}catch{return!1}}function voe(e){return goe(e)&&"id"in e}function yoe(e){var t;return ve((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[Es]=function(){return this},t),e)}var ig=function(e){return e.type==="atomic"||e.type==="final"};function pF(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function Sf(e){return pF(e).filter(function(t){return t.type!=="history"})}function mF(e){var t=[e];return ig(e)?t:t.concat(Jt(Sf(e).map(mF)))}function Hd(e,t){var n,r,o,a,l,c,d,f,p=new Set(e),m=cx(p),g=new Set(t);try{for(var v=st(g),S=v.next();!S.done;S=v.next())for(var C=S.value,w=C.parent;w&&!g.has(w);)g.add(w),w=w.parent}catch(z){n={error:z}}finally{try{S&&!S.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}var x=cx(g);try{for(var I=st(g),T=I.next();!T.done;T=I.next()){var C=T.value;if(C.type==="compound"&&(!x.get(C)||!x.get(C).length))m.get(C)?m.get(C).forEach(function(G){return g.add(G)}):C.initialStateNodes.forEach(function(G){return g.add(G)});else if(C.type==="parallel")try{for(var O=(l=void 0,st(Sf(C))),D=O.next();!D.done;D=O.next()){var P=D.value;g.has(P)||(g.add(P),m.get(P)?m.get(P).forEach(function(G){return g.add(G)}):P.initialStateNodes.forEach(function(G){return g.add(G)}))}}catch(G){l={error:G}}finally{try{D&&!D.done&&(c=O.return)&&c.call(O)}finally{if(l)throw l.error}}}}catch(z){o={error:z}}finally{try{T&&!T.done&&(a=I.return)&&a.call(I)}finally{if(o)throw o.error}}try{for(var M=st(g),L=M.next();!L.done;L=M.next())for(var C=L.value,w=C.parent;w&&!g.has(w);)g.add(w),w=w.parent}catch(z){d={error:z}}finally{try{L&&!L.done&&(f=M.return)&&f.call(M)}finally{if(d)throw d.error}}return g}function gF(e,t){var n=t.get(e);if(!n)return{};if(e.type==="compound"){var r=n[0];if(r){if(ig(r))return r.key}else return{}}var o={};return n.forEach(function(a){o[a.key]=gF(a,t)}),o}function cx(e){var t,n,r=new Map;try{for(var o=st(e),a=o.next();!a.done;a=o.next()){var l=a.value;r.has(l)||r.set(l,[]),l.parent&&(r.has(l.parent)||r.set(l.parent,[]),r.get(l.parent).push(l))}}catch(c){t={error:c}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function boe(e,t){var n=Hd([e],t);return gF(e,cx(n))}function qd(e,t){return Array.isArray(e)?e.some(function(n){return n===t}):e instanceof Set?e.has(t):!1}function Soe(e){return Bt([],gt(new Set(Jt(Bt([],gt(e.map(function(t){return t.ownEvents})),!1)))),!1)}function Dm(e,t){return t.type==="compound"?Sf(t).some(function(n){return n.type==="final"&&qd(e,n)}):t.type==="parallel"?Sf(t).every(function(n){return Dm(e,n)}):!1}function Coe(e){return e===void 0&&(e=[]),e.reduce(function(t,n){return n.meta!==void 0&&(t[n.id]=n.meta),t},{})}function kk(e){return new Set(Jt(e.map(function(t){return t.tags})))}function vF(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(St(e)||St(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(function(o){return vF(e[o],t[o])})}function Eoe(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function woe(e,t){var n=e.exec,r=ve(ve({},e),{exec:n!==void 0?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return r}var fo=(function(){function e(t){var n=this,r;this.actions=[],this.activities=Ok,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Ok,this.meta=Coe(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(r=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&r!==void 0?r:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return Soe(n.configuration)}})}return e.from=function(t,n){if(t instanceof e)return t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,events:[],configuration:[],transitions:[],children:{}}):t;var r=Mi;return new e({value:t,context:n,_event:r,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=Mi;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(t,n){var r=this;if(t===void 0&&(t=this.value),n===void 0&&(n="."),St(t))return[t];var o=Object.keys(t);return o.concat.apply(o,Bt([],gt(o.map(function(a){return r.toStrings(t[a],n).map(function(l){return a+n+l})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var n=t.tags;t.machine;var r=i2(t,["configuration","transitions","tags","machine"]);return ve(ve({},r),{tags:Array.from(n)})},e.prototype.matches=function(t){return d2(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var n;ioe(!!this.machine);var r=(n=this.machine)===null||n===void 0?void 0:n.getTransitionData(this,t);return!!r?.transitions.length&&r.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e})(),xoe={deferEvents:!1},Dk=(function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ve(ve({},xoe),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(n){throw this.clear(),n}finally{this.processingEvent=!1}},e})(),eC=new Map,_oe=0,Ed={bookId:function(){return"x:".concat(_oe++)},register:function(e,t){return eC.set(e,t),e},get:function(e){return eC.get(e)},free:function(e){eC.delete(e)}};function h2(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Ioe(){var e=h2();if(e&&"__xstate__"in e)return e.__xstate__}function Aoe(e){if(h2()){var t=Ioe();t&&t.register(e)}}function Toe(e,t){t===void 0&&(t={});var n=e.initialState,r=new Set,o=[],a=!1,l=function(){if(!a){for(a=!0;o.length>0;){var f=o.shift();n=e.transition(n,f,d),r.forEach(function(p){return p.next(n)})}a=!1}},c=yoe({id:t.id,send:function(f){o.push(f),l()},getSnapshot:function(){return n},subscribe:function(f,p,m){var g=tf(f,p,m);return r.add(g),g.next(n),{unsubscribe:function(){r.delete(g)}}}}),d={parent:t.parent,self:c,id:t.id||"anonymous",observers:r};return n=e.start?e.start(d):n,c}var ux={sync:!1,autoForward:!1},vn;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(vn||(vn={}));var Roe=(function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var r=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=vn.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(p,m){if(du(p))return r.batch(p),r.state;var g=Un(wv(p,m));if(r.status===vn.Stopped)return r.state;if(r.status!==vn.Running&&!r.options.deferEvents)throw new Error('Event "'.concat(g.name,'" was sent to uninitialized service "').concat(r.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
18
+ Event: `).concat(JSON.stringify(g.data)));return r.scheduler.schedule(function(){r.forward(g);var v=r._nextState(g);r.update(v,g)}),r._state},this.sendTo=function(p,m,g){var v=r.parent&&(m===qi.Parent||r.parent.id===m),S=v?r.parent:St(m)?m===qi.Internal?r:r.children.get(m)||Ed.get(m):coe(m)?m:void 0;if(!S){if(!v)throw new Error("Unable to send event to child '".concat(m,"' from service '").concat(r.id,"'."));return}if("machine"in S){if(r.status!==vn.Stopped||r.parent!==S||r.state.done){var C=ve(ve({},p),{name:p.name===Yre?"".concat(bc(r.id)):p.name,origin:r.sessionId});!g&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([S,C]):S.send(C)}}else!g&&r.machine.config.predictableActionArguments?r._outgoingQueue.push([S,p.data]):S.send(p.data)},this._exec=function(p,m,g,v){v===void 0&&(v=r.machine.options.actions);var S=p.exec||ag(p.type,v),C=Ct(S)?S:S?S.exec:p.exec;if(C)try{return C(m,g.data,r.machine.config.predictableActionArguments?{action:p,_event:g}:{action:p,state:r.state,_event:g})}catch(X){throw r.parent&&r.parent.send({type:"xstate.error",data:X}),X}switch(p.type){case Qf:{var w=p;r.defer(w);break}case Ev:var x=p;if(typeof x.delay=="number"){r.defer(x);return}else x.to?r.sendTo(x._event,x.to,g===Mi):r.send(x._event);break;case q8:r.cancel(p.sendId);break;case ox:{if(r.status!==vn.Running)return;var I=p.activity;if(!r.machine.config.predictableActionArguments&&!r.state.activities[I.id||I.type])break;if(I.type===At.Invoke){var T=X8(I.src),O=r.machine.options.services?r.machine.options.services[T.type]:void 0,D=I.id,P=I.data,M="autoForward"in I?I.autoForward:!!I.forward;if(!O)return;var L=P?og(P,m,g):void 0;if(typeof O=="string")return;var z=Ct(O)?O(m,g.data,{data:L,src:T,meta:I.meta}):O;if(!z)return;var G=void 0;Hc(z)&&(z=L?z.withContext(L):z,G={autoForward:M}),r.spawn(z,D,G)}else r.spawnActivity(I);break}case l2:{r.stopChild(p.activity.id);break}case V8:var j=p,F=j.label,q=j.value;F?r.logger(F,q):r.logger(q);break}};var o=ve(ve({},e.defaultOptions),n),a=o.clock,l=o.logger,c=o.parent,d=o.id,f=d!==void 0?d:t.id;this.id=f,this.logger=l,this.clock=a,this.parent=c,this.options=o,this.scheduler=new Dk({deferEvents:this.options.deferEvents}),this.sessionId=Ed.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:mc(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var r,o;try{for(var a=st(t.actions),l=a.next();!l.done;l=a.next()){var c=l.value;this.exec(c,t,n)}}catch(d){r={error:d}}finally{try{l&&!l.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}},e.prototype.update=function(t,n){var r,o,a,l,c,d,f,p,m=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===Mi)&&this.options.execute)this.execute(this.state);else for(var g=void 0;g=this._outgoingQueue.shift();)g[0].send(g[1]);if(this.children.forEach(function(z){m.state.children[z.id]=z}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var v=st(this.eventListeners),S=v.next();!S.done;S=v.next()){var C=S.value;C(t.event)}}catch(z){r={error:z}}finally{try{S&&!S.done&&(o=v.return)&&o.call(v)}finally{if(r)throw r.error}}try{for(var w=st(this.listeners),x=w.next();!x.done;x=w.next()){var C=x.value;C(t,t.event)}}catch(z){a={error:z}}finally{try{x&&!x.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}try{for(var I=st(this.contextListeners),T=I.next();!T.done;T=I.next()){var O=T.value;O(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(z){c={error:z}}finally{try{T&&!T.done&&(d=I.return)&&d.call(I)}finally{if(c)throw c.error}}if(this.state.done){var D=t.configuration.find(function(z){return z.type==="final"&&z.parent===m.machine}),P=D&&D.doneData?og(D.doneData,t.context,n):void 0;this._doneEvent=nf(this.id,P);try{for(var M=st(this.doneListeners),L=M.next();!L.done;L=M.next()){var C=L.value;C(this._doneEvent)}}catch(z){f={error:z}}finally{try{L&&!L.done&&(p=M.return)&&p.call(M)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),Ed.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===vn.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,r){var o=this,a=tf(t,n,r);this.listeners.add(a.next),this.status!==vn.NotStarted&&a.next(this.state);var l=function(){o.doneListeners.delete(l),o.stopListeners.delete(l),a.complete()};return this.status===vn.Stopped?a.complete():(this.onDone(l),this.onStop(l)),{unsubscribe:function(){o.listeners.delete(a.next),o.doneListeners.delete(l),o.stopListeners.delete(l)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===vn.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===vn.Running)return this;this.machine._init(),Ed.register(this.sessionId,this),this.initialized=!0,this.status=vn.Running;var r=t===void 0?this.initialState:mc(this,function(){return Eoe(t)?n.machine.resolveState(t):n.machine.resolveState(fo.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(r,Mi)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){Ct(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,r,o,a,l,c,d,f,p;try{for(var m=st(this.listeners),g=m.next();!g.done;g=m.next()){var v=g.value;this.listeners.delete(v)}}catch(M){t={error:M}}finally{try{g&&!g.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var S=st(this.stopListeners),C=S.next();!C.done;C=S.next()){var v=C.value;v(),this.stopListeners.delete(v)}}catch(M){r={error:M}}finally{try{C&&!C.done&&(o=S.return)&&o.call(S)}finally{if(r)throw r.error}}try{for(var w=st(this.contextListeners),x=w.next();!x.done;x=w.next()){var v=x.value;this.contextListeners.delete(v)}}catch(M){a={error:M}}finally{try{x&&!x.done&&(l=w.return)&&l.call(w)}finally{if(a)throw a.error}}try{for(var I=st(this.doneListeners),T=I.next();!T.done;T=I.next()){var v=T.value;this.doneListeners.delete(v)}}catch(M){c={error:M}}finally{try{T&&!T.done&&(d=I.return)&&d.call(I)}finally{if(c)throw c.error}}if(!this.initialized)return this;this.initialized=!1,this.status=vn.Stopped,this._initialState=void 0;try{for(var O=st(Object.keys(this.delayedEventsMap)),D=O.next();!D.done;D=O.next()){var P=D.value;this.clock.clearTimeout(this.delayedEventsMap[P])}}catch(M){f={error:M}}finally{try{D&&!D.done&&(p=O.return)&&p.call(O)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new Dk({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var r;if(!(!((r=t._state)===null||r===void 0)&&r.done)){var o=Un({type:"xstate.stop"}),a=mc(t,function(){var l=Jt(Bt([],gt(t.state.configuration),!1).sort(function(m,g){return g.order-m.order}).map(function(m){return ba(m.onExit,t.machine.options.actions)})),c=gt(bf(t.machine,t.state,t.state.context,o,[{type:"exit",actions:l}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),d=c[0],f=c[1],p=new fo({value:t.state.value,context:f,_event:o,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:d.filter(function(m){return!lx(m)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return p.changed=!0,p});t.update(a,o),t._stopChildren(),Ed.free(t.sessionId)}}),this},e.prototype.batch=function(t){var n=this;if(!(this.status===vn.NotStarted&&this.options.deferEvents)){if(this.status!==vn.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(t.length){var r=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,a,l=n.state,c=!1,d=[],f=function(v){var S=Un(v);n.forward(S),l=mc(n,function(){return n.machine.transition(l,S,void 0,r||void 0)}),d.push.apply(d,Bt([],gt(n.machine.config.predictableActionArguments?l.actions:l.actions.map(function(C){return woe(C,l)})),!1)),c=c||!!l.changed};try{for(var p=st(t),m=p.next();!m.done;m=p.next()){var g=m.value;f(g)}}catch(v){o={error:v}}finally{try{m&&!m.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}l.changed=c,l.actions=d,n.update(l,Un(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var r=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var o=Un(t);if(o.name.indexOf(Rk)===0&&!this.state.nextEvents.some(function(l){return l.indexOf(Rk)===0}))throw o.data.data;var a=mc(this,function(){return r.machine.transition(r.state,o,void 0,n||void 0)});return a},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,r;try{for(var o=st(this.forwardTo),a=o.next();!a.done;a=o.next()){var l=a.value,c=this.children.get(l);if(!c)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(l,"'."));c.send(t)}}catch(d){n={error:d}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,r=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=r)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,r){r===void 0&&(r=this.machine.options.actions),this._exec(t,n.context,n._event,r)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),Ct(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,r){if(this.status!==vn.Running)return f2(t,n);if(Nk(t))return this.spawnPromise(Promise.resolve(t),n);if(Ct(t))return this.spawnCallback(t,n);if(voe(t))return this.spawnActor(t,n);if(loe(t))return this.spawnObservable(t,n);if(Hc(t))return this.spawnMachine(t,ve(ve({},r),{id:n}));if(ooe(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var r=this;n===void 0&&(n={});var o=new e(t,ve(ve({},this.options),{parent:this,id:n.id||t.id})),a=ve(ve({},ux),n);a.sync&&o.onTransition(function(c){r.send(u2,{state:c,id:o.id})});var l=o;return this.children.set(o.id,l),a.autoForward&&this.forwardTo.add(o.id),o.onDone(function(c){r.removeChild(o.id),r.send(Un(c,{origin:o.id}))}).start(),l},e.prototype.spawnBehavior=function(t,n){var r=Toe(t,{id:n,parent:this});return this.children.set(n,r),r},e.prototype.spawnPromise=function(t,n){var r,o=this,a=!1,l;t.then(function(d){a||(l=d,o.removeChild(n),o.send(Un(nf(n,d),{origin:n})))},function(d){if(!a){o.removeChild(n);var f=bc(n,d);try{o.send(Un(f,{origin:n}))}catch{o.devTools&&o.devTools.send(f,o.state),o.machine.strict&&o.stop()}}});var c=(r={id:n,send:function(){},subscribe:function(d,f,p){var m=tf(d,f,p),g=!1;return t.then(function(v){g||(m.next(v),!g&&m.complete())},function(v){g||m.error(v)}),{unsubscribe:function(){return g=!0}}},stop:function(){a=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return l}},r[Es]=function(){return this},r);return this.children.set(n,c),c},e.prototype.spawnCallback=function(t,n){var r,o=this,a=!1,l=new Set,c=new Set,d,f=function(g){d=g,c.forEach(function(v){return v(g)}),!a&&o.send(Un(g,{origin:n}))},p;try{p=t(f,function(g){l.add(g)})}catch(g){this.send(bc(n,g))}if(Nk(p))return this.spawnPromise(p,n);var m=(r={id:n,send:function(g){return l.forEach(function(v){return v(g)})},subscribe:function(g){var v=tf(g);return c.add(v.next),{unsubscribe:function(){c.delete(v.next)}}},stop:function(){a=!0,Ct(p)&&p()},toJSON:function(){return{id:n}},getSnapshot:function(){return d}},r[Es]=function(){return this},r);return this.children.set(n,m),m},e.prototype.spawnObservable=function(t,n){var r,o=this,a,l=t.subscribe(function(d){a=d,o.send(Un(d,{origin:n}))},function(d){o.removeChild(n),o.send(Un(bc(n,d),{origin:n}))},function(){o.removeChild(n),o.send(Un(nf(n),{origin:n}))}),c=(r={id:n,send:function(){},subscribe:function(d,f,p){return t.subscribe(d,f,p)},stop:function(){return l.unsubscribe()},getSnapshot:function(){return a},toJSON:function(){return{id:n}}},r[Es]=function(){return this},r);return this.children.set(n,c),c},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(n){var r=n(this.state.context,t);this.spawnEffect(t.id,r)}},e.prototype.spawnEffect=function(t,n){var r;this.children.set(t,(r={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},r[Es]=function(){return this},r))},e.prototype.attachDev=function(){var t=h2();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ve(ve({name:this.id,autoPause:!0,stateSanitizer:function(r){return{value:r.value,context:r.context,actions:r.actions}}},n),{features:ve({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}Aoe(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Es]=function(){return this},e.prototype.getSnapshot=function(){return this.status===vn.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=yF,e})(),Ooe=function(e){return St(e)?ve(ve({},ux),{name:e}):ve(ve(ve({},ux),{name:uoe()}),e)};function wd(e,t){var n=Ooe(t);return poe(function(r){return r?r.spawn(e,n.name,n):f2(e,n.name)})}function yF(e,t){var n=new Roe(e,t);return n}function Moe(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function Vp(e){return ve(ve({type:ax},e),{toJSON:function(){e.onDone,e.onError;var t=i2(e,["onDone","onError"]);return ve(ve({},t),{type:ax,src:Moe(e.src)})}})}var Wp="",dx="#",tC="*",nc={},rc=function(e){return e[0]===dx},Noe=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Poe=(function(){function e(t,n,r,o){r===void 0&&(r="context"in t?t.context:void 0);var a=this,l;this.config=t,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(Noe(),n),this.parent=o?.parent,this.key=this.config.key||o?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:W8),this.id=this.config.id||Bt([this.machine.key],gt(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(l=this.config.schema)!==null&&l!==void 0?l:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?jd(this.config.states,function(f,p){var m,g=new e(f,{},void 0,{parent:a,key:p});return Object.assign(a.idMap,ve((m={},m[g.id]=g,m),g.idMap)),g}):nc;var c=0;function d(f){var p,m;f.order=c++;try{for(var g=st(pF(f)),v=g.next();!v.done;v=g.next()){var S=v.value;d(S)}}catch(C){p={error:C}}finally{try{v&&!v.done&&(m=g.return)&&m.call(g)}finally{if(p)throw p.error}}}d(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(f){var p=f.event;return p===Wp}):Wp in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=uo(this.config.entry||this.config.onEntry).map(function(f){return qc(f)}),this.onExit=uo(this.config.exit||this.config.onExit).map(function(f){return qc(f)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=uo(this.config.invoke).map(function(f,p){var m,g;if(Hc(f)){var v=qp(a.id,p);return a.machine.options.services=ve((m={},m[v]=f,m),a.machine.options.services),Vp({src:v,id:v})}else if(St(f.src)){var v=f.id||qp(a.id,p);return Vp(ve(ve({},f),{id:v,src:f.src}))}else if(Hc(f.src)||Ct(f.src)){var v=f.id||qp(a.id,p);return a.machine.options.services=ve((g={},g[v]=f.src,g),a.machine.options.services),Vp(ve(ve({id:v},f),{src:v}))}else{var S=f.src;return Vp(ve(ve({id:qp(a.id,p)},f),{src:S}))}}),this.activities=uo(this.config.activities).concat(this.invoke).map(function(f){return xv(f)}),this.transition=this.transition.bind(this),this.tags=uo(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||mF(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var r=this.options,o=r.actions,a=r.activities,l=r.guards,c=r.services,d=r.delays;return new e(this.config,{actions:ve(ve({},o),t.actions),activities:ve(ve({},a),t.activities),guards:ve(ve({},l),t.guards),services:ve(ve({},c),t.services),delays:ve(ve({},d),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return Ct(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:jd(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,r){return n[r.eventType]=n[r.eventType]||[],n[r.eventType].push(r),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===Wp,r=this.transitions.filter(function(o){var a=o.eventType===t;return n?a:a||o.eventType===tC});return this.__cache.candidates[t]=r,r},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var r=function(a,l){var c=Ct(a)?"".concat(t.id,":delay[").concat(l,"]"):a,d=uF(c,t.id);return t.onEntry.push(_v(d,{delay:a})),t.onExit.push(aF(d)),d},o=du(n)?n.map(function(a,l){var c=r(a.delay,l);return ve(ve({},a),{event:c})}):Jt(Object.keys(n).map(function(a,l){var c=n[a],d=St(c)?{target:c}:c,f=isNaN(+a)?a:+a,p=r(f,l);return uo(d).map(function(m){return ve(ve({},m),{event:p,delay:f})})}));return o.map(function(a){var l=a.delay;return ve(ve({},t.formatTransition(a)),{delay:l})})},e.prototype.getStateNodes=function(t){var n,r=this;if(!t)return[];var o=t instanceof fo?t.value:ef(t,this.delimiter);if(St(o)){var a=this.getStateNode(o).initial;return a!==void 0?this.getStateNodes((n={},n[o]=a,n)):[this,this.states[o]]}var l=Object.keys(o),c=[this];return c.push.apply(c,Bt([],gt(Jt(l.map(function(d){return r.getStateNode(d).getStateNodes(o[d])}))),!1)),c},e.prototype.handles=function(t){var n=G8(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof fo?t:fo.create(t),r=Array.from(Hd([],this.getStateNodes(n.value)));return new fo(ve(ve({},n),{value:this.resolve(n.value),configuration:r,done:Dm(r,this),tags:kk(r),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,r){var o=this.getStateNode(t),a=o.next(n,r);return!a||!a.transitions.length?this.next(n,r):a},e.prototype.transitionCompoundNode=function(t,n,r){var o=Object.keys(t),a=this.getStateNode(o[0]),l=a._transition(t[o[0]],n,r);return!l||!l.transitions.length?this.next(n,r):l},e.prototype.transitionParallelNode=function(t,n,r){var o,a,l={};try{for(var c=st(Object.keys(t)),d=c.next();!d.done;d=c.next()){var f=d.value,p=t[f];if(p){var m=this.getStateNode(f),g=m._transition(p,n,r);g&&(l[f]=g)}}}catch(x){o={error:x}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}var v=Object.keys(l).map(function(x){return l[x]}),S=Jt(v.map(function(x){return x.transitions})),C=v.some(function(x){return x.transitions.length>0});if(!C)return this.next(n,r);var w=Jt(Object.keys(l).map(function(x){return l[x].configuration}));return{transitions:S,exitSet:Jt(v.map(function(x){return x.exitSet})),configuration:w,source:n,actions:Jt(Object.keys(l).map(function(x){return l[x].actions}))}},e.prototype._transition=function(t,n,r){return St(t)?this.transitionLeafNode(t,n,r):Object.keys(t).length===1?this.transitionCompoundNode(t,n,r):this.transitionParallelNode(t,n,r)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,Un(n))},e.prototype.next=function(t,n){var r,o,a=this,l=n.name,c=[],d=[],f;try{for(var p=st(this.getCandidates(l)),m=p.next();!m.done;m=p.next()){var g=m.value,v=g.cond,S=g.in,C=t.context,w=S?St(S)&&rc(S)?t.matches(ef(this.getStateNodeById(S).path,this.delimiter)):d2(ef(S,this.delimiter),toe(this.path.slice(0,-2))(t.value)):!0,x=!1;try{x=!v||Q8(this.machine,v,C,n,t)}catch(O){throw new Error("Unable to evaluate guard '".concat(v.name||v.type,"' in transition for event '").concat(l,"' in state node '").concat(this.id,`':
19
+ `).concat(O.message))}if(x&&w){g.target!==void 0&&(d=g.target),c.push.apply(c,Bt([],gt(g.actions),!1)),f=g;break}}}catch(O){r={error:O}}finally{try{m&&!m.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}if(f){if(!d.length)return{transitions:[f],exitSet:[],configuration:t.value?[this]:[],source:t,actions:c};var I=Jt(d.map(function(O){return a.getRelativeStateNodes(O,t.historyValue)})),T=!!f.internal;return{transitions:[f],exitSet:T?[]:Jt(d.map(function(O){return a.getPotentiallyReenteringNodes(O)})),configuration:I,source:t,actions:c}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var n=[],r=this,o=t;r&&r!==o;)n.push(r),r=r.parent;return r!==o?[]:(n.push(o),n)},e.prototype.getActions=function(t,n,r,o,a,l,c){var d,f,p,m,g=this,v=l?Hd([],this.getStateNodes(l.value)):[],S=new Set;try{for(var C=st(Array.from(t).sort(function(j,F){return j.order-F.order})),w=C.next();!w.done;w=C.next()){var x=w.value;(!qd(v,x)||qd(r.exitSet,x)||x.parent&&S.has(x.parent))&&S.add(x)}}catch(j){d={error:j}}finally{try{w&&!w.done&&(f=C.return)&&f.call(C)}finally{if(d)throw d.error}}try{for(var I=st(v),T=I.next();!T.done;T=I.next()){var x=T.value;(!qd(t,x)||qd(r.exitSet,x.parent))&&r.exitSet.push(x)}}catch(j){p={error:j}}finally{try{T&&!T.done&&(m=I.return)&&m.call(I)}finally{if(p)throw p.error}}r.exitSet.sort(function(j,F){return F.order-j.order});var O=Array.from(S).sort(function(j,F){return j.order-F.order}),D=new Set(r.exitSet),P=Jt(O.map(function(j){var F=[];if(j.type!=="final")return F;var q=j.parent;if(!q.parent)return F;F.push(Bd(j.id,j.doneData),Bd(q.id,j.doneData?og(j.doneData,o,a):void 0));var X=q.parent;return X.type==="parallel"&&Sf(X).every(function(Se){return Dm(r.configuration,Se)})&&F.push(Bd(X.id)),F})),M=O.map(function(j){var F=j.onEntry,q=j.activities.map(function(X){return sF(X)});return{type:"entry",actions:ba(c?Bt(Bt([],gt(F),!1),gt(q),!1):Bt(Bt([],gt(q),!1),gt(F),!1),g.machine.options.actions)}}).concat({type:"state_done",actions:P.map(function(j){return J8(j)})}),L=Array.from(D).map(function(j){return{type:"exit",actions:ba(Bt(Bt([],gt(j.onExit),!1),gt(j.activities.map(function(F){return iF(F)})),!1),g.machine.options.actions)}}),z=L.concat({type:"transition",actions:ba(r.actions,this.machine.options.actions)}).concat(M);if(n){var G=ba(Jt(Bt([],gt(t),!1).sort(function(j,F){return F.order-j.order}).map(function(j){return j.onExit})),this.machine.options.actions).filter(function(j){return!lx(j)});return z.concat({type:"stop",actions:G})}return z},e.prototype.transition=function(t,n,r,o){t===void 0&&(t=this.initialState);var a=Un(n),l;if(t instanceof fo)l=r===void 0?t:this.resolveState(fo.from(t,r));else{var c=St(t)?this.resolve(rg(this.getResolvedPath(t))):this.resolve(t),d=r??this.machine.context;l=this.resolveState(fo.from(c,d))}if(this.strict&&!this.events.includes(a.name)&&!roe(a.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var f=this._transition(l.value,l,a)||{transitions:[],configuration:[],exitSet:[],source:l,actions:[]},p=Hd([],this.getStateNodes(l.value)),m=f.configuration.length?Hd(p,f.configuration):p;return f.configuration=Bt([],gt(m),!1),this.resolveTransition(f,l,l.context,o,a)},e.prototype.resolveRaisedTransition=function(t,n,r,o){var a,l=t.actions;return t=this.transition(t,n,void 0,o),t._event=r,t.event=r.data,(a=t.actions).unshift.apply(a,Bt([],gt(l),!1)),t},e.prototype.resolveTransition=function(t,n,r,o,a){var l,c,d,f,p=this;a===void 0&&(a=Mi);var m=t.configuration,g=!n||t.transitions.length>0,v=g?t.configuration:n?n.configuration:[],S=Dm(v,this),C=g?boe(this.machine,m):void 0,w=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,x=this.getActions(new Set(v),S,t,r,a,n,o),I=n?ve({},n.activities):{};try{for(var T=st(x),O=T.next();!O.done;O=T.next()){var D=O.value;try{for(var P=(d=void 0,st(D.actions)),M=P.next();!M.done;M=P.next()){var L=M.value;L.type===ox?I[L.activity.id||L.activity.type]=L:L.type===l2&&(I[L.activity.id||L.activity.type]=!1)}}catch(ce){d={error:ce}}finally{try{M&&!M.done&&(f=P.return)&&f.call(P)}finally{if(d)throw d.error}}}}catch(ce){l={error:ce}}finally{try{O&&!O.done&&(c=T.return)&&c.call(T)}finally{if(l)throw l.error}}var z=gt(bf(this,n,r,a,x,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),G=z[0],j=z[1],F=gt(aoe(G,lx),2),q=F[0],X=F[1],Se=G.filter(function(ce){var be;return ce.type===ox&&((be=ce.activity)===null||be===void 0?void 0:be.type)===ax}),W=Se.reduce(function(ce,be){return ce[be.activity.id]=moe(be.activity,p.machine,j,a),ce},n?ve({},n.children):{}),ee=new fo({value:C||n.value,context:j,_event:a,_sessionid:n?n._sessionid:null,historyValue:C?w?soe(w,C):void 0:n?n.historyValue:void 0,history:!C||t.source?n:void 0,actions:C?X:[],activities:C?I:n?n.activities:{},events:[],configuration:v,transitions:t.transitions,children:W,done:S,tags:kk(v),machine:this}),me=r!==j;ee.changed=a.name===u2||me;var ge=ee.history;ge&&delete ge.history;var Te=!S&&(this._transient||m.some(function(ce){return ce._transient}));if(!g&&(!Te||a.name===Wp))return ee;var $=ee;if(!S)for(Te&&($=this.resolveRaisedTransition($,{type:Kre},a,o));q.length;){var te=q.shift();$=this.resolveRaisedTransition($,te._event,a,o)}var fe=$.changed||(ge?!!$.actions.length||me||typeof ge.value!=typeof $.value||!vF($.value,ge.value):void 0);return $.changed=fe,$.history=ge,$},e.prototype.getStateNode=function(t){if(rc(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=rc(t)?t.slice(dx.length):t;if(n===this.id)return this;var r=this.machine.idMap[n];if(!r)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return r},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&rc(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=ix(t,this.delimiter).slice(),r=this;n.length;){var o=n.shift();if(!o.length)break;r=r.getStateNode(o)}return r},e.prototype.resolve=function(t){var n,r=this;if(!t)return this.initialStateValue||nc;switch(this.type){case"parallel":return jd(this.initialStateValue,function(a,l){return a?r.getStateNode(l).resolve(t[l]||a):nc});case"compound":if(St(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(n={},n[t]=o.initialStateValue,n):t}return Object.keys(t).length?jd(t,function(a,l){return a?r.getStateNode(l).resolve(a):nc}):this.initialStateValue||{};default:return t||nc}},e.prototype.getResolvedPath=function(t){if(rc(t)){var n=this.machine.idMap[t.slice(dx.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return ix(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Mk(this.states,function(r){return r.initialStateValue||nc},function(r){return r.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=ig(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var r=this.getStateNodes(t);return this.resolveTransition({configuration:r,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;St(n.target)?t=rc(n.target)?rg(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,r){return r===void 0&&(r=!0),r?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(ig(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=km(this.initialStateValue);return Jt(n.map(function(r){return t.getFromRelativePath(r)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=gt(t),r=n[0],o=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(r,"' from node with no states"));var a=this.getStateNode(r);if(a.type==="history")return a.resolveHistory();if(!this.states[r])throw new Error("Child state '".concat(r,"' does not exist on '").concat(this.id,"'"));return this.states[r].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Mk(this.states,function(n,r){if(!t)return n.historyValue();var o=St(t)?void 0:t[r];return n.historyValue(o||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var r=this.parent;if(!t){var o=this.target;return o?Jt(km(o).map(function(l){return r.getFromRelativePath(l)})):r.initialStateNodes}var a=noe(r.path,"states")(t).current;return St(a)?[r.getStateNode(a)]:Jt(km(a).map(function(l){return n.history==="deep"?r.getFromRelativePath(l):[r.states[l[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=Jt(Object.keys(this.states).map(function(r){return t.states[r].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,r,o;if(this.__cache.events)return this.__cache.events;var a=this.states,l=new Set(this.ownEvents);if(a)try{for(var c=st(Object.keys(a)),d=c.next();!d.done;d=c.next()){var f=d.value,p=a[f];if(p.states)try{for(var m=(r=void 0,st(p.events)),g=m.next();!g.done;g=m.next()){var v=g.value;l.add("".concat(v))}}catch(S){r={error:S}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}}}catch(S){t={error:S}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(l)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(r){if(!St(r))return r;var o=r[0]===n.delimiter;if(o&&!n.parent)return n.getStateNodeByPath(r.slice(1));var a=o?n.key+r:r;if(n.parent)try{var l=n.parent.getStateNodeByPath(a);return l}catch(c){throw new Error("Invalid transition definition for state node '".concat(n.id,`':
20
+ `).concat(c.message))}else return n.getStateNodeByPath(a)})},e.prototype.formatTransition=function(t){var n=this,r=doe(t.target),o="internal"in t?t.internal:r?r.some(function(d){return St(d)&&d[0]===n.delimiter}):!0,a=this.machine.options.guards,l=this.resolveTarget(r),c=ve(ve({},t),{actions:ba(uo(t.actions)),cond:Y8(t.cond,a),target:l,source:this,internal:o,eventType:t.event,toJSON:function(){return ve(ve({},c),{target:c.target?c.target.map(function(d){return"#".concat(d.id)}):void 0,source:"#".concat(n.id)})}});return c},e.prototype.formatTransitions=function(){var t,n,r=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var a=this.config.on,l=tC,c=a[l],d=c===void 0?[]:c,f=i2(a,[typeof l=="symbol"?l:l+""]);o=Jt(Object.keys(f).map(function(I){var T=tc(I,f[I]);return T}).concat(tc(tC,d)))}var p=this.config.always?tc("",this.config.always):[],m=this.config.onDone?tc(String(Bd(this.id)),this.config.onDone):[],g=Jt(this.invoke.map(function(I){var T=[];return I.onDone&&T.push.apply(T,Bt([],gt(tc(String(nf(I.id)),I.onDone)),!1)),I.onError&&T.push.apply(T,Bt([],gt(tc(String(bc(I.id)),I.onError)),!1)),T})),v=this.after,S=Jt(Bt(Bt(Bt(Bt([],gt(m),!1),gt(g),!1),gt(o),!1),gt(p),!1).map(function(I){return uo(I).map(function(T){return r.formatTransition(T)})}));try{for(var C=st(v),w=C.next();!w.done;w=C.next()){var x=w.value;S.push(x)}}catch(I){t={error:I}}finally{try{w&&!w.done&&(n=C.return)&&n.call(C)}finally{if(t)throw t.error}}return S},e})();function fu(e,t){return new Poe(e,t)}var ha=cF,Iv=rF,koe=dF,Doe=_.useLayoutEffect;function Lk(e){var t=_.useRef();return t.current||(t.current={v:e()}),t.current.v}var lg=function(){return lg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},lg.apply(this,arguments)},Loe=function(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},Uoe=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,a=[],l;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(c){l={error:c}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(l)throw l.error}}return a};function Foe(e,t){var n=Lk(function(){return typeof e=="function"?e():e}),r=t.context,o=t.guards,a=t.actions,l=t.activities,c=t.services,d=t.delays;t.state;var f=Loe(t,["context","guards","actions","activities","services","delays","state"]),p=Lk(function(){var m={context:r,guards:o,actions:a,activities:l,services:c,delays:d},g=n.withConfig(m,function(){return lg(lg({},n.context),r)});return yF(g,f)});return Doe(function(){Object.assign(p.machine.options.actions,a),Object.assign(p.machine.options.guards,o),Object.assign(p.machine.options.activities,l),Object.assign(p.machine.options.services,c),Object.assign(p.machine.options.delays,d)},[a,o,l,c,d]),p}function zoe(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Uoe(t,2),o=r[0],a=o===void 0?{}:o,l=r[1],c=Foe(e,a);return _.useEffect(function(){if(l){var d=c.subscribe(tf(l));return function(){d.unsubscribe()}}},[l]),_.useEffect(function(){var d=a.state;return c.start(d?fo.create(d):void 0),function(){c.stop(),c.status=vn.NotStarted}},[]),c}function $oe(e){return e.status!==0?e.getSnapshot():e.machine.initialState}function joe(e){return"state"in e&&"machine"in e}function Boe(e){return"state"in e}var Hoe=function(e,t){return e===t},qoe=function(e,t){if(joe(e)){if(e.status===0&&t.current)return t.current;var n=$oe(e);return t.current=e.status===0?n:null,n}return Boe(e)?e.state:void 0};function Voe(e,t,n,r){n===void 0&&(n=Hoe);var o=_.useRef(null),a=_.useCallback(function(d){var f=e.subscribe(d).unsubscribe;return f},[e]),l=_.useCallback(function(){return qoe(e,o)},[e,r]),c=H8.useSyncExternalStoreWithSelector(a,l,l,t,n);return c}const Woe=e=>{if(e instanceof eo)return e;if(e instanceof Error){if(e.name==="InvalidStateError"){const{message:t,recoverySuggestion:n}=zc[Mt.PasskeyAlreadyExists];return new eo({name:Mt.PasskeyAlreadyExists,message:t,recoverySuggestion:n,underlyingError:e})}if(e.name==="NotAllowedError"){const{message:t,recoverySuggestion:n}=zc[Mt.PasskeyRegistrationCanceled];return new eo({name:Mt.PasskeyRegistrationCanceled,message:t,recoverySuggestion:n,underlyingError:e})}}return k6(e)},Goe=async e=>{try{const t=D6();nu(t,Mt.PasskeyNotSupported);const n=WG(e),r=await navigator.credentials.create({publicKey:n});return QG(r),GG(r)}catch(t){throw Woe(t)}},Koe=e=>pn(An,In("StartWebAuthnRegistration"),jn(),{...Tn,...e}),Zoe=e=>pn(An,In("CompleteWebAuthnRegistration"),jn(),{...Tn,...e});async function Yoe(){const e=Pt.getConfig().Auth?.Cognito;nt(e);const{userPoolEndpoint:t,userPoolId:n}=e,{tokens:r}=await Qg();tu(r);const o=Koe({endpointResolver:ft({endpointOverride:t})}),{CredentialCreationOptions:a}=await o({region:dt(n),userAgentValue:xt(We.StartWebAuthnRegistration)},{AccessToken:r.accessToken.toString()});YG(a);const l=await Goe(a);await Zoe({endpointResolver:ft({endpointOverride:t})})({region:dt(n),userAgentValue:xt(We.CompleteWebAuthnRegistration)},{AccessToken:r.accessToken.toString(),Credential:l})}const Qoe=e=>pn(An,In("ListWebAuthnCredentials"),jn(),{...Tn,...e});async function Xoe(e,t){const n=e.getConfig().Auth?.Cognito;nt(n);const{userPoolEndpoint:r,userPoolId:o}=n,{tokens:a}=await e.Auth.fetchAuthSession();tu(a);const l=Qoe({endpointResolver:ft({endpointOverride:r})}),{Credentials:c=[],NextToken:d}=await l({region:dt(o),userAgentValue:xt(We.ListWebAuthnCredentials)},{AccessToken:a.accessToken.toString(),MaxResults:t?.pageSize,NextToken:t?.nextToken});return{credentials:c.map(p=>({credentialId:p.CredentialId,friendlyCredentialName:p.FriendlyCredentialName,relyingPartyId:p.RelyingPartyId,authenticatorAttachment:p.AuthenticatorAttachment,authenticatorTransports:p.AuthenticatorTransports,createdAt:p.CreatedAt?new Date(p.CreatedAt*1e3):void 0})),nextToken:d}}async function p2(e){return Xoe(Pt,e)}const m2=e=>e.context.actorRef?.getSnapshot(),Cf=e=>m2(e)?.context,Joe={category:to.AI,apis:[ga.CreateConversation,ga.DeleteConversation,ga.ListConversations,ga.UpdateConversation,ga.OnMessage,ga.SendMessage,ga.Generation]},eae={apis:[We.DeleteUser,We.UpdatePassword],category:to.Auth},tae={apis:[We.SignUp,We.ConfirmSignUp,We.ResendSignUpCode,We.SignIn,We.ConfirmSignIn,We.FetchUserAttributes,We.SignOut,We.ResetPassword,We.ConfirmResetPassword,We.SignInWithRedirect],category:to.Auth},nae={apis:[ho.UploadData],category:to.Storage},rae={apis:[Pw.NotifyMessageInteraction],category:to.InAppMessaging},oae={category:to.Geo,apis:[Qd.SearchByText,Qd.SearchForSuggestions,Qd.SearchByPlaceId]},aae={category:to.Geo,apis:[]},sae={apis:[ho.UploadData],category:to.Storage},iae={apis:[ho.UploadData,ho.Copy,ho.GetUrl,ho.List,ho.Remove,ho.GetDataAccess,ho.ListCallerAccessGrants],category:to.Storage};function Nr(e){return e!=null&&!Array.isArray(e)&&typeof e=="object"}function Aa(e){return typeof e=="string"||typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"}function lae(e){return Nr(e)&&Object.prototype.toString.call(e)==="[object Map]"}function cae(e){return Nr(e)&&Object.prototype.toString.call(e)==="[object Set]"}function g2(e){if(e==null)return!0;if(Nr(e)&&(lae(e)||cae(e)))return!e.size;if(Nr(e)&&(Aa(e)||Array.isArray(e)))return!e.length;for(const t in e)if(Ta(e,t))return!1;return!0}function uae(e){return Array.isArray(e)&&g2(e)}function dae(...e){return e.every(uae)}function bF(e){return Nr(e)&&g2(e)}function fae(...e){return e.every(bF)}function Ta(e,t){return e!=null&&Object.prototype.hasOwnProperty.call(e,t)}function Ra(e){return typeof e=="function"}const Nt=(e,t)=>t?`${e}--${t}`:"",ur=(e,t,n)=>n?`${e}--${t}`:"";function hae(...e){}function pae(e,t){const n={},r={};return Object.entries(e).forEach(([o,a])=>{t(o)?n[o]=a:r[o]=a}),[n,r]}const SF=({payload:e},t,n)=>{const{data:r,event:o}=e,{send:a}=t,{onSignIn:l,onSignOut:c}=n??{};switch(o){case"signedIn":{Ra(l)&&l(e);break}case"signInWithRedirect":{a("SIGN_IN_WITH_REDIRECT");break}case"signedOut":{Ra(c)&&c(),a("SIGN_OUT");break}case"tokenRefresh_failure":{if(r?.error?.name===Ns.NetworkError)return;a("SIGN_OUT");break}}},mae=(e,t=SF)=>{const n=r=>t(r,e);return Lo.listen("auth",n,"authenticator-hub-handler")},CF=["+1","+7","+20","+27","+30","+31","+32","+33","+34","+36","+39","+40","+41","+43","+44","+45","+46","+47","+48","+49","+51","+52","+53","+54","+55","+56","+57","+58","+60","+61","+62","+63","+64","+65","+66","+81","+82","+84","+86","+90","+91","+92","+93","+94","+95","+98","+212","+213","+216","+218","+220","+221","+222","+223","+224","+225","+226","+227","+228","+229","+230","+231","+232","+233","+234","+235","+236","+237","+238","+239","+240","+241","+242","+243","+244","+245","+246","+248","+249","+250","+251","+252","+253","+254","+255","+256","+257","+258","+260","+261","+262","+263","+264","+265","+266","+267","+268","+269","+290","+291","+297","+298","+299","+345","+350","+351","+352","+353","+354","+355","+356","+357","+358","+359","+370","+371","+372","+373","+374","+375","+376","+377","+378","+379","+380","+381","+382","+385","+386","+387","+389","+420","+421","+423","+500","+501","+502","+503","+504","+505","+506","+507","+508","+509","+537","+590","+591","+593","+594","+595","+596","+597","+598","+599","+670","+672","+673","+674","+675","+676","+677","+678","+679","+680","+681","+682","+683","+685","+686","+687","+688","+689","+690","+691","+692","+850","+852","+853","+855","+856","+872","+880","+886","+960","+961","+962","+963","+964","+965","+966","+967","+968","+970","+971","+972","+973","+974","+975","+976","+977","+992","+993","+994","+995","+996","+998"],Av={birthdate:{label:"Birthdate",placeholder:"Enter your Birthdate",type:"date",autocomplete:"bday",isRequired:!0},confirmation_code:{label:"Confirmation Code",placeholder:"Enter your Confirmation Code",type:"text",autocomplete:"one-time-code",isRequired:!0},confirm_password:{label:"Confirm Password",placeholder:"Please confirm your Password",type:"password",autocomplete:"new-password",isRequired:!0},email:{label:"Email",placeholder:"Enter your Email",type:"email",autocomplete:"username",isRequired:!0},family_name:{label:"Family Name",placeholder:"Enter your Family Name",type:"text",autocomplete:"family-name",isRequired:!0},given_name:{label:"Given Name",placeholder:"Enter your Given Name",type:"text",autocomplete:"given-name",isRequired:!0},middle_name:{label:"Middle Name",placeholder:"Enter your Middle Name",type:"text",autocomplete:"additional-name",isRequired:!0},name:{label:"Name",placeholder:"Enter your Name",type:"text",autocomplete:"name",isRequired:!0},nickname:{label:"Nickname",placeholder:"Enter your Nickname",type:"text",autocomplete:"tel",isRequired:!0},password:{label:"Password",placeholder:"Enter your Password",type:"password",autocomplete:"new-password",isRequired:!0},phone_number:{label:"Phone Number",placeholder:"Enter your Phone Number",type:"tel",autocomplete:"tel",dialCode:"+1",dialCodeList:CF,isRequired:!0},preferred_username:{label:"Preferred Username",placeholder:"Enter your Preferred Username",type:"text",isRequired:!0},profile:{label:"Profile",placeholder:"Add your Profile",type:"url",autocomplete:"url",isRequired:!0},website:{label:"Website",placeholder:"Add your Website",type:"url",autocomplete:"url",isRequired:!0},username:{label:"Username",placeholder:"Enter your Username",type:"text",autocomplete:"username",isRequired:!0}},gae=["^","$","*",".","[","]","{","}","(",")","?",'"',"!","@","#","%","&","/","\\",",",">","<","'",":",";","|","_","~","`","=","+","-"," "],vae=(e,t)=>{if(t?.matches("federatedSignIn")){if(e.matches("signUpActor"))return"signUp";if(e.matches("signInActor"))return"signIn"}switch(!0){case e.matches("idle"):return"idle";case e.matches("setup"):return"setup";case e.matches("signOut"):return"signOut";case e.matches("authenticated"):return"authenticated";case t?.matches("confirmSignUp"):case t?.matches("resendSignUpCode"):return"confirmSignUp";case t?.matches("confirmSignIn"):return"confirmSignIn";case t?.matches("setupTotp.edit"):case t?.matches("setupTotp.submit"):return"setupTotp";case t?.matches("signIn.submit"):return t?.context.selectedAuthMethod!=null?"signInSelectAuthFactor":"signIn";case t?.matches("signIn.selectMethod"):return"signInSelectAuthFactor";case t?.matches("passkeyPrompt"):return"passkeyPrompt";case t?.matches("signIn"):return"signIn";case t?.matches("signUp"):case t?.matches("autoSignIn"):return"signUp";case t?.matches("forceChangePassword"):return"forceNewPassword";case t?.matches("forgotPassword"):return"forgotPassword";case t?.matches("confirmResetPassword"):return"confirmResetPassword";case t?.matches("selectUserAttributes"):return"verifyUser";case t?.matches("confirmVerifyUserAttribute"):return"confirmVerifyUser";case t?.matches("setupEmail"):return"setupEmail";case t?.matches("selectMfaType"):return"selectMfaType";case e.matches("getCurrentUser"):case t?.matches("fetchUserAttributes"):return"transition";default:return null}},yae=e=>{const t=n=>r=>e({type:n,data:r});return{initializeMachine:t("INIT"),resendCode:t("RESEND"),selectAuthMethod:t("SELECT_METHOD"),signOut:t("SIGN_OUT"),submitForm:t("SUBMIT"),toShowAuthMethods:t("SHOW_AUTH_METHODS"),updateForm:t("CHANGE"),updateBlur:t("BLUR"),toFederatedSignIn:t("FEDERATED_SIGN_IN"),toForgotPassword:t("FORGOT_PASSWORD"),toSignIn:t("SIGN_IN"),toSignUp:t("SIGN_UP"),skipVerification:t("SKIP")}},bae=e=>{const t=Cf(e)??{},{allowedMfaTypes:n,availableAuthMethods:r,challengeName:o,codeDeliveryDetails:a,preferredChallenge:l,remoteError:c,selectedAuthMethod:d,validationError:f,totpSecretCode:p=null,unverifiedUserAttributes:m,username:g}=t,{socialProviders:v=[],loginMechanisms:S}=e.context?.config??{},C=S?.[0],w=t?.user??e.context?.user,x=!!(f&&Object.keys(f).length>0),I=m2(e),T=e.hasTag("pending")||I?.hasTag("pending"),O=vae(e,I),D=(M=>{switch(M){case"idle":case"setup":return"configuring";case"authenticated":return"authenticated";default:return"unauthenticated"}})(O);return{allowedMfaTypes:n,authStatus:D,availableAuthMethods:r,challengeName:o,codeDeliveryDetails:a,error:c,hasValidationErrors:x,isPending:T,loginMechanism:C,preferredChallenge:l,route:O,selectedAuthMethod:d,socialProviders:v,totpSecretCode:p,unverifiedUserAttributes:m,user:w,username:g,validationErrors:f}},Sae=({send:e,state:t})=>{const n=yae(e),r=bae(t);return{...n,...r}};var Sc;(function(e){e.Apple="Apple",e.Amazon="Amazon",e.Facebook="Facebook",e.Google="Google"})(Sc||(Sc={}));var Uk;(function(e){e.Email="email",e.PhoneNumber="phone_number"})(Uk||(Uk={}));const Cae=["birthdate","email","family_name","given_name","middle_name","name","nickname","phone_number","preferred_username","profile","website"],Eae=["username","email","phone_number"],EF=[...Eae,...Cae,"confirmation_code","password","confirm_password"],wae=e=>EF.includes(e),wF=e=>EF.includes(e),xae=e=>Array.isArray(e),_ae=e=>e?xae(e)?e:[e]:null,Iae=e=>{const t=e.trim().split("");for(let n=0;n<t.length;n++)n>0&&n<t.length-1&&(t[n]="*");return t.join("")},Aae=e=>{if(e.length<4)return e;const t=e.split("");for(let n=0;n<t.length-4;n++)t[n]="*";return t.join("")},Tae=e=>{const t=e.split("@");return`${Iae(t[0])}@${t[1]}`},Rae=(e,t)=>e==="Phone Number"?Aae(t):Tae(t),Oae=e=>gae.some(t=>e.includes(t)),Mae=(e,t,n)=>encodeURI(`otpauth://totp/${e}:${t}?secret=${n}&issuer=${e}`);function Nae(e,...t){return Object.entries(e).reduce((n,[r,o])=>({...n,[r]:t.includes(r)?o:o?.trim()}),{})}const Pae={ADD_PROFILE:"Add your Profile",ADD_WEBSITE:"Add your Website",BACK_SIGN_IN:"Back to Sign In",BIRTHDATE:"Birthdate",CHANGE_PASSWORD:"Change Password",CHANGING_PASSWORD:"Changing",CODE:"Code",CODE_ARRIVAL:"It may take a minute to arrive",CODE_EMAILED:"Your code is on the way. To log in, enter the code we emailed to",CODE_SENT:"Your code is on the way. To log in, enter the code we sent you",CODE_TEXTED:"Your code is on the way. To log in, enter the code we texted to",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Please confirm your Password",CONFIRM_RESET_PASSWORD_HEADING:"Reset your Password",CONFIRM_SIGNUP_HEADING:"Confirm Sign Up",CONFIRM_SMS:"Confirm SMS Code",CONFIRM_EMAIL:"Confirm Email Code",CONFIRM_MFA_DEFAULT:"Confirm MFA Code",CONFIRM_TOTP:"Confirm TOTP Code",CONFIRM:"Confirm",CONFIRMATION_CODE:"Confirmation Code",CONFIRMING:"Confirming",CONTINUE:"Continue",CONTINUE_WITHOUT_PASSKEY:"Continue without a Passkey",CREATE_ACCOUNT:"Create Account",CREATE_ACCOUNT_WITH_EMAIL_OTP:"Create account with Email OTP",CREATE_ACCOUNT_WITH_PASSWORD:"Create account with Password",CREATE_ACCOUNT_WITH_SMS_OTP:"Create account with SMS OTP",CREATE_PASSKEY:"Create a Passkey",CREATING_ACCOUNT:"Creating Account",EMAIL_ADDRESS:"Email",EMAIL_OTP:"Email Message",ENTER_BIRTHDATE:"Enter your Birthdate",ENTER_CODE:"Enter your code",ENTER_CONFIRMATION_CODE:"Enter your Confirmation Code",ENTER_EMAIL:"Enter your Email",ENTER_FAMILY_NAME:"Enter your Family Name",ENTER_GIVEN_NAME:"Enter your Given Name",ENTER_MIDDLE_NAME:"Enter your Middle Name",ENTER_NAME:"Enter your Name",ENTER_NICK_NAME:"Enter your Nickname",ENTER_PASSWORD:"Enter your Password",ENTER_PHONE_NUMBER:"Enter your Phone Number",ENTER_PREFERRED_USERNAME:"Enter your Preferred Username",ENTER_USERNAME:"Enter your username",ENTER_USERNAME_FIRST:"Please enter your username first",EXISTING_PASSKEYS:"Existing Passkeys",FAMILY_NAME:"Family Name",GIVEN_NAME:"Given Name",FORGOT_PASSWORD:"Forgot Password?",FORGOT_YOUR_PASSWORD:"Forgot your password?",HIDE_PASSWORD:"Hide password",LOADING:"Loading",LOGIN_NAME:"Username",MIDDLE_NAME:"Middle Name",MFA_SETUP_SELECTION:"Multi-Factor Authentication Setup",MFA_SELECTION:"Multi-Factor Authentication",NAME:"Name",NICKNAME:"Nickname",NEW_PASSWORD:"New password",OR:"or",OTHER_SIGN_IN_OPTIONS:"Other sign-in options",PASSKEY_AUTHENTICATION_CANCELED:"Passkey authentication was canceled. Please try again or use a different sign-in method.",PASSKEY_CREATED_SUCCESS:"Passkey created successfully!",PASSKEY_LABEL:"Passkey",PASSKEY_PROMPT_DESCRIPTION:"Passkeys are WebAuthn credentials that validate your identity using biometric data like touch or facial recognition or device authentication like passwords or PINs, serving as a secure password replacement.",PASSKEY_PROMPT_HEADING:"Sign in faster with Passkey",PASSKEY_REGISTERED:"Your passkey has been successfully registered.",PASSKEY_REGISTRATION_FAILED:"Failed to create passkey. Please try again.",PASSWORD:"Password",PASSWORDLESS_NOT_ENABLED:"Passwordless authentication is not enabled for this account. Please contact your administrator or use password sign-in.",PHONE_NUMBER:"Phone Number",PREFERRED_USERNAME:"Preferred Username",PROFILE:"Profile",REGISTERING:"Registering",RESEND_CODE:"Resend Code",RESET_PASSWORD_HEADING:"Reset your password",RESET_PASSWORD:"Reset Password",SEND_CODE:"Send code",CODE_DELIVERY_FAILED:"Unable to send verification code. Please try again.",VERIFICATION_CODE_EXPIRED:"Your verification code has expired. Please request a new code.",VERIFICATION_CODE_INVALID:"The verification code you entered is incorrect. Please try again.",SENDING:"Sending",SELECT_MFA_TYPE:"Select MFA Type",SETUP_ANOTHER_PASSKEY:"Setup another Passkey",SETUP_EMAIL:"Setup Email",SETUP_TOTP:"Setup TOTP",SHOW_PASSWORD:"Show password",SIGN_IN_BUTTON:"Sign in",SIGN_IN_TAB:"Sign In",SIGN_IN_WITH_AMAZON:"Sign In with Amazon",SIGN_IN_WITH_APPLE:"Sign In with Apple",SIGN_IN_WITH_EMAIL:"Sign In with Email",SIGN_IN_WITH_FACEBOOK:"Sign In with Facebook",SIGN_IN_WITH_GOOGLE:"Sign In with Google",SIGN_IN_WITH_PASSKEY:"Sign In with Passkey",SIGN_IN_WITH_PASSWORD:"Sign In with Password",SIGN_IN_WITH_SMS:"Sign In with SMS",SIGN_IN:"Sign in to your account",SIGN_UP_BUTTON:"Create a new account",SIGNING_IN_BUTTON:"Signing in",SKIP:"Skip",SMS_MFA:"Text Message (SMS)",SUBMIT:"Submit",SUBMITTING:"Submitting",SOFTWARE_TOKEN_MFA:"Authenticator App (TOTP)",UPPERCASE_COPY:"COPY",USERNAME:"Username",VERIFY_CONTACT:"Verify Contact",VERIFY_HEADING:"Account recovery requires verified contact information",VERIFY:"Verify",WE_EMAILED:"We Emailed You",WE_SENT_CODE:"We Sent A Code",WE_TEXTED:"We Texted You",WEBSITE:"Website"},Lm={...Pae},Ee={...Lm};function ye(e){return w6.get(e)}const v2=e=>{const t=e?.context.config?.loginMechanisms,[n]=t??["username"];return n},kae=e=>{const t={...e};for(const[n,r]of Object.entries(e)){const{label:o,placeholder:a}=r;t[n]={...r,label:o?ye(o):void 0,placeholder:a?ye(a):void 0}}return t},Dae=e=>Object.entries(e).sort((t,n)=>{const r=t[1].order||Number.MAX_VALUE,o=n[1].order||Number.MAX_VALUE;return r-o}).filter(t=>t[1]!==void 0),Lae="+1",Oa=e=>{let t=Av[e];const{type:n}=t;return n==="tel"&&(t={...t,dialCode:Lae}),t},Tv=e=>{const t=v2(e);return{...Oa(t),autocomplete:"username"}},Um=e=>({confirmation_code:{...Oa("confirmation_code"),label:"Code *",placeholder:"Code"}}),Uae=e=>{const t=e.context.actorRef?.getSnapshot()?.context,n=t?.availableAuthMethods,r=t?.preferredChallenge,o=!n?.length||n.length===1&&n[0]==="PASSWORD"||n.length>1&&(!r||r==="PASSWORD"),a={username:{...Tv(e)}};return o&&(a.password={...Oa("password"),autocomplete:"current-password"}),a},Fae=e=>{const{loginMechanisms:t,signUpAttributes:n}=e.context.config,r=v2(e),a=e.context.actorRef?.getSnapshot()?.context?.availableAuthMethods,l=a&&a.length>1,c=Array.from(new Set([...t,"password","confirm_password",...n])),d={};for(const f of c)if(wF(f)){const p=f===r?Tv(e):Oa(f),m=l&&(f==="email"||f==="phone_number"||f==="password"||f==="confirm_password");d[f]={...p,...m&&{isRequired:!1}}}else console.debug(`Authenticator does not have a default implementation for ${f}. Customize SignUp FormFields to add your own.`);return d},zae=e=>({confirmation_code:{...Oa("confirmation_code"),placeholder:"Enter your code"}}),$ae=e=>{const t=v2(e),{label:n}=Av[t];return{username:{...Tv(e),label:`Enter your ${n.toLowerCase()}`,placeholder:`Enter your ${n.toLowerCase()}`}}},jae=e=>({...Um(),password:{...Oa("password"),label:"New Password",placeholder:"New Password"},confirm_password:{...Oa("confirm_password"),label:"Confirm Password",placeholder:"Confirm Password"}}),Bae=e=>{const t=m2(e),{missingAttributes:n}=t.context,r=Array.from(new Set(["password","confirm_password",...n??[]])),o={};for(const a of r)wF(a)?o[a]={...Oa(a)}:console.debug(`Authenticator does not have a default implementation for ${a}. Customize ForceNewPassword FormFields to add your own.`);return o},Hae=e=>({email:Oa("email")}),qae={signIn:Uae,signUp:Fae,confirmSignUp:zae,confirmSignIn:Um,forceNewPassword:Bae,forgotPassword:$ae,confirmResetPassword:jae,confirmVerifyUser:Um,setupEmail:Hae,setupTotp:Um},Vae=(e,t)=>{const n=qae[e];return n(t)},Wae=(e,t)=>{const n=Cf(t)?.formFields?.[e];return!n||Object.keys(n).length===0?{}:Object.entries(n).reduce((r,[o,a])=>{if((e==="signIn"||e==="forgotPassword")&&o==="username"){const c={...Tv(t),...a};return{...r,[o]:c}}else if(wae(o)){const c={...Av[o],...a};return{...r,[o]:c}}else return{...r,[o]:a}},{})},Gae=(e,t)=>{const n=Vae(e,t),r=Wae(e,t),o={...n,...r};return delete o.QR,kae(o)},Kae=e=>e.map(t=>{const n=t[0],r={...t[1],order:void 0};return[n,r]}),Zae=(e,t)=>{const n=Gae(e,t);return Kae(Dae(n))},Yae=e=>{switch(e){case"EMAIL_OTP":return ye(Ee.CONFIRM_EMAIL);case"SMS_MFA":return ye(Ee.CONFIRM_SMS);case"SOFTWARE_TOKEN_MFA":return ye(Ee.CONFIRM_TOTP);default:return ye(Ee.CONFIRM_MFA_DEFAULT)}},Qae=e=>{const{DeliveryMedium:t,Destination:n}=e??{},r=t==="EMAIL",o=t==="SMS",a=ye(Ee.CODE_ARRIVAL);return r||o?`${ye(r?Ee.CODE_EMAILED:Ee.CODE_TEXTED)} ${n}. ${a}.`:`${ye(Ee.CODE_SENT)}. ${a}.`},Xae=e=>{const{DeliveryMedium:t}=e??{},n=t==="EMAIL";return ye(!n&&t==="SMS"?Ee.WE_SENT_CODE:n?Ee.WE_EMAILED:Ee.WE_TEXTED)},Jae={amazon:"Amazon",apple:"Apple",facebook:"Facebook",google:"Google"},ese=(e,t)=>ye(`Sign ${e==="signIn"?"In":"Up"} with ${Jae[t]}`),tse=e=>ye(e==="MFA_SETUP"?Ee.MFA_SETUP_SELECTION:Ee.MFA_SELECTION),nse=e=>{switch(e){case"email":return ye(Ee.EMAIL_ADDRESS);case"phone_number":return ye(Ee.PHONE_NUMBER);default:return ye(Ee.USERNAME)}},rse=e=>{switch(e){case"EMAIL":return ye(Lm.EMAIL_OTP);case"SMS":return ye(Lm.SMS_MFA);case"TOTP":return ye(Lm.SOFTWARE_TOKEN_MFA);default:return ye(e)}},Sn={getBackToSignInText:()=>ye(Ee.BACK_SIGN_IN),getChangePasswordText:()=>ye(Ee.CHANGE_PASSWORD),getChangingText:()=>ye(Ee.CHANGING_PASSWORD),getConfirmText:()=>ye(Ee.CONFIRM),getConfirmingText:()=>ye(Ee.CONFIRMING),getContinueText:()=>ye(Ee.CONTINUE),getCopyText:()=>ye(Ee.UPPERCASE_COPY),getHidePasswordText:()=>ye(Ee.HIDE_PASSWORD),getLoadingText:()=>ye(Ee.LOADING),getOrText:()=>ye(Ee.OR),getResendCodeText:()=>ye(Ee.RESEND_CODE),getSendCodeText:()=>ye(Ee.SEND_CODE),getSendingText:()=>ye(Ee.SENDING),getShowPasswordText:()=>ye(Ee.SHOW_PASSWORD),getSubmitText:()=>ye(Ee.SUBMIT),getSubmittingText:()=>ye(Ee.SUBMITTING),getSignInTabText:()=>ye(Ee.SIGN_IN_TAB),getSignUpTabText:()=>ye(Ee.CREATE_ACCOUNT),getForgotPasswordText:e=>ye(e?Ee.FORGOT_PASSWORD:Ee.FORGOT_YOUR_PASSWORD),getSigningInText:()=>ye(Ee.SIGNING_IN_BUTTON),getSignInText:()=>ye(Ee.SIGN_IN_BUTTON),getCreatingAccountText:()=>ye(Ee.CREATING_ACCOUNT),getCreateAccountText:()=>ye(Ee.CREATE_ACCOUNT),getCreateAccountWithEmailText:()=>ye(Ee.CREATE_ACCOUNT_WITH_EMAIL_OTP),getCreateAccountWithPasswordText:()=>ye(Ee.CREATE_ACCOUNT_WITH_PASSWORD),getCreateAccountWithSmsText:()=>ye(Ee.CREATE_ACCOUNT_WITH_SMS_OTP),getDeliveryMessageText:Qae,getDeliveryMethodText:Xae,getChallengeText:Yae,getResetYourPasswordText:()=>ye(Ee.RESET_PASSWORD),getSetupEmailText:()=>ye(Ee.SETUP_EMAIL),getSetupTotpText:()=>ye(Ee.SETUP_TOTP),getSetupTotpInstructionsText:()=>ye("Copy and paste the secret key below into an authenticator app and then enter the code in the text field below."),getCopiedText:()=>ye("COPIED"),getSignInWithFederationText:ese,getMfaTypeLabelByValue:rse,getSelectMfaTypeByChallengeName:tse,getSelectMfaTypeText:()=>ye(Ee.SELECT_MFA_TYPE),getSkipText:()=>ye(Ee.SKIP),getVerifyText:()=>ye(Ee.VERIFY),getVerifyContactText:()=>ye(Ee.VERIFY_CONTACT),getAccountRecoveryInfoText:()=>ye(Ee.VERIFY_HEADING),getPasskeyPromptHeadingText:()=>ye(Ee.PASSKEY_PROMPT_HEADING),getPasskeyPromptDescriptionText:()=>ye(Ee.PASSKEY_PROMPT_DESCRIPTION),getCreatePasskeyText:()=>ye(Ee.CREATE_PASSKEY),getRegisteringText:()=>ye(Ee.REGISTERING),getContinueWithoutPasskeyText:()=>ye(Ee.CONTINUE_WITHOUT_PASSKEY),getPasskeyCreatedSuccessText:()=>ye(Ee.PASSKEY_CREATED_SUCCESS),getPasskeyRegisteredText:()=>ye(Ee.PASSKEY_REGISTERED),getPasskeyRegistrationFailedText:()=>ye(Ee.PASSKEY_REGISTRATION_FAILED),getPasskeyLabelText:()=>ye(Ee.PASSKEY_LABEL),getExistingPasskeysText:()=>ye(Ee.EXISTING_PASSKEYS),getSetupAnotherPasskeyText:()=>ye(Ee.SETUP_ANOTHER_PASSKEY),getSignInWithPasswordText:()=>ye(Ee.SIGN_IN_WITH_PASSWORD),getSignInWithEmailText:()=>ye(Ee.SIGN_IN_WITH_EMAIL),getSignInWithSmsText:()=>ye(Ee.SIGN_IN_WITH_SMS),getSignInWithPasskeyText:()=>ye(Ee.SIGN_IN_WITH_PASSKEY),getOtherSignInOptionsText:()=>ye(Ee.OTHER_SIGN_IN_OPTIONS),getEnterUsernameFirstText:()=>ye(Ee.ENTER_USERNAME_FIRST),getUsernameLabelByLoginMechanism:nse,getInvalidEmailText:()=>ye("Please enter a valid email"),getRequiredFieldText:()=>ye("This field is required")};var nC,Fk;function xF(){if(Fk)return nC;Fk=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,a=Array(o);++r<o;)a[r]=n(t[r],r,t);return a}return nC=e,nC}var rC,zk;function ose(){if(zk)return rC;zk=1;var e=t2(),t=B8(),n=1,r=2;function o(a,l,c,d){var f=c.length,p=f,m=!d;if(a==null)return!p;for(a=Object(a);f--;){var g=c[f];if(m&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++f<p;){g=c[f];var v=g[0],S=a[v],C=g[1];if(m&&g[2]){if(S===void 0&&!(v in a))return!1}else{var w=new e;if(d)var x=d(S,C,v,a,l,w);if(!(x===void 0?t(C,S,n|r,d,w):x))return!1}}return!0}return rC=o,rC}var oC,$k;function _F(){if($k)return oC;$k=1;var e=Da();function t(n){return n===n&&!e(n)}return oC=t,oC}var aC,jk;function ase(){if(jk)return aC;jk=1;var e=_F(),t=j8();function n(r){for(var o=t(r),a=o.length;a--;){var l=o[a],c=r[l];o[a]=[l,c,e(c)]}return o}return aC=n,aC}var sC,Bk;function IF(){if(Bk)return sC;Bk=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return sC=e,sC}var iC,Hk;function sse(){if(Hk)return iC;Hk=1;var e=ose(),t=ase(),n=IF();function r(o){var a=t(o);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(l){return l===o||e(l,o,a)}}return iC=r,iC}var lC,qk;function y2(){if(qk)return lC;qk=1;var e=uu(),t=sl(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return lC=r,lC}var cC,Vk;function b2(){if(Vk)return cC;Vk=1;var e=La(),t=y2(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(a,l){if(e(a))return!1;var c=typeof a;return c=="number"||c=="symbol"||c=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||l!=null&&a in Object(l)}return cC=o,cC}var uC,Wk;function ise(){if(Wk)return uC;Wk=1;var e=e2(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var a=function(){var l=arguments,c=o?o.apply(this,l):l[0],d=a.cache;if(d.has(c))return d.get(c);var f=r.apply(this,l);return a.cache=d.set(c,f)||d,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,uC=n,uC}var dC,Gk;function lse(){if(Gk)return dC;Gk=1;var e=ise(),t=500;function n(r){var o=e(r,function(l){return a.size===t&&a.clear(),l}),a=o.cache;return o}return dC=n,dC}var fC,Kk;function cse(){if(Kk)return fC;Kk=1;var e=lse(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(t,function(l,c,d,f){a.push(d?f.replace(n,"$1"):c||l)}),a});return fC=r,fC}var hC,Zk;function use(){if(Zk)return hC;Zk=1;var e=vv(),t=xF(),n=La(),r=y2(),o=e?e.prototype:void 0,a=o?o.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(r(c))return a?a.call(c):"";var d=c+"";return d=="0"&&1/c==-1/0?"-0":d}return hC=l,hC}var pC,Yk;function S2(){if(Yk)return pC;Yk=1;var e=use();function t(n){return n==null?"":e(n)}return pC=t,pC}var mC,Qk;function Rv(){if(Qk)return mC;Qk=1;var e=La(),t=b2(),n=cse(),r=S2();function o(a,l){return e(a)?a:t(a,l)?[a]:n(r(a))}return mC=o,mC}var gC,Xk;function Xf(){if(Xk)return gC;Xk=1;var e=y2();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return gC=t,gC}var vC,Jk;function C2(){if(Jk)return vC;Jk=1;var e=Rv(),t=Xf();function n(r,o){o=e(o,r);for(var a=0,l=o.length;r!=null&&a<l;)r=r[t(o[a++])];return a&&a==l?r:void 0}return vC=n,vC}var yC,e3;function dse(){if(e3)return yC;e3=1;var e=C2();function t(n,r,o){var a=n==null?void 0:e(n,r);return a===void 0?o:a}return yC=t,yC}var bC,t3;function fse(){if(t3)return bC;t3=1;function e(t,n){return t!=null&&n in Object(t)}return bC=e,bC}var SC,n3;function hse(){if(n3)return SC;n3=1;var e=Rv(),t=n2(),n=La(),r=Sv(),o=o2(),a=Xf();function l(c,d,f){d=e(d,c);for(var p=-1,m=d.length,g=!1;++p<m;){var v=a(d[p]);if(!(g=c!=null&&f(c,v)))break;c=c[v]}return g||++p!=m?g:(m=c==null?0:c.length,!!m&&o(m)&&r(v,m)&&(n(c)||t(c)))}return SC=l,SC}var CC,r3;function pse(){if(r3)return CC;r3=1;var e=fse(),t=hse();function n(r,o){return r!=null&&t(r,o,e)}return CC=n,CC}var EC,o3;function mse(){if(o3)return EC;o3=1;var e=B8(),t=dse(),n=pse(),r=b2(),o=_F(),a=IF(),l=Xf(),c=1,d=2;function f(p,m){return r(p)&&o(m)?a(l(p),m):function(g){var v=t(g,p);return v===void 0&&v===m?n(g,p):e(m,v,c|d)}}return EC=f,EC}var wC,a3;function E2(){if(a3)return wC;a3=1;function e(t){return t}return wC=e,wC}var xC,s3;function gse(){if(s3)return xC;s3=1;function e(t){return function(n){return n?.[t]}}return xC=e,xC}var _C,i3;function vse(){if(i3)return _C;i3=1;var e=C2();function t(n){return function(r){return e(r,n)}}return _C=t,_C}var IC,l3;function yse(){if(l3)return IC;l3=1;var e=gse(),t=vse(),n=b2(),r=Xf();function o(a){return n(a)?e(r(a)):t(a)}return IC=o,IC}var AC,c3;function bse(){if(c3)return AC;c3=1;var e=sse(),t=mse(),n=E2(),r=La(),o=yse();function a(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):o(l)}return AC=a,AC}var TC,u3;function AF(){if(u3)return TC;u3=1;var e=al(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return TC=t,TC}var RC,d3;function w2(){if(d3)return RC;d3=1;var e=AF();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return RC=t,RC}var OC,f3;function TF(){if(f3)return OC;f3=1;var e=w2(),t=Yf(),n=Object.prototype,r=n.hasOwnProperty;function o(a,l,c){var d=a[l];(!(r.call(a,l)&&t(d,c))||c===void 0&&!(l in a))&&e(a,l,c)}return OC=o,OC}var MC,h3;function Sse(){if(h3)return MC;h3=1;var e=TF(),t=Rv(),n=Sv(),r=Da(),o=Xf();function a(l,c,d,f){if(!r(l))return l;c=t(c,l);for(var p=-1,m=c.length,g=m-1,v=l;v!=null&&++p<m;){var S=o(c[p]),C=d;if(S==="__proto__"||S==="constructor"||S==="prototype")return l;if(p!=g){var w=v[S];C=f?f(w,S,v):void 0,C===void 0&&(C=r(w)?w:n(c[p+1])?[]:{})}e(v,S,C),v=v[S]}return l}return MC=a,MC}var NC,p3;function Cse(){if(p3)return NC;p3=1;var e=C2(),t=Sse(),n=Rv();function r(o,a,l){for(var c=-1,d=a.length,f={};++c<d;){var p=a[c],m=e(o,p);l(m,p)&&t(f,n(p,o),m)}return f}return NC=r,NC}var PC,m3;function x2(){if(m3)return PC;m3=1;var e=$8(),t=e(Object.getPrototypeOf,Object);return PC=t,PC}var kC,g3;function Ese(){if(g3)return kC;g3=1;var e=D8(),t=x2(),n=F8(),r=U8(),o=Object.getOwnPropertySymbols,a=o?function(l){for(var c=[];l;)e(c,n(l)),l=t(l);return c}:r;return kC=a,kC}var DC,v3;function wse(){if(v3)return DC;v3=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return DC=e,DC}var LC,y3;function xse(){if(y3)return LC;y3=1;var e=Da(),t=s2(),n=wse(),r=Object.prototype,o=r.hasOwnProperty;function a(l){if(!e(l))return n(l);var c=t(l),d=[];for(var f in l)f=="constructor"&&(c||!o.call(l,f))||d.push(f);return d}return LC=a,LC}var UC,b3;function _2(){if(b3)return UC;b3=1;var e=z8(),t=xse(),n=Cv();function r(o){return n(o)?e(o,!0):t(o)}return UC=r,UC}var FC,S3;function _se(){if(S3)return FC;S3=1;var e=L8(),t=Ese(),n=_2();function r(o){return e(o,n,t)}return FC=r,FC}var zC,C3;function Ise(){if(C3)return zC;C3=1;var e=xF(),t=bse(),n=Cse(),r=_se();function o(a,l){if(a==null)return{};var c=e(r(a),function(d){return[d]});return l=t(l),n(a,c,function(d,f){return l(d,f[0])})}return zC=o,zC}var Ase=Ise();const Tse=Xc(Ase),Rse=!0,Ose="",Ef=(e,t)=>`${e}${t}`.replace(/[^A-Z0-9+]/gi,""),Mse=(e,t)=>{switch(t){case"address":case"birthdate":case"email":case"family_name":case"gender":case"given_name":case"locale":case"middle_name":case"name":case"nickname":case"phone_number":case"picture":case"preferred_username":case"profile":case"updated_at":case"website":case"zoneinfo":return!0;default:return t.startsWith("custom:")}},Nse=e=>{const{phone_number:t,...n}=Tse(e,Mse);if(Aa(t)&&t!==Ose){const{country_code:r}=e;return{...n,phone_number:Ef(r,t)}}return n},Pse=(e,t,n,r)=>{const{password:o,...a}=t,l=Nse(a),c=r&&r!=="PASSWORD";let d=l;r==="SMS_OTP"&&l.email&&(d={...l,email:""});const f={autoSignIn:c?{enabled:!0,authFlowType:"USER_AUTH",preferredChallenge:r}:Rse,userAttributes:{...n==="phone_number"?{...d,phone_number:e}:d}};return{username:e,password:c?void 0:o,options:f}},kse=({formValues:e,loginMechanisms:t})=>{const n=e.__authMethod;if(n==="SMS_OTP"){const{country_code:o,phone_number:a}=e;return Ef(o,a)}if(n==="EMAIL_OTP")return e.email;if(t.includes("username"))return e.username;const r=t[0];if(r==="phone_number"){const{country_code:o,phone_number:a}=e;return Ef(o,a)}return e[r]},Dse=(e,t)=>{const n=[],r=t!==void 0;n.push("PASSWORD"),(r||e?.emailOtpEnabled)&&n.push("EMAIL_OTP"),(r||e?.smsOtpEnabled)&&n.push("SMS_OTP"),(r||e?.webAuthnEnabled)&&n.push("WEB_AUTHN");const o=t??[],a=n.filter(l=>!o.includes(l));if(a.length===0)throw new Error("InvalidPasswordlessSettings: All authentication methods are hidden");return a},{assign:Xe}=fF,Lse=Xe({actorDoneData:void 0}),Use=Xe({challengeName:void 0}),Fse=Xe({missingAttributes:void 0}),zse=Xe({remoteError:void 0}),$se=Xe({formValues:e=>({username:e.formValues?.username})}),jse=Xe({touched:{}}),Bse=Xe({user:void 0}),Hse=Xe({validationError:{}}),qse=Xe({totpSecretCode:(e,{data:t})=>{const{sharedSecret:n}=t.nextStep?.totpSetupDetails??{};return n}}),Vse=Xe({allowedMfaTypes:(e,{data:t})=>t.nextStep?.allowedMFATypes}),Wse=Xe({step:"SIGN_IN"}),Gse=Xe({step:"SHOULD_CONFIRM_USER_ATTRIBUTE"}),Kse=Xe({step:"CONFIRM_ATTRIBUTE_COMPLETE"}),Zse=Xe({challengeName:(e,{data:t})=>{const{signInStep:n}=t.nextStep;switch(n){case"CONFIRM_SIGN_IN_WITH_SMS_CODE":return"SMS_MFA";case"CONFIRM_SIGN_IN_WITH_TOTP_CODE":return"SOFTWARE_TOKEN_MFA";case"CONFIRM_SIGN_IN_WITH_EMAIL_CODE":return"EMAIL_OTP";case"CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION":case"CONTINUE_SIGN_IN_WITH_EMAIL_SETUP":case"CONTINUE_SIGN_IN_WITH_TOTP_SETUP":return"MFA_SETUP";case"CONTINUE_SIGN_IN_WITH_MFA_SELECTION":return"SELECT_MFA_TYPE";default:return}}}),Yse=Xe({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:r,country_code:o}=e;return n==="phone_number"?Ef(o,r):r}}),Qse=Xe({username:kse}),Xse=Xe({username:({formValues:e,loginMechanisms:t})=>{const n=t[0],{username:r,country_code:o}=e;return n==="phone_number"?Ef(o,r):r}}),Jse=Xe({step:(e,{data:t})=>t.nextStep.signInStep==="DONE"?"SIGN_IN_COMPLETE":t.nextStep.signInStep}),eie=Xe({step:(e,{data:t})=>t.nextStep.signUpStep==="DONE"?"SIGN_UP_COMPLETE":t.nextStep.signUpStep}),tie=Xe({step:(e,{data:t})=>t.nextStep.resetPasswordStep==="DONE"?"RESET_PASSWORD_COMPLETE":t.nextStep.resetPasswordStep}),nie=Xe({missingAttributes:(e,{data:t})=>t.nextStep?.missingAttributes}),rie=Xe({validationError:(e,{data:t})=>t}),oie=Xe({remoteError:(e,{data:t})=>{if(t.name==="NoUserPoolError")return"Configuration error (see console) – please contact the administrator";const n=t?.message||"";return n.includes("USER_AUTH flow not enabled")?ye(Ee.PASSWORDLESS_NOT_ENABLED):n.includes("Cannot send code to either")?ye(Ee.CODE_DELIVERY_FAILED):n.includes("Invalid code or auth state")?ye(Ee.VERIFICATION_CODE_INVALID):n.includes("session is expired")?ye(Ee.VERIFICATION_CODE_EXPIRED):n.includes("ceremony has been canceled")?ye(Ee.PASSKEY_AUTHENTICATION_CANCELED):n||t}}),aie=Xe({user:(e,{data:t})=>t}),E3=e=>({Destination:e.destination,DeliveryMedium:e.deliveryMedium,AttributeName:e.attributName}),sie=Xe({codeDeliveryDetails:(e,{data:t})=>t?.nextStep?.codeDeliveryDetails?E3(t.nextStep.codeDeliveryDetails):E3(t)}),iie=Xe({formValues:(e,{data:t})=>{const{name:n,value:r}=t;return{...e.formValues,[n]:r}}}),lie=Xe({formValues:(e,{data:t})=>Nae({...e.formValues,...t},"password")}),cie=Xe({touched:(e,{data:t})=>({...e.touched,[t.name]:!0})}),uie=Xe({unverifiedUserAttributes:(e,{data:t})=>{const n=t||e.fetchedUserAttributes;if(!n)return{};const{email:r,phone_number:o}=n;return{...r&&{email:r},...o&&{phone_number:o}}}}),die=Xe({selectedUserAttribute:void 0}),fie=Xe({selectedUserAttribute:e=>e.formValues?.unverifiedAttr}),hie=Xe({step:"CONFIRM_SIGN_UP"}),pie=Xe({selectedAuthMethod:(e,{data:t})=>t.method}),mie=Xe({selectedAuthMethod:(e,{data:t})=>t?.__authMethod||"PASSWORD"}),gie=Xe({step:"SELECT_AUTH_METHOD"}),vie=Xe({fetchedUserAttributes:(e,t)=>t.data}),yie=Xe({hasExistingPasskeys:(e,t)=>t.data}),bie=Xe({hasExistingPasskeys:!1}),Jf={clearActorDoneData:Lse,clearChallengeName:Use,clearError:zse,clearFormValues:$se,clearHasExistingPasskeys:bie,clearMissingAttributes:Fse,clearSelectedUserAttribute:die,clearTouched:jse,clearUser:Bse,clearValidationError:Hse,handleBlur:cie,handleInput:iie,handleSubmit:lie,setAllowedMfaTypes:Vse,setChallengeName:Zse,setCodeDeliveryDetails:sie,setFetchedUserAttributes:vie,setFieldErrors:rie,setHasExistingPasskeys:yie,setMissingAttributes:nie,setNextResetPasswordStep:tie,setNextSignInStep:Jse,setNextSignUpStep:eie,setRemoteError:oie,setConfirmAttributeCompleteStep:Kse,setConfirmSignUpSignUpStep:hie,setSelectAuthMethodStep:gie,setSelectedAuthMethod:pie,setSelectedAuthMethodFromForm:mie,setShouldVerifyUserAttributeStep:Gse,setSelectedUserAttribute:fie,setSignInStep:Wse,setTotpSecretCode:qse,setUser:aie,setUnverifiedUserAttributes:uie,setUsernameForgotPassword:Yse,setUsernameSignIn:Xse,setUsernameSignUp:Qse},Sie=["CONFIRM_SIGN_IN_WITH_SMS_CODE","CONFIRM_SIGN_IN_WITH_TOTP_CODE","CONFIRM_SIGN_IN_WITH_EMAIL_CODE"],Cie=(e,{data:t})=>t?.nextStep.signInStep==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",Eie=(e,{data:t})=>t?.nextStep?.signInStep==="RESET_PASSWORD",wie=(e,{data:t})=>t?.nextStep.signInStep==="CONFIRM_SIGN_UP",xie=(e,{data:t})=>t?.nextStep.signUpStep==="COMPLETE_AUTO_SIGN_IN",_ie=(e,{data:t})=>t?.nextStep.signUpStep==="DONE"&&e.step==="CONFIRM_SIGN_UP",Iie=(e,{data:t})=>t?.nextStep.signInStep==="DONE",Aie=(e,{data:t})=>t?.nextStep.signUpStep==="DONE",Tie=(e,{data:t})=>t?.nextStep.resetPasswordStep==="DONE",Rie=(e,{data:t})=>t?.step==="CONFIRM_ATTRIBUTE_COMPLETE",Oie=(e,{data:t})=>t?.step==="CONFIRM_ATTRIBUTE_WITH_CODE",Mie=(e,{data:t})=>t?.step==="SHOULD_CONFIRM_USER_ATTRIBUTE",Nie=(e,{data:t})=>t?.step==="RESET_PASSWORD",Pie=(e,{data:t})=>t?.step==="CONFIRM_SIGN_UP",kie=({step:e})=>Sie.includes(e),Die=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_TOTP_SETUP",Lie=({step:e})=>e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP",Uie=({step:e})=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e),Fie=({step:e})=>e==="RESET_PASSWORD",zie=({step:e})=>e==="CONFIRM_RESET_PASSWORD_WITH_CODE",$ie=({step:e})=>e==="CONFIRM_SIGN_UP",jie=(e,t)=>{const n=t.data||e.fetchedUserAttributes;if(!n)return!1;const{email:r,phone_number:o,phone_number_verified:a,email_verified:l}=n;return!r&&!o?!1:(l===void 0||l==="false")&&(a===void 0||a==="false")},Bie=(e,{data:t})=>t.message==="User is already confirmed.",Hie=({availableAuthMethods:e,preferredChallenge:t,selectedAuthMethod:n})=>e&&e.length>1&&(!t||n===null),qie=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:n}=e||{};return!n||t?!1:typeof n=="boolean"?n:n.afterSignin==="ALWAYS"},Vie=({passwordless:e,hasExistingPasskeys:t})=>{const{passkeyRegistrationPrompts:n}=e||{};return!n||t?!1:typeof n=="boolean"?n:n.afterSignup==="ALWAYS"},Wie=({passwordless:e})=>e?.passkeyRegistrationPrompts!=null,Gie=({selectedAuthMethod:e,step:t})=>e!=null&&t==="SELECT_AUTH_METHOD",Ov={hasCompletedAttributeConfirmation:Rie,hasCompletedResetPassword:Tie,hasCompletedSignIn:Iie,hasCompletedSignUp:Aie,hasPasskeyRegistrationPrompts:Wie,isConfirmSignUpStep:Pie,isConfirmUserAttributeStep:Oie,isResetPasswordStep:Nie,isShouldConfirmUserAttributeStep:Mie,isUserAlreadyConfirmed:Bie,shouldAutoSignIn:xie,shouldManualSignIn:_ie,shouldConfirmResetPassword:zie,shouldConfirmSignIn:kie,shouldConfirmSignInWithNewPassword:Cie,shouldConfirmSignUp:$ie,shouldConfirmSignUpFromSignIn:wie,shouldResetPassword:Fie,shouldResetPasswordFromSignIn:Eie,shouldReturnToSelectMethod:Gie,shouldSelectAuthMethod:Hie,shouldSetupTotp:Die,shouldSetupEmail:Lie,shouldSelectMfaType:Uie,shouldVerifyAttribute:jie,shouldPromptPasskeyRegistration:qie,shouldPromptPasskeyRegistrationAfterSignup:Vie};var $C,w3;function RF(){if(w3)return $C;w3=1;var e=w2(),t=Yf();function n(r,o,a){(a!==void 0&&!t(r[o],a)||a===void 0&&!(o in r))&&e(r,o,a)}return $C=n,$C}var jC,x3;function Kie(){if(x3)return jC;x3=1;function e(t){return function(n,r,o){for(var a=-1,l=Object(n),c=o(n),d=c.length;d--;){var f=c[t?d:++a];if(r(l[f],f,l)===!1)break}return n}}return jC=e,jC}var BC,_3;function Zie(){if(_3)return BC;_3=1;var e=Kie(),t=e();return BC=t,BC}var Vd={exports:{}};Vd.exports;var I3;function Yie(){return I3||(I3=1,(function(e,t){var n=Ho(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===r,l=a?n.Buffer:void 0,c=l?l.allocUnsafe:void 0;function d(f,p){if(p)return f.slice();var m=f.length,g=c?c(m):new f.constructor(m);return f.copy(g),g}e.exports=d})(Vd,Vd.exports)),Vd.exports}var HC,A3;function Qie(){if(A3)return HC;A3=1;var e=k8();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return HC=t,HC}var qC,T3;function Xie(){if(T3)return qC;T3=1;var e=Qie();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return qC=t,qC}var VC,R3;function Jie(){if(R3)return VC;R3=1;function e(t,n){var r=-1,o=t.length;for(n||(n=Array(o));++r<o;)n[r]=t[r];return n}return VC=e,VC}var WC,O3;function ele(){if(O3)return WC;O3=1;var e=Da(),t=Object.create,n=(function(){function r(){}return function(o){if(!e(o))return{};if(t)return t(o);r.prototype=o;var a=new r;return r.prototype=void 0,a}})();return WC=n,WC}var GC,M3;function tle(){if(M3)return GC;M3=1;var e=ele(),t=x2(),n=s2();function r(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return GC=r,GC}var KC,N3;function nle(){if(N3)return KC;N3=1;var e=Cv(),t=sl();function n(r){return t(r)&&e(r)}return KC=n,KC}var ZC,P3;function rle(){if(P3)return ZC;P3=1;var e=uu(),t=x2(),n=sl(),r="[object Object]",o=Function.prototype,a=Object.prototype,l=o.toString,c=a.hasOwnProperty,d=l.call(Object);function f(p){if(!n(p)||e(p)!=r)return!1;var m=t(p);if(m===null)return!0;var g=c.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==d}return ZC=f,ZC}var YC,k3;function OF(){if(k3)return YC;k3=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return YC=e,YC}var QC,D3;function ole(){if(D3)return QC;D3=1;var e=TF(),t=w2();function n(r,o,a,l){var c=!a;a||(a={});for(var d=-1,f=o.length;++d<f;){var p=o[d],m=l?l(a[p],r[p],p,a,r):void 0;m===void 0&&(m=r[p]),c?t(a,p,m):e(a,p,m)}return a}return QC=n,QC}var XC,L3;function ale(){if(L3)return XC;L3=1;var e=ole(),t=_2();function n(r){return e(r,t(r))}return XC=n,XC}var JC,U3;function sle(){if(U3)return JC;U3=1;var e=RF(),t=Yie(),n=Xie(),r=Jie(),o=tle(),a=n2(),l=La(),c=nle(),d=r2(),f=X_(),p=Da(),m=rle(),g=a2(),v=OF(),S=ale();function C(w,x,I,T,O,D,P){var M=v(w,I),L=v(x,I),z=P.get(L);if(z){e(w,I,z);return}var G=D?D(M,L,I+"",w,x,P):void 0,j=G===void 0;if(j){var F=l(L),q=!F&&d(L),X=!F&&!q&&g(L);G=L,F||q||X?l(M)?G=M:c(M)?G=r(M):q?(j=!1,G=t(L,!0)):X?(j=!1,G=n(L,!0)):G=[]:m(L)||a(L)?(G=M,a(M)?G=S(M):(!p(M)||f(M))&&(G=o(L))):j=!1}j&&(P.set(L,G),O(G,L,T,D,P),P.delete(L)),e(w,I,G)}return JC=C,JC}var eE,F3;function ile(){if(F3)return eE;F3=1;var e=t2(),t=RF(),n=Zie(),r=sle(),o=Da(),a=_2(),l=OF();function c(d,f,p,m,g){d!==f&&n(f,function(v,S){if(g||(g=new e),o(v))r(d,f,S,p,c,m,g);else{var C=m?m(l(d,S),v,S+"",d,f,g):void 0;C===void 0&&(C=v),t(d,S,C)}},a)}return eE=c,eE}var tE,z3;function lle(){if(z3)return tE;z3=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return tE=e,tE}var nE,$3;function cle(){if($3)return nE;$3=1;var e=lle(),t=Math.max;function n(r,o,a){return o=t(o===void 0?r.length-1:o,0),function(){for(var l=arguments,c=-1,d=t(l.length-o,0),f=Array(d);++c<d;)f[c]=l[o+c];c=-1;for(var p=Array(o+1);++c<o;)p[c]=l[c];return p[o]=a(f),e(r,this,p)}}return nE=n,nE}var rE,j3;function ule(){if(j3)return rE;j3=1;function e(t){return function(){return t}}return rE=e,rE}var oE,B3;function dle(){if(B3)return oE;B3=1;var e=ule(),t=AF(),n=E2(),r=t?function(o,a){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return oE=r,oE}var aE,H3;function fle(){if(H3)return aE;H3=1;var e=800,t=16,n=Date.now;function r(o){var a=0,l=0;return function(){var c=n(),d=t-(c-l);if(l=c,d>0){if(++a>=e)return arguments[0]}else a=0;return o.apply(void 0,arguments)}}return aE=r,aE}var sE,q3;function hle(){if(q3)return sE;q3=1;var e=dle(),t=fle(),n=t(e);return sE=n,sE}var iE,V3;function ple(){if(V3)return iE;V3=1;var e=E2(),t=cle(),n=hle();function r(o,a){return n(t(o,a,e),o+"")}return iE=r,iE}var lE,W3;function mle(){if(W3)return lE;W3=1;var e=Yf(),t=Cv(),n=Sv(),r=Da();function o(a,l,c){if(!r(c))return!1;var d=typeof l;return(d=="number"?t(c)&&n(l,c.length):d=="string"&&l in c)?e(c[l],a):!1}return lE=o,lE}var cE,G3;function gle(){if(G3)return cE;G3=1;var e=ple(),t=mle();function n(r){return e(function(o,a){var l=-1,c=a.length,d=c>1?a[c-1]:void 0,f=c>2?a[2]:void 0;for(d=r.length>3&&typeof d=="function"?(c--,d):void 0,f&&t(a[0],a[1],f)&&(d=c<3?void 0:d,c=1),o=Object(o);++l<c;){var p=a[l];p&&r(o,p,l,d)}return o})}return cE=n,cE}var uE,K3;function vle(){if(K3)return uE;K3=1;var e=ile(),t=gle(),n=t(function(r,o,a){e(r,o,a)});return uE=n,uE}var yle=vle();const ble=Xc(yle),Mv=async(e,t,n,r)=>{const o=await Promise.all(r.map(l=>l(e,t,n))),a=ble({},...o);return g2(a)?Promise.resolve():Promise.reject(a)},Sle=8,Cle=e=>Array.isArray(e),Ele=e=>{if(e)return Cle(e)?Object.entries(e).map(([t,n])=>Object.keys(n)[0]):Object.keys(e)},ks={async getAmplifyConfig(){const e=rU.getConfig(),t=e.Auth?.Cognito,{loginWith:n,userAttributes:r}=e.Auth?.Cognito??{},o=n?Object.entries(n).filter(([f,p])=>f!=="oauth").filter(([f,p])=>!!p).map(f=>f[0]==="phone"?"phone_number":f[0]):void 0,a=Ele(r),l=n?.oauth?.providers?n.oauth.providers?.map(f=>f.toString().toLowerCase()):void 0,c=e.Auth?.Cognito?.passwordless,d={emailOtpEnabled:c?.emailOtpEnabled??c?.email_otp_enabled===!0,smsOtpEnabled:c?.smsOtpEnabled??c?.sms_otp_enabled===!0,webAuthnEnabled:!!(c?.webAuthn??c?.web_authn),preferredChallenge:c?.preferredChallenge??c?.preferred_challenge};return{...t,loginMechanisms:o,signUpAttributes:a,socialProviders:l,passwordlessCapabilities:d}},getCurrentUser:ev,handleSignIn:P_,handleSignUp:MZ,handleConfirmSignIn:G6,handleConfirmSignUp:FZ,handleForgotPasswordSubmit:kZ,handleForgotPassword:W6,handleResendSignUpCode:LZ,async validateCustomSignUp(e,t){},async validateFormPassword(e,t,n){const{password:r}=e,{password:o}=t;if(!o||!n)return null;const a=[],l=n.minLength??Sle;return r.length<l&&a.push(`Password must have at least ${l} characters`),n.requireLowercase&&!/[a-z]/.test(r)&&a.push("Password must have lower case letters"),n.requireUppercase&&!/[A-Z]/.test(r)&&a.push("Password must have upper case letters"),n.requireNumbers&&!/[0-9]/.test(r)&&a.push("Password must have numbers"),n.requireSpecialCharacters&&!Oae(r)&&a.push("Password must have special characters"),a.length!==0?{password:a}:null},async validateConfirmPassword(e,t){const{password:n,confirm_password:r}=e,{confirm_password:o,password:a}=t;if(!n&&!r)return null;if((n||r)&&n!==r&&(o&&a||n?.length>=6&&r?.length>=6))return{confirm_password:"Your passwords must match"}},async validatePreferredUsername(e,t){},async validateRequiredFieldsForAuthMethod(e){const t=e.__authMethod;if(!t)return null;if(t==="EMAIL_OTP"&&!e.email)return{email:"Email is required for Email OTP sign up"};if(t==="SMS_OTP"&&!e.phone_number)return{phone_number:"Phone number is required for SMS OTP sign up"};if(t==="PASSWORD"){const n={};return e.password||(n.password="Password is required"),e.confirm_password||(n.confirm_password="Confirm Password is required"),Object.keys(n).length>0?n:null}return null}};function wle({services:e}){return fu({id:"forgotPasswordActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldResetPassword",target:"confirmResetPassword"},{cond:"shouldConfirmResetPassword",target:"confirmResetPassword"},{target:"forgotPassword"}]},forgotPassword:{initial:"edit",entry:"sendUpdate",exit:["clearError","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},submit:{tags:"pending",entry:["sendUpdate","clearError","setUsernameForgotPassword"],invoke:{src:"handleResetPassword",onDone:{actions:["setCodeDeliveryDetails","setNextResetPasswordStep"],target:"#forgotPasswordActor.confirmResetPassword"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmResetPassword:{type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"},RESEND:"resendCode",CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{target:"pending",actions:"clearValidationError"},onError:{target:"idle",actions:"setFieldErrors"}}},resendCode:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleResetPassword",onDone:{target:"idle"},onError:{actions:"setRemoteError",target:"idle"}}},pending:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"handleConfirmResetPassword",onDone:[{cond:"hasCompletedResetPassword",actions:"setNextResetPasswordStep",target:"#forgotPasswordActor.resolved"},{actions:"setSignInStep",target:"#forgotPasswordActor.resolved"}],onError:{actions:"setRemoteError",target:"idle"}}}}}}},resolved:{type:"final",data:({step:t})=>({step:t})}}},{actions:{...Jf,sendUpdate:Iv()},guards:Ov,services:{handleResetPassword({username:t}){return e.handleForgotPassword({username:t})},handleConfirmResetPassword({formValues:t,username:n}){const{confirmation_code:r,password:o}=t;return e.handleForgotPasswordSubmit({confirmationCode:r,newPassword:o,username:n})},validateFields(t){return Mv(t.formValues,t.touched,t.passwordSettings,[ks.validateFormPassword,ks.validateConfirmPassword])}}})}const MF=e=>({entry:["sendUpdate","clearError"],invoke:{src:"signInWithRedirect",onDone:{target:e},onError:{actions:"setRemoteError",target:e}}}),xle=e=>["CONTINUE_SIGN_IN_WITH_MFA_SELECTION","CONTINUE_SIGN_IN_WITH_MFA_SETUP_SELECTION"].includes(e)?"mfa_type":e==="CONTINUE_SIGN_IN_WITH_EMAIL_SETUP"?"email":"confirmation_code",Fm={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signInActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:["setMissingAttributes","setNextSignInStep"],target:"#signInActor.forceChangePassword"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signInActor.resendSignUpCode"},{actions:["setChallengeName","setMissingAttributes","setNextSignInStep","setTotpSecretCode","setAllowedMfaTypes","setCodeDeliveryDetails"],target:"#signInActor.init"}],onError:{actions:"setRemoteError",target:"edit"}},Gp=e=>({initial:"edit",exit:e,states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SIGN_IN:"#signInActor.signIn",CHANGE:{actions:"handleInput"},RESEND:{target:"resend"}}},submit:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"confirmSignIn",...Fm}},resend:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"resendSignInCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"edit"},onError:{actions:"setRemoteError",target:"edit"}}}}});function _le({services:e}){return fu({id:"signInActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignIn",target:"confirmSignIn"},{cond:"shouldSetupTotp",target:"setupTotp"},{cond:"shouldSetupEmail",target:"setupEmail"},{cond:"shouldSelectMfaType",target:"selectMfaType"},{cond:({step:t})=>t==="CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED",actions:"setActorDoneData",target:"forceChangePassword"},{target:"signIn"}]},federatedSignIn:{...MF("signIn")},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const t=await p2();return t.credentials&&t.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistration",target:"#signInActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signInActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signInActor.resolved"}]},resendSignUpCode:{invoke:{src:"handleResendSignUpCode",onDone:{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"},onError:{actions:"setRemoteError",target:"#signInActor.signIn"}}},resetPassword:{invoke:{src:"resetPassword",onDone:[{actions:"setCodeDeliveryDetails",target:"#signInActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}}},signIn:{initial:"edit",exit:"clearTouched",states:{edit:{entry:"sendUpdate",on:{CHANGE:{actions:"handleInput"},FEDERATED_SIGN_IN:{target:"#signInActor.federatedSignIn"},SHOW_AUTH_METHODS:{actions:"setUsernameSignIn",target:"selectMethod"},SUBMIT:[{cond:"shouldSelectAuthMethod",actions:"handleSubmit",target:"selectMethod"},{actions:"handleSubmit",target:"submit"}]}},selectMethod:{entry:["sendUpdate","setSelectAuthMethodStep","setUsernameSignIn"],on:{SELECT_METHOD:{actions:"setSelectedAuthMethod",target:"submit"},SUBMIT:{actions:["handleSubmit","setSelectedAuthMethodFromForm"],target:"submit"},SIGN_IN:{target:"edit"}}},submit:{tags:"pending",entry:["clearError","sendUpdate","setUsernameSignIn"],exit:"clearFormValues",invoke:{src:"handleSignIn",onDone:Fm.onDone,onError:[{cond:"shouldReturnToSelectMethod",actions:"setRemoteError",target:"selectMethod"},Fm.onError]}}}},confirmSignIn:{...Gp(["clearChallengeName","clearFormValues","clearError","clearTouched"])},forceChangePassword:{entry:"sendUpdate",type:"parallel",exit:["clearFormValues","clearError","clearTouched"],states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateFields",onDone:{target:"valid",actions:"clearValidationError"},onError:{target:"invalid",actions:"setFieldErrors"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{SIGN_IN:{actions:"setSignInStep",target:"#signInActor.resolved"},CHANGE:{actions:"handleInput",target:".pending"},BLUR:{actions:"handleBlur",target:".pending"}}},submit:{initial:"edit",entry:"clearError",states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateFields",onDone:{actions:"clearValidationError",target:"pending"},onError:{actions:"setFieldErrors",target:"edit"}}},pending:{tags:"pending",entry:["sendUpdate","clearError"],invoke:{src:"handleForceChangePassword",...Fm}}}}}},setupTotp:{...Gp(["clearFormValues","clearError","clearTouched"])},setupEmail:{...Gp(["clearFormValues","clearError","clearTouched"])},selectMfaType:{...Gp(["clearFormValues","clearError","clearTouched"])},passkeyPrompt:{entry:"sendUpdate",on:{SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:t=>({codeDeliveryDetails:t.codeDeliveryDetails,remoteError:t.remoteError,step:t.step,unverifiedUserAttributes:t.unverifiedUserAttributes,username:t.username})}}},{actions:{...Jf,sendUpdate:Iv()},guards:Ov,services:{async fetchUserAttributes(){return J6()},resetPassword({username:t}){return W6({username:t})},handleResendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},resendSignInCode({username:t,selectedAuthMethod:n,availableAuthMethods:r,preferredChallenge:o}){const a=n??o??r?.[0]??"PASSWORD";return e.handleSignIn({username:t,options:{authFlowType:"USER_AUTH",preferredChallenge:a}})},handleSignIn({formValues:t,username:n,selectedAuthMethod:r,availableAuthMethods:o,preferredChallenge:a}){const l=r??a??o?.[0]??"PASSWORD";if(l==="PASSWORD"){const{password:c}=t;return e.handleSignIn({username:n,password:c})}else return e.handleSignIn({username:n,options:{authFlowType:"USER_AUTH",preferredChallenge:l}})},confirmSignIn({formValues:t,step:n}){const r=xle(n),{[r]:o}=t;return e.handleConfirmSignIn({challengeResponse:o})},async handleForceChangePassword({formValues:t}){let{password:n,phone_number:r,country_code:o,confirm_password:a,username:l,...c}=t,d;return r&&(d=`${o}${r}`.replace(/[^A-Z0-9+]/gi,""),c={...c,phone_number:d}),G6({challengeResponse:n,options:{userAttributes:c}})},signInWithRedirect(t,{data:n}){return X6(n)},async validateFields(t){return Mv(t.formValues,t.touched,t.passwordSettings,[ks.validateFormPassword,ks.validateConfirmPassword])}}})}const Ile={onDone:[{actions:"setCodeDeliveryDetails",target:"#signUpActor.resolved"}],onError:{actions:["setRemoteError","sendUpdate"]}},Ale={onDone:[{cond:"hasCompletedSignIn",actions:"setNextSignInStep",target:"#signUpActor.fetchUserAttributes"},{cond:"shouldConfirmSignInWithNewPassword",actions:"setNextSignInStep",target:"#signUpActor.resolved"},{cond:"shouldResetPasswordFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resetPassword"},{cond:"shouldConfirmSignUpFromSignIn",actions:"setNextSignInStep",target:"#signUpActor.resendSignUpCode"},{actions:["setNextSignInStep","setChallengeName","setMissingAttributes","setTotpSecretCode","setAllowedMfaTypes"],target:"#signUpActor.resolved"}],onError:{actions:"setRemoteError",target:"#signUpActor.resolved"}};function Tle({services:e}){return fu({id:"signUpActor",initial:"init",predictableActionArguments:!0,states:{init:{always:[{cond:"shouldConfirmSignUp",target:"confirmSignUp"},{target:"signUp"}]},autoSignIn:{tags:"pending",invoke:{src:"autoSignIn",...Ale}},fetchUserAttributes:{invoke:{src:"fetchUserAttributes",onDone:[{cond:"hasPasskeyRegistrationPrompts",actions:"setFetchedUserAttributes",target:"checkPasskeys"},{actions:"setFetchedUserAttributes",target:"evaluatePasskeyPrompt"}],onError:{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}}},checkPasskeys:{invoke:{src:async()=>{try{const t=await p2();return t.credentials&&t.credentials.length>0}catch{return!1}},onDone:{actions:"setHasExistingPasskeys",target:"evaluatePasskeyPrompt"},onError:{actions:"clearHasExistingPasskeys",target:"evaluatePasskeyPrompt"}}},evaluatePasskeyPrompt:{always:[{cond:"shouldPromptPasskeyRegistrationAfterSignup",target:"#signUpActor.passkeyPrompt"},{cond:"shouldVerifyAttribute",actions:["setShouldVerifyUserAttributeStep","setUnverifiedUserAttributes"],target:"#signUpActor.resolved"},{actions:"setConfirmAttributeCompleteStep",target:"#signUpActor.resolved"}]},federatedSignIn:{...MF("signUp")},resetPassword:{invoke:{src:"resetPassword",...Ile}},resendSignUpCode:{tags:"pending",entry:"sendUpdate",exit:"sendUpdate",invoke:{src:"resendSignUpCode",onDone:{actions:["setCodeDeliveryDetails","sendUpdate"],target:"#signUpActor.confirmSignUp"},onError:[{cond:"isUserAlreadyConfirmed",target:"#signUpActor.resolved"},{actions:["setRemoteError","sendUpdate"],target:"#signUpActor.confirmSignUp"}]}},signUp:{type:"parallel",exit:"clearTouched",on:{FEDERATED_SIGN_IN:{target:"federatedSignIn"}},states:{validation:{initial:"pending",states:{pending:{invoke:{src:"validateSignUp",onDone:{actions:"clearValidationError",target:"valid"},onError:{actions:"setFieldErrors",target:"invalid"}}},valid:{entry:"sendUpdate"},invalid:{entry:"sendUpdate"}},on:{BLUR:{actions:"handleBlur",target:".pending"},CHANGE:{actions:"handleInput",target:".pending"}}},submission:{initial:"idle",states:{idle:{entry:["sendUpdate"],on:{SUBMIT:{actions:["setSelectedAuthMethodFromForm","handleSubmit"],target:"validate"}}},validate:{entry:"sendUpdate",invoke:{src:"validateSignUp",onDone:{target:"handleSignUp",actions:"clearValidationError"},onError:{actions:"setFieldErrors",target:"idle"}}},handleSignUp:{tags:"pending",entry:["setUsernameSignUp","clearError"],exit:"sendUpdate",invoke:{src:"handleSignUp",onDone:[{cond:"hasCompletedSignUp",actions:"setNextSignUpStep",target:"#signUpActor.resolved"},{cond:"shouldAutoSignIn",actions:"setNextSignUpStep",target:"#signUpActor.autoSignIn"},{actions:["setCodeDeliveryDetails","setNextSignUpStep"],target:"#signUpActor.init"}],onError:{actions:["sendUpdate","setRemoteError"],target:"idle"}}}}}}},confirmSignUp:{initial:"edit",entry:"sendUpdate",states:{edit:{on:{SUBMIT:{actions:"handleSubmit",target:"submit"},CHANGE:{actions:"handleInput"},BLUR:{actions:"handleBlur"},RESEND:"#signUpActor.resendSignUpCode"}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmSignUp",onDone:[{cond:"shouldAutoSignIn",actions:["setNextSignUpStep","clearFormValues"],target:"#signUpActor.autoSignIn"},{cond:"shouldManualSignIn",actions:["clearFormValues","setSignInStep"],target:"#signUpActor.resolved"},{actions:"setNextSignUpStep",target:"#signUpActor.init"}],onError:{actions:["setRemoteError","sendUpdate"],target:"edit"}}}}},passkeyPrompt:{entry:"sendUpdate",on:{SKIP:{actions:"setConfirmAttributeCompleteStep",target:"resolved"},SUBMIT:{actions:"setConfirmAttributeCompleteStep",target:"resolved"}}},resolved:{type:"final",data:t=>({challengeName:t.challengeName,missingAttributes:t.missingAttributes,remoteError:t.remoteError,step:t.step,totpSecretCode:t.totpSecretCode,username:t.username,unverifiedUserAttributes:t.unverifiedUserAttributes,allowedMfaTypes:t.allowedMfaTypes})}}},{actions:{...Jf,sendUpdate:Iv()},guards:Ov,services:{autoSignIn(){return N_()},async fetchUserAttributes(){return J6()},confirmSignUp({formValues:t,username:n}){const{confirmation_code:r}=t,o={username:n,confirmationCode:r};return e.handleConfirmSignUp(o)},resendSignUpCode({username:t}){return e.handleResendSignUpCode({username:t})},signInWithRedirect(t,{data:n}){return X6(n)},handleSignUp(t){const{formValues:n,loginMechanisms:r,username:o,selectedAuthMethod:a,preferredChallenge:l}=t,c=r[0],f=Pse(o,n,c,a??l);return e.handleSignUp(f)},async validateSignUp(t){return Mv(t.formValues,t.touched,t.passwordSettings,[e.validateFormPassword,e.validateConfirmPassword,e.validatePreferredUsername,e.validateRequiredFieldsForAuthMethod,e.validateCustomSignUp])}}})}const Rle=()=>fu({initial:"pending",id:"signOutActor",predictableActionArguments:!0,states:{pending:{tags:"pending",invoke:{src:"signOut",onDone:"resolved",onError:"rejected"}},resolved:{type:"final"},rejected:{type:"final"}}},{services:{signOut:()=>mY()}});function Ole(){return fu({id:"verifyUserAttributesActor",initial:"selectUserAttributes",predictableActionArguments:!0,states:{selectUserAttributes:{initial:"edit",exit:["clearError","clearTouched","sendUpdate"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:{target:"#verifyUserAttributesActor.resolved"},CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"sendUserAttributeVerificationCode",onDone:{actions:["setSelectedUserAttribute","setCodeDeliveryDetails"],target:"#verifyUserAttributesActor.confirmVerifyUserAttribute"},onError:{actions:"setRemoteError",target:"edit"}}}}},confirmVerifyUserAttribute:{initial:"edit",exit:["clearError","clearFormValues","clearTouched"],states:{edit:{entry:"sendUpdate",on:{SUBMIT:{actions:"handleSubmit",target:"submit"},SKIP:"#verifyUserAttributesActor.resolved",CHANGE:{actions:"handleInput"}}},submit:{tags:"pending",entry:["clearError","sendUpdate"],invoke:{src:"confirmVerifyUserAttribute",onDone:{actions:["setConfirmAttributeCompleteStep","clearSelectedUserAttribute"],target:"#verifyUserAttributesActor.resolved"},onError:{actions:"setRemoteError",target:"edit"}}}}},resolved:{type:"final",data:({step:e})=>({step:e})}}},{actions:{...Jf,sendUpdate:Iv()},services:{sendUserAttributeVerificationCode({formValues:{unverifiedAttr:e}}){return bY({userAttributeKey:e})},async confirmVerifyUserAttribute({formValues:{confirmation_code:e},selectedUserAttribute:t}){return jZ({confirmationCode:e,userAttributeKey:t})},async validateFields(e){return Mv(e.formValues,e.touched,e.passwordSettings,[ks.validateFormPassword,ks.validateConfirmPassword])}}})}const Kp=(e,t)=>{const n=Dse(e.passwordlessCapabilities,e.config?.passwordless?.hiddenAuthMethods),r=e.config?.passwordless?.preferredAuthMethod??e.passwordlessCapabilities?.preferredChallenge;return{...e.actorDoneData,step:e?.actorDoneData?.step??t,formValues:{},touched:{},validationError:{},formFields:e.config?.formFields,loginMechanisms:e.config?.loginMechanisms,passwordSettings:e.config?.passwordSettings,signUpAttributes:e.config?.signUpAttributes,socialProviders:e.config?.socialProviders,availableAuthMethods:n,preferredChallenge:r,passwordless:e.config?.passwordless}},{choose:Mle,stop:Nle}=fF,xd=e=>Nle(e),Ple={on:{INIT:{actions:"configure",target:"getConfig"},SIGN_OUT:"#authenticator.signOut"}},kle={always:{actions:"configure",target:"getConfig"}};function Dle(e){const{useNextWaitConfig:t,...n}=e??{};return fu({id:"authenticator",initial:"idle",context:{user:void 0,config:{},services:ks,actorRef:void 0,hasSetup:!1},predictableActionArguments:!0,states:{idle:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"setup"},onError:{target:"setup"}}},setup:{initial:"initConfig",states:{initConfig:t?kle:Ple,getConfig:{invoke:{src:"getAmplifyConfig",onDone:[{actions:["applyAmplifyConfig","setHasSetup"],cond:"hasUser",target:"#authenticator.authenticated"},{actions:["applyAmplifyConfig","setHasSetup"],target:"goToInitialState"}]}},goToInitialState:{always:[{cond:"isInitialStateSignUp",target:"#authenticator.signUpActor"},{cond:"isInitialStateResetPassword",target:"#authenticator.forgotPasswordActor"},{target:"#authenticator.signInActor"}]}}},getCurrentUser:{invoke:{src:"handleGetCurrentUser",onDone:{actions:"setUser",target:"#authenticator.authenticated"},onError:{target:"#authenticator.setup"}}},signInActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignInActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:xd("signInActor")}},on:{FORGOT_PASSWORD:"forgotPasswordActor",SELECT_METHOD:{actions:"forwardToActor"},SHOW_AUTH_METHODS:{actions:"forwardToActor"},SIGN_IN:"signInActor",SIGN_UP:"signUpActor","done.invoke.signInActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isResetPasswordStep",actions:"setActorDoneData",target:"#authenticator.forgotPasswordActor"},{cond:"isConfirmSignUpStep",actions:"setActorDoneData",target:"#authenticator.signUpActor"}]}},signUpActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignUpActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:xd("signUpActor")}},on:{SIGN_IN:"signInActor","done.invoke.signUpActor":[{cond:"hasCompletedAttributeConfirmation",target:"#authenticator.getCurrentUser"},{cond:"isShouldConfirmUserAttributeStep",actions:"setActorDoneData",target:"#authenticator.verifyUserAttributesActor"},{cond:"isConfirmUserAttributeStep",target:"#authenticator.verifyUserAttributesActor"},{actions:"setActorDoneData",target:"#authenticator.signInActor"}]}},forgotPasswordActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnForgotPasswordActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:xd("forgotPasswordActor")}},on:{SIGN_IN:"signInActor","done.invoke.forgotPasswordActor":[{target:"#authenticator.signInActor"}]}},verifyUserAttributesActor:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnVerifyUserAttributesActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:xd("verifyUserAttributesActor")}},on:{"done.invoke.verifyUserAttributesActor":[{actions:"setActorDoneData",target:"#authenticator.getCurrentUser"}]}},authenticated:{initial:"idle",states:{idle:{on:{TOKEN_REFRESH:"refreshUser"}},refreshUser:{invoke:{src:"#authenticator.getCurrentUser",onDone:{actions:"setUser",target:"idle"},onError:{target:"#authenticator.signOut"}}}},on:{SIGN_OUT:"signOut"}},signOut:{initial:"spawnActor",states:{spawnActor:{always:{actions:"spawnSignOutActor",target:"runActor"}},runActor:{entry:"clearActorDoneData",exit:xd("signOutActor")}},on:{"done.invoke.signOutActor":{actions:"clearUser",target:"setup.getConfig"}}}},on:{SIGN_IN_WITH_REDIRECT:{target:"#authenticator.getCurrentUser"},CHANGE:{actions:"forwardToActor"},BLUR:{actions:"forwardToActor"},SUBMIT:{actions:"forwardToActor"},FEDERATED_SIGN_IN:{actions:"forwardToActor"},RESEND:{actions:"forwardToActor"},SIGN_IN:{actions:"forwardToActor"},SKIP:{actions:"forwardToActor"}}},{actions:{...Jf,forwardToActor:Mle([{cond:"hasActor",actions:koe(({actorRef:o})=>o)}]),setActorDoneData:ha({actorDoneData:(o,a)=>({challengeName:a.data.challengeName,codeDeliveryDetails:a.data.codeDeliveryDetails,missingAttributes:a.data.missingAttributes,remoteError:a.data.remoteError,username:a.data.username,step:a.data.step,totpSecretCode:a.data.totpSecretCode,unverifiedUserAttributes:a.data.unverifiedUserAttributes,allowedMfaTypes:a.data.allowedMfaTypes})}),applyAmplifyConfig:ha({passwordlessCapabilities:(o,{data:a})=>a.passwordlessCapabilities,config(o,{data:a}){const{loginMechanisms:l=a.loginMechanisms??[],signUpAttributes:c=a.signUpAttributes??[],socialProviders:d=a.socialProviders??[],initialState:f,formFields:p,passwordSettings:m=a.passwordFormat??{},passwordless:g}=o.config;return l.length===0&&l.push("username"),{formFields:Lle(p)??{},initialState:f,loginMechanisms:l,passwordSettings:m,passwordless:g,signUpAttributes:c,socialProviders:d}}}),spawnSignInActor:ha({actorRef:(o,a)=>{const{services:l}=o,c=_le({services:l}).withContext(Kp(o,"SIGN_IN"));return wd(c,{name:"signInActor"})}}),spawnSignUpActor:ha({actorRef:(o,a)=>{const{services:l}=o,c=Tle({services:l}).withContext(Kp(o,"SIGN_UP"));return wd(c,{name:"signUpActor"})}}),spawnForgotPasswordActor:ha({actorRef:(o,a)=>{const{services:l}=o,c=wle({services:l}).withContext(Kp(o,"FORGOT_PASSWORD"));return wd(c,{name:"forgotPasswordActor"})}}),spawnVerifyUserAttributesActor:ha({actorRef:o=>{const a=Ole().withContext(Kp(o));return wd(a,{name:"verifyUserAttributesActor"})}}),spawnSignOutActor:ha({actorRef:o=>{const a=Rle().withContext({user:o?.user});return wd(a,{name:"signOutActor"})}}),configure:ha((o,a)=>{const{services:l,...c}=bF(n)?a.data??{}:n;return{services:{...ks,...l},config:c}}),setHasSetup:ha({hasSetup:!0})},guards:{...Ov,hasActor:({actorRef:o})=>!!o,isInitialStateSignUp:({config:o})=>o.initialState==="signUp",isInitialStateResetPassword:({config:o})=>o.initialState==="forgotPassword",shouldSetup:({hasSetup:o})=>!o,hasUser:({user:o})=>!!o},services:{getAmplifyConfig:({services:o})=>o.getAmplifyConfig(),handleGetCurrentUser:({services:o})=>o.getCurrentUser()}})}function Lle(e){return e&&Object.keys(e).forEach(t=>{Object.keys(e[t]).forEach(n=>{let r=e[t][n];r.required=r.isRequired})}),e}const Ule={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Fle={red:{10:{value:"hsl(0, 75%, 95%)"},20:{value:"hsl(0, 75%, 85%)"},40:{value:"hsl(0, 75%, 75%)"},60:{value:"hsl(0, 50%, 50%)"},80:{value:"hsl(0, 95%, 30%)"},90:{value:"hsl(0, 100%, 20%)"},100:{value:"hsl(0, 100%, 15%)"}},orange:{10:{value:"hsl(30, 75%, 95%)"},20:{value:"hsl(30, 75%, 85%)"},40:{value:"hsl(30, 75%, 75%)"},60:{value:"hsl(30, 50%, 50%)"},80:{value:"hsl(30, 95%, 30%)"},90:{value:"hsl(30, 100%, 20%)"},100:{value:"hsl(30, 100%, 15%)"}},yellow:{10:{value:"hsl(60, 75%, 95%)"},20:{value:"hsl(60, 75%, 85%)"},40:{value:"hsl(60, 75%, 75%)"},60:{value:"hsl(60, 50%, 50%)"},80:{value:"hsl(60, 95%, 30%)"},90:{value:"hsl(60, 100%, 20%)"},100:{value:"hsl(60, 100%, 15%)"}},green:{10:{value:"hsl(130, 60%, 95%)"},20:{value:"hsl(130, 60%, 90%)"},40:{value:"hsl(130, 44%, 63%)"},60:{value:"hsl(130, 43%, 46%)"},80:{value:"hsl(130, 33%, 37%)"},90:{value:"hsl(130, 27%, 29%)"},100:{value:"hsl(130, 22%, 23%)"}},teal:{10:{value:"hsl(190, 75%, 95%)"},20:{value:"hsl(190, 75%, 85%)"},40:{value:"hsl(190, 70%, 70%)"},60:{value:"hsl(190, 50%, 50%)"},80:{value:"hsl(190, 95%, 30%)"},90:{value:"hsl(190, 100%, 20%)"},100:{value:"hsl(190, 100%, 15%)"}},blue:{10:{value:"hsl(220, 95%, 95%)"},20:{value:"hsl(220, 85%, 85%)"},40:{value:"hsl(220, 70%, 70%)"},60:{value:"hsl(220, 50%, 50%)"},80:{value:"hsl(220, 95%, 30%)"},90:{value:"hsl(220, 100%, 20%)"},100:{value:"hsl(220, 100%, 15%)"}},purple:{10:{value:"hsl(300, 95%, 95%)"},20:{value:"hsl(300, 85%, 85%)"},40:{value:"hsl(300, 70%, 70%)"},60:{value:"hsl(300, 50%, 50%)"},80:{value:"hsl(300, 95%, 30%)"},90:{value:"hsl(300, 100%, 20%)"},100:{value:"hsl(300, 100%, 15%)"}},pink:{10:{value:"hsl(340, 95%, 95%)"},20:{value:"hsl(340, 90%, 85%)"},40:{value:"hsl(340, 70%, 70%)"},60:{value:"hsl(340, 50%, 50%)"},80:{value:"hsl(340, 95%, 30%)"},90:{value:"hsl(340, 100%, 20%)"},100:{value:"hsl(340, 100%, 15%)"}},neutral:{10:{value:"hsl(210, 5%, 98%)"},20:{value:"hsl(210, 5%, 94%)"},40:{value:"hsl(210, 5%, 87%)"},60:{value:"hsl(210, 10%, 58%)"},80:{value:"hsl(210, 10%, 40%)"},90:{value:"hsl(210, 25%, 25%)"},100:{value:"hsl(210, 50%, 10%)"}},primary:{10:{value:"{colors.teal.10.value}"},20:{value:"{colors.teal.20.value}"},40:{value:"{colors.teal.40.value}"},60:{value:"{colors.teal.60.value}"},80:{value:"{colors.teal.80.value}"},90:{value:"{colors.teal.90.value}"},100:{value:"{colors.teal.100.value}"}},secondary:{10:{value:"{colors.purple.10.value}"},20:{value:"{colors.purple.20.value}"},40:{value:"{colors.purple.40.value}"},60:{value:"{colors.purple.60.value}"},80:{value:"{colors.purple.80.value}"},90:{value:"{colors.purple.90.value}"},100:{value:"{colors.purple.100.value}"}},font:{primary:{value:"{colors.neutral.100.value}"},secondary:{value:"{colors.neutral.90.value}"},tertiary:{value:"{colors.neutral.80.value}"},disabled:{value:"{colors.neutral.60.value}"},inverse:{value:"{colors.white.value}"},interactive:{value:"{colors.primary.80.value}"},hover:{value:"{colors.primary.90.value}"},focus:{value:"{colors.primary.100.value}"},active:{value:"{colors.primary.100.value}"},info:{value:"{colors.blue.90.value}"},warning:{value:"{colors.orange.90.value}"},error:{value:"{colors.red.90.value}"},success:{value:"{colors.green.90.value}"}},background:{primary:{value:"{colors.white.value}"},secondary:{value:"{colors.neutral.10.value}"},tertiary:{value:"{colors.neutral.20.value}"},quaternary:{value:"{colors.neutral.60.value}"},disabled:{value:"{colors.background.tertiary.value}"},info:{value:"{colors.blue.10.value}"},warning:{value:"{colors.orange.10.value}"},error:{value:"{colors.red.10.value}"},success:{value:"{colors.green.10.value}"}},border:{primary:{value:"{colors.neutral.60.value}"},secondary:{value:"{colors.neutral.40.value}"},tertiary:{value:"{colors.neutral.20.value}"},disabled:{value:"{colors.border.tertiary.value}"},pressed:{value:"{colors.primary.100.value}"},focus:{value:"{colors.primary.100.value}"},error:{value:"{colors.red.80.value}"},info:{value:"{colors.blue.80.value}"},success:{value:"{colors.green.80.value}"},warning:{value:"{colors.orange.80.value}"}},shadow:{primary:{value:"hsla(210, 50%, 10%, 0.25)"},secondary:{value:"hsla(210, 50%, 10%, 0.15)"},tertiary:{value:"hsla(210, 50%, 10%, 0.05)"}},overlay:{5:{value:"hsla(0, 0%, 0%, 0.05)"},10:{value:"hsla(0, 0%, 0%, 0.1)"},20:{value:"hsla(0, 0%, 0%, 0.2)"},30:{value:"hsla(0, 0%, 0%, 0.3)"},40:{value:"hsla(0, 0%, 0%, 0.4)"},50:{value:"hsla(0, 0%, 0%, 0.5)"},60:{value:"hsla(0, 0%, 0%, 0.6)"},70:{value:"hsla(0, 0%, 0%, 0.7)"},80:{value:"hsla(0, 0%, 0%, 0.8)"},90:{value:"hsla(0, 0%, 0%, 0.9)"}},black:{value:"hsl(0, 0%, 0%)"},white:{value:"hsl(0, 0%, 100%)"},transparent:{value:"transparent"}},zle={alignItems:{value:"center"},justifyContent:{value:"space-between"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}}},$le={message:{backgroundColor:{value:"{colors.background.secondary.value}"},borderRadius:{value:"{radii.large.value}"},gap:{value:"{space.small.value}"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.small.value}"},user:{backgroundColor:{value:"{colors.background.secondary.value}"}},assistant:{backgroundColor:{value:"{colors.primary.10.value}"}},sender:{gap:{value:"{space.small.value}"},username:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"{fontWeights.bold.value}"}},timestamp:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"inherit"},fontWeight:{value:"inherit"}}},body:{gap:{value:"{space.xs.value}"}},actions:{gap:{value:"{space.xs.value}"}}},form:{gap:{value:"{space.small.value}"},padding:{value:"{space.small.value}"}},attachment:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},fontSize:{value:"{fontSizes.small.value}"},paddingBlock:{value:"{space.xxxs.value}"},paddingInline:{value:"{space.xs.value}"},gap:{value:"{space.xs.value}"},list:{padding:{value:"{space.xs.value}"},paddingBlockStart:{value:"0"},gap:{value:"{space.xxs.value}"}},name:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},size:{color:{value:"{colors.font.tertiary.value}"},fontSize:{value:"{fontSizes.small.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},remove:{padding:{value:"{space.xxs.value}"}},image:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}}}},jle={menu:{width:{value:"100%"},marginBlockStart:{value:"{space.xxxs}"},backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small}"},options:{display:{value:"flex"},flexDirection:{value:"column"},maxHeight:{value:"300px"}},option:{backgroundColor:{value:"{colors.background.primary}"},color:{value:"currentcolor"},cursor:{value:"pointer"},transitionDuration:{value:"{time.short}"},transitionProperty:{value:"background-color, color"},transitionTimingFunction:{value:"ease"},_active:{backgroundColor:{value:"{colors.primary.80}"},color:{value:"{colors.white}"}}},_empty:{display:{value:"flex"}},_loading:{alignItems:{value:"center"},display:{value:"flex"},gap:{value:"{space.xxxs}"}},spaceShared:{paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"}}}},Ble={maxWidth:{value:"60rem"},modal:{width:{value:"{space.relative.full}"},height:{value:"{space.relative.full}"},backgroundColor:{value:"{colors.overlay.50.value}"},top:{value:"{space.zero}"},left:{value:"{space.zero}"}},container:{widthMax:{value:"30rem"}},router:{borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.medium.value}"}},footer:{paddingBottom:{value:"{space.medium.value}"}},form:{padding:{value:"{space.xl.value}"}},state:{inactive:{backgroundColor:{value:"{colors.background.secondary.value}"}}},orContainer:{color:{value:"{colors.neutral.80.value}"},orLine:{backgroundColor:{value:"{colors.background.primary.value}"}}}},Hle={color:{value:"{colors.font.tertiary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},width:{value:"{fontSizes.xxl.value}"},height:{value:"{fontSizes.xxl.value}"},backgroundColor:{value:"{colors.background.tertiary}"},borderRadius:{value:"100%"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"{colors.border.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"{colors.border.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"{colors.border.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"{colors.border.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},width:{value:"{fontSizes.xl.value}"},height:{value:"{fontSizes.xl.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}}},qle={color:{value:"{colors.font.primary.value}"},lineHeight:{value:1},fontWeight:{value:"{fontWeights.semibold.value}"},fontSize:{value:"{fontSizes.small.value}"},textAlign:{value:"center"},paddingVertical:{value:"{space.xs.value}"},paddingHorizontal:{value:"{space.small.value}"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderRadius:{value:"{radii.xl.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"}},small:{fontSize:{value:"{fontSizes.xs.value}"},paddingVertical:{value:"{space.xxs.value}"},paddingHorizontal:{value:"{space.xs.value}"}},large:{fontSize:{value:"{fontSizes.medium.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"}}},Vle={flexDirection:{value:"row"},flexWrap:{value:"wrap"},gap:{value:"0"},color:{value:"{colors.font.tertiary}"},item:{flexDirection:{value:"row"},color:{value:"inherit"},fontSize:{value:"inherit"},alignItems:{value:"center"},lineHeight:{value:"1"}},separator:{color:{value:"inherit"},fontSize:{value:"inherit"},paddingInline:{value:"{space.xxs}"}},link:{color:{value:"{components.link.color}"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"},paddingInline:{value:"{space.xs}"},paddingBlock:{value:"{space.xxs}"},current:{color:{value:"inherit"},fontSize:{value:"inherit"},fontWeight:{value:"normal"},textDecoration:{value:"none"}}}},Wle={fontWeight:{value:"{fontWeights.bold.value}"},transitionDuration:{value:"{components.fieldcontrol.transitionDuration.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},lineHeight:{value:"{components.fieldcontrol.lineHeight.value}"},paddingBlockStart:{value:"{components.fieldcontrol.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.paddingInlineEnd.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},borderWidth:{value:"{components.fieldcontrol.borderWidth.value}"},borderStyle:{value:"{components.fieldcontrol.borderStyle.value}"},borderRadius:{value:"{components.fieldcontrol.borderRadius.value}"},color:{value:"{colors.font.primary.value}"},_hover:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.primary.60.value}"}},_focus:{color:{value:"{colors.font.focus.value}"},backgroundColor:{value:"{colors.primary.10.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{color:{value:"{colors.font.active.value}"},backgroundColor:{value:"{colors.primary.20.value}"},borderColor:{value:"{colors.primary.100.value}"}},_loading:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"}},outlined:{info:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"{colors.blue.60.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"}},_focus:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.blue.100.value}"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"{colors.orange.60.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"}},_focus:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.orange.100.value}"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"{colors.green.60.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"}},_focus:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.green.100.value}"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"{colors.red.80.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"}},_focus:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.red.100.value}"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_hover:{borderColor:{value:"{colors.overlay.60.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"}},_focus:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.neutral.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.neutral.100.value}"}}}},primary:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.font.inverse.value}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.100.value}"},color:{value:"{colors.font.inverse.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.100.value}"},color:{value:"{colors.font.inverse.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.100.value}"},color:{value:"{colors.font.inverse.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100.value}"},color:{value:"{colors.font.inverse.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.80}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.100.value}"},color:{value:"{colors.font.inverse.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.70}"},color:{value:"{colors.font.inverse.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.90.value}"},color:{value:"{colors.font.inverse.value}"}}}},menu:{borderWidth:{value:"{space.zero.value}"},backgroundColor:{value:"transparent"},justifyContent:{value:"start"},_hover:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_focus:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.80.value}"}},_active:{color:{value:"{colors.font.inverse.value}"},backgroundColor:{value:"{colors.primary.90.value}"}},_disabled:{color:{value:"{colors.font.disabled.value}"}}},link:{backgroundColor:{value:"transparent"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.interactive.value}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.hover.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.10.value}"},color:{value:"{colors.font.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.primary.20.value}"},color:{value:"{colors.font.active.value}"}},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled.value}"}},info:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.blue.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.10.value}"},color:{value:"{colors.blue.100.value}"},boxShadow:{value:"{components.fieldcontrol.info._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.blue.20.value}"},color:{value:"{colors.blue.100.value}"}}},warning:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.orange.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.10.value}"},color:{value:"{colors.orange.100.value}"},boxShadow:{value:"{components.fieldcontrol.warning._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.orange.20.value}"},color:{value:"{colors.orange.100.value}"}}},success:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.green.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.10.value}"},color:{value:"{colors.green.100.value}"},boxShadow:{value:"{components.fieldcontrol.success._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.green.20.value}"},color:{value:"{colors.green.100.value}"}}},error:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.red.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.90.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.10.value}"},color:{value:"{colors.red.100.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.20.value}"},color:{value:"{colors.red.100.value}"}}},overlay:{borderColor:{value:"transparent"},backgroundColor:{value:"transparent"},color:{value:"{colors.neutral.100}"},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.80.value}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.5.value}"},color:{value:"{colors.overlay.90.value}"},boxShadow:{value:"{components.fieldcontrol.overlay._focus.boxShadow.value}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.overlay.90.value}"}}}},warning:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.red.60}"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.red.60}"},_hover:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.font.error}"}},_focus:{borderColor:{value:"{colors.red.80}"},backgroundColor:{value:"{colors.red.10}"},color:{value:"{colors.red.80}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"{colors.red.100}"},backgroundColor:{value:"{colors.red.20}"},color:{value:"{colors.red.100}"}},_disabled:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"{colors.border.tertiary}"},backgroundColor:{value:"transparent"},color:{value:"{colors.font.disabled}"}}},destructive:{borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small}"},borderStyle:{value:"solid"},backgroundColor:{value:"{colors.red.60}"},color:{value:"{colors.font.inverse}"},_disabled:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_loading:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.background.disabled}"},color:{value:"{colors.font.disabled}"}},_hover:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"}},_focus:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.80}"},color:{value:"{colors.font.inverse}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow}"}},_active:{borderColor:{value:"transparent"},backgroundColor:{value:"{colors.red.100}"},color:{value:"{colors.font.inverse}"}}},small:{fontSize:{value:"{components.fieldcontrol.small.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.small.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.small.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.small.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.small.paddingInlineEnd.value}"}},large:{fontSize:{value:"{components.fieldcontrol.large.fontSize.value}"},paddingBlockStart:{value:"{components.fieldcontrol.large.paddingBlockStart.value}"},paddingBlockEnd:{value:"{components.fieldcontrol.large.paddingBlockEnd.value}"},paddingInlineStart:{value:"{components.fieldcontrol.large.paddingInlineStart.value}"},paddingInlineEnd:{value:"{components.fieldcontrol.large.paddingInlineEnd.value}"}},loaderWrapper:{alignItems:{value:"center"},gap:{value:"{space.xs.value}"}}},Gle={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"none"},padding:{value:"{space.medium.value}"},outlined:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{components.card.boxShadow.value}"}},elevated:{backgroundColor:{value:"{components.card.backgroundColor.value}"},borderRadius:{value:"{radii.xs.value}"},borderWidth:{value:"0"},borderStyle:{value:"solid"},borderColor:{value:"transparent"},boxShadow:{value:"{shadows.medium.value}"}}},Kle={cursor:{value:"pointer"},alignItems:{value:"center"},_disabled:{cursor:{value:"not-allowed"}},button:{position:{value:"relative"},alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},before:{width:{value:"100%"},height:{value:"100%"},borderWidth:{value:"{borderWidths.medium.value}"},borderRadius:{value:"20%"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"}},_focus:{outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{borderColor:{value:"{colors.border.error.value}"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},icon:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"20%"},opacity:{value:"{opacities.0.value}"},transform:{value:"scale(0)"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.short.value}"},transitionTimingFunction:{value:"ease-in-out"},_checked:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},_indeterminate:{opacity:{value:"{opacities.100.value}"},transform:{value:"scale(1)"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},Zle={alignItems:{value:"flex-start"},alignContent:{value:"center"},flexDirection:{value:"column"},justifyContent:{value:"center"}},Yle={pagination:{current:{color:{value:"{components.pagination.current.color}"},backgroundColor:{value:"{components.pagination.current.backgroundColor}"}},button:{color:{value:"{components.pagination.button.color}"},_hover:{backgroundColor:{value:"{components.pagination.button.hover.backgroundColor}"},color:{value:"{components.pagination.button.hover.color}"}},_disabled:{color:{value:"{components.pagination.button.disabled.color}"}}}},search:{input:{color:{value:"{components.searchfield.color}"}},button:{color:{value:"{components.searchfield.button.color}"},_active:{backgroundColor:{value:"{components.searchfield.button._active.backgroundColor}"},borderColor:{value:"{components.searchfield.button._active.borderColor}"},color:{value:"{components.searchfield.button._active.color}"}},_disabled:{backgroundColor:{value:"{components.searchfield.button._disabled.backgroundColor}"},borderColor:{value:"{components.searchfield.button._disabled.borderColor}"},color:{value:"{components.searchfield.button._disabled.color}"}},_focus:{backgroundColor:{value:"{components.searchfield.button._focus.backgroundColor}"},borderColor:{value:"{components.searchfield.button._focus.borderColor}"},color:{value:"{components.searchfield.button._focus.color}"}},_hover:{backgroundColor:{value:"{components.searchfield.button._hover.backgroundColor}"},borderColor:{value:"{components.searchfield.button._hover.borderColor}"},color:{value:"{components.searchfield.button._hover.color}"}}}}},Qle={fontSize:{value:"{fontSizes.xs}"},gap:{value:"{space.relative.medium}"},svg:{path:{fill:{value:"{colors.font.primary}"}}},toolTip:{bottom:{value:"{space.large}"},color:{value:"{colors.teal.100}"},fontSize:{value:"{fontSizes.xxs}"}}},Xle={height:{value:"{space.relative.full.value}"}},Jle={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.medium.value}"},label:{color:{value:"{colors.font.tertiary.value}"},paddingInline:{value:"{space.medium.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.background.primary.value}"}},small:{borderWidth:{value:"{borderWidths.small.value}"}},large:{borderWidth:{value:"{borderWidths.large.value}"}},opacity:{value:"{opacities.60.value}"}},ece={backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},color:{value:"{colors.font.primary}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.primary}"}},_disabled:{backgroundColor:{value:"{colors.background.disabled}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.disabled}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.disabled}"}},accepted:{backgroundColor:{value:"{colors.background.success}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.success}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.success}"}},rejected:{backgroundColor:{value:"{colors.background.error}"},borderRadius:{value:"{components.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.dropzone.borderStyle}"},borderWidth:{value:"{components.dropzone.borderWidth}"},color:{value:"{colors.font.error}"}}},tce={backgroundColor:{value:"{colors.background.primary.value}"},item:{borderColor:{value:"{colors.border.secondary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.small.value}"},trigger:{alignItems:{value:"center"},backgroundColor:{value:"{colors.background.primary.value}"},color:{value:"inherit"},gap:{value:"{space.small.value}"},justifyContent:{value:"space-between"},paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},_hover:{color:{value:"inherit"},backgroundColor:{value:"{colors.overlay.5.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0",offsetY:"0",blurRadius:"0",spreadRadius:"2px",color:"{colors.border.focus.value}"}}}},content:{color:{value:"inherit"},paddingInline:{value:"{space.small.value}"},paddingBlockEnd:{value:"{space.small.value}"},paddingBlockStart:{value:"{space.xxxs.value}"}},icon:{color:{value:"{colors.font.tertiary.value}"},transitionDuration:{value:"{time.medium.value}"},transitionTimingFunction:{value:"cubic-bezier(0.87, 0, 0.13, 1)"}}}},nce={gap:{value:"{space.xs.value}"},fontSize:{value:"{fontSizes.medium.value}"},flexDirection:{value:"column"},small:{gap:{value:"{space.xxxs.value}"},fontSize:{value:"{fontSizes.small.value}"}},large:{gap:{value:"{space.small.value}"},fontSize:{value:"{fontSizes.large.value}"}},label:{color:{value:"{colors.font.secondary.value}"}}},rce={borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.small.value}"},color:{value:"{colors.font.primary.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"},fontSize:{value:"{components.field.fontSize.value}"},lineHeight:{value:"{lineHeights.medium.value}"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},small:{fontSize:{value:"{components.field.small.fontSize.value}"},paddingBlockStart:{value:"{space.xxs.value}"},paddingBlockEnd:{value:"{space.xxs.value}"},paddingInlineStart:{value:"{space.small.value}"},paddingInlineEnd:{value:"{space.small.value}"}},large:{fontSize:{value:"{components.field.large.fontSize.value}"},paddingBlockStart:{value:"{space.xs.value}"},paddingBlockEnd:{value:"{space.xs.value}"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}},quiet:{borderStyle:{value:"none"},borderInlineStart:{value:"none"},borderInlineEnd:{value:"none"},borderBlockStart:{value:"none"},borderRadius:{value:"0"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderBlockEndColor:{value:"{colors.border.error.value}"},_focus:{borderBlockEndColor:{value:"transparent"},boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.focus.value}"}}},_disabled:{color:{value:"{colors.font.disabled.value}"},cursor:{value:"not-allowed"},borderColor:{value:"{colors.transparent.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},color:{value:"{colors.font.error.value}"},_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.border.error.value}"}}}},info:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.blue.100.value}"}}}},warning:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.orange.100.value}"}}}},success:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.green.100.value}"}}}},overlay:{_focus:{boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"2px",color:"{colors.overlay.90.value}"}}}}},oce={gap:{value:"{space.zero.value}"},vertical:{alignItems:{value:"center"}},outer:{alignItems:{value:"center"}}},ace={backgroundColor:{value:"transparent"},borderRadius:{value:"{radii.xs.value}"},flexDirection:{value:"column"},gap:{value:"{components.field.gap.value}"},legend:{color:{value:"{colors.font.primary.value}"},fontSize:{value:"{components.field.fontSize.value}"},fontWeight:{value:"{fontWeights.bold.value}"},lineHeight:{value:"{lineHeights.medium.value}"},small:{fontSize:"{components.field.small.fontSize.value}"},large:{fontSize:"{components.field.large.fontSize.value}"}},outlined:{padding:"{space.medium.value}",borderColor:"{colors.neutral.40.value}",borderWidth:"{borderWidths.small.value}",borderStyle:"solid",small:{padding:"{space.small.value}"},large:{padding:"{space.large.value}"}},small:{gap:"{components.field.small.gap.value}"},large:{gap:"{components.field.large.gap.value}"}},sce={error:{color:{value:"{colors.font.error.value}"},fontSize:{value:"{fontSizes.small.value}"}},description:{color:{value:"{colors.font.secondary.value}"},fontStyle:{value:"italic"},fontSize:{value:"{fontSizes.small.value}"}}},ice={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.fileuploader.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.fileuploader.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},lce={gap:{value:"{space.medium.value}"},justifyContent:{value:"normal"},alignItems:{value:"stretch"},alignContent:{value:"normal"},flexWrap:{value:"nowrap"}},cce={color:{value:"{colors.font.primary.value}"},lineHeight:{value:"{lineHeights.small.value}"},1:{fontSize:{value:"{fontSizes.xxxxl.value}"},fontWeight:{value:"{fontWeights.light.value}"}},2:{fontSize:{value:"{fontSizes.xxxl.value}"},fontWeight:{value:"{fontWeights.normal.value}"}},3:{fontSize:{value:"{fontSizes.xxl.value}"},fontWeight:{value:"{fontWeights.medium.value}"}},4:{fontSize:{value:"{fontSizes.xl.value}"},fontWeight:{value:"{fontWeights.semibold.value}"}},5:{fontSize:{value:"{fontSizes.large.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},6:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},uce={highlighted:{fontWeight:{value:"{fontWeights.bold}"}}},dce={lineHeight:{value:1},height:{value:"1em"}},fce={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},hce={maxWidth:{value:"100%"},height:{value:"auto"},objectFit:{value:"initial"},objectPosition:{value:"initial"}},pce={banner:{height:{value:"150px "},width:{value:"400px "}},button:{backgroundColor:{value:"#e8e8e8"},borderRadius:{value:"5px"},color:{value:"black"}},dialog:{height:{value:"50vh"},minHeight:{value:"400px"},minWidth:{value:"400px"},width:{value:"30vw"}},header:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.extrabold.value}"}}},mce={active:{color:{value:"{colors.font.active.value}"}},color:{value:"{colors.font.interactive.value}"},focus:{color:{value:"{colors.font.focus.value}"}},hover:{color:{value:"{colors.font.hover.value}"}},visited:{color:{value:"{colors.font.interactive.value}"}}},gce={cameraModule:{backgroundColor:{value:"{colors.background.primary.value}"}}},vce={width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},fontSize:{value:"{fontSizes.xs.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"},fontSize:{value:"{fontSizes.xxs.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"},fontSize:{value:"{fontSizes.small.value}"}},linear:{width:{value:"100%"},minWidth:{value:"5rem"},fontSize:{value:"{fontSizes.xxs.value}"},strokeWidth:{value:"{fontSizes.xxs.value}"},strokeFilled:{value:"{colors.primary.80.value}"},strokeEmpty:{value:"{colors.neutral.20.value}"},strokeLinecap:{value:"round"},animationDuration:{value:"1s"},small:{strokeWidth:{value:"{fontSizes.xxxs.value}"},fontSize:{value:"{fontSizes.xxxs.value}"}},large:{strokeWidth:{value:"{fontSizes.xs.value}"},fontSize:{value:"{fontSizes.xs.value}"}}},text:{fill:{value:"{colors.font.primary.value}"}}},yce={backgroundColor:{value:"{colors.background.primary.value}"},borderRadius:{value:"{radii.medium.value}"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderColor:{value:"{colors.border.primary.value}"},boxShadow:{value:"{shadows.large.value}"},flexDirection:{value:"column"},gap:{value:"{space.zero.value}"},maxWidth:{value:"30rem"},minWidth:{value:"14rem"},small:{width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"}},large:{width:{value:"{fontSizes.xxxl.value}"},height:{value:"{fontSizes.xxxl.value}"}},item:{minHeight:{value:"2.5rem"},paddingInlineStart:{value:"{space.medium.value}"},paddingInlineEnd:{value:"{space.medium.value}"}}},bce={alignItems:{value:"center"},backgroundColor:{value:"{colors.background.tertiary.value}"},borderColor:{value:"transparent"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},borderRadius:{value:"{radii.xs.value}"},color:{value:"{colors.font.primary.value}"},justifyContent:{value:"flex-start"},paddingBlock:{value:"{space.small.value}"},paddingInline:{value:"{space.medium.value}"},lineHeight:{value:"{lineHeights.small.value}"},icon:{size:{value:"{fontSizes.xl.value}"}},heading:{fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"}},dismiss:{gap:{value:"{space.xxs.value}"}},plain:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"}}},outlined:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.primary.value}"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.info.value}"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.error.value}"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.success.value}"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.warning.value}"}}},filled:{color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.background.secondary.value}"},borderColor:{value:"transparent"},info:{color:{value:"{colors.font.info.value}"},backgroundColor:{value:"{colors.background.info.value}"},borderColor:{value:"transparent"}},error:{color:{value:"{colors.font.error.value}"},backgroundColor:{value:"{colors.background.error.value}"},borderColor:{value:"transparent"}},success:{color:{value:"{colors.font.success.value}"},backgroundColor:{value:"{colors.background.success.value}"},borderColor:{value:"transparent"}},warning:{color:{value:"{colors.font.warning.value}"},backgroundColor:{value:"{colors.background.warning.value}"},borderColor:{value:"transparent"}}}},Sce={current:{alignItems:{value:"center"},justifyContent:{value:"center"},color:{value:"{colors.font.inverse.value}"},fontSize:{value:"{fontSizes.small.value}"},backgroundColor:{value:"{colors.overlay.40.value}"}},button:{color:{value:"{colors.font.primary.value}"},paddingInlineStart:{value:"{space.xxs.value}"},paddingInlineEnd:{value:"{space.xxs.value}"},transitionProperty:{value:"background-color"},transitionDuration:{value:"{time.medium.value}"},hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},disabled:{color:{value:"{colors.font.disabled.value}"}}},ellipsis:{alignItems:{value:"baseline"},justifyContent:{value:"center"},paddingInlineStart:{value:"{space.xs.value}"},paddingInlineEnd:{value:"{space.xs.value}"}},itemContainer:{marginLeft:{value:"{space.xxxs.value}"},marginRight:{value:"{space.xxxs.value}"}},itemShared:{height:{value:"{fontSizes.xxl.value}"},minWidth:{value:"{fontSizes.xxl.value}"},borderRadius:{value:"{fontSizes.medium.value}"}}},Cce={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_error:{color:{value:"{components.button.outlined.error.color.value}"},backgroundColor:{value:"{components.button.outlined.error.backgroundColor.value}"},borderColor:{value:"{components.button.outlined.error.borderColor.value}"},_active:{borderColor:{value:"{components.button.outlined.error._active.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._active.backgroundColor.value}"},color:{value:"{components.button.outlined.error._active.color.value}"}},_focus:{borderColor:{value:"{components.button.outlined.error._focus.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._focus.backgroundColor.value}"},color:{value:"{components.button.outlined.error._focus.color.value}"},boxShadow:{value:"{components.button.outlined.error._focus.boxShadow.value}"}},_hover:{borderColor:{value:"{components.button.outlined.error._hover.borderColor.value}"},backgroundColor:{value:"{components.button.outlined.error._hover.backgroundColor.value}"},color:{value:"{components.button.outlined.error._hover.color.value}"}}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},Ece={color:{value:"{components.fieldcontrol.color}"},borderColor:{value:"{components.fieldcontrol.borderColor}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}}},wce={borderRadius:{value:"{radii.small.value}"},transitionDuration:{value:"{time.long.value}"},startColor:{value:"{colors.background.secondary.value}"},endColor:{value:"{colors.background.tertiary.value}"},small:{height:{value:"{space.small.value}"}},default:{height:{value:"{space.medium.value}"}},large:{height:{value:"{space.large.value}"}}},xce={alignItems:{value:"center"},justifyContent:{value:"flex-start"},gap:{value:"inherit"},_disabled:{cursor:{value:"not-allowed"}},button:{alignItems:{value:"center"},justifyContent:{value:"center"},width:{value:"{fontSizes.medium.value}"},height:{value:"{fontSizes.medium.value}"},boxSizing:{value:"border-box"},borderWidth:{value:"{borderWidths.medium.value}"},borderStyle:{value:"solid"},borderRadius:{value:"50%"},borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.background.primary.value}"},backgroundColor:{value:"{colors.background.primary.value}"},transitionProperty:{value:"all"},transitionDuration:{value:"{time.medium.value}"},outlineColor:{value:"{colors.transparent.value}"},outlineStyle:{value:"solid"},outlineWidth:{value:"{outlineWidths.medium.value}"},outlineOffset:{value:"{outlineOffsets.medium.value}"},padding:{value:"{borderWidths.medium.value}"},small:{width:{value:"{fontSizes.small.value}"},height:{value:"{fontSizes.small.value}"}},large:{width:{value:"{fontSizes.large.value}"},height:{value:"{fontSizes.large.value}"}},_checked:{color:{value:"{colors.primary.80.value}"},_disabled:{color:{value:"{colors.background.disabled.value}"}}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},_error:{borderColor:{value:"{colors.border.error.value}"},_focus:{boxShadow:{value:"{components.fieldcontrol._error._focus.boxShadow.value}"}}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.primary.value}"}}},label:{color:{value:"{components.text.color.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"}}}},_ce={radio:{borderWidth:{value:"{components.radio.button.borderWidth}"},borderColor:{value:"{components.radio.button.borderColor}"},backgroundColor:{value:"{components.radio.button.backgroundColor}"},_checked:{color:{value:"{components.radio.button._checked.color}"}},label:{color:{value:"{components.radio.label.color}"}}},legend:{color:{value:"{components.fieldset.legend.color}"},fontWeight:{value:"{fontWeights.normal}"}}},Ice={large:{size:{value:"{fontSizes.xxxl.value}"}},default:{size:{value:"{fontSizes.xl.value}"}},small:{size:{value:"{fontSizes.small.value}"}},filled:{color:{value:"{colors.secondary.80.value}"}},empty:{color:{value:"{colors.background.tertiary.value}"}}},Ace={color:{value:"{components.fieldcontrol.color.value}"},button:{color:{value:"{components.button.color.value}"},backgroundColor:{value:"{colors.background.primary.value}"},_active:{backgroundColor:{value:"{components.button._active.backgroundColor.value}"},borderColor:{value:"{components.button._active.borderColor.value}"},color:{value:"{components.button._active.color.value}"}},_disabled:{backgroundColor:{value:"{components.button._disabled.backgroundColor.value}"},borderColor:{value:"{components.button._disabled.borderColor.value}"},color:{value:"{components.button._disabled.color.value}"}},_focus:{backgroundColor:{value:"{components.button._focus.backgroundColor.value}"},borderColor:{value:"{components.button._focus.borderColor.value}"},color:{value:"{components.button._focus.color.value}"}},_hover:{backgroundColor:{value:"{components.button._hover.backgroundColor.value}"},borderColor:{value:"{components.button._hover.borderColor.value}"},color:{value:"{components.button._hover.color.value}"}}}},Tce={color:{value:"{components.fieldcontrol.color}"},backgroundColor:{value:"{colors.background.primary.value}"},paddingInlineEnd:{value:"{space.xxl.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"}},wrapper:{flex:{value:"1"},display:{value:"block"},position:{value:"relative"},cursor:{value:"pointer"}},iconWrapper:{alignItems:{value:"center"},position:{value:"absolute"},top:{value:"50%"},right:{value:"{space.medium.value}"},transform:{value:"translateY(-50%)"},pointerEvents:{value:"none"},small:{right:{value:"{space.xs.value}"}},large:{right:{value:"{space.medium.value}"}}},option:{backgroundColor:{value:"transparent"},color:{value:"{colors.font.primary.value}"},_disabled:{color:{value:"{colors.font.disabled.value}"},backgroundColor:{value:"transparent"}}},whiteSpace:{value:"nowrap"},minWidth:{value:"6.5rem"},small:{minWidth:{value:"5.5rem"},paddingInlineEnd:{value:"{space.xl.value}"}},large:{minWidth:{value:"7.5rem"},paddingInlineEnd:{value:"{space.xxl.value}"}},expanded:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"},option:{paddingBlock:{value:"{space.xs.value}"},paddingInline:{value:"{space.small.value}"}}}},Rce={borderColor:{value:"{components.fieldcontrol.borderColor}"},color:{value:"{components.fieldcontrol.color}"},flexDirection:{value:"column"},fontSize:{value:"{components.fieldcontrol.fontSize}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor}"}},label:{color:{value:"{components.field.label.color}"}}},Oce={paddingBlock:{value:"{space.xs.value}"},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"9999px"},height:{value:"0.375rem"},minWidth:{value:"10rem"}},range:{backgroundColor:{value:"{colors.primary.80.value}"},borderRadius:{value:"9999px"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"}}},thumb:{width:{value:"1.25rem"},height:{value:"1.25rem"},backgroundColor:{value:"{colors.background.primary.value}"},boxShadow:{value:"{shadows.small.value}"},borderRadius:{value:"50%"},borderWidth:{value:"{borderWidths.medium.value}"},borderColor:{value:"{colors.border.primary.value}"},borderStyle:{value:"solid"},_disabled:{backgroundColor:{value:"{colors.background.disabled.value}"},borderColor:{value:"transparent"},boxShadow:{value:"none"}},_hover:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"{colors.border.focus.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}}},small:{track:{height:{value:"0.25rem"}},thumb:{width:{value:"1rem"},height:{value:"1rem"}}},large:{track:{height:{value:"0.625rem"}},thumb:{width:{value:"1.5rem"},height:{value:"1.5rem"}}}},Mce={borderColor:{value:"{components.fieldcontrol.borderColor}"},flexDirection:{value:"column"},input:{color:{value:"{components.fieldcontrol.color}"},fontSize:{value:"{components.fieldcontrol.fontSize}"},textAlign:{value:"center"}},button:{color:{value:"{components.button.color}"},backgroundColor:{value:"{colors.transparent}"},_active:{color:{value:"{components.button._active.color}"},backgroundColor:{value:"{components.button._active.backgroundColor}"}},_focus:{color:{value:"{components.button._focus.color}"},backgroundColor:{value:"{components.button._focus.backgroundColor}"}},_disabled:{color:{value:"{components.button._disabled.color}"},backgroundColor:{value:"{components.fieldcontrol._disabled.backgroundColor}"}},_hover:{color:{value:"{components.button._hover.color}"},backgroundColor:{value:"{components.button._hover.backgroundColor}"}}}},Nce={dropzone:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"dashed"},borderWidth:{value:"{borderWidths.small}"},gap:{value:"{space.small}"},paddingBlock:{value:"{space.xl}"},paddingInline:{value:"{space.large}"},textAlign:{value:"center"},_active:{backgroundColor:{value:"{colors.primary.10}"},borderRadius:{value:"{components.storagemanager.dropzone.borderRadius}"},borderColor:{value:"{colors.border.pressed}"},borderStyle:{value:"{components.storagemanager.dropzone.borderStyle}"},borderWidth:{value:"{borderWidths.medium}"}},icon:{color:{value:"{colors.border.primary}"},fontSize:{value:"{fontSizes.xxl}"}},text:{color:{value:"{colors.font.tertiary}"},fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"}}},file:{backgroundColor:{value:"{colors.background.primary}"},borderRadius:{value:"{radii.small}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},paddingBlock:{value:"{space.xs}"},paddingInline:{value:"{space.small}"},gap:{value:"{space.small}"},alignItems:{value:"baseline"},name:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},size:{fontSize:{value:"{fontSizes.small}"},fontWeight:{value:"{fontWeights.normal}"},color:{value:"{colors.font.tertiary}"}},image:{width:{value:"{space.xxl}"},height:{value:"{space.xxl}"},backgroundColor:{value:"{colors.background.secondary}"},color:{value:"{colors.font.tertiary}"},borderRadius:{value:"{radii.small}"}}},filelist:{flexDirection:{value:"column"},gap:{value:"{space.small}"}},loader:{strokeLinecap:{value:"round"},strokeEmpty:{value:"{colors.border.secondary}"},strokeFilled:{value:"{components.loader.strokeFilled}"},strokeWidth:{value:"{borderWidths.large}"}},previewer:{backgroundColor:{value:"{colors.background.primary}"},borderColor:{value:"{colors.border.primary}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small}"},borderRadius:{value:"{radii.small}"},paddingBlock:{value:"{space.zero}"},paddingInline:{value:"{space.zero}"},maxHeight:{value:"40rem"},maxWidth:{value:"auto"},text:{fontSize:{value:"{fontSizes.medium}"},fontWeight:{value:"{fontWeights.bold}"},color:{value:"{colors.font.primary}"}},body:{paddingBlock:{value:"{space.medium}"},paddingInline:{value:"{space.medium}"},gap:{value:"{space.small}"}},footer:{justifyContent:{value:"flex-end"}}}},Pce={_disabled:{opacity:{value:"{opacities.60.value}"}},_focused:{shadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"}},fontSize:{value:"{fontSizes.medium.value}"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}},label:{padding:{value:"{space.xs.value}"}},thumb:{backgroundColor:{value:"{colors.background.primary.value}"},borderColor:{value:"transparent"},borderWidth:{value:"{borderWidths.small.value}"},borderStyle:{value:"solid"},borderRadius:{value:"{radii.xxxl.value}"},checked:{transform:{value:"{transforms.slideX.medium.value}"}},transition:{duration:{value:"{time.medium.value}"}},width:{value:"{space.relative.medium.value}"}},track:{backgroundColor:{value:"{colors.background.quaternary.value}"},borderRadius:{value:"{radii.xxxl.value}"},checked:{backgroundColor:{value:"{colors.primary.80.value}"}},height:{value:"{space.relative.medium.value}"},padding:{value:"{outlineWidths.medium.value}"},transition:{duration:{value:"{time.short.value}"}},width:{value:"{space.relative.xl.value}"},_error:{backgroundColor:{value:"{colors.background.error.value}"}}}},kce={borderCollapse:{value:"collapse"},display:{value:"table"},width:{value:"100%"},head:{display:{value:"table-header-group"},verticalAlign:{value:"middle"}},body:{display:{value:"table-row-group"},verticalAlign:{value:"middle"}},foot:{display:{value:"table-footer-group"},verticalAlign:{value:"middle"}},row:{display:{value:"table-row"},verticalAlign:{value:"middle"},hover:{backgroundColor:{value:"{colors.background.tertiary.value}"}},striped:{backgroundColor:{value:"{colors.background.secondary.value}"}}},header:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},data:{borderColor:{value:"{colors.border.tertiary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.small.value}"},color:{value:"{colors.font.primary.value}"},display:{value:"table-cell"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.normal.value}"},padding:{value:"{space.medium.value}"},verticalAlign:{value:"middle"},large:{fontSize:{value:"{fontSizes.large.value}"},padding:{value:"{space.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"},padding:{value:"{space.xs.value}"}}},caption:{captionSide:{value:"bottom"},color:{value:"{colors.font.primary.value}"},display:{value:"table-caption"},fontSize:{value:"{fontSizes.medium.value}"},textAlign:{value:"center"},wordBreak:{value:"break-all"},large:{fontSize:{value:"{fontSizes.large.value}"}},small:{fontSize:{value:"{fontSizes.small.value}"}}}},Dce={backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},gap:{value:"0"},item:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.secondary.value}"},borderStyle:{value:"solid"},borderWidth:{value:"{borderWidths.medium.value}"},color:{value:"{colors.font.secondary.value}"},fontSize:{value:"{fontSizes.medium.value}"},fontWeight:{value:"{fontWeights.bold.value}"},paddingVertical:{value:"{space.small.value}"},paddingHorizontal:{value:"{space.medium.value}"},textAlign:{value:"center"},transitionDuration:{value:"{time.medium.value}"},_hover:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.hover.value}"}},_focus:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.focus.value}"},boxShadow:{value:{offsetX:"0px",offsetY:"0px",blurRadius:"0px",spreadRadius:"{borderWidths.medium}",color:"{colors.border.focus.value}"}},color:{value:"{colors.font.focus.value}"}},_active:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.font.interactive.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.interactive.value}"}},_disabled:{backgroundColor:{value:"transparent"},borderColor:{value:"{colors.border.tertiary.value}"},boxShadow:{value:"none"},color:{value:"{colors.font.disabled.value}"}}},panel:{backgroundColor:{value:"transparent"},paddingInline:{value:"0"},paddingBlock:{value:"{space.small.value}"}}},Lce={color:{value:"{colors.font.primary.value}"},primary:{color:{value:"{colors.font.primary.value}"}},secondary:{color:{value:"{colors.font.secondary.value}"}},tertiary:{color:{value:"{colors.font.tertiary.value}"}},error:{color:{value:"{colors.font.error.value}"}},warning:{color:{value:"{colors.font.warning.value}"}},success:{color:{value:"{colors.font.success.value}"}},info:{color:{value:"{colors.font.info.value}"}}},Uce={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},Fce={color:{value:"{components.fieldcontrol.color.value}"},borderColor:{value:"{components.fieldcontrol.borderColor.value}"},fontSize:{value:"{components.fieldcontrol.fontSize.value}"},_focus:{borderColor:{value:"{components.fieldcontrol._focus.borderColor.value}"}}},zce={borderColor:{value:"{colors.border.primary.value}"},color:{value:"{colors.font.primary.value}"},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"}},_focus:{borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.font.primary.value}"}},_active:{backgroundColor:{value:"{colors.transparent.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},borderColor:{value:"{colors.border.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{borderColor:{value:"{colors.border.pressed.value}"},color:{value:"{colors.font.primary.value}"},backgroundColor:{value:"{colors.overlay.20.value}"},_hover:{backgroundColor:{value:"{colors.overlay.30.value}"}}},primary:{backgroundColor:{value:"{colors.transparent.value}"},borderWidth:{value:"{borderWidths.small.value}"},_focus:{borderColor:{value:"{colors.border.focus.value}"},backgroundColor:{value:"{colors.transparent.value}"},boxShadow:{value:"{components.fieldcontrol._focus.boxShadow.value}"},color:{value:"{colors.font.primary.value}"}},_hover:{backgroundColor:{value:"{colors.overlay.10.value}"},color:{value:"{colors.font.primary.value}"}},_disabled:{borderColor:{value:"{colors.border.disabled.value}"},backgroundColor:{value:"{colors.background.disabled.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.primary.80.value}"},borderColor:{value:"{colors.primary.80.value}"},color:{value:"{colors.background.primary.value}"},_focus:{backgroundColor:{value:"{colors.border.focus.value}"},borderColor:{value:"{colors.border.focus.value}"},color:{value:"{colors.background.primary.value}"}},_hover:{borderColor:{value:"{colors.primary.60.value}"},backgroundColor:{value:"{colors.primary.60.value}"},boxShadow:{value:"{colors.primary.60.value}"},color:{value:"{colors.background.primary.value}"}}}},link:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"},_hover:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.50.value}"}},_disabled:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.font.disabled.value}"}},_pressed:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"},_focus:{backgroundColor:{value:"{colors.transparent.value}"},color:{value:"{colors.overlay.90.value}"}},_hover:{color:{value:"{colors.overlay.90.value}"},backgroundColor:{value:"{colors.transparent.value}"}}}}},$ce={alignItems:{value:"center"},alignContent:{value:"center"},justifyContent:{value:"flex-start"}},jce={accordion:tce,aiConversation:$le,alert:zle,authenticator:Ble,autocomplete:jle,avatar:Hle,badge:qle,breadcrumbs:Vle,button:Wle,card:Gle,checkbox:Kle,checkboxfield:Zle,collection:Yle,copy:Qle,countrycodeselect:Xle,divider:Jle,dropzone:ece,field:nce,fieldcontrol:rce,fieldgroup:oce,fieldmessages:sce,fieldset:ace,fileuploader:ice,flex:lce,heading:cce,icon:dce,highlightmatch:uce,image:hce,inappmessaging:pce,input:fce,link:mce,liveness:gce,loader:vce,menu:yce,message:bce,pagination:Sce,passwordfield:Cce,phonenumberfield:Ece,placeholder:wce,radio:xce,radiogroup:_ce,rating:Ice,searchfield:Ace,select:Tce,selectfield:Rce,sliderfield:Oce,stepperfield:Mce,storagemanager:Nce,switchfield:Pce,table:kce,tabs:Dce,text:Lce,textareafield:Uce,textfield:Fce,togglebutton:zce,togglebuttongroup:$ce},Bce={default:{variable:{value:`'InterVariable', 'Inter var', 'Inter', -apple-system, BlinkMacSystemFont,
21
+ 'Helvetica Neue', 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans',
22
+ sans-serif`},static:{value:`'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
23
+ 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif`}}},pa={xxxs:{value:"0.375rem"},xxs:{value:"0.5rem"},xs:{value:"0.75rem"},small:{value:"0.875rem"},medium:{value:"1rem"},large:{value:"1.25rem"},xl:{value:"1.5rem"},xxl:{value:"2rem"},xxxl:{value:"2.5rem"},xxxxl:{value:"3rem"}},Hce={hairline:{value:100},thin:{value:200},light:{value:300},normal:{value:400},medium:{value:500},semibold:{value:600},bold:{value:700},extrabold:{value:800},black:{value:900}},qce={small:{value:"1.25"},medium:{value:"1.5"},large:{value:"2"}},Vce={0:{value:"0"},10:{value:"0.1"},20:{value:"0.2"},30:{value:"0.3"},40:{value:"0.4"},50:{value:"0.5"},60:{value:"0.6"},70:{value:"0.7"},80:{value:"0.8"},90:{value:"0.9"},100:{value:"1"}},Wce={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Gce={small:{value:"1px"},medium:{value:"2px"},large:{value:"3px"}},Kce={xs:{value:"0.125rem"},small:{value:"0.25rem"},medium:{value:"0.5rem"},large:{value:"1rem"},xl:{value:"2rem"},xxl:{value:"4rem"},xxxl:{value:"8rem"}},Zce={small:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"4px",color:"{colors.shadow.tertiary.value}"}},medium:{value:{offsetX:"0px",offsetY:"2px",blurRadius:"6px",color:"{colors.shadow.secondary.value}"}},large:{value:{offsetX:"0px",offsetY:"4px",blurRadius:"12px",color:"{colors.shadow.primary.value}"}}},ma={zero:{value:"0"},xxxs:{value:"0.25rem"},xxs:{value:"0.375rem"},xs:{value:"0.5rem"},small:{value:"0.75rem"},medium:{value:"1rem"},large:{value:"1.5rem"},xl:{value:"2.0rem"},xxl:{value:"3.0rem"},xxxl:{value:"4.5rem"},relative:{xxxs:{value:"0.25em"},xxs:{value:"0.375em"},xs:{value:"0.5em"},small:{value:"0.75em"},medium:{value:"1em"},large:{value:"1.5em"},xl:{value:"2.0em"},xxl:{value:"3.0em"},xxxl:{value:"4.5em"},full:{value:"100%"}}},Yce={short:{value:"100ms"},medium:{value:"250ms"},long:{value:"500ms"}},Qce={slideX:{small:{value:"translateX(0.5em)"},medium:{value:"translateX(1em)"},large:{value:"translateX(2em)"}}},Xce={components:jce,borderWidths:Ule,colors:Fle,fonts:Bce,fontSizes:pa,fontWeights:Hce,lineHeights:qce,opacities:Vce,outlineOffsets:Wce,outlineWidths:Gce,radii:Kce,shadows:Zce,space:ma,time:Yce,transforms:Qce};pa.xxs,pa.xs,pa.small,pa.medium,pa.large,pa.xl,pa.xxl,pa.xxxl,ma.xxxs,ma.xs,ma.small,ma.medium,ma.large,ma.xl,ma.xxl,ma.xxxl;const Jce={values:{base:0,small:480,medium:768,large:992,xl:1280,xxl:1536},defaultBreakpoint:"base"},NF={tokens:Xce,breakpoints:Jce,name:"default-theme"};var dE,Z3;function eue(){if(Z3)return dE;Z3=1;function e(t,n,r,o){var a=-1,l=t==null?0:t.length;for(o&&l&&(r=t[++a]);++a<l;)r=n(r,t[a],a,t);return r}return dE=e,dE}var fE,Y3;function tue(){if(Y3)return fE;Y3=1;function e(t){return function(n){return t?.[n]}}return fE=e,fE}var hE,Q3;function nue(){if(Q3)return hE;Q3=1;var e=tue(),t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},n=e(t);return hE=n,hE}var pE,X3;function rue(){if(X3)return pE;X3=1;var e=nue(),t=S2(),n=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,r="\\u0300-\\u036f",o="\\ufe20-\\ufe2f",a="\\u20d0-\\u20ff",l=r+o+a,c="["+l+"]",d=RegExp(c,"g");function f(p){return p=t(p),p&&p.replace(n,e).replace(d,"")}return pE=f,pE}var mE,J3;function oue(){if(J3)return mE;J3=1;var e=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function t(n){return n.match(e)||[]}return mE=t,mE}var gE,e5;function aue(){if(e5)return gE;e5=1;var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function t(n){return e.test(n)}return gE=t,gE}var vE,t5;function sue(){if(t5)return vE;t5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,a="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",c="\\xac\\xb1\\xd7\\xf7",d="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",f="\\u2000-\\u206f",p=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",m="A-Z\\xc0-\\xd6\\xd8-\\xde",g="\\ufe0e\\ufe0f",v=c+d+f+p,S="['’]",C="["+v+"]",w="["+o+"]",x="\\d+",I="["+a+"]",T="["+l+"]",O="[^"+e+v+x+a+l+m+"]",D="\\ud83c[\\udffb-\\udfff]",P="(?:"+w+"|"+D+")",M="[^"+e+"]",L="(?:\\ud83c[\\udde6-\\uddff]){2}",z="[\\ud800-\\udbff][\\udc00-\\udfff]",G="["+m+"]",j="\\u200d",F="(?:"+T+"|"+O+")",q="(?:"+G+"|"+O+")",X="(?:"+S+"(?:d|ll|m|re|s|t|ve))?",Se="(?:"+S+"(?:D|LL|M|RE|S|T|VE))?",W=P+"?",ee="["+g+"]?",me="(?:"+j+"(?:"+[M,L,z].join("|")+")"+ee+W+")*",ge="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",$=ee+W+me,te="(?:"+[I,L,z].join("|")+")"+$,fe=RegExp([G+"?"+T+"+"+X+"(?="+[C,G,"$"].join("|")+")",q+"+"+Se+"(?="+[C,G+F,"$"].join("|")+")",G+"?"+F+"+"+X,G+"+"+Se,Te,ge,x,te].join("|"),"g");function ce(be){return be.match(fe)||[]}return vE=ce,vE}var yE,n5;function iue(){if(n5)return yE;n5=1;var e=oue(),t=aue(),n=S2(),r=sue();function o(a,l,c){return a=n(a),l=c?void 0:l,l===void 0?t(a)?r(a):e(a):a.match(l)||[]}return yE=o,yE}var bE,r5;function lue(){if(r5)return bE;r5=1;var e=eue(),t=rue(),n=iue(),r="['’]",o=RegExp(r,"g");function a(l){return function(c){return e(n(t(c).replace(o,"")),l,"")}}return bE=a,bE}var SE,o5;function cue(){if(o5)return SE;o5=1;var e=lue(),t=e(function(n,r,o){return n+(o?"-":"")+r.toLowerCase()});return SE=t,SE}var uue=cue();const PF=Xc(uue),due=/\{([^}]+)\}/g;function kF(e){const t=new RegExp(due);if(typeof e=="string")return t.test(e);if(typeof e=="object"){let n=!1;for(const r in e)if(Ta(e,r)){const o=e[r];if(kF(o)){n=!0;break}}return n}return!1}const fue="amplify";function fx(e){return Object.entries(e).map(([t,n])=>{const r=Nv(n)?n.toString():DF({value:n});return`${PF(t)}:${r}; `}).join(" ")}function I2({path:e=[]}){return`${PF([fue,...e].join(" "))}`}const hue=["offsetX","offsetY","blurRadius","spreadRadius","color"];function DF(e){const{value:t}=e;return Aa(t)?s5(t):a5(t)?hue.map(n=>s5(a5(e)?e[n]:t[n])).join(" "):t}function Nv(e){return Nr(e)&&Ta(e,"value")}function a5(e){return Nr(e)&&Ta(e,"offsetX")}function s5(e){if(!e)return"";if(kF(e)){const t=e.replace(/\{|\}/g,"").replace(".value","").split(".");return`var(--${I2({path:t})})`}return e}const i5=({token:e,path:t})=>{const n=`--${I2({path:t})}`,{value:r}=e,o=DF(e);return{name:n,original:r,path:t,value:o,toString:()=>`var(${n})`}};function hx({tokens:e,path:t=[],setupToken:n}){if(Ta(e,"value"))return n({token:e,path:t});const r={};for(const o in e)if(Ta(e,o)){const a=e[o],l=Nr(a)?a:{value:a};r[o]=hx({tokens:l,path:t.concat(o),setupToken:n})}return r}function px(e,t){t=t||[];for(var n in e)Ta(e,n)&&(Nr(e[n])&&"value"in e[n]?t.push(e[n]):Nr(e[n])&&px(e[n],t));return t}function LF(e,t,n){if(e==null)return{};var r,o,a,l,c,d,f=e[0]||{},p=1,m=e.length;for(n=n||[],typeof f!="object"&&(f={});p<m;p++)if((c=e[p])!=null){for(l in c)if(Ta(c,l)&&l!=="__proto__"&&(r=f[l],a=c[l],f!==a))if(a&&(Nr(a)||(o=Array.isArray(a)))){o?(o=!1,d=r&&Array.isArray(r)?r:[]):d=r&&Nr(r)?r:{};var g=n.slice(0);g.push(l),f[l]=LF([d,a],t,g)}else a!==void 0&&(f[l]=a)}return f}function l5(e,t){return t?`${e} { ${Object.entries(t).map(([n,r])=>`--${n}:${r}; `).join(" ")}}
24
+ `:""}function bs(e,t){let n="";const{_modifiers:r={},_element:o={},_vars:a,...l}=t;if(Object.keys(l).length){const[c,d]=pae(l,f=>f.startsWith(":")||f.startsWith("["));Object.entries(c).forEach(([f,p])=>{const{_modifiers:m={},_element:g={},_vars:v,...S}=p;n+=`${e}${f} { ${fx(S)} }
25
+ `,n+=l5(`${e}${f}`,v)}),n+=`${e} { ${fx(d)} }
26
+ `}return n+=l5(e,a),Object.entries(r).forEach(([c,d])=>{d&&Object.keys(d).length&&(n+=bs(`${e}--${c}`,d))}),Object.entries(o).forEach(([c,d])=>{d&&Object.keys(d).length&&(n+=bs(`${e}__${c}`,d))}),n}function pue({theme:e,components:t}){let n="";const{tokens:r,name:o,breakpoints:a}=e;return t.forEach(({name:l,theme:c,overrides:d})=>{const f=`amplify-${l}`,p=`[data-amplify-theme="${o}"] .${f}`,m=Ra(c)?c(r):c;n+=bs(p,m),d&&d.forEach(g=>{const v=Ra(g.theme)?g.theme(r):g.theme;if("mediaQuery"in g&&(n+=`@media (${g.mediaQuery}) {
27
+ ${bs(p,v)}
28
+ }`),"breakpoint"in g){const S=a.values[g.breakpoint];n+=`
29
+ @media (min-width: ${S}px) {
30
+ ${bs(p,v)}
31
+ }`}"selector"in g&&(n+=bs(`${g.selector} .${f}`,v)),"colorMode"in g&&(n+=`
32
+ @media (prefers-color-scheme: ${g.colorMode}) {
33
+ ${bs(`[data-amplify-theme="${o}"][data-amplify-color-mode="system"] .${f}`,v)}
34
+ }
35
+ `,n+=bs(`[data-amplify-theme="${o}"][data-amplify-color-mode="${g.colorMode}"] .${f}`,v))})}),n}function c5({keys:e,value:t}){return e.reduce((n,r)=>({...n,[r]:{value:`{colors.${t}.${r}.value}`}}),{})}function mue({animations:e,tokens:t}){let n="";return Object.entries(e).forEach(([r,o])=>{n+=`
36
+ @keyframes ${r} {`,Object.entries(o).forEach(([a,l])=>{n+=`
37
+ ${a} {
38
+ `;const c=Ra(l)?l(t):l;n+=fx(c),n+=`
39
+ }`}),n+=`
40
+ }`}),n}function Pv(e,t=NF){const n=LF([{},t,{...e,components:{}}]),{primaryColor:r,secondaryColor:o}=n;Aa(r)&&(n.tokens.colors.primary=c5({keys:Object.keys(n.tokens.colors[r]),value:r})),Aa(o)&&(n.tokens.colors.secondary=c5({keys:Object.keys(n.tokens.colors[o]),value:o}));const a=hx({tokens:n.tokens,setupToken:i5}),{breakpoints:l,name:c}=n;let d=`[data-amplify-theme="${c}"] {
41
+ `+px(a).map(p=>`${p.name}: ${p.value};`).join(`
42
+ `)+`
43
+ }
44
+ `;e?.components&&(d+=pue({theme:{...n,tokens:a},components:e.components}));let f=[];return n.animations&&(d+=mue({animations:n.animations,tokens:a})),n.overrides&&(f=n.overrides.map(p=>{const m=hx({tokens:p.tokens,setupToken:i5}),g=px(m).map(v=>`${v.name}: ${v.value};`).join(`
45
+ `);if("selector"in p&&(d+=`
46
+ ${p.selector} {
47
+ ${g}
48
+ }
49
+ `),"mediaQuery"in p&&(d+=`
50
+ @media (${p.mediaQuery}) {
51
+ [data-amplify-theme="${c}"] {
52
+ ${g}
53
+ }
54
+ }
55
+ `),"breakpoint"in p){const v=n.breakpoints.values[p.breakpoint];d+=`
56
+ @media (min-width: ${v}px) {
57
+ [data-amplify-theme="${c}"] {
58
+ ${g}
59
+ }
60
+ }
61
+ `}return"colorMode"in p&&(d+=`
62
+ @media (prefers-color-scheme: ${p.colorMode}) {
63
+ [data-amplify-theme="${c}"][data-amplify-color-mode="system"] {
64
+ ${g}
65
+ color-scheme: ${p.colorMode};
66
+ }
67
+ }
68
+ `,d+=`
69
+ [data-amplify-theme="${c}"][data-amplify-color-mode="${p.colorMode}"] {
70
+ ${g}
71
+ color-scheme: ${p.colorMode};
72
+ }
73
+ `),{...p,tokens:m}})),{tokens:a,breakpoints:l,name:c,cssText:d,containerProps:({colorMode:p}={})=>({"data-amplify-theme":c,"data-amplify-color-mode":p}),overrides:f}}const $e=(...e)=>{const t=[];for(const n of e)if(n){if(Aa(n)){t.push(n);continue}if(typeof n=="number"){t.push(n.toString());continue}if(Array.isArray(n)){t.push($e(...n));continue}if(Nr(n)){if(n.toString!==Object.prototype.toString&&n.toString()!=="[object Object]"){t.push(n.toString());continue}for(const r in n)Ta(n,r)&&n[r]&&t.push(r)}}return t.join(" ")},ie={Alert:"amplify-alert",AlertIcon:"amplify-alert__icon",AlertHeading:"amplify-alert__heading",AlertBody:"amplify-alert__body",AlertDismiss:"amplify-alert__dismiss",Button:"amplify-button",ButtonLoaderWrapper:"amplify-button__loader-wrapper",CountryCodeSelect:"amplify-countrycodeselect",DialCodeSelect:"amplify-dialcodeselect",Divider:"amplify-divider",Field:"amplify-field",FieldDescription:"amplify-field__description",FieldErrorMessage:"amplify-field__error-message",FieldGroup:"amplify-field-group",FieldGroupControl:"amplify-field-group__control",FieldGroupOuterEnd:"amplify-field-group__outer-end",FieldGroupOuterStart:"amplify-field-group__outer-start",FieldGroupInnerEnd:"amplify-field-group__inner-end",FieldGroupInnerStart:"amplify-field-group__inner-start",FieldGroupHasInnerEnd:"amplify-field-group--has-inner-end",FieldGroupHasInnerStart:"amplify-field-group--has-inner-start",FieldShowPassword:"amplify-field__show-password",FieldGroupFieldWrapper:"amplify-field-group__field-wrapper",Fieldset:"amplify-fieldset",FieldsetLegend:"amplify-fieldset__legend",Flex:"amplify-flex",Heading:"amplify-heading",Icon:"amplify-icon",Input:"amplify-input",Label:"amplify-label",Loader:"amplify-loader",LoaderLabel:"amplify-loader__label",PasswordField:"amplify-passwordfield",PhoneNumberField:"amplify-phonenumberfield",Radio:"amplify-radio",RadioButton:"amplify-radio__button",RadioInput:"amplify-radio__input",RadioLabel:"amplify-radio__label",RadioGroupField:"amplify-radiogroupfield",RadioGroup:"amplify-radiogroup",Select:"amplify-select",SelectField:"amplify-selectfield",SelectWrapper:"amplify-select__wrapper",SelectIcon:"amplify-select__icon",Tabs:"amplify-tabs",TabsList:"amplify-tabs__list",TabsItem:"amplify-tabs__item",TabsPanel:"amplify-tabs__panel",Text:"amplify-text",TextField:"amplify-textfield",VisuallyHidden:"amplify-visually-hidden"},gue=({componentName:e,packageName:t,version:n})=>{const r=[`ui-${t}`,n];switch(e){case"AIConversation":{da({...Joe,additionalDetails:[[e],r]});break}case"Authenticator":{da({...tae,additionalDetails:[[e],r]});break}case"ChangePassword":case"DeleteUser":{da({...eae,additionalDetails:[["AccountSettings"],r]});break}case"FileUploader":{da({...nae,additionalDetails:[[e],r]});break}case"InAppMessaging":{da({...rae,additionalDetails:[[e],r]});break}case"LocationSearch":{da({...oae,additionalDetails:[[e],r]});break}case"MapView":{da({...aae,additionalDetails:[[e],r]});break}case"StorageManager":{da({...sae,additionalDetails:[[e],r]});break}case"StorageBrowser":{da({...iae,additionalDetails:[[e],r]});break}}return hae},mx=B.createContext(null),vue=e=>(t,n)=>{SF(t,n,e)};function UF({children:e}){const[t,n]=B.useState("configuring");B.useEffect(()=>{ev().then(()=>{n("authenticated")}).catch(()=>{n("unauthenticated")})},[]);const r=_.useContext(mx),o=zoe(Dle),a=_.useMemo(()=>r??{authStatus:t,service:o},[t,r,o]),{service:l}=a;return _.useEffect(()=>mae(l,vue({onSignIn:()=>{n("authenticated")},onSignOut:()=>{n("unauthenticated")}})),[l]),B.createElement(mx.Provider,{value:a},e)}const yue="`useAuthenticator` must be used inside an `Authenticator.Provider`.",bue=["confirmResetPassword","confirmSignIn","confirmSignUp","confirmVerifyUser","forceNewPassword","forgotPassword","selectMfaType","setupEmail","setupTotp","signIn","signUp","verifyUser"],Sue=e=>bue.some(t=>t===e),Cue=()=>!1;function Eue(e,t){return e.length!==t.length?!1:e.every((n,r)=>{const o=t[r];return dae(n,o)||fae(n,o)?!0:n===o})}const wue=e=>(t,n)=>{const r=e(t),o=e(n);return Eue(r,o)},xue=e=>({...Cf(e)?.formFields?.setupTotp?.QR}),_ue=e=>e.flatMap(([t,n])=>({name:t,...n})),Iue=(e={})=>e&&Object.entries(e).map(([t,n])=>!Aa(n)||!t?{}:{name:t,label:n,type:"radio",value:n}),Aue=(e=[])=>e.map(t=>({name:"mfa_type",label:Sn.getMfaTypeLabelByValue(t),type:"radio",value:t})),Tue=(e,t)=>Sue(e)?e==="verifyUser"?Iue(Cf(t).unverifiedUserAttributes):e==="selectMfaType"?Aue(Cf(t).allowedMfaTypes):_ue(Zae(e,t)):[];function ht(e){const t=B.useContext(mx);if(!t)throw new Error(yue);const{service:n}=t,{send:r}=n,o=_.useCallback(C=>({...Sae({send:r,state:C})}),[r]),a=e?wue(e):Cue,{authStatus:l}=t,c=Voe(n,o,a),{route:d,totpSecretCode:f,user:p,...m}=c,g=n.getSnapshot(),v=d==="setupTotp"?xue(g):null,S=Tue(d,g);return{...m,authStatus:l,route:d,totpSecretCode:f,user:p,fields:S,QRFields:v}}const Rue=({route:e})=>[e];function Oue(e){const{route:t,initializeMachine:n}=ht(Rue),r=B.useRef(!1);B.useEffect(()=>{!r.current&&t==="setup"&&(n(e),r.current=!0)},[n,t,e])}const Mue=({shouldWarn:e,message:t})=>{_.useEffect(()=>{},[e,t])};function Nue({componentName:e,packageName:t,version:n}){_.useEffect(()=>gue({componentName:e,packageName:t,version:n}),[e,t,n])}const FF=_.createContext({theme:Pv(),colorMode:void 0}),A2={alignContent:"alignContent",alignItems:"alignItems",alignSelf:"alignSelf",area:"gridArea",aspectRatio:"aspectRatio",autoColumns:"gridAutoColumns",autoFlow:"gridAutoFlow",autoRows:"gridAutoRows",backgroundColor:"backgroundColor",backgroundImage:"backgroundImage",basis:"flexBasis",border:"border",borderRadius:"borderRadius",borderColor:"borderColor",borderWidth:"borderWidth",borderStyle:"borderStyle",bottom:"bottom",boxShadow:"boxShadow",color:"color",column:"gridColumn",columnEnd:"gridColumnEnd",columnGap:"columnGap",columnSpan:"gridColumn",columnStart:"gridColumnStart",direction:"flexDirection",display:"display",flex:"flex",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:"fontStyle",fontWeight:"fontWeight",gap:"gap",grow:"flexGrow",height:"height",justifyContent:"justifyContent",left:"left",letterSpacing:"letterSpacing",lineHeight:"lineHeight",margin:"margin",marginBlock:"marginBlock",marginBlockEnd:"marginBlockEnd",marginBlockStart:"marginBlockStart",marginBottom:"marginBlockEnd",marginInline:"marginInline",marginInlineEnd:"marginInlineEnd",marginInlineStart:"marginInlineStart",marginLeft:"marginInlineStart",marginRight:"marginInlineEnd",marginTop:"marginBlockStart",maxHeight:"maxHeight",maxWidth:"maxWidth",minHeight:"minHeight",minWidth:"minWidth",objectFit:"objectFit",objectPosition:"objectPosition",opacity:"opacity",order:"order",overflow:"overflow",padding:"padding",paddingBlock:"paddingBlock",paddingBlockEnd:"paddingBlockEnd",paddingBlockStart:"paddingBlockStart",paddingBottom:"paddingBlockEnd",paddingInline:"paddingInline",paddingInlineEnd:"paddingInlineEnd",paddingInlineStart:"paddingInlineStart",paddingLeft:"paddingInlineStart",paddingRight:"paddingInlineEnd",paddingTop:"paddingBlockStart",position:"position",resize:"resize",right:"right",row:"gridRow",rowEnd:"gridRowEnd",rowGap:"rowGap",rowSpan:"gridRow",rowStart:"gridRowStart",shrink:"flexShrink",templateAreas:"gridTemplateAreas",templateColumns:"gridTemplateColumns",templateRows:"gridTemplateRows",textAlign:"textAlign",textDecoration:"textDecoration",textTransform:"textTransform",top:"top",transform:"transform",transformOrigin:"transformOrigin",width:"width",whiteSpace:"whiteSpace",wrap:"flexWrap"},T2={Alert:{dismissButtonLabel:"Dismiss alert"},PhoneNumberField:{countryCodeLabel:"Country code"},PasswordField:{passwordIsHidden:"Password is hidden",passwordIsShown:"Password is shown",showPassword:"Show password"}},gx={backgroundColor:"colors",borderColor:"colors",borderWidth:"borderWidths",color:"colors",borderRadius:"radii",fontSize:"fontSizes",fontWeight:"fontWeights",fontFamily:"fonts",lineHeight:"lineHeights",opacity:"opacities",boxShadow:"shadows",transform:"transforms",left:"space",right:"space",top:"space",bottom:"space",height:"space",width:"space",letterSpacing:"space",margin:"space",marginBlock:"space",marginBlockEnd:"space",marginBlockStart:"space",marginInline:"space",marginInlineEnd:"space",marginInlineStart:"space",marginLeft:"space",marginRight:"space",marginTop:"space",marginBottom:"space",maxHeight:"space",maxWidth:"space",minHeight:"space",minWidth:"space",padding:"space",paddingBlock:"space",paddingBlockEnd:"space",paddingBlockStart:"space",paddingInline:"space",paddingInlineEnd:"space",paddingInlineStart:"space",paddingLeft:"space",paddingRight:"space",paddingTop:"space",paddingBottom:"space",gap:"space",columnGap:"space",rowGap:"space"},Pue=e=>e in gx,zF=e=>typeof e=="string"&&e.length===0,u5=e=>e==null||zF(e),kv=e=>Object.keys(e),R2=(e,t,n)=>{if(typeof t!="string")return t;if(t.includes(" "))return t.split(" ").map(r=>R2(e,r,n)).join(" ");if(Pue(e)){const r=t.split("."),o=gx[e];let a=n[o];for(let l=0;l<r.length;l++){if(a){a=a[r[l]];continue}break}return Nv(a)?`var(--${I2({path:[gx[e],...r]})})`:t}return t},kue=({breakpoint:e,breakpoints:t,values:n})=>{const r=n[e];if(r!==void 0)return r;const o=kv(t).sort((l,c)=>t[c]-t[l]),a=o.slice(o.indexOf(e));for(const l of a){const c=n[l];if(c!==void 0)return c}return null},Due=e=>kv(e).reduce((t,n)=>n in NF.breakpoints.values?{...t,[n]:e[n]}:t,{}),Lue=({breakpoint:e,breakpoints:t,values:n})=>{let r={};const o=kv(t).sort((a,l)=>t[a]-t[l]);return Array.isArray(n)?n.forEach((a,l)=>{r[o[l]]=a}):typeof n=="object"&&(r=Due(n)),kue({breakpoint:e,breakpoints:t,values:r})},Uue=({breakpoints:e})=>{const t=kv(e).sort((n,r)=>e[r]-e[n]);return t.map((n,r)=>{let o="";const a=e[n],l=t[r-1],c=l?e[l]-1:null;return a>=0&&(o=`(min-width: ${a}px)`),c!==null&&(o&&(o+=" and "),o+=`(max-width: ${c}px)`),{breakpoint:n,query:o,maxWidth:c,minWidth:a}})},Fue=typeof window>"u"?_.useEffect:_.useLayoutEffect,zue=({breakpoints:e,defaultBreakpoint:t})=>{const r=typeof window<"u"&&typeof window.matchMedia<"u"?window.matchMedia:null,o=_.useMemo(()=>Uue({breakpoints:e}),[e]),[a,l]=_.useState(t),c=_.useCallback((d,f)=>{d&&l(f)},[l]);return Fue(()=>{if(!r)return;const d=o.map(({query:f,breakpoint:p})=>{const m=r(f);c(m.matches,p);const g=v=>{v.matches&&l(p)};return m.addEventListener("change",g),()=>m.removeEventListener("change",g)});return()=>{d.forEach(f=>f())}},[e,l,r,o]),_.useDebugValue(a,d=>d),a},$ue=e=>typeof e>"u"||typeof e.theme>"u"?Pv():e.theme,jue=()=>{const e=_.useContext(FF);return $ue(e)},Bue=({value:e,propKey:t,tokens:n})=>Nv(e)?e.toString():Aa(e)?Aa(t)?R2(t,e,n):e:null,Hue=e=>e==="auto"||typeof e=="number"&&!isNaN(e)||typeof e=="string"&&!isNaN(parseFloat(e)),CE=e=>e==="auto"?"auto":`span ${e}`,d5=e=>Hue(e)?CE(e):Array.isArray(e)?e.map(t=>CE(t)):typeof e=="object"&&e!=null?Object.entries(e).reduce((t,[n,r])=>({...t,[n]:CE(r)}),{}):null,que=e=>{const{rowSpan:t,columnSpan:n,row:r,column:o,...a}=e,{rowFromSpanValue:l,columnFromSpanValue:c}=_.useMemo(()=>({rowFromSpanValue:d5(t),columnFromSpanValue:d5(n)}),[t,n]);return{row:u5(r)?l:r,column:u5(o)?c:o,...a}},Vue=e=>e in A2,Wue=({props:e={},style:t={},breakpoint:n,breakpoints:r,tokens:o})=>{const a={};return Object.keys(e).filter(l=>e[l]!==null).forEach(l=>{if(Vue(l)){const c=e[l];if(c==null||zF(c))return;const d=A2[l];let f="";Nv(c)?f=c.toString():typeof c=="string"?f=R2(l,c,o):typeof c=="number"?f=c:typeof c=="object"&&(f=Bue({propKey:l,tokens:o,value:Lue({values:c,breakpoint:n,breakpoints:r})})),t={...t,[d]:f}}else typeof e[l]<"u"&&(a[l]=e[l])}),{propStyles:t,nonStyleProps:a}},Gue=(e,t)=>{const{breakpoints:{values:n,defaultBreakpoint:r},tokens:o}=jue(),a=zue({breakpoints:n,defaultBreakpoint:r}),l=que(e);return _.useMemo(()=>Wue({props:l,style:t,breakpoint:a,breakpoints:n,tokens:o}),[l,t,n,a,o])},kt=e=>_.forwardRef(e),Kue=({as:e="div",children:t,testId:n,ariaLabel:r,isDisabled:o,style:a,inert:l,...c},d)=>{const{propStyles:f,nonStyleProps:p}=Gue(c,a);return _.createElement(e,{"aria-label":r,"data-testid":n,disabled:o,ref:d,inert:l?"":null,style:f,...p},t)},je=kt(Kue);je.displayName="View";const _d={minX:0,minY:0,width:24,height:24},Zue=({className:e,as:t="svg",fill:n="currentColor",pathData:r,viewBox:o=_d,children:a,paths:l,...c},d)=>{const f=o.minX??_d.minX,p=o.minY??_d.minY,m=o.width??_d.width,g=o.height??_d.height;let v;return a&&(v=a),l&&(v=l.map((S,C)=>_.createElement("path",{...S,key:C}))),r&&(v=_.createElement("path",{d:r,fill:n})),_.createElement(je,{as:t,className:$e(ie.Icon,e),ref:d,viewBox:`${f} ${p} ${m} ${g}`,...c},v)},$F=kt(Zue);$F.displayName="Icon";const Yue=_.createContext({});function Dv(e){const t=_.useContext(Yue);if(e&&t)return t[e]}const Que=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM16.59 7.58L10 14.17L7.41 11.59L6 13L10 17L18 9L16.59 7.58Z",fill:"currentColor"})))},Xue=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V15H13V17ZM13 13H11V7H13V13Z",fill:"currentColor"})))},Jue=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M11 7H13V9H11V7ZM11 11H13V17H11V11ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",fill:"currentColor"})))},ede=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M1 21H23L12 2L1 21ZM13 18H11V16H13V18ZM13 14H11V10H13V14Z",fill:"currentColor"})))},jF=({variation:e,ariaHidden:t,ariaLabel:n,role:r})=>{const o=Dv("alert");let a;switch(e){case"info":a=o?.info??_.createElement(Jue,{"aria-hidden":t,"aria-label":n,role:r});break;case"error":a=o?.error??_.createElement(Xue,{"aria-hidden":t,"aria-label":n,role:r});break;case"warning":a=o?.warning??_.createElement(ede,{"aria-hidden":t,"aria-label":n,role:r});break;case"success":a=o?.success??_.createElement(Que,{"aria-hidden":t,"aria-label":n,role:r});break}return a?_.createElement("span",{className:ie.AlertIcon},a):null};jF.displayName="AlertIcon";const tde=globalThis?.document?_.useLayoutEffect:()=>{},nde="amplify-id",rde=XQ.useId||(()=>{});let ode=0;const Ds=e=>{const[t,n]=_.useState(rde());return tde(()=>{e||n(r=>r??String(ode++))},[e]),e??(t?`${nde}-${t}`:"")},BF=_.createContext({isFieldsetDisabled:!1}),eh=e=>{let n=_.useContext(BF).isFieldsetDisabled;return(n===void 0||n===!1)&&(n=e),{isFieldsetDisabled:n}},ade=({className:e,children:t,...n},r)=>_.createElement(je,{className:$e(ie.Flex,e),ref:r,...n},t),ze=kt(ade);ze.displayName="Flex";const sde="linear-empty",ide="linear-filled",lde="circular-empty",cde="circular-filled",f5=8,vx=42,Zp=2*vx*Math.PI,ude=({className:e,filledColor:t,emptyColor:n,size:r,variation:o,isDeterminate:a=!1,isPercentageTextHidden:l=!1,percentage:c=0,...d},f)=>{c=Math.min(c,100),c=Math.max(c,0);const p=`${c}%`,m=$e(ie.Loader,Nt(ie.Loader,r),Nt(ie.Loader,o),ur(ie.Loader,"determinate",a),e),g=_.createElement("g",null,_.createElement("line",{x1:"0",x2:"100%",y1:"50%",y2:"50%",style:{stroke:String(n)},"data-testid":sde}),_.createElement("line",{x1:"0",x2:a?p:"100%",y1:"50%",y2:"50%",style:{stroke:a&&c===0?"none":t?String(t):void 0},"data-testid":ide}),a?_.createElement("text",{"aria-live":"polite",className:$e(ie.LoaderLabel,l?ie.VisuallyHidden:null),x:`${-1+c}%`,y:"200%"},p):null),v=_.createElement("g",null,_.createElement("circle",{cx:"50%",cy:"50%",r:`${vx}%`,strokeWidth:`${f5}%`,style:{stroke:String(n)},"data-testid":lde}),_.createElement("circle",{cx:"50%",cy:"50%",r:`${vx}%`,strokeWidth:`${f5}%`,style:{stroke:String(t),strokeDasharray:a?`${Zp}% ${Zp}%`:void 0,strokeDashoffset:a?`${Zp-Zp*c/100}%`:void 0},"data-testid":cde}),a?_.createElement("text",{"aria-live":"polite",className:$e(ie.LoaderLabel,l?ie.VisuallyHidden:null),x:"130%",y:"80%"},p):null);return _.createElement(je,{as:"svg","aria-valuenow":a?c:void 0,className:m,ref:f,role:"progressbar",...d},o==="linear"?g:v)},HF=kt(ude);HF.displayName="Loader";const dde=["link","primary",void 0],fde=({className:e,children:t,colorTheme:n,isFullWidth:r=!1,isDisabled:o,isLoading:a,loadingText:l="",size:c,type:d="button",variation:f,...p},m)=>{const g=dde.includes(f)&&n?`${f??"outlined"}--${n}`:void 0,{isFieldsetDisabled:v}=eh(o??a??p.disabled),S=$e(ie.Button,ie.FieldGroupControl,Nt(ie.Button,f),Nt(ie.Button,g),Nt(ie.Button,c),ur(ie.Button,"disabled",v),ur(ie.Button,"loading",a),ur(ie.Button,"fullwidth",r),e);return _.createElement(je,{ref:m,as:"button",className:S,isDisabled:v,type:d,...p},a?_.createElement(ze,{as:"span",className:ie.ButtonLoaderWrapper},_.createElement(HF,{size:c}),l||null):t)},Ht=kt(fde);Ht.displayName="Button";const hde=e=>{const{className:t,size:n,...r}=e;return _.createElement(je,{as:"span",width:n??"1em",height:n??"1em",className:$e(ie.Icon,t),...r},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n?{width:n,height:n}:void 0},_.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})))},pde=({as:e="p",className:t,children:n,isTruncated:r,variation:o,...a},l)=>{const c=$e(ie.Text,Nt(ie.Text,o),ur(ie.Text,"truncated",r),t);return _.createElement(je,{as:e,className:c,ref:l,...a},n)},Jr=kt(pde);Jr.displayName="Text";const mde="qa-field-description",Lv=({descriptiveText:e,labelHidden:t,...n})=>e?_.createElement(Jr,{"data-testid":mde,className:$e(ie.FieldDescription,{[ie.VisuallyHidden]:t}),...n},e):null;Lv.displayName="FieldDescription";const Uv=({errorMessage:e,hasError:t,...n})=>t&&e?_.createElement(Jr,{className:ie.FieldErrorMessage,...n},e):null;Uv.displayName="FieldErrorMessage";const gde=({children:e,className:t,visuallyHidden:n,...r},o)=>_.createElement(je,{as:"label",className:$e(ie.Label,t,{[ie.VisuallyHidden]:n}),ref:o,...r},e),O2=kt(gde);O2.displayName="Label";const vde=({buttonRef:e,children:t,className:n,dismissButtonLabel:r=T2.Alert.dismissButtonLabel,hasIcon:o=!0,heading:a,isDismissible:l=!1,onDismiss:c,variation:d,...f},p)=>{const[m,g]=_.useState(!1),v=Dv("alert"),S=_.useCallback(()=>{g(!m),Ra(c)&&c()},[g,c,m]);return m?null:_.createElement(ze,{className:$e(ie.Alert,n,Nt(ie.Alert,d)),ref:p,role:"alert",...f},o&&_.createElement(jF,{variation:d,ariaHidden:!0}),_.createElement(je,{flex:"1"},a&&_.createElement(je,{className:ie.AlertHeading},a),_.createElement(je,{className:ie.AlertBody},t)),l&&_.createElement(Ht,{ariaLabel:r,variation:"link",className:ie.AlertDismiss,onClick:S,ref:e},v?.close??_.createElement(hde,{"aria-hidden":"true"})))},qF=kt(vde);qF.displayName="Alert";const Ni=(e,t)=>e&&t?`${e}-${t}`:void 0,yde=({children:e,className:t,innerEndComponent:n,innerStartComponent:r,orientation:o="horizontal",outerEndComponent:a,outerStartComponent:l,variation:c,...d},f)=>{const p=r!=null,m=n!=null,g=p?ie.FieldGroupHasInnerStart:null,v=m?ie.FieldGroupHasInnerEnd:null,S=$e(ie.FieldGroup,g,v,Nt(ie.FieldGroup,o),t);return _.createElement(ze,{className:S,ref:f,...d},l&&_.createElement(je,{className:$e(ie.FieldGroupOuterStart,Nt(ie.FieldGroupOuterStart,c))},l),_.createElement(je,{className:$e(ie.FieldGroupFieldWrapper,Nt(ie.FieldGroupFieldWrapper,o))},r&&_.createElement(je,{className:ie.FieldGroupInnerStart},r),e,n&&_.createElement(je,{className:ie.FieldGroupInnerEnd},n)),a&&_.createElement(je,{className:$e(ie.FieldGroupOuterEnd,Nt(ie.FieldGroupOuterEnd,c))},a))},VF=kt(yde);VF.displayName="FieldGroup";const bde=({autoComplete:e,checked:t,className:n,defaultChecked:r,defaultValue:o,id:a,isDisabled:l,isReadOnly:c,isRequired:d,size:f,type:p="text",hasError:m=!1,value:g,variation:v,...S},C)=>{const w=$e(ie.Input,ie.FieldGroupControl,Nt(ie.Input,v),ur(ie.Input,"error",m),Nt(ie.Input,f),n),{isFieldsetDisabled:x}=eh(l);return _.createElement(je,{"aria-invalid":m,as:"input",autoComplete:e,checked:t,className:w,defaultChecked:r,defaultValue:o,isDisabled:x,id:a,readOnly:c,ref:C,required:d,type:p,value:g,...S})},M2=kt(bde);M2.displayName="Input";const Sde=e=>e in A2,WF=e=>{const t={styleProps:{},rest:{}};return Object.keys(e).forEach(n=>{Sde(n)?t.styleProps={...t.styleProps,[n]:e[n]}:t.rest={...t.rest,[n]:e[n]}}),t},N2=e=>{const t=e.filter(n=>n!==void 0).join(" ");return t.length>0?t:void 0},P2="error",k2="description",Cde=(e,t)=>{const{className:n,descriptiveText:r,errorMessage:o,hasError:a=!1,id:l,innerEndComponent:c,innerStartComponent:d,label:f,labelHidden:p=!1,outerEndComponent:m,outerStartComponent:g,size:v,testId:S,variation:C,inputStyles:w,...x}=e,I=Ds(l),T=Ds(),O=r?Ni(T,k2):void 0,D=a?Ni(T,P2):void 0,P=N2([D,O]),{styleProps:M,rest:L}=WF(x);return _.createElement(ze,{className:$e(ie.Field,Nt(ie.Field,v),ie.TextField,n),testId:S,...M},_.createElement(O2,{htmlFor:I,visuallyHidden:p},f),_.createElement(Lv,{id:O,labelHidden:p,descriptiveText:r}),_.createElement(VF,{outerStartComponent:g,outerEndComponent:m,innerStartComponent:d,innerEndComponent:c,variation:C},_.createElement(M2,{"aria-describedby":P,hasError:a,id:I,ref:t,size:v,variation:C,...w,...L})),_.createElement(Uv,{id:D,hasError:a,errorMessage:o}))},th=kt(Cde);th.displayName="TextField";const Ede=({as:e="span",children:t,className:n,...r},o)=>_.createElement(je,{as:e,className:$e(ie.VisuallyHidden,n),ref:o,...r},t),Fv=kt(Ede);Fv.displayName="VisuallyHidden";const wde=({className:e,orientation:t="horizontal",size:n,label:r,...o},a)=>{const l=$e(ie.Divider,Nt(ie.Divider,t),Nt(ie.Divider,n),e);return _.createElement(je,{"aria-orientation":t,as:"hr",className:l,"data-label":r,ref:a,...o})},D2=kt(wde);D2.displayName="Divider";const xde=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16.59 8.58984L12 13.1698L7.41 8.58984L6 9.99984L12 15.9998L18 9.99984L16.59 8.58984Z",fill:"currentColor"})))},_de=({children:e,className:t,isDisabled:n,legend:r,legendHidden:o,size:a,testId:l,variation:c="plain",...d},f)=>{const{isFieldsetDisabled:p}=eh(n),m=_.useMemo(()=>({isFieldsetDisabled:p}),[p]),g=$e(ie.Fieldset,Nt(ie.Fieldset,c),Nt(ie.Fieldset,a),t),v=$e(ie.FieldsetLegend,Nt(ie.FieldsetLegend,a),{[ie.VisuallyHidden]:o});return _.createElement(BF.Provider,{value:m},_.createElement(ze,{as:"fieldset",className:g,ref:f,disabled:p,testId:l,...d},_.createElement(Fv,{as:"legend"},r),_.createElement(je,{as:"div","aria-hidden":"true",className:v},r),e))},GF=kt(_de);GF.displayName="Fieldset";const Ide={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"},Ade=({className:e,children:t,isTruncated:n,level:r=6,...o},a)=>_.createElement(je,{as:Ide[r],className:$e(ie.Heading,Nt(ie.Heading,r),ur(ie.Heading,"truncated",n),e),ref:a,...o},t),Jn=kt(Ade);Jn.displayName="Heading";var Tde=_.createContext(void 0),Rde=e=>{const{dir:t,children:n}=e;return R.jsx(Tde.Provider,{value:t,children:n})};const Ode=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 6.0002C15.79 6.0002 19.17 8.1302 20.82 11.5002C20.23 12.7202 19.4 13.7702 18.41 14.6202L19.82 16.0302C21.21 14.8002 22.31 13.2602 23 11.5002C21.27 7.1102 17 4.0002 12 4.0002C10.73 4.0002 9.51 4.2002 8.36 4.5702L10.01 6.2202C10.66 6.0902 11.32 6.0002 12 6.0002ZM10.93 7.14019L13 9.2102C13.57 9.4602 14.03 9.9202 14.28 10.4902L16.35 12.5602C16.43 12.2202 16.49 11.8602 16.49 11.4902C16.5 9.0102 14.48 7.0002 12 7.0002C11.63 7.0002 11.28 7.05019 10.93 7.14019ZM2.01 3.8702L4.69 6.5502C3.06 7.8302 1.77 9.5302 1 11.5002C2.73 15.8902 7 19.0002 12 19.0002C13.52 19.0002 14.98 18.7102 16.32 18.1802L19.74 21.6002L21.15 20.1902L3.42 2.4502L2.01 3.8702ZM9.51 11.3702L12.12 13.9802C12.08 13.9902 12.04 14.0002 12 14.0002C10.62 14.0002 9.5 12.8802 9.5 11.5002C9.5 11.4502 9.51 11.4202 9.51 11.3702V11.3702ZM6.11 7.97019L7.86 9.7202C7.63 10.2702 7.5 10.8702 7.5 11.5002C7.5 13.9802 9.52 16.0002 12 16.0002C12.63 16.0002 13.23 15.8702 13.77 15.6402L14.75 16.6202C13.87 16.8602 12.95 17.0002 12 17.0002C8.21 17.0002 4.83 14.8702 3.18 11.5002C3.88 10.0702 4.9 8.89019 6.11 7.97019Z",fill:"currentColor"})))},Mde=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M12 6C15.79 6 19.17 8.13 20.82 11.5C19.17 14.87 15.79 17 12 17C8.21 17 4.83 14.87 3.18 11.5C4.83 8.13 8.21 6 12 6ZM12 4C7 4 2.73 7.11 1 11.5C2.73 15.89 7 19 12 19C17 19 21.27 15.89 23 11.5C21.27 7.11 17 4 12 4ZM12 9C13.38 9 14.5 10.12 14.5 11.5C14.5 12.88 13.38 14 12 14C10.62 14 9.5 12.88 9.5 11.5C9.5 10.12 10.62 9 12 9ZM12 7C9.52 7 7.5 9.02 7.5 11.5C7.5 13.98 9.52 16 12 16C14.48 16 16.5 13.98 16.5 11.5C16.5 9.02 14.48 7 12 7Z",fill:"currentColor"})))},{passwordIsHidden:Nde,passwordIsShown:Pde,showPassword:kde}=T2.PasswordField,Dde=({fieldType:e,passwordIsHiddenLabel:t=Nde,passwordIsShownLabel:n=Pde,showPasswordButtonLabel:r=kde,size:o,hasError:a,...l},c)=>{const d=Dv("passwordField"),f=$e(ie.FieldShowPassword,ur(ie.FieldShowPassword,"error",a)),p=e==="password"?d?.visibility??_.createElement(Mde,{"aria-hidden":"true"}):d?.visibilityOff??_.createElement(Ode,{"aria-hidden":"true"});return _.createElement(Ht,{"aria-checked":e!=="password",ariaLabel:r,className:f,colorTheme:a?"error":void 0,ref:c,role:"switch",size:o,...l},_.createElement(Fv,{"aria-live":"polite"},e==="password"?t:n),p)},KF=kt(Dde);KF.displayName="ShowPasswordButton";const Lde=({autoComplete:e="current-password",label:t,className:n,hideShowPassword:r=!1,passwordIsHiddenLabel:o,passwordIsShownLabel:a,showPasswordButtonLabel:l,showPasswordButtonRef:c,size:d,hasError:f,...p},m)=>{const[g,v]=_.useState("password"),S=_.useCallback(()=>{v(g==="password"?"text":"password")},[v,g]);return _.createElement(th,{autoComplete:e,outerEndComponent:r?null:_.createElement(KF,{fieldType:g,onClick:S,passwordIsHiddenLabel:o,passwordIsShownLabel:a,ref:c,size:d,showPasswordButtonLabel:l,hasError:f}),size:d,type:g,label:t,className:$e(ie.PasswordField,n),ref:m,hasError:f,...p})},L2=kt(Lde);L2.displayName="PasswordField";const Ude=({autoComplete:e,className:t,size:n,variation:r,value:o,defaultValue:a,hasError:l,icon:c,iconColor:d,children:f,placeholder:p,isDisabled:m,isRequired:g,isMultiple:v=!1,selectSize:S=1,...C},w)=>{const I=o===void 0&&a===void 0&&p,T=v||S>1,O=$e(ie.Select,ie.FieldGroupControl,Nt(ie.Select,n),Nt(ie.Select,r),ur(ie.Select,"error",l),ur(ie.Select,"expanded",T),t),D=Dv("select"),{isFieldsetDisabled:P}=eh(m);return _.createElement(je,{className:ie.SelectWrapper},_.createElement(je,{"aria-invalid":l,as:"select",autoComplete:e,value:o,defaultValue:I?"":a,isDisabled:P,multiple:v,size:S,required:g,className:O,ref:w,...C},p&&_.createElement("option",{value:""},p),f),T?null:_.createElement(ze,{className:$e(ie.SelectIcon,Nt(ie.SelectIcon,n)),color:d,"aria-hidden":"true"},c??D?.expand??_.createElement(xde,null)))},ZF=kt(Ude);ZF.displayName="Select";const Fde=({children:e,options:t})=>e?(t?.length&&console.warn("Amplify UI: <SelectField> component defaults to rendering children over `options`. When using the `options` prop, omit children."),e):t?.map((n,r)=>_.createElement("option",{label:n,value:n,key:`${n}-${r}`},n)),zde=(e,t)=>{const{children:n,className:r,descriptiveText:o,errorMessage:a,hasError:l=!1,id:c,label:d,labelHidden:f=!1,options:p,size:m,testId:g,inputStyles:v,...S}=e,C=Ds(c),w=Ds(),x=o?Ni(w,k2):void 0,I=l?Ni(w,P2):void 0,T=N2([I,x]),{styleProps:O,rest:D}=WF(S);return _.createElement(ze,{className:$e(ie.Field,Nt(ie.Field,m),ie.SelectField,r),testId:g,...O},_.createElement(O2,{htmlFor:C,visuallyHidden:f},d),_.createElement(Lv,{id:x,labelHidden:f,descriptiveText:o}),_.createElement(ZF,{"aria-describedby":T,hasError:l,id:C,ref:t,size:m,...D,...v},Fde({children:n,options:p})),_.createElement(Uv,{id:I,hasError:l,errorMessage:a}))},YF=kt(zde);YF.displayName="SelectField";const $de=({className:e,dialCodeList:t,isReadOnly:n,...r},o)=>{const a=t??CF,l=_.useMemo(()=>a.map(c=>_.createElement("option",{key:c,value:c,disabled:n},c)),[a,n]);return _.createElement(YF,{"aria-disabled":n,autoComplete:"tel-country-code",className:$e(ie.CountryCodeSelect,ie.DialCodeSelect,e),labelHidden:!0,ref:o,...r},l)},QF=kt($de);QF.displayName="DialCodeSelect";const jde=({autoComplete:e="tel-national",className:t,defaultDialCode:n,dialCodeLabel:r=T2.PhoneNumberField.countryCodeLabel,dialCodeList:o,dialCodeName:a,dialCodeRef:l,hasError:c,isDisabled:d,isReadOnly:f,onDialCodeChange:p,onInput:m,size:g,variation:v,...S},C)=>_.createElement(th,{outerStartComponent:_.createElement(QF,{defaultValue:n,dialCodeList:o,className:t,hasError:c,isDisabled:d,isReadOnly:f,label:r,name:a,onChange:p,ref:l,size:g,variation:v}),autoComplete:e,className:$e(ie.PhoneNumberField,t),hasError:c,isDisabled:d,isReadOnly:f,onInput:m,ref:C,size:g,type:"tel",variation:v,...S}),XF=kt(jde);XF.displayName="PhoneNumberField";const Bde={name:"default"},JF=B.createContext(Bde),Hde=()=>_.useContext(JF),qde=({children:e,className:t,id:n,isDisabled:r=!1,testId:o,value:a,labelPosition:l,...c},d)=>{const{currentValue:f,defaultValue:p,name:m,hasError:g,isGroupDisabled:v=!1,isRequired:S,isReadOnly:C,onChange:w,size:x,labelPosition:I}=Hde(),{isFieldsetDisabled:T}=eh(v||r||C&&p!==a),O=f!==void 0?a===f:void 0,D=p!==void 0?a===p:void 0,P=l??I;return _.createElement(ze,{as:"label",className:$e(ie.Radio,ur(ie.Radio,"disabled",T),P?`amplify-label-${P}`:null,t)},e&&_.createElement(Jr,{as:"span",className:$e(ie.RadioLabel,ur(ie.RadioLabel,"disabled",T))},e),_.createElement(M2,{checked:O,className:$e(ie.VisuallyHidden,ie.RadioInput),defaultChecked:D,hasError:g,id:n,isDisabled:T,isReadOnly:C,isRequired:S,onChange:w,ref:d,type:"radio",name:m,value:a,...c}),_.createElement(ze,{"aria-hidden":"true",as:"span",className:$e(ie.RadioButton,Nt(ie.RadioButton,x)),testId:o}))},U2=kt(qde);U2.displayName="Radio";const Vde=({children:e,className:t,defaultValue:n,descriptiveText:r,errorMessage:o,hasError:a=!1,id:l,isDisabled:c,isRequired:d,isReadOnly:f,legend:p,legendHidden:m=!1,labelPosition:g,onChange:v,name:S,size:C,testId:w,value:x,variation:I,...T},O)=>{const D=Ds(l),P=Ds(),M=r?Ni(P,k2):void 0,L=a?Ni(P,P2):void 0,z=N2([L,M]),G=Ni(w,ie.RadioGroup),j=_.useMemo(()=>({currentValue:x,defaultValue:n,hasError:a,isRequired:d,isReadOnly:f,isGroupDisabled:c,onChange:v,size:C,name:S,labelPosition:g}),[n,a,c,d,f,v,C,S,x,g]);return _.createElement(GF,{className:$e(ie.Field,Nt(ie.Field,C),ie.RadioGroupField,t),isDisabled:c,legend:p,legendHidden:m,ref:O,role:"radiogroup",size:C,testId:w,variation:I,...T},_.createElement(Lv,{id:M,labelHidden:m,descriptiveText:r}),_.createElement(ze,{"aria-describedby":z,className:ie.RadioGroup,id:D,testId:G},_.createElement(JF.Provider,{value:j},e)),_.createElement(Uv,{id:L,hasError:a,errorMessage:o}))},F2=kt(Vde);F2.displayName="RadioGroupField";const zv=_.createContext({groupId:"",activeTab:"",setActiveTab:()=>{}}),e9="-",Wde=({className:e,value:t,children:n,onClick:r,as:o="button",role:a="tab",...l},c)=>{const{activeTab:d,setActiveTab:f,groupId:p}=_.useContext(zv);let m=t;typeof m=="string"&&(m=m.replace(" ",e9));const g=d===t,v=S=>{Ra(r)&&r?.(S),f(t)};return _.createElement(je,{...l,role:a,as:o,id:`${p}-tab-${m}`,"aria-selected":g,"aria-controls":`${p}-panel-${m}`,tabIndex:g?void 0:-1,className:$e(ie.TabsItem,ur(ie.TabsItem,"active",d===t),e),ref:c,onClick:v},n)},z2=kt(Wde);z2.displayName="Tabs.Item";const Gde=e=>_.isValidElement(e),Kde=({className:e,children:t,indicatorPosition:n,spacing:r,role:o="tablist",...a},l)=>{const c=_.useRef(null),{activeTab:d,setActiveTab:f}=_.useContext(zv);_.useImperativeHandle(l,()=>c.current);const p=_.useMemo(()=>_.Children.toArray(t).map(C=>{if(C&&Gde(C))return C.props.value}).filter(C=>!!C),[t]),m=p.indexOf(d),g=_.useCallback(()=>{let C=m===p.length-1?0:m+1;const w=c.current?.querySelectorAll("button")??[];for(;w[C].disabled;)C===p.length-1?C=0:C++;const x=p[C];if(x){f(x);const I=w[C];I?.focus(),I?.click()}},[m,f,p]),v=_.useCallback(()=>{let C=m===0?p.length-1:m-1;const w=c.current?.querySelectorAll("button")??[];for(;w[C].disabled;)C===0?C=p.length-1:C--;const x=p[C];if(x){f(x);const I=w[C];I?.focus(),I?.click()}},[m,f,p]),S=_.useCallback(C=>{switch(C.key){case"ArrowLeft":C.preventDefault(),C.stopPropagation(),v();break;case"ArrowUp":case"ArrowRight":C.preventDefault(),C.stopPropagation(),g();break}},[v,g]);return _.createElement(je,{...a,role:o,onKeyDown:S,className:$e(ie.TabsList,n?Nt(ie.TabsList,n):null,r?Nt(ie.TabsList,r):null,e),ref:c},t)},$2=kt(Kde);$2.displayName="Tabs.List";const Zde=({className:e,value:t,children:n,role:r="tabpanel",...o},a)=>{const{activeTab:l,isLazy:c,groupId:d}=_.useContext(zv);if(c&&l!==t)return null;let f=t;return typeof f=="string"&&(f=f.replace(" ",e9)),_.createElement(je,{...o,role:r,id:`${d}-panel-${f}`,"aria-labelledby":`${d}-tab-${f}`,className:$e(ie.TabsPanel,ur(ie.TabsPanel,"active",l===t),e),ref:a},n)},j2=kt(Zde);j2.displayName="Tabs.Panel";const Yde=({children:e,defaultValue:t,className:n,value:r,onValueChange:o,isLazy:a,...l},c)=>{const d=Ds(),f=r!==void 0,[p,m]=_.useState(()=>f?r:t),g=f?r:p??"",v=_.useCallback(C=>{Ra(o)&&o(C),f||m(C)},[o,f]),S=_.useMemo(()=>({activeTab:g,isLazy:a,setActiveTab:v,groupId:d}),[g,v,a,d]);return _.createElement(zv.Provider,{value:S},_.createElement(je,{...l,ref:c,className:$e(n,ie.Tabs)},e))},B2=kt(Yde);B2.displayName="Tabs.Container";const Qde=({items:e,indicatorPosition:t,justifyContent:n,spacing:r,...o},a)=>_.createElement(B2,{...o,ref:a},_.createElement($2,{indicatorPosition:t,justifyContent:n,spacing:r},e?.map(({value:l,label:c,content:d,...f})=>_.createElement(z2,{...f,key:l,value:l},c))),e?.map(({value:l,content:c,isDisabled:d})=>_.createElement(j2,{key:l,value:l,isDisabled:d},c))),Ei=Object.assign(kt(Qde),{Item:z2,List:$2,Panel:j2,Container:B2});Ei.displayName="Tabs";const EE=({errors:e,id:t,dataAttr:n})=>{if(!(e?.length>0))return null;const r=n?{[n]:!0}:{};return B.createElement(je,{...r,id:t},e.map(o=>B.createElement(Jr,{key:o,role:"alert",variation:"error"},ye(o))))},Xde="6.15.4",Jde=({message:e,shouldWarn:t})=>{Mue({message:e,shouldWarn:t})},t9=_.createContext(null),Pr=()=>{const e=_.useContext(t9);if(!e)throw new Error("`useCustomComponents` cannot be used outside of a `CustomComponentsContext.Provider`");return e},efe=e=>{const t=new FormData(e.target);return Object.fromEntries(t)};function kr(){const{submitForm:e,updateBlur:t,updateForm:n}=ht(l=>[l.submitForm,l.updateBlur,l.updateForm]),r=_.useCallback(({target:{name:l}})=>{t({name:l})},[t]),o=_.useCallback(({target:{checked:l,name:c,type:d,value:f}})=>{n({name:c,value:d==="checkbox"&&!l?void 0:f})},[n]),a=_.useCallback(l=>{l.preventDefault(),e(efe(l))},[e]);return{handleBlur:r,handleChange:o,handleSubmit:a}}const mr=()=>{const{error:e}=ht(t=>[t.error]);return B.createElement(B.Fragment,null,e?B.createElement(qF,{variation:"error",isDismissible:!0},ye(e)):null)};function h5({autocomplete:e,dialCode:t,name:n,type:r,...o}){const{validationErrors:a}=ht(({validationErrors:p})=>[p]),l=_.useMemo(()=>_ae(a[n]),[n,a]),c=l?.length>0,d=Ds(),f=c?d:void 0;return r==="tel"?_.createElement(_.Fragment,null,_.createElement(XF,{...o,name:n,defaultDialCode:t,dialCodeName:"country_code",autoComplete:e,hasError:c,"aria-describedby":f}),_.createElement(EE,{dataAttr:"data-amplify-sign-up-errors",errors:l,id:d})):r==="password"?_.createElement(_.Fragment,null,_.createElement(L2,{...o,name:n,autoCapitalize:"off",autoComplete:e,hasError:c,"aria-describedby":f}),_.createElement(EE,{dataAttr:"data-amplify-sign-up-errors",errors:l,id:d})):_.createElement(_.Fragment,null,_.createElement(th,{...o,name:n,autoCapitalize:"off",autoComplete:e,hasError:c,type:r,"aria-describedby":f}),_.createElement(EE,{dataAttr:"data-amplify-sign-up-errors",errors:l,id:d}))}function qo({includePassword:e}={}){const{fields:t}=ht(({route:c})=>[c]),{selectedAuthMethod:n,preferredChallenge:r}=ht(c=>[c.selectedAuthMethod,c.preferredChallenge]),o=n??r,a=e??(!o||o==="PASSWORD"),l=_.useRef(t.map((c,d)=>(c.name==="password"||c.name==="confirm_password")&&!a?_.createElement(h5,{key:d,...c,isRequired:!1}):_.createElement(h5,{key:d,...c})).filter(Boolean)).current;return _.createElement(_.Fragment,null,l)}function hr({children:e,className:t,variation:n="default"}){ht(({route:a})=>[a]);const{components:{Header:r,Footer:o}}=Pr();return B.createElement(je,{className:t,"data-amplify-authenticator":"","data-variation":n},B.createElement(je,{"data-amplify-container":""},B.createElement(r,null),B.createElement(je,{"data-amplify-router":"","data-amplify-router-content":void 0},e),B.createElement(o,null)))}const{getDeliveryMessageText:tfe,getDeliveryMethodText:nfe,getConfirmingText:rfe,getConfirmText:ofe,getResendCodeText:afe}=Sn;function Vi({className:e,variation:t}){const{isPending:n,resendCode:r,codeDeliveryDetails:o}=ht(f=>[f.isPending,f.resendCode,f.codeDeliveryDetails]),{handleChange:a,handleSubmit:l}=kr(),{components:{ConfirmSignUp:{Header:c=Vi.Header,Footer:d=Vi.Footer}}}=Pr();return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignup":"",method:"post",onChange:a,onSubmit:l},B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(c,null),B.createElement(ze,{direction:"column"},B.createElement(Jr,{className:"amplify-authenticator__subtitle"},tfe(o)),B.createElement(qo,null),B.createElement(mr,null),B.createElement(Ht,{variation:"primary",isDisabled:n,type:"submit",loadingText:rfe(),isLoading:n},ofe()),B.createElement(Ht,{onClick:r,type:"button"},afe())),B.createElement(d,null))))}const sfe=()=>{const{codeDeliveryDetails:e}=ht(t=>[t.codeDeliveryDetails]);return B.createElement(Jn,{level:4},nfe(e))};Vi.Header=sfe;Vi.Footer=function(){return null};const{getChangePasswordText:n9,getChangingText:ife,getBackToSignInText:lfe}=Sn,yo=({className:e,variation:t})=>{const{isPending:n,toSignIn:r}=ht(p=>[p.isPending,p.toSignIn]),{handleBlur:o,handleChange:a,handleSubmit:l}=kr(),{components:{ForceNewPassword:{FormFields:c=yo.FormFields,Header:d=yo.Header,Footer:f=yo.Footer}}}=Pr();return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forcenewpassword":"",method:"post",onChange:a,onSubmit:l,onBlur:o},B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(d,null),B.createElement(c,null),B.createElement(mr,null),B.createElement(Ht,{isDisabled:n,type:"submit",variation:"primary",isLoading:n,loadingText:ife()},n9()),B.createElement(Ht,{onClick:r,type:"button",variation:"link",size:"small"},lfe()),B.createElement(f,null))))};yo.FormFields=function(){return B.createElement(qo,null)};yo.Header=function(){return B.createElement(Jn,{level:4},n9())};yo.Footer=function(){return null};var oc={},wE,p5;function cfe(){return p5||(p5=1,wE=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),wE}var xE={},fs={},m5;function il(){if(m5)return fs;m5=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return fs.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},fs.getSymbolTotalCodewords=function(r){return t[r]},fs.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},fs.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},fs.isKanjiModeEnabled=function(){return typeof e<"u"},fs.toSJIS=function(r){return e(r)},fs}var _E={},g5;function H2(){return g5||(g5=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(_E)),_E}var IE,v5;function ufe(){if(v5)return IE;v5=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},IE=e,IE}var AE,y5;function dfe(){if(y5)return AE;y5=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const a=t*this.size+n;this.data[a]=r,o&&(this.reservedBit[a]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},AE=e,AE}var TE={},b5;function ffe(){return b5||(b5=1,(function(e){const t=il().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,a=t(r),l=a===145?26:Math.ceil((a-13)/(2*o-2))*2,c=[a-7];for(let d=1;d<o-1;d++)c[d]=c[d-1]-l;return c.push(6),c.reverse()},e.getPositions=function(r){const o=[],a=e.getRowColCoords(r),l=a.length;for(let c=0;c<l;c++)for(let d=0;d<l;d++)c===0&&d===0||c===0&&d===l-1||c===l-1&&d===0||o.push([a[c],a[d]]);return o}})(TE)),TE}var RE={},S5;function hfe(){if(S5)return RE;S5=1;const e=il().getSymbolSize,t=7;return RE.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},RE}var OE={},C5;function pfe(){return C5||(C5=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const a=o.size;let l=0,c=0,d=0,f=null,p=null;for(let m=0;m<a;m++){c=d=0,f=p=null;for(let g=0;g<a;g++){let v=o.get(m,g);v===f?c++:(c>=5&&(l+=t.N1+(c-5)),f=v,c=1),v=o.get(g,m),v===p?d++:(d>=5&&(l+=t.N1+(d-5)),p=v,d=1)}c>=5&&(l+=t.N1+(c-5)),d>=5&&(l+=t.N1+(d-5))}return l},e.getPenaltyN2=function(o){const a=o.size;let l=0;for(let c=0;c<a-1;c++)for(let d=0;d<a-1;d++){const f=o.get(c,d)+o.get(c,d+1)+o.get(c+1,d)+o.get(c+1,d+1);(f===4||f===0)&&l++}return l*t.N2},e.getPenaltyN3=function(o){const a=o.size;let l=0,c=0,d=0;for(let f=0;f<a;f++){c=d=0;for(let p=0;p<a;p++)c=c<<1&2047|o.get(f,p),p>=10&&(c===1488||c===93)&&l++,d=d<<1&2047|o.get(p,f),p>=10&&(d===1488||d===93)&&l++}return l*t.N3},e.getPenaltyN4=function(o){let a=0;const l=o.data.length;for(let d=0;d<l;d++)a+=o.data[d];return Math.abs(Math.ceil(a*100/l/5)-10)*t.N4};function n(r,o,a){switch(r){case e.Patterns.PATTERN000:return(o+a)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(o+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return o*a%2+o*a%3===0;case e.Patterns.PATTERN110:return(o*a%2+o*a%3)%2===0;case e.Patterns.PATTERN111:return(o*a%3+(o+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,a){const l=a.size;for(let c=0;c<l;c++)for(let d=0;d<l;d++)a.isReserved(d,c)||a.xor(d,c,n(o,d,c))},e.getBestMask=function(o,a){const l=Object.keys(e.Patterns).length;let c=0,d=1/0;for(let f=0;f<l;f++){a(f),e.applyMask(f,o);const p=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(f,o),p<d&&(d=p,c=f)}return c}})(OE)),OE}var Yp={},E5;function r9(){if(E5)return Yp;E5=1;const e=H2(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Yp.getBlocksCount=function(o,a){switch(a){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},Yp.getTotalCodewordsCount=function(o,a){switch(a){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},Yp}var ME={},Id={},w5;function mfe(){if(w5)return Id;w5=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),Id.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},Id.exp=function(r){return e[r]},Id.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},Id}var x5;function gfe(){return x5||(x5=1,(function(e){const t=mfe();e.mul=function(r,o){const a=new Uint8Array(r.length+o.length-1);for(let l=0;l<r.length;l++)for(let c=0;c<o.length;c++)a[l+c]^=t.mul(r[l],o[c]);return a},e.mod=function(r,o){let a=new Uint8Array(r);for(;a.length-o.length>=0;){const l=a[0];for(let d=0;d<o.length;d++)a[d]^=t.mul(o[d],l);let c=0;for(;c<a.length&&a[c]===0;)c++;a=a.slice(c)}return a},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let a=0;a<r;a++)o=e.mul(o,new Uint8Array([1,t.exp(a)]));return o}})(ME)),ME}var NE,_5;function vfe(){if(_5)return NE;_5=1;const e=gfe();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const a=e.mod(o,this.genPoly),l=this.degree-a.length;if(l>0){const c=new Uint8Array(this.degree);return c.set(a,l),c}return a},NE=t,NE}var PE={},kE={},DE={},I5;function o9(){return I5||(I5=1,DE.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),DE}var Ro={},A5;function a9(){if(A5)return Ro;A5=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
74
+ ]))+`;Ro.KANJI=new RegExp(n,"g"),Ro.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ro.BYTE=new RegExp(r,"g"),Ro.NUMERIC=new RegExp(e,"g"),Ro.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),a=new RegExp("^"+e+"$"),l=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ro.testKanji=function(d){return o.test(d)},Ro.testNumeric=function(d){return a.test(d)},Ro.testAlphanumeric=function(d){return l.test(d)},Ro}var T5;function ll(){return T5||(T5=1,(function(e){const t=o9(),n=a9();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(a,l){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!t.isValid(l))throw new Error("Invalid version: "+l);return l>=1&&l<10?a.ccBits[0]:l<27?a.ccBits[1]:a.ccBits[2]},e.getBestModeForData=function(a){return n.testNumeric(a)?e.NUMERIC:n.testAlphanumeric(a)?e.ALPHANUMERIC:n.testKanji(a)?e.KANJI:e.BYTE},e.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},e.isValid=function(a){return a&&a.bit&&a.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(a,l){if(e.isValid(a))return a;try{return r(a)}catch{return l}}})(kE)),kE}var R5;function yfe(){return R5||(R5=1,(function(e){const t=il(),n=r9(),r=H2(),o=ll(),a=o9(),l=7973,c=t.getBCHDigit(l);function d(g,v,S){for(let C=1;C<=40;C++)if(v<=e.getCapacity(C,S,g))return C}function f(g,v){return o.getCharCountIndicator(g,v)+4}function p(g,v){let S=0;return g.forEach(function(C){const w=f(C.mode,v);S+=w+C.getBitsLength()}),S}function m(g,v){for(let S=1;S<=40;S++)if(p(g,S)<=e.getCapacity(S,v,o.MIXED))return S}e.from=function(v,S){return a.isValid(v)?parseInt(v,10):S},e.getCapacity=function(v,S,C){if(!a.isValid(v))throw new Error("Invalid QR Code version");typeof C>"u"&&(C=o.BYTE);const w=t.getSymbolTotalCodewords(v),x=n.getTotalCodewordsCount(v,S),I=(w-x)*8;if(C===o.MIXED)return I;const T=I-f(C,v);switch(C){case o.NUMERIC:return Math.floor(T/10*3);case o.ALPHANUMERIC:return Math.floor(T/11*2);case o.KANJI:return Math.floor(T/13);case o.BYTE:default:return Math.floor(T/8)}},e.getBestVersionForData=function(v,S){let C;const w=r.from(S,r.M);if(Array.isArray(v)){if(v.length>1)return m(v,w);if(v.length===0)return 1;C=v[0]}else C=v;return d(C.mode,C.getLength(),w)},e.getEncodedBits=function(v){if(!a.isValid(v)||v<7)throw new Error("Invalid QR Code version");let S=v<<12;for(;t.getBCHDigit(S)-c>=0;)S^=l<<t.getBCHDigit(S)-c;return v<<12|S}})(PE)),PE}var LE={},O5;function bfe(){if(O5)return LE;O5=1;const e=il(),t=1335,n=21522,r=e.getBCHDigit(t);return LE.getEncodedBits=function(a,l){const c=a.bit<<3|l;let d=c<<10;for(;e.getBCHDigit(d)-r>=0;)d^=t<<e.getBCHDigit(d)-r;return(c<<10|d)^n},LE}var UE={},FE,M5;function Sfe(){if(M5)return FE;M5=1;const e=ll();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,a,l;for(o=0;o+3<=this.data.length;o+=3)a=this.data.substr(o,3),l=parseInt(a,10),r.put(l,10);const c=this.data.length-o;c>0&&(a=this.data.substr(o),l=parseInt(a,10),r.put(l,c*3+1))},FE=t,FE}var zE,N5;function Cfe(){if(N5)return zE;N5=1;const e=ll(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let a;for(a=0;a+2<=this.data.length;a+=2){let l=t.indexOf(this.data[a])*45;l+=t.indexOf(this.data[a+1]),o.put(l,11)}this.data.length%2&&o.put(t.indexOf(this.data[a]),6)},zE=n,zE}var $E,P5;function Efe(){return P5||(P5=1,$E=function(t){for(var n=[],r=t.length,o=0;o<r;o++){var a=t.charCodeAt(o);if(a>=55296&&a<=56319&&r>o+1){var l=t.charCodeAt(o+1);l>=56320&&l<=57343&&(a=(a-55296)*1024+l-56320+65536,o+=1)}if(a<128){n.push(a);continue}if(a<2048){n.push(a>>6|192),n.push(a&63|128);continue}if(a<55296||a>=57344&&a<65536){n.push(a>>12|224),n.push(a>>6&63|128),n.push(a&63|128);continue}if(a>=65536&&a<=1114111){n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(a&63|128);continue}n.push(239,191,189)}return new Uint8Array(n).buffer}),$E}var jE,k5;function wfe(){if(k5)return jE;k5=1;const e=Efe(),t=ll();function n(r){this.mode=t.BYTE,this.data=new Uint8Array(e(r))}return n.getBitsLength=function(o){return o*8},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){for(let o=0,a=this.data.length;o<a;o++)r.put(this.data[o],8)},jE=n,jE}var BE,D5;function xfe(){if(D5)return BE;D5=1;const e=ll(),t=il();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let a=t.toSJIS(this.data[o]);if(a>=33088&&a<=40956)a-=33088;else if(a>=57408&&a<=60351)a-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
75
+ Make sure your charset is UTF-8`);a=(a>>>8&255)*192+(a&255),r.put(a,13)}},BE=n,BE}var HE={exports:{}},L5;function _fe(){return L5||(L5=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var a={},l={};l[r]=0;var c=t.PriorityQueue.make();c.push(r,0);for(var d,f,p,m,g,v,S,C,w;!c.empty();){d=c.pop(),f=d.value,m=d.cost,g=n[f]||{};for(p in g)g.hasOwnProperty(p)&&(v=g[p],S=m+v,C=l[p],w=typeof l[p]>"u",(w||C>S)&&(l[p]=S,c.push(p,S),a[p]=f))}if(typeof o<"u"&&typeof l[o]>"u"){var x=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(x)}return a},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],a=r;a;)o.push(a),n[a],a=n[a];return o.reverse(),o},find_path:function(n,r,o){var a=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(a,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},a;n=n||{};for(a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(HE)),HE.exports}var U5;function Ife(){return U5||(U5=1,(function(e){const t=ll(),n=Sfe(),r=Cfe(),o=wfe(),a=xfe(),l=a9(),c=il(),d=_fe();function f(x){return unescape(encodeURIComponent(x)).length}function p(x,I,T){const O=[];let D;for(;(D=x.exec(T))!==null;)O.push({data:D[0],index:D.index,mode:I,length:D[0].length});return O}function m(x){const I=p(l.NUMERIC,t.NUMERIC,x),T=p(l.ALPHANUMERIC,t.ALPHANUMERIC,x);let O,D;return c.isKanjiModeEnabled()?(O=p(l.BYTE,t.BYTE,x),D=p(l.KANJI,t.KANJI,x)):(O=p(l.BYTE_KANJI,t.BYTE,x),D=[]),I.concat(T,O,D).sort(function(M,L){return M.index-L.index}).map(function(M){return{data:M.data,mode:M.mode,length:M.length}})}function g(x,I){switch(I){case t.NUMERIC:return n.getBitsLength(x);case t.ALPHANUMERIC:return r.getBitsLength(x);case t.KANJI:return a.getBitsLength(x);case t.BYTE:return o.getBitsLength(x)}}function v(x){return x.reduce(function(I,T){const O=I.length-1>=0?I[I.length-1]:null;return O&&O.mode===T.mode?(I[I.length-1].data+=T.data,I):(I.push(T),I)},[])}function S(x){const I=[];for(let T=0;T<x.length;T++){const O=x[T];switch(O.mode){case t.NUMERIC:I.push([O,{data:O.data,mode:t.ALPHANUMERIC,length:O.length},{data:O.data,mode:t.BYTE,length:O.length}]);break;case t.ALPHANUMERIC:I.push([O,{data:O.data,mode:t.BYTE,length:O.length}]);break;case t.KANJI:I.push([O,{data:O.data,mode:t.BYTE,length:f(O.data)}]);break;case t.BYTE:I.push([{data:O.data,mode:t.BYTE,length:f(O.data)}])}}return I}function C(x,I){const T={},O={start:{}};let D=["start"];for(let P=0;P<x.length;P++){const M=x[P],L=[];for(let z=0;z<M.length;z++){const G=M[z],j=""+P+z;L.push(j),T[j]={node:G,lastCount:0},O[j]={};for(let F=0;F<D.length;F++){const q=D[F];T[q]&&T[q].node.mode===G.mode?(O[q][j]=g(T[q].lastCount+G.length,G.mode)-g(T[q].lastCount,G.mode),T[q].lastCount+=G.length):(T[q]&&(T[q].lastCount=G.length),O[q][j]=g(G.length,G.mode)+4+t.getCharCountIndicator(G.mode,I))}}D=L}for(let P=0;P<D.length;P++)O[D[P]].end=0;return{map:O,table:T}}function w(x,I){let T;const O=t.getBestModeForData(x);if(T=t.from(I,O),T!==t.BYTE&&T.bit<O.bit)throw new Error('"'+x+'" cannot be encoded with mode '+t.toString(T)+`.
76
+ Suggested mode is: `+t.toString(O));switch(T===t.KANJI&&!c.isKanjiModeEnabled()&&(T=t.BYTE),T){case t.NUMERIC:return new n(x);case t.ALPHANUMERIC:return new r(x);case t.KANJI:return new a(x);case t.BYTE:return new o(x)}}e.fromArray=function(I){return I.reduce(function(T,O){return typeof O=="string"?T.push(w(O,null)):O.data&&T.push(w(O.data,O.mode)),T},[])},e.fromString=function(I,T){const O=m(I,c.isKanjiModeEnabled()),D=S(O),P=C(D,T),M=d.find_path(P.map,"start","end"),L=[];for(let z=1;z<M.length-1;z++)L.push(P.table[M[z]].node);return e.fromArray(v(L))},e.rawSplit=function(I){return e.fromArray(m(I,c.isKanjiModeEnabled()))}})(UE)),UE}var F5;function Afe(){if(F5)return xE;F5=1;const e=il(),t=H2(),n=ufe(),r=dfe(),o=ffe(),a=hfe(),l=pfe(),c=r9(),d=vfe(),f=yfe(),p=bfe(),m=ll(),g=Ife();function v(P,M){const L=P.size,z=a.getPositions(M);for(let G=0;G<z.length;G++){const j=z[G][0],F=z[G][1];for(let q=-1;q<=7;q++)if(!(j+q<=-1||L<=j+q))for(let X=-1;X<=7;X++)F+X<=-1||L<=F+X||(q>=0&&q<=6&&(X===0||X===6)||X>=0&&X<=6&&(q===0||q===6)||q>=2&&q<=4&&X>=2&&X<=4?P.set(j+q,F+X,!0,!0):P.set(j+q,F+X,!1,!0))}}function S(P){const M=P.size;for(let L=8;L<M-8;L++){const z=L%2===0;P.set(L,6,z,!0),P.set(6,L,z,!0)}}function C(P,M){const L=o.getPositions(M);for(let z=0;z<L.length;z++){const G=L[z][0],j=L[z][1];for(let F=-2;F<=2;F++)for(let q=-2;q<=2;q++)F===-2||F===2||q===-2||q===2||F===0&&q===0?P.set(G+F,j+q,!0,!0):P.set(G+F,j+q,!1,!0)}}function w(P,M){const L=P.size,z=f.getEncodedBits(M);let G,j,F;for(let q=0;q<18;q++)G=Math.floor(q/3),j=q%3+L-8-3,F=(z>>q&1)===1,P.set(G,j,F,!0),P.set(j,G,F,!0)}function x(P,M,L){const z=P.size,G=p.getEncodedBits(M,L);let j,F;for(j=0;j<15;j++)F=(G>>j&1)===1,j<6?P.set(j,8,F,!0):j<8?P.set(j+1,8,F,!0):P.set(z-15+j,8,F,!0),j<8?P.set(8,z-j-1,F,!0):j<9?P.set(8,15-j-1+1,F,!0):P.set(8,15-j-1,F,!0);P.set(z-8,8,1,!0)}function I(P,M){const L=P.size;let z=-1,G=L-1,j=7,F=0;for(let q=L-1;q>0;q-=2)for(q===6&&q--;;){for(let X=0;X<2;X++)if(!P.isReserved(G,q-X)){let Se=!1;F<M.length&&(Se=(M[F]>>>j&1)===1),P.set(G,q-X,Se),j--,j===-1&&(F++,j=7)}if(G+=z,G<0||L<=G){G-=z,z=-z;break}}}function T(P,M,L){const z=new n;L.forEach(function(X){z.put(X.mode.bit,4),z.put(X.getLength(),m.getCharCountIndicator(X.mode,P)),X.write(z)});const G=e.getSymbolTotalCodewords(P),j=c.getTotalCodewordsCount(P,M),F=(G-j)*8;for(z.getLengthInBits()+4<=F&&z.put(0,4);z.getLengthInBits()%8!==0;)z.putBit(0);const q=(F-z.getLengthInBits())/8;for(let X=0;X<q;X++)z.put(X%2?17:236,8);return O(z,P,M)}function O(P,M,L){const z=e.getSymbolTotalCodewords(M),G=c.getTotalCodewordsCount(M,L),j=z-G,F=c.getBlocksCount(M,L),q=z%F,X=F-q,Se=Math.floor(z/F),W=Math.floor(j/F),ee=W+1,me=Se-W,ge=new d(me);let Te=0;const $=new Array(F),te=new Array(F);let fe=0;const ce=new Uint8Array(P.buffer);for(let Ae=0;Ae<F;Ae++){const Je=Ae<X?W:ee;$[Ae]=ce.slice(Te,Te+Je),te[Ae]=ge.encode($[Ae]),Te+=Je,fe=Math.max(fe,Je)}const be=new Uint8Array(z);let Fe=0,ke,ae;for(ke=0;ke<fe;ke++)for(ae=0;ae<F;ae++)ke<$[ae].length&&(be[Fe++]=$[ae][ke]);for(ke=0;ke<me;ke++)for(ae=0;ae<F;ae++)be[Fe++]=te[ae][ke];return be}function D(P,M,L,z){let G;if(Array.isArray(P))G=g.fromArray(P);else if(typeof P=="string"){let Se=M;if(!Se){const W=g.rawSplit(P);Se=f.getBestVersionForData(W,L)}G=g.fromString(P,Se||40)}else throw new Error("Invalid data");const j=f.getBestVersionForData(G,L);if(!j)throw new Error("The amount of data is too big to be stored in a QR Code");if(!M)M=j;else if(M<j)throw new Error(`
77
+ The chosen QR Code version cannot contain this amount of data.
78
+ Minimum version required to store current data is: `+j+`.
79
+ `);const F=T(M,L,G),q=e.getSymbolSize(M),X=new r(q);return v(X,M),S(X),C(X,M),x(X,L,0),M>=7&&w(X,M),I(X,F),isNaN(z)&&(z=l.getBestMask(X,x.bind(null,X,L))),l.applyMask(z,X),x(X,L,z),{modules:X,version:M,errorCorrectionLevel:L,maskPattern:z,segments:G}}return xE.create=function(M,L){if(typeof M>"u"||M==="")throw new Error("No input text");let z=t.M,G,j;return typeof L<"u"&&(z=t.from(L.errorCorrectionLevel,t.M),G=f.from(L.version),j=l.from(L.maskPattern),L.toSJISFunc&&e.setToSJISFunction(L.toSJISFunc)),D(M,G,z,j)},xE}var qE={},VE={},z5;function s9(){return z5||(z5=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(a){return[a,a]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,a=r.width&&r.width>=21?r.width:void 0,l=r.scale||4;return{width:a,scale:a?4:l,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const a=e.getScale(r,o);return Math.floor((r+o.margin*2)*a)},e.qrToImageData=function(r,o,a){const l=o.modules.size,c=o.modules.data,d=e.getScale(l,a),f=Math.floor((l+a.margin*2)*d),p=a.margin*d,m=[a.color.light,a.color.dark];for(let g=0;g<f;g++)for(let v=0;v<f;v++){let S=(g*f+v)*4,C=a.color.light;if(g>=p&&v>=p&&g<f-p&&v<f-p){const w=Math.floor((g-p)/d),x=Math.floor((v-p)/d);C=m[c[w*l+x]?1:0]}r[S++]=C.r,r[S++]=C.g,r[S++]=C.b,r[S]=C.a}}})(VE)),VE}var $5;function Tfe(){return $5||($5=1,(function(e){const t=s9();function n(o,a,l){o.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=l,a.width=l,a.style.height=l+"px",a.style.width=l+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(a,l,c){let d=c,f=l;typeof d>"u"&&(!l||!l.getContext)&&(d=l,l=void 0),l||(f=r()),d=t.getOptions(d);const p=t.getImageWidth(a.modules.size,d),m=f.getContext("2d"),g=m.createImageData(p,p);return t.qrToImageData(g.data,a,d),n(m,f,p),m.putImageData(g,0,0),f},e.renderToDataURL=function(a,l,c){let d=c;typeof d>"u"&&(!l||!l.getContext)&&(d=l,l=void 0),d||(d={});const f=e.render(a,l,d),p=d.type||"image/png",m=d.rendererOpts||{};return f.toDataURL(p,m.quality)}})(qE)),qE}var WE={},j5;function Rfe(){if(j5)return WE;j5=1;const e=s9();function t(o,a){const l=o.a/255,c=a+'="'+o.hex+'"';return l<1?c+" "+a+'-opacity="'+l.toFixed(2).slice(1)+'"':c}function n(o,a,l){let c=o+a;return typeof l<"u"&&(c+=" "+l),c}function r(o,a,l){let c="",d=0,f=!1,p=0;for(let m=0;m<o.length;m++){const g=Math.floor(m%a),v=Math.floor(m/a);!g&&!f&&(f=!0),o[m]?(p++,m>0&&g>0&&o[m-1]||(c+=f?n("M",g+l,.5+v+l):n("m",d,0),d=0,f=!1),g+1<a&&o[m+1]||(c+=n("h",p),p=0)):d++}return c}return WE.render=function(a,l,c){const d=e.getOptions(l),f=a.modules.size,p=a.modules.data,m=f+d.margin*2,g=d.color.light.a?"<path "+t(d.color.light,"fill")+' d="M0 0h'+m+"v"+m+'H0z"/>':"",v="<path "+t(d.color.dark,"stroke")+' d="'+r(p,f,d.margin)+'"/>',S='viewBox="0 0 '+m+" "+m+'"',w='<svg xmlns="http://www.w3.org/2000/svg" '+(d.width?'width="'+d.width+'" height="'+d.width+'" ':"")+S+' shape-rendering="crispEdges">'+g+v+`</svg>
80
+ `;return typeof c=="function"&&c(null,w),w},WE}var B5;function Ofe(){if(B5)return oc;B5=1;const e=cfe(),t=Afe(),n=Tfe(),r=Rfe();function o(a,l,c,d,f){const p=[].slice.call(arguments,1),m=p.length,g=typeof p[m-1]=="function";if(!g&&!e())throw new Error("Callback required as last argument");if(g){if(m<2)throw new Error("Too few arguments provided");m===2?(f=c,c=l,l=d=void 0):m===3&&(l.getContext&&typeof f>"u"?(f=d,d=void 0):(f=d,d=c,c=l,l=void 0))}else{if(m<1)throw new Error("Too few arguments provided");return m===1?(c=l,l=d=void 0):m===2&&!l.getContext&&(d=c,c=l,l=void 0),new Promise(function(v,S){try{const C=t.create(c,d);v(a(C,l,d))}catch(C){S(C)}})}try{const v=t.create(c,d);f(null,a(v,l,d))}catch(v){f(v)}}return oc.create=t.create,oc.toCanvas=o.bind(null,n.render),oc.toDataURL=o.bind(null,n.renderToDataURL),oc.toString=o.bind(null,function(a,l,c){return r.render(a,c)}),oc}var Mfe=Ofe();const Nfe=Xc(Mfe),Pfe=e=>e==="signIn"||e==="signUp",q2=e=>!!e&&(e==="EMAIL_OTP"||e==="SMS_MFA"),{getConfirmText:kfe,getConfirmingText:Dfe,getBackToSignInText:Lfe,getResendCodeText:Ufe}=Sn,$v=()=>{const{isPending:e,toSignIn:t,challengeName:n,resendCode:r,selectedAuthMethod:o,availableAuthMethods:a}=ht(d=>[d.isPending,d.toSignIn,d.challengeName,d.resendCode,d.selectedAuthMethod,d.availableAuthMethods]),l=!!o&&o!=="PASSWORD"||!!a?.some(d=>d!=="PASSWORD"),c=q2(n)&&l&&r;return B.createElement(ze,{direction:"column"},B.createElement(Ht,{isDisabled:e,type:"submit",variation:"primary",isLoading:e,loadingText:Dfe()},kfe()),c&&B.createElement(Ht,{onClick:r,type:"button"},Ufe()),B.createElement(Ht,{onClick:t,type:"button",variation:"link",size:"small"},Lfe()))},Ffe=new $n("SetupTotp-logger"),{getSetupTotpText:zfe,getCopiedText:$fe,getLoadingText:jfe}=Sn,Ls=({className:e,variation:t})=>{const{totpSecretCode:n,isPending:r,username:o,QRFields:a}=ht(O=>[O.isPending,O.totpSecretCode,O.username]),{handleChange:l,handleSubmit:c}=kr(),{components:{SetupTotp:{Header:d=Ls.Header,Footer:f=Ls.Footer}}}=Pr(),[p,m]=_.useState(!0),[g,v]=_.useState(),[S,C]=_.useState("COPY"),{totpIssuer:w="AWSCognito",totpUsername:x=o}=a??{},I=_.useCallback(async()=>{try{const O=Mae(w,x,n),D=await Nfe.toDataURL(O);v(D)}catch(O){Ffe.error(O)}finally{m(!1)}},[w,x,n]);_.useEffect(()=>{g||I()},[I,g]);const T=()=>{navigator.clipboard.writeText(n),C($fe())};return _.createElement(hr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-totp":"",method:"post",onChange:l,onSubmit:c},_.createElement(ze,{as:"fieldset",direction:"column",isDisabled:r},_.createElement(d,null),_.createElement(ze,{direction:"column"},p?_.createElement("p",null,jfe(),"…"):_.createElement("img",{"data-amplify-qrcode":!0,src:g,alt:"qr code",width:"228",height:"228"}),_.createElement(ze,{"data-amplify-copy":!0},_.createElement("div",null,n),_.createElement(ze,{"data-amplify-copy-svg":!0,onClick:T},_.createElement("div",{"data-amplify-copy-tooltip":!0},S),_.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z"})))),_.createElement(qo,null),_.createElement(mr,null)),_.createElement($v,null),_.createElement(f,null))))};Ls.Header=function(){return _.createElement(Jn,{level:3},zfe())};Ls.Footer=function(){return null};const{getSubmitText:Bfe,getSubmittingText:Hfe}=Sn,jv=e=>{const{cancelButtonSendType:t,cancelButtonText:n,submitButtonText:r}=e,{isPending:o,resendCode:a,skipVerification:l,toSignIn:c}=ht(m=>[m.isPending]),d=()=>{switch(t){case"SKIP":l();break;case"RESEND":a();break;case"SIGN_IN":c();break;default:return}},f=o?B.createElement(B.Fragment,null,Hfe(),"…"):B.createElement(B.Fragment,null,Bfe()),p=r??f;return B.createElement(ze,{direction:"column"},B.createElement(Ht,{variation:"primary",isDisabled:o,type:"submit"},p),B.createElement(ze,{direction:"column",alignItems:"center"},B.createElement(Ht,{onClick:d,type:"button",variation:"link",size:"small"},n)))},qfe=()=>B.createElement("svg",{"aria-label":"Apple icon",className:"amplify-icon federated-sign-in-icon",fill:"#000",preserveAspectRatio:"xMidYMid",stroke:"#000",strokeWidth:"0",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},B.createElement("path",{d:"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"})),Vfe=()=>B.createElement("svg",{"aria-label":"Google icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},B.createElement("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285F4"}),B.createElement("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34A853"}),B.createElement("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",fill:"#FBBC05"}),B.createElement("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#EB4335"})),Wfe=()=>B.createElement($F,{className:"federated-sign-in-icon",ariaLabel:"Facebook icon",viewBox:{minX:0,minY:0,width:279,height:538},pathData:"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z",fill:"#1877F2"}),Gfe=()=>B.createElement("svg",{"aria-label":"Amazon icon",className:"amplify-icon federated-sign-in-icon",viewBox:"0 0 243 264",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},B.createElement("path",{d:"M230.826 208.039C227.468 203.683 208.551 205.982 200.056 206.998C197.471 207.321 197.076 205.042 199.407 203.405C214.475 192.665 239.201 195.766 242.082 199.364C244.966 202.982 241.337 228.071 227.173 240.049C225.001 241.888 222.93 240.904 223.898 238.468C227.077 230.431 234.205 212.419 230.826 208.039ZM123.769 264C71.0234 264 39.0764 241.955 14.7853 217.542C9.97339 212.706 3.71799 206.296 0.311513 200.691C-1.09773 198.372 2.59096 195.022 5.04421 196.844C35.239 219.268 79.1012 239.538 122.53 239.538C151.82 239.538 188.046 227.47 217.669 214.868C222.147 212.966 222.147 219.18 221.512 221.061C221.183 222.032 206.515 236.221 186.247 247.047C167.304 257.166 143.397 264 123.769 264Z",fill:"#F2541B"}),B.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M142.943 111.185C142.943 124.756 143.268 136.054 136.406 148.123C130.856 157.913 122.027 163.95 112.222 163.95C98.8288 163.95 90.9806 153.772 90.9806 138.693C90.9806 109.036 117.677 103.647 142.943 103.647V111.185ZM178.166 196.081C175.858 198.15 171.635 198.22 169.914 196.894C157.974 187.684 149.89 173.688 149.89 173.688C130.706 193.156 117.127 199 92.2879 199C62.8772 199 40 180.905 40 144.729C40 116.461 55.3552 97.2408 77.2563 87.823C96.2094 79.5256 122.684 78.0173 142.943 75.7517C142.943 75.7517 144.633 53.933 138.699 45.9806C134.098 39.8163 126.272 36.9329 119.089 36.9329C106.127 36.8829 93.61 43.9051 91.1262 57.4188C90.4136 61.2829 87.5533 64.5261 84.54 64.206L51.0823 60.5922C48.5156 60.2951 45.0381 57.6639 45.8636 53.3081C53.644 12.3684 90.7373 0 123.989 0C140.983 0 163.21 4.51651 176.608 17.3349C193.597 33.1648 191.969 54.2755 191.969 77.2722V131.51C191.969 147.835 198.768 154.987 205.151 163.775C207.376 166.953 207.886 170.714 205.04 173.032C197.902 178.999 178.166 196.081 178.166 196.081Z",fill:"#F2541B"})),Qp=e=>{const{icon:t,provider:n,text:r}=e,{toFederatedSignIn:o}=ht(),a=c=>{c.preventDefault(),o({provider:n})};let l;return t==="facebook"?l=B.createElement(Wfe,null):t==="google"?l=B.createElement(Vfe,null):t==="amazon"?l=B.createElement(Gfe,null):t==="apple"&&(l=B.createElement(qfe,null)),B.createElement(Ht,{onClick:a,className:"federated-sign-in-button",gap:"1rem"},l,B.createElement(Jr,{as:"span"},r))},{getSignInWithFederationText:Xp,getOrText:Kfe}=Sn;function i9(){const{route:e,socialProviders:t}=ht(({route:n,socialProviders:r})=>[n,r]);return t.length===0?null:B.createElement(ze,{direction:"column",padding:"0 0 1rem 0",className:"federated-sign-in-container"},t.map(n=>{switch(n){case"amazon":return B.createElement(Qp,{icon:"amazon",key:n,provider:Sc.Amazon,text:Xp(e,n)});case"apple":return B.createElement(Qp,{icon:"apple",key:n,provider:Sc.Apple,text:Xp(e,n)});case"facebook":return B.createElement(Qp,{icon:"facebook",key:n,provider:Sc.Facebook,text:Xp(e,n)});case"google":return B.createElement(Qp,{icon:"google",key:n,provider:Sc.Google,text:Xp(e,n)});default:console.error(`Authenticator does not support ${n}. Please open an issue: https://github.com/aws-amplify/amplify-ui/issues/choose`)}}),B.createElement(D2,{size:"small",label:Kfe()}))}const{getSignInText:Jp,getSigningInText:Zfe,getForgotPasswordText:Yfe,getSignInWithEmailText:Qfe,getSignInWithSmsText:Xfe,getSignInWithPasskeyText:Jfe,getOtherSignInOptionsText:ehe,getEnterUsernameFirstText:the}=Sn;function Ma(){const{isPending:e,availableAuthMethods:t,preferredChallenge:n,toShowAuthMethods:r}=ht(x=>[x.isPending,x.availableAuthMethods,x.preferredChallenge,x.toShowAuthMethods]),{handleChange:o,handleSubmit:a}=kr(),[l,c]=B.useState(""),{components:{SignIn:{Header:d=Ma.Header,Footer:f=Ma.Footer}}}=Pr(),m=t&&t.length>1&&n,g=l.trim().length>0,v=B.useCallback(x=>{const{name:I,value:T}=x.target;I==="username"&&typeof T=="string"&&c(T),o(x)},[o]),S=()=>{if(!n)return Jp();switch(n){case"EMAIL_OTP":return Qfe();case"SMS_OTP":return Xfe();case"WEB_AUTHN":return Jfe();default:return Jp()}},C=x=>{x.preventDefault(),a(x)},w=x=>{x.preventDefault(),r()};return B.createElement(je,null,B.createElement(d,null),B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signin":"",method:"post",onSubmit:m?C:a,onChange:v},B.createElement(i9,null),B.createElement(ze,{direction:"column"},B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:e},B.createElement(Fv,null,B.createElement("legend",null,Jp())),B.createElement(qo,null)),B.createElement(mr,null),B.createElement(Ht,{isDisabled:e,type:"submit",variation:"primary",isLoading:e,loadingText:Zfe()},m?S():Jp()),m&&B.createElement(Ht,{onClick:w,size:"small",variation:"link",isDisabled:e||!g,title:g?void 0:the()},ehe()),B.createElement(f,null))))}const nhe=()=>{const{toForgotPassword:e}=ht(t=>[t.toForgotPassword]);return B.createElement(je,{"data-amplify-footer":""},B.createElement(Ht,{onClick:e,size:"small",variation:"link"},Yfe()))};Ma.Footer=nhe;Ma.Header=function(){return null};const{getCreateAccountText:H5,getCreatingAccountText:rhe,getCreateAccountWithEmailText:ohe,getCreateAccountWithPasswordText:ahe,getCreateAccountWithSmsText:she,getOrText:ihe}=Sn;function bo(){const{hasValidationErrors:e,isPending:t,availableAuthMethods:n,preferredChallenge:r,selectedAuthMethod:o}=ht(T=>[T.hasValidationErrors,T.isPending,T.availableAuthMethods,T.preferredChallenge,T.selectedAuthMethod]),{handleChange:a,handleBlur:l,handleSubmit:c}=kr(),{components:{SignUp:{Header:d=bo.Header,FormFields:f=bo.FormFields,Footer:p=bo.Footer}}}=Pr(),m=n?.filter(T=>T!=="WEB_AUTHN"),g=m&&m.length>1,v=r&&r!=="WEB_AUTHN"?r:"PASSWORD",S=m?.filter(T=>T!==v)??[],w=(o??v)!=="PASSWORD",x=T=>{switch(T){case"EMAIL_OTP":return ohe();case"SMS_OTP":return she();case"PASSWORD":return g?ahe():H5();default:return H5()}},I=T=>O=>{O.preventDefault();const D=O.target.closest("form");if(D){if(!D.__authMethod){const P=document.createElement("input");P.name="__authMethod",D.appendChild(P)}D.__authMethod.type="hidden",D.__authMethod.value=T,D.requestSubmit()}};return B.createElement(je,null,B.createElement(d,null),B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-signup":"",method:"post",onChange:a,onSubmit:c,onBlur:l},B.createElement(i9,null),B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:t},B.createElement(ze,{direction:"column"},B.createElement(f,{includePassword:!w}),B.createElement(mr,null)),B.createElement(Ht,{isDisabled:(!g||S.length==0)&&e||t,isFullWidth:!0,type:"submit",variation:"primary",isLoading:t,loadingText:rhe(),onClick:I(v)},x(v)),g&&S.length>0&&B.createElement(B.Fragment,null,B.createElement(ze,{justifyContent:"center",padding:"medium 0"},ihe()),S.map(T=>B.createElement(Ht,{key:T,isDisabled:t,isFullWidth:!0,type:"button",variation:"primary",onClick:I(T)},x(T)))),B.createElement(p,null))))}bo.Header=function(){return null};bo.FormFields=function(){return B.createElement(qo,null)};bo.Footer=function(){return null};const{getSignInTabText:lhe,getSignUpTabText:che}=Sn,uhe=({className:e,hideSignUp:t,variation:n})=>{const{route:r,toSignIn:o,toSignUp:a}=ht(l=>[l.route,l.toSignIn,l.toSignUp]);return B.createElement(hr,{className:e,variation:n},t?B.createElement(je,{"data-amplify-router-content":""},r==="signIn"&&B.createElement(Ma,null)):B.createElement(Ei.Container,{value:r,isLazy:!0,onValueChange:l=>{l!==r&&(l==="signIn"?o():a())}},B.createElement(Ei.List,{spacing:"equal",indicatorPosition:"top"},B.createElement(Ei.Item,{value:"signIn"},lhe()),B.createElement(Ei.Item,{value:"signUp"},che())),B.createElement(Ei.Panel,{value:"signIn","data-amplify-router-content":""},B.createElement(Ma,null)),B.createElement(Ei.Panel,{value:"signUp","data-amplify-router-content":""},B.createElement(bo,null))))},{getAccountRecoveryInfoText:dhe,getSkipText:fhe}=Sn,Wi=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=kr(),{components:{ConfirmVerifyUser:{Header:a=Wi.Header,Footer:l=Wi.Footer}}}=Pr();return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmverifyuser":"",method:"post",onChange:r,onSubmit:o},B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(a,null),B.createElement(ze,{direction:"column"},B.createElement(qo,null)),B.createElement(mr,null),B.createElement(jv,{cancelButtonText:fhe(),cancelButtonSendType:"SKIP"}),B.createElement(l,null))))};Wi.Header=function(){return B.createElement(Jn,{level:3},dhe())};Wi.Footer=function(){return null};const{getSkipText:hhe,getVerifyText:phe,getVerifyContactText:mhe,getAccountRecoveryInfoText:ghe}=Sn,vhe=e=>Object.entries(e).map(([t,n],r)=>{const o=Av[t].label;return B.createElement(U2,{name:"unverifiedAttr",value:t,key:t,defaultChecked:r===0},ye(o),":"," ",Rae(o,n))}),Gi=({className:e,variation:t})=>{const{components:{VerifyUser:{Header:n=Gi.Header,Footer:r=Gi.Footer}}}=Pr(),{isPending:o,unverifiedUserAttributes:a}=ht(({isPending:p,unverifiedUserAttributes:m})=>[p,m]),{handleChange:l,handleSubmit:c}=kr(),d=o?B.createElement(B.Fragment,null,"Verifying…"):B.createElement(B.Fragment,null,phe()),f=B.createElement(F2,{legend:mhe(),name:"verify_context",isDisabled:o,legendHidden:!0},vhe(a));return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-verifyuser":"",method:"post",onChange:l,onSubmit:c},B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:o},B.createElement(n,null),f,B.createElement(mr,null),B.createElement(jv,{cancelButtonText:hhe(),cancelButtonSendType:"SKIP",submitButtonText:d}),B.createElement(r,null))))};Gi.Header=function(){return B.createElement(Jn,{level:3},ghe())};Gi.Footer=function(){return null};const{getChallengeText:yhe,getDeliveryMessageText:bhe,getDeliveryMethodText:She}=Sn,Ki=({className:e,variation:t})=>{const{isPending:n,challengeName:r,codeDeliveryDetails:o}=ht(p=>[p.isPending,p.challengeName,p.codeDeliveryDetails]),{handleChange:a,handleSubmit:l}=kr(),{components:{ConfirmSignIn:{Header:c=Ki.Header,Footer:d=Ki.Footer}}}=Pr(),f=q2(r)&&o;return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmsignin":"",method:"post",onChange:a,onSubmit:l},B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(c,null),B.createElement(ze,{direction:"column"},f&&B.createElement(Jr,{className:"amplify-authenticator__subtitle"},bhe(o)),B.createElement(qo,null),B.createElement(mr,null)),B.createElement($v,null),B.createElement(d,null))))};function Che(){const{challengeName:e,codeDeliveryDetails:t}=ht(({challengeName:r,codeDeliveryDetails:o})=>[r,o]),n=q2(e)&&t;return B.createElement(B.Fragment,null,B.createElement(Jn,{level:3},yhe(e)),n&&B.createElement(Jn,{level:5},She(t)))}Ki.Header=Che;Ki.Footer=function(){return null};const{getResendCodeText:Ehe,getResetYourPasswordText:whe}=Sn,Zi=({className:e,variation:t})=>{const{isPending:n}=ht(d=>[d.isPending]),{handleBlur:r,handleChange:o,handleSubmit:a}=kr(),{components:{ConfirmResetPassword:{Header:l=Zi.Header,Footer:c=Zi.Footer}}}=Pr();return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-confirmresetpassword":"",method:"post",onSubmit:a,onChange:o,onBlur:r},B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(l,null),B.createElement(ze,{direction:"column"},B.createElement(qo,null)),B.createElement(mr,null),B.createElement(jv,{cancelButtonSendType:"RESEND",cancelButtonText:Ehe()}),B.createElement(c,null))))};Zi.Header=function(){const t=whe();return B.createElement(Jn,{level:3},t)};Zi.Footer=function(){return null};const{getBackToSignInText:xhe,getSendingText:_he,getSendCodeText:Ihe,getResetYourPasswordText:Ahe}=Sn,Us=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=kr(),{components:{ForgotPassword:{Header:a=Us.Header,Footer:l=Us.Footer}}}=Pr();return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-forgotpassword":"",method:"post",onChange:r,onSubmit:o},B.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},B.createElement(a,null),B.createElement(ze,{direction:"column"},B.createElement(qo,null)),B.createElement(mr,null),B.createElement(jv,{cancelButtonText:xhe(),cancelButtonSendType:"SIGN_IN",submitButtonText:n?B.createElement(B.Fragment,null,_he(),"…"):B.createElement(B.Fragment,null,Ihe())}),B.createElement(l,null))))};Us.Header=function(){return B.createElement(Jn,{level:3},Ahe())};Us.Footer=function(){return null};const{getMfaTypeLabelByValue:The,getSelectMfaTypeByChallengeName:Rhe,getSelectMfaTypeText:Ohe}=Sn,Fs=({className:e,variation:t})=>{const{isPending:n,allowedMfaTypes:r=[]}=ht(d=>[d.isPending,d.allowedMfaTypes]),{handleChange:o,handleSubmit:a}=kr(),{components:{SelectMfaType:{Header:l=Fs.Header,Footer:c=Fs.Footer}}}=Pr();return _.createElement(hr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-select-mfa-type":"",method:"post",onChange:o,onSubmit:a},_.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(l,null),_.createElement(ze,{direction:"column"},_.createElement(F2,{name:"mfa_type",legend:Ohe(),legendHidden:!0,isDisabled:n,isRequired:!0},r.map((d,f)=>_.createElement(U2,{name:"mfa_type",key:d,value:d,defaultChecked:f===0},The(d)))),_.createElement(mr,null)),_.createElement($v,null),_.createElement(c,null))))};Fs.Header=function(){const{challengeName:t}=ht(n=>[n.challengeName]);return _.createElement(Jn,{level:3},Rhe(t))};Fs.Footer=function(){return null};const{getSetupEmailText:Mhe}=Sn,zs=({className:e,variation:t})=>{const{isPending:n}=ht(c=>[c.isPending]),{handleChange:r,handleSubmit:o}=kr(),{components:{SetupEmail:{Header:a=zs.Header,Footer:l=zs.Footer}}}=Pr();return _.createElement(hr,{className:e,variation:t},_.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-setup-email":"",method:"post",onChange:r,onSubmit:o},_.createElement(ze,{as:"fieldset",direction:"column",isDisabled:n},_.createElement(a,null),_.createElement(ze,{direction:"column"},_.createElement(qo,null),_.createElement(mr,null)),_.createElement($v,null),_.createElement(l,null))))};zs.Header=function(){return _.createElement(Jn,{level:3},Mhe())};zs.Footer=function(){return null};const{getSignInWithPasswordText:yx,getSignInWithEmailText:Nhe,getSignInWithSmsText:Phe,getSignInWithPasskeyText:khe,getSigningInText:Dhe,getBackToSignInText:Lhe,getOrText:Uhe,getUsernameLabelByLoginMechanism:Fhe}=Sn,zhe=e=>{switch(e){case"EMAIL_OTP":return Nhe();case"SMS_OTP":return Phe();case"WEB_AUTHN":return khe();case"PASSWORD":return yx();default:return yx()}},$he=({className:e,variation:t})=>{const{isPending:n,username:r,availableAuthMethods:o,toSignIn:a,selectAuthMethod:l,loginMechanism:c}=ht(C=>[C.isPending,C.username,C.availableAuthMethods,C.toSignIn,C.selectAuthMethod,C.loginMechanism]),{handleChange:d,handleSubmit:f}=kr(),p=o??[],m=p.includes("PASSWORD"),g=p.filter(C=>C!=="PASSWORD"),v=C=>{l({method:C})},S=Fhe(c);return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":!0,"data-amplify-authenticator-signinselect":!0,method:"post",onSubmit:f,onChange:d},B.createElement(ze,{direction:"column"},B.createElement(th,{label:S,name:"username",value:r,isReadOnly:!0,isDisabled:!0}),m&&B.createElement(B.Fragment,null,B.createElement(L2,{label:"Password",name:"password",autoComplete:"current-password",isDisabled:n}),B.createElement(Ht,{isDisabled:n,type:"submit",variation:"primary",isFullWidth:!0,isLoading:n,loadingText:Dhe()},yx())),m&&g.length>0&&B.createElement(D2,{label:Uhe()}),g.length>0&&B.createElement(ze,{direction:"column",gap:"0.5rem"},g.map(C=>B.createElement(Ht,{key:C,variation:"primary",isFullWidth:!0,isDisabled:n,onClick:()=>v(C)},zhe(C)))),B.createElement(mr,null),B.createElement(Ht,{onClick:a,size:"small",variation:"link",isDisabled:n},Lhe()))))},jhe=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"54",height:"54",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("path",{d:"M22.9333 38.9333L41.7333 20.1333L38 16.4L22.9333 31.4667L15.3333 23.8667L11.6 27.6L22.9333 38.9333ZM26.6667 53.3333C22.9778 53.3333 19.5111 52.6333 16.2667 51.2333C13.0222 49.8333 10.2 47.9333 7.8 45.5333C5.4 43.1333 3.5 40.3111 2.1 37.0667C0.7 33.8222 0 30.3556 0 26.6667C0 22.9778 0.7 19.5111 2.1 16.2667C3.5 13.0222 5.4 10.2 7.8 7.8C10.2 5.4 13.0222 3.5 16.2667 2.1C19.5111 0.7 22.9778 0 26.6667 0C30.3556 0 33.8222 0.7 37.0667 2.1C40.3111 3.5 43.1333 5.4 45.5333 7.8C47.9333 10.2 49.8333 13.0222 51.2333 16.2667C52.6333 19.5111 53.3333 22.9778 53.3333 26.6667C53.3333 30.3556 52.6333 33.8222 51.2333 37.0667C49.8333 40.3111 47.9333 43.1333 45.5333 45.5333C43.1333 47.9333 40.3111 49.8333 37.0667 51.2333C33.8222 52.6333 30.3556 53.3333 26.6667 53.3333Z",fill:"currentColor"})))},Bhe=e=>{const{className:t,...n}=e;return _.createElement(je,{as:"span",width:"1em",height:"1em",className:$e(ie.Icon,t),...n},_.createElement("svg",{width:"195",height:"128",viewBox:"0 0 195 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_.createElement("circle",{cx:"60",cy:"36",r:"31",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M60 69C84.4313 69 105.396 83.8504 114.357 105.021C116.774 110.729 115.382 116.168 111.798 120.23C108.191 124.319 102.358 127 96 127H24C17.6416 127 11.8094 124.319 8.20215 120.23C4.61836 116.168 3.22626 110.729 5.64258 105.021C14.6036 83.8504 35.5687 69 60 69Z",stroke:"#00404D",strokeWidth:"2"}),_.createElement("circle",{cx:"122",cy:"26",r:"25",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),_.createElement("mask",{id:"path-4-inside-1_4178_10171",fill:"white"},_.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z"})),_.createElement("path",{d:"M121.951 13.927C124.887 13.927 127.658 14.5348 130.262 15.7503C132.866 16.9658 135.04 18.7222 136.786 21.0197C136.98 21.2601 137.042 21.4738 136.973 21.6608C136.903 21.8478 136.786 22.0081 136.619 22.1417C136.453 22.2753 136.259 22.3354 136.038 22.322C135.816 22.3086 135.622 22.1951 135.456 21.9814C133.932 19.8977 131.972 18.3015 129.576 17.1928C127.18 16.0842 124.638 15.5299 121.951 15.5299C119.264 15.5299 116.743 16.0842 114.388 17.1928C112.034 18.3015 110.081 19.8977 108.529 21.9814C108.363 22.2218 108.169 22.3554 107.947 22.3821C107.726 22.4088 107.532 22.3554 107.366 22.2218C107.172 22.0883 107.054 21.9213 107.012 21.7209C106.971 21.5206 107.033 21.3135 107.199 21.0998C108.917 18.8291 111.071 17.066 113.661 15.8104C116.251 14.5548 119.015 13.927 121.951 13.927ZM121.951 17.6937C125.691 17.6937 128.904 18.8959 131.591 21.3002C134.279 23.7045 135.622 26.6831 135.622 30.2361C135.622 31.5719 135.13 32.6872 134.147 33.5821C133.164 34.477 131.965 34.9245 130.553 34.9245C129.14 34.9245 127.928 34.477 126.917 33.5821C125.906 32.6872 125.4 31.5719 125.4 30.2361C125.4 29.3546 125.061 28.6132 124.382 28.0122C123.703 27.4111 122.893 27.1106 121.951 27.1106C121.009 27.1106 120.199 27.4111 119.52 28.0122C118.841 28.6132 118.502 29.3546 118.502 30.2361C118.502 32.8274 119.299 34.9913 120.891 36.7277C122.484 38.4642 124.541 39.6797 127.062 40.3742C127.311 40.4544 127.478 40.588 127.561 40.775C127.644 40.962 127.658 41.1623 127.602 41.376C127.547 41.563 127.436 41.7233 127.27 41.8569C127.104 41.9905 126.896 42.0305 126.647 41.9771C123.766 41.2825 121.411 39.9001 119.582 37.8297C117.754 35.7593 116.84 33.2281 116.84 30.2361C116.84 28.9004 117.339 27.7784 118.336 26.8701C119.333 25.9618 120.538 25.5077 121.951 25.5077C123.364 25.5077 124.569 25.9618 125.566 26.8701C126.563 27.7784 127.062 28.9004 127.062 30.2361C127.062 31.1177 127.408 31.859 128.101 32.4601C128.794 33.0612 129.611 33.3617 130.553 33.3617C131.495 33.3617 132.298 33.0612 132.963 32.4601C133.628 31.859 133.96 31.1177 133.96 30.2361C133.96 27.1373 132.783 24.5326 130.428 22.4222C128.073 20.3117 125.261 19.2565 121.993 19.2565C118.724 19.2565 115.912 20.3117 113.557 22.4222C111.202 24.5326 110.025 27.1239 110.025 30.1961C110.025 30.8372 110.087 31.6386 110.212 32.6004C110.337 33.5621 110.635 34.6841 111.106 35.9664C111.189 36.2068 111.182 36.4205 111.085 36.6075C110.988 36.7945 110.828 36.9281 110.607 37.0082C110.385 37.0884 110.171 37.0817 109.963 36.9882C109.755 36.8947 109.61 36.7411 109.526 36.5274C109.111 35.4855 108.813 34.4503 108.633 33.4218C108.453 32.3933 108.363 31.3314 108.363 30.2361C108.363 26.6831 109.7 23.7045 112.373 21.3002C115.046 18.8959 118.239 17.6937 121.951 17.6937ZM121.951 10C123.724 10 125.455 10.207 127.145 10.6211C128.835 11.0352 130.47 11.6296 132.049 12.4043C132.298 12.5379 132.443 12.6982 132.485 12.8852C132.526 13.0722 132.506 13.2592 132.423 13.4462C132.339 13.6332 132.201 13.7801 132.007 13.8869C131.813 13.9938 131.578 13.9804 131.301 13.8469C129.832 13.1256 128.316 12.5713 126.75 12.1839C125.185 11.7965 123.585 11.6029 121.951 11.6029C120.344 11.6029 118.765 11.7832 117.214 12.1438C115.663 12.5045 114.18 13.0722 112.768 13.8469C112.546 13.9804 112.324 14.0138 112.103 13.947C111.881 13.8803 111.715 13.74 111.604 13.5263C111.493 13.3126 111.466 13.1189 111.521 12.9453C111.576 12.7716 111.715 12.618 111.937 12.4844C113.488 11.683 115.109 11.0686 116.798 10.6411C118.488 10.2137 120.206 10 121.951 10ZM121.951 21.5807C124.527 21.5807 126.744 22.4155 128.6 24.0852C130.456 25.7548 131.384 27.8051 131.384 30.2361C131.384 30.4766 131.308 30.6702 131.155 30.8172C131.003 30.9641 130.802 31.0376 130.553 31.0376C130.331 31.0376 130.137 30.9641 129.971 30.8172C129.805 30.6702 129.722 30.4766 129.722 30.2361C129.722 28.2326 128.953 26.5562 127.415 25.2072C125.878 23.8581 124.056 23.1835 121.951 23.1835C119.846 23.1835 118.038 23.8581 116.528 25.2072C115.018 26.5562 114.264 28.2326 114.264 30.2361C114.264 32.4 114.651 34.2366 115.427 35.746C116.203 37.2553 117.339 38.7714 118.834 40.2941C119.001 40.4544 119.084 40.6414 119.084 40.8551C119.084 41.0688 119.001 41.2558 118.834 41.4161C118.668 41.5764 118.474 41.6565 118.253 41.6565C118.031 41.6565 117.837 41.5764 117.671 41.4161C116.037 39.7598 114.783 38.0701 113.91 36.347C113.038 34.624 112.601 32.587 112.601 30.2361C112.601 27.8051 113.516 25.7548 115.344 24.0852C117.172 22.4155 119.375 21.5807 121.951 21.5807ZM121.909 29.4347C122.159 29.4347 122.36 29.5148 122.512 29.6751C122.664 29.8354 122.741 30.0224 122.741 30.2361C122.741 32.2397 123.488 33.8826 124.984 35.1649C126.48 36.4472 128.226 37.0884 130.22 37.0884C130.386 37.0884 130.622 37.075 130.927 37.0483C131.231 37.0216 131.55 36.9815 131.882 36.9281C132.132 36.8747 132.346 36.9081 132.526 37.0283C132.706 37.1485 132.824 37.3288 132.88 37.5692C132.935 37.7829 132.893 37.9699 132.755 38.1302C132.616 38.2905 132.436 38.3974 132.215 38.4508C131.716 38.5844 131.28 38.6578 130.906 38.6712C130.532 38.6846 130.303 38.6912 130.22 38.6912C127.755 38.6912 125.615 37.8898 123.8 36.2869C121.986 34.6841 121.078 32.6671 121.078 30.2361C121.078 30.0224 121.155 29.8354 121.307 29.6751C121.459 29.5148 121.66 29.4347 121.909 29.4347Z",fill:"#00404D",stroke:"#00404D",strokeWidth:"4",mask:"url(#path-4-inside-1_4178_10171)"}),_.createElement("circle",{cx:"167.5",cy:"49.5",r:"19.5",fill:"#E9F9FC",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M167.89 43.65L161.26 54.18H167.89",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M167.5 60.42C173.316 60.42 178.03 55.7056 178.03 49.89V48.72",stroke:"#00404D",strokeWidth:"2"}),_.createElement("circle",{cx:"173.74",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),_.createElement("circle",{cx:"160.48",cy:"43.26",r:"1",fill:"#00404D",stroke:"#00404D",strokeWidth:"1.12"}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M104 112C116.129 112 126.457 104.288 130.347 93.5H147.5L155.5 101.5L168 89L180.5 101.5L193 89L180.5 76.5H130.984C127.705 64.6779 116.866 56 104 56C88.536 56 76 68.536 76 84C76 99.464 88.536 112 104 112ZM104 98C111.732 98 118 91.732 118 84C118 76.268 111.732 70 104 70C96.268 70 90 76.268 90 84C90 91.732 96.268 98 104 98Z",fill:"#BCECF5"}),_.createElement("path",{d:"M130.347 93.5V92.5H129.645L129.407 93.1608L130.347 93.5ZM147.5 93.5L148.207 92.7929L147.914 92.5H147.5V93.5ZM155.5 101.5L154.793 102.207L155.5 102.914L156.207 102.207L155.5 101.5ZM168 89L168.707 88.2929L168 87.5858L167.293 88.2929L168 89ZM180.5 101.5L179.793 102.207L180.5 102.914L181.207 102.207L180.5 101.5ZM193 89L193.707 89.7071L194.414 89L193.707 88.2929L193 89ZM180.5 76.5L181.207 75.7929L180.914 75.5H180.5V76.5ZM130.984 76.5L130.021 76.7673L130.224 77.5H130.984V76.5ZM129.407 93.1608C125.655 103.565 115.694 111 104 111V113C116.564 113 127.259 105.011 131.288 93.8392L129.407 93.1608ZM147.5 92.5H130.347V94.5H147.5V92.5ZM156.207 100.793L148.207 92.7929L146.793 94.2071L154.793 102.207L156.207 100.793ZM167.293 88.2929L154.793 100.793L156.207 102.207L168.707 89.7071L167.293 88.2929ZM181.207 100.793L168.707 88.2929L167.293 89.7071L179.793 102.207L181.207 100.793ZM192.293 88.2929L179.793 100.793L181.207 102.207L193.707 89.7071L192.293 88.2929ZM179.793 77.2071L192.293 89.7071L193.707 88.2929L181.207 75.7929L179.793 77.2071ZM130.984 77.5H180.5V75.5H130.984V77.5ZM104 57C116.405 57 126.859 65.3669 130.021 76.7673L131.948 76.2327C128.552 63.9889 117.327 55 104 55V57ZM77 84C77 69.0883 89.0883 57 104 57V55C87.9837 55 75 67.9837 75 84H77ZM104 111C89.0883 111 77 98.9117 77 84H75C75 100.016 87.9837 113 104 113V111ZM117 84C117 91.1797 111.18 97 104 97V99C112.284 99 119 92.2843 119 84H117ZM104 71C111.18 71 117 76.8203 117 84H119C119 75.7157 112.284 69 104 69V71ZM91 84C91 76.8203 96.8203 71 104 71V69C95.7157 69 89 75.7157 89 84H91ZM104 97C96.8203 97 91 91.1797 91 84H89C89 92.2843 95.7157 99 104 99V97Z",fill:"#00404D"}),_.createElement("path",{d:"M138.5 57V66",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M139 104V124",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M134 61.5L143 61.5",stroke:"#00404D",strokeWidth:"2"}),_.createElement("path",{d:"M129 114L149 114",stroke:"#00404D",strokeWidth:"2"})))},{getPasskeyPromptHeadingText:Hhe,getPasskeyPromptDescriptionText:qhe,getCreatePasskeyText:Vhe,getRegisteringText:Whe,getContinueWithoutPasskeyText:Ghe,getPasskeyCreatedSuccessText:Khe,getPasskeyRegisteredText:Zhe,getPasskeyRegistrationFailedText:Yhe,getPasskeyLabelText:Qhe,getExistingPasskeysText:Xhe,getSetupAnotherPasskeyText:Jhe,getContinueText:epe}=Sn;function tpe({className:e,variation:t}){const[n,r]=B.useState(!1),[o,a]=B.useState(null),[l,c]=B.useState(!1),[d,f]=B.useState([]),{submitForm:p,isPending:m}=ht(x=>[x.submitForm,x.isPending]),g=B.useCallback(async()=>{try{const x=await p2();f(x.credentials||[])}catch{}},[]);B.useEffect(()=>{n&&g()},[n,g]);const v=B.useCallback(()=>{p({type:"SKIP"})},[p]),S=B.useCallback(()=>{p({type:"SUBMIT"})},[p]),C=B.useCallback(async()=>{try{a(null),c(!0),await Yoe(),r(!0)}catch(x){const I=x,T=I.name??"",O=I.message??"";if(T==="PasskeyRegistrationCanceled"||T==="NotAllowedError"||O.includes("canceled")||O.includes("cancelled")||O.includes("ceremony has been canceled")||O.includes("not allowed")){v();return}a(Yhe())}finally{c(!1)}},[v]);if(n)return B.createElement(hr,{className:e,variation:t},B.createElement(ze,{direction:"column",padding:"large","data-amplify-authenticator-passkeyprompt":""},B.createElement(ze,{direction:"column",gap:"xs"},B.createElement(jhe,{className:"amplify-authenticator__passkey-success-icon"}),B.createElement(Jn,{level:4},Khe()),B.createElement(Jr,null,Zhe())),d.length>0&&B.createElement(je,{marginTop:"large"},B.createElement(Jn,{level:5},Xhe()),B.createElement(ze,{direction:"column",gap:"xs",marginTop:"xs"},d.map((x,I)=>B.createElement(je,{key:x.credentialId,className:"amplify-authenticator__passkey-credential-item"},B.createElement(Jr,{fontSize:"small"},x.friendlyCredentialName??`${Qhe()} ${I+1}`))))),B.createElement(ze,{direction:"column",gap:"medium",marginTop:"large"},B.createElement(Ht,{onClick:()=>{r(!1),C()},variation:"link"},Jhe()),B.createElement(Ht,{onClick:()=>S(),variation:"primary",isFullWidth:!0},epe()))));const w=m||l;return B.createElement(hr,{className:e,variation:t},B.createElement("form",{"data-amplify-form":"","data-amplify-authenticator-passkeyprompt":""},B.createElement(ze,{direction:"column",gap:"medium"},B.createElement(Jn,{level:4},Hhe()),B.createElement(Jr,null,qhe()),B.createElement(ze,{justifyContent:"center"},B.createElement(Bhe,{className:"amplify-authenticator__passkey-icon"})),B.createElement(ze,{direction:"column",gap:"medium"},B.createElement(Ht,{onClick:()=>{C()},variation:"primary",isDisabled:w,isLoading:l,loadingText:Whe()},Vhe()),B.createElement(Ht,{onClick:v,variation:"link",isDisabled:w},Ghe()),o&&B.createElement(Jr,{className:"amplify-authenticator__passkey-error"},o),B.createElement(mr,null)))))}function q5(){return null}const npe=e=>{switch(e){case"authenticated":case"idle":case"setup":case"transition":return q5;case"confirmSignUp":return Vi;case"confirmSignIn":return Ki;case"selectMfaType":return Fs;case"setupEmail":return zs;case"setupTotp":return Ls;case"signIn":case"signUp":return uhe;case"signInSelectAuthFactor":return $he;case"passkeyPrompt":return tpe;case"forceNewPassword":return yo;case"forgotPassword":return Us;case"confirmResetPassword":return Zi;case"verifyUser":return Gi;case"confirmVerifyUser":return Wi;default:return console.warn(`Unhandled Authenticator route - please open an issue: ${e}`),q5}};function rpe({className:e,hideSignUp:t,variation:n}){const{route:r}=ht(({route:a})=>[a]),o=_.useMemo(()=>npe(r),[r]);return B.createElement(o,{className:e,hideSignUp:Pfe(r)?t:void 0,variation:n})}const ope={Header:()=>null,SignIn:{Header:Ma.Header,Footer:Ma.Footer},SignUp:{Header:bo.Header,FormFields:bo.FormFields,Footer:bo.Footer},ConfirmSignUp:{Header:Vi.Header,Footer:Vi.Footer},SelectMfaType:{Header:Fs.Header,Footer:Fs.Footer},SetupEmail:{Header:zs.Header,Footer:zs.Footer},SetupTotp:{Header:Ls.Header,Footer:Ls.Footer},ConfirmResetPassword:{Header:Zi.Header,Footer:Zi.Footer},ConfirmSignIn:{Header:Ki.Header,Footer:Ki.Footer},VerifyUser:{Header:Gi.Header,Footer:Gi.Footer},ConfirmVerifyUser:{Header:Wi.Header,Footer:Wi.Footer},ForceNewPassword:{Header:yo.Header,Footer:yo.Footer,FormFields:yo.FormFields},ForgotPassword:{Header:Us.Header,Footer:Us.Footer},Footer:()=>null};function ape({children:e,className:t,components:n,formFields:r,hideSignUp:o,initialState:a,loginMechanisms:l,passwordSettings:c,passwordless:d,signUpAttributes:f,services:p,socialProviders:m,variation:g}){Jde({message:"The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.",shouldWarn:!1});const{route:v,signOut:S,user:C}=ht(({route:I,signOut:T,user:O})=>[I,T,O]);Oue({initialState:a,loginMechanisms:l,passwordSettings:c,passwordless:d,services:p,signUpAttributes:f,socialProviders:m,formFields:r});const w=_.useMemo(()=>({components:{...ope,...n}}),[n]);return v==="authenticated"||v==="signOut"?e?_.createElement(_.Fragment,null,Ra(e)?e({signOut:S,user:C}):e):null:_.createElement(t9.Provider,{value:w},_.createElement(rpe,{className:t,hideSignUp:o,variation:g}))}function Vo(e){return Nue({componentName:"Authenticator",packageName:"react",version:Xde}),_.createElement(UF,null,_.createElement(ape,{...e}))}Vo.Provider=UF;Vo.ForgotPassword=Us;Vo.SetupTotp=Ls;Vo.SignIn=Ma;Vo.SignUp=bo;Vo.ForceNewPassword=yo;Vo.SelectMfaType=Fs;Vo.SetupEmail=zs;const l9=({cssText:e,...t})=>e===void 0||/<\/style/i.test(e)?null:_.createElement("style",{...t,dangerouslySetInnerHTML:{__html:e}});l9.displayName="Style";const c9=({theme:e,...t})=>{if(!e)return null;const{name:n,cssText:r}=e;return _.createElement(l9,{...t,cssText:r,id:`amplify-theme-${n}`})};c9.displayName="ThemeStyle";function spe({children:e,colorMode:t,direction:n="ltr",nonce:r,theme:o}){const a=_.useMemo(()=>({theme:Pv(o),colorMode:t}),[o,t]);return _.createElement(FF.Provider,{value:a},_.createElement(Rde,{dir:n},_.createElement("div",{"data-amplify-theme":a.theme.name,"data-amplify-color-mode":t,dir:n},e),o?_.createElement(c9,{theme:a.theme,nonce:r}):null))}const ipe=({configured:e,authStatus:t})=>t==="authenticated",lpe=e=>e?e.signInDetails?.loginId??e.username??null:null,cpe=({children:e,fallback:t=null})=>{const{authStatus:n,signOut:r,user:o}=ht(a=>[a.authStatus,a.signOut,a.user]);return ipe({configured:!0,authStatus:n})?R.jsx(R.Fragment,{children:e({email:lpe(o),signOut:()=>r()})}):R.jsx(R.Fragment,{children:t})},upe=({children:e,fallback:t=null})=>nv()?R.jsx(cpe,{fallback:t,children:e}):R.jsx(R.Fragment,{children:t}),V5='system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',Ua=e=>`var(${e})`,Qt=Ua("--accent"),dpe=Ua("--accent-hover"),W5=Ua("--accent-soft"),Ad=Ua("--accent-fg"),G5=Ua("--surface"),ac=Ua("--fg"),fpe=Ua("--surface-sunken"),em=Ua("--fg-muted"),Td=Ua("--line"),hpe=Pv({name:"remit",tokens:{colors:{brand:{primary:{10:{value:W5},20:{value:W5},40:{value:Qt},60:{value:Qt},80:{value:Qt},90:{value:Qt},100:{value:Qt}}},background:{primary:{value:G5},secondary:{value:fpe}},font:{primary:{value:ac},secondary:{value:em},tertiary:{value:em},interactive:{value:Qt},inverse:{value:Ad},hover:{value:Qt},focus:{value:Qt},active:{value:Qt}},border:{primary:{value:Td},secondary:{value:Td},focus:{value:Qt}}},fonts:{default:{variable:{value:V5},static:{value:V5}}},radii:{small:{value:"3px"},medium:{value:"5px"},large:{value:"7px"}},components:{authenticator:{router:{borderColor:{value:Td},borderWidth:{value:"1px"},boxShadow:{value:"0 10px 30px -10px rgb(15 23 42 / 0.18), 0 4px 12px -6px rgb(15 23 42 / 0.1)"},backgroundColor:{value:G5}},form:{padding:{value:"1.75rem"}},orContainer:{color:{value:em}}},button:{color:{value:ac},primary:{backgroundColor:{value:Qt},color:{value:Ad},_hover:{backgroundColor:{value:dpe},color:{value:Ad}},_focus:{backgroundColor:{value:Qt},color:{value:Ad}},_active:{backgroundColor:{value:Qt},color:{value:Ad}}},link:{color:{value:Qt},_hover:{color:{value:Qt},backgroundColor:{value:"transparent"}},_focus:{color:{value:Qt},backgroundColor:{value:"transparent"}},_active:{color:{value:Qt},backgroundColor:{value:"transparent"}}}},fieldcontrol:{color:{value:ac},borderColor:{value:Td},_focus:{borderColor:{value:Qt},boxShadow:{value:`0 0 0 2px ${Qt}`}}},field:{label:{color:{value:ac}}},tabs:{borderColor:{value:Td},item:{color:{value:em},backgroundColor:{value:"transparent"},_active:{color:{value:Qt},borderColor:{value:Qt},backgroundColor:{value:"transparent"}},_hover:{color:{value:Qt}},_focus:{color:{value:Qt}}}},heading:{color:{value:ac}},text:{color:{value:ac}}}}}),ppe={signIn:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"}},signUp:{username:{placeholder:"Enter your username"},password:{placeholder:"Enter your password"},confirm_password:{placeholder:"Confirm your password"}}},mpe=()=>R.jsx(Xr,{tone:"warning",className:"fixed top-0 left-0 right-0 z-50 h-7 sm:h-10 overflow-hidden border-x-0 border-t-0",children:R.jsxs("span",{className:"flex items-center gap-2",children:[R.jsx("strong",{className:"font-semibold shrink-0",children:"Local dev"}),R.jsx("span",{className:"truncate hidden sm:inline",children:"— Cognito not configured. Set VITE_COGNITO_USER_POOL_ID and VITE_COGNITO_CLIENT_ID in .env.local to enable sign-in."}),R.jsx("span",{className:"truncate sm:hidden",children:"— no Cognito; signed out"})]})}),gpe=()=>R.jsx(W_,{note:Z_({betterAuthEnabled:!1,cognitoConfigured:nv()})}),vpe=({children:e})=>{const{authStatus:t}=ht(n=>[n.authStatus]);return t==="authenticated"?R.jsx(R.Fragment,{children:e}):t==="configuring"?R.jsx(lv,{}):R.jsx(spe,{theme:hpe,children:R.jsxs(sv,{children:[R.jsx(iv,{}),R.jsx(Vo,{hideSignUp:!1,formFields:ppe,components:{Footer:gpe}})]})})},ype=({children:e})=>nv()?R.jsx(Vo.Provider,{children:R.jsx(vpe,{children:e})}):R.jsxs("div",{className:"pt-7 sm:pt-10 [&_#main-content]:h-[calc(100dvh-1.75rem)] sm:[&_#main-content]:h-[calc(100dvh-2.5rem)]",children:[R.jsx(mpe,{}),e]}),u9=60;let Mc=null;const d9=()=>Math.floor(Date.now()/1e3),bpe=e=>e!==null&&e.expiresAt-u9>d9(),Spe=async()=>{const t=(await Qg()).tokens?.idToken;return t?(Mc={value:t.toString(),expiresAt:t.payload.exp??d9()+u9},Mc.value):(Mc=null,null)},Cpe=async()=>nv()?bpe(Mc)?Mc.value:Spe():null,Epe=()=>{Mc=null},cg={configure:aU,getToken:Cpe,resetToken:Epe,Shell:ype,Account:upe},wpe=({children:e})=>rv()?R.jsx(ng.Shell,{children:e}):R.jsx(cg.Shell,{children:e}),xpe=e=>rv()?R.jsx(ng.Account,{...e}):R.jsx(cg.Account,{...e}),_pe={configure:aU,getToken:()=>rv()?ng.getToken():cg.getToken(),resetToken:()=>{ng.resetToken(),cg.resetToken()},Shell:wpe,Account:xpe};var hu=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(){}},Ipe=class extends hu{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const 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(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},V2=new Ipe,Ape={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Tpe=class{#e=Ape;#t=!1;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)}},_i=new Tpe;function Rpe(e){setTimeout(e,0)}var Ope=typeof window>"u"||"Deno"in globalThis;function Yn(){}function Mpe(e,t){return typeof e=="function"?e(t):e}function bx(e){return typeof e=="number"&&e>=0&&e!==1/0}function f9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Os(e,t){return typeof e=="function"?e(t):e}function Rr(e,t){return typeof e=="function"?e(t):e}function K5(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:a,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==W2(l,t.options))return!1}else if(!wf(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||a&&!a(t))}function Z5(e,t){const{exact:n,status:r,predicate:o,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Yi(t.options.mutationKey)!==Yi(a))return!1}else if(!wf(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function W2(e,t){return(t?.queryKeyHashFn||Yi)(e)}function Yi(e){return JSON.stringify(e,(t,n)=>Sx(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function wf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>wf(e[n],t[n])):!1}var Npe=Object.prototype.hasOwnProperty;function h9(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=Y5(e)&&Y5(t);if(!r&&!(Sx(e)&&Sx(t)))return t;const a=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const m=r?p:l[p],g=e[m],v=t[m];if(g===v){d[m]=g,(r?p<a:Npe.call(e,m))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){d[m]=v;continue}const S=h9(g,v,n+1);d[m]=S,S===g&&f++}return a===c&&f===a?e:d}function ug(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Y5(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sx(e){if(!Q5(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Q5(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Q5(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ppe(e){return new Promise(t=>{_i.setTimeout(t,e)})}function Cx(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?h9(e,t):t}function kpe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Dpe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var G2=Symbol();function p9(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===G2?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function K2(e,t){return typeof e=="function"?e(...t):!!e}function Lpe(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var xf=(()=>{let e=()=>Ope;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ex(){let e,t;const n=new Promise((o,a)=>{e=o,t=a});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}var Upe=Rpe;function Fpe(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=Upe;const a=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{a(()=>{c(...d)})},schedule:a,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var bn=Fpe(),zpe=class extends hu{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const 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(n=>{n(e)}))}isOnline(){return this.#e}},dg=new zpe;function $pe(e){return Math.min(1e3*2**e,3e4)}function m9(e){return(e??"online")==="online"?dg.isOnline():!0}var wx=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function g9(e){let t=!1,n=0,r;const o=Ex(),a=()=>o.status!=="pending",l=C=>{if(!a()){const w=new wx(C);g(w),e.onCancel?.(w)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>V2.isFocused()&&(e.networkMode==="always"||dg.isOnline())&&e.canRun(),p=()=>m9(e.networkMode)&&e.canRun(),m=C=>{a()||(r?.(),o.resolve(C))},g=C=>{a()||(r?.(),o.reject(C))},v=()=>new Promise(C=>{r=w=>{(a()||f())&&C(w)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),S=()=>{if(a())return;let C;const w=n===0?e.initialPromise:void 0;try{C=w??e.fn()}catch(x){C=Promise.reject(x)}Promise.resolve(C).then(m).catch(x=>{if(a())return;const I=e.retry??(xf.isServer()?0:3),T=e.retryDelay??$pe,O=typeof T=="function"?T(n,x):T,D=I===!0||typeof I=="number"&&n<I||typeof I=="function"&&I(n,x);if(t||!D){g(x);return}n++,e.onFail?.(n,x),Ppe(O).then(()=>f()?void 0:v()).then(()=>{t?g(x):S()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?S():v().then(S),o)}}var v9=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bx(this.gcTime)&&(this.#e=_i.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xf.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(_i.clearTimeout(this.#e),this.#e=void 0)}};function jpe(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const m=S=>{Lpe(S,()=>t.signal,()=>p=!0)},g=p9(t.options,t.fetchOptions),v=async(S,C,w)=>{if(p)return Promise.reject(t.signal.reason);if(C==null&&S.pages.length)return Promise.resolve(S);const I=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:C,direction:w?"backward":"forward",meta:t.options.meta};return m(P),P})(),T=await g(I),{maxPages:O}=t.options,D=w?Dpe:kpe;return{pages:D(S.pages,T,O),pageParams:D(S.pageParams,C,O)}};if(o&&a.length){const S=o==="backward",C=S?y9:xx,w={pages:a,pageParams:l},x=C(r,w);c=await v(w,x,S)}else{const S=e??a.length;do{const C=d===0?l[0]??r.initialPageParam:xx(r,c);if(d>0&&C==null)break;c=await v(c,C),d++}while(d<S)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function xx(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function y9(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function HDe(e,t){return t?xx(e,t)!=null:!1}function qDe(e,t){return!t||!e.getPreviousPageParam?!1:y9(e,t)!=null}var Bpe=class extends v9{#e;#t;#n;#r;#a;#o;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#r=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=J5(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#o?.promise}setOptions(e){if(this.options={...this.#i,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=J5(this.options);t.data!==void 0&&(this.setState(X5(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=Cx(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(Yn).catch(Yn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Rr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===G2||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Os(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:!f9(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#o&&(this.#s||this.#u()?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},o=()=>{const d=p9(this.options,t),p=(()=>{const m={client:this.#a,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(d,p,this):d(p)},l=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:o};return r(d),d})();(this.#e==="infinite"?jpe(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#o=g9({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:d=>{d instanceof wx&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#l({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const d=await this.#o.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#r.config.onSuccess?.(d,this),this.#r.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof wx){if(d.silent)return this.#o.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#r.config.onError?.(d,this),this.#r.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...b9(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...X5(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),bn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function b9(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:m9(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function X5(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function J5(e){const 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 Hpe=class extends hu{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=Ex(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#o;#i;#s;#u;#l;#p;#d;#f;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),eD(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return _x(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return _x(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#C(),this.#t.removeObserver(this)}setOptions(e){const 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 Rr(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!ug(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&tD(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Rr(this.options.enabled,this.#t)!==Rr(t.enabled,this.#t)||Os(this.options.staleTime,this.#t)!==Os(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||Rr(this.options.enabled,this.#t)!==Rr(t.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Vpe(this,n)&&(this.#r=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const 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.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Yn)),t}#g(){this.#S();const e=Os(this.options.staleTime,this.#t);if(xf.isServer()||this.#r.isStale||!bx(e))return;const n=f9(this.#r.dataUpdatedAt,e)+1;this.#d=_i.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#C(),this.#c=e,!(xf.isServer()||Rr(this.options.enabled,this.#t)===!1||!bx(this.#c)||this.#c===0)&&(this.#f=_i.setInterval(()=>{(this.options.refetchIntervalInBackground||V2.isFocused())&&this.#h()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#S(){this.#d!==void 0&&(_i.clearTimeout(this.#d),this.#d=void 0)}#C(){this.#f!==void 0&&(_i.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#r,a=this.#a,l=this.#o,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},m=!1,g;if(t._optimisticResults){const L=this.hasListeners(),z=!L&&eD(e,t),G=L&&tD(e,n,t,r);(z||G)&&(p={...p,...b9(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:S,status:C}=p;g=p.data;let w=!1;if(t.placeholderData!==void 0&&g===void 0&&C==="pending"){let L;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(L=o.data,w=!0):L=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,L!==void 0&&(C="success",g=Cx(o?.data,L,t),m=!0)}if(t.select&&g!==void 0&&!w)if(o&&g===a?.data&&t.select===this.#u)g=this.#l;else try{this.#u=t.select,g=t.select(g),g=Cx(o?.data,g,t),this.#l=g,this.#s=null}catch(L){this.#s=L}this.#s&&(v=this.#s,g=this.#l,S=Date.now(),C="error");const x=p.fetchStatus==="fetching",I=C==="pending",T=C==="error",O=I&&x,D=g!==void 0,M={status:C,fetchStatus:p.fetchStatus,isPending:I,isSuccess:C==="success",isError:T,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:x,isRefetching:x&&!I,isLoadingError:T&&!D,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:T&&D,isStale:Z2(e,t),refetch:this.refetch,promise:this.#i,isEnabled:Rr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const L=M.data!==void 0,z=M.status==="error"&&!L,G=q=>{z?q.reject(M.error):L&&q.resolve(M.data)},j=()=>{const q=this.#i=M.promise=Ex();G(q)},F=this.#i;switch(F.status){case"pending":e.queryHash===n.queryHash&&G(F);break;case"fulfilled":(z||M.data!==F.value)&&j();break;case"rejected":(!z||M.error!==F.reason)&&j();break}}return M}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#p=this.#t),ug(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const a=new Set(o??this.#m);return this.options.throwOnError&&a.add("error"),Object.keys(this.#r).some(l=>{const c=l;return this.#r[c]!==e[c]&&a.has(c)})};this.#w({listeners:n()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#w(e){bn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function qpe(e,t){return Rr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Rr(t.retryOnMount,e)===!1)}function eD(e,t){return qpe(e,t)||e.state.data!==void 0&&_x(e,t,t.refetchOnMount)}function _x(e,t,n){if(Rr(t.enabled,e)!==!1&&Os(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Z2(e,t)}return!1}function tD(e,t,n,r){return(e!==t||Rr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Z2(e,n)}function Z2(e,t){return Rr(t.enabled,e)!==!1&&e.isStaleByTime(Os(t.staleTime,e))}function Vpe(e,t){return!ug(e.getCurrentResult(),t)}var Wpe=class extends v9{#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||S9(),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){const t=()=>{this.#a({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=g9({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,l)=>{this.#a({type:"failed",failureCount:a,error:l})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",o=!this.#r.canStart();try{if(r)t();else{this.#a({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#a({type:"pending",context:l,variables:e,isPaused:o})}const 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.#a({type:"success",data:a}),a}catch(a){try{await this.#n.config.onError?.(a,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(a,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,a,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#a({type:"error",error:a}),a}finally{this.#n.runNext(this)}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),bn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function S9(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var C9=class extends hu{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new Wpe({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=tm(e);if(typeof t=="string"){const 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)){const t=tm(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=tm(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=tm(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){bn.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){const t={exact:!0,...e};return this.getAll().find(n=>Z5(t,n))}findAll(e={}){return this.getAll().filter(t=>Z5(e,t))}notify(e){bn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return bn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Yn))))}};function tm(e){return e.options.scope?.id}var Gpe=class extends hu{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),ug(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Yi(n.mutationKey)!==Yi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#o()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#a(){const t=this.#n?.state??S9();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){bn.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,r,o)}catch(a){Promise.reject(a)}try{this.#r.onSettled?.(t.data,null,n,r,o)}catch(a){Promise.reject(a)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,r,o)}catch(a){Promise.reject(a)}try{this.#r.onSettled?.(void 0,t.error,n,r,o)}catch(a){Promise.reject(a)}}}this.listeners.forEach(n=>{n(this.#t)})})}},E9=class extends hu{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??W2(r,t);let a=this.get(o);return a||(a=new Bpe({client:e,queryKey:r,queryHash:o,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){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>K5(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>K5(e,n)):t}notify(e){bn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){bn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){bn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Kpe=class{#e;#t;#n;#r;#a;#o;#i;#s;constructor(e={}){this.#e=e.queryCache||new E9,this.#t=e.mutationCache||new C9,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=V2.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=dg.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=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){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const 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(Os(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(r.queryHash)?.state.data,l=Mpe(t,a);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return bn.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;bn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return bn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=bn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Yn).catch(Yn)}invalidateQueries(e,t={}){return bn.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=bn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,n);return n.throwOnError||(a=a.catch(Yn)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Yn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Os(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Yn).catch(Yn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Yn).catch(Yn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return dg.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(Yi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{wf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(Yi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(r=>{wf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=W2(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===G2&&(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()}},w9=_.createContext(void 0),Ws=e=>{const t=_.useContext(w9);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Zpe=({client:e,children:t})=>(_.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),R.jsx(w9.Provider,{value:e,children:t})),x9=_.createContext(!1),Ype=()=>_.useContext(x9);x9.Provider;function Qpe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xpe=_.createContext(Qpe()),Jpe=()=>_.useContext(Xpe),eme=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?K2(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},tme=e=>{_.useEffect(()=>{e.clearReset()},[e])},nme=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||K2(n,[e.error,r])),rme=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},ome=(e,t)=>e.isLoading&&e.isFetching&&!t,ame=(e,t)=>e?.suspense&&t.isPending,nD=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sme(e,t,n){const r=Ype(),o=Jpe(),a=Ws(),l=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=a.getQueryCache().get(l.queryHash),d=e.subscribed!==!1;l._optimisticResults=r?"isRestoring":d?"optimistic":void 0,rme(l),eme(l,o,c),tme(o);const f=!a.getQueryCache().get(l.queryHash),[p]=_.useState(()=>new t(a,l)),m=p.getOptimisticResult(l),g=!r&&d;if(_.useSyncExternalStore(_.useCallback(v=>{const S=g?p.subscribe(bn.batchCalls(v)):Yn;return p.updateResult(),S},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),_.useEffect(()=>{p.setOptions(l)},[l,p]),ame(l,m))throw nD(l,p,o);if(nme({result:m,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw m.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(l,m),l.experimental_prefetchInRender&&!xf.isServer()&&ome(m,r)&&(f?nD(l,p,o):c?.promise)?.catch(Yn).finally(()=>{p.updateResult()}),l.notifyOnChangeProps?m:p.trackResult(m)}function Qi(e,t){return sme(e,Hpe)}function Y2(e,t){const n=Ws(),[r]=_.useState(()=>new Gpe(n,e));_.useEffect(()=>{r.setOptions(e)},[r,e]);const o=_.useSyncExternalStore(_.useCallback(l=>r.subscribe(bn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=_.useCallback((l,c)=>{r.mutate(l,c).catch(Yn)},[r]);if(o.error&&K2(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}const ime="modulepreload",lme=function(e){return"/"+e},rD={},Me=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let d=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");o=d(n.map(f=>{if(f=lme(f),f in rD)return;rD[f]=!0;const p=f.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${m}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":ime,p||(g.as="script"),g.crossOrigin="",g.href=f,c&&g.setAttribute("nonce",c),document.head.appendChild(g),p)return new Promise((v,S)=>{g.addEventListener("load",v),g.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function a(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&a(c.reason);return t().catch(a)})};var oD=_.use,Cc=typeof window<"u"?_.useLayoutEffect:_.useEffect;function GE(e){const t=_.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function cme(e,t,n={},r={}){_.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([a])=>{t(a)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function ume(e){const t=_.useRef(null);return _.useImperativeHandle(e,()=>t.current,[]),t}const _9=!1;function _f(e){return e[e.length-1]}function dme(e){return typeof e=="function"}function Ii(e,t){return dme(e)?e(t):e}const I9=Object.prototype.hasOwnProperty,aD=Object.prototype.propertyIsEnumerable;function A9(e){for(const t in e)if(I9.call(e,t))return!0;return!1}const fme=()=>Object.create(null),Si=(e,t)=>Ai(e,t,fme);function Ai(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const o=t,a=lD(e)&&lD(o);if(!a&&!(fg(e)&&fg(o)))return o;const l=a?e:sD(e);if(!l)return o;const c=a?o:sD(o);if(!c)return o;const d=l.length,f=c.length,p=a?new Array(f):n();let m=0;for(let g=0;g<f;g++){const v=a?g:c[g],S=e[v],C=o[v];if(S===C){p[v]=S,(a?g<d:I9.call(e,v))&&m++;continue}if(S===null||C===null||typeof S!="object"||typeof C!="object"){p[v]=C;continue}const w=Ai(S,C,n,r+1);p[v]=w,w===S&&m++}return d===f&&m===d?e:p}function sD(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!aD.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const o of n){if(!aD.call(e,o))return!1;r.push(o)}return r}function fg(e){if(!iD(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!iD(n)||!n.hasOwnProperty("isPrototypeOf"))}function iD(e){return Object.prototype.toString.call(e)==="[object Object]"}function lD(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;r++)if(!Pi(e[r],t[r],n))return!1;return!0}if(fg(e)&&fg(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Pi(e[l],t[l],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&o++;let a=0;for(const l in t)if((!r||t[l]!==void 0)&&(a++,a>o||!Pi(e[l],t[l],n)))return!1;return o===a}return!1}function Vc(e){let t,n;const r=new Promise((o,a)=>{t=o,n=a});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e?.(o)},r.reject=o=>{r.status="rejected",n(o)},r}function hme(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function If(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}const pme=/[\x00-\x1f\x7f"<>`{}]/g;function mme(e){return e.replace(pme,t=>"%"+t.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function cD(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return mme(t)}const gme=["http:","https:","mailto:","tel:"];function hg(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Rd(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",o;for(;(o=t.exec(e))!==null;)r+=cD(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+cD(n?e.slice(n):e);let a=!1;return r.startsWith("//")&&(a=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:a}}function vme(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function yme(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function xa(){throw new Error("Invariant failed")}function Af(e){const t=new Map;let n,r;const o=a=>{a.next&&(a.prev?(a.prev.next=a.next,a.next.prev=a.prev,a.next=void 0,r&&(r.next=a,a.prev=r)):(a.next.prev=void 0,n=a.next,a.next=void 0,r&&(a.prev=r,r.next=a)),r=a)};return{get(a){const l=t.get(a);if(l)return o(l),l.value},set(a,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const c=t.get(a);if(c)c.value=l,o(c);else{const d={key:a,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(a,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const Is=4,T9=5;function bme(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function R9(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,a=e.substring(t,o);if(!a||!a.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(a==="$"){const c=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=c,n[4]=c,n[5]=c,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const l=bme(a);if(l){const[c,d]=l,f=a.charCodeAt(c+1);if(f===45){if(c+2<a.length&&a.charCodeAt(c+2)===36){const p=c+3,m=d;if(p<m)return n[0]=3,n[1]=t+c,n[2]=t+p,n[3]=t+m,n[4]=t+d+1,n[5]=o,n}}else if(f===36){const p=c+1,m=c+2;return m===d?(n[0]=2,n[1]=t+c,n[2]=t+p,n[3]=t+m,n[4]=t+d+1,n[5]=e.length,n):(n[0]=1,n[1]=t+c,n[2]=t+m,n[3]=t+d,n[4]=t+d+1,n[5]=o,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function Bv(e,t,n,r,o,a,l){l?.(n);let c=r;{const d=n.fullPath??n.from,f=d.length,p=n.options?.caseSensitive??e,m=n.options?.params?.parse??n.options?.parseParams;for(;c<f;){const v=R9(d,c,t);let S;const C=c,w=v[5];switch(c=w+1,a++,v[0]){case 0:{const x=d.substring(v[2],v[3]);if(p){const I=o.static?.get(x);if(I)S=I;else{o.static??=new Map;const T=Ti(n.fullPath??n.from);T.parent=o,T.depth=a,S=T,o.static.set(x,T)}}else{const I=x.toLowerCase(),T=o.staticInsensitive?.get(I);if(T)S=T;else{o.staticInsensitive??=new Map;const O=Ti(n.fullPath??n.from);O.parent=o,O.depth=a,S=O,o.staticInsensitive.set(I,O)}}break}case 1:{const x=d.substring(C,v[1]),I=d.substring(v[4],w),T=p&&!!(x||I),O=x?T?x:x.toLowerCase():void 0,D=I?T?I:I.toLowerCase():void 0,P=!m&&o.dynamic?.find(M=>!M.parse&&M.caseSensitive===T&&M.prefix===O&&M.suffix===D);if(P)S=P;else{const M=ZE(1,n.fullPath??n.from,T,O,D);S=M,M.depth=a,M.parent=o,o.dynamic??=[],o.dynamic.push(M)}break}case 3:{const x=d.substring(C,v[1]),I=d.substring(v[4],w),T=p&&!!(x||I),O=x?T?x:x.toLowerCase():void 0,D=I?T?I:I.toLowerCase():void 0,P=!m&&o.optional?.find(M=>!M.parse&&M.caseSensitive===T&&M.prefix===O&&M.suffix===D);if(P)S=P;else{const M=ZE(3,n.fullPath??n.from,T,O,D);S=M,M.parent=o,M.depth=a,o.optional??=[],o.optional.push(M)}break}case 2:{const x=d.substring(C,v[1]),I=d.substring(v[4],w),T=p&&!!(x||I),O=x?T?x:x.toLowerCase():void 0,D=I?T?I:I.toLowerCase():void 0,P=ZE(2,n.fullPath??n.from,T,O,D);S=P,P.parent=o,P.depth=a,o.wildcard??=[],o.wildcard.push(P)}}o=S}if(m&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=Ti(n.fullPath??n.from);v.kind=T9,v.parent=o,a++,v.depth=a,o.pathless??=[],o.pathless.push(v),o=v}const g=(n.path||!n.children)&&!n.isRoot;if(g&&d.endsWith("/")){const v=Ti(n.fullPath??n.from);v.kind=Is,v.parent=o,a++,v.depth=a,o.index=v,o=v}o.parse=m??null,o.priority=n.options?.params?.priority??0,g&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Bv(e,t,d,c,o,a,l)}function KE(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ss(e){if(e.pathless)for(const t of e.pathless)Ss(t);if(e.static)for(const t of e.static.values())Ss(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Ss(t);if(e.dynamic?.length){e.dynamic.sort(KE);for(const t of e.dynamic)Ss(t)}if(e.optional?.length){e.optional.sort(KE);for(const t of e.optional)Ss(t)}if(e.wildcard?.length){e.wildcard.sort(KE);for(const t of e.wildcard)Ss(t)}}function Ti(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function ZE(e,t,n,r,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:o}}function Sme(e,t){const n=Ti("/"),r=new Uint16Array(6);for(const o of e)Bv(!1,r,o,1,n,0);Ss(n),t.masksTree=n,t.flatCache=Af(1e3)}function Cme(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Q2(e,t.masksTree);return t.flatCache.set(e,r),r}function Eme(e,t,n,r,o){e||="/",r||="/";const a=t?`case\0${e}`:e;let l=o.singleCache.get(a);return l||(l=Ti("/"),Bv(t,new Uint16Array(6),{from:e},1,l,0),o.singleCache.set(a,l)),Q2(r,l,n)}function wme(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||="/";let a;try{a=Q2(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)a=null;else throw l}return a&&(a.branch=M9(a.route)),t.matchCache.set(r,a),a}function xme(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function _me(e,t=!1,n){const r=Ti(e.fullPath),o=new Uint16Array(6),a={},l={};let c=0;return Bv(t,o,e,1,r,0,d=>{if(n?.(d,c),d.id in a&&xa(),a[d.id]=d,c!==0&&d.path){const f=xme(d.fullPath);(!l[f]||d.fullPath.endsWith("/"))&&(l[f]=d)}c++}),Ss(r),{processedTree:{segmentTree:r,singleCache:Af(1e3),matchCache:Af(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:l}}function Q2(e,t,n=!1){const r=e.split("/"),o=Ame(e,r,t,n);if(!o)return null;const[a]=O9(e,r,o);return{route:o.node.route,rawParams:a}}function O9(e,t,n){const r=Ime(n.node);let o=null;const a=Object.create(null);let l=n.extract?.part??0,c=n.extract?.node??0,d=n.extract?.path??0,f=n.extract?.segment??0;for(;c<r.length;l++,c++,d++,f++){const p=r[c];if(p.kind===Is)break;if(p.kind===T9){f--,l--,d--;continue}const m=t[l],g=d;if(m&&(d+=m.length),p.kind===1){o??=n.node.fullPath.split("/");const v=o[f],S=p.prefix?.length??0;if(v.charCodeAt(S)===123){const C=p.suffix?.length??0,w=v.substring(S+2,v.length-C-1),x=m.substring(S,m.length-C);a[w]=decodeURIComponent(x)}else{const C=v.substring(1);a[C]=decodeURIComponent(m)}}else if(p.kind===3){if(n.skipped&1<<c){l--,d=g-1;continue}o??=n.node.fullPath.split("/");const v=o[f],S=p.prefix?.length??0,C=p.suffix?.length??0,w=v.substring(S+3,v.length-C-1),x=p.suffix||p.prefix?m.substring(S,m.length-C):m;x&&(a[w]=decodeURIComponent(x))}else if(p.kind===2){const v=p,S=e.substring(g+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),C=decodeURIComponent(S);a["*"]=C,a._splat=C;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:l,node:c,path:d,segment:f}]}function M9(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ime(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ame(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!_f(t),a=o&&e!=="/",l=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let d=null,f=null;for(;c.length;){const p=c.pop(),{node:m,index:g,skipped:v,depth:S,statics:C,dynamics:w,optionals:x}=p;let{extract:I,rawParams:T}=p;if(m.kind===2&&m.route&&!rm(f,p))continue;if(m.parse){if(!uD(e,t,p))continue;T=p.rawParams,I=p.extract}r&&m.route&&m.kind!==Is&&rm(d,p)&&(d=p);const O=g===l;if(O&&(m.route&&(!a||m.kind===Is||m.kind===2)&&rm(f,p)&&(f=p),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const D=O?void 0:t[g];let P;if(O&&m.index){const M={node:m.index,index:g,skipped:v,depth:S+1,statics:C,dynamics:w,optionals:x,extract:I,rawParams:T};let L=!0;if(m.index.parse&&(uD(e,t,M)||(L=!1)),L){if(!w&&!x&&!v&&Tme(C,l))return M;rm(f,M)&&(f=M)}}if(m.wildcard)for(let M=m.wildcard.length-1;M>=0;M--){const L=m.wildcard[M],{prefix:z,suffix:G}=L;if(!(z&&(O||!(L.caseSensitive?D:P??=D.toLowerCase()).startsWith(z)))){if(G){if(O)continue;const j=t.slice(g).join("/").slice(-G.length);if((L.caseSensitive?j:j.toLowerCase())!==G)continue}c.push({node:L,index:l,skipped:v,depth:S+1,statics:C,dynamics:w,optionals:x,extract:I,rawParams:T})}}if(m.optional){const M=v|1<<S,L=S+1;for(let z=m.optional.length-1;z>=0;z--){const G=m.optional[z];c.push({node:G,index:g,skipped:M,depth:L,statics:C,dynamics:w,optionals:x,extract:I,rawParams:T})}if(!O)for(let z=m.optional.length-1;z>=0;z--){const G=m.optional[z],{prefix:j,suffix:F}=G;if(j||F){const q=G.caseSensitive?D:P??=D.toLowerCase();if(j&&!q.startsWith(j)||F&&!q.endsWith(F))continue}c.push({node:G,index:g+1,skipped:v,depth:L,statics:C,dynamics:w,optionals:x+nm(l,g),extract:I,rawParams:T})}}if(!O&&m.dynamic&&D)for(let M=m.dynamic.length-1;M>=0;M--){const L=m.dynamic[M],{prefix:z,suffix:G}=L;if(z||G){const j=L.caseSensitive?D:P??=D.toLowerCase();if(z&&!j.startsWith(z)||G&&!j.endsWith(G))continue}c.push({node:L,index:g+1,skipped:v,depth:S+1,statics:C,dynamics:w+nm(l,g),optionals:x,extract:I,rawParams:T})}if(!O&&m.staticInsensitive){const M=m.staticInsensitive.get(P??=D.toLowerCase());M&&c.push({node:M,index:g+1,skipped:v,depth:S+1,statics:C+nm(l,g),dynamics:w,optionals:x,extract:I,rawParams:T})}if(!O&&m.static){const M=m.static.get(D);M&&c.push({node:M,index:g+1,skipped:v,depth:S+1,statics:C+nm(l,g),dynamics:w,optionals:x,extract:I,rawParams:T})}if(m.pathless){const M=S+1;for(let L=m.pathless.length-1;L>=0;L--){const z=m.pathless[L];c.push({node:z,index:g,skipped:v,depth:M,statics:C,dynamics:w,optionals:x,extract:I,rawParams:T})}}}if(f)return f;if(r&&d){let p=d.index;for(let g=0;g<d.index;g++)p+=t[g].length;const m=p===e.length?"/":e.slice(p);return d.rawParams??=Object.create(null),d.rawParams["**"]=decodeURIComponent(m),d}return null}function nm(e,t){return 2**(e-t-1)}function Tme(e,t){return e===2**(t-1)-1}function uD(e,t,n){let r,o;try{[r,o]=O9(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=o,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function rm(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Is)>(e.node.kind===Is)||t.node.kind===Is==(e.node.kind===Is)&&t.depth>e.depth))):!0}function zm(e){return X2(e.filter(t=>t!==void 0).join("/"))}function X2(e){return e.replace(/\/{2,}/g,"/")}function N9(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ea(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function P9(e){return Ea(N9(e))}function pg(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Rme(e,t,n){return pg(e,n)===pg(t,n)}function Ome({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),a=!o&&t===".";let l;if(r){l=o?t:a?e:e+"\0"+t;const f=r.get(l);if(f)return f}let c;if(a)c=e.split("/");else if(o)c=t.split("/");else{for(c=e.split("/");c.length>1&&_f(c)==="";)c.pop();const f=t.split("/");for(let p=0,m=f.length;p<m;p++){const g=f[p];g===""?p?p===m-1&&c.push(g):c=[g]:g===".."?c.pop():g==="."||c.push(g)}}c.length>1&&(_f(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));const d=X2(c.join("/"))||"/";return l&&r&&r.set(l,d),d}function Mme(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,a=>t.get(a)??a)}function YE(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>fD(o,n)).join("/"):fD(r,n)}function dD({path:e,params:t,decoder:n,...r}){let o=!1;const a=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:o};const l=e.length;let c=0,d,f="";for(;c<l;){const p=c;d=R9(e,p,d);const m=d[5];if(c=m+1,p===m)continue;const g=d[0];if(g===0){f+="/"+e.substring(p,m);continue}if(g===2){const v=t._splat;a._splat=v,a["*"]=v;const S=e.substring(p,d[1]),C=e.substring(d[4],m);if(!v){o=!0,(S||C)&&(f+="/"+S+C);continue}const w=YE("_splat",t,n);f+="/"+S+w+C;continue}if(g===1){const v=e.substring(d[2],d[3]);!o&&!(v in t)&&(o=!0),a[v]=t[v];const S=e.substring(p,d[1]),C=e.substring(d[4],m),w=YE(v,t,n)??"undefined";f+="/"+S+w+C;continue}if(g===3){const v=e.substring(d[2],d[3]),S=t[v];if(S==null)continue;a[v]=S;const C=e.substring(p,d[1]),w=e.substring(d[4],m),x=YE(v,t,n)??"";f+="/"+C+x+w;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:a,interpolatedPath:f||"/",isMissingParams:o}}function fD(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Vn(e){return e?.isNotFound===!0}function Nme(){try{return sessionStorage}catch{return}}const Pme="tsr-scroll-restoration-v1_3",k9=Nme();function kme(){try{return JSON.parse(k9?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}function Dme(){try{k9?.setItem(Pme,JSON.stringify(gc))}catch{}}const gc=kme(),hD="data-scroll-restoration-id",Lme=e=>e.state.__TSR_key||e.href;function Ume(e){const t=e.getAttribute(hD);if(t)return`[${hD}="${t}"]`;let n="",r=e,o;for(;o=r.parentNode;){let a=1,l=r;for(;l=l.previousElementSibling;)a++;const c=`${r.localName}:nth-child(${a})`;n=n?`${c} > ${n}`:c,r=o}return n}let om=!1;const $m="window";function Ix(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function pD(e){const t=new Set;for(const n of e){if(n===$m)continue;const r=Ix(n);r&&t.add(r)}return t}function Fme(e,t){const n=e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);const o=e.options.getScrollRestorationKey||Lme,a=new Set,l=c=>{const d=gc[c]||={};for(const f of a)f===document?d[$m]={scrollX,scrollY}:f.isConnected&&(d[Ume(f)]={scrollX:f.scrollLeft,scrollY:f.scrollTop})};n&&!r.restoration&&(r.restoration=!0,om=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{om||a.add(c.target)},!0),e.subscribe("onBeforeLoad",c=>{c.fromLocation&&l(o(c.fromLocation)),a.clear()}),addEventListener("pagehide",()=>{l(o(e.stores.resolvedLocation.get()??e.stores.location.get())),Dme()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",c=>{const d=e.options.scrollRestorationBehavior,f=e.options.scrollToTopSelectors,p=r.next,m=r.hash;let g;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const v=o(c.toLocation),S=c.fromLocation&&o(c.fromLocation);if(r.restoring&&S&&S!==v){const C=gc[S];if(C){let w=gc[v];for(const x in C){if(x===$m){if(p)continue}else{const I=Ix(x);if(!I||p&&f&&(g??=pD(f),g.has(I)))continue}w||(w=gc[v]={}),w[x]??=C[x]}}}om=!0;try{const C=c.toLocation.hash,w=c.toLocation.state.__hashScrollIntoViewOptions??!0;let x=!1;if(p){!C&&f&&(g??=pD(f));const I=C&&w&&m,T=r.restoring?gc[v]:void 0;if(T)for(const O in T){const{scrollX:D,scrollY:P}=T[O];if(O===$m){if(I)continue;scrollTo({top:P,left:D,behavior:d}),x=!0}else{const M=Ix(O);M&&(M.scrollLeft=D,M.scrollTop=P,g?.delete(M))}}if(!C){const O={top:0,left:0,behavior:d};if(x||scrollTo(O),g)for(const D of g)D.scrollTo(O)}}!x&&C&&w&&document.getElementById(C)?.scrollIntoView(w)}finally{om=!1}}))}function zme(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function QE(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function $me(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,o]of t.entries()){const a=n[r];a==null?n[r]=QE(o):Array.isArray(a)?a.push(QE(o)):n[r]=[a,QE(o)]}return n}const jme=Hme(JSON.parse),Bme=qme(JSON.stringify,JSON.parse);function Hme(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=$me(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function qme(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const a=zme(o,r);return a?`?${a}`:""}}const ki="__root__";function cl(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function lr(e){return e instanceof Response&&!!e.options}function Vme(e){return{input:({url:t})=>{for(const n of e)t=Ax(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=D9(e[n],t);return t}}}function Wme(e){const t=P9(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),o=`${r}/`;return{input:({url:a})=>{const l=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return l===r?a.pathname="/":l.startsWith(o)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=zm(["/",t,a.pathname]),a)}}function Ax(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function D9(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Gme(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:o,init:a}=t,l=new Map,c=new Map,d=new Map,f=n(e.status),p=n(e.loadedAt),m=n(e.isLoading),g=n(e.isTransitioning),v=n(e.location),S=n(e.resolvedLocation),C=n(e.statusCode),w=n(e.redirect),x=n([]),I=n([]),T=n([]),O=r(()=>XE(l,x.get())),D=r(()=>XE(c,I.get())),P=r(()=>XE(d,T.get())),M=r(()=>x.get()[0]),L=r(()=>x.get().some(ee=>l.get(ee)?.get().status==="pending")),z=r(()=>({locationHref:v.get().href,resolvedLocationHref:S.get()?.href,status:f.get()})),G=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:m.get(),isTransitioning:g.get(),matches:O.get(),location:v.get(),resolvedLocation:S.get(),statusCode:C.get(),redirect:w.get()})),j=Af(64);function F(ee){let me=j.get(ee);return me||(me=r(()=>{const ge=x.get();for(const Te of ge){const $=l.get(Te);if($&&$.routeId===ee)return $.get()}}),j.set(ee,me)),me}const q={status:f,loadedAt:p,isLoading:m,isTransitioning:g,location:v,resolvedLocation:S,statusCode:C,redirect:w,matchesId:x,pendingIds:I,cachedIds:T,matches:O,pendingMatches:D,cachedMatches:P,firstId:M,hasPending:L,matchRouteDeps:z,matchStores:l,pendingMatchStores:c,cachedMatchStores:d,__store:G,getRouteMatchStore:F,setMatches:X,setPending:Se,setCached:W};X(e.matches),a?.(q);function X(ee){JE(ee,l,x,n,o)}function Se(ee){JE(ee,c,I,n,o)}function W(ee){JE(ee,d,T,n,o)}return q}function XE(e,t){const n=[];for(const r of t){const o=e.get(r);o&&n.push(o.get())}return n}function JE(e,t,n,r,o){const a=e.map(c=>c.id),l=new Set(a);o(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const d=t.get(c.id);if(!d){const f=r(c);f.routeId=c.routeId,t.set(c.id,f);continue}d.routeId=c.routeId,d.get()!==c&&d.set(c)}yme(n.get(),a)||n.set(a)})}const Tx=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Kme=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Hv=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Di=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let a=0;a<=o;a++){const l=e.matches[a];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(r,c.__routeContext,c.__beforeLoadContext)}return r},mD=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),o=r>=0?r:0;let a=n?e.matches.findIndex(l=>l.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=o);for(let l=a;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return n?a:o},As=(e,t,n)=>{if(!(!lr(n)&&!Vn(n)))throw lr(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:lr(n)?"redirected":Vn(n)?"notFound":r.status==="pending"?"success":r.status,context:Di(e,t.index),isFetching:!1,error:n})),Vn(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),lr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},L9=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},gD=(e,t,n)=>{const r=Di(e,n);e.updateMatch(t,o=>({...o,context:r}))},Od=(e,t,n)=>{const{id:r,routeId:o}=e.matches[t],a=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,As(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(l){n=l,As(e,e.router.getMatch(r),n)}e.updateMatch(r,l=>(l._nonReactive.beforeLoadPromise?.resolve(),l._nonReactive.beforeLoadPromise=void 0,l._nonReactive.loadPromise?.resolve(),{...l,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!lr(n)&&!Vn(n)&&(e.serialError??=n)},U9=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Hv(e,t)&&(n.options.loader||n.options.beforeLoad||z9(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const a=setTimeout(()=>{Tx(e)},o);r._nonReactive.pendingTimeout=a}},Zme=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;U9(e,t,n,r);const o=()=>{const a=e.router.getMatch(t);a.preload&&(a.status==="redirected"||a.status==="notFound")&&As(e,a,a.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},Yme=(e,t,n,r)=>{const o=e.router.getMatch(t);let a=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Vc(()=>{a?.resolve(),a=void 0});const{paramsError:l,searchError:c}=o;l&&Od(e,n,l),c&&Od(e,n,c),U9(e,t,r,o);const d=new AbortController;let f=!1;const p=()=>{f||(f=!0,e.updateMatch(t,O=>({...O,isFetching:"beforeLoad",fetchCount:O.fetchCount+1,abortController:d})))},m=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,O=>({...O,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{p(),m()});return}o._nonReactive.beforeLoadPromise=Vc();const g={...Di(e,n,!1),...o.__routeContext},{search:v,params:S,cause:C}=o,w=Hv(e,t),x={search:v,abortController:d,params:S,preload:w,context:g,location:e.location,navigate:O=>e.router.navigate({...O,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:w?"preload":C,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},I=O=>{if(O===void 0){e.router.batch(()=>{p(),m()});return}(lr(O)||Vn(O))&&(p(),Od(e,n,O)),e.router.batch(()=>{p(),e.updateMatch(t,D=>({...D,__beforeLoadContext:O})),m()})};let T;try{if(T=r.options.beforeLoad(x),If(T))return p(),T.catch(O=>{Od(e,n,O)}).then(I)}catch(O){p(),Od(e,n,O)}I(T)},Qme=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],a=()=>c(),l=()=>Yme(e,n,t,o),c=()=>{if(L9(e,n))return;const d=Zme(e,n,o);return If(d)?d.then(l):l()};return a()},Xme=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([a,l,c])=>({meta:a?.meta,links:a?.links,headScripts:a?.scripts,headers:c,scripts:l,styles:a?.styles}))},F9=(e,t,n,r,o)=>{const a=t[r-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(n),p=Di(e,r),m=Hv(e,n);return{params:l,deps:c,preload:!!m,parentMatchPromise:a,abortController:d,context:p,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:m?"preload":f,route:o,...e.router.options.additionalContext}},vD=async(e,t,n,r,o)=>{try{const a=e.router.getMatch(n);try{(!(_9??e.router.isServer)||a.ssr===!0)&&Tf(o);const l=o.options.loader,c=typeof l=="function"?l:l?.handler,d=c?.(F9(e,t,n,r,o)),f=!!c&&If(d);if((f||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,m=>({...m,isFetching:"loader"})),c){const m=f?await d:d;As(e,e.router.getMatch(n),m),m!==void 0&&e.updateMatch(n,g=>({...g,loaderData:m}))}o._lazyPromise&&await o._lazyPromise;const p=a._nonReactive.minPendingPromise;p&&await p,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,m=>({...m,error:void 0,context:Di(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:Di(e,r)}));return}const d=a._nonReactive.minPendingPromise;d&&await d,Vn(l)&&await o.options.notFoundComponent?.preload?.(),As(e,e.router.getMatch(n),l);try{o.options.onError?.(l)}catch(f){c=f,As(e,e.router.getMatch(n),f)}!lr(c)&&!Vn(c)&&await Tf(o,["errorComponent"]),e.updateMatch(n,f=>({...f,error:c,context:Di(e,r),status:"error",isFetching:!1}))}}catch(a){const l=e.router.getMatch(n);l&&(l._nonReactive.loaderPromise=void 0),As(e,l,a)}},Jme=async(e,t,n)=>{async function r(v,S,C,w,x){const I=Date.now()-S.updatedAt,T=v?x.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:x.options.staleTime??e.router.options.defaultStaleTime??0,O=x.options.shouldReload,D=typeof O=="function"?O(F9(e,t,o,n,x)):O,{status:P,invalid:M}=w,L=I>=T&&(!!e.forceStaleReload||w.cause==="enter"||C!==void 0&&C!==w.id);l=P==="success"&&(M||(D??L)),v&&x.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{try{await vD(e,t,o,n,x);const z=e.router.getMatch(o);z._nonReactive.loaderPromise?.resolve(),z._nonReactive.loadPromise?.resolve(),z._nonReactive.loaderPromise=void 0,z._nonReactive.loadPromise=void 0}catch(z){lr(z)&&await e.router.navigate(z.options)}})()):P!=="success"||l?await vD(e,t,o,n,x):gD(e,o,n))}const{id:o,routeId:a}=e.matches[n];let l=!1,c=!1;const d=e.router.looseRoutesById[a],f=d.options.loader,p=((typeof f=="function"?void 0:f?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(L9(e,o)){if(!e.router.getMatch(o))return e.matches[n];gD(e,o,n)}else{const v=e.router.getMatch(o),S=e.router.stores.matchesId.get()[n],C=(S&&e.router.stores.matchStores.get(S)||null)?.routeId===a?S:e.router.stores.matches.get().find(x=>x.routeId===a)?.id,w=Hv(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&p)return v;await v._nonReactive.loaderPromise;const x=e.router.getMatch(o),I=x._nonReactive.error||x.error;I&&As(e,x,I),x.status==="pending"&&await r(w,v,C,x,d)}else{const x=w&&!e.router.stores.matchStores.has(o),I=e.router.getMatch(o);I._nonReactive.loaderPromise=Vc(),x!==I.preload&&e.updateMatch(o,T=>({...T,preload:x})),await r(w,v,C,I,d)}}const m=e.router.getMatch(o);c||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,c||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const g=c?m.isFetching:!1;return g!==m.isFetching||m.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:g,invalid:!1})),e.router.getMatch(o)):m};async function yD(e){const t=e,n=[];Kme(t.router)&&Tx(t);let r;for(let g=0;g<t.matches.length;g++){try{const v=Qme(t,g);If(v)&&await v}catch(v){if(lr(v))throw v;if(Vn(v))r=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?mD(t,r):void 0,l=r&&t.preload?0:a!==void 0?Math.min(a+1,o):o;let c,d;for(let g=0;g<l;g++)n.push(Jme(t,n,g));try{await Promise.all(n)}catch{const g=await Promise.allSettled(n);for(const v of g){if(v.status!=="rejected")continue;const S=v.reason;if(lr(S))throw S;Vn(S)?c??=S:d??=S}if(d!==void 0)throw d}const f=c??(r&&!t.preload?r:void 0);let p=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const g=mD(t,f);g===void 0&&xa();const v=t.matches[g],S=t.router.looseRoutesById[v.routeId],C=t.router.options?.defaultNotFoundComponent;!S.options.notFoundComponent&&C&&(S.options.notFoundComponent=C),f.routeId=v.routeId;const w=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,x=>({...x,...w?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=g,await Tf(S,["notFoundComponent"])}else if(!t.preload){const g=t.matches[0];g.globalNotFound||t.router.getMatch(g.id)?.globalNotFound&&t.updateMatch(g.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const g=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Tf(g,["errorComponent"])}for(let g=0;g<=p;g++){const{id:v,routeId:S}=t.matches[g],C=t.router.looseRoutesById[S];try{const w=Xme(t,v,C);if(w){const x=await w;t.updateMatch(v,I=>({...I,...x}))}}catch(w){console.error(`Error executing head for route ${S}:`,w)}}const m=Tx(t);if(If(m)&&await m,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function bD(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Tf(e,t=jm){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:o,...a}=r.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===jm?(()=>{if(e._componentsPromise===void 0){const r=bD(e,jm);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():bD(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function z9(e){for(const t of jm)if(e.options[t]?.preload)return!0;return!1}const jm=["component","errorComponent","pendingComponent","notFoundComponent"];var Ms="__TSR_index",SD="popstate",CD="beforeunload";function ege(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:l}))},o=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},a=async({task:l,navigateOpts:c,...d})=>{if(c?.ignoreBlocker??!1){l();return}const f=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const m of f){const g=mg(d.path,d.state);if(await m.blockerFn({currentLocation:t,nextLocation:g,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,c,d)=>{const f=t.state[Ms];c=ED(f+1,c),a({task:()=>{e.pushState(l,c),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:c})},replace:(l,c,d)=>{const f=t.state[Ms];c=ED(f,c),a({task:()=>{e.replaceState(l,c),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:c})},go:(l,c)=>{a({task:()=>{e.go(l),o({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{a({task:()=>{e.back(l?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{a({task:()=>{e.forward(l?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ms]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function ED(e,t){t||(t={});const n=J2();return{...t,key:n,__TSR_key:n,[Ms]:e}}function tge(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const a=()=>o,l=L=>o=L,c=(L=>L),d=(()=>mg(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const L=J2();t.history.replaceState({[Ms]:0,key:L,__TSR_key:L},"")}let f=d(),p,m=!1,g=!1,v=!1,S=!1;const C=()=>f;let w,x;const I=()=>{w&&(M._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),M._ignoreSubscribers=!1,w=void 0,x=void 0,p=void 0)},T=(L,z,G)=>{const j=c(z);x||(p=f),f=mg(z,G),w={href:j,state:G,isPush:w?.isPush||L==="push"},x||(x=Promise.resolve().then(()=>I()))},O=L=>{f=d(),M.notify({type:L})},D=async()=>{if(g){g=!1;return}const L=d(),z=L.state[Ms]-f.state[Ms],G=z===1,j=z===-1,F=!G&&!j||m;m=!1;const q=F?"GO":j?"BACK":"FORWARD",X=F?{type:"GO",index:z}:{type:j?"BACK":"FORWARD"};if(v)v=!1;else{const Se=a();if(typeof document<"u"&&Se.length){for(const W of Se)if(await W.blockerFn({currentLocation:f,nextLocation:L,action:q})){g=!0,t.history.go(1),M.notify(X);return}}}f=d(),M.notify(X)},P=L=>{if(S){S=!1;return}let z=!1;const G=a();if(typeof document<"u"&&G.length)for(const j of G){const F=j.enableBeforeUnload??!0;if(F===!0){z=!0;break}if(typeof F=="function"&&F()===!0){z=!0;break}}if(z)return L.preventDefault(),L.returnValue=""},M=ege({getLocation:C,getLength:()=>t.history.length,pushState:(L,z)=>T("push",L,z),replaceState:(L,z)=>T("replace",L,z),back:L=>(L&&(v=!0),S=!0,t.history.back()),forward:L=>{L&&(v=!0),S=!0,t.history.forward()},go:L=>{m=!0,t.history.go(L)},createHref:L=>c(L),flush:I,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(CD,P,{capture:!0}),t.removeEventListener(SD,D)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:a,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(CD,P,{capture:!0}),t.addEventListener(SD,D),t.history.pushState=function(...L){const z=n.apply(t.history,L);return M._ignoreSubscribers||O("PUSH"),z},t.history.replaceState=function(...L){const z=r.apply(t.history,L);return M._ignoreSubscribers||O("REPLACE"),z},M}function nge(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function mg(e,t){const n=nge(e),r=n.indexOf("#"),o=n.indexOf("?"),a=J2();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:t||{[Ms]:0,key:a,__TSR_key:a}}}function J2(){return(Math.random()+1).toString(36).substring(7)}function Nc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var rge=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",a=this.basepath===void 0,l=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Mme(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tge()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=Af(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=Gme(age(this.latestLocation),p),Fme(this)}let c=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(a||o!==d||l!==f){this.basepath=d;const p=[],m=P9(d);m&&m!=="/"&&p.push(Wme({basepath:d})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:Vme(p),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=_me(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&Sme(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({pathname:d,search:f,hash:p,href:m,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(d)){const x=this.options.parseSearch(f),I=this.options.stringifySearch(x);return{href:d+I+p,publicHref:d+I+p,pathname:Rd(d).path,external:!1,searchStr:I,search:Si(r?.search,x),hash:Rd(p.slice(1)).path,state:Ai(r?.state,g)}}const v=new URL(m,this.origin),S=Ax(this.rewrite,v),C=this.options.parseSearch(S.search),w=this.options.stringifySearch(C);return S.search=w,{href:S.href.replace(S.origin,""),publicHref:m,pathname:Rd(S.pathname).path,external:!!this.rewrite&&S.origin!==this.origin,searchStr:w,search:Si(r?.search,C),hash:Rd(S.hash.slice(1)).path,state:Ai(r?.state,g)}},a=o(n),{__tempLocation:l,__tempKey:c}=a.state;if(l&&(!c||c===this.tempLocationKey)){const d=o(l);return d.state.key=a.state.key,d.state.__TSR_key=a.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:a}}return a},this.resolvePathWithBase=(n,r)=>Ome({base:n,to:r.includes("//")?X2(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>sge({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(a={})=>{const l=a._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);a.from;const d=a.unsafeRelative==="path"?l.pathname:a.from??c.fullPath,f=a.to?`${a.to}`:void 0,p=c.search,m=Object.assign(Object.create(null),c.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(d,"."),v=f?this.resolvePathWithBase(g,f):g,S=a.params===!1||a.params===null?Object.create(null):(a.params??!0)===!0?m:Object.assign(m,Ii(a.params,m)),C=this.routesByPath[Ea(v)];let w;if(C)w=this.getRouteBranch(C);else if(v.includes("$"))w=[];else{const j=this.getMatchedRoutes(v);w=j.matchedRoutes,this.options.notFoundRoute&&(!j.foundRoute||j.foundRoute.path!=="/"&&j.routeParams["**"])&&(w=[...w,this.options.notFoundRoute])}if(w.length&&A9(S))for(const j of w){const F=j.options.params?.stringify??j.options.stringifyParams;if(F)try{Object.assign(S,F(S))}catch{}}const x=n.leaveParams?v:Rd(dD({path:v,params:S,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let I=p;if(n._includeValidateSearch&&this.options.search?.strict){const j={};w.forEach(F=>{if(F.options.validateSearch)try{Object.assign(j,Bm(F.options.validateSearch,{...j,...I}))}catch{}}),I=j}I=ige({search:I,dest:a,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),I=Si(p,I);const T=this.options.stringifySearch(I),O=a.hash===!0?l.hash:a.hash?Ii(a.hash,l.hash):void 0,D=O?`#${O}`:"";let P=a.state===!0?l.state:a.state?Ii(a.state,l.state):{};P=Ai(l.state,P);const M=`${x}${T}${D}`;let L,z,G=!1;if(this.rewrite){const j=new URL(M,this.origin),F=D9(this.rewrite,j);L=j.href.replace(j.origin,""),F.origin!==this.origin?(z=F.href,G=!0):z=F.pathname+F.search+F.hash}else L=vme(M),z=L;return{publicHref:z,href:L,pathname:x,search:I,searchStr:T,state:P,hash:O??"",external:G,unmaskOnReload:a.unmaskOnReload}},o=(a={},l)=>{const c=r(a);let d=l?r(l):void 0;if(!d){const f=Object.create(null);if(this.options.routeMasks){const p=Cme(c.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:m,params:g,...v}=p.route,S=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,Ii(g,f));l={from:n.from,...v,params:S},d=r(l)}}}return d&&(c.maskedLocation=d),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{let a;const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(m=>{o.state[m]=this.latestLocation.state[m]});const p=Pi(o.state,this.latestLocation.state);return f.forEach(m=>{delete o.state[m]}),p},c=Ea(this.latestLocation.href)===Ea(o.href);let d=this.commitLocationPromise;if(this.commitLocationPromise=Vc(()=>{d?.resolve(),d=void 0}),c&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:p,...m}=o;f&&(m={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,a=o.replace?"REPLACE":"PUSH",this.history[a==="REPLACE"?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this._scroll.next=o.resetScroll??!0,this.history.subscribers.size||this.load(a?{action:{type:a}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:a,ignoreBlocker:l,href:c,...d}={})=>{if(c){const m=this.history.location.state.__TSR_index,g=mg(c,{__TSR_index:n?m:m+1}),v=new URL(g.pathname,this.origin);d.to=Ax(this.rewrite,v).pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const p=this.commitLocation({...f,viewTransition:a,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:l});return queueMicrotask(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:a,...l})=>{let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!r&&(r=!0),r){if(n!==void 0||!o){const f=this.buildLocation({to:n,...l});o=o??f.publicHref,a=a??f.publicHref}const d=!c&&a?a:o;if(hg(d,this.protocolAllowlist))return;if(!l.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}l.replace?window.location.replace(d):window.location.href=d;return}return this.buildAndCommitLocation({...l,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(o=>!n.some(a=>a.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{const r=n?.action?.type;let o,a,l;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(l=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad(),r&&(this._scroll.hash=r==="PUSH"||r==="REPLACE");const p=this.latestLocation,m=Nc(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...m}),this.emit({type:"onBeforeLoad",...m}),await yD({router:this,sync:n?.sync,forceStaleReload:c.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let g=null,v=null,S=null,C=null;this.batch(()=>{const w=this.stores.pendingMatches.get(),x=w.length,I=this.stores.matches.get();g=x?I.filter(D=>!this.stores.pendingMatchStores.has(D.id)):null;const T=new Set;for(const D of this.stores.pendingMatchStores.values())D.routeId&&T.add(D.routeId);const O=new Set;for(const D of this.stores.matchStores.values())D.routeId&&O.add(D.routeId);v=x?I.filter(D=>!T.has(D.routeId)):null,S=x?w.filter(D=>!O.has(D.routeId)):null,C=x?w.filter(D=>O.has(D.routeId)):I,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),x&&(this.stores.setMatches(w),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...g.filter(D=>D.status!=="error"&&D.status!=="notFound"&&D.status!=="redirected")]),this.clearExpiredCache())});for(const[w,x]of[[v,"onLeave"],[S,"onEnter"],[C,"onStay"]])if(w)for(const I of w)this.looseRoutesById[I.routeId].options[x]?.(I)})})}})}catch(p){lr(p)?(o=p,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):Vn(p)&&(a=p);const m=o?o.status:a?404:this.stores.matches.get().some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(m),this.stores.redirect.set(o)})}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let d;this.hasNotFoundMatch()?d=404:this.stores.matches.get().some(f=>f.status==="error")&&(d=500),d!==void 0&&this.stores.statusCode.set(d)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const a=this.latestLocation,l=this.stores.resolvedLocation.get(),c=typeof r.types=="function"?r.types(Nc(a,l)):r.types;if(c===!1){n();return}o={update:n,types:c}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(n);if(o){o.set(r);return}const a=this.stores.matchStores.get(n);if(a){a.set(r);return}const l=this.stores.cachedMatchStores.get(n);if(l){const c=r(l.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(d=>d.filter(f=>f!==n)):l.set(c)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),a=this.getParsedLocationHref(o);n.options.href=a,n.headers.set("Location",a)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const a=o.pathname+o.search+o.hash;n.options.href=a,n.headers.set("Location",a)}}catch{}if(n.options.href&&!n.options._builtLocation&&hg(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!r(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=o=>{const a=this.looseRoutesById[o.routeId];if(!a.options.loader)return!0;const l=(o.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=l};this.clearCache({filter:r})},this.loadRouteChunk=Tf,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),l=new Set([...a,...this.stores.cachedIds.get()]),c=o.filter(d=>!l.has(d.id));if(c.length){const d=this.stores.cachedMatches.get();this.stores.setCached([...d,...c])}try{return o=await yD({router:this,matches:o,location:r,preload:!0,updateMatch:(d,f)=>{a.has(d)?o=o.map(p=>p.id===d?f(p):p):this.updateMatch(d,f)}}),o}catch(d){if(lr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:r});Vn(d)||console.error(d);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},a=this.buildLocation(o);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const l=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=Eme(a.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,l.pathname,this.processedTree);return!c||n.params&&!Pi(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Pi(l.search,a.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Bme,parseSearch:e.parseSearch??jme,protocolAllowlist:e.protocolAllowlist??gme}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=M9(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:o}=n;let{matchedRoutes:a}=n,l=!1;(r?r.path!=="/"&&o["**"]:Ea(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:l=!0);const c=l?cge(this.options.notFoundMode,a):void 0,d=new Array(a.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<a.length;p++){const m=a[p],g=d[p-1];let v,S,C;{const F=g?.search??e.search,q=g?._strictSearch??void 0;try{const X=Bm(m.options.validateSearch,{...F})??void 0;v={...F,...X},S={...q,...X},C=void 0}catch(X){let Se=X;if(X instanceof gg||(Se=new gg(X.message,{cause:X})),t?.throwOnError)throw Se;v=F,S={},C=Se}}const w=m.options.loaderDeps?.({search:v})??"",x=w?JSON.stringify(w):"",{interpolatedPath:I,usedParams:T}=dD({path:m.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),O=m.id+I+x,D=this.getMatch(O),P=f.get(m.id),M=D?._strictParams??T;let L;if(!D)try{wD(m,M)}catch(F){if(Vn(F)||lr(F)?L=F:L=new oge(F.message,{cause:F}),t?.throwOnError)throw L}Object.assign(o,M);const z=P?"stay":"enter";let G;if(D)G={...D,cause:z,params:P?.params??o,_strictParams:M,search:Si(P?P.search:D.search,v),_strictSearch:S};else{const F=m.options.loader||m.options.beforeLoad||m.lazyFn||z9(m)?"pending":"success";G={id:O,ssr:m.options.ssr,index:p,routeId:m.id,params:P?.params??o,_strictParams:M,pathname:I,updatedAt:Date.now(),search:P?Si(P.search,v):v,_strictSearch:S,searchError:void 0,status:F,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:Vc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:z,loaderDeps:P?Ai(P.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t?.preload||(G.globalNotFound=c===m.id),G.searchError=C;const j=this.getParentContext(g);G.context={...j,...G.__routeContext,...G.__beforeLoadContext},d[p]=G}for(let p=0;p<d.length;p++){const m=d[p],g=this.looseRoutesById[m.routeId],v=this.getMatch(m.id),S=f.get(m.routeId);if(m.params=S?Si(S.params,o):o,!v){const C=d[p-1],w=this.getParentContext(C);if(g.options.context){const x={deps:m.loaderDeps,params:m.params,context:w??{},location:e,navigate:I=>this.navigate({...I,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:d,routeId:g.id};m.__routeContext=g.options.context(x)??void 0}m.context={...w,...m.__routeContext,...m.__beforeLoadContext}}}return d}matchRoutesLightweight(e){const t=_f(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];const{matchedRoutes:r,routeParams:o}=this.getMatchedRoutes(e.pathname),a=_f(r),l={...e.search};for(const m of r)try{Object.assign(l,Bm(m.options.validateSearch,l))}catch{}const c=t&&this.stores.matchStores.get(t)?.get(),d=c&&c.routeId===a.id&&c.pathname===e.pathname;let f;if(d)f=c.params;else{const m=Object.assign(Object.create(null),o);for(const g of r)try{wD(g,m)}catch{}f=m}const p={matchedRoutes:r,fullPath:a.fullPath,search:l,params:f};return this.lightweightCache.set(e,[t,p]),p}},gg=class extends Error{},oge=class extends Error{};function age(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Bm(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new gg("Async validation not supported");if(n.issues)throw new gg(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function sge({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),o=Ea(e);let a;const l=wme(o,n,!0);return l&&(a=l.route,Object.assign(r,l.rawParams)),{matchedRoutes:l?.branch||[t.__root__],routeParams:r,foundRoute:a}}function ige({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return lge(n)(e,t,r??!1)}function lge(e){let t,n;const r=[];for(const a of e){const l=a.options;if("search"in l)l.search?.middlewares&&r.push(...l.search.middlewares);else if(l.preSearchFilters||l.postSearchFilters){const d=({search:f,next:p})=>{const m=p(l.preSearchFilters?l.preSearchFilters.reduce((g,v)=>v(g),f):f);return l.postSearchFilters?l.postSearchFilters.reduce((g,v)=>v(g),m):m};r.push(d)}const c=l.validateSearch;if(c){const d=({search:f,next:p,meta:m})=>{const g=p(f);if(n)try{const v=Bm(c,g);if(m&&v)for(const S in v)S in g||(m.defaulted||=new Map).set(S,v[S]);return{...g,...v}}catch{}return g};r.push(d)}}const o=(a,l,c)=>{if(a>=r.length){if(!t.search)return{};if(t.search===!0)return l;const f=Ii(t.search,l);return c&&(c.explicit=f),f}const d=(f,p)=>{if(p){const m=c||{};return{search:o(a+1,f,m),meta:m}}return o(a+1,f,c)};return r[a]({search:l,next:d,meta:c})};return function(l,c,d){return t=c,n=d,o(0,l)}}function cge(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return ki}function wD(e,t){const n=e.options.params?.parse??e.options.parseParams;if(n){const r=n(t);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,r)}}const uge="Error preloading route! ☝️";var $9=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=ki:this.parentRoute||xa();let o=r?ki:n?.path;o&&o!=="/"&&(o=N9(o));const a=n?.id||o;let l=r?ki:zm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,a]);o==="__root__"&&(o="/"),l!=="__root__"&&(l=zm(["/",l]));const c=l==="__root__"?"/":zm([this.parentRoute.fullPath,o]);this._path=o,this._id=l,this._fullPath=c,this._to=Ea(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>cl({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},dge=class extends $9{constructor(e){super(e)}};function eI(e){const t=e.errorComponent??tI;return R.jsx(fge,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?_.createElement(t,{error:n,reset:r}):e.children})}var fge=class extends _.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function tI({error:e}){const[t,n]=_.useState(!1);return R.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[R.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[R.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),R.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),R.jsx("div",{style:{height:".25rem"}}),t?R.jsx("div",{children:R.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?R.jsx("code",{children:e.message}):null})}):null]})}function hge({children:e,fallback:t=null}){return j9()?R.jsx(B.Fragment,{children:e}):R.jsx(B.Fragment,{children:t})}function j9(){return B.useSyncExternalStore(pge,()=>!0,()=>!1)}function pge(){return()=>{}}var B9=_.createContext(null);function gr(e){return _.useContext(B9)}var qv=_.createContext(void 0),mge=_.createContext(void 0),Gt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Gt||{});function gge({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:a,checkDirty:l,shallowPropagate:c};function r(f,p,m){const g=p.depsTail;if(g!==void 0&&g.dep===f)return;const v=g!==void 0?g.nextDep:p.deps;if(v!==void 0&&v.dep===f){v.version=m,p.depsTail=v;return}const S=f.subsTail;if(S!==void 0&&S.version===m&&S.sub===p)return;const C=p.depsTail=f.subsTail={version:m,dep:f,sub:p,prevDep:g,nextDep:v,prevSub:S,nextSub:void 0};v!==void 0&&(v.prevDep=C),g!==void 0?g.nextDep=C:p.deps=C,S!==void 0?S.nextSub=C:f.subs=C}function o(f,p=f.sub){const m=f.dep,g=f.prevDep,v=f.nextDep,S=f.nextSub,C=f.prevSub;return v!==void 0?v.prevDep=g:p.depsTail=g,g!==void 0?g.nextDep=v:p.deps=v,S!==void 0?S.prevSub=C:m.subsTail=C,C!==void 0?C.nextSub=S:(m.subs=S)===void 0&&n(m),v}function a(f){let p=f.nextSub,m;e:do{const g=f.sub;let v=g.flags;if(v&60?v&12?v&4?!(v&48)&&d(f,g)?(g.flags=v|40,v&=1):v=0:g.flags=v&-9|32:v=0:g.flags=v|32,v&2&&t(g),v&1){const S=g.subs;if(S!==void 0){const C=(f=S).nextSub;C!==void 0&&(m={value:p,prev:m},p=C);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;m!==void 0;)if(f=m.value,m=m.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function l(f,p){let m,g=0,v=!1;e:do{const S=f.dep,C=S.flags;if(p.flags&16)v=!0;else if((C&17)===17){if(e(S)){const w=S.subs;w.nextSub!==void 0&&c(w),v=!0}}else if((C&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(m={value:f,prev:m}),f=S.deps,p=S,++g;continue}if(!v){const w=f.nextDep;if(w!==void 0){f=w;continue}}for(;g--;){const w=p.subs,x=w.nextSub!==void 0;if(x?(f=m.value,m=m.prev):f=w,v){if(e(p)){x&&c(w),p=f.sub;continue}v=!1}else p.flags&=-33;p=f.sub;const I=f.nextDep;if(I!==void 0){f=I;continue e}}return v}while(!0)}function c(f){do{const p=f.sub,m=p.flags;(m&48)===32&&(p.flags=m|16,(m&6)===2&&t(p))}while((f=f.nextSub)!==void 0)}function d(f,p){let m=p.depsTail;for(;m!==void 0;){if(m===f)return!0;m=m.prevDep}return!1}}function vge(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}const Rx=[];let Hm=0;const{link:xD,unlink:yge,propagate:bge,checkDirty:H9,shallowPropagate:_D}=gge({update(e){return e._update()},notify(e){Rx[Ox++]=e,e.flags&=~Gt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Gt.Mutable|Gt.Dirty,vg(e))}});let am=0,Ox=0,Oo,Mx=0;function q9(e){try{++Mx,e()}finally{--Mx||V9()}}function vg(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=yge(n,e)}function V9(){if(!(Mx>0)){for(;am<Ox;){const e=Rx[am];Rx[am++]=void 0,e.notify()}am=0,Ox=0}}function ID(e,t){const n=typeof e=="function",r=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Gt.None:Gt.Mutable,get(){return Oo!==void 0&&xD(o,Oo,Hm),o._snapshot},subscribe(a){const l=vge(a),c={current:!1},d=Sge(()=>{o.get(),c.current?l.next?.(o._snapshot):c.current=!0});return{unsubscribe:()=>{d.stop()}}},_update(a){const l=Oo,c=t?.compare??Object.is;if(n)Oo=o,++Hm,o.depsTail=void 0;else if(a===void 0)return!1;n&&(o.flags=Gt.Mutable|Gt.RecursedCheck);try{const d=o._snapshot,f=typeof a=="function"?a(d):a===void 0&&n?r(d):a;return d===void 0||!c(d,f)?(o._snapshot=f,!0):!1}finally{Oo=l,n&&(o.flags&=~Gt.RecursedCheck),vg(o)}}};return n?(o.flags=Gt.Mutable|Gt.Dirty,o.get=function(){const a=o.flags;if(a&Gt.Dirty||a&Gt.Pending&&H9(o.deps,o)){if(o._update()){const l=o.subs;l!==void 0&&_D(l)}}else a&Gt.Pending&&(o.flags=a&~Gt.Pending);return Oo!==void 0&&xD(o,Oo,Hm),o._snapshot}):o.set=function(a){if(o._update(a)){const l=o.subs;l!==void 0&&(bge(l),_D(l),V9())}},o}function Sge(e){const t=()=>{const r=Oo;Oo=n,++Hm,n.depsTail=void 0,n.flags=Gt.Watching|Gt.RecursedCheck;try{return e()}finally{Oo=r,n.flags&=~Gt.RecursedCheck,vg(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Gt.Watching|Gt.RecursedCheck,notify(){const r=this.flags;r&Gt.Dirty||r&Gt.Pending&&H9(this.deps,this)?t():this.flags=Gt.Watching},stop(){this.flags=Gt.None,this.depsTail=void 0,vg(this)}};return t(),n}function Cge(e,t){return e===t}function pr(e,t,n=Cge){const r=_.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),o=_.useCallback(()=>e?.get(),[e]);return H8.useSyncExternalStoreWithSelector(r,o,o,t,n)}var ew={get(){},subscribe(){return{unsubscribe(){}}}};function Ege(e,t){const n=_.useRef();return r=>{const o=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=Ai(n.current,o):o}}function ul(e){const t=gr(),n=_.useContext(e.from?mge:qv),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),o=Ege(e,t),a=pr(r??ew,l=>l?o(l):ew);if(a!==ew)return a;(e.shouldThrow??!0)&&xa()}function W9(e){return ul({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function G9(e){const{select:t,...n}=e;return ul({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function K9(e){return ul({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Vv(e){return ul({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function nh(e){const t=gr();return _.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function WDe(e){const t=gr(),n=nh(),r=_.useRef(null);return Cc(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function Z9(e){return ul({...e,select:t=>e.select?e.select(t.context):t.context})}function wge(e,t){const n=gr(),r=ume(t),{activeProps:o,inactiveProps:a,activeOptions:l,to:c,preload:d,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:m,replace:g,startTransition:v,resetScroll:S,viewTransition:C,children:w,target:x,disabled:I,style:T,className:O,onClick:D,onBlur:P,onFocus:M,onMouseEnter:L,onMouseLeave:z,onTouchStart:G,ignoreBlocker:j,params:F,search:q,hash:X,state:Se,mask:W,reloadDocument:ee,unsafeRelative:me,from:ge,_fromLocation:Te,...$}=e,te=j9(),fe=_.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ce=pr(n.stores.location,Ut=>Ut,(Ut,On)=>Ut.href===On.href),be=_.useMemo(()=>{const Ut={_fromLocation:ce,...fe};return n.buildLocation(Ut)},[n,ce,fe]),Fe=be.maskedLocation?be.maskedLocation.publicHref:be.publicHref,ke=be.maskedLocation?be.maskedLocation.external:be.external,ae=_.useMemo(()=>Rge(Fe,ke,n.history,I),[I,ke,Fe,n.history]),Ae=_.useMemo(()=>{if(ae?.external)return hg(ae.href,n.protocolAllowlist)?void 0:ae.href;if(!Oge(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),hg(c,n.protocolAllowlist)?void 0:c}catch{}},[c,ae,n.protocolAllowlist]),Je=_.useMemo(()=>{if(Ae)return!1;if(l?.exact){if(!Rme(ce.pathname,be.pathname,n.basepath))return!1}else{const Ut=pg(ce.pathname,n.basepath),On=pg(be.pathname,n.basepath);if(!(Ut.startsWith(On)&&(Ut.length===On.length||Ut[On.length]==="/")))return!1}return(l?.includeSearch??!0)&&!Pi(ce.search,be.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?te&&ce.hash===be.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,ce,Ae,te,be.hash,be.pathname,be.search,n.basepath]),we=Je?Ii(o,{})??xge:tw,wt=Je?tw:Ii(a,{})??tw,Ge=[O,we.className,wt.className].filter(Boolean).join(" "),Dt=(T||we.style||wt.style)&&{...T,...we.style,...wt.style},[Cn,He]=_.useState(!1),Fa=_.useRef(!1),Wo=e.reloadDocument||Ae?!1:d??n.options.defaultPreload,Js=f??n.options.defaultPreloadDelay??0,ao=_.useCallback(()=>{n.preloadRoute({...fe,_builtLocation:be}).catch(Ut=>{console.warn(Ut),console.warn(uge)})},[n,fe,be]);cme(r,_.useCallback(Ut=>{Ut?.isIntersecting&&ao()},[ao]),Tge,{disabled:!!I||Wo!=="viewport"}),_.useEffect(()=>{Fa.current||!I&&Wo==="render"&&(ao(),Fa.current=!0)},[I,ao,Wo]);const Eu=Ut=>{const On=Ut.currentTarget.getAttribute("target"),Eo=x!==void 0?x:On;if(!I&&!Mge(Ut)&&!Ut.defaultPrevented&&(!Eo||Eo==="_self")&&Ut.button===0){Ut.preventDefault(),UJ.flushSync(()=>{He(!0)});const ml=n.subscribe("onResolved",()=>{ml(),He(!1)});n.navigate({...fe,replace:g,resetScroll:S,hashScrollIntoView:m,startTransition:v,viewTransition:C,ignoreBlocker:j})}};if(Ae)return{...$,ref:r,href:Ae,...w&&{children:w},...x&&{target:x},...I&&{disabled:I},...T&&{style:T},...O&&{className:O},...D&&{onClick:D},...P&&{onBlur:P},...M&&{onFocus:M},...L&&{onMouseEnter:L},...z&&{onMouseLeave:z},...G&&{onTouchStart:G}};const ph=Ut=>{if(I||Wo!=="intent")return;if(!Js){ao();return}const On=Ut.currentTarget;if(Md.has(On))return;const Eo=setTimeout(()=>{Md.delete(On),ao()},Js);Md.set(On,Eo)},Dy=Ut=>{I||Wo!=="intent"||ao()},Bn=Ut=>{if(I||!Wo||!Js)return;const On=Ut.currentTarget,Eo=Md.get(On);Eo&&(clearTimeout(Eo),Md.delete(On))};return{...$,...we,...wt,href:ae?.href,ref:r,onClick:sc([D,Eu]),onBlur:sc([P,Bn]),onFocus:sc([M,ph]),onMouseEnter:sc([L,ph]),onMouseLeave:sc([z,Bn]),onTouchStart:sc([G,Dy]),disabled:!!I,target:x,...Dt&&{style:Dt},...Ge&&{className:Ge},...I&&_ge,...Je&&Ige,...te&&Cn&&Age}}var tw={},xge={className:"active"},_ge={role:"link","aria-disabled":!0},Ige={"data-status":"active","aria-current":"page"},Age={"data-transitioning":"transitioning"},Md=new WeakMap,Tge={rootMargin:"100px"},sc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Rge(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function Oge(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function GDe(e){return _.forwardRef(function(n,r){return R.jsx(nI,{...n,_asChild:e,ref:r})})}var nI=_.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...a}=wge(r,t),l=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;if(!n){const{disabled:c,...d}=a;return _.createElement("a",d,l)}return _.createElement(n,a,l)});function Mge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Nge=class extends $9{constructor(t){super(t),this.useMatch=n=>ul({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Z9({...n,from:this.id}),this.useSearch=n=>Vv({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>K9({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>G9({...n,from:this.id}),this.useLoaderData=n=>W9({...n,from:this.id}),this.useNavigate=()=>nh({from:this.fullPath}),this.Link=B.forwardRef((n,r)=>R.jsx(nI,{ref:r,from:this.fullPath,...n}))}};function Pge(e){return new Nge(e)}function kge(){return e=>Lge(e)}var Dge=class extends dge{constructor(e){super(e),this.useMatch=t=>ul({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>Z9({...t,from:this.id}),this.useSearch=t=>Vv({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>K9({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>G9({...t,from:this.id}),this.useLoaderData=t=>W9({...t,from:this.id}),this.useNavigate=()=>nh({from:this.fullPath}),this.Link=B.forwardRef((t,n)=>R.jsx(nI,{ref:n,from:this.fullPath,...t}))}};function Lge(e){return new Dge(e)}function xe(e){return new Uge(e,{silent:!0}).createRoute}var Uge=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=Pge(n);return r.isRoot=!1,r},this.silent=t?.silent}};function Oe(e,t){let n,r,o,a;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(o=d,hme(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),a=!0)}})),n),c=function(f){if(a)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if(oD)oD(l());else throw l();return _.createElement(r,f)};return c.preload=l,c}function Fge(e){const t=gr(),n=`not-found-${pr(t.stores.location,r=>r.pathname)}-${pr(t.stores.status,r=>r)}`;return R.jsx(eI,{getResetKey:()=>n,onCatch:(r,o)=>{if(Vn(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Vn(r))return e.fallback?.(r);throw r},children:e.children})}function zge(){return R.jsx("p",{children:"Not Found"})}function vc(e){return R.jsx(R.Fragment,{children:e.children})}function Y9(e,t,n){return t.options.notFoundComponent?R.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?R.jsx(e.options.defaultNotFoundComponent,{...n}):R.jsx(zge,{})}function $ge(e){return null}function jge(){return $ge(gr()),null}var Bge=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,Hge=(e,t)=>e[0]===t[0]&&e[1]===t[1],Q9=_.memo(function({matchId:t}){const n=gr(),r=n.stores.matchStores.get(t);r||xa();const o=pr(n.stores.loadedAt,l=>l),a=pr(r,l=>l,Bge);return R.jsx(qge,{router:n,matchId:t,resetKey:o,matchState:_.useMemo(()=>{const l=a.routeId,c=n.routesById[l].parentRoute?.id;return{routeId:l,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:c}},[a._displayPending,a.routeId,a.ssr,n.routesById])})});function qge({router:e,matchId:t,resetKey:n,matchState:r}){const o=e.routesById[r.routeId],a=o.options.pendingComponent??e.options.defaultPendingComponent,l=a?R.jsx(a,{}):null,c=o.options.errorComponent??e.options.defaultErrorComponent,d=o.options.onCatch??e.options.defaultOnCatch,f=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",m=(!o.isRoot||o.options.wrapInSuspense||p)&&(o.options.wrapInSuspense??a??(o.options.errorComponent?.preload||p))?_.Suspense:vc,g=c?eI:vc,v=f?Fge:vc;return R.jsxs(o.isRoot?o.options.shellComponent??vc:vc,{children:[R.jsx(qv.Provider,{value:t,children:R.jsx(m,{fallback:l,children:R.jsx(g,{getResetKey:()=>n,errorComponent:c||tI,onCatch:(S,C)=>{if(Vn(S))throw S.routeId??=r.routeId,S;d?.(S,C)},children:R.jsx(v,{fallback:S=>{if(S.routeId??=r.routeId,!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!o.isRoot)throw S;return _.createElement(f,S)},children:p||r._displayPending?R.jsx(hge,{fallback:l,children:R.jsx(AD,{matchId:t})}):R.jsx(AD,{matchId:t})})})})}),r.parentRouteId===ki?R.jsxs(R.Fragment,{children:[R.jsx(Vge,{}),e.options.scrollRestoration&&_9?R.jsx(jge,{}):null]}):null]})}function Vge(){const e=gr(),t=_.useRef();return Cc(()=>{const n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:"onRendered",...Nc(e.stores.location.get(),r??n)}),t.current=n},[pr(e.stores.resolvedLocation,n=>n?.state.__TSR_key),e]),null}var AD=_.memo(function({matchId:t}){const n=gr(),r=(p,m)=>n.getMatch(p.id)?._nonReactive[m]??p._nonReactive[m],o=n.stores.matchStores.get(t);o||xa();const a=pr(o,p=>p),l=a.routeId,c=n.routesById[l],d=_.useMemo(()=>{const p=(n.routesById[l].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:l,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return p?JSON.stringify(p):void 0},[l,a.loaderDeps,a._strictParams,a._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=_.useMemo(()=>{const p=c.options.component??n.options.defaultComponent;return p?R.jsx(p,{},d):R.jsx(X9,{})},[d,c.options.component,n.options.defaultComponent]);if(a._displayPending)throw r(a,"displayPendingPromise");if(a._forcePending)throw r(a,"minPendingPromise");if(a.status==="pending"){const p=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const m=n.getMatch(a.id);if(m&&!m._nonReactive.minPendingPromise){const g=Vc();m._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),m._nonReactive.minPendingPromise=void 0},p)}}throw r(a,"loadPromise")}if(a.status==="notFound")return Vn(a.error)||xa(),Y9(n,c,a.error);if(a.status==="redirected")throw lr(a.error)||xa(),r(a,"loadPromise");if(a.status==="error")throw a.error;return f}),X9=_.memo(function(){const t=gr(),n=_.useContext(qv);let r,o=!1,a;{const f=n?t.stores.matchStores.get(n):void 0;[r,o]=pr(f,p=>[p?.routeId,p?.globalNotFound??!1],Hge),a=pr(t.stores.matchesId,p=>p[p.findIndex(m=>m===n)+1])}const l=r?t.routesById[r]:void 0,c=t.options.defaultPendingComponent?R.jsx(t.options.defaultPendingComponent,{}):null;if(o)return l||xa(),Y9(t,l,void 0);if(!a)return null;const d=R.jsx(Q9,{matchId:a});return r===ki?R.jsx(_.Suspense,{fallback:c,children:d}):d});function Wge(){const e=gr(),t=_.useRef({router:e,mounted:!1}),[n,r]=_.useState(!1),o=pr(e.stores.isLoading,m=>m),a=pr(e.stores.hasPending,m=>m),l=GE(o),c=o||n||a,d=GE(c),f=o||a,p=GE(f);return e.startTransition=m=>{r(!0),_.startTransition(()=>{m(),r(!1)})},_.useEffect(()=>{const m=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ea(e.latestLocation.publicHref)!==Ea(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{m()}},[e,e.history]),Cc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),Cc(()=>{l&&!o&&e.emit({type:"onLoad",...Nc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,o]),Cc(()=>{p&&!f&&e.emit({type:"onBeforeRouteMount",...Nc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,p,e]),Cc(()=>{if(d&&!c){const m=Nc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),q9(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())})}},[c,d,e]),null}function Gge(){const e=gr(),t=e.routesById[ki].options.pendingComponent??e.options.defaultPendingComponent,n=t?R.jsx(t,{}):null,r=R.jsxs(typeof document<"u"&&e.ssr?vc:_.Suspense,{fallback:n,children:[R.jsx(Wge,{}),R.jsx(Kge,{})]});return e.options.InnerWrap?R.jsx(e.options.InnerWrap,{children:r}):r}function Kge(){const e=gr(),t=pr(e.stores.firstId,o=>o),n=pr(e.stores.loadedAt,o=>o),r=t?R.jsx(Q9,{matchId:t}):null;return R.jsx(qv.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:R.jsx(eI,{getResetKey:()=>n,errorComponent:tI,onCatch:void 0,children:r})})}var Zge=e=>({createMutableStore:ID,createReadonlyStore:ID,batch:q9}),Yge=e=>new Qge(e),Qge=class extends rge{constructor(e){super(e,Zge)}};function Xge({router:e,children:t,...n}){A9(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=R.jsx(B9.Provider,{value:e,children:t});return e.options.Wrap?R.jsx(e.options.Wrap,{children:r}):r}function Jge({router:e,...t}){return R.jsx(Xge,{router:e,...t,children:R.jsx(Gge,{})})}var nw={exports:{}},Nd={},rw={exports:{}},ow={};var TD;function eve(){return TD||(TD=1,(function(e){function t(W,ee){var me=W.length;W.push(ee);e:for(;0<me;){var ge=me-1>>>1,Te=W[ge];if(0<o(Te,ee))W[ge]=ee,W[me]=Te,me=ge;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var ee=W[0],me=W.pop();if(me!==ee){W[0]=me;e:for(var ge=0,Te=W.length,$=Te>>>1;ge<$;){var te=2*(ge+1)-1,fe=W[te],ce=te+1,be=W[ce];if(0>o(fe,me))ce<Te&&0>o(be,fe)?(W[ge]=be,W[ce]=me,ge=ce):(W[ge]=fe,W[te]=me,ge=te);else if(ce<Te&&0>o(be,me))W[ge]=be,W[ce]=me,ge=ce;else break e}}return ee}function o(W,ee){var me=W.sortIndex-ee.sortIndex;return me!==0?me:W.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],p=1,m=null,g=3,v=!1,S=!1,C=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(W){for(var ee=n(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=W)r(f),ee.sortIndex=ee.expirationTime,t(d,ee);else break;ee=n(f)}}function D(W){if(C=!1,O(W),!S)if(n(d)!==null)S=!0,P||(P=!0,F());else{var ee=n(f);ee!==null&&Se(D,ee.startTime-W)}}var P=!1,M=-1,L=5,z=-1;function G(){return w?!0:!(e.unstable_now()-z<L)}function j(){if(w=!1,P){var W=e.unstable_now();z=W;var ee=!0;try{e:{S=!1,C&&(C=!1,I(M),M=-1),v=!0;var me=g;try{t:{for(O(W),m=n(d);m!==null&&!(m.expirationTime>W&&G());){var ge=m.callback;if(typeof ge=="function"){m.callback=null,g=m.priorityLevel;var Te=ge(m.expirationTime<=W);if(W=e.unstable_now(),typeof Te=="function"){m.callback=Te,O(W),ee=!0;break t}m===n(d)&&r(d),O(W)}else r(d);m=n(d)}if(m!==null)ee=!0;else{var $=n(f);$!==null&&Se(D,$.startTime-W),ee=!1}}break e}finally{m=null,g=me,v=!1}ee=void 0}}finally{ee?F():P=!1}}}var F;if(typeof T=="function")F=function(){T(j)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,X=q.port2;q.port1.onmessage=j,F=function(){X.postMessage(null)}}else F=function(){x(j,0)};function Se(W,ee){M=x(function(){W(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(W){W.callback=null},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(W){switch(g){case 1:case 2:case 3:var ee=3;break;default:ee=g}var me=g;g=ee;try{return W()}finally{g=me}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(W,ee){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var me=g;g=W;try{return ee()}finally{g=me}},e.unstable_scheduleCallback=function(W,ee,me){var ge=e.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?ge+me:ge):me=ge,W){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=me+Te,W={id:p++,callback:ee,priorityLevel:W,startTime:me,expirationTime:Te,sortIndex:-1},me>ge?(W.sortIndex=me,t(f,W),n(d)===null&&W===n(f)&&(C?(I(M),M=-1):C=!0,Se(D,me-ge))):(W.sortIndex=Te,t(d,W),S||v||(S=!0,P||(P=!0,F()))),W},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(W){var ee=g;return function(){var me=g;g=ee;try{return W.apply(this,arguments)}finally{g=me}}}})(ow)),ow}var RD;function tve(){return RD||(RD=1,rw.exports=eve()),rw.exports}var OD;function nve(){if(OD)return Nd;OD=1;var e=tve(),t=Kf(),n=n8();function r(s){var i="https://react.dev/errors/"+s;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function a(s){var i=s,u=s;if(s.alternate)for(;i.return;)i=i.return;else{s=i;do i=s,(i.flags&4098)!==0&&(u=i.return),s=i.return;while(s)}return i.tag===3?u:null}function l(s){if(s.tag===13){var i=s.memoizedState;if(i===null&&(s=s.alternate,s!==null&&(i=s.memoizedState)),i!==null)return i.dehydrated}return null}function c(s){if(s.tag===31){var i=s.memoizedState;if(i===null&&(s=s.alternate,s!==null&&(i=s.memoizedState)),i!==null)return i.dehydrated}return null}function d(s){if(a(s)!==s)throw Error(r(188))}function f(s){var i=s.alternate;if(!i){if(i=a(s),i===null)throw Error(r(188));return i!==s?null:s}for(var u=s,h=i;;){var y=u.return;if(y===null)break;var b=y.alternate;if(b===null){if(h=y.return,h!==null){u=h;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===u)return d(y),s;if(b===h)return d(y),i;b=b.sibling}throw Error(r(188))}if(u.return!==h.return)u=y,h=b;else{for(var A=!1,k=y.child;k;){if(k===u){A=!0,u=y,h=b;break}if(k===h){A=!0,h=y,u=b;break}k=k.sibling}if(!A){for(k=b.child;k;){if(k===u){A=!0,u=b,h=y;break}if(k===h){A=!0,h=b,u=y;break}k=k.sibling}if(!A)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?s:i}function p(s){var i=s.tag;if(i===5||i===26||i===27||i===6)return s;for(s=s.child;s!==null;){if(i=p(s),i!==null)return i;s=s.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function F(s){return s===null||typeof s!="object"?null:(s=j&&s[j]||s["@@iterator"],typeof s=="function"?s:null)}var q=Symbol.for("react.client.reference");function X(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===q?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case C:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case D:return"Suspense";case P:return"SuspenseList";case z:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case S:return"Portal";case T:return s.displayName||"Context";case I:return(s._context.displayName||"Context")+".Consumer";case O:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case M:return i=s.displayName||null,i!==null?i:X(s.type)||"Memo";case L:i=s._payload,s=s._init;try{return X(s(i))}catch{}}return null}var Se=Array.isArray,W=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},ge=[],Te=-1;function $(s){return{current:s}}function te(s){0>Te||(s.current=ge[Te],ge[Te]=null,Te--)}function fe(s,i){Te++,ge[Te]=s.current,s.current=i}var ce=$(null),be=$(null),Fe=$(null),ke=$(null);function ae(s,i){switch(fe(Fe,i),fe(be,s),fe(ce,null),i.nodeType){case 9:case 11:s=(s=i.documentElement)&&(s=s.namespaceURI)?RO(s):0;break;default:if(s=i.tagName,i=i.namespaceURI)i=RO(i),s=OO(i,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}te(ce),fe(ce,s)}function Ae(){te(ce),te(be),te(Fe)}function Je(s){s.memoizedState!==null&&fe(ke,s);var i=ce.current,u=OO(i,s.type);i!==u&&(fe(be,s),fe(ce,u))}function we(s){be.current===s&&(te(ce),te(be)),ke.current===s&&(te(ke),dd._currentValue=me)}var wt,Ge;function Dt(s){if(wt===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);wt=i&&i[1]||"",Ge=-1<u.stack.indexOf(`
81
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
82
+ `+wt+s+Ge}var Cn=!1;function He(s,i){if(!s||Cn)return"";Cn=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(i){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(J){var Q=J}Reflect.construct(s,[],se)}else{try{se.call()}catch(J){Q=J}s.call(se.prototype)}}else{try{throw Error()}catch(J){Q=J}(se=s())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(J){if(J&&Q&&typeof J.stack=="string")return[J.stack,Q.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=h.DetermineComponentFrameRoot(),A=b[0],k=b[1];if(A&&k){var H=A.split(`
83
+ `),Y=k.split(`
84
+ `);for(y=h=0;h<H.length&&!H[h].includes("DetermineComponentFrameRoot");)h++;for(;y<Y.length&&!Y[y].includes("DetermineComponentFrameRoot");)y++;if(h===H.length||y===Y.length)for(h=H.length-1,y=Y.length-1;1<=h&&0<=y&&H[h]!==Y[y];)y--;for(;1<=h&&0<=y;h--,y--)if(H[h]!==Y[y]){if(h!==1||y!==1)do if(h--,y--,0>y||H[h]!==Y[y]){var ne=`
85
+ `+H[h].replace(" at new "," at ");return s.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",s.displayName)),ne}while(1<=h&&0<=y);break}}}finally{Cn=!1,Error.prepareStackTrace=u}return(u=s?s.displayName||s.name:"")?Dt(u):""}function Fa(s,i){switch(s.tag){case 26:case 27:case 5:return Dt(s.type);case 16:return Dt("Lazy");case 13:return s.child!==i&&i!==null?Dt("Suspense Fallback"):Dt("Suspense");case 19:return Dt("SuspenseList");case 0:case 15:return He(s.type,!1);case 11:return He(s.type.render,!1);case 1:return He(s.type,!0);case 31:return Dt("Activity");default:return""}}function Wo(s){try{var i="",u=null;do i+=Fa(s,u),u=s,s=s.return;while(s);return i}catch(h){return`
86
+ Error generating stack: `+h.message+`
87
+ `+h.stack}}var Js=Object.prototype.hasOwnProperty,ao=e.unstable_scheduleCallback,Eu=e.unstable_cancelCallback,ph=e.unstable_shouldYield,Dy=e.unstable_requestPaint,Bn=e.unstable_now,Ut=e.unstable_getCurrentPriorityLevel,On=e.unstable_ImmediatePriority,Eo=e.unstable_UserBlockingPriority,ml=e.unstable_NormalPriority,TB=e.unstable_LowPriority,cA=e.unstable_IdlePriority,RB=e.log,OB=e.unstable_setDisableYieldValue,wu=null,yr=null;function za(s){if(typeof RB=="function"&&OB(s),yr&&typeof yr.setStrictMode=="function")try{yr.setStrictMode(wu,s)}catch{}}var br=Math.clz32?Math.clz32:PB,MB=Math.log,NB=Math.LN2;function PB(s){return s>>>=0,s===0?32:31-(MB(s)/NB|0)|0}var mh=256,gh=262144,vh=4194304;function ei(s){var i=s&42;if(i!==0)return i;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function yh(s,i,u){var h=s.pendingLanes;if(h===0)return 0;var y=0,b=s.suspendedLanes,A=s.pingedLanes;s=s.warmLanes;var k=h&134217727;return k!==0?(h=k&~b,h!==0?y=ei(h):(A&=k,A!==0?y=ei(A):u||(u=k&~s,u!==0&&(y=ei(u))))):(k=h&~b,k!==0?y=ei(k):A!==0?y=ei(A):u||(u=h&~s,u!==0&&(y=ei(u)))),y===0?0:i!==0&&i!==y&&(i&b)===0&&(b=y&-y,u=i&-i,b>=u||b===32&&(u&4194048)!==0)?i:y}function xu(s,i){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&i)===0}function kB(s,i){switch(s){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uA(){var s=vh;return vh<<=1,(vh&62914560)===0&&(vh=4194304),s}function Ly(s){for(var i=[],u=0;31>u;u++)i.push(s);return i}function _u(s,i){s.pendingLanes|=i,i!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function DB(s,i,u,h,y,b){var A=s.pendingLanes;s.pendingLanes=u,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=u,s.entangledLanes&=u,s.errorRecoveryDisabledLanes&=u,s.shellSuspendCounter=0;var k=s.entanglements,H=s.expirationTimes,Y=s.hiddenUpdates;for(u=A&~u;0<u;){var ne=31-br(u),se=1<<ne;k[ne]=0,H[ne]=-1;var Q=Y[ne];if(Q!==null)for(Y[ne]=null,ne=0;ne<Q.length;ne++){var J=Q[ne];J!==null&&(J.lane&=-536870913)}u&=~se}h!==0&&dA(s,h,0),b!==0&&y===0&&s.tag!==0&&(s.suspendedLanes|=b&~(A&~i))}function dA(s,i,u){s.pendingLanes|=i,s.suspendedLanes&=~i;var h=31-br(i);s.entangledLanes|=i,s.entanglements[h]=s.entanglements[h]|1073741824|u&261930}function fA(s,i){var u=s.entangledLanes|=i;for(s=s.entanglements;u;){var h=31-br(u),y=1<<h;y&i|s[h]&i&&(s[h]|=i),u&=~y}}function hA(s,i){var u=i&-i;return u=(u&42)!==0?1:Uy(u),(u&(s.suspendedLanes|i))!==0?0:u}function Uy(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Fy(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function pA(){var s=ee.p;return s!==0?s:(s=window.event,s===void 0?32:JO(s.type))}function mA(s,i){var u=ee.p;try{return ee.p=s,i()}finally{ee.p=u}}var $a=Math.random().toString(36).slice(2),Mn="__reactFiber$"+$a,er="__reactProps$"+$a,gl="__reactContainer$"+$a,zy="__reactEvents$"+$a,LB="__reactListeners$"+$a,UB="__reactHandles$"+$a,gA="__reactResources$"+$a,Iu="__reactMarker$"+$a;function $y(s){delete s[Mn],delete s[er],delete s[zy],delete s[LB],delete s[UB]}function vl(s){var i=s[Mn];if(i)return i;for(var u=s.parentNode;u;){if(i=u[gl]||u[Mn]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(s=UO(s);s!==null;){if(u=s[Mn])return u;s=UO(s)}return i}s=u,u=s.parentNode}return null}function yl(s){if(s=s[Mn]||s[gl]){var i=s.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return s}return null}function Au(s){var i=s.tag;if(i===5||i===26||i===27||i===6)return s.stateNode;throw Error(r(33))}function bl(s){var i=s[gA];return i||(i=s[gA]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function En(s){s[Iu]=!0}var vA=new Set,yA={};function ti(s,i){Sl(s,i),Sl(s+"Capture",i)}function Sl(s,i){for(yA[s]=i,s=0;s<i.length;s++)vA.add(i[s])}var FB=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),bA={},SA={};function zB(s){return Js.call(SA,s)?!0:Js.call(bA,s)?!1:FB.test(s)?SA[s]=!0:(bA[s]=!0,!1)}function bh(s,i,u){if(zB(i))if(u===null)s.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":s.removeAttribute(i);return;case"boolean":var h=i.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){s.removeAttribute(i);return}}s.setAttribute(i,""+u)}}function Sh(s,i,u){if(u===null)s.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(i);return}s.setAttribute(i,""+u)}}function Go(s,i,u,h){if(h===null)s.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(u);return}s.setAttributeNS(i,u,""+h)}}function Ur(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function CA(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function $B(s,i,u){var h=Object.getOwnPropertyDescriptor(s.constructor.prototype,i);if(!s.hasOwnProperty(i)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var y=h.get,b=h.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return y.call(this)},set:function(A){u=""+A,b.call(this,A)}}),Object.defineProperty(s,i,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(A){u=""+A},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function jy(s){if(!s._valueTracker){var i=CA(s)?"checked":"value";s._valueTracker=$B(s,i,""+s[i])}}function EA(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var u=i.getValue(),h="";return s&&(h=CA(s)?s.checked?"true":"false":s.value),s=h,s!==u?(i.setValue(s),!0):!1}function Ch(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var jB=/[\n"\\]/g;function Fr(s){return s.replace(jB,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function By(s,i,u,h,y,b,A,k){s.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?s.type=A:s.removeAttribute("type"),i!=null?A==="number"?(i===0&&s.value===""||s.value!=i)&&(s.value=""+Ur(i)):s.value!==""+Ur(i)&&(s.value=""+Ur(i)):A!=="submit"&&A!=="reset"||s.removeAttribute("value"),i!=null?Hy(s,A,Ur(i)):u!=null?Hy(s,A,Ur(u)):h!=null&&s.removeAttribute("value"),y==null&&b!=null&&(s.defaultChecked=!!b),y!=null&&(s.checked=y&&typeof y!="function"&&typeof y!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?s.name=""+Ur(k):s.removeAttribute("name")}function wA(s,i,u,h,y,b,A,k){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(s.type=b),i!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||i!=null)){jy(s);return}u=u!=null?""+Ur(u):"",i=i!=null?""+Ur(i):u,k||i===s.value||(s.value=i),s.defaultValue=i}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,s.checked=k?s.checked:!!h,s.defaultChecked=!!h,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(s.name=A),jy(s)}function Hy(s,i,u){i==="number"&&Ch(s.ownerDocument)===s||s.defaultValue===""+u||(s.defaultValue=""+u)}function Cl(s,i,u,h){if(s=s.options,i){i={};for(var y=0;y<u.length;y++)i["$"+u[y]]=!0;for(u=0;u<s.length;u++)y=i.hasOwnProperty("$"+s[u].value),s[u].selected!==y&&(s[u].selected=y),y&&h&&(s[u].defaultSelected=!0)}else{for(u=""+Ur(u),i=null,y=0;y<s.length;y++){if(s[y].value===u){s[y].selected=!0,h&&(s[y].defaultSelected=!0);return}i!==null||s[y].disabled||(i=s[y])}i!==null&&(i.selected=!0)}}function xA(s,i,u){if(i!=null&&(i=""+Ur(i),i!==s.value&&(s.value=i),u==null)){s.defaultValue!==i&&(s.defaultValue=i);return}s.defaultValue=u!=null?""+Ur(u):""}function _A(s,i,u,h){if(i==null){if(h!=null){if(u!=null)throw Error(r(92));if(Se(h)){if(1<h.length)throw Error(r(93));h=h[0]}u=h}u==null&&(u=""),i=u}u=Ur(i),s.defaultValue=u,h=s.textContent,h===u&&h!==""&&h!==null&&(s.value=h),jy(s)}function El(s,i){if(i){var u=s.firstChild;if(u&&u===s.lastChild&&u.nodeType===3){u.nodeValue=i;return}}s.textContent=i}var BB=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function IA(s,i,u){var h=i.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?s.setProperty(i,""):i==="float"?s.cssFloat="":s[i]="":h?s.setProperty(i,u):typeof u!="number"||u===0||BB.has(i)?i==="float"?s.cssFloat=u:s[i]=(""+u).trim():s[i]=u+"px"}function AA(s,i,u){if(i!=null&&typeof i!="object")throw Error(r(62));if(s=s.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||i!=null&&i.hasOwnProperty(h)||(h.indexOf("--")===0?s.setProperty(h,""):h==="float"?s.cssFloat="":s[h]="");for(var y in i)h=i[y],i.hasOwnProperty(y)&&u[y]!==h&&IA(s,y,h)}else for(var b in i)i.hasOwnProperty(b)&&IA(s,b,i[b])}function qy(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var HB=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),qB=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Eh(s){return qB.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Ko(){}var Vy=null;function Wy(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var wl=null,xl=null;function TA(s){var i=yl(s);if(i&&(s=i.stateNode)){var u=s[er]||null;e:switch(s=i.stateNode,i.type){case"input":if(By(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),i=u.name,u.type==="radio"&&i!=null){for(u=s;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Fr(""+i)+'"][type="radio"]'),i=0;i<u.length;i++){var h=u[i];if(h!==s&&h.form===s.form){var y=h[er]||null;if(!y)throw Error(r(90));By(h,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(i=0;i<u.length;i++)h=u[i],h.form===s.form&&EA(h)}break e;case"textarea":xA(s,u.value,u.defaultValue);break e;case"select":i=u.value,i!=null&&Cl(s,!!u.multiple,i,!1)}}}var Gy=!1;function RA(s,i,u){if(Gy)return s(i,u);Gy=!0;try{var h=s(i);return h}finally{if(Gy=!1,(wl!==null||xl!==null)&&(cp(),wl&&(i=wl,s=xl,xl=wl=null,TA(i),s)))for(i=0;i<s.length;i++)TA(s[i])}}function Tu(s,i){var u=s.stateNode;if(u===null)return null;var h=u[er]||null;if(h===null)return null;u=h[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(s=s.type,h=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!h;break e;default:s=!1}if(s)return null;if(u&&typeof u!="function")throw Error(r(231,i,typeof u));return u}var Zo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ky=!1;if(Zo)try{var Ru={};Object.defineProperty(Ru,"passive",{get:function(){Ky=!0}}),window.addEventListener("test",Ru,Ru),window.removeEventListener("test",Ru,Ru)}catch{Ky=!1}var ja=null,Zy=null,wh=null;function OA(){if(wh)return wh;var s,i=Zy,u=i.length,h,y="value"in ja?ja.value:ja.textContent,b=y.length;for(s=0;s<u&&i[s]===y[s];s++);var A=u-s;for(h=1;h<=A&&i[u-h]===y[b-h];h++);return wh=y.slice(s,1<h?1-h:void 0)}function xh(s){var i=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&i===13&&(s=13)):s=i,s===10&&(s=13),32<=s||s===13?s:0}function _h(){return!0}function MA(){return!1}function tr(s){function i(u,h,y,b,A){this._reactName=u,this._targetInst=y,this.type=h,this.nativeEvent=b,this.target=A,this.currentTarget=null;for(var k in s)s.hasOwnProperty(k)&&(u=s[k],this[k]=u?u(b):b[k]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?_h:MA,this.isPropagationStopped=MA,this}return m(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=_h)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=_h)},persist:function(){},isPersistent:_h}),i}var ni={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ih=tr(ni),Ou=m({},ni,{view:0,detail:0}),VB=tr(Ou),Yy,Qy,Mu,Ah=m({},Ou,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jy,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Mu&&(Mu&&s.type==="mousemove"?(Yy=s.screenX-Mu.screenX,Qy=s.screenY-Mu.screenY):Qy=Yy=0,Mu=s),Yy)},movementY:function(s){return"movementY"in s?s.movementY:Qy}}),NA=tr(Ah),WB=m({},Ah,{dataTransfer:0}),GB=tr(WB),KB=m({},Ou,{relatedTarget:0}),Xy=tr(KB),ZB=m({},ni,{animationName:0,elapsedTime:0,pseudoElement:0}),YB=tr(ZB),QB=m({},ni,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),XB=tr(QB),JB=m({},ni,{data:0}),PA=tr(JB),eH={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tH={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nH={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rH(s){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(s):(s=nH[s])?!!i[s]:!1}function Jy(){return rH}var oH=m({},Ou,{key:function(s){if(s.key){var i=eH[s.key]||s.key;if(i!=="Unidentified")return i}return s.type==="keypress"?(s=xh(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?tH[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jy,charCode:function(s){return s.type==="keypress"?xh(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?xh(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),aH=tr(oH),sH=m({},Ah,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kA=tr(sH),iH=m({},Ou,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jy}),lH=tr(iH),cH=m({},ni,{propertyName:0,elapsedTime:0,pseudoElement:0}),uH=tr(cH),dH=m({},Ah,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),fH=tr(dH),hH=m({},ni,{newState:0,oldState:0}),pH=tr(hH),mH=[9,13,27,32],eb=Zo&&"CompositionEvent"in window,Nu=null;Zo&&"documentMode"in document&&(Nu=document.documentMode);var gH=Zo&&"TextEvent"in window&&!Nu,DA=Zo&&(!eb||Nu&&8<Nu&&11>=Nu),LA=" ",UA=!1;function FA(s,i){switch(s){case"keyup":return mH.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zA(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var _l=!1;function vH(s,i){switch(s){case"compositionend":return zA(i);case"keypress":return i.which!==32?null:(UA=!0,LA);case"textInput":return s=i.data,s===LA&&UA?null:s;default:return null}}function yH(s,i){if(_l)return s==="compositionend"||!eb&&FA(s,i)?(s=OA(),wh=Zy=ja=null,_l=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return DA&&i.locale!=="ko"?null:i.data;default:return null}}var bH={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function $A(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i==="input"?!!bH[s.type]:i==="textarea"}function jA(s,i,u,h){wl?xl?xl.push(h):xl=[h]:wl=h,i=gp(i,"onChange"),0<i.length&&(u=new Ih("onChange","change",null,u,h),s.push({event:u,listeners:i}))}var Pu=null,ku=null;function SH(s){wO(s,0)}function Th(s){var i=Au(s);if(EA(i))return s}function BA(s,i){if(s==="change")return i}var HA=!1;if(Zo){var tb;if(Zo){var nb="oninput"in document;if(!nb){var qA=document.createElement("div");qA.setAttribute("oninput","return;"),nb=typeof qA.oninput=="function"}tb=nb}else tb=!1;HA=tb&&(!document.documentMode||9<document.documentMode)}function VA(){Pu&&(Pu.detachEvent("onpropertychange",WA),ku=Pu=null)}function WA(s){if(s.propertyName==="value"&&Th(ku)){var i=[];jA(i,ku,s,Wy(s)),RA(SH,i)}}function CH(s,i,u){s==="focusin"?(VA(),Pu=i,ku=u,Pu.attachEvent("onpropertychange",WA)):s==="focusout"&&VA()}function EH(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Th(ku)}function wH(s,i){if(s==="click")return Th(i)}function xH(s,i){if(s==="input"||s==="change")return Th(i)}function _H(s,i){return s===i&&(s!==0||1/s===1/i)||s!==s&&i!==i}var Sr=typeof Object.is=="function"?Object.is:_H;function Du(s,i){if(Sr(s,i))return!0;if(typeof s!="object"||s===null||typeof i!="object"||i===null)return!1;var u=Object.keys(s),h=Object.keys(i);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var y=u[h];if(!Js.call(i,y)||!Sr(s[y],i[y]))return!1}return!0}function GA(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function KA(s,i){var u=GA(s);s=0;for(var h;u;){if(u.nodeType===3){if(h=s+u.textContent.length,s<=i&&h>=i)return{node:u,offset:i-s};s=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=GA(u)}}function ZA(s,i){return s&&i?s===i?!0:s&&s.nodeType===3?!1:i&&i.nodeType===3?ZA(s,i.parentNode):"contains"in s?s.contains(i):s.compareDocumentPosition?!!(s.compareDocumentPosition(i)&16):!1:!1}function YA(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var i=Ch(s.document);i instanceof s.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)s=i.contentWindow;else break;i=Ch(s.document)}return i}function rb(s){var i=s&&s.nodeName&&s.nodeName.toLowerCase();return i&&(i==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||i==="textarea"||s.contentEditable==="true")}var IH=Zo&&"documentMode"in document&&11>=document.documentMode,Il=null,ob=null,Lu=null,ab=!1;function QA(s,i,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;ab||Il==null||Il!==Ch(h)||(h=Il,"selectionStart"in h&&rb(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Lu&&Du(Lu,h)||(Lu=h,h=gp(ob,"onSelect"),0<h.length&&(i=new Ih("onSelect","select",null,i,u),s.push({event:i,listeners:h}),i.target=Il)))}function ri(s,i){var u={};return u[s.toLowerCase()]=i.toLowerCase(),u["Webkit"+s]="webkit"+i,u["Moz"+s]="moz"+i,u}var Al={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionrun:ri("Transition","TransitionRun"),transitionstart:ri("Transition","TransitionStart"),transitioncancel:ri("Transition","TransitionCancel"),transitionend:ri("Transition","TransitionEnd")},sb={},XA={};Zo&&(XA=document.createElement("div").style,"AnimationEvent"in window||(delete Al.animationend.animation,delete Al.animationiteration.animation,delete Al.animationstart.animation),"TransitionEvent"in window||delete Al.transitionend.transition);function oi(s){if(sb[s])return sb[s];if(!Al[s])return s;var i=Al[s],u;for(u in i)if(i.hasOwnProperty(u)&&u in XA)return sb[s]=i[u];return s}var JA=oi("animationend"),eT=oi("animationiteration"),tT=oi("animationstart"),AH=oi("transitionrun"),TH=oi("transitionstart"),RH=oi("transitioncancel"),nT=oi("transitionend"),rT=new Map,ib="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ib.push("scrollEnd");function so(s,i){rT.set(s,i),ti(i,[s])}var Rh=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},zr=[],Tl=0,lb=0;function Oh(){for(var s=Tl,i=lb=Tl=0;i<s;){var u=zr[i];zr[i++]=null;var h=zr[i];zr[i++]=null;var y=zr[i];zr[i++]=null;var b=zr[i];if(zr[i++]=null,h!==null&&y!==null){var A=h.pending;A===null?y.next=y:(y.next=A.next,A.next=y),h.pending=y}b!==0&&oT(u,y,b)}}function Mh(s,i,u,h){zr[Tl++]=s,zr[Tl++]=i,zr[Tl++]=u,zr[Tl++]=h,lb|=h,s.lanes|=h,s=s.alternate,s!==null&&(s.lanes|=h)}function cb(s,i,u,h){return Mh(s,i,u,h),Nh(s)}function ai(s,i){return Mh(s,null,null,i),Nh(s)}function oT(s,i,u){s.lanes|=u;var h=s.alternate;h!==null&&(h.lanes|=u);for(var y=!1,b=s.return;b!==null;)b.childLanes|=u,h=b.alternate,h!==null&&(h.childLanes|=u),b.tag===22&&(s=b.stateNode,s===null||s._visibility&1||(y=!0)),s=b,b=b.return;return s.tag===3?(b=s.stateNode,y&&i!==null&&(y=31-br(u),s=b.hiddenUpdates,h=s[y],h===null?s[y]=[i]:h.push(i),i.lane=u|536870912),b):null}function Nh(s){if(50<od)throw od=0,y0=null,Error(r(185));for(var i=s.return;i!==null;)s=i,i=s.return;return s.tag===3?s.stateNode:null}var Rl={};function OH(s,i,u,h){this.tag=s,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cr(s,i,u,h){return new OH(s,i,u,h)}function ub(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Yo(s,i){var u=s.alternate;return u===null?(u=Cr(s.tag,i,s.key,s.mode),u.elementType=s.elementType,u.type=s.type,u.stateNode=s.stateNode,u.alternate=s,s.alternate=u):(u.pendingProps=i,u.type=s.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=s.flags&65011712,u.childLanes=s.childLanes,u.lanes=s.lanes,u.child=s.child,u.memoizedProps=s.memoizedProps,u.memoizedState=s.memoizedState,u.updateQueue=s.updateQueue,i=s.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=s.sibling,u.index=s.index,u.ref=s.ref,u.refCleanup=s.refCleanup,u}function aT(s,i){s.flags&=65011714;var u=s.alternate;return u===null?(s.childLanes=0,s.lanes=i,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=u.childLanes,s.lanes=u.lanes,s.child=u.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=u.memoizedProps,s.memoizedState=u.memoizedState,s.updateQueue=u.updateQueue,s.type=u.type,i=u.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),s}function Ph(s,i,u,h,y,b){var A=0;if(h=s,typeof s=="function")ub(s)&&(A=1);else if(typeof s=="string")A=Dq(s,u,ce.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case z:return s=Cr(31,u,i,y),s.elementType=z,s.lanes=b,s;case C:return si(u.children,y,b,i);case w:A=8,y|=24;break;case x:return s=Cr(12,u,i,y|2),s.elementType=x,s.lanes=b,s;case D:return s=Cr(13,u,i,y),s.elementType=D,s.lanes=b,s;case P:return s=Cr(19,u,i,y),s.elementType=P,s.lanes=b,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case T:A=10;break e;case I:A=9;break e;case O:A=11;break e;case M:A=14;break e;case L:A=16,h=null;break e}A=29,u=Error(r(130,s===null?"null":typeof s,"")),h=null}return i=Cr(A,u,i,y),i.elementType=s,i.type=h,i.lanes=b,i}function si(s,i,u,h){return s=Cr(7,s,h,i),s.lanes=u,s}function db(s,i,u){return s=Cr(6,s,null,i),s.lanes=u,s}function sT(s){var i=Cr(18,null,null,0);return i.stateNode=s,i}function fb(s,i,u){return i=Cr(4,s.children!==null?s.children:[],s.key,i),i.lanes=u,i.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},i}var iT=new WeakMap;function $r(s,i){if(typeof s=="object"&&s!==null){var u=iT.get(s);return u!==void 0?u:(i={value:s,source:i,stack:Wo(i)},iT.set(s,i),i)}return{value:s,source:i,stack:Wo(i)}}var Ol=[],Ml=0,kh=null,Uu=0,jr=[],Br=0,Ba=null,wo=1,xo="";function Qo(s,i){Ol[Ml++]=Uu,Ol[Ml++]=kh,kh=s,Uu=i}function lT(s,i,u){jr[Br++]=wo,jr[Br++]=xo,jr[Br++]=Ba,Ba=s;var h=wo;s=xo;var y=32-br(h)-1;h&=~(1<<y),u+=1;var b=32-br(i)+y;if(30<b){var A=y-y%5;b=(h&(1<<A)-1).toString(32),h>>=A,y-=A,wo=1<<32-br(i)+y|u<<y|h,xo=b+s}else wo=1<<b|u<<y|h,xo=s}function hb(s){s.return!==null&&(Qo(s,1),lT(s,1,0))}function pb(s){for(;s===kh;)kh=Ol[--Ml],Ol[Ml]=null,Uu=Ol[--Ml],Ol[Ml]=null;for(;s===Ba;)Ba=jr[--Br],jr[Br]=null,xo=jr[--Br],jr[Br]=null,wo=jr[--Br],jr[Br]=null}function cT(s,i){jr[Br++]=wo,jr[Br++]=xo,jr[Br++]=Ba,wo=i.id,xo=i.overflow,Ba=s}var Nn=null,zt=null,at=!1,Ha=null,Hr=!1,mb=Error(r(519));function qa(s){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fu($r(i,s)),mb}function uT(s){var i=s.stateNode,u=s.type,h=s.memoizedProps;switch(i[Mn]=s,i[er]=h,u){case"dialog":tt("cancel",i),tt("close",i);break;case"iframe":case"object":case"embed":tt("load",i);break;case"video":case"audio":for(u=0;u<sd.length;u++)tt(sd[u],i);break;case"source":tt("error",i);break;case"img":case"image":case"link":tt("error",i),tt("load",i);break;case"details":tt("toggle",i);break;case"input":tt("invalid",i),wA(i,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":tt("invalid",i);break;case"textarea":tt("invalid",i),_A(i,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||i.textContent===""+u||h.suppressHydrationWarning===!0||AO(i.textContent,u)?(h.popover!=null&&(tt("beforetoggle",i),tt("toggle",i)),h.onScroll!=null&&tt("scroll",i),h.onScrollEnd!=null&&tt("scrollend",i),h.onClick!=null&&(i.onclick=Ko),i=!0):i=!1,i||qa(s,!0)}function dT(s){for(Nn=s.return;Nn;)switch(Nn.tag){case 5:case 31:case 13:Hr=!1;return;case 27:case 3:Hr=!0;return;default:Nn=Nn.return}}function Nl(s){if(s!==Nn)return!1;if(!at)return dT(s),at=!0,!1;var i=s.tag,u;if((u=i!==3&&i!==27)&&((u=i===5)&&(u=s.type,u=!(u!=="form"&&u!=="button")||P0(s.type,s.memoizedProps)),u=!u),u&&zt&&qa(s),dT(s),i===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));zt=LO(s)}else if(i===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));zt=LO(s)}else i===27?(i=zt,os(s.type)?(s=F0,F0=null,zt=s):zt=i):zt=Nn?Vr(s.stateNode.nextSibling):null;return!0}function ii(){zt=Nn=null,at=!1}function gb(){var s=Ha;return s!==null&&(ar===null?ar=s:ar.push.apply(ar,s),Ha=null),s}function Fu(s){Ha===null?Ha=[s]:Ha.push(s)}var vb=$(null),li=null,Xo=null;function Va(s,i,u){fe(vb,i._currentValue),i._currentValue=u}function Jo(s){s._currentValue=vb.current,te(vb)}function yb(s,i,u){for(;s!==null;){var h=s.alternate;if((s.childLanes&i)!==i?(s.childLanes|=i,h!==null&&(h.childLanes|=i)):h!==null&&(h.childLanes&i)!==i&&(h.childLanes|=i),s===u)break;s=s.return}}function bb(s,i,u,h){var y=s.child;for(y!==null&&(y.return=s);y!==null;){var b=y.dependencies;if(b!==null){var A=y.child;b=b.firstContext;e:for(;b!==null;){var k=b;b=y;for(var H=0;H<i.length;H++)if(k.context===i[H]){b.lanes|=u,k=b.alternate,k!==null&&(k.lanes|=u),yb(b.return,u,s),h||(A=null);break e}b=k.next}}else if(y.tag===18){if(A=y.return,A===null)throw Error(r(341));A.lanes|=u,b=A.alternate,b!==null&&(b.lanes|=u),yb(A,u,s),A=null}else A=y.child;if(A!==null)A.return=y;else for(A=y;A!==null;){if(A===s){A=null;break}if(y=A.sibling,y!==null){y.return=A.return,A=y;break}A=A.return}y=A}}function Pl(s,i,u,h){s=null;for(var y=i,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var A=y.alternate;if(A===null)throw Error(r(387));if(A=A.memoizedProps,A!==null){var k=y.type;Sr(y.pendingProps.value,A.value)||(s!==null?s.push(k):s=[k])}}else if(y===ke.current){if(A=y.alternate,A===null)throw Error(r(387));A.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(s!==null?s.push(dd):s=[dd])}y=y.return}s!==null&&bb(i,s,u,h),i.flags|=262144}function Dh(s){for(s=s.firstContext;s!==null;){if(!Sr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function ci(s){li=s,Xo=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Pn(s){return fT(li,s)}function Lh(s,i){return li===null&&ci(s),fT(s,i)}function fT(s,i){var u=i._currentValue;if(i={context:i,memoizedValue:u,next:null},Xo===null){if(s===null)throw Error(r(308));Xo=i,s.dependencies={lanes:0,firstContext:i},s.flags|=524288}else Xo=Xo.next=i;return u}var MH=typeof AbortController<"u"?AbortController:function(){var s=[],i=this.signal={aborted:!1,addEventListener:function(u,h){s.push(h)}};this.abort=function(){i.aborted=!0,s.forEach(function(u){return u()})}},NH=e.unstable_scheduleCallback,PH=e.unstable_NormalPriority,ln={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sb(){return{controller:new MH,data:new Map,refCount:0}}function zu(s){s.refCount--,s.refCount===0&&NH(PH,function(){s.controller.abort()})}var $u=null,Cb=0,kl=0,Dl=null;function kH(s,i){if($u===null){var u=$u=[];Cb=0,kl=x0(),Dl={status:"pending",value:void 0,then:function(h){u.push(h)}}}return Cb++,i.then(hT,hT),i}function hT(){if(--Cb===0&&$u!==null){Dl!==null&&(Dl.status="fulfilled");var s=$u;$u=null,kl=0,Dl=null;for(var i=0;i<s.length;i++)(0,s[i])()}}function DH(s,i){var u=[],h={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return s.then(function(){h.status="fulfilled",h.value=i;for(var y=0;y<u.length;y++)(0,u[y])(i)},function(y){for(h.status="rejected",h.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),h}var pT=W.S;W.S=function(s,i){QR=Bn(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&kH(s,i),pT!==null&&pT(s,i)};var ui=$(null);function Eb(){var s=ui.current;return s!==null?s:Lt.pooledCache}function Uh(s,i){i===null?fe(ui,ui.current):fe(ui,i.pool)}function mT(){var s=Eb();return s===null?null:{parent:ln._currentValue,pool:s}}var Ll=Error(r(460)),wb=Error(r(474)),Fh=Error(r(542)),zh={then:function(){}};function gT(s){return s=s.status,s==="fulfilled"||s==="rejected"}function vT(s,i,u){switch(u=s[u],u===void 0?s.push(i):u!==i&&(i.then(Ko,Ko),i=u),i.status){case"fulfilled":return i.value;case"rejected":throw s=i.reason,bT(s),s;default:if(typeof i.status=="string")i.then(Ko,Ko);else{if(s=Lt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=i,s.status="pending",s.then(function(h){if(i.status==="pending"){var y=i;y.status="fulfilled",y.value=h}},function(h){if(i.status==="pending"){var y=i;y.status="rejected",y.reason=h}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw s=i.reason,bT(s),s}throw fi=i,Ll}}function di(s){try{var i=s._init;return i(s._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(fi=u,Ll):u}}var fi=null;function yT(){if(fi===null)throw Error(r(459));var s=fi;return fi=null,s}function bT(s){if(s===Ll||s===Fh)throw Error(r(483))}var Ul=null,ju=0;function $h(s){var i=ju;return ju+=1,Ul===null&&(Ul=[]),vT(Ul,s,i)}function Bu(s,i){i=i.props.ref,s.ref=i!==void 0?i:null}function jh(s,i){throw i.$$typeof===g?Error(r(525)):(s=Object.prototype.toString.call(i),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":s)))}function ST(s){function i(K,V){if(s){var Z=K.deletions;Z===null?(K.deletions=[V],K.flags|=16):Z.push(V)}}function u(K,V){if(!s)return null;for(;V!==null;)i(K,V),V=V.sibling;return null}function h(K){for(var V=new Map;K!==null;)K.key!==null?V.set(K.key,K):V.set(K.index,K),K=K.sibling;return V}function y(K,V){return K=Yo(K,V),K.index=0,K.sibling=null,K}function b(K,V,Z){return K.index=Z,s?(Z=K.alternate,Z!==null?(Z=Z.index,Z<V?(K.flags|=67108866,V):Z):(K.flags|=67108866,V)):(K.flags|=1048576,V)}function A(K){return s&&K.alternate===null&&(K.flags|=67108866),K}function k(K,V,Z,oe){return V===null||V.tag!==6?(V=db(Z,K.mode,oe),V.return=K,V):(V=y(V,Z),V.return=K,V)}function H(K,V,Z,oe){var De=Z.type;return De===C?ne(K,V,Z.props.children,oe,Z.key):V!==null&&(V.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&di(De)===V.type)?(V=y(V,Z.props),Bu(V,Z),V.return=K,V):(V=Ph(Z.type,Z.key,Z.props,null,K.mode,oe),Bu(V,Z),V.return=K,V)}function Y(K,V,Z,oe){return V===null||V.tag!==4||V.stateNode.containerInfo!==Z.containerInfo||V.stateNode.implementation!==Z.implementation?(V=fb(Z,K.mode,oe),V.return=K,V):(V=y(V,Z.children||[]),V.return=K,V)}function ne(K,V,Z,oe,De){return V===null||V.tag!==7?(V=si(Z,K.mode,oe,De),V.return=K,V):(V=y(V,Z),V.return=K,V)}function se(K,V,Z){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=db(""+V,K.mode,Z),V.return=K,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case v:return Z=Ph(V.type,V.key,V.props,null,K.mode,Z),Bu(Z,V),Z.return=K,Z;case S:return V=fb(V,K.mode,Z),V.return=K,V;case L:return V=di(V),se(K,V,Z)}if(Se(V)||F(V))return V=si(V,K.mode,Z,null),V.return=K,V;if(typeof V.then=="function")return se(K,$h(V),Z);if(V.$$typeof===T)return se(K,Lh(K,V),Z);jh(K,V)}return null}function Q(K,V,Z,oe){var De=V!==null?V.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return De!==null?null:k(K,V,""+Z,oe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return Z.key===De?H(K,V,Z,oe):null;case S:return Z.key===De?Y(K,V,Z,oe):null;case L:return Z=di(Z),Q(K,V,Z,oe)}if(Se(Z)||F(Z))return De!==null?null:ne(K,V,Z,oe,null);if(typeof Z.then=="function")return Q(K,V,$h(Z),oe);if(Z.$$typeof===T)return Q(K,V,Lh(K,Z),oe);jh(K,Z)}return null}function J(K,V,Z,oe,De){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(Z)||null,k(V,K,""+oe,De);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return K=K.get(oe.key===null?Z:oe.key)||null,H(V,K,oe,De);case S:return K=K.get(oe.key===null?Z:oe.key)||null,Y(V,K,oe,De);case L:return oe=di(oe),J(K,V,Z,oe,De)}if(Se(oe)||F(oe))return K=K.get(Z)||null,ne(V,K,oe,De,null);if(typeof oe.then=="function")return J(K,V,Z,$h(oe),De);if(oe.$$typeof===T)return J(K,V,Z,Lh(V,oe),De);jh(V,oe)}return null}function _e(K,V,Z,oe){for(var De=null,pt=null,Re=V,Ye=V=0,ot=null;Re!==null&&Ye<Z.length;Ye++){Re.index>Ye?(ot=Re,Re=null):ot=Re.sibling;var mt=Q(K,Re,Z[Ye],oe);if(mt===null){Re===null&&(Re=ot);break}s&&Re&&mt.alternate===null&&i(K,Re),V=b(mt,V,Ye),pt===null?De=mt:pt.sibling=mt,pt=mt,Re=ot}if(Ye===Z.length)return u(K,Re),at&&Qo(K,Ye),De;if(Re===null){for(;Ye<Z.length;Ye++)Re=se(K,Z[Ye],oe),Re!==null&&(V=b(Re,V,Ye),pt===null?De=Re:pt.sibling=Re,pt=Re);return at&&Qo(K,Ye),De}for(Re=h(Re);Ye<Z.length;Ye++)ot=J(Re,K,Ye,Z[Ye],oe),ot!==null&&(s&&ot.alternate!==null&&Re.delete(ot.key===null?Ye:ot.key),V=b(ot,V,Ye),pt===null?De=ot:pt.sibling=ot,pt=ot);return s&&Re.forEach(function(cs){return i(K,cs)}),at&&Qo(K,Ye),De}function Le(K,V,Z,oe){if(Z==null)throw Error(r(151));for(var De=null,pt=null,Re=V,Ye=V=0,ot=null,mt=Z.next();Re!==null&&!mt.done;Ye++,mt=Z.next()){Re.index>Ye?(ot=Re,Re=null):ot=Re.sibling;var cs=Q(K,Re,mt.value,oe);if(cs===null){Re===null&&(Re=ot);break}s&&Re&&cs.alternate===null&&i(K,Re),V=b(cs,V,Ye),pt===null?De=cs:pt.sibling=cs,pt=cs,Re=ot}if(mt.done)return u(K,Re),at&&Qo(K,Ye),De;if(Re===null){for(;!mt.done;Ye++,mt=Z.next())mt=se(K,mt.value,oe),mt!==null&&(V=b(mt,V,Ye),pt===null?De=mt:pt.sibling=mt,pt=mt);return at&&Qo(K,Ye),De}for(Re=h(Re);!mt.done;Ye++,mt=Z.next())mt=J(Re,K,Ye,mt.value,oe),mt!==null&&(s&&mt.alternate!==null&&Re.delete(mt.key===null?Ye:mt.key),V=b(mt,V,Ye),pt===null?De=mt:pt.sibling=mt,pt=mt);return s&&Re.forEach(function(Wq){return i(K,Wq)}),at&&Qo(K,Ye),De}function Ot(K,V,Z,oe){if(typeof Z=="object"&&Z!==null&&Z.type===C&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:e:{for(var De=Z.key;V!==null;){if(V.key===De){if(De=Z.type,De===C){if(V.tag===7){u(K,V.sibling),oe=y(V,Z.props.children),oe.return=K,K=oe;break e}}else if(V.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&di(De)===V.type){u(K,V.sibling),oe=y(V,Z.props),Bu(oe,Z),oe.return=K,K=oe;break e}u(K,V);break}else i(K,V);V=V.sibling}Z.type===C?(oe=si(Z.props.children,K.mode,oe,Z.key),oe.return=K,K=oe):(oe=Ph(Z.type,Z.key,Z.props,null,K.mode,oe),Bu(oe,Z),oe.return=K,K=oe)}return A(K);case S:e:{for(De=Z.key;V!==null;){if(V.key===De)if(V.tag===4&&V.stateNode.containerInfo===Z.containerInfo&&V.stateNode.implementation===Z.implementation){u(K,V.sibling),oe=y(V,Z.children||[]),oe.return=K,K=oe;break e}else{u(K,V);break}else i(K,V);V=V.sibling}oe=fb(Z,K.mode,oe),oe.return=K,K=oe}return A(K);case L:return Z=di(Z),Ot(K,V,Z,oe)}if(Se(Z))return _e(K,V,Z,oe);if(F(Z)){if(De=F(Z),typeof De!="function")throw Error(r(150));return Z=De.call(Z),Le(K,V,Z,oe)}if(typeof Z.then=="function")return Ot(K,V,$h(Z),oe);if(Z.$$typeof===T)return Ot(K,V,Lh(K,Z),oe);jh(K,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,V!==null&&V.tag===6?(u(K,V.sibling),oe=y(V,Z),oe.return=K,K=oe):(u(K,V),oe=db(Z,K.mode,oe),oe.return=K,K=oe),A(K)):u(K,V)}return function(K,V,Z,oe){try{ju=0;var De=Ot(K,V,Z,oe);return Ul=null,De}catch(Re){if(Re===Ll||Re===Fh)throw Re;var pt=Cr(29,Re,null,K.mode);return pt.lanes=oe,pt.return=K,pt}}}var hi=ST(!0),CT=ST(!1),Wa=!1;function xb(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _b(s,i){s=s.updateQueue,i.updateQueue===s&&(i.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Ga(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ka(s,i,u){var h=s.updateQueue;if(h===null)return null;if(h=h.shared,(yt&2)!==0){var y=h.pending;return y===null?i.next=i:(i.next=y.next,y.next=i),h.pending=i,i=Nh(s),oT(s,null,u),i}return Mh(s,h,i,u),Nh(s)}function Hu(s,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194048)!==0)){var h=i.lanes;h&=s.pendingLanes,u|=h,i.lanes=u,fA(s,u)}}function Ib(s,i){var u=s.updateQueue,h=s.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var y=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?y=b=A:b=b.next=A,u=u.next}while(u!==null);b===null?y=b=i:b=b.next=i}else y=b=i;u={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:h.shared,callbacks:h.callbacks},s.updateQueue=u;return}s=u.lastBaseUpdate,s===null?u.firstBaseUpdate=i:s.next=i,u.lastBaseUpdate=i}var Ab=!1;function qu(){if(Ab){var s=Dl;if(s!==null)throw s}}function Vu(s,i,u,h){Ab=!1;var y=s.updateQueue;Wa=!1;var b=y.firstBaseUpdate,A=y.lastBaseUpdate,k=y.shared.pending;if(k!==null){y.shared.pending=null;var H=k,Y=H.next;H.next=null,A===null?b=Y:A.next=Y,A=H;var ne=s.alternate;ne!==null&&(ne=ne.updateQueue,k=ne.lastBaseUpdate,k!==A&&(k===null?ne.firstBaseUpdate=Y:k.next=Y,ne.lastBaseUpdate=H))}if(b!==null){var se=y.baseState;A=0,ne=Y=H=null,k=b;do{var Q=k.lane&-536870913,J=Q!==k.lane;if(J?(rt&Q)===Q:(h&Q)===Q){Q!==0&&Q===kl&&(Ab=!0),ne!==null&&(ne=ne.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var _e=s,Le=k;Q=i;var Ot=u;switch(Le.tag){case 1:if(_e=Le.payload,typeof _e=="function"){se=_e.call(Ot,se,Q);break e}se=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Le.payload,Q=typeof _e=="function"?_e.call(Ot,se,Q):_e,Q==null)break e;se=m({},se,Q);break e;case 2:Wa=!0}}Q=k.callback,Q!==null&&(s.flags|=64,J&&(s.flags|=8192),J=y.callbacks,J===null?y.callbacks=[Q]:J.push(Q))}else J={lane:Q,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ne===null?(Y=ne=J,H=se):ne=ne.next=J,A|=Q;if(k=k.next,k===null){if(k=y.shared.pending,k===null)break;J=k,k=J.next,J.next=null,y.lastBaseUpdate=J,y.shared.pending=null}}while(!0);ne===null&&(H=se),y.baseState=H,y.firstBaseUpdate=Y,y.lastBaseUpdate=ne,b===null&&(y.shared.lanes=0),Ja|=A,s.lanes=A,s.memoizedState=se}}function ET(s,i){if(typeof s!="function")throw Error(r(191,s));s.call(i)}function wT(s,i){var u=s.callbacks;if(u!==null)for(s.callbacks=null,s=0;s<u.length;s++)ET(u[s],i)}var Fl=$(null),Bh=$(0);function xT(s,i){s=la,fe(Bh,s),fe(Fl,i),la=s|i.baseLanes}function Tb(){fe(Bh,la),fe(Fl,Fl.current)}function Rb(){la=Bh.current,te(Fl),te(Bh)}var Er=$(null),qr=null;function Za(s){var i=s.alternate;fe(on,on.current&1),fe(Er,s),qr===null&&(i===null||Fl.current!==null||i.memoizedState!==null)&&(qr=s)}function Ob(s){fe(on,on.current),fe(Er,s),qr===null&&(qr=s)}function _T(s){s.tag===22?(fe(on,on.current),fe(Er,s),qr===null&&(qr=s)):Ya()}function Ya(){fe(on,on.current),fe(Er,Er.current)}function wr(s){te(Er),qr===s&&(qr=null),te(on)}var on=$(0);function Hh(s){for(var i=s;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||L0(u)||U0(u)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var ea=0,Ze=null,Tt=null,cn=null,qh=!1,zl=!1,pi=!1,Vh=0,Wu=0,$l=null,LH=0;function nn(){throw Error(r(321))}function Mb(s,i){if(i===null)return!1;for(var u=0;u<i.length&&u<s.length;u++)if(!Sr(s[u],i[u]))return!1;return!0}function Nb(s,i,u,h,y,b){return ea=b,Ze=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,W.H=s===null||s.memoizedState===null?lR:Gb,pi=!1,b=u(h,y),pi=!1,zl&&(b=AT(i,u,h,y)),IT(s),b}function IT(s){W.H=Zu;var i=Tt!==null&&Tt.next!==null;if(ea=0,cn=Tt=Ze=null,qh=!1,Wu=0,$l=null,i)throw Error(r(300));s===null||un||(s=s.dependencies,s!==null&&Dh(s)&&(un=!0))}function AT(s,i,u,h){Ze=s;var y=0;do{if(zl&&($l=null),Wu=0,zl=!1,25<=y)throw Error(r(301));if(y+=1,cn=Tt=null,s.updateQueue!=null){var b=s.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}W.H=cR,b=i(u,h)}while(zl);return b}function UH(){var s=W.H,i=s.useState()[0];return i=typeof i.then=="function"?Gu(i):i,s=s.useState()[0],(Tt!==null?Tt.memoizedState:null)!==s&&(Ze.flags|=1024),i}function Pb(){var s=Vh!==0;return Vh=0,s}function kb(s,i,u){i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~u}function Db(s){if(qh){for(s=s.memoizedState;s!==null;){var i=s.queue;i!==null&&(i.pending=null),s=s.next}qh=!1}ea=0,cn=Tt=Ze=null,zl=!1,Wu=Vh=0,$l=null}function Kn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cn===null?Ze.memoizedState=cn=s:cn=cn.next=s,cn}function an(){if(Tt===null){var s=Ze.alternate;s=s!==null?s.memoizedState:null}else s=Tt.next;var i=cn===null?Ze.memoizedState:cn.next;if(i!==null)cn=i,Tt=s;else{if(s===null)throw Ze.alternate===null?Error(r(467)):Error(r(310));Tt=s,s={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},cn===null?Ze.memoizedState=cn=s:cn=cn.next=s}return cn}function Wh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gu(s){var i=Wu;return Wu+=1,$l===null&&($l=[]),s=vT($l,s,i),i=Ze,(cn===null?i.memoizedState:cn.next)===null&&(i=i.alternate,W.H=i===null||i.memoizedState===null?lR:Gb),s}function Gh(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Gu(s);if(s.$$typeof===T)return Pn(s)}throw Error(r(438,String(s)))}function Lb(s){var i=null,u=Ze.updateQueue;if(u!==null&&(i=u.memoCache),i==null){var h=Ze.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(i={data:h.data.map(function(y){return y.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),u===null&&(u=Wh(),Ze.updateQueue=u),u.memoCache=i,u=i.data[i.index],u===void 0)for(u=i.data[i.index]=Array(s),h=0;h<s;h++)u[h]=G;return i.index++,u}function ta(s,i){return typeof i=="function"?i(s):i}function Kh(s){var i=an();return Ub(i,Tt,s)}function Ub(s,i,u){var h=s.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=u;var y=s.baseQueue,b=h.pending;if(b!==null){if(y!==null){var A=y.next;y.next=b.next,b.next=A}i.baseQueue=y=b,h.pending=null}if(b=s.baseState,y===null)s.memoizedState=b;else{i=y.next;var k=A=null,H=null,Y=i,ne=!1;do{var se=Y.lane&-536870913;if(se!==Y.lane?(rt&se)===se:(ea&se)===se){var Q=Y.revertLane;if(Q===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),se===kl&&(ne=!0);else if((ea&Q)===Q){Y=Y.next,Q===kl&&(ne=!0);continue}else se={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},H===null?(k=H=se,A=b):H=H.next=se,Ze.lanes|=Q,Ja|=Q;se=Y.action,pi&&u(b,se),b=Y.hasEagerState?Y.eagerState:u(b,se)}else Q={lane:se,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},H===null?(k=H=Q,A=b):H=H.next=Q,Ze.lanes|=se,Ja|=se;Y=Y.next}while(Y!==null&&Y!==i);if(H===null?A=b:H.next=k,!Sr(b,s.memoizedState)&&(un=!0,ne&&(u=Dl,u!==null)))throw u;s.memoizedState=b,s.baseState=A,s.baseQueue=H,h.lastRenderedState=b}return y===null&&(h.lanes=0),[s.memoizedState,h.dispatch]}function Fb(s){var i=an(),u=i.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=s;var h=u.dispatch,y=u.pending,b=i.memoizedState;if(y!==null){u.pending=null;var A=y=y.next;do b=s(b,A.action),A=A.next;while(A!==y);Sr(b,i.memoizedState)||(un=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),u.lastRenderedState=b}return[b,h]}function TT(s,i,u){var h=Ze,y=an(),b=at;if(b){if(u===void 0)throw Error(r(407));u=u()}else u=i();var A=!Sr((Tt||y).memoizedState,u);if(A&&(y.memoizedState=u,un=!0),y=y.queue,jb(MT.bind(null,h,y,s),[s]),y.getSnapshot!==i||A||cn!==null&&cn.memoizedState.tag&1){if(h.flags|=2048,jl(9,{destroy:void 0},OT.bind(null,h,y,u,i),null),Lt===null)throw Error(r(349));b||(ea&127)!==0||RT(h,i,u)}return u}function RT(s,i,u){s.flags|=16384,s={getSnapshot:i,value:u},i=Ze.updateQueue,i===null?(i=Wh(),Ze.updateQueue=i,i.stores=[s]):(u=i.stores,u===null?i.stores=[s]:u.push(s))}function OT(s,i,u,h){i.value=u,i.getSnapshot=h,NT(i)&&PT(s)}function MT(s,i,u){return u(function(){NT(i)&&PT(s)})}function NT(s){var i=s.getSnapshot;s=s.value;try{var u=i();return!Sr(s,u)}catch{return!0}}function PT(s){var i=ai(s,2);i!==null&&sr(i,s,2)}function zb(s){var i=Kn();if(typeof s=="function"){var u=s;if(s=u(),pi){za(!0);try{u()}finally{za(!1)}}}return i.memoizedState=i.baseState=s,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:s},i}function kT(s,i,u,h){return s.baseState=u,Ub(s,Tt,typeof h=="function"?h:ta)}function FH(s,i,u,h,y){if(Qh(s))throw Error(r(485));if(s=i.action,s!==null){var b={payload:y,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){b.listeners.push(A)}};W.T!==null?u(!0):b.isTransition=!1,h(b),u=i.pending,u===null?(b.next=i.pending=b,DT(i,b)):(b.next=u.next,i.pending=u.next=b)}}function DT(s,i){var u=i.action,h=i.payload,y=s.state;if(i.isTransition){var b=W.T,A={};W.T=A;try{var k=u(y,h),H=W.S;H!==null&&H(A,k),LT(s,i,k)}catch(Y){$b(s,i,Y)}finally{b!==null&&A.types!==null&&(b.types=A.types),W.T=b}}else try{b=u(y,h),LT(s,i,b)}catch(Y){$b(s,i,Y)}}function LT(s,i,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){UT(s,i,h)},function(h){return $b(s,i,h)}):UT(s,i,u)}function UT(s,i,u){i.status="fulfilled",i.value=u,FT(i),s.state=u,i=s.pending,i!==null&&(u=i.next,u===i?s.pending=null:(u=u.next,i.next=u,DT(s,u)))}function $b(s,i,u){var h=s.pending;if(s.pending=null,h!==null){h=h.next;do i.status="rejected",i.reason=u,FT(i),i=i.next;while(i!==h)}s.action=null}function FT(s){s=s.listeners;for(var i=0;i<s.length;i++)(0,s[i])()}function zT(s,i){return i}function $T(s,i){if(at){var u=Lt.formState;if(u!==null){e:{var h=Ze;if(at){if(zt){t:{for(var y=zt,b=Hr;y.nodeType!==8;){if(!b){y=null;break t}if(y=Vr(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){zt=Vr(y.nextSibling),h=y.data==="F!";break e}}qa(h)}h=!1}h&&(i=u[0])}}return u=Kn(),u.memoizedState=u.baseState=i,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zT,lastRenderedState:i},u.queue=h,u=aR.bind(null,Ze,h),h.dispatch=u,h=zb(!1),b=Wb.bind(null,Ze,!1,h.queue),h=Kn(),y={state:i,dispatch:null,action:s,pending:null},h.queue=y,u=FH.bind(null,Ze,y,b,u),y.dispatch=u,h.memoizedState=s,[i,u,!1]}function jT(s){var i=an();return BT(i,Tt,s)}function BT(s,i,u){if(i=Ub(s,i,zT)[0],s=Kh(ta)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var h=Gu(i)}catch(A){throw A===Ll?Fh:A}else h=i;i=an();var y=i.queue,b=y.dispatch;return u!==i.memoizedState&&(Ze.flags|=2048,jl(9,{destroy:void 0},zH.bind(null,y,u),null)),[h,b,s]}function zH(s,i){s.action=i}function HT(s){var i=an(),u=Tt;if(u!==null)return BT(i,u,s);an(),i=i.memoizedState,u=an();var h=u.queue.dispatch;return u.memoizedState=s,[i,h,!1]}function jl(s,i,u,h){return s={tag:s,create:u,deps:h,inst:i,next:null},i=Ze.updateQueue,i===null&&(i=Wh(),Ze.updateQueue=i),u=i.lastEffect,u===null?i.lastEffect=s.next=s:(h=u.next,u.next=s,s.next=h,i.lastEffect=s),s}function qT(){return an().memoizedState}function Zh(s,i,u,h){var y=Kn();Ze.flags|=s,y.memoizedState=jl(1|i,{destroy:void 0},u,h===void 0?null:h)}function Yh(s,i,u,h){var y=an();h=h===void 0?null:h;var b=y.memoizedState.inst;Tt!==null&&h!==null&&Mb(h,Tt.memoizedState.deps)?y.memoizedState=jl(i,b,u,h):(Ze.flags|=s,y.memoizedState=jl(1|i,b,u,h))}function VT(s,i){Zh(8390656,8,s,i)}function jb(s,i){Yh(2048,8,s,i)}function $H(s){Ze.flags|=4;var i=Ze.updateQueue;if(i===null)i=Wh(),Ze.updateQueue=i,i.events=[s];else{var u=i.events;u===null?i.events=[s]:u.push(s)}}function WT(s){var i=an().memoizedState;return $H({ref:i,nextImpl:s}),function(){if((yt&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function GT(s,i){return Yh(4,2,s,i)}function KT(s,i){return Yh(4,4,s,i)}function ZT(s,i){if(typeof i=="function"){s=s();var u=i(s);return function(){typeof u=="function"?u():i(null)}}if(i!=null)return s=s(),i.current=s,function(){i.current=null}}function YT(s,i,u){u=u!=null?u.concat([s]):null,Yh(4,4,ZT.bind(null,i,s),u)}function Bb(){}function QT(s,i){var u=an();i=i===void 0?null:i;var h=u.memoizedState;return i!==null&&Mb(i,h[1])?h[0]:(u.memoizedState=[s,i],s)}function XT(s,i){var u=an();i=i===void 0?null:i;var h=u.memoizedState;if(i!==null&&Mb(i,h[1]))return h[0];if(h=s(),pi){za(!0);try{s()}finally{za(!1)}}return u.memoizedState=[h,i],h}function Hb(s,i,u){return u===void 0||(ea&1073741824)!==0&&(rt&261930)===0?s.memoizedState=i:(s.memoizedState=u,s=JR(),Ze.lanes|=s,Ja|=s,u)}function JT(s,i,u,h){return Sr(u,i)?u:Fl.current!==null?(s=Hb(s,u,h),Sr(s,i)||(un=!0),s):(ea&42)===0||(ea&1073741824)!==0&&(rt&261930)===0?(un=!0,s.memoizedState=u):(s=JR(),Ze.lanes|=s,Ja|=s,i)}function eR(s,i,u,h,y){var b=ee.p;ee.p=b!==0&&8>b?b:8;var A=W.T,k={};W.T=k,Wb(s,!1,i,u);try{var H=y(),Y=W.S;if(Y!==null&&Y(k,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var ne=DH(H,h);Ku(s,i,ne,Ir(s))}else Ku(s,i,h,Ir(s))}catch(se){Ku(s,i,{then:function(){},status:"rejected",reason:se},Ir())}finally{ee.p=b,A!==null&&k.types!==null&&(A.types=k.types),W.T=A}}function jH(){}function qb(s,i,u,h){if(s.tag!==5)throw Error(r(476));var y=tR(s).queue;eR(s,y,i,me,u===null?jH:function(){return nR(s),u(h)})}function tR(s){var i=s.memoizedState;if(i!==null)return i;i={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:me},next:null};var u={};return i.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:u},next:null},s.memoizedState=i,s=s.alternate,s!==null&&(s.memoizedState=i),i}function nR(s){var i=tR(s);i.next===null&&(i=s.alternate.memoizedState),Ku(s,i.next.queue,{},Ir())}function Vb(){return Pn(dd)}function rR(){return an().memoizedState}function oR(){return an().memoizedState}function BH(s){for(var i=s.return;i!==null;){switch(i.tag){case 24:case 3:var u=Ir();s=Ga(u);var h=Ka(i,s,u);h!==null&&(sr(h,i,u),Hu(h,i,u)),i={cache:Sb()},s.payload=i;return}i=i.return}}function HH(s,i,u){var h=Ir();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Qh(s)?sR(i,u):(u=cb(s,i,u,h),u!==null&&(sr(u,s,h),iR(u,i,h)))}function aR(s,i,u){var h=Ir();Ku(s,i,u,h)}function Ku(s,i,u,h){var y={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Qh(s))sR(i,y);else{var b=s.alternate;if(s.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var A=i.lastRenderedState,k=b(A,u);if(y.hasEagerState=!0,y.eagerState=k,Sr(k,A))return Mh(s,i,y,0),Lt===null&&Oh(),!1}catch{}if(u=cb(s,i,y,h),u!==null)return sr(u,s,h),iR(u,i,h),!0}return!1}function Wb(s,i,u,h){if(h={lane:2,revertLane:x0(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Qh(s)){if(i)throw Error(r(479))}else i=cb(s,u,h,2),i!==null&&sr(i,s,2)}function Qh(s){var i=s.alternate;return s===Ze||i!==null&&i===Ze}function sR(s,i){zl=qh=!0;var u=s.pending;u===null?i.next=i:(i.next=u.next,u.next=i),s.pending=i}function iR(s,i,u){if((u&4194048)!==0){var h=i.lanes;h&=s.pendingLanes,u|=h,i.lanes=u,fA(s,u)}}var Zu={readContext:Pn,use:Gh,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useLayoutEffect:nn,useInsertionEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useSyncExternalStore:nn,useId:nn,useHostTransitionStatus:nn,useFormState:nn,useActionState:nn,useOptimistic:nn,useMemoCache:nn,useCacheRefresh:nn};Zu.useEffectEvent=nn;var lR={readContext:Pn,use:Gh,useCallback:function(s,i){return Kn().memoizedState=[s,i===void 0?null:i],s},useContext:Pn,useEffect:VT,useImperativeHandle:function(s,i,u){u=u!=null?u.concat([s]):null,Zh(4194308,4,ZT.bind(null,i,s),u)},useLayoutEffect:function(s,i){return Zh(4194308,4,s,i)},useInsertionEffect:function(s,i){Zh(4,2,s,i)},useMemo:function(s,i){var u=Kn();i=i===void 0?null:i;var h=s();if(pi){za(!0);try{s()}finally{za(!1)}}return u.memoizedState=[h,i],h},useReducer:function(s,i,u){var h=Kn();if(u!==void 0){var y=u(i);if(pi){za(!0);try{u(i)}finally{za(!1)}}}else y=i;return h.memoizedState=h.baseState=y,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:y},h.queue=s,s=s.dispatch=HH.bind(null,Ze,s),[h.memoizedState,s]},useRef:function(s){var i=Kn();return s={current:s},i.memoizedState=s},useState:function(s){s=zb(s);var i=s.queue,u=aR.bind(null,Ze,i);return i.dispatch=u,[s.memoizedState,u]},useDebugValue:Bb,useDeferredValue:function(s,i){var u=Kn();return Hb(u,s,i)},useTransition:function(){var s=zb(!1);return s=eR.bind(null,Ze,s.queue,!0,!1),Kn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,i,u){var h=Ze,y=Kn();if(at){if(u===void 0)throw Error(r(407));u=u()}else{if(u=i(),Lt===null)throw Error(r(349));(rt&127)!==0||RT(h,i,u)}y.memoizedState=u;var b={value:u,getSnapshot:i};return y.queue=b,VT(MT.bind(null,h,b,s),[s]),h.flags|=2048,jl(9,{destroy:void 0},OT.bind(null,h,b,u,i),null),u},useId:function(){var s=Kn(),i=Lt.identifierPrefix;if(at){var u=xo,h=wo;u=(h&~(1<<32-br(h)-1)).toString(32)+u,i="_"+i+"R_"+u,u=Vh++,0<u&&(i+="H"+u.toString(32)),i+="_"}else u=LH++,i="_"+i+"r_"+u.toString(32)+"_";return s.memoizedState=i},useHostTransitionStatus:Vb,useFormState:$T,useActionState:$T,useOptimistic:function(s){var i=Kn();i.memoizedState=i.baseState=s;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=u,i=Wb.bind(null,Ze,!0,u),u.dispatch=i,[s,i]},useMemoCache:Lb,useCacheRefresh:function(){return Kn().memoizedState=BH.bind(null,Ze)},useEffectEvent:function(s){var i=Kn(),u={impl:s};return i.memoizedState=u,function(){if((yt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Gb={readContext:Pn,use:Gh,useCallback:QT,useContext:Pn,useEffect:jb,useImperativeHandle:YT,useInsertionEffect:GT,useLayoutEffect:KT,useMemo:XT,useReducer:Kh,useRef:qT,useState:function(){return Kh(ta)},useDebugValue:Bb,useDeferredValue:function(s,i){var u=an();return JT(u,Tt.memoizedState,s,i)},useTransition:function(){var s=Kh(ta)[0],i=an().memoizedState;return[typeof s=="boolean"?s:Gu(s),i]},useSyncExternalStore:TT,useId:rR,useHostTransitionStatus:Vb,useFormState:jT,useActionState:jT,useOptimistic:function(s,i){var u=an();return kT(u,Tt,s,i)},useMemoCache:Lb,useCacheRefresh:oR};Gb.useEffectEvent=WT;var cR={readContext:Pn,use:Gh,useCallback:QT,useContext:Pn,useEffect:jb,useImperativeHandle:YT,useInsertionEffect:GT,useLayoutEffect:KT,useMemo:XT,useReducer:Fb,useRef:qT,useState:function(){return Fb(ta)},useDebugValue:Bb,useDeferredValue:function(s,i){var u=an();return Tt===null?Hb(u,s,i):JT(u,Tt.memoizedState,s,i)},useTransition:function(){var s=Fb(ta)[0],i=an().memoizedState;return[typeof s=="boolean"?s:Gu(s),i]},useSyncExternalStore:TT,useId:rR,useHostTransitionStatus:Vb,useFormState:HT,useActionState:HT,useOptimistic:function(s,i){var u=an();return Tt!==null?kT(u,Tt,s,i):(u.baseState=s,[s,u.queue.dispatch])},useMemoCache:Lb,useCacheRefresh:oR};cR.useEffectEvent=WT;function Kb(s,i,u,h){i=s.memoizedState,u=u(h,i),u=u==null?i:m({},i,u),s.memoizedState=u,s.lanes===0&&(s.updateQueue.baseState=u)}var Zb={enqueueSetState:function(s,i,u){s=s._reactInternals;var h=Ir(),y=Ga(h);y.payload=i,u!=null&&(y.callback=u),i=Ka(s,y,h),i!==null&&(sr(i,s,h),Hu(i,s,h))},enqueueReplaceState:function(s,i,u){s=s._reactInternals;var h=Ir(),y=Ga(h);y.tag=1,y.payload=i,u!=null&&(y.callback=u),i=Ka(s,y,h),i!==null&&(sr(i,s,h),Hu(i,s,h))},enqueueForceUpdate:function(s,i){s=s._reactInternals;var u=Ir(),h=Ga(u);h.tag=2,i!=null&&(h.callback=i),i=Ka(s,h,u),i!==null&&(sr(i,s,u),Hu(i,s,u))}};function uR(s,i,u,h,y,b,A){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(h,b,A):i.prototype&&i.prototype.isPureReactComponent?!Du(u,h)||!Du(y,b):!0}function dR(s,i,u,h){s=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,h),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,h),i.state!==s&&Zb.enqueueReplaceState(i,i.state,null)}function mi(s,i){var u=i;if("ref"in i){u={};for(var h in i)h!=="ref"&&(u[h]=i[h])}if(s=s.defaultProps){u===i&&(u=m({},u));for(var y in s)u[y]===void 0&&(u[y]=s[y])}return u}function fR(s){Rh(s)}function hR(s){console.error(s)}function pR(s){Rh(s)}function Xh(s,i){try{var u=s.onUncaughtError;u(i.value,{componentStack:i.stack})}catch(h){setTimeout(function(){throw h})}}function mR(s,i,u){try{var h=s.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Yb(s,i,u){return u=Ga(u),u.tag=3,u.payload={element:null},u.callback=function(){Xh(s,i)},u}function gR(s){return s=Ga(s),s.tag=3,s}function vR(s,i,u,h){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var b=h.value;s.payload=function(){return y(b)},s.callback=function(){mR(i,u,h)}}var A=u.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(s.callback=function(){mR(i,u,h),typeof y!="function"&&(es===null?es=new Set([this]):es.add(this));var k=h.stack;this.componentDidCatch(h.value,{componentStack:k!==null?k:""})})}function qH(s,i,u,h,y){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(i=u.alternate,i!==null&&Pl(i,u,y,!0),u=Er.current,u!==null){switch(u.tag){case 31:case 13:return qr===null?up():u.alternate===null&&rn===0&&(rn=3),u.flags&=-257,u.flags|=65536,u.lanes=y,h===zh?u.flags|=16384:(i=u.updateQueue,i===null?u.updateQueue=new Set([h]):i.add(h),C0(s,h,y)),!1;case 22:return u.flags|=65536,h===zh?u.flags|=16384:(i=u.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=i):(u=i.retryQueue,u===null?i.retryQueue=new Set([h]):u.add(h)),C0(s,h,y)),!1}throw Error(r(435,u.tag))}return C0(s,h,y),up(),!1}if(at)return i=Er.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=y,h!==mb&&(s=Error(r(422),{cause:h}),Fu($r(s,u)))):(h!==mb&&(i=Error(r(423),{cause:h}),Fu($r(i,u))),s=s.current.alternate,s.flags|=65536,y&=-y,s.lanes|=y,h=$r(h,u),y=Yb(s.stateNode,h,y),Ib(s,y),rn!==4&&(rn=2)),!1;var b=Error(r(520),{cause:h});if(b=$r(b,u),rd===null?rd=[b]:rd.push(b),rn!==4&&(rn=2),i===null)return!0;h=$r(h,u),u=i;do{switch(u.tag){case 3:return u.flags|=65536,s=y&-y,u.lanes|=s,s=Yb(u.stateNode,h,s),Ib(u,s),!1;case 1:if(i=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(es===null||!es.has(b))))return u.flags|=65536,y&=-y,u.lanes|=y,y=gR(y),vR(y,s,u,h),Ib(u,y),!1}u=u.return}while(u!==null);return!1}var Qb=Error(r(461)),un=!1;function kn(s,i,u,h){i.child=s===null?CT(i,null,u,h):hi(i,s.child,u,h)}function yR(s,i,u,h,y){u=u.render;var b=i.ref;if("ref"in h){var A={};for(var k in h)k!=="ref"&&(A[k]=h[k])}else A=h;return ci(i),h=Nb(s,i,u,A,b,y),k=Pb(),s!==null&&!un?(kb(s,i,y),na(s,i,y)):(at&&k&&hb(i),i.flags|=1,kn(s,i,h,y),i.child)}function bR(s,i,u,h,y){if(s===null){var b=u.type;return typeof b=="function"&&!ub(b)&&b.defaultProps===void 0&&u.compare===null?(i.tag=15,i.type=b,SR(s,i,b,h,y)):(s=Ph(u.type,null,h,i,i.mode,y),s.ref=i.ref,s.return=i,i.child=s)}if(b=s.child,!a0(s,y)){var A=b.memoizedProps;if(u=u.compare,u=u!==null?u:Du,u(A,h)&&s.ref===i.ref)return na(s,i,y)}return i.flags|=1,s=Yo(b,h),s.ref=i.ref,s.return=i,i.child=s}function SR(s,i,u,h,y){if(s!==null){var b=s.memoizedProps;if(Du(b,h)&&s.ref===i.ref)if(un=!1,i.pendingProps=h=b,a0(s,y))(s.flags&131072)!==0&&(un=!0);else return i.lanes=s.lanes,na(s,i,y)}return Xb(s,i,u,h,y)}function CR(s,i,u,h){var y=h.children,b=s!==null?s.memoizedState:null;if(s===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,s!==null){for(h=i.child=s.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;h=y&~b}else h=0,i.child=null;return ER(s,i,b,u,h)}if((u&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},s!==null&&Uh(i,b!==null?b.cachePool:null),b!==null?xT(i,b):Tb(),_T(i);else return h=i.lanes=536870912,ER(s,i,b!==null?b.baseLanes|u:u,u,h)}else b!==null?(Uh(i,b.cachePool),xT(i,b),Ya(),i.memoizedState=null):(s!==null&&Uh(i,null),Tb(),Ya());return kn(s,i,y,u),i.child}function Yu(s,i){return s!==null&&s.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function ER(s,i,u,h,y){var b=Eb();return b=b===null?null:{parent:ln._currentValue,pool:b},i.memoizedState={baseLanes:u,cachePool:b},s!==null&&Uh(i,null),Tb(),_T(i),s!==null&&Pl(s,i,h,!0),i.childLanes=y,null}function Jh(s,i){return i=tp({mode:i.mode,children:i.children},s.mode),i.ref=s.ref,s.child=i,i.return=s,i}function wR(s,i,u){return hi(i,s.child,null,u),s=Jh(i,i.pendingProps),s.flags|=2,wr(i),i.memoizedState=null,s}function VH(s,i,u){var h=i.pendingProps,y=(i.flags&128)!==0;if(i.flags&=-129,s===null){if(at){if(h.mode==="hidden")return s=Jh(i,h),i.lanes=536870912,Yu(null,s);if(Ob(i),(s=zt)?(s=DO(s,Hr),s=s!==null&&s.data==="&"?s:null,s!==null&&(i.memoizedState={dehydrated:s,treeContext:Ba!==null?{id:wo,overflow:xo}:null,retryLane:536870912,hydrationErrors:null},u=sT(s),u.return=i,i.child=u,Nn=i,zt=null)):s=null,s===null)throw qa(i);return i.lanes=536870912,null}return Jh(i,h)}var b=s.memoizedState;if(b!==null){var A=b.dehydrated;if(Ob(i),y)if(i.flags&256)i.flags&=-257,i=wR(s,i,u);else if(i.memoizedState!==null)i.child=s.child,i.flags|=128,i=null;else throw Error(r(558));else if(un||Pl(s,i,u,!1),y=(u&s.childLanes)!==0,un||y){if(h=Lt,h!==null&&(A=hA(h,u),A!==0&&A!==b.retryLane))throw b.retryLane=A,ai(s,A),sr(h,s,A),Qb;up(),i=wR(s,i,u)}else s=b.treeContext,zt=Vr(A.nextSibling),Nn=i,at=!0,Ha=null,Hr=!1,s!==null&&cT(i,s),i=Jh(i,h),i.flags|=4096;return i}return s=Yo(s.child,{mode:h.mode,children:h.children}),s.ref=i.ref,i.child=s,s.return=i,s}function ep(s,i){var u=i.ref;if(u===null)s!==null&&s.ref!==null&&(i.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(s===null||s.ref!==u)&&(i.flags|=4194816)}}function Xb(s,i,u,h,y){return ci(i),u=Nb(s,i,u,h,void 0,y),h=Pb(),s!==null&&!un?(kb(s,i,y),na(s,i,y)):(at&&h&&hb(i),i.flags|=1,kn(s,i,u,y),i.child)}function xR(s,i,u,h,y,b){return ci(i),i.updateQueue=null,u=AT(i,h,u,y),IT(s),h=Pb(),s!==null&&!un?(kb(s,i,b),na(s,i,b)):(at&&h&&hb(i),i.flags|=1,kn(s,i,u,b),i.child)}function _R(s,i,u,h,y){if(ci(i),i.stateNode===null){var b=Rl,A=u.contextType;typeof A=="object"&&A!==null&&(b=Pn(A)),b=new u(h,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Zb,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=h,b.state=i.memoizedState,b.refs={},xb(i),A=u.contextType,b.context=typeof A=="object"&&A!==null?Pn(A):Rl,b.state=i.memoizedState,A=u.getDerivedStateFromProps,typeof A=="function"&&(Kb(i,u,A,h),b.state=i.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(A=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),A!==b.state&&Zb.enqueueReplaceState(b,b.state,null),Vu(i,h,b,y),qu(),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308),h=!0}else if(s===null){b=i.stateNode;var k=i.memoizedProps,H=mi(u,k);b.props=H;var Y=b.context,ne=u.contextType;A=Rl,typeof ne=="object"&&ne!==null&&(A=Pn(ne));var se=u.getDerivedStateFromProps;ne=typeof se=="function"||typeof b.getSnapshotBeforeUpdate=="function",k=i.pendingProps!==k,ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(k||Y!==A)&&dR(i,b,h,A),Wa=!1;var Q=i.memoizedState;b.state=Q,Vu(i,h,b,y),qu(),Y=i.memoizedState,k||Q!==Y||Wa?(typeof se=="function"&&(Kb(i,u,se,h),Y=i.memoizedState),(H=Wa||uR(i,u,H,h,Q,Y,A))?(ne||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=h,i.memoizedState=Y),b.props=h,b.state=Y,b.context=A,h=H):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),h=!1)}else{b=i.stateNode,_b(s,i),A=i.memoizedProps,ne=mi(u,A),b.props=ne,se=i.pendingProps,Q=b.context,Y=u.contextType,H=Rl,typeof Y=="object"&&Y!==null&&(H=Pn(Y)),k=u.getDerivedStateFromProps,(Y=typeof k=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(A!==se||Q!==H)&&dR(i,b,h,H),Wa=!1,Q=i.memoizedState,b.state=Q,Vu(i,h,b,y),qu();var J=i.memoizedState;A!==se||Q!==J||Wa||s!==null&&s.dependencies!==null&&Dh(s.dependencies)?(typeof k=="function"&&(Kb(i,u,k,h),J=i.memoizedState),(ne=Wa||uR(i,u,ne,h,Q,J,H)||s!==null&&s.dependencies!==null&&Dh(s.dependencies))?(Y||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,J,H),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,J,H)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||A===s.memoizedProps&&Q===s.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&Q===s.memoizedState||(i.flags|=1024),i.memoizedProps=h,i.memoizedState=J),b.props=h,b.state=J,b.context=H,h=ne):(typeof b.componentDidUpdate!="function"||A===s.memoizedProps&&Q===s.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&Q===s.memoizedState||(i.flags|=1024),h=!1)}return b=h,ep(s,i),h=(i.flags&128)!==0,b||h?(b=i.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:b.render(),i.flags|=1,s!==null&&h?(i.child=hi(i,s.child,null,y),i.child=hi(i,null,u,y)):kn(s,i,u,y),i.memoizedState=b.state,s=i.child):s=na(s,i,y),s}function IR(s,i,u,h){return ii(),i.flags|=256,kn(s,i,u,h),i.child}var Jb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function e0(s){return{baseLanes:s,cachePool:mT()}}function t0(s,i,u){return s=s!==null?s.childLanes&~u:0,i&&(s|=_r),s}function AR(s,i,u){var h=i.pendingProps,y=!1,b=(i.flags&128)!==0,A;if((A=b)||(A=s!==null&&s.memoizedState===null?!1:(on.current&2)!==0),A&&(y=!0,i.flags&=-129),A=(i.flags&32)!==0,i.flags&=-33,s===null){if(at){if(y?Za(i):Ya(),(s=zt)?(s=DO(s,Hr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(i.memoizedState={dehydrated:s,treeContext:Ba!==null?{id:wo,overflow:xo}:null,retryLane:536870912,hydrationErrors:null},u=sT(s),u.return=i,i.child=u,Nn=i,zt=null)):s=null,s===null)throw qa(i);return U0(s)?i.lanes=32:i.lanes=536870912,null}var k=h.children;return h=h.fallback,y?(Ya(),y=i.mode,k=tp({mode:"hidden",children:k},y),h=si(h,y,u,null),k.return=i,h.return=i,k.sibling=h,i.child=k,h=i.child,h.memoizedState=e0(u),h.childLanes=t0(s,A,u),i.memoizedState=Jb,Yu(null,h)):(Za(i),n0(i,k))}var H=s.memoizedState;if(H!==null&&(k=H.dehydrated,k!==null)){if(b)i.flags&256?(Za(i),i.flags&=-257,i=r0(s,i,u)):i.memoizedState!==null?(Ya(),i.child=s.child,i.flags|=128,i=null):(Ya(),k=h.fallback,y=i.mode,h=tp({mode:"visible",children:h.children},y),k=si(k,y,u,null),k.flags|=2,h.return=i,k.return=i,h.sibling=k,i.child=h,hi(i,s.child,null,u),h=i.child,h.memoizedState=e0(u),h.childLanes=t0(s,A,u),i.memoizedState=Jb,i=Yu(null,h));else if(Za(i),U0(k)){if(A=k.nextSibling&&k.nextSibling.dataset,A)var Y=A.dgst;A=Y,h=Error(r(419)),h.stack="",h.digest=A,Fu({value:h,source:null,stack:null}),i=r0(s,i,u)}else if(un||Pl(s,i,u,!1),A=(u&s.childLanes)!==0,un||A){if(A=Lt,A!==null&&(h=hA(A,u),h!==0&&h!==H.retryLane))throw H.retryLane=h,ai(s,h),sr(A,s,h),Qb;L0(k)||up(),i=r0(s,i,u)}else L0(k)?(i.flags|=192,i.child=s.child,i=null):(s=H.treeContext,zt=Vr(k.nextSibling),Nn=i,at=!0,Ha=null,Hr=!1,s!==null&&cT(i,s),i=n0(i,h.children),i.flags|=4096);return i}return y?(Ya(),k=h.fallback,y=i.mode,H=s.child,Y=H.sibling,h=Yo(H,{mode:"hidden",children:h.children}),h.subtreeFlags=H.subtreeFlags&65011712,Y!==null?k=Yo(Y,k):(k=si(k,y,u,null),k.flags|=2),k.return=i,h.return=i,h.sibling=k,i.child=h,Yu(null,h),h=i.child,k=s.child.memoizedState,k===null?k=e0(u):(y=k.cachePool,y!==null?(H=ln._currentValue,y=y.parent!==H?{parent:H,pool:H}:y):y=mT(),k={baseLanes:k.baseLanes|u,cachePool:y}),h.memoizedState=k,h.childLanes=t0(s,A,u),i.memoizedState=Jb,Yu(s.child,h)):(Za(i),u=s.child,s=u.sibling,u=Yo(u,{mode:"visible",children:h.children}),u.return=i,u.sibling=null,s!==null&&(A=i.deletions,A===null?(i.deletions=[s],i.flags|=16):A.push(s)),i.child=u,i.memoizedState=null,u)}function n0(s,i){return i=tp({mode:"visible",children:i},s.mode),i.return=s,s.child=i}function tp(s,i){return s=Cr(22,s,null,i),s.lanes=0,s}function r0(s,i,u){return hi(i,s.child,null,u),s=n0(i,i.pendingProps.children),s.flags|=2,i.memoizedState=null,s}function TR(s,i,u){s.lanes|=i;var h=s.alternate;h!==null&&(h.lanes|=i),yb(s.return,i,u)}function o0(s,i,u,h,y,b){var A=s.memoizedState;A===null?s.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:y,treeForkCount:b}:(A.isBackwards=i,A.rendering=null,A.renderingStartTime=0,A.last=h,A.tail=u,A.tailMode=y,A.treeForkCount=b)}function RR(s,i,u){var h=i.pendingProps,y=h.revealOrder,b=h.tail;h=h.children;var A=on.current,k=(A&2)!==0;if(k?(A=A&1|2,i.flags|=128):A&=1,fe(on,A),kn(s,i,h,u),h=at?Uu:0,!k&&s!==null&&(s.flags&128)!==0)e:for(s=i.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&TR(s,u,i);else if(s.tag===19)TR(s,u,i);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break e;for(;s.sibling===null;){if(s.return===null||s.return===i)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(y){case"forwards":for(u=i.child,y=null;u!==null;)s=u.alternate,s!==null&&Hh(s)===null&&(y=u),u=u.sibling;u=y,u===null?(y=i.child,i.child=null):(y=u.sibling,u.sibling=null),o0(i,!1,y,u,b,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=i.child,i.child=null;y!==null;){if(s=y.alternate,s!==null&&Hh(s)===null){i.child=y;break}s=y.sibling,y.sibling=u,u=y,y=s}o0(i,!0,u,null,b,h);break;case"together":o0(i,!1,null,null,void 0,h);break;default:i.memoizedState=null}return i.child}function na(s,i,u){if(s!==null&&(i.dependencies=s.dependencies),Ja|=i.lanes,(u&i.childLanes)===0)if(s!==null){if(Pl(s,i,u,!1),(u&i.childLanes)===0)return null}else return null;if(s!==null&&i.child!==s.child)throw Error(r(153));if(i.child!==null){for(s=i.child,u=Yo(s,s.pendingProps),i.child=u,u.return=i;s.sibling!==null;)s=s.sibling,u=u.sibling=Yo(s,s.pendingProps),u.return=i;u.sibling=null}return i.child}function a0(s,i){return(s.lanes&i)!==0?!0:(s=s.dependencies,!!(s!==null&&Dh(s)))}function WH(s,i,u){switch(i.tag){case 3:ae(i,i.stateNode.containerInfo),Va(i,ln,s.memoizedState.cache),ii();break;case 27:case 5:Je(i);break;case 4:ae(i,i.stateNode.containerInfo);break;case 10:Va(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Ob(i),null;break;case 13:var h=i.memoizedState;if(h!==null)return h.dehydrated!==null?(Za(i),i.flags|=128,null):(u&i.child.childLanes)!==0?AR(s,i,u):(Za(i),s=na(s,i,u),s!==null?s.sibling:null);Za(i);break;case 19:var y=(s.flags&128)!==0;if(h=(u&i.childLanes)!==0,h||(Pl(s,i,u,!1),h=(u&i.childLanes)!==0),y){if(h)return RR(s,i,u);i.flags|=128}if(y=i.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),fe(on,on.current),h)break;return null;case 22:return i.lanes=0,CR(s,i,u,i.pendingProps);case 24:Va(i,ln,s.memoizedState.cache)}return na(s,i,u)}function OR(s,i,u){if(s!==null)if(s.memoizedProps!==i.pendingProps)un=!0;else{if(!a0(s,u)&&(i.flags&128)===0)return un=!1,WH(s,i,u);un=(s.flags&131072)!==0}else un=!1,at&&(i.flags&1048576)!==0&&lT(i,Uu,i.index);switch(i.lanes=0,i.tag){case 16:e:{var h=i.pendingProps;if(s=di(i.elementType),i.type=s,typeof s=="function")ub(s)?(h=mi(s,h),i.tag=1,i=_R(null,i,s,h,u)):(i.tag=0,i=Xb(null,i,s,h,u));else{if(s!=null){var y=s.$$typeof;if(y===O){i.tag=11,i=yR(null,i,s,h,u);break e}else if(y===M){i.tag=14,i=bR(null,i,s,h,u);break e}}throw i=X(s)||s,Error(r(306,i,""))}}return i;case 0:return Xb(s,i,i.type,i.pendingProps,u);case 1:return h=i.type,y=mi(h,i.pendingProps),_R(s,i,h,y,u);case 3:e:{if(ae(i,i.stateNode.containerInfo),s===null)throw Error(r(387));h=i.pendingProps;var b=i.memoizedState;y=b.element,_b(s,i),Vu(i,h,null,u);var A=i.memoizedState;if(h=A.cache,Va(i,ln,h),h!==b.cache&&bb(i,[ln],u,!0),qu(),h=A.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:A.cache},i.updateQueue.baseState=b,i.memoizedState=b,i.flags&256){i=IR(s,i,h,u);break e}else if(h!==y){y=$r(Error(r(424)),i),Fu(y),i=IR(s,i,h,u);break e}else for(s=i.stateNode.containerInfo,s.nodeType===9?s=s.body:s=s.nodeName==="HTML"?s.ownerDocument.body:s,zt=Vr(s.firstChild),Nn=i,at=!0,Ha=null,Hr=!0,u=CT(i,null,h,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(ii(),h===y){i=na(s,i,u);break e}kn(s,i,h,u)}i=i.child}return i;case 26:return ep(s,i),s===null?(u=jO(i.type,null,i.pendingProps,null))?i.memoizedState=u:at||(u=i.type,s=i.pendingProps,h=vp(Fe.current).createElement(u),h[Mn]=i,h[er]=s,Dn(h,u,s),En(h),i.stateNode=h):i.memoizedState=jO(i.type,s.memoizedProps,i.pendingProps,s.memoizedState),null;case 27:return Je(i),s===null&&at&&(h=i.stateNode=FO(i.type,i.pendingProps,Fe.current),Nn=i,Hr=!0,y=zt,os(i.type)?(F0=y,zt=Vr(h.firstChild)):zt=y),kn(s,i,i.pendingProps.children,u),ep(s,i),s===null&&(i.flags|=4194304),i.child;case 5:return s===null&&at&&((y=h=zt)&&(h=Eq(h,i.type,i.pendingProps,Hr),h!==null?(i.stateNode=h,Nn=i,zt=Vr(h.firstChild),Hr=!1,y=!0):y=!1),y||qa(i)),Je(i),y=i.type,b=i.pendingProps,A=s!==null?s.memoizedProps:null,h=b.children,P0(y,b)?h=null:A!==null&&P0(y,A)&&(i.flags|=32),i.memoizedState!==null&&(y=Nb(s,i,UH,null,null,u),dd._currentValue=y),ep(s,i),kn(s,i,h,u),i.child;case 6:return s===null&&at&&((s=u=zt)&&(u=wq(u,i.pendingProps,Hr),u!==null?(i.stateNode=u,Nn=i,zt=null,s=!0):s=!1),s||qa(i)),null;case 13:return AR(s,i,u);case 4:return ae(i,i.stateNode.containerInfo),h=i.pendingProps,s===null?i.child=hi(i,null,h,u):kn(s,i,h,u),i.child;case 11:return yR(s,i,i.type,i.pendingProps,u);case 7:return kn(s,i,i.pendingProps,u),i.child;case 8:return kn(s,i,i.pendingProps.children,u),i.child;case 12:return kn(s,i,i.pendingProps.children,u),i.child;case 10:return h=i.pendingProps,Va(i,i.type,h.value),kn(s,i,h.children,u),i.child;case 9:return y=i.type._context,h=i.pendingProps.children,ci(i),y=Pn(y),h=h(y),i.flags|=1,kn(s,i,h,u),i.child;case 14:return bR(s,i,i.type,i.pendingProps,u);case 15:return SR(s,i,i.type,i.pendingProps,u);case 19:return RR(s,i,u);case 31:return VH(s,i,u);case 22:return CR(s,i,u,i.pendingProps);case 24:return ci(i),h=Pn(ln),s===null?(y=Eb(),y===null&&(y=Lt,b=Sb(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=u),y=b),i.memoizedState={parent:h,cache:y},xb(i),Va(i,ln,y)):((s.lanes&u)!==0&&(_b(s,i),Vu(i,null,null,u),qu()),y=s.memoizedState,b=i.memoizedState,y.parent!==h?(y={parent:h,cache:h},i.memoizedState=y,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=y),Va(i,ln,h)):(h=b.cache,Va(i,ln,h),h!==y.cache&&bb(i,[ln],u,!0))),kn(s,i,i.pendingProps.children,u),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function ra(s){s.flags|=4}function s0(s,i,u,h,y){if((i=(s.mode&32)!==0)&&(i=!1),i){if(s.flags|=16777216,(y&335544128)===y)if(s.stateNode.complete)s.flags|=8192;else if(rO())s.flags|=8192;else throw fi=zh,wb}else s.flags&=-16777217}function MR(s,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!WO(i))if(rO())s.flags|=8192;else throw fi=zh,wb}function np(s,i){i!==null&&(s.flags|=4),s.flags&16384&&(i=s.tag!==22?uA():536870912,s.lanes|=i,Vl|=i)}function Qu(s,i){if(!at)switch(s.tailMode){case"hidden":i=s.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?s.tail=null:u.sibling=null;break;case"collapsed":u=s.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?i||s.tail===null?s.tail=null:s.tail.sibling=null:h.sibling=null}}function $t(s){var i=s.alternate!==null&&s.alternate.child===s.child,u=0,h=0;if(i)for(var y=s.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags&65011712,h|=y.flags&65011712,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)u|=y.lanes|y.childLanes,h|=y.subtreeFlags,h|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=h,s.childLanes=u,i}function GH(s,i,u){var h=i.pendingProps;switch(pb(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(i),null;case 1:return $t(i),null;case 3:return u=i.stateNode,h=null,s!==null&&(h=s.memoizedState.cache),i.memoizedState.cache!==h&&(i.flags|=2048),Jo(ln),Ae(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(s===null||s.child===null)&&(Nl(i)?ra(i):s===null||s.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,gb())),$t(i),null;case 26:var y=i.type,b=i.memoizedState;return s===null?(ra(i),b!==null?($t(i),MR(i,b)):($t(i),s0(i,y,null,h,u))):b?b!==s.memoizedState?(ra(i),$t(i),MR(i,b)):($t(i),i.flags&=-16777217):(s=s.memoizedProps,s!==h&&ra(i),$t(i),s0(i,y,s,h,u)),null;case 27:if(we(i),u=Fe.current,y=i.type,s!==null&&i.stateNode!=null)s.memoizedProps!==h&&ra(i);else{if(!h){if(i.stateNode===null)throw Error(r(166));return $t(i),null}s=ce.current,Nl(i)?uT(i):(s=FO(y,h,u),i.stateNode=s,ra(i))}return $t(i),null;case 5:if(we(i),y=i.type,s!==null&&i.stateNode!=null)s.memoizedProps!==h&&ra(i);else{if(!h){if(i.stateNode===null)throw Error(r(166));return $t(i),null}if(b=ce.current,Nl(i))uT(i);else{var A=vp(Fe.current);switch(b){case 1:b=A.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=A.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=A.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof h.is=="string"?A.createElement("select",{is:h.is}):A.createElement("select"),h.multiple?b.multiple=!0:h.size&&(b.size=h.size);break;default:b=typeof h.is=="string"?A.createElement(y,{is:h.is}):A.createElement(y)}}b[Mn]=i,b[er]=h;e:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)b.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break e;for(;A.sibling===null;){if(A.return===null||A.return===i)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=b;e:switch(Dn(b,y,h),y){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&ra(i)}}return $t(i),s0(i,i.type,s===null?null:s.memoizedProps,i.pendingProps,u),null;case 6:if(s&&i.stateNode!=null)s.memoizedProps!==h&&ra(i);else{if(typeof h!="string"&&i.stateNode===null)throw Error(r(166));if(s=Fe.current,Nl(i)){if(s=i.stateNode,u=i.memoizedProps,h=null,y=Nn,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}s[Mn]=i,s=!!(s.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||AO(s.nodeValue,u)),s||qa(i,!0)}else s=vp(s).createTextNode(h),s[Mn]=i,i.stateNode=s}return $t(i),null;case 31:if(u=i.memoizedState,s===null||s.memoizedState!==null){if(h=Nl(i),u!==null){if(s===null){if(!h)throw Error(r(318));if(s=i.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[Mn]=i}else ii(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;$t(i),s=!1}else u=gb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=u),s=!0;if(!s)return i.flags&256?(wr(i),i):(wr(i),null);if((i.flags&128)!==0)throw Error(r(558))}return $t(i),null;case 13:if(h=i.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(y=Nl(i),h!==null&&h.dehydrated!==null){if(s===null){if(!y)throw Error(r(318));if(y=i.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(r(317));y[Mn]=i}else ii(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;$t(i),y=!1}else y=gb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=y),y=!0;if(!y)return i.flags&256?(wr(i),i):(wr(i),null)}return wr(i),(i.flags&128)!==0?(i.lanes=u,i):(u=h!==null,s=s!==null&&s.memoizedState!==null,u&&(h=i.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==y&&(h.flags|=2048)),u!==s&&u&&(i.child.flags|=8192),np(i,i.updateQueue),$t(i),null);case 4:return Ae(),s===null&&T0(i.stateNode.containerInfo),$t(i),null;case 10:return Jo(i.type),$t(i),null;case 19:if(te(on),h=i.memoizedState,h===null)return $t(i),null;if(y=(i.flags&128)!==0,b=h.rendering,b===null)if(y)Qu(h,!1);else{if(rn!==0||s!==null&&(s.flags&128)!==0)for(s=i.child;s!==null;){if(b=Hh(s),b!==null){for(i.flags|=128,Qu(h,!1),s=b.updateQueue,i.updateQueue=s,np(i,s),i.subtreeFlags=0,s=u,u=i.child;u!==null;)aT(u,s),u=u.sibling;return fe(on,on.current&1|2),at&&Qo(i,h.treeForkCount),i.child}s=s.sibling}h.tail!==null&&Bn()>ip&&(i.flags|=128,y=!0,Qu(h,!1),i.lanes=4194304)}else{if(!y)if(s=Hh(b),s!==null){if(i.flags|=128,y=!0,s=s.updateQueue,i.updateQueue=s,np(i,s),Qu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!at)return $t(i),null}else 2*Bn()-h.renderingStartTime>ip&&u!==536870912&&(i.flags|=128,y=!0,Qu(h,!1),i.lanes=4194304);h.isBackwards?(b.sibling=i.child,i.child=b):(s=h.last,s!==null?s.sibling=b:i.child=b,h.last=b)}return h.tail!==null?(s=h.tail,h.rendering=s,h.tail=s.sibling,h.renderingStartTime=Bn(),s.sibling=null,u=on.current,fe(on,y?u&1|2:u&1),at&&Qo(i,h.treeForkCount),s):($t(i),null);case 22:case 23:return wr(i),Rb(),h=i.memoizedState!==null,s!==null?s.memoizedState!==null!==h&&(i.flags|=8192):h&&(i.flags|=8192),h?(u&536870912)!==0&&(i.flags&128)===0&&($t(i),i.subtreeFlags&6&&(i.flags|=8192)):$t(i),u=i.updateQueue,u!==null&&np(i,u.retryQueue),u=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),h=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(h=i.memoizedState.cachePool.pool),h!==u&&(i.flags|=2048),s!==null&&te(ui),null;case 24:return u=null,s!==null&&(u=s.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),Jo(ln),$t(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function KH(s,i){switch(pb(i),i.tag){case 1:return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 3:return Jo(ln),Ae(),s=i.flags,(s&65536)!==0&&(s&128)===0?(i.flags=s&-65537|128,i):null;case 26:case 27:case 5:return we(i),null;case 31:if(i.memoizedState!==null){if(wr(i),i.alternate===null)throw Error(r(340));ii()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 13:if(wr(i),s=i.memoizedState,s!==null&&s.dehydrated!==null){if(i.alternate===null)throw Error(r(340));ii()}return s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 19:return te(on),null;case 4:return Ae(),null;case 10:return Jo(i.type),null;case 22:case 23:return wr(i),Rb(),s!==null&&te(ui),s=i.flags,s&65536?(i.flags=s&-65537|128,i):null;case 24:return Jo(ln),null;case 25:return null;default:return null}}function NR(s,i){switch(pb(i),i.tag){case 3:Jo(ln),Ae();break;case 26:case 27:case 5:we(i);break;case 4:Ae();break;case 31:i.memoizedState!==null&&wr(i);break;case 13:wr(i);break;case 19:te(on);break;case 10:Jo(i.type);break;case 22:case 23:wr(i),Rb(),s!==null&&te(ui);break;case 24:Jo(ln)}}function Xu(s,i){try{var u=i.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&s)===s){h=void 0;var b=u.create,A=u.inst;h=b(),A.destroy=h}u=u.next}while(u!==y)}}catch(k){It(i,i.return,k)}}function Qa(s,i,u){try{var h=i.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var b=y.next;h=b;do{if((h.tag&s)===s){var A=h.inst,k=A.destroy;if(k!==void 0){A.destroy=void 0,y=i;var H=u,Y=k;try{Y()}catch(ne){It(y,H,ne)}}}h=h.next}while(h!==b)}}catch(ne){It(i,i.return,ne)}}function PR(s){var i=s.updateQueue;if(i!==null){var u=s.stateNode;try{wT(i,u)}catch(h){It(s,s.return,h)}}}function kR(s,i,u){u.props=mi(s.type,s.memoizedProps),u.state=s.memoizedState;try{u.componentWillUnmount()}catch(h){It(s,i,h)}}function Ju(s,i){try{var u=s.ref;if(u!==null){switch(s.tag){case 26:case 27:case 5:var h=s.stateNode;break;case 30:h=s.stateNode;break;default:h=s.stateNode}typeof u=="function"?s.refCleanup=u(h):u.current=h}}catch(y){It(s,i,y)}}function _o(s,i){var u=s.ref,h=s.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(y){It(s,i,y)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){It(s,i,y)}else u.current=null}function DR(s){var i=s.type,u=s.memoizedProps,h=s.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(y){It(s,s.return,y)}}function i0(s,i,u){try{var h=s.stateNode;gq(h,s.type,u,i),h[er]=i}catch(y){It(s,s.return,y)}}function LR(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&os(s.type)||s.tag===4}function l0(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||LR(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&os(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function c0(s,i,u){var h=s.tag;if(h===5||h===6)s=s.stateNode,i?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(s,i):(i=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,i.appendChild(s),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=Ko));else if(h!==4&&(h===27&&os(s.type)&&(u=s.stateNode,i=null),s=s.child,s!==null))for(c0(s,i,u),s=s.sibling;s!==null;)c0(s,i,u),s=s.sibling}function rp(s,i,u){var h=s.tag;if(h===5||h===6)s=s.stateNode,i?u.insertBefore(s,i):u.appendChild(s);else if(h!==4&&(h===27&&os(s.type)&&(u=s.stateNode),s=s.child,s!==null))for(rp(s,i,u),s=s.sibling;s!==null;)rp(s,i,u),s=s.sibling}function UR(s){var i=s.stateNode,u=s.memoizedProps;try{for(var h=s.type,y=i.attributes;y.length;)i.removeAttributeNode(y[0]);Dn(i,h,u),i[Mn]=s,i[er]=u}catch(b){It(s,s.return,b)}}var oa=!1,dn=!1,u0=!1,FR=typeof WeakSet=="function"?WeakSet:Set,wn=null;function ZH(s,i){if(s=s.containerInfo,M0=xp,s=YA(s),rb(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else e:{u=(u=s.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var y=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var A=0,k=-1,H=-1,Y=0,ne=0,se=s,Q=null;t:for(;;){for(var J;se!==u||y!==0&&se.nodeType!==3||(k=A+y),se!==b||h!==0&&se.nodeType!==3||(H=A+h),se.nodeType===3&&(A+=se.nodeValue.length),(J=se.firstChild)!==null;)Q=se,se=J;for(;;){if(se===s)break t;if(Q===u&&++Y===y&&(k=A),Q===b&&++ne===h&&(H=A),(J=se.nextSibling)!==null)break;se=Q,Q=se.parentNode}se=J}u=k===-1||H===-1?null:{start:k,end:H}}else u=null}u=u||{start:0,end:0}}else u=null;for(N0={focusedElem:s,selectionRange:u},xp=!1,wn=i;wn!==null;)if(i=wn,s=i.child,(i.subtreeFlags&1028)!==0&&s!==null)s.return=i,wn=s;else for(;wn!==null;){switch(i=wn,b=i.alternate,s=i.flags,i.tag){case 0:if((s&4)!==0&&(s=i.updateQueue,s=s!==null?s.events:null,s!==null))for(u=0;u<s.length;u++)y=s[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&b!==null){s=void 0,u=i,y=b.memoizedProps,b=b.memoizedState,h=u.stateNode;try{var _e=mi(u.type,y);s=h.getSnapshotBeforeUpdate(_e,b),h.__reactInternalSnapshotBeforeUpdate=s}catch(Le){It(u,u.return,Le)}}break;case 3:if((s&1024)!==0){if(s=i.stateNode.containerInfo,u=s.nodeType,u===9)D0(s);else if(u===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":D0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=i.sibling,s!==null){s.return=i.return,wn=s;break}wn=i.return}}function zR(s,i,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:sa(s,u),h&4&&Xu(5,u);break;case 1:if(sa(s,u),h&4)if(s=u.stateNode,i===null)try{s.componentDidMount()}catch(A){It(u,u.return,A)}else{var y=mi(u.type,i.memoizedProps);i=i.memoizedState;try{s.componentDidUpdate(y,i,s.__reactInternalSnapshotBeforeUpdate)}catch(A){It(u,u.return,A)}}h&64&&PR(u),h&512&&Ju(u,u.return);break;case 3:if(sa(s,u),h&64&&(s=u.updateQueue,s!==null)){if(i=null,u.child!==null)switch(u.child.tag){case 27:case 5:i=u.child.stateNode;break;case 1:i=u.child.stateNode}try{wT(s,i)}catch(A){It(u,u.return,A)}}break;case 27:i===null&&h&4&&UR(u);case 26:case 5:sa(s,u),i===null&&h&4&&DR(u),h&512&&Ju(u,u.return);break;case 12:sa(s,u);break;case 31:sa(s,u),h&4&&BR(s,u);break;case 13:sa(s,u),h&4&&HR(s,u),h&64&&(s=u.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(u=oq.bind(null,u),xq(s,u))));break;case 22:if(h=u.memoizedState!==null||oa,!h){i=i!==null&&i.memoizedState!==null||dn,y=oa;var b=dn;oa=h,(dn=i)&&!b?ia(s,u,(u.subtreeFlags&8772)!==0):sa(s,u),oa=y,dn=b}break;case 30:break;default:sa(s,u)}}function $R(s){var i=s.alternate;i!==null&&(s.alternate=null,$R(i)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(i=s.stateNode,i!==null&&$y(i)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Wt=null,nr=!1;function aa(s,i,u){for(u=u.child;u!==null;)jR(s,i,u),u=u.sibling}function jR(s,i,u){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(wu,u)}catch{}switch(u.tag){case 26:dn||_o(u,i),aa(s,i,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:dn||_o(u,i);var h=Wt,y=nr;os(u.type)&&(Wt=u.stateNode,nr=!1),aa(s,i,u),ld(u.stateNode),Wt=h,nr=y;break;case 5:dn||_o(u,i);case 6:if(h=Wt,y=nr,Wt=null,aa(s,i,u),Wt=h,nr=y,Wt!==null)if(nr)try{(Wt.nodeType===9?Wt.body:Wt.nodeName==="HTML"?Wt.ownerDocument.body:Wt).removeChild(u.stateNode)}catch(b){It(u,i,b)}else try{Wt.removeChild(u.stateNode)}catch(b){It(u,i,b)}break;case 18:Wt!==null&&(nr?(s=Wt,PO(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,u.stateNode),Jl(s)):PO(Wt,u.stateNode));break;case 4:h=Wt,y=nr,Wt=u.stateNode.containerInfo,nr=!0,aa(s,i,u),Wt=h,nr=y;break;case 0:case 11:case 14:case 15:Qa(2,u,i),dn||Qa(4,u,i),aa(s,i,u);break;case 1:dn||(_o(u,i),h=u.stateNode,typeof h.componentWillUnmount=="function"&&kR(u,i,h)),aa(s,i,u);break;case 21:aa(s,i,u);break;case 22:dn=(h=dn)||u.memoizedState!==null,aa(s,i,u),dn=h;break;default:aa(s,i,u)}}function BR(s,i){if(i.memoizedState===null&&(s=i.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Jl(s)}catch(u){It(i,i.return,u)}}}function HR(s,i){if(i.memoizedState===null&&(s=i.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Jl(s)}catch(u){It(i,i.return,u)}}function YH(s){switch(s.tag){case 31:case 13:case 19:var i=s.stateNode;return i===null&&(i=s.stateNode=new FR),i;case 22:return s=s.stateNode,i=s._retryCache,i===null&&(i=s._retryCache=new FR),i;default:throw Error(r(435,s.tag))}}function op(s,i){var u=YH(s);i.forEach(function(h){if(!u.has(h)){u.add(h);var y=aq.bind(null,s,h);h.then(y,y)}})}function rr(s,i){var u=i.deletions;if(u!==null)for(var h=0;h<u.length;h++){var y=u[h],b=s,A=i,k=A;e:for(;k!==null;){switch(k.tag){case 27:if(os(k.type)){Wt=k.stateNode,nr=!1;break e}break;case 5:Wt=k.stateNode,nr=!1;break e;case 3:case 4:Wt=k.stateNode.containerInfo,nr=!0;break e}k=k.return}if(Wt===null)throw Error(r(160));jR(b,A,y),Wt=null,nr=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)qR(i,s),i=i.sibling}var io=null;function qR(s,i){var u=s.alternate,h=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:rr(i,s),or(s),h&4&&(Qa(3,s,s.return),Xu(3,s),Qa(5,s,s.return));break;case 1:rr(i,s),or(s),h&512&&(dn||u===null||_o(u,u.return)),h&64&&oa&&(s=s.updateQueue,s!==null&&(h=s.callbacks,h!==null&&(u=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var y=io;if(rr(i,s),or(s),h&512&&(dn||u===null||_o(u,u.return)),h&4){var b=u!==null?u.memoizedState:null;if(h=s.memoizedState,u===null)if(h===null)if(s.stateNode===null){e:{h=s.type,u=s.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":b=y.getElementsByTagName("title")[0],(!b||b[Iu]||b[Mn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(h),y.head.insertBefore(b,y.querySelector("head > title"))),Dn(b,h,u),b[Mn]=s,En(b),h=b;break e;case"link":var A=qO("link","href",y).get(h+(u.href||""));if(A){for(var k=0;k<A.length;k++)if(b=A[k],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){A.splice(k,1);break t}}b=y.createElement(h),Dn(b,h,u),y.head.appendChild(b);break;case"meta":if(A=qO("meta","content",y).get(h+(u.content||""))){for(k=0;k<A.length;k++)if(b=A[k],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){A.splice(k,1);break t}}b=y.createElement(h),Dn(b,h,u),y.head.appendChild(b);break;default:throw Error(r(468,h))}b[Mn]=s,En(b),h=b}s.stateNode=h}else VO(y,s.type,s.stateNode);else s.stateNode=HO(y,h,s.memoizedProps);else b!==h?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,h===null?VO(y,s.type,s.stateNode):HO(y,h,s.memoizedProps)):h===null&&s.stateNode!==null&&i0(s,s.memoizedProps,u.memoizedProps)}break;case 27:rr(i,s),or(s),h&512&&(dn||u===null||_o(u,u.return)),u!==null&&h&4&&i0(s,s.memoizedProps,u.memoizedProps);break;case 5:if(rr(i,s),or(s),h&512&&(dn||u===null||_o(u,u.return)),s.flags&32){y=s.stateNode;try{El(y,"")}catch(_e){It(s,s.return,_e)}}h&4&&s.stateNode!=null&&(y=s.memoizedProps,i0(s,y,u!==null?u.memoizedProps:y)),h&1024&&(u0=!0);break;case 6:if(rr(i,s),or(s),h&4){if(s.stateNode===null)throw Error(r(162));h=s.memoizedProps,u=s.stateNode;try{u.nodeValue=h}catch(_e){It(s,s.return,_e)}}break;case 3:if(Sp=null,y=io,io=yp(i.containerInfo),rr(i,s),io=y,or(s),h&4&&u!==null&&u.memoizedState.isDehydrated)try{Jl(i.containerInfo)}catch(_e){It(s,s.return,_e)}u0&&(u0=!1,VR(s));break;case 4:h=io,io=yp(s.stateNode.containerInfo),rr(i,s),or(s),io=h;break;case 12:rr(i,s),or(s);break;case 31:rr(i,s),or(s),h&4&&(h=s.updateQueue,h!==null&&(s.updateQueue=null,op(s,h)));break;case 13:rr(i,s),or(s),s.child.flags&8192&&s.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(sp=Bn()),h&4&&(h=s.updateQueue,h!==null&&(s.updateQueue=null,op(s,h)));break;case 22:y=s.memoizedState!==null;var H=u!==null&&u.memoizedState!==null,Y=oa,ne=dn;if(oa=Y||y,dn=ne||H,rr(i,s),dn=ne,oa=Y,or(s),h&8192)e:for(i=s.stateNode,i._visibility=y?i._visibility&-2:i._visibility|1,y&&(u===null||H||oa||dn||gi(s)),u=null,i=s;;){if(i.tag===5||i.tag===26){if(u===null){H=u=i;try{if(b=H.stateNode,y)A=b.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{k=H.stateNode;var se=H.memoizedProps.style,Q=se!=null&&se.hasOwnProperty("display")?se.display:null;k.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(_e){It(H,H.return,_e)}}}else if(i.tag===6){if(u===null){H=i;try{H.stateNode.nodeValue=y?"":H.memoizedProps}catch(_e){It(H,H.return,_e)}}}else if(i.tag===18){if(u===null){H=i;try{var J=H.stateNode;y?kO(J,!0):kO(H.stateNode,!1)}catch(_e){It(H,H.return,_e)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===s)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;u===i&&(u=null),i=i.return}u===i&&(u=null),i.sibling.return=i.return,i=i.sibling}h&4&&(h=s.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,op(s,u))));break;case 19:rr(i,s),or(s),h&4&&(h=s.updateQueue,h!==null&&(s.updateQueue=null,op(s,h)));break;case 30:break;case 21:break;default:rr(i,s),or(s)}}function or(s){var i=s.flags;if(i&2){try{for(var u,h=s.return;h!==null;){if(LR(h)){u=h;break}h=h.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var y=u.stateNode,b=l0(s);rp(s,b,y);break;case 5:var A=u.stateNode;u.flags&32&&(El(A,""),u.flags&=-33);var k=l0(s);rp(s,k,A);break;case 3:case 4:var H=u.stateNode.containerInfo,Y=l0(s);c0(s,Y,H);break;default:throw Error(r(161))}}catch(ne){It(s,s.return,ne)}s.flags&=-3}i&4096&&(s.flags&=-4097)}function VR(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var i=s;VR(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),s=s.sibling}}function sa(s,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)zR(s,i.alternate,i),i=i.sibling}function gi(s){for(s=s.child;s!==null;){var i=s;switch(i.tag){case 0:case 11:case 14:case 15:Qa(4,i,i.return),gi(i);break;case 1:_o(i,i.return);var u=i.stateNode;typeof u.componentWillUnmount=="function"&&kR(i,i.return,u),gi(i);break;case 27:ld(i.stateNode);case 26:case 5:_o(i,i.return),gi(i);break;case 22:i.memoizedState===null&&gi(i);break;case 30:gi(i);break;default:gi(i)}s=s.sibling}}function ia(s,i,u){for(u=u&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var h=i.alternate,y=s,b=i,A=b.flags;switch(b.tag){case 0:case 11:case 15:ia(y,b,u),Xu(4,b);break;case 1:if(ia(y,b,u),h=b,y=h.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Y){It(h,h.return,Y)}if(h=b,y=h.updateQueue,y!==null){var k=h.stateNode;try{var H=y.shared.hiddenCallbacks;if(H!==null)for(y.shared.hiddenCallbacks=null,y=0;y<H.length;y++)ET(H[y],k)}catch(Y){It(h,h.return,Y)}}u&&A&64&&PR(b),Ju(b,b.return);break;case 27:UR(b);case 26:case 5:ia(y,b,u),u&&h===null&&A&4&&DR(b),Ju(b,b.return);break;case 12:ia(y,b,u);break;case 31:ia(y,b,u),u&&A&4&&BR(y,b);break;case 13:ia(y,b,u),u&&A&4&&HR(y,b);break;case 22:b.memoizedState===null&&ia(y,b,u),Ju(b,b.return);break;case 30:break;default:ia(y,b,u)}i=i.sibling}}function d0(s,i){var u=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(u=s.memoizedState.cachePool.pool),s=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==u&&(s!=null&&s.refCount++,u!=null&&zu(u))}function f0(s,i){s=null,i.alternate!==null&&(s=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==s&&(i.refCount++,s!=null&&zu(s))}function lo(s,i,u,h){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)WR(s,i,u,h),i=i.sibling}function WR(s,i,u,h){var y=i.flags;switch(i.tag){case 0:case 11:case 15:lo(s,i,u,h),y&2048&&Xu(9,i);break;case 1:lo(s,i,u,h);break;case 3:lo(s,i,u,h),y&2048&&(s=null,i.alternate!==null&&(s=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==s&&(i.refCount++,s!=null&&zu(s)));break;case 12:if(y&2048){lo(s,i,u,h),s=i.stateNode;try{var b=i.memoizedProps,A=b.id,k=b.onPostCommit;typeof k=="function"&&k(A,i.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(H){It(i,i.return,H)}}else lo(s,i,u,h);break;case 31:lo(s,i,u,h);break;case 13:lo(s,i,u,h);break;case 23:break;case 22:b=i.stateNode,A=i.alternate,i.memoizedState!==null?b._visibility&2?lo(s,i,u,h):ed(s,i):b._visibility&2?lo(s,i,u,h):(b._visibility|=2,Bl(s,i,u,h,(i.subtreeFlags&10256)!==0||!1)),y&2048&&d0(A,i);break;case 24:lo(s,i,u,h),y&2048&&f0(i.alternate,i);break;default:lo(s,i,u,h)}}function Bl(s,i,u,h,y){for(y=y&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var b=s,A=i,k=u,H=h,Y=A.flags;switch(A.tag){case 0:case 11:case 15:Bl(b,A,k,H,y),Xu(8,A);break;case 23:break;case 22:var ne=A.stateNode;A.memoizedState!==null?ne._visibility&2?Bl(b,A,k,H,y):ed(b,A):(ne._visibility|=2,Bl(b,A,k,H,y)),y&&Y&2048&&d0(A.alternate,A);break;case 24:Bl(b,A,k,H,y),y&&Y&2048&&f0(A.alternate,A);break;default:Bl(b,A,k,H,y)}i=i.sibling}}function ed(s,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var u=s,h=i,y=h.flags;switch(h.tag){case 22:ed(u,h),y&2048&&d0(h.alternate,h);break;case 24:ed(u,h),y&2048&&f0(h.alternate,h);break;default:ed(u,h)}i=i.sibling}}var td=8192;function Hl(s,i,u){if(s.subtreeFlags&td)for(s=s.child;s!==null;)GR(s,i,u),s=s.sibling}function GR(s,i,u){switch(s.tag){case 26:Hl(s,i,u),s.flags&td&&s.memoizedState!==null&&Lq(u,io,s.memoizedState,s.memoizedProps);break;case 5:Hl(s,i,u);break;case 3:case 4:var h=io;io=yp(s.stateNode.containerInfo),Hl(s,i,u),io=h;break;case 22:s.memoizedState===null&&(h=s.alternate,h!==null&&h.memoizedState!==null?(h=td,td=16777216,Hl(s,i,u),td=h):Hl(s,i,u));break;default:Hl(s,i,u)}}function KR(s){var i=s.alternate;if(i!==null&&(s=i.child,s!==null)){i.child=null;do i=s.sibling,s.sibling=null,s=i;while(s!==null)}}function nd(s){var i=s.deletions;if((s.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var h=i[u];wn=h,YR(h,s)}KR(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)ZR(s),s=s.sibling}function ZR(s){switch(s.tag){case 0:case 11:case 15:nd(s),s.flags&2048&&Qa(9,s,s.return);break;case 3:nd(s);break;case 12:nd(s);break;case 22:var i=s.stateNode;s.memoizedState!==null&&i._visibility&2&&(s.return===null||s.return.tag!==13)?(i._visibility&=-3,ap(s)):nd(s);break;default:nd(s)}}function ap(s){var i=s.deletions;if((s.flags&16)!==0){if(i!==null)for(var u=0;u<i.length;u++){var h=i[u];wn=h,YR(h,s)}KR(s)}for(s=s.child;s!==null;){switch(i=s,i.tag){case 0:case 11:case 15:Qa(8,i,i.return),ap(i);break;case 22:u=i.stateNode,u._visibility&2&&(u._visibility&=-3,ap(i));break;default:ap(i)}s=s.sibling}}function YR(s,i){for(;wn!==null;){var u=wn;switch(u.tag){case 0:case 11:case 15:Qa(8,u,i);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:zu(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,wn=h;else e:for(u=s;wn!==null;){h=wn;var y=h.sibling,b=h.return;if($R(h),h===u){wn=null;break e}if(y!==null){y.return=b,wn=y;break e}wn=b}}}var QH={getCacheForType:function(s){var i=Pn(ln),u=i.data.get(s);return u===void 0&&(u=s(),i.data.set(s,u)),u},cacheSignal:function(){return Pn(ln).controller.signal}},XH=typeof WeakMap=="function"?WeakMap:Map,yt=0,Lt=null,et=null,rt=0,_t=0,xr=null,Xa=!1,ql=!1,h0=!1,la=0,rn=0,Ja=0,vi=0,p0=0,_r=0,Vl=0,rd=null,ar=null,m0=!1,sp=0,QR=0,ip=1/0,lp=null,es=null,gn=0,ts=null,Wl=null,ca=0,g0=0,v0=null,XR=null,od=0,y0=null;function Ir(){return(yt&2)!==0&&rt!==0?rt&-rt:W.T!==null?x0():pA()}function JR(){if(_r===0)if((rt&536870912)===0||at){var s=gh;gh<<=1,(gh&3932160)===0&&(gh=262144),_r=s}else _r=536870912;return s=Er.current,s!==null&&(s.flags|=32),_r}function sr(s,i,u){(s===Lt&&(_t===2||_t===9)||s.cancelPendingCommit!==null)&&(Gl(s,0),ns(s,rt,_r,!1)),_u(s,u),((yt&2)===0||s!==Lt)&&(s===Lt&&((yt&2)===0&&(vi|=u),rn===4&&ns(s,rt,_r,!1)),Io(s))}function eO(s,i,u){if((yt&6)!==0)throw Error(r(327));var h=!u&&(i&127)===0&&(i&s.expiredLanes)===0||xu(s,i),y=h?tq(s,i):S0(s,i,!0),b=h;do{if(y===0){ql&&!h&&ns(s,i,0,!1);break}else{if(u=s.current.alternate,b&&!JH(u)){y=S0(s,i,!1),b=!1;continue}if(y===2){if(b=i,s.errorRecoveryDisabledLanes&b)var A=0;else A=s.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){i=A;e:{var k=s;y=rd;var H=k.current.memoizedState.isDehydrated;if(H&&(Gl(k,A).flags|=256),A=S0(k,A,!1),A!==2){if(h0&&!H){k.errorRecoveryDisabledLanes|=b,vi|=b,y=4;break e}b=ar,ar=y,b!==null&&(ar===null?ar=b:ar.push.apply(ar,b))}y=A}if(b=!1,y!==2)continue}}if(y===1){Gl(s,0),ns(s,i,0,!0);break}e:{switch(h=s,b=y,b){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:ns(h,i,_r,!Xa);break e;case 2:ar=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(y=sp+300-Bn(),10<y)){if(ns(h,i,_r,!Xa),yh(h,0,!0)!==0)break e;ca=i,h.timeoutHandle=MO(tO.bind(null,h,u,ar,lp,m0,i,_r,vi,Vl,Xa,b,"Throttled",-0,0),y);break e}tO(h,u,ar,lp,m0,i,_r,vi,Vl,Xa,b,null,-0,0)}}break}while(!0);Io(s)}function tO(s,i,u,h,y,b,A,k,H,Y,ne,se,Q,J){if(s.timeoutHandle=-1,se=i.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ko},GR(i,b,se);var _e=(b&62914560)===b?sp-Bn():(b&4194048)===b?QR-Bn():0;if(_e=Uq(se,_e),_e!==null){ca=b,s.cancelPendingCommit=_e(cO.bind(null,s,i,b,u,h,y,A,k,H,ne,se,null,Q,J)),ns(s,b,A,!Y);return}}cO(s,i,b,u,h,y,A,k,H)}function JH(s){for(var i=s;;){var u=i.tag;if((u===0||u===11||u===15)&&i.flags&16384&&(u=i.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var y=u[h],b=y.getSnapshot;y=y.value;try{if(!Sr(b(),y))return!1}catch{return!1}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===s)break;for(;i.sibling===null;){if(i.return===null||i.return===s)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ns(s,i,u,h){i&=~p0,i&=~vi,s.suspendedLanes|=i,s.pingedLanes&=~i,h&&(s.warmLanes|=i),h=s.expirationTimes;for(var y=i;0<y;){var b=31-br(y),A=1<<b;h[b]=-1,y&=~A}u!==0&&dA(s,u,i)}function cp(){return(yt&6)===0?(ad(0),!1):!0}function b0(){if(et!==null){if(_t===0)var s=et.return;else s=et,Xo=li=null,Db(s),Ul=null,ju=0,s=et;for(;s!==null;)NR(s.alternate,s),s=s.return;et=null}}function Gl(s,i){var u=s.timeoutHandle;u!==-1&&(s.timeoutHandle=-1,bq(u)),u=s.cancelPendingCommit,u!==null&&(s.cancelPendingCommit=null,u()),ca=0,b0(),Lt=s,et=u=Yo(s.current,null),rt=i,_t=0,xr=null,Xa=!1,ql=xu(s,i),h0=!1,Vl=_r=p0=vi=Ja=rn=0,ar=rd=null,m0=!1,(i&8)!==0&&(i|=i&32);var h=s.entangledLanes;if(h!==0)for(s=s.entanglements,h&=i;0<h;){var y=31-br(h),b=1<<y;i|=s[y],h&=~b}return la=i,Oh(),u}function nO(s,i){Ze=null,W.H=Zu,i===Ll||i===Fh?(i=yT(),_t=3):i===wb?(i=yT(),_t=4):_t=i===Qb?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,xr=i,et===null&&(rn=1,Xh(s,$r(i,s.current)))}function rO(){var s=Er.current;return s===null?!0:(rt&4194048)===rt?qr===null:(rt&62914560)===rt||(rt&536870912)!==0?s===qr:!1}function oO(){var s=W.H;return W.H=Zu,s===null?Zu:s}function aO(){var s=W.A;return W.A=QH,s}function up(){rn=4,Xa||(rt&4194048)!==rt&&Er.current!==null||(ql=!0),(Ja&134217727)===0&&(vi&134217727)===0||Lt===null||ns(Lt,rt,_r,!1)}function S0(s,i,u){var h=yt;yt|=2;var y=oO(),b=aO();(Lt!==s||rt!==i)&&(lp=null,Gl(s,i)),i=!1;var A=rn;e:do try{if(_t!==0&&et!==null){var k=et,H=xr;switch(_t){case 8:b0(),A=6;break e;case 3:case 2:case 9:case 6:Er.current===null&&(i=!0);var Y=_t;if(_t=0,xr=null,Kl(s,k,H,Y),u&&ql){A=0;break e}break;default:Y=_t,_t=0,xr=null,Kl(s,k,H,Y)}}eq(),A=rn;break}catch(ne){nO(s,ne)}while(!0);return i&&s.shellSuspendCounter++,Xo=li=null,yt=h,W.H=y,W.A=b,et===null&&(Lt=null,rt=0,Oh()),A}function eq(){for(;et!==null;)sO(et)}function tq(s,i){var u=yt;yt|=2;var h=oO(),y=aO();Lt!==s||rt!==i?(lp=null,ip=Bn()+500,Gl(s,i)):ql=xu(s,i);e:do try{if(_t!==0&&et!==null){i=et;var b=xr;t:switch(_t){case 1:_t=0,xr=null,Kl(s,i,b,1);break;case 2:case 9:if(gT(b)){_t=0,xr=null,iO(i);break}i=function(){_t!==2&&_t!==9||Lt!==s||(_t=7),Io(s)},b.then(i,i);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:gT(b)?(_t=0,xr=null,iO(i)):(_t=0,xr=null,Kl(s,i,b,7));break;case 5:var A=null;switch(et.tag){case 26:A=et.memoizedState;case 5:case 27:var k=et;if(A?WO(A):k.stateNode.complete){_t=0,xr=null;var H=k.sibling;if(H!==null)et=H;else{var Y=k.return;Y!==null?(et=Y,dp(Y)):et=null}break t}}_t=0,xr=null,Kl(s,i,b,5);break;case 6:_t=0,xr=null,Kl(s,i,b,6);break;case 8:b0(),rn=6;break e;default:throw Error(r(462))}}nq();break}catch(ne){nO(s,ne)}while(!0);return Xo=li=null,W.H=h,W.A=y,yt=u,et!==null?0:(Lt=null,rt=0,Oh(),rn)}function nq(){for(;et!==null&&!ph();)sO(et)}function sO(s){var i=OR(s.alternate,s,la);s.memoizedProps=s.pendingProps,i===null?dp(s):et=i}function iO(s){var i=s,u=i.alternate;switch(i.tag){case 15:case 0:i=xR(u,i,i.pendingProps,i.type,void 0,rt);break;case 11:i=xR(u,i,i.pendingProps,i.type.render,i.ref,rt);break;case 5:Db(i);default:NR(u,i),i=et=aT(i,la),i=OR(u,i,la)}s.memoizedProps=s.pendingProps,i===null?dp(s):et=i}function Kl(s,i,u,h){Xo=li=null,Db(i),Ul=null,ju=0;var y=i.return;try{if(qH(s,y,i,u,rt)){rn=1,Xh(s,$r(u,s.current)),et=null;return}}catch(b){if(y!==null)throw et=y,b;rn=1,Xh(s,$r(u,s.current)),et=null;return}i.flags&32768?(at||h===1?s=!0:ql||(rt&536870912)!==0?s=!1:(Xa=s=!0,(h===2||h===9||h===3||h===6)&&(h=Er.current,h!==null&&h.tag===13&&(h.flags|=16384))),lO(i,s)):dp(i)}function dp(s){var i=s;do{if((i.flags&32768)!==0){lO(i,Xa);return}s=i.return;var u=GH(i.alternate,i,la);if(u!==null){et=u;return}if(i=i.sibling,i!==null){et=i;return}et=i=s}while(i!==null);rn===0&&(rn=5)}function lO(s,i){do{var u=KH(s.alternate,s);if(u!==null){u.flags&=32767,et=u;return}if(u=s.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!i&&(s=s.sibling,s!==null)){et=s;return}et=s=u}while(s!==null);rn=6,et=null}function cO(s,i,u,h,y,b,A,k,H){s.cancelPendingCommit=null;do fp();while(gn!==0);if((yt&6)!==0)throw Error(r(327));if(i!==null){if(i===s.current)throw Error(r(177));if(b=i.lanes|i.childLanes,b|=lb,DB(s,u,b,A,k,H),s===Lt&&(et=Lt=null,rt=0),Wl=i,ts=s,ca=u,g0=b,v0=y,XR=h,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,sq(ml,function(){return pO(),null})):(s.callbackNode=null,s.callbackPriority=0),h=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||h){h=W.T,W.T=null,y=ee.p,ee.p=2,A=yt,yt|=4;try{ZH(s,i,u)}finally{yt=A,ee.p=y,W.T=h}}gn=1,uO(),dO(),fO()}}function uO(){if(gn===1){gn=0;var s=ts,i=Wl,u=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||u){u=W.T,W.T=null;var h=ee.p;ee.p=2;var y=yt;yt|=4;try{qR(i,s);var b=N0,A=YA(s.containerInfo),k=b.focusedElem,H=b.selectionRange;if(A!==k&&k&&k.ownerDocument&&ZA(k.ownerDocument.documentElement,k)){if(H!==null&&rb(k)){var Y=H.start,ne=H.end;if(ne===void 0&&(ne=Y),"selectionStart"in k)k.selectionStart=Y,k.selectionEnd=Math.min(ne,k.value.length);else{var se=k.ownerDocument||document,Q=se&&se.defaultView||window;if(Q.getSelection){var J=Q.getSelection(),_e=k.textContent.length,Le=Math.min(H.start,_e),Ot=H.end===void 0?Le:Math.min(H.end,_e);!J.extend&&Le>Ot&&(A=Ot,Ot=Le,Le=A);var K=KA(k,Le),V=KA(k,Ot);if(K&&V&&(J.rangeCount!==1||J.anchorNode!==K.node||J.anchorOffset!==K.offset||J.focusNode!==V.node||J.focusOffset!==V.offset)){var Z=se.createRange();Z.setStart(K.node,K.offset),J.removeAllRanges(),Le>Ot?(J.addRange(Z),J.extend(V.node,V.offset)):(Z.setEnd(V.node,V.offset),J.addRange(Z))}}}}for(se=[],J=k;J=J.parentNode;)J.nodeType===1&&se.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<se.length;k++){var oe=se[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}xp=!!M0,N0=M0=null}finally{yt=y,ee.p=h,W.T=u}}s.current=i,gn=2}}function dO(){if(gn===2){gn=0;var s=ts,i=Wl,u=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||u){u=W.T,W.T=null;var h=ee.p;ee.p=2;var y=yt;yt|=4;try{zR(s,i.alternate,i)}finally{yt=y,ee.p=h,W.T=u}}gn=3}}function fO(){if(gn===4||gn===3){gn=0,Dy();var s=ts,i=Wl,u=ca,h=XR;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?gn=5:(gn=0,Wl=ts=null,hO(s,s.pendingLanes));var y=s.pendingLanes;if(y===0&&(es=null),Fy(u),i=i.stateNode,yr&&typeof yr.onCommitFiberRoot=="function")try{yr.onCommitFiberRoot(wu,i,void 0,(i.current.flags&128)===128)}catch{}if(h!==null){i=W.T,y=ee.p,ee.p=2,W.T=null;try{for(var b=s.onRecoverableError,A=0;A<h.length;A++){var k=h[A];b(k.value,{componentStack:k.stack})}}finally{W.T=i,ee.p=y}}(ca&3)!==0&&fp(),Io(s),y=s.pendingLanes,(u&261930)!==0&&(y&42)!==0?s===y0?od++:(od=0,y0=s):od=0,ad(0)}}function hO(s,i){(s.pooledCacheLanes&=i)===0&&(i=s.pooledCache,i!=null&&(s.pooledCache=null,zu(i)))}function fp(){return uO(),dO(),fO(),pO()}function pO(){if(gn!==5)return!1;var s=ts,i=g0;g0=0;var u=Fy(ca),h=W.T,y=ee.p;try{ee.p=32>u?32:u,W.T=null,u=v0,v0=null;var b=ts,A=ca;if(gn=0,Wl=ts=null,ca=0,(yt&6)!==0)throw Error(r(331));var k=yt;if(yt|=4,ZR(b.current),WR(b,b.current,A,u),yt=k,ad(0,!1),yr&&typeof yr.onPostCommitFiberRoot=="function")try{yr.onPostCommitFiberRoot(wu,b)}catch{}return!0}finally{ee.p=y,W.T=h,hO(s,i)}}function mO(s,i,u){i=$r(u,i),i=Yb(s.stateNode,i,2),s=Ka(s,i,2),s!==null&&(_u(s,2),Io(s))}function It(s,i,u){if(s.tag===3)mO(s,s,u);else for(;i!==null;){if(i.tag===3){mO(i,s,u);break}else if(i.tag===1){var h=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(es===null||!es.has(h))){s=$r(u,s),u=gR(2),h=Ka(i,u,2),h!==null&&(vR(u,h,i,s),_u(h,2),Io(h));break}}i=i.return}}function C0(s,i,u){var h=s.pingCache;if(h===null){h=s.pingCache=new XH;var y=new Set;h.set(i,y)}else y=h.get(i),y===void 0&&(y=new Set,h.set(i,y));y.has(u)||(h0=!0,y.add(u),s=rq.bind(null,s,i,u),i.then(s,s))}function rq(s,i,u){var h=s.pingCache;h!==null&&h.delete(i),s.pingedLanes|=s.suspendedLanes&u,s.warmLanes&=~u,Lt===s&&(rt&u)===u&&(rn===4||rn===3&&(rt&62914560)===rt&&300>Bn()-sp?(yt&2)===0&&Gl(s,0):p0|=u,Vl===rt&&(Vl=0)),Io(s)}function gO(s,i){i===0&&(i=uA()),s=ai(s,i),s!==null&&(_u(s,i),Io(s))}function oq(s){var i=s.memoizedState,u=0;i!==null&&(u=i.retryLane),gO(s,u)}function aq(s,i){var u=0;switch(s.tag){case 31:case 13:var h=s.stateNode,y=s.memoizedState;y!==null&&(u=y.retryLane);break;case 19:h=s.stateNode;break;case 22:h=s.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(i),gO(s,u)}function sq(s,i){return ao(s,i)}var hp=null,Zl=null,E0=!1,pp=!1,w0=!1,rs=0;function Io(s){s!==Zl&&s.next===null&&(Zl===null?hp=Zl=s:Zl=Zl.next=s),pp=!0,E0||(E0=!0,lq())}function ad(s,i){if(!w0&&pp){w0=!0;do for(var u=!1,h=hp;h!==null;){if(s!==0){var y=h.pendingLanes;if(y===0)var b=0;else{var A=h.suspendedLanes,k=h.pingedLanes;b=(1<<31-br(42|s)+1)-1,b&=y&~(A&~k),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,SO(h,b))}else b=rt,b=yh(h,h===Lt?b:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(b&3)===0||xu(h,b)||(u=!0,SO(h,b));h=h.next}while(u);w0=!1}}function iq(){vO()}function vO(){pp=E0=!1;var s=0;rs!==0&&yq()&&(s=rs);for(var i=Bn(),u=null,h=hp;h!==null;){var y=h.next,b=yO(h,i);b===0?(h.next=null,u===null?hp=y:u.next=y,y===null&&(Zl=u)):(u=h,(s!==0||(b&3)!==0)&&(pp=!0)),h=y}gn!==0&&gn!==5||ad(s),rs!==0&&(rs=0)}function yO(s,i){for(var u=s.suspendedLanes,h=s.pingedLanes,y=s.expirationTimes,b=s.pendingLanes&-62914561;0<b;){var A=31-br(b),k=1<<A,H=y[A];H===-1?((k&u)===0||(k&h)!==0)&&(y[A]=kB(k,i)):H<=i&&(s.expiredLanes|=k),b&=~k}if(i=Lt,u=rt,u=yh(s,s===i?u:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),h=s.callbackNode,u===0||s===i&&(_t===2||_t===9)||s.cancelPendingCommit!==null)return h!==null&&h!==null&&Eu(h),s.callbackNode=null,s.callbackPriority=0;if((u&3)===0||xu(s,u)){if(i=u&-u,i===s.callbackPriority)return i;switch(h!==null&&Eu(h),Fy(u)){case 2:case 8:u=Eo;break;case 32:u=ml;break;case 268435456:u=cA;break;default:u=ml}return h=bO.bind(null,s),u=ao(u,h),s.callbackPriority=i,s.callbackNode=u,i}return h!==null&&h!==null&&Eu(h),s.callbackPriority=2,s.callbackNode=null,2}function bO(s,i){if(gn!==0&&gn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var u=s.callbackNode;if(fp()&&s.callbackNode!==u)return null;var h=rt;return h=yh(s,s===Lt?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),h===0?null:(eO(s,h,i),yO(s,Bn()),s.callbackNode!=null&&s.callbackNode===u?bO.bind(null,s):null)}function SO(s,i){if(fp())return null;eO(s,i,!0)}function lq(){Sq(function(){(yt&6)!==0?ao(On,iq):vO()})}function x0(){if(rs===0){var s=kl;s===0&&(s=mh,mh<<=1,(mh&261888)===0&&(mh=256)),rs=s}return rs}function CO(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Eh(""+s)}function EO(s,i){var u=i.ownerDocument.createElement("input");return u.name=i.name,u.value=i.value,s.id&&u.setAttribute("form",s.id),i.parentNode.insertBefore(u,i),s=new FormData(s),u.parentNode.removeChild(u),s}function cq(s,i,u,h,y){if(i==="submit"&&u&&u.stateNode===y){var b=CO((y[er]||null).action),A=h.submitter;A&&(i=(i=A[er]||null)?CO(i.formAction):A.getAttribute("formAction"),i!==null&&(b=i,A=null));var k=new Ih("action","action",null,h,y);s.push({event:k,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(rs!==0){var H=A?EO(y,A):new FormData(y);qb(u,{pending:!0,data:H,method:y.method,action:b},null,H)}}else typeof b=="function"&&(k.preventDefault(),H=A?EO(y,A):new FormData(y),qb(u,{pending:!0,data:H,method:y.method,action:b},b,H))},currentTarget:y}]})}}for(var _0=0;_0<ib.length;_0++){var I0=ib[_0],uq=I0.toLowerCase(),dq=I0[0].toUpperCase()+I0.slice(1);so(uq,"on"+dq)}so(JA,"onAnimationEnd"),so(eT,"onAnimationIteration"),so(tT,"onAnimationStart"),so("dblclick","onDoubleClick"),so("focusin","onFocus"),so("focusout","onBlur"),so(AH,"onTransitionRun"),so(TH,"onTransitionStart"),so(RH,"onTransitionCancel"),so(nT,"onTransitionEnd"),Sl("onMouseEnter",["mouseout","mouseover"]),Sl("onMouseLeave",["mouseout","mouseover"]),Sl("onPointerEnter",["pointerout","pointerover"]),Sl("onPointerLeave",["pointerout","pointerover"]),ti("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ti("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ti("onBeforeInput",["compositionend","keypress","textInput","paste"]),ti("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ti("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ti("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var sd="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),fq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sd));function wO(s,i){i=(i&4)!==0;for(var u=0;u<s.length;u++){var h=s[u],y=h.event;h=h.listeners;e:{var b=void 0;if(i)for(var A=h.length-1;0<=A;A--){var k=h[A],H=k.instance,Y=k.currentTarget;if(k=k.listener,H!==b&&y.isPropagationStopped())break e;b=k,y.currentTarget=Y;try{b(y)}catch(ne){Rh(ne)}y.currentTarget=null,b=H}else for(A=0;A<h.length;A++){if(k=h[A],H=k.instance,Y=k.currentTarget,k=k.listener,H!==b&&y.isPropagationStopped())break e;b=k,y.currentTarget=Y;try{b(y)}catch(ne){Rh(ne)}y.currentTarget=null,b=H}}}}function tt(s,i){var u=i[zy];u===void 0&&(u=i[zy]=new Set);var h=s+"__bubble";u.has(h)||(xO(i,s,2,!1),u.add(h))}function A0(s,i,u){var h=0;i&&(h|=4),xO(u,s,h,i)}var mp="_reactListening"+Math.random().toString(36).slice(2);function T0(s){if(!s[mp]){s[mp]=!0,vA.forEach(function(u){u!=="selectionchange"&&(fq.has(u)||A0(u,!1,s),A0(u,!0,s))});var i=s.nodeType===9?s:s.ownerDocument;i===null||i[mp]||(i[mp]=!0,A0("selectionchange",!1,i))}}function xO(s,i,u,h){switch(JO(i)){case 2:var y=$q;break;case 8:y=jq;break;default:y=H0}u=y.bind(null,i,u,s),y=void 0,!Ky||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(y=!0),h?y!==void 0?s.addEventListener(i,u,{capture:!0,passive:y}):s.addEventListener(i,u,!0):y!==void 0?s.addEventListener(i,u,{passive:y}):s.addEventListener(i,u,!1)}function R0(s,i,u,h,y){var b=h;if((i&1)===0&&(i&2)===0&&h!==null)e:for(;;){if(h===null)return;var A=h.tag;if(A===3||A===4){var k=h.stateNode.containerInfo;if(k===y)break;if(A===4)for(A=h.return;A!==null;){var H=A.tag;if((H===3||H===4)&&A.stateNode.containerInfo===y)return;A=A.return}for(;k!==null;){if(A=vl(k),A===null)return;if(H=A.tag,H===5||H===6||H===26||H===27){h=b=A;continue e}k=k.parentNode}}h=h.return}RA(function(){var Y=b,ne=Wy(u),se=[];e:{var Q=rT.get(s);if(Q!==void 0){var J=Ih,_e=s;switch(s){case"keypress":if(xh(u)===0)break e;case"keydown":case"keyup":J=aH;break;case"focusin":_e="focus",J=Xy;break;case"focusout":_e="blur",J=Xy;break;case"beforeblur":case"afterblur":J=Xy;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=NA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=GB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=lH;break;case JA:case eT:case tT:J=YB;break;case nT:J=uH;break;case"scroll":case"scrollend":J=VB;break;case"wheel":J=fH;break;case"copy":case"cut":case"paste":J=XB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=kA;break;case"toggle":case"beforetoggle":J=pH}var Le=(i&4)!==0,Ot=!Le&&(s==="scroll"||s==="scrollend"),K=Le?Q!==null?Q+"Capture":null:Q;Le=[];for(var V=Y,Z;V!==null;){var oe=V;if(Z=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Z===null||K===null||(oe=Tu(V,K),oe!=null&&Le.push(id(V,oe,Z))),Ot)break;V=V.return}0<Le.length&&(Q=new J(Q,_e,null,u,ne),se.push({event:Q,listeners:Le}))}}if((i&7)===0){e:{if(Q=s==="mouseover"||s==="pointerover",J=s==="mouseout"||s==="pointerout",Q&&u!==Vy&&(_e=u.relatedTarget||u.fromElement)&&(vl(_e)||_e[gl]))break e;if((J||Q)&&(Q=ne.window===ne?ne:(Q=ne.ownerDocument)?Q.defaultView||Q.parentWindow:window,J?(_e=u.relatedTarget||u.toElement,J=Y,_e=_e?vl(_e):null,_e!==null&&(Ot=a(_e),Le=_e.tag,_e!==Ot||Le!==5&&Le!==27&&Le!==6)&&(_e=null)):(J=null,_e=Y),J!==_e)){if(Le=NA,oe="onMouseLeave",K="onMouseEnter",V="mouse",(s==="pointerout"||s==="pointerover")&&(Le=kA,oe="onPointerLeave",K="onPointerEnter",V="pointer"),Ot=J==null?Q:Au(J),Z=_e==null?Q:Au(_e),Q=new Le(oe,V+"leave",J,u,ne),Q.target=Ot,Q.relatedTarget=Z,oe=null,vl(ne)===Y&&(Le=new Le(K,V+"enter",_e,u,ne),Le.target=Z,Le.relatedTarget=Ot,oe=Le),Ot=oe,J&&_e)t:{for(Le=hq,K=J,V=_e,Z=0,oe=K;oe;oe=Le(oe))Z++;oe=0;for(var De=V;De;De=Le(De))oe++;for(;0<Z-oe;)K=Le(K),Z--;for(;0<oe-Z;)V=Le(V),oe--;for(;Z--;){if(K===V||V!==null&&K===V.alternate){Le=K;break t}K=Le(K),V=Le(V)}Le=null}else Le=null;J!==null&&_O(se,Q,J,Le,!1),_e!==null&&Ot!==null&&_O(se,Ot,_e,Le,!0)}}e:{if(Q=Y?Au(Y):window,J=Q.nodeName&&Q.nodeName.toLowerCase(),J==="select"||J==="input"&&Q.type==="file")var pt=BA;else if($A(Q))if(HA)pt=xH;else{pt=EH;var Re=CH}else J=Q.nodeName,!J||J.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?Y&&qy(Y.elementType)&&(pt=BA):pt=wH;if(pt&&(pt=pt(s,Y))){jA(se,pt,u,ne);break e}Re&&Re(s,Q,Y),s==="focusout"&&Y&&Q.type==="number"&&Y.memoizedProps.value!=null&&Hy(Q,"number",Q.value)}switch(Re=Y?Au(Y):window,s){case"focusin":($A(Re)||Re.contentEditable==="true")&&(Il=Re,ob=Y,Lu=null);break;case"focusout":Lu=ob=Il=null;break;case"mousedown":ab=!0;break;case"contextmenu":case"mouseup":case"dragend":ab=!1,QA(se,u,ne);break;case"selectionchange":if(IH)break;case"keydown":case"keyup":QA(se,u,ne)}var Ye;if(eb)e:{switch(s){case"compositionstart":var ot="onCompositionStart";break e;case"compositionend":ot="onCompositionEnd";break e;case"compositionupdate":ot="onCompositionUpdate";break e}ot=void 0}else _l?FA(s,u)&&(ot="onCompositionEnd"):s==="keydown"&&u.keyCode===229&&(ot="onCompositionStart");ot&&(DA&&u.locale!=="ko"&&(_l||ot!=="onCompositionStart"?ot==="onCompositionEnd"&&_l&&(Ye=OA()):(ja=ne,Zy="value"in ja?ja.value:ja.textContent,_l=!0)),Re=gp(Y,ot),0<Re.length&&(ot=new PA(ot,s,null,u,ne),se.push({event:ot,listeners:Re}),Ye?ot.data=Ye:(Ye=zA(u),Ye!==null&&(ot.data=Ye)))),(Ye=gH?vH(s,u):yH(s,u))&&(ot=gp(Y,"onBeforeInput"),0<ot.length&&(Re=new PA("onBeforeInput","beforeinput",null,u,ne),se.push({event:Re,listeners:ot}),Re.data=Ye)),cq(se,s,Y,u,ne)}wO(se,i)})}function id(s,i,u){return{instance:s,listener:i,currentTarget:u}}function gp(s,i){for(var u=i+"Capture",h=[];s!==null;){var y=s,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=Tu(s,u),y!=null&&h.unshift(id(s,y,b)),y=Tu(s,i),y!=null&&h.push(id(s,y,b))),s.tag===3)return h;s=s.return}return[]}function hq(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function _O(s,i,u,h,y){for(var b=i._reactName,A=[];u!==null&&u!==h;){var k=u,H=k.alternate,Y=k.stateNode;if(k=k.tag,H!==null&&H===h)break;k!==5&&k!==26&&k!==27||Y===null||(H=Y,y?(Y=Tu(u,b),Y!=null&&A.unshift(id(u,Y,H))):y||(Y=Tu(u,b),Y!=null&&A.push(id(u,Y,H)))),u=u.return}A.length!==0&&s.push({event:i,listeners:A})}var pq=/\r\n?/g,mq=/\u0000|\uFFFD/g;function IO(s){return(typeof s=="string"?s:""+s).replace(pq,`
88
+ `).replace(mq,"")}function AO(s,i){return i=IO(i),IO(s)===i}function Rt(s,i,u,h,y,b){switch(u){case"children":typeof h=="string"?i==="body"||i==="textarea"&&h===""||El(s,h):(typeof h=="number"||typeof h=="bigint")&&i!=="body"&&El(s,""+h);break;case"className":Sh(s,"class",h);break;case"tabIndex":Sh(s,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Sh(s,u,h);break;case"style":AA(s,h,b);break;case"data":if(i!=="object"){Sh(s,"data",h);break}case"src":case"href":if(h===""&&(i!=="a"||u!=="href")){s.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){s.removeAttribute(u);break}h=Eh(""+h),s.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){s.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(u==="formAction"?(i!=="input"&&Rt(s,i,"name",y.name,y,null),Rt(s,i,"formEncType",y.formEncType,y,null),Rt(s,i,"formMethod",y.formMethod,y,null),Rt(s,i,"formTarget",y.formTarget,y,null)):(Rt(s,i,"encType",y.encType,y,null),Rt(s,i,"method",y.method,y,null),Rt(s,i,"target",y.target,y,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){s.removeAttribute(u);break}h=Eh(""+h),s.setAttribute(u,h);break;case"onClick":h!=null&&(s.onclick=Ko);break;case"onScroll":h!=null&&tt("scroll",s);break;case"onScrollEnd":h!=null&&tt("scrollend",s);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(r(60));s.innerHTML=u}}break;case"multiple":s.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":s.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){s.removeAttribute("xlink:href");break}u=Eh(""+h),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?s.setAttribute(u,""+h):s.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?s.setAttribute(u,""):s.removeAttribute(u);break;case"capture":case"download":h===!0?s.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?s.setAttribute(u,h):s.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?s.setAttribute(u,h):s.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?s.removeAttribute(u):s.setAttribute(u,h);break;case"popover":tt("beforetoggle",s),tt("toggle",s),bh(s,"popover",h);break;case"xlinkActuate":Go(s,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Go(s,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Go(s,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Go(s,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Go(s,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Go(s,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Go(s,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Go(s,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Go(s,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":bh(s,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=HB.get(u)||u,bh(s,u,h))}}function O0(s,i,u,h,y,b){switch(u){case"style":AA(s,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(y.children!=null)throw Error(r(60));s.innerHTML=u}}break;case"children":typeof h=="string"?El(s,h):(typeof h=="number"||typeof h=="bigint")&&El(s,""+h);break;case"onScroll":h!=null&&tt("scroll",s);break;case"onScrollEnd":h!=null&&tt("scrollend",s);break;case"onClick":h!=null&&(s.onclick=Ko);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yA.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),i=u.slice(2,y?u.length-7:void 0),b=s[er]||null,b=b!=null?b[u]:null,typeof b=="function"&&s.removeEventListener(i,b,y),typeof h=="function")){typeof b!="function"&&b!==null&&(u in s?s[u]=null:s.hasAttribute(u)&&s.removeAttribute(u)),s.addEventListener(i,h,y);break e}u in s?s[u]=h:h===!0?s.setAttribute(u,""):bh(s,u,h)}}}function Dn(s,i,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tt("error",s),tt("load",s);var h=!1,y=!1,b;for(b in u)if(u.hasOwnProperty(b)){var A=u[b];if(A!=null)switch(b){case"src":h=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Rt(s,i,b,A,u,null)}}y&&Rt(s,i,"srcSet",u.srcSet,u,null),h&&Rt(s,i,"src",u.src,u,null);return;case"input":tt("invalid",s);var k=b=A=y=null,H=null,Y=null;for(h in u)if(u.hasOwnProperty(h)){var ne=u[h];if(ne!=null)switch(h){case"name":y=ne;break;case"type":A=ne;break;case"checked":H=ne;break;case"defaultChecked":Y=ne;break;case"value":b=ne;break;case"defaultValue":k=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,i));break;default:Rt(s,i,h,ne,u,null)}}wA(s,b,k,H,Y,A,y,!1);return;case"select":tt("invalid",s),h=A=b=null;for(y in u)if(u.hasOwnProperty(y)&&(k=u[y],k!=null))switch(y){case"value":b=k;break;case"defaultValue":A=k;break;case"multiple":h=k;default:Rt(s,i,y,k,u,null)}i=b,u=A,s.multiple=!!h,i!=null?Cl(s,!!h,i,!1):u!=null&&Cl(s,!!h,u,!0);return;case"textarea":tt("invalid",s),b=y=h=null;for(A in u)if(u.hasOwnProperty(A)&&(k=u[A],k!=null))switch(A){case"value":h=k;break;case"defaultValue":y=k;break;case"children":b=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:Rt(s,i,A,k,u,null)}_A(s,h,y,b);return;case"option":for(H in u)u.hasOwnProperty(H)&&(h=u[H],h!=null)&&(H==="selected"?s.selected=h&&typeof h!="function"&&typeof h!="symbol":Rt(s,i,H,h,u,null));return;case"dialog":tt("beforetoggle",s),tt("toggle",s),tt("cancel",s),tt("close",s);break;case"iframe":case"object":tt("load",s);break;case"video":case"audio":for(h=0;h<sd.length;h++)tt(sd[h],s);break;case"image":tt("error",s),tt("load",s);break;case"details":tt("toggle",s);break;case"embed":case"source":case"link":tt("error",s),tt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in u)if(u.hasOwnProperty(Y)&&(h=u[Y],h!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:Rt(s,i,Y,h,u,null)}return;default:if(qy(i)){for(ne in u)u.hasOwnProperty(ne)&&(h=u[ne],h!==void 0&&O0(s,i,ne,h,u,void 0));return}}for(k in u)u.hasOwnProperty(k)&&(h=u[k],h!=null&&Rt(s,i,k,h,u,null))}function gq(s,i,u,h){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,A=null,k=null,H=null,Y=null,ne=null;for(J in u){var se=u[J];if(u.hasOwnProperty(J)&&se!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":H=se;default:h.hasOwnProperty(J)||Rt(s,i,J,null,h,se)}}for(var Q in h){var J=h[Q];if(se=u[Q],h.hasOwnProperty(Q)&&(J!=null||se!=null))switch(Q){case"type":b=J;break;case"name":y=J;break;case"checked":Y=J;break;case"defaultChecked":ne=J;break;case"value":A=J;break;case"defaultValue":k=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,i));break;default:J!==se&&Rt(s,i,Q,J,h,se)}}By(s,A,k,H,Y,ne,b,y);return;case"select":J=A=k=Q=null;for(b in u)if(H=u[b],u.hasOwnProperty(b)&&H!=null)switch(b){case"value":break;case"multiple":J=H;default:h.hasOwnProperty(b)||Rt(s,i,b,null,h,H)}for(y in h)if(b=h[y],H=u[y],h.hasOwnProperty(y)&&(b!=null||H!=null))switch(y){case"value":Q=b;break;case"defaultValue":k=b;break;case"multiple":A=b;default:b!==H&&Rt(s,i,y,b,h,H)}i=k,u=A,h=J,Q!=null?Cl(s,!!u,Q,!1):!!h!=!!u&&(i!=null?Cl(s,!!u,i,!0):Cl(s,!!u,u?[]:"",!1));return;case"textarea":J=Q=null;for(k in u)if(y=u[k],u.hasOwnProperty(k)&&y!=null&&!h.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Rt(s,i,k,null,h,y)}for(A in h)if(y=h[A],b=u[A],h.hasOwnProperty(A)&&(y!=null||b!=null))switch(A){case"value":Q=y;break;case"defaultValue":J=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(r(91));break;default:y!==b&&Rt(s,i,A,y,h,b)}xA(s,Q,J);return;case"option":for(var _e in u)Q=u[_e],u.hasOwnProperty(_e)&&Q!=null&&!h.hasOwnProperty(_e)&&(_e==="selected"?s.selected=!1:Rt(s,i,_e,null,h,Q));for(H in h)Q=h[H],J=u[H],h.hasOwnProperty(H)&&Q!==J&&(Q!=null||J!=null)&&(H==="selected"?s.selected=Q&&typeof Q!="function"&&typeof Q!="symbol":Rt(s,i,H,Q,h,J));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Le in u)Q=u[Le],u.hasOwnProperty(Le)&&Q!=null&&!h.hasOwnProperty(Le)&&Rt(s,i,Le,null,h,Q);for(Y in h)if(Q=h[Y],J=u[Y],h.hasOwnProperty(Y)&&Q!==J&&(Q!=null||J!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,i));break;default:Rt(s,i,Y,Q,h,J)}return;default:if(qy(i)){for(var Ot in u)Q=u[Ot],u.hasOwnProperty(Ot)&&Q!==void 0&&!h.hasOwnProperty(Ot)&&O0(s,i,Ot,void 0,h,Q);for(ne in h)Q=h[ne],J=u[ne],!h.hasOwnProperty(ne)||Q===J||Q===void 0&&J===void 0||O0(s,i,ne,Q,h,J);return}}for(var K in u)Q=u[K],u.hasOwnProperty(K)&&Q!=null&&!h.hasOwnProperty(K)&&Rt(s,i,K,null,h,Q);for(se in h)Q=h[se],J=u[se],!h.hasOwnProperty(se)||Q===J||Q==null&&J==null||Rt(s,i,se,Q,h,J)}function TO(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vq(){if(typeof performance.getEntriesByType=="function"){for(var s=0,i=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var y=u[h],b=y.transferSize,A=y.initiatorType,k=y.duration;if(b&&k&&TO(A)){for(A=0,k=y.responseEnd,h+=1;h<u.length;h++){var H=u[h],Y=H.startTime;if(Y>k)break;var ne=H.transferSize,se=H.initiatorType;ne&&TO(se)&&(H=H.responseEnd,A+=ne*(H<k?1:(k-Y)/(H-Y)))}if(--h,i+=8*(b+A)/(y.duration/1e3),s++,10<s)break}}if(0<s)return i/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var M0=null,N0=null;function vp(s){return s.nodeType===9?s:s.ownerDocument}function RO(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function OO(s,i){if(s===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&i==="foreignObject"?0:s}function P0(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var k0=null;function yq(){var s=window.event;return s&&s.type==="popstate"?s===k0?!1:(k0=s,!0):(k0=null,!1)}var MO=typeof setTimeout=="function"?setTimeout:void 0,bq=typeof clearTimeout=="function"?clearTimeout:void 0,NO=typeof Promise=="function"?Promise:void 0,Sq=typeof queueMicrotask=="function"?queueMicrotask:typeof NO<"u"?function(s){return NO.resolve(null).then(s).catch(Cq)}:MO;function Cq(s){setTimeout(function(){throw s})}function os(s){return s==="head"}function PO(s,i){var u=i,h=0;do{var y=u.nextSibling;if(s.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(h===0){s.removeChild(y),Jl(i);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")ld(s.ownerDocument.documentElement);else if(u==="head"){u=s.ownerDocument.head,ld(u);for(var b=u.firstChild;b;){var A=b.nextSibling,k=b.nodeName;b[Iu]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=A}}else u==="body"&&ld(s.ownerDocument.body);u=y}while(u);Jl(i)}function kO(s,i){var u=s;s=0;do{var h=u.nextSibling;if(u.nodeType===1?i?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(i?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(s===0)break;s--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||s++;u=h}while(u)}function D0(s){var i=s.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var u=i;switch(i=i.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":D0(u),$y(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}s.removeChild(u)}}function Eq(s,i,u,h){for(;s.nodeType===1;){var y=u;if(s.nodeName.toLowerCase()!==i.toLowerCase()){if(!h&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(h){if(!s[Iu])switch(i){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(b=s.getAttribute("rel"),b==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(b!==y.rel||s.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||s.getAttribute("title")!==(y.title==null?null:y.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(b=s.getAttribute("src"),(b!==(y.src==null?null:y.src)||s.getAttribute("type")!==(y.type==null?null:y.type)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(i==="input"&&s.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&s.getAttribute("name")===b)return s}else return s;if(s=Vr(s.nextSibling),s===null)break}return null}function wq(s,i,u){if(i==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!u||(s=Vr(s.nextSibling),s===null))return null;return s}function DO(s,i){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!i||(s=Vr(s.nextSibling),s===null))return null;return s}function L0(s){return s.data==="$?"||s.data==="$~"}function U0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function xq(s,i){var u=s.ownerDocument;if(s.data==="$~")s._reactRetry=i;else if(s.data!=="$?"||u.readyState!=="loading")i();else{var h=function(){i(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),s._reactRetry=h}}function Vr(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return s}var F0=null;function LO(s){s=s.nextSibling;for(var i=0;s;){if(s.nodeType===8){var u=s.data;if(u==="/$"||u==="/&"){if(i===0)return Vr(s.nextSibling);i--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||i++}s=s.nextSibling}return null}function UO(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var u=s.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(i===0)return s;i--}else u!=="/$"&&u!=="/&"||i++}s=s.previousSibling}return null}function FO(s,i,u){switch(i=vp(u),s){case"html":if(s=i.documentElement,!s)throw Error(r(452));return s;case"head":if(s=i.head,!s)throw Error(r(453));return s;case"body":if(s=i.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function ld(s){for(var i=s.attributes;i.length;)s.removeAttributeNode(i[0]);$y(s)}var Wr=new Map,zO=new Set;function yp(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var ua=ee.d;ee.d={f:_q,r:Iq,D:Aq,C:Tq,L:Rq,m:Oq,X:Nq,S:Mq,M:Pq};function _q(){var s=ua.f(),i=cp();return s||i}function Iq(s){var i=yl(s);i!==null&&i.tag===5&&i.type==="form"?nR(i):ua.r(s)}var Yl=typeof document>"u"?null:document;function $O(s,i,u){var h=Yl;if(h&&typeof i=="string"&&i){var y=Fr(i);y='link[rel="'+s+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),zO.has(y)||(zO.add(y),s={rel:s,crossOrigin:u,href:i},h.querySelector(y)===null&&(i=h.createElement("link"),Dn(i,"link",s),En(i),h.head.appendChild(i)))}}function Aq(s){ua.D(s),$O("dns-prefetch",s,null)}function Tq(s,i){ua.C(s,i),$O("preconnect",s,i)}function Rq(s,i,u){ua.L(s,i,u);var h=Yl;if(h&&s&&i){var y='link[rel="preload"][as="'+Fr(i)+'"]';i==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+Fr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+Fr(u.imageSizes)+'"]')):y+='[href="'+Fr(s)+'"]';var b=y;switch(i){case"style":b=Ql(s);break;case"script":b=Xl(s)}Wr.has(b)||(s=m({rel:"preload",href:i==="image"&&u&&u.imageSrcSet?void 0:s,as:i},u),Wr.set(b,s),h.querySelector(y)!==null||i==="style"&&h.querySelector(cd(b))||i==="script"&&h.querySelector(ud(b))||(i=h.createElement("link"),Dn(i,"link",s),En(i),h.head.appendChild(i)))}}function Oq(s,i){ua.m(s,i);var u=Yl;if(u&&s){var h=i&&typeof i.as=="string"?i.as:"script",y='link[rel="modulepreload"][as="'+Fr(h)+'"][href="'+Fr(s)+'"]',b=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Xl(s)}if(!Wr.has(b)&&(s=m({rel:"modulepreload",href:s},i),Wr.set(b,s),u.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(ud(b)))return}h=u.createElement("link"),Dn(h,"link",s),En(h),u.head.appendChild(h)}}}function Mq(s,i,u){ua.S(s,i,u);var h=Yl;if(h&&s){var y=bl(h).hoistableStyles,b=Ql(s);i=i||"default";var A=y.get(b);if(!A){var k={loading:0,preload:null};if(A=h.querySelector(cd(b)))k.loading=5;else{s=m({rel:"stylesheet",href:s,"data-precedence":i},u),(u=Wr.get(b))&&z0(s,u);var H=A=h.createElement("link");En(H),Dn(H,"link",s),H._p=new Promise(function(Y,ne){H.onload=Y,H.onerror=ne}),H.addEventListener("load",function(){k.loading|=1}),H.addEventListener("error",function(){k.loading|=2}),k.loading|=4,bp(A,i,h)}A={type:"stylesheet",instance:A,count:1,state:k},y.set(b,A)}}}function Nq(s,i){ua.X(s,i);var u=Yl;if(u&&s){var h=bl(u).hoistableScripts,y=Xl(s),b=h.get(y);b||(b=u.querySelector(ud(y)),b||(s=m({src:s,async:!0},i),(i=Wr.get(y))&&$0(s,i),b=u.createElement("script"),En(b),Dn(b,"link",s),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(y,b))}}function Pq(s,i){ua.M(s,i);var u=Yl;if(u&&s){var h=bl(u).hoistableScripts,y=Xl(s),b=h.get(y);b||(b=u.querySelector(ud(y)),b||(s=m({src:s,async:!0,type:"module"},i),(i=Wr.get(y))&&$0(s,i),b=u.createElement("script"),En(b),Dn(b,"link",s),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(y,b))}}function jO(s,i,u,h){var y=(y=Fe.current)?yp(y):null;if(!y)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(i=Ql(u.href),u=bl(y).hoistableStyles,h=u.get(i),h||(h={type:"style",instance:null,count:0,state:null},u.set(i,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){s=Ql(u.href);var b=bl(y).hoistableStyles,A=b.get(s);if(A||(y=y.ownerDocument||y,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(s,A),(b=y.querySelector(cd(s)))&&!b._p&&(A.instance=b,A.state.loading=5),Wr.has(s)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Wr.set(s,u),b||kq(y,s,u,A.state))),i&&h===null)throw Error(r(528,""));return A}if(i&&h!==null)throw Error(r(529,""));return null;case"script":return i=u.async,u=u.src,typeof u=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Xl(u),u=bl(y).hoistableScripts,h=u.get(i),h||(h={type:"script",instance:null,count:0,state:null},u.set(i,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Ql(s){return'href="'+Fr(s)+'"'}function cd(s){return'link[rel="stylesheet"]['+s+"]"}function BO(s){return m({},s,{"data-precedence":s.precedence,precedence:null})}function kq(s,i,u,h){s.querySelector('link[rel="preload"][as="style"]['+i+"]")?h.loading=1:(i=s.createElement("link"),h.preload=i,i.addEventListener("load",function(){return h.loading|=1}),i.addEventListener("error",function(){return h.loading|=2}),Dn(i,"link",u),En(i),s.head.appendChild(i))}function Xl(s){return'[src="'+Fr(s)+'"]'}function ud(s){return"script[async]"+s}function HO(s,i,u){if(i.count++,i.instance===null)switch(i.type){case"style":var h=s.querySelector('style[data-href~="'+Fr(u.href)+'"]');if(h)return i.instance=h,En(h),h;var y=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(s.ownerDocument||s).createElement("style"),En(h),Dn(h,"style",y),bp(h,u.precedence,s),i.instance=h;case"stylesheet":y=Ql(u.href);var b=s.querySelector(cd(y));if(b)return i.state.loading|=4,i.instance=b,En(b),b;h=BO(u),(y=Wr.get(y))&&z0(h,y),b=(s.ownerDocument||s).createElement("link"),En(b);var A=b;return A._p=new Promise(function(k,H){A.onload=k,A.onerror=H}),Dn(b,"link",h),i.state.loading|=4,bp(b,u.precedence,s),i.instance=b;case"script":return b=Xl(u.src),(y=s.querySelector(ud(b)))?(i.instance=y,En(y),y):(h=u,(y=Wr.get(b))&&(h=m({},u),$0(h,y)),s=s.ownerDocument||s,y=s.createElement("script"),En(y),Dn(y,"link",h),s.head.appendChild(y),i.instance=y);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(h=i.instance,i.state.loading|=4,bp(h,u.precedence,s));return i.instance}function bp(s,i,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,b=y,A=0;A<h.length;A++){var k=h[A];if(k.dataset.precedence===i)b=k;else if(b!==y)break}b?b.parentNode.insertBefore(s,b.nextSibling):(i=u.nodeType===9?u.head:u,i.insertBefore(s,i.firstChild))}function z0(s,i){s.crossOrigin==null&&(s.crossOrigin=i.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=i.referrerPolicy),s.title==null&&(s.title=i.title)}function $0(s,i){s.crossOrigin==null&&(s.crossOrigin=i.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=i.referrerPolicy),s.integrity==null&&(s.integrity=i.integrity)}var Sp=null;function qO(s,i,u){if(Sp===null){var h=new Map,y=Sp=new Map;y.set(u,h)}else y=Sp,h=y.get(u),h||(h=new Map,y.set(u,h));if(h.has(s))return h;for(h.set(s,null),u=u.getElementsByTagName(s),y=0;y<u.length;y++){var b=u[y];if(!(b[Iu]||b[Mn]||s==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var A=b.getAttribute(i)||"";A=s+A;var k=h.get(A);k?k.push(b):h.set(A,[b])}}return h}function VO(s,i,u){s=s.ownerDocument||s,s.head.insertBefore(u,i==="title"?s.querySelector("head > title"):null)}function Dq(s,i,u){if(u===1||i.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(s=i.disabled,typeof i.precedence=="string"&&s==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function WO(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function Lq(s,i,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=Ql(h.href),b=i.querySelector(cd(y));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(s.count++,s=Cp.bind(s),i.then(s,s)),u.state.loading|=4,u.instance=b,En(b);return}b=i.ownerDocument||i,h=BO(h),(y=Wr.get(y))&&z0(h,y),b=b.createElement("link"),En(b);var A=b;A._p=new Promise(function(k,H){A.onload=k,A.onerror=H}),Dn(b,"link",h),u.instance=b}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(u,i),(i=u.state.preload)&&(u.state.loading&3)===0&&(s.count++,u=Cp.bind(s),i.addEventListener("load",u),i.addEventListener("error",u))}}var j0=0;function Uq(s,i){return s.stylesheets&&s.count===0&&wp(s,s.stylesheets),0<s.count||0<s.imgCount?function(u){var h=setTimeout(function(){if(s.stylesheets&&wp(s,s.stylesheets),s.unsuspend){var b=s.unsuspend;s.unsuspend=null,b()}},6e4+i);0<s.imgBytes&&j0===0&&(j0=62500*vq());var y=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&wp(s,s.stylesheets),s.unsuspend)){var b=s.unsuspend;s.unsuspend=null,b()}},(s.imgBytes>j0?50:800)+i);return s.unsuspend=u,function(){s.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function Cp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wp(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Ep=null;function wp(s,i){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Ep=new Map,i.forEach(Fq,s),Ep=null,Cp.call(s))}function Fq(s,i){if(!(i.state.loading&4)){var u=Ep.get(s);if(u)var h=u.get(null);else{u=new Map,Ep.set(s,u);for(var y=s.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var A=y[b];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(u.set(A.dataset.precedence,A),h=A)}h&&u.set(null,h)}y=i.instance,A=y.getAttribute("data-precedence"),b=u.get(A)||h,b===h&&u.set(null,y),u.set(A,y),this.count++,h=Cp.bind(this),y.addEventListener("load",h),y.addEventListener("error",h),b?b.parentNode.insertBefore(y,b.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(y,s.firstChild)),i.state.loading|=4}}var dd={$$typeof:T,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function zq(s,i,u,h,y,b,A,k,H){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ly(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ly(0),this.hiddenUpdates=Ly(null),this.identifierPrefix=h,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function GO(s,i,u,h,y,b,A,k,H,Y,ne,se){return s=new zq(s,i,u,A,H,Y,ne,se,k),i=1,b===!0&&(i|=24),b=Cr(3,null,null,i),s.current=b,b.stateNode=s,i=Sb(),i.refCount++,s.pooledCache=i,i.refCount++,b.memoizedState={element:h,isDehydrated:u,cache:i},xb(b),s}function KO(s){return s?(s=Rl,s):Rl}function ZO(s,i,u,h,y,b){y=KO(y),h.context===null?h.context=y:h.pendingContext=y,h=Ga(i),h.payload={element:u},b=b===void 0?null:b,b!==null&&(h.callback=b),u=Ka(s,h,i),u!==null&&(sr(u,s,i),Hu(u,s,i))}function YO(s,i){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var u=s.retryLane;s.retryLane=u!==0&&u<i?u:i}}function B0(s,i){YO(s,i),(s=s.alternate)&&YO(s,i)}function QO(s){if(s.tag===13||s.tag===31){var i=ai(s,67108864);i!==null&&sr(i,s,67108864),B0(s,67108864)}}function XO(s){if(s.tag===13||s.tag===31){var i=Ir();i=Uy(i);var u=ai(s,i);u!==null&&sr(u,s,i),B0(s,i)}}var xp=!0;function $q(s,i,u,h){var y=W.T;W.T=null;var b=ee.p;try{ee.p=2,H0(s,i,u,h)}finally{ee.p=b,W.T=y}}function jq(s,i,u,h){var y=W.T;W.T=null;var b=ee.p;try{ee.p=8,H0(s,i,u,h)}finally{ee.p=b,W.T=y}}function H0(s,i,u,h){if(xp){var y=q0(h);if(y===null)R0(s,i,h,_p,u),eM(s,h);else if(Hq(y,s,i,u,h))h.stopPropagation();else if(eM(s,h),i&4&&-1<Bq.indexOf(s)){for(;y!==null;){var b=yl(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var A=ei(b.pendingLanes);if(A!==0){var k=b;for(k.pendingLanes|=2,k.entangledLanes|=2;A;){var H=1<<31-br(A);k.entanglements[1]|=H,A&=~H}Io(b),(yt&6)===0&&(ip=Bn()+500,ad(0))}}break;case 31:case 13:k=ai(b,2),k!==null&&sr(k,b,2),cp(),B0(b,2)}if(b=q0(h),b===null&&R0(s,i,h,_p,u),b===y)break;y=b}y!==null&&h.stopPropagation()}else R0(s,i,h,null,u)}}function q0(s){return s=Wy(s),V0(s)}var _p=null;function V0(s){if(_p=null,s=vl(s),s!==null){var i=a(s);if(i===null)s=null;else{var u=i.tag;if(u===13){if(s=l(i),s!==null)return s;s=null}else if(u===31){if(s=c(i),s!==null)return s;s=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;s=null}else i!==s&&(s=null)}}return _p=s,null}function JO(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ut()){case On:return 2;case Eo:return 8;case ml:case TB:return 32;case cA:return 268435456;default:return 32}default:return 32}}var W0=!1,as=null,ss=null,is=null,fd=new Map,hd=new Map,ls=[],Bq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function eM(s,i){switch(s){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ss=null;break;case"mouseover":case"mouseout":is=null;break;case"pointerover":case"pointerout":fd.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":hd.delete(i.pointerId)}}function pd(s,i,u,h,y,b){return s===null||s.nativeEvent!==b?(s={blockedOn:i,domEventName:u,eventSystemFlags:h,nativeEvent:b,targetContainers:[y]},i!==null&&(i=yl(i),i!==null&&QO(i)),s):(s.eventSystemFlags|=h,i=s.targetContainers,y!==null&&i.indexOf(y)===-1&&i.push(y),s)}function Hq(s,i,u,h,y){switch(i){case"focusin":return as=pd(as,s,i,u,h,y),!0;case"dragenter":return ss=pd(ss,s,i,u,h,y),!0;case"mouseover":return is=pd(is,s,i,u,h,y),!0;case"pointerover":var b=y.pointerId;return fd.set(b,pd(fd.get(b)||null,s,i,u,h,y)),!0;case"gotpointercapture":return b=y.pointerId,hd.set(b,pd(hd.get(b)||null,s,i,u,h,y)),!0}return!1}function tM(s){var i=vl(s.target);if(i!==null){var u=a(i);if(u!==null){if(i=u.tag,i===13){if(i=l(u),i!==null){s.blockedOn=i,mA(s.priority,function(){XO(u)});return}}else if(i===31){if(i=c(u),i!==null){s.blockedOn=i,mA(s.priority,function(){XO(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){s.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Ip(s){if(s.blockedOn!==null)return!1;for(var i=s.targetContainers;0<i.length;){var u=q0(s.nativeEvent);if(u===null){u=s.nativeEvent;var h=new u.constructor(u.type,u);Vy=h,u.target.dispatchEvent(h),Vy=null}else return i=yl(u),i!==null&&QO(i),s.blockedOn=u,!1;i.shift()}return!0}function nM(s,i,u){Ip(s)&&u.delete(i)}function qq(){W0=!1,as!==null&&Ip(as)&&(as=null),ss!==null&&Ip(ss)&&(ss=null),is!==null&&Ip(is)&&(is=null),fd.forEach(nM),hd.forEach(nM)}function Ap(s,i){s.blockedOn===i&&(s.blockedOn=null,W0||(W0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,qq)))}var Tp=null;function rM(s){Tp!==s&&(Tp=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Tp===s&&(Tp=null);for(var i=0;i<s.length;i+=3){var u=s[i],h=s[i+1],y=s[i+2];if(typeof h!="function"){if(V0(h||u)===null)continue;break}var b=yl(u);b!==null&&(s.splice(i,3),i-=3,qb(b,{pending:!0,data:y,method:u.method,action:h},h,y))}}))}function Jl(s){function i(H){return Ap(H,s)}as!==null&&Ap(as,s),ss!==null&&Ap(ss,s),is!==null&&Ap(is,s),fd.forEach(i),hd.forEach(i);for(var u=0;u<ls.length;u++){var h=ls[u];h.blockedOn===s&&(h.blockedOn=null)}for(;0<ls.length&&(u=ls[0],u.blockedOn===null);)tM(u),u.blockedOn===null&&ls.shift();if(u=(s.ownerDocument||s).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var y=u[h],b=u[h+1],A=y[er]||null;if(typeof b=="function")A||rM(u);else if(A){var k=null;if(b&&b.hasAttribute("formAction")){if(y=b,A=b[er]||null)k=A.formAction;else if(V0(y)!==null)continue}else k=A.action;typeof k=="function"?u[h+1]=k:(u.splice(h,3),h-=3),rM(u)}}}function oM(){function s(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(A){return y=A})},focusReset:"manual",scroll:"manual"})}function i(){y!==null&&(y(),y=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,y=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),y!==null&&(y(),y=null)}}}function G0(s){this._internalRoot=s}Rp.prototype.render=G0.prototype.render=function(s){var i=this._internalRoot;if(i===null)throw Error(r(409));var u=i.current,h=Ir();ZO(u,h,s,i,null,null)},Rp.prototype.unmount=G0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var i=s.containerInfo;ZO(s.current,2,null,s,null,null),cp(),i[gl]=null}};function Rp(s){this._internalRoot=s}Rp.prototype.unstable_scheduleHydration=function(s){if(s){var i=pA();s={blockedOn:null,target:s,priority:i};for(var u=0;u<ls.length&&i!==0&&i<ls[u].priority;u++);ls.splice(u,0,s),u===0&&tM(s)}};var aM=t.version;if(aM!=="19.2.7")throw Error(r(527,aM,"19.2.7"));ee.findDOMNode=function(s){var i=s._reactInternals;if(i===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(i),s=s!==null?p(s):null,s=s===null?null:s.stateNode,s};var Vq={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Op=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Op.isDisabled&&Op.supportsFiber)try{wu=Op.inject(Vq),yr=Op}catch{}}return Nd.createRoot=function(s,i){if(!o(s))throw Error(r(299));var u=!1,h="",y=fR,b=hR,A=pR;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(h=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError)),i=GO(s,1,!1,null,null,u,h,null,y,b,A,oM),s[gl]=i.current,T0(s),new G0(i)},Nd.hydrateRoot=function(s,i,u){if(!o(s))throw Error(r(299));var h=!1,y="",b=fR,A=hR,k=pR,H=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(k=u.onRecoverableError),u.formState!==void 0&&(H=u.formState)),i=GO(s,1,!0,i,u??null,h,y,H,b,A,k,oM),i.context=KO(null),u=i.current,h=Ir(),h=Uy(h),y=Ga(h),y.callback=null,Ka(u,y,h),u=h,i.current.lanes=u,_u(i,u),Io(i),s[gl]=i.current,T0(s),new Rp(i)},Nd.version="19.2.7",Nd}var MD;function rve(){if(MD)return nw.exports;MD=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),nw.exports=nve(),nw.exports}var ove=rve();const ave={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)};function sve({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:o,sseDefaultRetryDelay:a,sseMaxRetryAttempts:l,sseMaxRetryDelay:c,sseSleepFn:d,url:f,...p}){let m;const g=d??(C=>new Promise(w=>setTimeout(w,C)));return{stream:async function*(){let C=a??3e3,w=0;const x=p.signal??new AbortController().signal;for(;!x.aborted;){w++;const I=p.headers instanceof Headers?p.headers:new Headers(p.headers);m!==void 0&&I.set("Last-Event-ID",m);try{const T={redirect:"follow",...p,body:p.serializedBody,headers:I,signal:x};let O=new Request(f,T);e&&(O=await e(f,T));const P=await(p.fetch??globalThis.fetch)(O);if(!P.ok)throw new Error(`SSE failed: ${P.status} ${P.statusText}`);if(!P.body)throw new Error("No body in SSE response");const M=P.body.pipeThrough(new TextDecoderStream).getReader();let L="";const z=()=>{try{M.cancel()}catch{}};x.addEventListener("abort",z);try{for(;;){const{done:G,value:j}=await M.read();if(G)break;L+=j,L=L.replace(/\r\n?/g,`
89
+ `);const F=L.split(`
90
+
91
+ `);L=F.pop()??"";for(const q of F){const X=q.split(`
92
+ `),Se=[];let W;for(const ge of X)if(ge.startsWith("data:"))Se.push(ge.replace(/^data:\s*/,""));else if(ge.startsWith("event:"))W=ge.replace(/^event:\s*/,"");else if(ge.startsWith("id:"))m=ge.replace(/^id:\s*/,"");else if(ge.startsWith("retry:")){const Te=Number.parseInt(ge.replace(/^retry:\s*/,""),10);Number.isNaN(Te)||(C=Te)}let ee,me=!1;if(Se.length){const ge=Se.join(`
93
+ `);try{ee=JSON.parse(ge),me=!0}catch{ee=ge}}me&&(o&&await o(ee),r&&(ee=await r(ee))),n?.({data:ee,event:W,id:m,retry:C}),Se.length&&(yield ee)}}}finally{x.removeEventListener("abort",z),M.releaseLock()}break}catch(T){if(t?.(T),l!==void 0&&w>=l)break;const O=Math.min(C*2**(w-1),c??3e4);await g(O)}}}()}}const ive=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},lve=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},cve=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},J9=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){const c=(e?o:o.map(d=>encodeURIComponent(d))).join(lve(r));switch(r){case"label":return`.${c}`;case"matrix":return`;${n}=${c}`;case"simple":return c;default:return`${n}=${c}`}}const a=ive(r),l=o.map(c=>r==="label"||r==="simple"?e?c:encodeURIComponent(c):Wv({allowReserved:e,name:n,value:c})).join(a);return r==="label"||r==="matrix"?a+l:l},Wv=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},ez=({allowReserved:e,explode:t,name:n,style:r,value:o,valueOnly:a})=>{if(o instanceof Date)return a?o.toISOString():`${n}=${o.toISOString()}`;if(r!=="deepObject"&&!t){let d=[];Object.entries(o).forEach(([p,m])=>{d=[...d,p,e?m:encodeURIComponent(m)]});const f=d.join(",");switch(r){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const l=cve(r),c=Object.entries(o).map(([d,f])=>Wv({allowReserved:e,name:r==="deepObject"?`${n}[${d}]`:d,value:f})).join(l);return r==="label"||r==="matrix"?l+c:c},uve=/\{[^{}]+\}/g,dve=({path:e,url:t})=>{let n=t;const r=t.match(uve);if(r)for(const o of r){let a=!1,l=o.substring(1,o.length-1),c="simple";l.endsWith("*")&&(a=!0,l=l.substring(0,l.length-1)),l.startsWith(".")?(l=l.substring(1),c="label"):l.startsWith(";")&&(l=l.substring(1),c="matrix");const d=e[l];if(d==null)continue;if(Array.isArray(d)){n=n.replace(o,J9({explode:a,name:l,style:c,value:d}));continue}if(typeof d=="object"){n=n.replace(o,ez({explode:a,name:l,style:c,value:d,valueOnly:!0}));continue}if(c==="matrix"){n=n.replace(o,`;${Wv({name:l,value:d})}`);continue}const f=encodeURIComponent(c==="label"?`.${d}`:d);n=n.replace(o,f)}return n},fve=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{const a=o.startsWith("/")?o:`/${o}`;let l=(e??"")+a;t&&(l=dve({path:t,url:l}));let c=n?r(n):"";return c.startsWith("?")&&(c=c.substring(1)),c&&(l+=`?${c}`),l};function ND(e){const t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}const hve=async(e,t)=>{const n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},tz=({parameters:e={},...t}={})=>r=>{const o=[];if(r&&typeof r=="object")for(const a in r){const l=r[a];if(l==null)continue;const c=e[a]||t;if(Array.isArray(l)){const d=J9({allowReserved:c.allowReserved,explode:!0,name:a,style:"form",value:l,...c.array});d&&o.push(d)}else if(typeof l=="object"){const d=ez({allowReserved:c.allowReserved,explode:!0,name:a,style:"deepObject",value:l,...c.object});d&&o.push(d)}else{const d=Wv({allowReserved:c.allowReserved,name:a,value:l});d&&o.push(d)}}return o.join("&")},pve=e=>{if(!e)return"stream";const t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(n=>t.startsWith(n)))return"blob";if(t.startsWith("text/"))return"text"}},mve=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get("Cookie")?.includes(`${t}=`)):!1;async function gve(e){for(const t of e.security??[]){if(mve(e,t.name))continue;const n=await hve(t,e.auth);if(!n)continue;const r=t.name??"Authorization";switch(t.in){case"query":e.query||(e.query={}),e.query[r]=n;break;case"cookie":e.headers.append("Cookie",`${r}=${n}`);break;default:e.headers.set(r,n);break}}}const PD=e=>fve({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:tz(e.querySerializer),url:e.url}),kD=(e,t)=>{const n={...e,...t};return n.baseUrl?.endsWith("/")&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=nz(e.headers,t.headers),n},vve=e=>{const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t},nz=(...e)=>{const t=new Headers;for(const n of e){if(!n)continue;const r=n instanceof Headers?vve(n):Object.entries(n);for(const[o,a]of r)if(a===null)t.delete(o);else if(Array.isArray(a))for(const l of a)t.append(o,l);else a!==void 0&&t.set(o,typeof a=="object"?JSON.stringify(a):a)}return t};class aw{fns=[];clear(){this.fns=[]}eject(t){const n=this.getInterceptorIndex(t);this.fns[n]&&(this.fns[n]=null)}exists(t){const n=this.getInterceptorIndex(t);return!!this.fns[n]}getInterceptorIndex(t){return typeof t=="number"?this.fns[t]?t:-1:this.fns.indexOf(t)}update(t,n){const r=this.getInterceptorIndex(t);return this.fns[r]?(this.fns[r]=n,t):!1}use(t){return this.fns.push(t),this.fns.length-1}}const yve=()=>({error:new aw,request:new aw,response:new aw}),bve=tz({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Sve={"Content-Type":"application/json"},rz=(e={})=>({...ave,headers:Sve,parseAs:"auto",querySerializer:bve,...e}),Cve=(e={})=>{let t=kD(rz(),e);const n=()=>({...t}),r=p=>(t=kD(t,p),n()),o=yve(),a=async p=>{const m={...t,...p,fetch:p.fetch??t.fetch??globalThis.fetch,headers:nz(t.headers,p.headers),serializedBody:void 0};m.security&&await gve(m),m.requestValidator&&await m.requestValidator(m),m.body!==void 0&&m.bodySerializer&&(m.serializedBody=m.bodySerializer(m.body)),(m.body===void 0||m.serializedBody==="")&&m.headers.delete("Content-Type");const g=m,v=PD(g);return{opts:g,url:v}},l=async p=>{const m=p.throwOnError??t.throwOnError,g=p.responseStyle??t.responseStyle;let v,S;try{const{opts:C,url:w}=await a(p),x={redirect:"follow",...C,body:ND(C)};v=new Request(w,x);for(const P of o.request.fns)P&&(v=await P(v,C));const I=C.fetch;S=await I(v);for(const P of o.response.fns)P&&(S=await P(S,v,C));const T={request:v,response:S};if(S.ok){const P=(C.parseAs==="auto"?pve(S.headers.get("Content-Type")):C.parseAs)??"json";if(S.status===204||S.headers.get("Content-Length")==="0"){let L;switch(P){case"arrayBuffer":case"blob":case"text":L=await S[P]();break;case"formData":L=new FormData;break;case"stream":L=S.body;break;default:L={};break}return C.responseStyle==="data"?L:{data:L,...T}}let M;switch(P){case"arrayBuffer":case"blob":case"formData":case"text":M=await S[P]();break;case"json":{const L=await S.text();M=L?JSON.parse(L):{};break}case"stream":return C.responseStyle==="data"?S.body:{data:S.body,...T}}return P==="json"&&(C.responseValidator&&await C.responseValidator(M),C.responseTransformer&&(M=await C.responseTransformer(M))),C.responseStyle==="data"?M:{data:M,...T}}const O=await S.text();let D;try{D=JSON.parse(O)}catch{}throw D??O}catch(C){let w=C;for(const x of o.error.fns)x&&(w=await x(w,S,v,p));if(w=w||{},m)throw w;return g==="data"?void 0:{error:w,request:v,response:S}}},c=p=>m=>l({...m,method:p}),d=p=>async m=>{const{opts:g,url:v}=await a(m);return sve({...g,body:g.body,method:p,onRequest:async(S,C)=>{let w=new Request(S,C);for(const x of o.request.fns)x&&(w=await x(w,g));return w},serializedBody:ND(g),url:v})};return{buildUrl:p=>PD({...t,...p}),connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),getConfig:n,head:c("HEAD"),interceptors:o,options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),request:l,setConfig:r,sse:{connect:d("CONNECT"),delete:d("DELETE"),get:d("GET"),head:d("HEAD"),options:d("OPTIONS"),patch:d("PATCH"),post:d("POST"),put:d("PUT"),trace:d("TRACE")},trace:c("TRACE")}},pe=Cve(rz({baseUrl:"https://api.remit.example.com"}));let DD=!1;const Eve=e=>{DD||(pe.interceptors.request.use(async t=>{const n=await e.getToken();return n&&t.headers.set("Authorization",`Bearer ${n}`),t}),DD=!0)},wve=({children:e})=>R.jsx(R.Fragment,{children:e}),xve={configure:()=>{},getToken:async()=>null,resetToken:()=>{},Shell:wve,Account:({fallback:e=null})=>R.jsx(R.Fragment,{children:e})},oz=_.createContext(xve),_ve=oz.Provider,Ive=()=>_.useContext(oz),yg=new Set;let bg=!1;const Gv=()=>{if(!bg){bg=!0;for(const e of yg)e(!0)}},Ave=()=>bg,Tve=e=>(yg.add(e),()=>{yg.delete(e)}),LD=()=>{bg=!1;for(const e of yg)e(!1)},Kv=(e,t)=>{if(hv(e)){Gv();return}Wte(e,t)&&Bc(e)},Rve=(e,t)=>{Kv(e,t.meta)},Ove=(e,t,n,r)=>{Kv(e,r.meta)},Nx=e=>new TextEncoder().encode(e),az={},Px={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),az[e]=t,Px[t]=e}function Mve(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(r in Px)t[n/2]=Px[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t}function Li(e){let t="";for(let n=0;n<e.byteLength;n++)t+=az[e[n]];return t}const Rf=e=>e instanceof Uint8Array?e:typeof e=="string"?Nx(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Nve=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";class Na{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new Na({...t,headers:{...t.headers}});return n.query&&(n.query=Pve(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Na.clone(this)}}function Pve(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class Of{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}const UD=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Ui=e=>encodeURIComponent(e).replace(/[!'()*]/g,kve),kve=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function rI(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Ui(n),Array.isArray(r))for(let o=0,a=r.length;o<a;o++)t.push(`${n}=${Ui(r[o])}`);else{let o=n;(r||typeof r=="string")&&(o+=`=${Ui(r)}`),t.push(o)}}return t.join("&")}const sm="[aws-rum-web:unknown.unknown]";class Ce{static configure(t){Ce.debugEnabled=t}static getCallerInfo(){var t,n;try{const r=new Error().stack;if(!r)return sm;const o=r.split(`
94
+ `);if(o.length<4)return sm;const a=o[3];if(!a)return sm;const l=a.match(/at (?:(.+?)\s+\()?/);if(l&&l.length>=2){const c=l[1].trim(),d=c.split(".");if(d.length>=2){const f=(t=d[d.length-2])!==null&&t!==void 0?t:"unknown",p=(n=d[d.length-1])!==null&&n!==void 0?n:"unknown";return`[aws-rum-web:${f}.${p}]`}return`[aws-rum-web:${c}]`}}catch{}return sm}static info(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.info(r,t,...n)}static debug(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.debug(r,t,...n)}static warn(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.warn(r,t,...n)}static error(t,...n){if(!Ce.debugEnabled)return;const r=this.getCallerInfo();console.error(r,t,...n)}}Ce.debugEnabled=!1;const FD=2048,zD=.2,Dve=()=>typeof CompressionStream<"u",Lve=async e=>{const t=new Blob([e]).stream().pipeThrough(new CompressionStream("gzip"));return new Uint8Array(await new Response(t).arrayBuffer())},Uve=async e=>{const t=e.length;if(Ce.debug(`compressIfBeneficial called, payload size: ${t}B`),!Dve())return Ce.debug("CompressionStream not supported, skipping compression"),{body:e,compressed:!1};if(t<FD)return Ce.debug(`Payload size ${t}B below threshold ${FD}B, skipping compression`),{body:e,compressed:!1};const n=await Lve(e),r=1-n.length/t;return r>=zD?(Ce.debug(`Compressed ${t}B -> ${n.length}B (${(r*100).toFixed(1)}% reduction)`),{body:n,compressed:!0}):(Ce.debug(`Compression ratio ${(r*100).toFixed(1)}% below threshold ${zD*100}%, skipping`),{body:e,compressed:!1})},Fve="POST",zve="application/json",$ve="text/plain;charset=UTF-8",jve=64e3;class Bve{constructor(t,n){this.sendFetch=async r=>{var o,a;const l=JSON.stringify($D(r)),c=(a=(o=this.config.compressionStrategy)===null||o===void 0?void 0:o.enabled)!==null&&a!==void 0?a:!1,{body:d,compressed:f}=c?await Uve(l):{body:l,compressed:!1},p=await this.getHttpRequestOptions(r,d,zve,f);let m=new Na(p);return this.signing&&(m=await this.signing.sign(m)),this.config.fetchRequestHandler.handle(m)},this.sendBeacon=async r=>{const o=JSON.stringify($D(r));if(o.length>jve)throw new Error("Payload too large for sendBeacon");const a=await this.getHttpRequestOptions(r,o,$ve,!1);let l=new Na(a);return this.signing&&(l=await this.signing.presign(l)),this.config.beaconRequestHandler.handle(l)},this.getHttpRequestOptions=async(r,o,a,l)=>{const c=this.config.endpoint.pathname.replace(/\/$/,""),d=Object.assign({"content-type":a,host:this.config.endpoint.host},this.config.headers);l&&(d["Content-Encoding"]="gzip");const f={method:Fve,protocol:this.config.endpoint.protocol,port:Number(this.config.endpoint.port)||void 0,headers:d,hostname:this.config.endpoint.hostname,path:`${c}/appmonitors/${r.AppMonitorDetails.id}`,body:o};return this.signing?Object.assign(Object.assign({},f),{headers:Object.assign(Object.assign({},f.headers),{"X-Amz-Content-Sha256":await this.signing.hashAndEncode(o)})}):f},this.config=t,this.signing=n}}const $D=e=>{const t=[];e.RumEvents.forEach(r=>t.push(Hve(r)));let n={BatchId:e.BatchId,AppMonitorDetails:e.AppMonitorDetails,UserDetails:e.UserDetails,RumEvents:t};return e.SessionMetadata&&(n=Object.assign(Object.assign({},n),{SessionMetadata:e.SessionMetadata})),e.Alias&&(n=Object.assign(Object.assign({},n),{Alias:e.Alias})),n},Hve=e=>({id:e.id,timestamp:Math.round(e.timestamp.getTime()/1e3),type:e.type,metadata:e.metadata,details:e.details});class qve{handle(t){const n=this.sendBeacon(t);return new Promise((r,o)=>{n?r({response:new Of({statusCode:200})}):o()})}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}sendBeacon(t){let n=t.path;if(t.query){const a=rI(t.query);a&&(n+=`?${a}`)}const{port:r}=t,o=`${t.protocol}//${t.hostname}${r?`:${r}`:""}${n}`;return navigator.sendBeacon(o,t.body)}}const Vve=(e=0)=>new Promise((t,n)=>{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)});let Wve=class{constructor({fetchFunction:t,requestTimeout:n}={}){this.requestTimeout=n,this.fetchFunction=t}destroy(){}handle(t,{abortSignal:n}={}){const r=this.requestTimeout;if(n?.aborted){const g=new Error("Request aborted");return g.name="AbortError",Promise.reject(g)}let o=t.path;if(t.query){const g=rI(t.query);g&&(o+=`?${g}`)}const{port:a,method:l}=t,c=`${t.protocol}//${t.hostname}${a?`:${a}`:""}${o}`,f={body:l==="GET"||l==="HEAD"?void 0:t.body,headers:new Headers(t.headers),method:l};typeof AbortController<"u"&&(f.signal=n);const p=new Request(c,f),m=[this.fetchFunction.apply(window,[p]).then(g=>{const v=g.headers,S={};for(const w of v.entries())S[w[0]]=w[1];return g.body!==void 0?{response:new Of({headers:S,statusCode:g.status,body:g.body})}:g.blob().then(w=>({response:new Of({headers:S,statusCode:g.status,body:w})}))}),Vve(r)];return n&&m.push(new Promise((g,v)=>{n.onabort=()=>{const S=new Error("Request aborted");S.name="AbortError",v(S)}})),Promise.race(m)}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}};const oI=e=>{if(crypto)return crypto.getRandomValues(e);if(msCrypto)return msCrypto.getRandomValues(e);throw new Error("No crypto library found.")},sz=[];for(let e=0;e<256;e++)sz[e]=(e+256).toString(16).substr(1);const Zv="X-Amzn-Trace-Id",Yv="traceparent",Gve=2,Kve=32,Zve=16,Yve=4,iz=(e,t)=>Array.isArray(t)?t.some(n=>n.test(e)):t,lz={logicalServiceName:"rum.aws.amazon.com",urlsToInclude:[/.*/],urlsToExclude:[/cognito\-identity\.([^\.]*\.)?amazonaws\.com/,/sts\.([^\.]*\.)?amazonaws\.com/],stackTraceLength:200,recordAllRequests:!1,addXRayTraceIdHeader:!1},Qve=e=>200<=e&&e<300,cz=e=>Math.floor(e/100)===4,aI=e=>Math.floor(e/100)===5,sI=e=>e===429,uz=(e,t)=>{const n=t.urlsToInclude.some(o=>o.test(e)),r=t.urlsToExclude.some(o=>o.test(e));return n&&!r},Ec=()=>Date.now()/1e3,Xve=(e,t,n)=>{const r={request:{}};return r.request.method=t?.method?t.method:"GET",r.request.traced=n,r.request.url=qm(e),r},dz=(e,t,n,r)=>({version:"1.0.0",name:e,origin:"AWS::RUM::AppMonitor",id:pz(),start_time:t,trace_id:n?oye():rye(),end_time:void 0,subsegments:[],in_progress:!1}),fz=(e,t,n)=>{const r={id:pz(),name:e,start_time:t,end_time:void 0,in_progress:!1,namespace:e.endsWith(".amazonaws.com")?"aws":"remote"};return n&&(r.http=n),r},hz=e=>{try{return e.hostname?e.hostname:e.url?new URL(e.url).hostname:new URL(e.toString()).hostname}catch{return window.location.hostname}},Jve=(e,t,n,r)=>{e.headers||(e.headers={}),r?e.headers[Yv]=lI(t,n):e.headers[Zv]=iI(t,n)},eye=(e,t,n,r)=>{r?e.set(Yv,lI(t,n)):e.set(Zv,iI(t,n))},iI=(e,t)=>"Root="+e+";Parent="+t+";Sampled=1",lI=(e,t)=>"00-"+e+"-"+t+"-01",tye=e=>e?.length===Yve&&e[0].length===Gve&&e[1].length===Kve&&e[2].length===Zve&&(e[3]==="00"||e[3]==="01"),nye=(e,t)=>{var n,r;const o={};if(e)if(t){const a=(n=e.get(Yv))===null||n===void 0?void 0:n.split("-");a&&tye(a)&&(o.traceId=a[1],o.segmentId=a[2])}else{const a=(r=e.get(Zv))===null||r===void 0?void 0:r.split(";");a?.length===3&&(o.traceId=a[0].split("Root=")[1],o.segmentId=a[1].split("Parent=")[1])}return o},qm=e=>e.url?e.url:e.toString(),rye=()=>`1-${aye()}-${sye()}`,oye=()=>{const e=new Uint8Array(16);return oI(e),`${cI(e)}`},pz=()=>{const e=new Uint8Array(8);return oI(e),cI(e)},aye=()=>Math.floor(Date.now()/1e3).toString(16),sye=()=>{const e=new Uint8Array(12);return oI(e),cI(e)},cI=e=>{let t="";for(let n=0;n<e.length;n++)t+=sz[e[n]];return t};class iye{constructor(t,n,r=o=>2e3*Math.pow(2,o-1)){this.handler=t,this.retries=n,this.backoff=r}async handle(t){let n=this.retries;for(;;)try{const r=await this.handler.handle(t);if(Qve(r.response.statusCode))return r;throw r.response.statusCode}catch(r){if(typeof r=="number"&&!sI(r)&&!aI(r))throw new Error(`${r}`);if(n<=0)throw r;n--,await this.sleep(this.backoff(this.retries-n))}}async sleep(t){return new Promise(n=>setTimeout(n,t))}updateHttpClientConfig(t,n){}httpHandlerConfigs(){return{}}}const Wc="cwr_c",Sg="cwr_i",Cg="cwr_s",Eg="cwr_u",lye=3e4,cye="arw-module",jD="CWR: Cannot dispatch; no AWS credentials.";class uye{constructor(t,n,r,o,a){this.disableCodes=["403","404"],this.shouldPurgeCredentials=!0,this.dispatchFetch=async()=>{if(this.doRequest()){const l=this.createRequest();return Ce.info(`Dispatching ${l.RumEvents.length} events via fetch`),this.rum.sendFetch(l).catch(this.handleReject)}},this.dispatchBeacon=async()=>{if(this.doRequest()){const l=this.createRequest();return Ce.info(`Dispatching ${l.RumEvents.length} events via beacon`),this.rum.sendBeacon(l).catch(()=>this.rum.sendFetch(l))}},this.dispatchFetchFailSilent=async()=>this.dispatchFetch().catch(l=>{Ce.error("Dispatch fetch failed silently:",l)}),this.dispatchBeaconFailSilent=async()=>this.dispatchBeacon().catch(l=>{Ce.error("Dispatch beacon failed silently:",l)}),this.flushSync=()=>{if(document.visibilityState==="hidden"&&this.doRequest(!0)){let l=this.rum.sendBeacon,c=this.rum.sendFetch;this.config.useBeacon||([l,c]=[c,l]);const d=this.createRequest(!0);Ce.debug(`Flushing ${d.RumEvents.length} events on page hide`),l(d).catch(()=>c(d)).catch(f=>{Ce.error("Page hide flush failed:",f)})}},this.handleReject=l=>{throw l instanceof Error&&(l.message==="403"&&this.config.signing&&this.shouldPurgeCredentials?(this.shouldPurgeCredentials=!1,this.forceRebuildClient()):this.disableCodes.includes(l.message)&&(Ce.error("Dispatch failed with status code:",l.message),this.disable())),l},this.defaultClientBuilder=(l,c,d,f)=>{const p=d&&this.signingConfigFactory?this.signingConfigFactory(d,c):void 0;return new Bve({fetchRequestHandler:new iye(new Wve({fetchFunction:this.config.fetchFunction}),this.config.retries),beaconRequestHandler:new qve,endpoint:l,region:c,credentials:d,headers:this.headers,compressionStrategy:f},p)},this.applicationId=t,this.region=n,this.endpoint=r,this.eventCache=o,this.enabled=!0,this.buildClient=a.clientBuilder||this.defaultClientBuilder,this.config=a,this.headers=a.headers,this.startDispatchTimer(),a.signing?this.rum={sendFetch:()=>Promise.reject(new Error(jD)),sendBeacon:()=>Promise.reject(new Error(jD))}:this.rum=this.buildClient(this.endpoint,this.region,void 0,this.config.compressionStrategy),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Wc}_${t}`:Wc,this.identityStorageKey=this.config.cookieAttributes.unique?`${Sg}_${t}`:Sg}enable(){this.enabled=!0,this.startDispatchTimer()}disable(){this.stopDispatchTimer(),this.enabled=!1,Ce.warn("Dispatch disabled")}setAwsCredentials(t){this.credentialProvider=t,this.rum=this.buildClient(this.endpoint,this.region,t,this.config.compressionStrategy),typeof t=="function"&&t()}setCognitoCredentialProviderFactory(t){this.cognitoCredentialProviderFactory=t}setSigningConfigFactory(t){this.signingConfigFactory=t}setCognitoCredentials(t,n){this.identityPoolId=t,this.guestRoleArn=n,this.cognitoCredentialProviderFactory&&this.setAwsCredentials(this.cognitoCredentialProviderFactory(this.config,this.applicationId,t,n))}startDispatchTimer(){document.addEventListener("visibilitychange",this.flushSync),document.addEventListener("pagehide",this.flushSync),!(this.config.dispatchInterval<=0||this.dispatchTimerId)&&(this.dispatchTimerId=window.setInterval(this.dispatchFetchFailSilent,this.config.dispatchInterval))}stopDispatchTimer(){document.removeEventListener("visibilitychange",this.flushSync),document.removeEventListener("pagehide",this.flushSync),this.dispatchTimerId&&(window.clearInterval(this.dispatchTimerId),this.dispatchTimerId=void 0)}doRequest(t=!1){return this.enabled?t&&this.eventCache.hasCandidates()?!0:this.eventCache.hasEvents():!1}createRequest(t=!1){return{BatchId:Tc(),AppMonitorDetails:this.eventCache.getAppMonitorDetails(),UserDetails:this.eventCache.getUserDetails(),SessionMetadata:JSON.stringify(this.eventCache.getCommonMetadata()),RumEvents:this.eventCache.getEventBatch(t),Alias:this.config.alias}}forceRebuildClient(){Ce.warn("Removing credentials from local storage"),localStorage.removeItem(this.credentialStorageKey),this.identityPoolId?(Ce.info("Rebuilding client with fresh cognito credentials"),localStorage.removeItem(this.identityStorageKey),this.setCognitoCredentials(this.identityPoolId,this.guestRoleArn)):this.credentialProvider&&(Ce.info("Rebuilding client with most recently passed provider"),this.setAwsCredentials(this.credentialProvider))}}const mz={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),mz[e]=t}function dye(e){let t="";for(let n=0;n<e.byteLength;n++)t+=mz[e[n]];return t}class fye{format(t){const n=[];for(const a of Object.keys(t)){const l=Nx(a);n.push(Uint8Array.from([l.byteLength]),l,this.formatHeaderValue(t[a]))}const r=new Uint8Array(n.reduce((a,l)=>a+l.byteLength,0));let o=0;for(const a of n)r.set(a,o),o+=a.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?Kr.boolTrue:Kr.boolFalse]);case"byte":return Uint8Array.from([Kr.byte,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,Kr.short),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,Kr.integer),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const o=new Uint8Array(9);return o[0]=Kr.long,o.set(t.value.bytes,1),o;case"binary":const a=new DataView(new ArrayBuffer(3+t.value.byteLength));a.setUint8(0,Kr.byteArray),a.setUint16(1,t.value.byteLength,!1);const l=new Uint8Array(a.buffer);return l.set(t.value,3),l;case"string":const c=Nx(t.value),d=new DataView(new ArrayBuffer(3+c.byteLength));d.setUint8(0,Kr.string),d.setUint16(1,c.byteLength,!1);const f=new Uint8Array(d.buffer);return f.set(c,3),f;case"timestamp":const p=new Uint8Array(9);return p[0]=Kr.timestamp,p.set(uI.fromNumber(t.value.valueOf()).bytes,1),p;case"uuid":if(!hye.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const m=new Uint8Array(17);return m[0]=Kr.uuid,m.set(Mve(t.value.replace(/-/g,"")),1),m}}}var Kr;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(Kr||(Kr={}));const hye=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class uI{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,o=Math.abs(Math.round(t));r>-1&&o>0;r--,o/=256)n[r]=o;return t<0&&BD(n),new uI(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&BD(t),parseInt(Li(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function BD(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const pye="X-Amz-Algorithm",mye="X-Amz-Credential",gz="X-Amz-Date",gye="X-Amz-SignedHeaders",vye="X-Amz-Expires",vz="X-Amz-Signature",yz="X-Amz-Security-Token",bz="authorization",Sz=gz.toLowerCase(),yye="date",bye=[bz,Sz,yye],Sye=vz.toLowerCase(),kx="x-amz-content-sha256",Cye=yz.toLowerCase(),Eye={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},wye=/^proxy-/,xye=/^sec-/,sw="AWS4-HMAC-SHA256",_ye="AWS4-HMAC-SHA256-PAYLOAD",Iye="UNSIGNED-PAYLOAD",Aye=50,Cz="aws4_request",Tye=3600*24*7,Rye=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Sye)continue;const o=Ui(r);t.push(o);const a=e[r];typeof a=="string"?n[o]=`${o}=${Ui(a)}`:Array.isArray(a)&&(n[o]=a.slice(0).reduce((l,c)=>l.concat([`${o}=${Ui(c)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},Oye=e=>Mye(e).toISOString().replace(/\.\d{3}Z$/,"Z"),Mye=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class Nye{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:n,region:r,service:o,sha256:a,uriEscapePath:l=!0}){this.service=o,this.sha256=a,this.uriEscapePath=l,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=UD(r),this.credentialProvider=UD(n)}createCanonicalRequest(t,n,r){const o=Object.keys(n).sort();return`${t.method}
95
+ ${this.getCanonicalPath(t)}
96
+ ${Rye(t)}
97
+ ${o.map(a=>`${a}:${n[a]}`).join(`
98
+ `)}
99
+
100
+ ${o.join(";")}
101
+ ${r}`}async createStringToSign(t,n,r,o){const a=new this.sha256;a.update(Rf(r));const l=await a.digest();return`${o}
102
+ ${t}
103
+ ${n}
104
+ ${Li(l)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const a of t.split("/"))a?.length!==0&&a!=="."&&(a===".."?n.pop():n.push(a));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return Ui(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=Oye(t).replace(/[-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}const im={},iw=[],lw=(e,t,n)=>`${e}/${t}/${n}/${Cz}`,Pye=async(e,t,n,r,o)=>{const a=await HD(e,t.secretAccessKey,t.accessKeyId),l=`${n}:${r}:${o}:${Li(a)}:${t.sessionToken}`;if(l in im)return im[l];for(iw.push(l);iw.length>Aye;)delete im[iw.shift()];let c=`AWS4${t.secretAccessKey}`;for(const d of[n,r,o,Cz])c=await HD(e,c,d);return im[l]=c},HD=(e,t,n)=>{const r=new e(t);return r.update(Rf(n)),r.digest()},qD=({headers:e},t,n)=>{const r={};for(const o of Object.keys(e).sort()){if(e[o]==null)continue;const a=o.toLowerCase();(a in Eye||t?.has(a)||wye.test(a)||xye.test(a))&&(!n||n&&!n.has(a))||(r[a]=e[o].trim().replace(/\s+/g," "))}return r},cw=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===kx)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||Nve(t)){const r=new n;return r.update(Rf(t)),Li(await r.digest())}return Iye},kye=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},Dye=(e,t={})=>{const{headers:n,query:r={}}=Na.clone(e);for(const o of Object.keys(n)){const a=o.toLowerCase();(a.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(a)||t.hoistableHeaders?.has(a))&&(r[o]=n[o],delete n[o])}return{...e,headers:n,query:r}},VD=e=>{e=Na.clone(e);for(const t of Object.keys(e.headers))bye.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};class Lye extends Nye{headerFormatter=new fye;constructor({applyChecksum:t,credentials:n,region:r,service:o,sha256:a,uriEscapePath:l=!0}){super({applyChecksum:t,credentials:n,region:r,service:o,sha256:a,uriEscapePath:l})}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:o=3600,unsignableHeaders:a,unhoistableHeaders:l,signableHeaders:c,hoistableHeaders:d,signingRegion:f,signingService:p}=n,m=await this.credentialProvider();this.validateResolvedCredentials(m);const g=f??await this.regionProvider(),{longDate:v,shortDate:S}=this.formatDate(r);if(o>Tye)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const C=lw(S,g,p??this.service),w=Dye(VD(t),{unhoistableHeaders:l,hoistableHeaders:d});m.sessionToken&&(w.query[yz]=m.sessionToken),w.query[pye]=sw,w.query[mye]=`${m.accessKeyId}/${C}`,w.query[gz]=v,w.query[vye]=o.toString(10);const x=qD(w,a,c);return w.query[gye]=this.getCanonicalHeaderList(x),w.query[vz]=await this.getSignature(v,C,this.getSigningKey(m,g,S,p),this.createCanonicalRequest(w,x,await cw(t,this.sha256))),w}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:o,signingRegion:a,signingService:l,eventStreamCredentials:c}){const d=a??await this.regionProvider(),{shortDate:f,longDate:p}=this.formatDate(r),m=lw(f,d,l??this.service),g=await cw({headers:{},body:n},this.sha256),v=new this.sha256;v.update(t);const S=Li(await v.digest()),C=[_ye,p,m,o,S,g].join(`
105
+ `);return this.signString(C,{signingDate:r,signingRegion:d,signingService:l,eventStreamCredentials:c})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:o,eventStreamCredentials:a}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:o,priorSignature:t.priorSignature,eventStreamCredentials:a}).then(c=>({message:t.message,signature:c}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:o,eventStreamCredentials:a}={}){const l=a??await this.credentialProvider();this.validateResolvedCredentials(l);const c=r??await this.regionProvider(),{shortDate:d}=this.formatDate(n),f=new this.sha256(await this.getSigningKey(l,c,d,o));return f.update(Rf(t)),Li(await f.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:o,signingRegion:a,signingService:l}={}){const c=await this.credentialProvider();this.validateResolvedCredentials(c);const d=a??await this.regionProvider(),f=VD(t),{longDate:p,shortDate:m}=this.formatDate(n),g=lw(m,d,l??this.service);f.headers[Sz]=p,c.sessionToken&&(f.headers[Cye]=c.sessionToken);const v=await cw(f,this.sha256);!kye(kx,f.headers)&&this.applyChecksum&&(f.headers[kx]=v);const S=qD(f,o,r),C=await this.getSignature(p,g,this.getSigningKey(c,d,m,l),this.createCanonicalRequest(f,S,v));return f.headers[bz]=`${sw} Credential=${c.accessKeyId}/${g}, SignedHeaders=${this.getCanonicalHeaderList(S)}, Signature=${C}`,f}async getSignature(t,n,r,o){const a=await this.createStringToSign(t,n,o,sw),l=new this.sha256(await r);return l.update(Rf(a)),Li(await l.digest())}getSigningKey(t,n,r,o){return Pye(this.sha256,t,r,n,o||this.service)}}const Uye="rum",Fye={expiresIn:60},zye=(e,t)=>{const n=new Lye({applyChecksum:!0,credentials:e,region:t,service:Uye,uriEscapePath:!0,sha256:ji});return{sign:async r=>await n.sign(r),presign:async r=>await n.presign(r,Fye),hashAndEncode:async r=>{const o=new ji;return o.update(r),dye(await o.digest()).toLowerCase()}}};function WD(e,t){return new Request(e,t)}function $ye(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const uw={supported:void 0};class Qv{config;configProvider;static create(t){return typeof t?.handle=="function"?t:new Qv(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),uw.supported===void 0&&(uw.supported=typeof Request<"u"&&"keepalive"in WD("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const o=r??this.config.requestTimeout,a=this.config.keepAlive===!0,l=this.config.credentials;if(n?.aborted){const I=GD(n);return Promise.reject(I)}let c=t.path;const d=rI(t.query||{});d&&(c+=`?${d}`),t.fragment&&(c+=`#${t.fragment}`);let f="";if(t.username!=null||t.password!=null){const I=t.username??"",T=t.password??"";f=`${I}:${T}@`}const{port:p,method:m}=t,g=`${t.protocol}//${f}${t.hostname}${p?`:${p}`:""}${c}`,v=m==="GET"||m==="HEAD"?void 0:t.body,S={body:v,headers:new Headers(t.headers),method:m,credentials:l};this.config?.cache&&(S.cache=this.config.cache),v&&(S.duplex="half"),typeof AbortController<"u"&&(S.signal=n),uw.supported&&(S.keepalive=a),typeof this.config.requestInit=="function"&&Object.assign(S,this.config.requestInit(t));let C=()=>{};const w=WD(g,S),x=[fetch(w).then(I=>{const T=I.headers,O={};for(const P of T.entries())O[P[0]]=P[1];return I.body!=null?{response:new Of({headers:O,reason:I.statusText,statusCode:I.status,body:I.body})}:I.blob().then(P=>({response:new Of({headers:O,reason:I.statusText,statusCode:I.status,body:P})}))}),$ye(o)];return n&&x.push(new Promise((I,T)=>{const O=()=>{const D=GD(n);T(D)};if(typeof n.addEventListener=="function"){const D=n;D.addEventListener("abort",O,{once:!0}),C=()=>D.removeEventListener("abort",O)}else n.onabort=O})),Promise.race(x).finally(C)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}function GD(e){const t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){const o=new Error("Request aborted");return o.name="AbortError",o.cause=t,o}const r=new Error(String(t));return r.name="AbortError",r}const n=new Error("Request aborted");return n.name="AbortError",n}const dw=async e=>{const{value:t}=await e.body.getReader().read();return JSON.parse(String.fromCharCode.apply(null,t))},jye=async e=>{const{value:t}=await e.body.getReader().read();return String.fromCharCode.apply(null,t)},Bye="POST",Hye="application/x-www-form-urlencoded",qye="https:",Vye="AssumeRoleWithWebIdentity",Wye="2011-06-15";class Gye{constructor(t){this.assumeRoleWithWebIdentity=async n=>{try{const r=Object.assign(Object.assign({},n),{Action:Vye,Version:Wye}),o=new URLSearchParams(Object.entries(r)).toString(),a=new Na({method:Bye,headers:{"content-type":Hye,host:this.hostname},protocol:qye,hostname:this.hostname,body:o}),{response:l}=await this.fetchRequestHandler.handle(a),c=await jye(l);return{accessKeyId:c.split("<AccessKeyId>")[1].split("</AccessKeyId>")[0],secretAccessKey:c.split("<SecretAccessKey>")[1].split("</SecretAccessKey>")[0],sessionToken:c.split("<SessionToken>")[1].split("</SessionToken>")[0],expiration:new Date(c.split("<Expiration>")[1].split("</Expiration>")[0])}}catch(r){throw new Error(`CWR: Failed to retrieve credentials from STS: ${r}`)}},this.hostname=`sts.${t.region}.amazonaws.com`,this.fetchRequestHandler=t.fetchRequestHandler}}const Kye="POST",Zye="application/x-amz-json-1.1",Yye="https:",Qye="AWSCognitoIdentityService.GetId",Xye="AWSCognitoIdentityService.GetOpenIdToken",Jye="AWSCognitoIdentityService.GetCredentialsForIdentity";class ebe{constructor(t){var n;this.getId=async r=>{var o;let a=null;try{a=JSON.parse(localStorage.getItem(this.identityStorageKey))}catch(l){!((o=this.config)===null||o===void 0)&&o.debug&&Ce.error("Failed to parse stored identity:",l)}if(a&&a.IdentityId)return Promise.resolve(a);try{const l=JSON.stringify(r),c=this.getHttpRequest(Qye,l),d=await dw((await this.fetchRequestHandler.handle(c)).response);try{localStorage.setItem(this.identityStorageKey,JSON.stringify({IdentityId:d.IdentityId}))}catch(f){Ce.error("Failed to store identity:",f)}return d}catch(l){throw new Error(`CWR: Failed to retrieve Cognito identity: ${l}`)}},this.getOpenIdToken=async r=>{try{const o=JSON.stringify(r),a=this.getHttpRequest(Xye,o),{response:l}=await this.fetchRequestHandler.handle(a);return this.validateOpenIdTokenResponse(await dw(l))}catch(o){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve Cognito OpenId token: ${o}`)}},this.getCredentialsForIdentity=async r=>{try{const o=JSON.stringify({IdentityId:r}),a=this.getHttpRequest(Jye,o),{response:l}=await this.fetchRequestHandler.handle(a),{AccessKeyId:c,Expiration:d,SecretKey:f,SessionToken:p}=this.validateCredenentialsResponse(await dw(l));return{accessKeyId:c,secretAccessKey:f,sessionToken:p,expiration:new Date(d*1e3)}}catch(o){throw localStorage.removeItem(this.identityStorageKey),new Error(`CWR: Failed to retrieve credentials for Cognito identity: ${o}`)}},this.validateOpenIdTokenResponse=r=>{if("IdentityId"in r&&"Token"in r)return r;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown OpenIdToken response")},this.validateCredenentialsResponse=r=>{if("IdentityId"in r&&"Credentials"in r)return r.Credentials;throw r&&"__type"in r&&"message"in r?new Error(`${r.__type}: ${r.message}`):new Error("Unknown Credentials response")},this.getHttpRequest=(r,o)=>new Na({method:Kye,headers:{"content-type":Zye,"x-amz-target":r},protocol:Yye,hostname:this.hostname,body:o}),this.hostname=`cognito-identity.${t.region}.amazonaws.com`,this.fetchRequestHandler=t.fetchRequestHandler,this.config=t.clientConfig,this.identityStorageKey=!((n=t.clientConfig)===null||n===void 0)&&n.cookieAttributes.unique?`${Sg}_${t.applicationId}`:Sg}}class Ez{constructor(t,n){this.ChainAnonymousCredentialsProvider=async()=>this.AnonymousCredentialsProvider().catch(this.AnonymousStorageCredentialsProvider).catch(this.AnonymousCognitoCredentialsProvider),this.AnonymousCredentialsProvider=async()=>new Promise((o,a)=>{if(this.renewCredentials())return a();o(this.credentials)}),this.AnonymousStorageCredentialsProvider=async()=>new Promise((o,a)=>{let l;try{l=JSON.parse(localStorage.getItem(this.credentialStorageKey))}catch{return a()}if(this.credentials=Object.assign(Object.assign({},l),{expiration:new Date(l.expiration)}),this.renewCredentials())return a();o(this.credentials)});const r=t.identityPoolId.split(":")[0];this.config=t,this.cognitoIdentityClient=new ebe({fetchRequestHandler:new Qv,region:r,clientConfig:t,applicationId:n}),this.credentialStorageKey=this.config.cookieAttributes.unique?`${Wc}_${n}`:Wc}renewCredentials(){if(!this.credentials||!this.credentials.expiration)return!0;const t=new Date(this.credentials.expiration.getTime()-lye);return new Date>t}}class tbe extends Ez{constructor(t,n){super(t,n),this.AnonymousCognitoCredentialsProvider=async()=>{let o=1;for(;;)try{const a=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),l=await this.cognitoIdentityClient.getOpenIdToken(a),c=await this.stsClient.assumeRoleWithWebIdentity({RoleArn:this.config.guestRoleArn,RoleSessionName:"cwr",WebIdentityToken:l.Token});this.credentials=c;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(c))}catch{}return Ce.debug("AWS credentials fetched successfully"),c}catch(a){if(o)o--,Ce.warn("AWS credential fetch failed, retrying");else throw Ce.error("AWS credential fetch failed:",a),a}};const r=t.identityPoolId.split(":")[0];this.stsClient=new Gye({fetchRequestHandler:new Qv,region:r})}}class nbe extends Ez{constructor(t,n){super(t,n),this.AnonymousCognitoCredentialsProvider=async()=>{let r=1;for(;;)try{const o=await this.cognitoIdentityClient.getId({IdentityPoolId:this.config.identityPoolId}),a=await this.cognitoIdentityClient.getCredentialsForIdentity(o.IdentityId);this.credentials=a;try{localStorage.setItem(this.credentialStorageKey,JSON.stringify(a))}catch{}return Ce.debug("AWS credentials fetched successfully"),a}catch(o){if(r)r--,Ce.warn("AWS credential fetch failed, retrying");else throw Ce.error("AWS credential fetch failed:",o),o}}}}const Dr="com.amazon.rum",rbe="com.amazonaws.rum",wg=`${Dr}.http_event`,wz=`${Dr}.xray_trace_event`,obe=`${Dr}.largest_contentful_paint_event`,abe=`${Dr}.first_input_delay_event`,sbe=`${Dr}.cumulative_layout_shift_event`,ibe=`${Dr}.interaction_to_next_paint_event`,Dx=`${Dr}.performance_navigation_event`,xz=`${Dr}.performance_resource_event`,lbe=`${Dr}.dom_event`,cbe=`${Dr}.js_error_event`,ube=`${Dr}.page_view_event`,Lx=`${Dr}.session_start_event`,KD=`${Dr}.rrweb_event`;class ro{constructor(t){this.enabled=!0,this.pluginId=ro.generatePluginId(t)}static generatePluginId(t){return`${ro.idPrefix}.${t}`}load(t){var n;this.context=t,(n=this.onload)===null||n===void 0||n.call(this)}getPluginId(){return this.pluginId}}ro.idPrefix=rbe;class dbe{constructor(t){this.context=t,this.plugins=new Map}addPlugin(t){const n=t.getPluginId();if(this.hasPlugin(n))throw new Error(`Plugin "${n}" already defined in the PluginManager`);this.plugins.set(n,t),t.load(this.context),Ce.debug(`Plugin loaded: ${n}`)}updatePlugin(t,n){var r;const o=this.getPlugin(t);(r=o?.update)===null||r===void 0||r.call(o,n)}enable(){this.plugins.forEach(t=>t.enable())}disable(){this.plugins.forEach(t=>t.disable())}flush(){this.plugins.forEach(t=>{var n;return(n=t.flush)===null||n===void 0?void 0:n.call(t)})}hasPlugin(t){return!!this.getPlugin(t)}record(t,n){const r=this.getPlugin(t);if(r?.record instanceof Function)r.record(n);else throw new Error("AWS RUM Client record: Invalid plugin ID")}getPlugin(t){var n;return(n=this.plugins.get(t))!==null&&n!==void 0?n:this.plugins.get(ro.generatePluginId(t))}}const ZD=(e,t,n,r,o)=>{let a=e+"=";a+=t||"",o!==void 0&&(a+=`; Expires=${o.toUTCString()}`),a+=`; Domain=${n.domain}`,a+=`; Path=${n.path}`,a+=`; SameSite=${n.sameSite}`,a+=n.secure?"; Secure":"",document.cookie=a},fbe=(e,t)=>{let n=e+"=";n+=`; Expires=${new Date(0)}`,n+=`; Domain=${t.domain}`,n+=`; Path=${t.path}`,n+=`; SameSite=${t.sameSite}`,n+=t.secure?"Secure":"",document.cookie=n},YD=e=>{const t=document.cookie.split("; ");for(const n of t){const r=n.split("=");if(r[0]===e)return r[1]}return""};var rf;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(rf||(rf={}));const hbe=()=>{var e,t;const n=navigator.userAgentData;if(!n)return;const r=(e=n.brands)!==null&&e!==void 0?e:[],o=(t=r.find(a=>a.brand!=="Chromium"&&!a.brand.startsWith("Not")))!==null&&t!==void 0?t:r[0];return{browserName:o?.brand,browserVersion:o?.version,osName:n.platform,deviceType:n.mobile?"mobile":"desktop"}},lm="00000000-0000-0000-0000-000000000000",pbe="desktop",mbe="web";class gbe{constructor(t,n,r,o){this.isSessionIdManual=!1,this.isUserIdManual=!1,this.appMonitorDetails=t,this.config=n,this.recordEvent=r,this.pageManager=o,this.sessionCookieName=this.config.cookieAttributes.unique?`${Cg}_${this.appMonitorDetails.id}`:Cg,this.session={sessionId:lm,record:this.sample(),eventCount:0},this.config.userId||this.initializeUser(),this.collectAttributes(),this.addSessionAttributes(this.config.sessionAttributes),this.getSessionFromCookie(),this.config.userId&&(this.isUserIdManual=!0,this.adoptUser(this.config.userId)),this.config.sessionId&&(this.isSessionIdManual=!0,this.adoptSession(this.config.sessionId))}isSampled(){return this.session.record}getSession(){return this.isSessionIdManual?(new Date>=this.sessionExpiry&&(this.session.eventCount=0,this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie()),this.session):(this.session.sessionId===lm?this.createSession():new Date>=this.sessionExpiry&&this.createSession(),this.session)}getAttributes(){return this.attributes}addSessionAttributes(t){this.attributes=Object.assign(Object.assign({},this.attributes),t)}pinSessionId(t){if(!t){Ce.warn("pinSessionId called with empty value; ignoring.");return}this.isSessionIdManual=!0,t!==this.session.sessionId&&this.adoptSession(t)}startSession(t){return t?.userId!==void 0&&(t.userId?(this.isUserIdManual=!0,t.userId!==this.userId&&this.adoptUser(t.userId)):Ce.warn("startSession called with empty userId; ignoring user rotation.")),t?.sessionId!==void 0?t.sessionId?(this.isSessionIdManual=!0,this.adoptSession(t.sessionId),this.config.suppressSessionStartEvent||this.recordEvent(Lx,{version:"1.0.0"})):(Ce.warn("startSession called with empty sessionId; minting a fresh session."),this.isSessionIdManual=!1,this.createSession()):(this.isSessionIdManual=!1,this.createSession()),this.session.sessionId}getUserId(){return this.isUserIdManual?this.userId:this.useCookies()?this.userId:lm}pinUserId(t){if(!t){Ce.warn("pinUserId called with empty value; ignoring.");return}this.isUserIdManual=!0,t!==this.userId&&this.adoptUser(t)}incrementSessionEventCount(){this.session.eventCount++,this.renewSession()}isLimitExceeded(){return this.session.eventCount>=this.config.sessionEventLimit&&this.config.sessionEventLimit>0}canRecord(){return this.session.record&&!this.isLimitExceeded()}initializeUser(){let t="";this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.config.userIdRetentionDays<=0?this.userId="00000000-0000-0000-0000-000000000000":this.useCookies()?(t=this.getUserIdCookie(),this.userId=t||Tc(),this.createOrRenewUserCookie(t,this.userExpiry)):this.userId=Tc()}createOrRenewSessionCookie(t,n){btoa&&ZD(this.sessionCookieName,btoa(JSON.stringify(t)),this.config.cookieAttributes,void 0,n)}createOrRenewUserCookie(t,n){ZD(Eg,t,this.config.cookieAttributes,void 0,n)}getUserIdCookie(){return YD(Eg)}getSessionFromCookie(){if(this.useCookies()){const t=YD(this.sessionCookieName);if(t&&atob)try{this.session=JSON.parse(atob(t)),this.pageManager.resumeSession(this.session.page),Ce.info(`Restored session: ${this.session.sessionId}`)}catch(n){Ce.error("Failed to restore session",n)}}}storeSessionAsCookie(){this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),this.useCookies()&&this.createOrRenewSessionCookie(this.session,this.sessionExpiry)}createSession(){this.session={sessionId:Tc(),record:this.session.sessionId===lm?this.session.record:this.sample(),eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),Ce.info(`Session start: ${this.session.sessionId}`),this.session.record||Ce.warn(`Session is NOT sampled. Consider increasing sessionSampleRate to avoid data loss (currently ${this.config.sessionSampleRate})`),this.config.suppressSessionStartEvent||this.recordEvent(Lx,{version:"1.0.0"})}adoptSession(t){this.session={sessionId:t,record:this.session.record,eventCount:0},this.session.page=this.pageManager.getPage(),this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.storeSessionAsCookie(),Ce.info(`Adopted session: ${t}`)}adoptUser(t){this.userId=t,this.userExpiry=new Date,this.userExpiry.setDate(this.userExpiry.getDate()+this.config.userIdRetentionDays),this.useCookies()&&this.config.userIdRetentionDays>0&&this.createOrRenewUserCookie(this.userId,this.userExpiry),Ce.info(`Adopted user: ${t}`)}renewSession(){this.sessionExpiry=new Date(new Date().getTime()+this.config.sessionLengthSeconds*1e3),this.session.page=this.pageManager.getPage(),this.storeSessionAsCookie()}collectAttributes(){var t;const n=hbe();this.attributes={browserLanguage:navigator.language,browserName:n?.browserName,browserVersion:n?.browserVersion,osName:n?.osName,osVersion:n?.osVersion,deviceType:(t=n?.deviceType)!==null&&t!==void 0?t:pbe,platformType:mbe,domain:window.location.hostname,"aws:releaseId":this.config.releaseId},n||(this.attributes["aws:userAgent"]=navigator.userAgent)}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}sample(){return Math.random()<this.config.sessionSampleRate}}class vbe{constructor(t,n){this.config=t,this.record=n,this.page=void 0,this.resumed=!1,this.recordInteraction=!1}getPage(){return this.page}getAttributes(){return this.attributes}resumeSession(t){this.recordInteraction=!0,t&&(this.page=t,this.resumed=!0)}recordPageView(t){let n;if(typeof t=="string"?n=t:n=t.pageId,Ce.debug(`recordPageView called with pageId: ${n}`),this.useCookies()&&(this.recordInteraction=!0),!this.page)this.createLandingPage(n),Ce.info(`Landing page created: ${n}`);else if(this.page.pageId!==n)this.createNextPage(this.page,n),Ce.debug(`Navigation to new page: ${n}`);else if(this.resumed){Ce.info(`Resumed session for page: ${n}`),this.collectAttributes(this.page,typeof t=="object"?t:void 0);return}else{Ce.debug(`No page change detected for: ${n}`);return}this.collectAttributes(this.page,typeof t=="object"?t:void 0),this.recordPageViewEvent(this.page)}createNextPage(t,n){const r=Date.now();Ce.debug(`Creating next page ${n}, interaction: ${t.interaction+1}`),this.timeOnParentPage=r-t.start,this.resumed=!1,this.page={pageId:n,parentPageId:t.pageId,interaction:t.interaction+1,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:r}}createLandingPage(t){this.page={pageId:t,interaction:0,referrer:document.referrer,referrerDomain:this.getDomainFromReferrer(),start:Date.now()}}collectAttributes(t,n){var r;this.attributes={title:!((r=n?.pageAttributes)===null||r===void 0)&&r.title?n.pageAttributes.title:document.title,pageId:t.pageId},this.recordInteraction&&(this.attributes.interaction=t.interaction,t.parentPageId!==void 0&&(this.attributes.parentPageId=t.parentPageId)),n?.pageTags&&(this.attributes.pageTags=n.pageTags),n?.pageAttributes&&(this.attributes=Object.assign(Object.assign({},n.pageAttributes),this.attributes))}createPageViewEvent(t){const n={version:"1.0.0",pageId:t.pageId};return this.recordInteraction&&(n.interaction=t.interaction,n.pageInteractionId=t.pageId+"-"+t.interaction,t.parentPageId!==void 0&&(n.parentPageInteractionId=t.parentPageId+"-"+(t.interaction-1),n.timeOnParentPage=this.timeOnParentPage),n.referrer=document.referrer,n.referrerDomain=this.getDomainFromReferrer()),n}recordPageViewEvent(t){this.record(ube,this.createPageViewEvent(t))}useCookies(){return navigator.cookieEnabled&&this.config.allowCookies}getDomainFromReferrer(){try{return new URL(document.referrer).hostname}catch{return document.referrer==="localhost"?document.referrer:""}}}var Mf;(function(e){e.EVENT="event"})(Mf||(Mf={}));class _z{constructor(){this.subscribers=new Map}subscribe(t,n){var r;const o=(r=this.subscribers.get(t))!==null&&r!==void 0?r:[];o.length||this.subscribers.set(t,o),o.push(n)}unsubscribe(t,n){const r=this.subscribers.get(t);if(r){for(let o=0;o<r.length;o++)if(r[o]===n)return r.splice(o,1),!0}return!1}dispatch(t,n){const r=this.subscribers.get(t);if(r)for(const o of r)o(n)}}const ybe="3.1.0",bbe=new Set(["pageId","parentPageId","interaction","pageTags","title"]),fw=(e,t)=>{if(!e)return{};const n={};for(const[r,o]of Object.entries(e)){if(r.startsWith("aws:")){Ce.warn(`Dropping ${t} metadata key "${r}": "aws:" namespace is reserved.`);continue}if((t==="event"||t==="hook")&&bbe.has(r)){Ce.warn(`Dropping ${t} metadata key "${r}": owned by page state.`);continue}const a=typeof o;if(a!=="string"&&a!=="number"&&a!=="boolean"){Ce.warn(`Dropping ${t} metadata key "${r}": value must be string|number|boolean.`);continue}n[r]=o}return n};class Sbe{constructor(t,n,r=new _z){this.eventBus=r,this.events=[],this.candidates=new Map,this.droppedEvent=0,this.sessionLimitExceeded=0,this.recordPageView=o=>{this.isCurrentUrlAllowed()&&this.pageManager.recordPageView(o)},this.recordEvent=(o,a,l)=>{this.enabled&&this.isCurrentUrlAllowed()&&(o!==Lx&&this.sessionManager.getSession(),this.sessionManager.canRecord()?(this.sessionManager.incrementSessionEventCount(),this.addRecordToCache(o,a,l)):this.sessionLimitExceeded++)},this.recordCandidate=(o,a,l)=>{const c=this.sessionManager.getSession();if(!this.enabled||!this.isCurrentUrlAllowed()||!c.record)return;const[d]=this.createEvent(o,a,l);if(this.candidates.has(o)){this.candidates.set(o,d);return}this.candidates.size<this.config.candidatesCacheSize&&!this.sessionManager.isLimitExceeded()&&(this.candidates.set(o,d),this.sessionManager.incrementSessionEventCount())},this.getSession=()=>{if(this.isCurrentUrlAllowed())return this.sessionManager.getSession()},this.getSessionId=()=>this.sessionManager.getSession().sessionId,this.pinSessionId=o=>{this.sessionManager.pinSessionId(o)},this.startSession=o=>this.sessionManager.startSession(o),this.getUserId=()=>this.sessionManager.getUserId(),this.pinUserId=o=>{this.sessionManager.pinUserId(o)},this.addRecordToCache=(o,a,l)=>{if(!this.enabled)return;if(this.events.length>=this.config.eventCacheSize){this.droppedEvent+=1;return}const[c,d]=this.createEvent(o,a,l);this.eventBus.dispatch(Mf.EVENT,d),this.events.push(c)},this.createEvent=(o,a,l)=>{var c;const d=(c=this.pageManager.getAttributes())!==null&&c!==void 0?c:{},f=fw(l,"event");let p={};if(this.eventMetadataHook)try{const v=Object.freeze(Object.assign({},d)),S=this.eventMetadataHook(o,a,v);S&&(p=fw(S,"hook"))}catch(v){Ce.warn(`eventMetadataHook threw for type "${o}"; dropping hook output for this event.`,v)}const m=Object.assign(Object.assign(Object.assign({},d),p),f),g={id:Tc(),timestamp:new Date,type:o};return[Object.assign(Object.assign({},g),{details:JSON.stringify(a),metadata:JSON.stringify(m)}),Object.assign(Object.assign({},g),{details:a,metadata:m})]},this.appMonitorDetails=t,this.config=n,this.enabled=!0,this.pageManager=new vbe(n,this.recordEvent),this.sessionManager=new gbe(t,n,this.recordEvent,this.pageManager),this.installationMethod=n.client,this.applicationAttributes=Object.freeze(fw(n.applicationAttributes,"application"))}enable(){this.enabled=!0}disable(){this.enabled=!1}setPluginFlushHook(t){this.pluginFlushHook=t}isSessionSampled(){return this.sessionManager.isSampled()}hasEvents(){if(this.sessionLimitExceeded>0){const t=this.events.length+this.sessionLimitExceeded;this.sessionManager.isSampled()?Ce.warn(`Dropped ${this.sessionLimitExceeded} of ${t} recently observed events (${(this.sessionLimitExceeded/t*100).toFixed(2)}%) because the session limit has exceeded. Consider increasing sessionEventLimit (currently ${this.config.sessionEventLimit}) to ${t} or more to avoid data loss.`):Ce.warn(`Dropped ${this.sessionLimitExceeded} of ${t} recently observed events (${(this.sessionLimitExceeded/t*100).toFixed(2)}%) because current session is not sampled. Consider increasing sessionSampleRate (currently ${this.config.sessionSampleRate}) to capture more user sessions.`),this.sessionLimitExceeded=0}return this.events.length!==0}hasCandidates(){return this.candidates.size!==0}getEventBatch(t=!1){var n;if(this.droppedEvent>0){const o=this.events.length+this.droppedEvent;Ce.warn(`Dropped ${this.droppedEvent} of ${o} recently observed events (${(this.droppedEvent/o*100).toFixed(2)}%) due to insufficient in-memory queue. Increase eventCacheSize to ${o} (currently ${this.config.eventCacheSize}) to avoid data loss.`),this.droppedEvent=0}let r=[];if(t&&((n=this.pluginFlushHook)===null||n===void 0||n.call(this)),t&&this.hasCandidates())if(this.candidates.size<=this.config.batchLimit)r=Array.from(this.candidates.values()),this.candidates.clear();else{let o=0;for(const a of Array.from(this.candidates.keys())){if(o++>=this.config.batchLimit)break;const l=this.candidates.get(a);l&&(r.push(l),this.candidates.delete(a))}}return this.events.length&&(this.events.length<=this.config.batchLimit-r.length?(r.push(...this.events),this.events=[]):r.push(...this.events.splice(0,this.config.batchLimit-r.length))),r}getAppMonitorDetails(){return this.appMonitorDetails}getUserDetails(){return{userId:this.sessionManager.getUserId(),sessionId:this.sessionManager.getSession().sessionId}}addSessionAttributes(t){this.sessionManager.addSessionAttributes(t)}getCommonMetadata(){return Object.assign(Object.assign(Object.assign({},this.sessionManager.getAttributes()),this.applicationAttributes),{version:"1.0.0","aws:client":this.installationMethod,"aws:clientVersion":ybe})}setEventMetadataHook(t){this.eventMetadataHook=t}clearEventMetadataHook(){this.eventMetadataHook=void 0}isCurrentUrlAllowed(){const t=document.location.toString(),n=this.config.pagesToExclude.some(o=>o.test(t));return this.config.pagesToInclude.some(o=>o.test(t))&&!n}}var hn;(function(e){e.OTHER="other",e.STYLESHEET="stylesheet",e.DOCUMENT="document",e.SCRIPT="script",e.IMAGE="image",e.FONT="font"})(hn||(hn={}));var ya;(function(e){e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.FRAME="frame",e.SCRIPT="script",e.CSS="css"})(ya||(ya={}));const QD=e=>[e.startTime,e.duration].join("#"),Cbe=[{name:hn.STYLESHEET,list:["css","less"]},{name:hn.DOCUMENT,list:["htm","html","ts","doc","docx","pdf","xls","xlsx"]},{name:hn.SCRIPT,list:["js"]},{name:hn.IMAGE,list:["ai","bmp","gif","ico","jpeg","jpg","png","ps","psd","svg","tif","tiff"]},{name:hn.FONT,list:["fnt","fon","otf","ttf","woff"]}],XD=(e,t)=>{let n=hn.OTHER;if(e){const r=e.substring(e.lastIndexOf("/")+1),o=r.substring(r.lastIndexOf(".")+1).split(/[?#]/)[0];Cbe.forEach(a=>{a.list.indexOf(o)>-1&&(n=a.name)})}if(t&&n===hn.OTHER)switch(t){case ya.IMAGE:case ya.IMG:case ya.INPUT:n=hn.IMAGE;break;case ya.IFRAME:case ya.FRAME:n=hn.DOCUMENT;break;case ya.SCRIPT:n=hn.SCRIPT;break;case ya.CSS:n=hn.STYLESHEET;break}return n},Ebe=()=>PerformanceObserver.supportedEntryTypes.includes("largest-contentful-paint"),wbe=/\/appmonitors\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,xbe=(e,t)=>{try{return new URL(e).hostname===t&&wbe.test(e)}catch{return!1}},Iz="dom-event",_be={interactionId:()=>"",enableMutationObserver:!1,events:[]};class dI extends ro{constructor(t){super(Iz),this.enabled=!1,this.eventListenerMap=new Map,this.config=Object.assign(Object.assign({},_be),t)}static getElementInfo(t){const n={name:"UNKNOWN"};return t.target instanceof Node&&(n.name=t.target.nodeName),t.target instanceof Element&&t.target.id&&(n.id=t.target.id),n}enable(){if(document.readyState!=="complete"){window.addEventListener("load",()=>this.enable());return}this.enabled||(this.addListeners(),this.config.enableMutationObserver&&this.observeDOMMutation(),this.enabled=!0)}disable(){this.enabled&&(this.removeListeners(),this.observer&&this.observer.disconnect(),this.enabled=!1)}update(t){t.forEach(n=>{this.addEventHandler(n),this.config.events.push(n)})}onload(){this.enable()}removeListeners(){this.config.events.forEach(t=>this.removeEventHandler(t))}addListeners(){this.config.events.forEach(t=>this.addEventHandler(t))}getEventListener(t){return n=>{var r;const o=dI.getElementInfo(n),a=this.config.interactionId(n),l=Object.assign(Object.assign(Object.assign({version:"1.1.0",event:n.type,element:o.name},o.id?{elementId:o.id}:{}),a?{interactionId:a}:{}),t?{cssLocator:t}:{});!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(lbe,l)}}addEventHandler(t){const n=t.event,r=this.getEventListener(t.cssLocator),o=[],a=this.eventListenerMap.has(t)?this.eventListenerMap.get(t):[];if(t.cssLocator)document.querySelectorAll(t.cssLocator).forEach(c=>{o.push(c)});else if(t.elementId){const l=document.getElementById(t.elementId);l&&o.push(l)}else t.element&&o.push(t.element);o.forEach(l=>{l.addEventListener(n,r),a.push({element:l,eventListener:r})}),this.eventListenerMap.set(t,a)}removeEventHandler(t){const n=this.eventListenerMap.get(t);n&&(n.forEach(r=>{const o=r.element,a=r.eventListener;o.removeEventListener(t.event,a)}),this.eventListenerMap.delete(t))}observeDOMMutation(){this.observer=new MutationObserver(()=>{this.removeListeners(),this.addListeners()}),this.observer.observe(document,{childList:!0,subtree:!0})}}const Ibe=e=>{const t=typeof e;return(t==="object"||t==="function")&&!!e},Abe=e=>{const t={version:"1.0.0",type:"undefined",message:"undefined"};return e.type!==void 0&&(t.type=e.type),e.message!==void 0&&(t.message=e.message),e.filename!==void 0&&(t.filename=e.filename),e.lineno!==void 0&&(t.lineno=e.lineno),e.colno!==void 0&&(t.colno=e.colno),t},Tbe=(e,t)=>{e.type!=="unhandledrejection"&&(e.type=t.toString()),e.message=t.toString()},Rbe=(e,t,n)=>{t.name&&(e.type=t.name),t.message&&(e.message=t.message),t.fileName&&(e.filename=t.fileName),t.lineNumber&&(e.lineno=t.lineNumber),t.columnNumber&&(e.colno=t.columnNumber),n&&t.stack&&(e.stack=t.stack.length>n?t.stack.substring(0,n)+"...":t.stack)},Az=e=>e!==Object(e)&&e!==void 0&&e!==null,fI=(e,t)=>{const n=Abe(e),r=e.error;return Ibe(r)?Rbe(n,r,t):Az(r)&&Tbe(n,r),n},Tz="js-error",Obe={stackTraceLength:1e3,ignore:()=>!1};class Mbe extends ro{constructor(t){super(Tz),this.eventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent(n)},this.promiseRejectEventHandler=n=>{this.config.ignore(n)||this.recordJsErrorEvent({type:n.type,error:n.reason})},this.config=Object.assign(Object.assign({},Obe),t)}enable(){this.enabled||(this.addEventHandler(),this.enabled=!0)}disable(){this.enabled&&(this.removeEventHandler(),this.enabled=!1)}record(t){t instanceof ErrorEvent?this.recordJsErrorEvent(t):this.recordJsErrorEvent({type:"error",error:t})}onload(){this.addEventHandler()}recordJsErrorEvent(t){var n;(n=this.context)===null||n===void 0||n.record(cbe,fI(t,this.config.stackTraceLength))}addEventHandler(){window.addEventListener("error",this.eventHandler),window.addEventListener("unhandledrejection",this.promiseRejectEventHandler)}removeEventHandler(){window.removeEventListener("error",this.eventHandler),window.removeEventListener("unhandledrejection",this.promiseRejectEventHandler)}}const Nbe=e=>e.entryType==="resource"&&(!/^https?:/.test(e.name)||/^(fetch|xmlhttprequest)$/.test(e.initiatorType)),hI={eventLimit:10,ignore:Nbe,recordAllTypes:[hn.DOCUMENT,hn.SCRIPT,hn.STYLESHEET,hn.FONT],sampleTypes:[hn.IMAGE,hn.OTHER],reportAllLCP:!1,reportAllCLS:!1,reportAllINP:!1},Pbe="navigation",ic="navigation",hw="load";class kbe extends ro{constructor(t){super(Pbe),this.eventListener=()=>{performance.getEntriesByType(ic).length===0?this.performanceNavigationEventHandlerTimingLevel1():new PerformanceObserver(r=>{r.getEntries().filter(o=>o.entryType===ic).filter(o=>!this.config.ignore(o)).forEach(o=>{this.performanceNavigationEventHandlerTimingLevel2(o)})}).observe({entryTypes:[ic]})},this.performanceNavigationEventHandlerTimingLevel1=()=>{setTimeout(()=>{var r;const o=performance.timing,a=o.navigationStart,l={version:"1.0.0",initiatorType:"navigation",startTime:0,unloadEventStart:o.unloadEventStart>0?o.unloadEventStart-a:0,promptForUnload:o.unloadEventEnd-o.unloadEventStart,redirectStart:o.redirectStart>0?o.redirectStart-a:0,redirectTime:o.redirectEnd-o.redirectStart,fetchStart:o.fetchStart>0?o.fetchStart-a:0,domainLookupStart:o.domainLookupStart>0?o.domainLookupStart-a:0,dns:o.domainLookupEnd-o.domainLookupStart,connectStart:o.connectStart>0?o.connectStart-a:0,connect:o.connectEnd-o.connectStart,secureConnectionStart:o.secureConnectionStart>0?o.secureConnectionStart-a:0,tlsTime:o.secureConnectionStart>0?o.connectEnd-o.secureConnectionStart:0,requestStart:o.requestStart>0?o.requestStart-a:0,timeToFirstByte:o.responseStart-o.requestStart,responseStart:o.responseStart>0?o.responseStart-a:0,responseTime:o.responseStart>0?o.responseEnd-o.responseStart:0,domInteractive:o.domInteractive>0?o.domInteractive-a:0,domContentLoadedEventStart:o.domContentLoadedEventStart>0?o.domContentLoadedEventStart-a:0,domContentLoaded:o.domContentLoadedEventEnd-o.domContentLoadedEventStart,domComplete:o.domComplete>0?o.domComplete-a:0,domProcessingTime:o.loadEventStart-o.responseEnd,loadEventStart:o.loadEventStart>0?o.loadEventStart-a:0,loadEventTime:o.loadEventEnd-o.loadEventStart,duration:o.loadEventEnd-o.navigationStart,navigationTimingLevel:1};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(Dx,l)},0)},this.performanceNavigationEventHandlerTimingLevel2=n=>{var r;const o={version:"1.0.0",initiatorType:n.initiatorType,navigationType:n.type,startTime:n.startTime,unloadEventStart:n.unloadEventStart,promptForUnload:n.unloadEventEnd-n.unloadEventStart,redirectCount:n.redirectCount,redirectStart:n.redirectStart,redirectTime:n.redirectEnd-n.redirectStart,workerStart:n.workerStart,workerTime:n.workerStart>0?n.fetchStart-n.workerStart:0,fetchStart:n.fetchStart,domainLookupStart:n.domainLookupStart,dns:n.domainLookupEnd-n.domainLookupStart,nextHopProtocol:n.nextHopProtocol,connectStart:n.connectStart,connect:n.connectEnd-n.connectStart,secureConnectionStart:n.secureConnectionStart,tlsTime:n.secureConnectionStart>0?n.connectEnd-n.secureConnectionStart:0,requestStart:n.requestStart,timeToFirstByte:n.responseStart-n.requestStart,responseStart:n.responseStart,responseTime:n.responseStart>0?n.responseEnd-n.responseStart:0,domInteractive:n.domInteractive,domContentLoadedEventStart:n.domContentLoadedEventStart,domContentLoaded:n.domContentLoadedEventEnd-n.domContentLoadedEventStart,domComplete:n.domComplete,domProcessingTime:n.loadEventStart-n.responseEnd,loadEventStart:n.loadEventStart,loadEventTime:n.loadEventEnd-n.loadEventStart,duration:n.duration,headerSize:n.transferSize>0?n.transferSize-n.encodedBodySize:0,transferSize:n.transferSize,compressionRatio:n.encodedBodySize>0?n.decodedBodySize/n.encodedBodySize:0,navigationTimingLevel:2};!((r=this.context)===null||r===void 0)&&r.record&&this.context.record(Dx,o)},this.config=Object.assign(Object.assign({},hI),t)}enable(){this.enabled||(this.enabled=!0,window.addEventListener(hw,this.eventListener))}disable(){this.enabled&&(this.enabled=!1,this.eventListener&&window.removeEventListener(hw,this.eventListener))}hasTheWindowLoadEventFired(){return window.performance&&window.performance.getEntriesByType(ic).length?!!window.performance.getEntriesByType(ic)[0].loadEventEnd:!1}onload(){this.enabled&&(this.hasTheWindowLoadEventFired()?window.performance.getEntriesByType(ic).filter(t=>!this.config.ignore(t)).forEach(t=>this.performanceNavigationEventHandlerTimingLevel2(t)):window.addEventListener(hw,this.eventListener))}}var pw,JD;function Dbe(){if(JD)return pw;JD=1;function e(d){return typeof d=="function"}var t=console.error.bind(console);function n(d,f,p){var m=!!d[f]&&d.propertyIsEnumerable(f);Object.defineProperty(d,f,{configurable:!0,enumerable:m,writable:!0,value:p})}function r(d){d&&d.logger&&(e(d.logger)?t=d.logger:t("new logger isn't a function, not replacing"))}function o(d,f,p){if(!d||!d[f]){t("no original function "+f+" to wrap");return}if(!p){t("no wrapper function"),t(new Error().stack);return}if(!e(d[f])||!e(p)){t("original object and wrapper must be functions");return}var m=d[f],g=p(m,f);return n(g,"__original",m),n(g,"__unwrap",function(){d[f]===g&&n(d,f,m)}),n(g,"__wrapped",!0),n(d,f,g),g}function a(d,f,p){if(d)Array.isArray(d)||(d=[d]);else{t("must provide one or more modules to patch"),t(new Error().stack);return}if(!(f&&Array.isArray(f))){t("must provide one or more functions to wrap on modules");return}d.forEach(function(m){f.forEach(function(g){o(m,g,p)})})}function l(d,f){if(!d||!d[f]){t("no function to unwrap."),t(new Error().stack);return}if(!d[f].__unwrap)t("no original to unwrap to -- has "+f+" already been unwrapped?");else return d[f].__unwrap()}function c(d,f){if(d)Array.isArray(d)||(d=[d]);else{t("must provide one or more modules to patch"),t(new Error().stack);return}if(!(f&&Array.isArray(f))){t("must provide one or more functions to unwrap on modules");return}d.forEach(function(p){f.forEach(function(m){l(p,m)})})}return r.wrap=o,r.massWrap=a,r.unwrap=l,r.massUnwrap=c,pw=r,pw}var xg=Dbe();const Lbe=Xc(xg),e4=XL({__proto__:null,default:Lbe},[xg]);class pI extends ro{constructor(){super(...arguments),this.enable=this.patch.bind(this,!0),this.disable=this.patch.bind(this,!1),this.enabled=!1}patchAll(){const t=xg.wrap.bind(e4);for(const n of this.patches)t(n.nodule,n.name,n.wrapper())}unpatchAll(){const t=xg.unwrap.bind(e4);for(const n of this.patches)t(n.nodule,n.name)}patch(t=!0){this.enabled!==t&&(this.enabled=t,t?this.patchAll():this.unpatchAll())}}const Ube="page-view";class Fbe extends pI{constructor(){super(Ube),this.pushState=()=>{const t=this;return n=>function(r,o,a){const l=n.apply(this,arguments);return t.recordPageView(),l}},this.replaceState=()=>{const t=this;return n=>function(r,o,a){const l=n.apply(this,arguments);return t.recordPageView(),l}},this.popstateListener=t=>{this.recordPageView()},this.recordPageView=()=>{this.context.recordPageView(this.createIdForCurrentPage())},this.enable()}onload(){this.addListener(),this.recordPageView()}get patches(){return[{nodule:History.prototype,name:"pushState",wrapper:this.pushState},{nodule:History.prototype,name:"replaceState",wrapper:this.replaceState}]}addListener(){window.addEventListener("popstate",this.popstateListener)}createIdForCurrentPage(){const t=window.location.pathname,n=window.location.hash;switch(this.context.config.pageIdFormat){case rf.PathAndHash:return t&&n?t+n:t||n||"";case rf.Hash:return n||"";case rf.Path:default:return t||""}}}const zbe="resource",mw="resource";class $be extends ro{constructor(t){super(zbe),this.performanceEntryHandler=n=>{this.recordPerformanceEntries(n.getEntries())},this.recordPerformanceEntries=n=>{n.forEach(r=>{if(r.entryType!==mw||this.config.ignore(r))return;const{name:o,initiatorType:a}=r,l=XD(o,a);this.config.recordAllTypes.includes(l)?this.recordResourceEvent(r):this.config.sampleTypes.includes(l)&&this.eventCount<this.config.eventLimit&&(this.recordResourceEvent(r),this.eventCount++)})},this.recordResourceEvent=({name:n,startTime:r,initiatorType:o,duration:a,transferSize:l})=>{var c;if(!xbe(n,this.context.config.endpointUrl.hostname)&&!((c=this.context)===null||c===void 0)&&c.record){const d={version:"1.0.0",initiatorType:o,startTime:r,duration:a,fileType:XD(n,o),transferSize:l};this.context.config.recordResourceUrl&&(d.targetUrl=n),this.context.record(xz,d)}},this.config=Object.assign(Object.assign({},hI),t),this.eventCount=0,this.resourceObserver=new PerformanceObserver(this.performanceEntryHandler)}enable(){this.enabled||(this.enabled=!0,this.resourceObserver.observe({type:mw,buffered:!0}))}disable(){this.enabled&&(this.enabled=!1,this.resourceObserver.disconnect())}onload(){this.resourceObserver.observe({type:mw,buffered:!0})}}var Ux,t4,Xv=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},mI=function(e){if(document.readyState==="loading")return"loading";var t=Xv();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},jbe=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},Jv=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var r=e,o=r.id?"#"+r.id:jbe(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+o.length>(t||100)-1)return n||o;if(n=n?o+">"+n:o,r.id)break;e=r.parentNode}}catch{}return n},Rz=-1,Bbe=function(){return Rz},pu=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Rz=t.timeStamp,e(t))}),!0)},gI=function(){var e=Xv();return e&&e.activationStart||0},zo=function(e,t){var n=Xv(),r="navigate";return Bbe()>=0?r="back-forward-cache":n&&(document.prerendering||gI()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},dl=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(o){Promise.resolve().then((function(){t(o.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},$o=function(e,t,n,r){var o,a;return function(l){t.value>=0&&(l||r)&&((a=t.value-(o||0))||o===void 0)&&(o=t.value,t.delta=a,t.rating=(function(c,d){return c>d[1]?"poor":c>d[0]?"needs-improvement":"good"})(t.value,n),e(t))}},vI=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},rh=function(e){document.addEventListener("visibilitychange",(function(){document.visibilityState==="hidden"&&e()}))},ey=function(e){var t=!1;return function(){t||(e(),t=!0)}},wc=-1,n4=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},_g=function(e){document.visibilityState==="hidden"&&wc>-1&&(wc=e.type==="visibilitychange"?e.timeStamp:0,Hbe())},r4=function(){addEventListener("visibilitychange",_g,!0),addEventListener("prerenderingchange",_g,!0)},Hbe=function(){removeEventListener("visibilitychange",_g,!0),removeEventListener("prerenderingchange",_g,!0)},yI=function(){return wc<0&&(wc=n4(),r4(),pu((function(){setTimeout((function(){wc=n4(),r4()}),0)}))),{get firstHiddenTime(){return wc}}},ty=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},o4=[1800,3e3],qbe=function(e,t){t=t||{},ty((function(){var n,r=yI(),o=zo("FCP"),a=dl("paint",(function(l){l.forEach((function(c){c.name==="first-contentful-paint"&&(a.disconnect(),c.startTime<r.firstHiddenTime&&(o.value=Math.max(c.startTime-gI(),0),o.entries.push(c),n(!0)))}))}));a&&(n=$o(e,o,o4,t.reportAllChanges),pu((function(l){o=zo("FCP"),n=$o(e,o,o4,t.reportAllChanges),vI((function(){o.value=performance.now()-l.timeStamp,n(!0)}))})))}))},a4=[.1,.25],Vbe=function(e,t){(function(n,r){r=r||{},qbe(ey((function(){var o,a=zo("CLS",0),l=0,c=[],d=function(p){p.forEach((function(m){if(!m.hadRecentInput){var g=c[0],v=c[c.length-1];l&&m.startTime-v.startTime<1e3&&m.startTime-g.startTime<5e3?(l+=m.value,c.push(m)):(l=m.value,c=[m])}})),l>a.value&&(a.value=l,a.entries=c,o())},f=dl("layout-shift",d);f&&(o=$o(n,a,a4,r.reportAllChanges),rh((function(){d(f.takeRecords()),o(!0)})),pu((function(){l=0,a=zo("CLS",0),o=$o(n,a,a4,r.reportAllChanges),vI((function(){return o()}))})),setTimeout(o,0))})))})((function(n){var r=(function(o){var a,l={};if(o.entries.length){var c=o.entries.reduce((function(f,p){return f&&f.value>p.value?f:p}));if(c&&c.sources&&c.sources.length){var d=(a=c.sources).find((function(f){return f.node&&f.node.nodeType===1}))||a[0];d&&(l={largestShiftTarget:Jv(d.node),largestShiftTime:c.startTime,largestShiftValue:c.value,largestShiftSource:d,largestShiftEntry:c,loadState:mI(c.startTime)})}}return Object.assign(o,{attribution:l})})(n);e(r)}),t)},Oz=0,gw=1/0,cm=0,Wbe=function(e){e.forEach((function(t){t.interactionId&&(gw=Math.min(gw,t.interactionId),cm=Math.max(cm,t.interactionId),Oz=cm?(cm-gw)/7+1:0)}))},Mz=function(){return Ux?Oz:performance.interactionCount||0},Gbe=function(){"interactionCount"in performance||Ux||(Ux=dl("event",Wbe,{type:"event",buffered:!0,durationThreshold:0}))},po=[],of=new Map,Nz=0,Kbe=function(){var e=Math.min(po.length-1,Math.floor((Mz()-Nz)/50));return po[e]},Pz=[],Zbe=function(e){if(Pz.forEach((function(o){return o(e)})),e.interactionId||e.entryType==="first-input"){var t=po[po.length-1],n=of.get(e.interactionId);if(n||po.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};of.set(r.id,r),po.push(r)}po.sort((function(o,a){return a.latency-o.latency})),po.length>10&&po.splice(10).forEach((function(o){return of.delete(o.id)}))}}},bI=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=ey(e),document.visibilityState==="hidden"?e():(n=t(e),rh(e)),n},s4=[200,500],Ybe=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},ty((function(){var n;Gbe();var r,o=zo("INP"),a=function(c){bI((function(){c.forEach(Zbe);var d=Kbe();d&&d.latency!==o.value&&(o.value=d.latency,o.entries=d.entries,r())}))},l=dl("event",a,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=$o(e,o,s4,t.reportAllChanges),l&&(l.observe({type:"first-input",buffered:!0}),rh((function(){a(l.takeRecords()),r(!0)})),pu((function(){Nz=Mz(),po.length=0,of.clear(),o=zo("INP"),r=$o(e,o,s4,t.reportAllChanges)})))})))},Pc=[],ws=[],Fx=0,SI=new WeakMap,kc=new Map,zx=-1,Qbe=function(e){Pc=Pc.concat(e),kz()},kz=function(){zx<0&&(zx=bI(Xbe))},Xbe=function(){kc.size>10&&kc.forEach((function(l,c){of.has(c)||kc.delete(c)}));var e=po.map((function(l){return SI.get(l.entries[0])})),t=ws.length-50;ws=ws.filter((function(l,c){return c>=t||e.includes(l)}));for(var n=new Set,r=0;r<ws.length;r++){var o=ws[r];Lz(o.startTime,o.processingEnd).forEach((function(l){n.add(l)}))}var a=Pc.length-1-50;Pc=Pc.filter((function(l,c){return l.startTime>Fx&&c>a||n.has(l)})),zx=-1};Pz.push((function(e){e.interactionId&&e.target&&!kc.has(e.interactionId)&&kc.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Fx=Math.max(Fx,e.processingEnd);for(var r=ws.length-1;r>=0;r--){var o=ws[r];if(Math.abs(n-o.renderTime)<=8){(t=o).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},ws.push(t)),(e.interactionId||e.entryType==="first-input")&&SI.set(e,t),kz()}));var xs,af,Dz,Ig,Lz=function(e,t){for(var n,r=[],o=0;n=Pc[o];o++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},Jbe=function(e,t){t4||(t4=dl("long-animation-frame",Qbe)),Ybe((function(n){var r=(function(o){var a=o.entries[0],l=SI.get(a),c=a.processingStart,d=l.processingEnd,f=l.entries.sort((function(w,x){return w.processingStart-x.processingStart})),p=Lz(a.startTime,d),m=o.entries.find((function(w){return w.target})),g=m&&m.target||kc.get(a.interactionId),v=[a.startTime+a.duration,d].concat(p.map((function(w){return w.startTime+w.duration}))),S=Math.max.apply(Math,v),C={interactionTarget:Jv(g),interactionTargetElement:g,interactionType:a.name.startsWith("key")?"keyboard":"pointer",interactionTime:a.startTime,nextPaintTime:S,processedEventEntries:f,longAnimationFrameEntries:p,inputDelay:c-a.startTime,processingDuration:d-c,presentationDelay:Math.max(S-d,0),loadState:mI(a.startTime)};return Object.assign(o,{attribution:C})})(n);e(r)}),t)},i4=[2500,4e3],vw={},e0e=function(e,t){(function(n,r){r=r||{},ty((function(){var o,a=yI(),l=zo("LCP"),c=function(p){r.reportAllChanges||(p=p.slice(-1)),p.forEach((function(m){m.startTime<a.firstHiddenTime&&(l.value=Math.max(m.startTime-gI(),0),l.entries=[m],o())}))},d=dl("largest-contentful-paint",c);if(d){o=$o(n,l,i4,r.reportAllChanges);var f=ey((function(){vw[l.id]||(c(d.takeRecords()),d.disconnect(),vw[l.id]=!0,o(!0))}));["keydown","click"].forEach((function(p){addEventListener(p,(function(){return bI(f)}),{once:!0,capture:!0})})),rh(f),pu((function(p){l=zo("LCP"),o=$o(n,l,i4,r.reportAllChanges),vI((function(){l.value=performance.now()-p.timeStamp,vw[l.id]=!0,o(!0)}))}))}}))})((function(n){var r=(function(o){var a={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:o.value};if(o.entries.length){var l=Xv();if(l){var c=l.activationStart||0,d=o.entries[o.entries.length-1],f=d.url&&performance.getEntriesByType("resource").filter((function(S){return S.name===d.url}))[0],p=Math.max(0,l.responseStart-c),m=Math.max(p,f?(f.requestStart||f.startTime)-c:0),g=Math.max(m,f?f.responseEnd-c:0),v=Math.max(g,d.startTime-c);a={element:Jv(d.element),timeToFirstByte:p,resourceLoadDelay:m-p,resourceLoadDuration:g-m,elementRenderDelay:v-g,navigationEntry:l,lcpEntry:d},d.url&&(a.url=d.url),f&&(a.lcpResourceEntry=f)}}return Object.assign(o,{attribution:a})})(n);e(r)}),t)},Wd={passive:!0,capture:!0},t0e=new Date,l4=function(e,t){xs||(xs=t,af=e,Dz=new Date,Fz(removeEventListener),Uz())},Uz=function(){if(af>=0&&af<Dz-t0e){var e={entryType:"first-input",name:xs.type,target:xs.target,cancelable:xs.cancelable,startTime:xs.timeStamp,processingStart:xs.timeStamp+af};Ig.forEach((function(t){t(e)})),Ig=[]}},n0e=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?(function(n,r){var o=function(){l4(n,r),l()},a=function(){l()},l=function(){removeEventListener("pointerup",o,Wd),removeEventListener("pointercancel",a,Wd)};addEventListener("pointerup",o,Wd),addEventListener("pointercancel",a,Wd)})(t,e):l4(t,e)}},Fz=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,n0e,Wd)}))},c4=[100,300],r0e=function(e,t){t=t||{},ty((function(){var n,r=yI(),o=zo("FID"),a=function(d){d.startTime<r.firstHiddenTime&&(o.value=d.processingStart-d.startTime,o.entries.push(d),n(!0))},l=function(d){d.forEach(a)},c=dl("first-input",l);n=$o(e,o,c4,t.reportAllChanges),c&&(rh(ey((function(){l(c.takeRecords()),c.disconnect()}))),pu((function(){var d;o=zo("FID"),n=$o(e,o,c4,t.reportAllChanges),Ig=[],af=-1,xs=null,Fz(addEventListener),d=a,Ig.push(d),Uz()})))}))},o0e=function(e,t){r0e((function(n){var r=(function(o){var a=o.entries[0],l={eventTarget:Jv(a.target),eventType:a.name,eventTime:a.startTime,eventEntry:a,loadState:mI(a.startTime)};return Object.assign(o,{attribution:l})})(n);e(r)}),t)};const a0e="web-vitals";class s0e extends ro{constructor(t){super(a0e),this.resourceEventIds=new Map,this.cacheLCPCandidates=Ebe(),this.handleEvent=n=>{switch(n.type){case xz:const r=n.details;this.cacheLCPCandidates&&r.fileType===hn.IMAGE&&this.resourceEventIds.set(QD(n.details),n.id);break;case Dx:this.navigationEventId=n.id;break}},this.config=Object.assign(Object.assign({},hI),t)}enable(){}disable(){}onload(){this.context.eventBus.subscribe(Mf.EVENT,this.handleEvent),e0e(t=>this.handleLCP(t),{reportAllChanges:this.config.reportAllLCP}),o0e(t=>this.handleFID(t)),Vbe(t=>this.handleCLS(t),{reportAllChanges:!0}),Jbe(t=>this.handleINP(t),{reportAllChanges:!0})}handleLCP(t){var n,r;const o=t.attribution,a={element:o?.element,url:o?.url,timeToFirstByte:o?.timeToFirstByte,resourceLoadDelay:o?.resourceLoadDelay,resourceLoadTime:o?.resourceLoadDuration,elementRenderDelay:o?.elementRenderDelay};if(o?.lcpResourceEntry){const l=QD(o?.lcpResourceEntry);a.lcpResourceEntry=this.resourceEventIds.get(l)}this.navigationEventId&&(a.navigationEntry=this.navigationEventId),(n=this.context)===null||n===void 0||n.record(obe,{version:"1.0.0",value:t.value,attribution:a}),(r=this.context)===null||r===void 0||r.eventBus.unsubscribe(Mf.EVENT,this.handleEvent),this.resourceEventIds.clear(),this.navigationEventId=void 0}handleCLS(t){const n=t.attribution,{record:r,recordCandidate:o}=this.context;(this.config.reportAllCLS?r:o)(sbe,{version:"1.0.0",value:t.value,attribution:{largestShiftTarget:n?.largestShiftTarget,largestShiftValue:n?.largestShiftValue,largestShiftTime:n?.largestShiftTime,loadState:n?.loadState}})}handleFID(t){var n;const r=t.attribution;(n=this.context)===null||n===void 0||n.record(abe,{version:"1.0.0",value:t.value,attribution:{eventTarget:r?.eventTarget,eventType:r?.eventType,eventTime:r?.eventTime,loadState:r?.loadState}})}handleINP(t){const n=t.attribution,{record:r,recordCandidate:o}=this.context;(this.config.reportAllINP?r:o)(ibe,{version:"1.0.0",value:t.value,attribution:{interactionTarget:n?.interactionTarget,interactionTime:n?.interactionTime,nextPaintTime:n?.nextPaintTime,interactionType:n?.interactionType,inputDelay:n?.inputDelay,processingDuration:n?.processingDuration,presentationDelay:n?.presentationDelay,loadState:n?.loadState}})}}const i0e="fetch";class l0e extends pI{constructor(t){super(i0e),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.beginTrace=(n,r,o)=>{const a=Ec(),l=Xve(n,r,!0),c=dz(this.config.logicalServiceName,a,this.context.config.enableW3CTraceId),d=fz(hz(n),a,l);return c.subsegments.push(d),this.isTraceIdHeaderEnabled(n)&&this.addXRayTraceIdHeader(n,r,o,c),c},this.addXRayTraceIdHeader=(n,r,o,a)=>{if(n.headers)return eye(n.headers,a.trace_id,a.subsegments[0].id,this.context.config.enableW3CTraceId);r||(r={},[].push.call(o,r)),Jve(r,a.trace_id,a.subsegments[0].id,this.context.config.enableW3CTraceId)},this.endTrace=(n,r,o)=>{if(n){const a=Ec();if(n.subsegments[0].end_time=a,n.end_time=a,r){n.subsegments[0].http.response={status:r.status},sI(r.status)?(n.subsegments[0].throttle=!0,n.throttle=!0):cz(r.status)?(n.subsegments[0].error=!0,n.error=!0):aI(r.status)&&(n.subsegments[0].fault=!0,n.fault=!0);const l=r.headers.get("Content-Length"),c=l?parseInt(l,10):NaN;isNaN(c)||(n.subsegments[0].http.response.content_length=c)}o&&(n.fault=!0,n.subsegments[0].fault=!0,o instanceof Object?this.appendErrorCauseFromObject(n.subsegments[0],o):Az(o)&&this.appendErrorCauseFromPrimitive(n.subsegments[0],o.toString())),this.context.record(wz,n)}},this.createHttpEvent=(n,r)=>{const o=n;return{version:"1.0.0",request:{url:qm(n),method:r?.method?r.method:o.method?o.method:"GET"}}},this.recordHttpEventWithResponse=(n,r)=>{(this.config.recordAllRequests||!r.ok)&&(n.response={status:r.status,statusText:r.statusText},this.context.record(wg,n))},this.recordHttpEventWithError=(n,r)=>{n.error=fI({type:"error",error:r},this.config.stackTraceLength),this.context.record(wg,n)},this.fetch=(n,r,o,a,l)=>{const c=this.createHttpEvent(a,l);let d;if(!uz(qm(a),this.config))return n.apply(r,o);const f=nye(a.headers,this.context.config.enableW3CTraceId);return f.traceId&&f.segmentId?(c.trace_id=f.traceId,c.segment_id=f.segmentId):this.isTracingEnabled()&&this.isSessionRecorded()&&(d=this.beginTrace(a,l,o),c.trace_id=d.trace_id,c.segment_id=d.subsegments[0].id),n.apply(r,o).then(p=>(this.endTrace(d,p,void 0),this.recordHttpEventWithResponse(c,p),p)).catch(p=>{throw this.endTrace(d,void 0,p),this.recordHttpEventWithError(c,p),p})},this.fetchWrapper=()=>{const n=this;return r=>function(o,a){return n.fetch(r,this,arguments,o,a)}},this.config=Object.assign(Object.assign({},lz),t)}get patches(){return[{nodule:window,name:"fetch",wrapper:this.fetchWrapper}]}onload(){this.enable()}isTraceIdHeaderEnabled(t){const n=qm(t);return iz(n,this.config.addXRayTraceIdHeader)}appendErrorCauseFromPrimitive(t,n){t.cause={exceptions:[{type:n}]}}appendErrorCauseFromObject(t,n){t.cause={exceptions:[{type:n.name,message:n.message}]}}}class c0e extends Error{constructor(t){super(t),this.name="XMLHttpRequest error"}}const u0e="xhr";class d0e extends pI{constructor(t){super(u0e),this.addXRayTraceIdHeader=n=>iz(n,this.config.addXRayTraceIdHeader),this.isTracingEnabled=()=>this.context.config.enableXRay,this.isSessionRecorded=()=>{var n;return((n=this.context.getSession())===null||n===void 0?void 0:n.record)||!1},this.handleXhrLoadEvent=n=>{const r=n.target,o=this.xhrMap.get(r);if(o){const a=Ec();o.trace.end_time=a,o.trace.subsegments[0].end_time=a,o.trace.subsegments[0].http.response={status:r.status},sI(r.status)?(o.trace.subsegments[0].throttle=!0,o.trace.throttle=!0):cz(r.status)?(o.trace.subsegments[0].error=!0,o.trace.error=!0):aI(r.status)&&(o.trace.subsegments[0].fault=!0,o.trace.fault=!0);const l=r.getResponseHeader("Content-Length"),c=l?parseInt(l,10):NaN;isNaN(c)||(o.trace.subsegments[0].http.response.content_length=c),this.recordTraceEvent(o.trace),this.recordHttpEventWithResponse(o,r)}},this.handleXhrErrorEvent=n=>{const r=n.target,o=this.xhrMap.get(r),a="XMLHttpRequest error",l=r.statusText?r.status.toString()+": "+r.statusText:r.status.toString();if(o){const c=Ec();o.trace.fault=!0,o.trace.end_time=c,o.trace.subsegments[0].end_time=c,o.trace.subsegments[0].fault=!0,o.trace.subsegments[0].cause={exceptions:[{type:a,message:l}]},this.recordTraceEvent(o.trace),this.recordHttpEventWithError(o,r,new c0e(l))}},this.handleXhrAbortEvent=n=>{const r=n.target,o=this.xhrMap.get(r);o&&this.handleXhrDetailsOnError(o,r,"XMLHttpRequest abort")},this.handleXhrTimeoutEvent=n=>{const r=n.target,o=this.xhrMap.get(r);this.handleXhrDetailsOnError(o,r,"XMLHttpRequest timeout")},this.initializeTrace=n=>{const r=Ec();n.trace=dz(this.config.logicalServiceName,r,this.context.config.enableW3CTraceId),n.trace.subsegments.push(fz(hz(n.url),r,{request:{method:n.method,url:n.url,traced:!0}}))},this.sendWrapper=()=>{const n=this;return r=>function(){const o=n.xhrMap.get(this);return o&&(this.addEventListener("load",n.handleXhrLoadEvent),this.addEventListener("error",n.handleXhrErrorEvent),this.addEventListener("abort",n.handleXhrAbortEvent),this.addEventListener("timeout",n.handleXhrTimeoutEvent),n.initializeTrace(o),!n.isSyntheticsUA&&n.isTracingEnabled()&&n.addXRayTraceIdHeader(o.url)&&n.isSessionRecorded()&&(n.context.config.enableW3CTraceId?this.setRequestHeader(Yv,lI(o.trace.trace_id,o.trace.subsegments[0].id)):this.setRequestHeader(Zv,iI(o.trace.trace_id,o.trace.subsegments[0].id)))),r.apply(this,arguments)}},this.openWrapper=()=>{const n=this;return r=>function(o,a,l){return uz(a,n.config)&&n.xhrMap.set(this,{url:a,method:o,async:l}),r.apply(this,arguments)}},this.config=Object.assign(Object.assign({},lz),t),this.xhrMap=new Map,this.isSyntheticsUA=navigator.userAgent.includes("CloudWatchSynthetics")}onload(){this.enable()}get patches(){return[{nodule:XMLHttpRequest.prototype,name:"send",wrapper:this.sendWrapper},{nodule:XMLHttpRequest.prototype,name:"open",wrapper:this.openWrapper}]}handleXhrDetailsOnError(t,n,r){if(t){const o=Ec();t.trace.end_time=o,t.trace.subsegments[0].end_time=o,t.trace.subsegments[0].error=!0,t.trace.subsegments[0].cause={exceptions:[{type:r}]},this.recordTraceEvent(t.trace),this.recordHttpEventWithError(t,n,r)}}statusOk(t){return t>=200&&t<300}recordHttpEventWithResponse(t,n){this.xhrMap.delete(n);const r={version:"1.0.0",request:{method:t.method,url:t.url},response:{status:n.status,statusText:n.statusText}};this.isTracingEnabled()&&(r.trace_id=t.trace.trace_id,r.segment_id=t.trace.subsegments[0].id),(this.config.recordAllRequests||!this.statusOk(n.status))&&this.context.record(wg,r)}recordHttpEventWithError(t,n,r){this.xhrMap.delete(n);const o={version:"1.0.0",request:{method:t.method,url:t.url},error:fI({type:"error",error:r},this.config.stackTraceLength)};this.isTracingEnabled()&&(o.trace_id=t.trace.trace_id,o.segment_id=t.trace.subsegments[0].id),this.context.record(wg,o)}recordTraceEvent(t){!this.isSyntheticsUA&&this.isTracingEnabled()&&this.isSessionRecorded()&&this.context.record(wz,t)}}var it=(function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e[e.Annotation=8]="Annotation",e})({}),lt=(function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e})({}),Ar=(function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e})({}),hs=(function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e})({}),Nf=(function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e})({}),Pd=(function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e})({}),yn=(function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e})({}),u4={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},d4={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Gd={},$x={},f4=0;function f0e(e){const t=globalThis?.Zone?.__symbol__?.(e);if(t&&globalThis[t])return globalThis[t]}function CI(e){if(Gd[e])return Gd[e];const t=f0e(e)||globalThis[e],n=t.prototype,r=e in u4?u4[e]:void 0,o=!!(r&&r.every(c=>!!Object.getOwnPropertyDescriptor(n,c)?.get?.toString().includes("[native code]"))),a=e in d4?d4[e]:void 0,l=!!(a&&a.every(c=>typeof n[c]=="function"&&n[c]?.toString().includes("[native code]")));if(o&&l)return Gd[e]=t.prototype,t.prototype;try{const c=document.createElement("iframe");c.style.display="none",document.body.appendChild(c);const d=c.contentWindow;if(!d)return t.prototype;const f=d[e].prototype;if(!f)return c.remove(),n;const p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(c.classList.add("rr-block"),c.setAttribute("__rrwebUntaintedMutationObserver",""),$x[e]=()=>c.remove()):c.remove(),Gd[e]=f}catch{return n}}var h4={};function Lr(e,t,n){const r=h4[e]?.[n];if(r)return r.call(t);const o=CI(e),a=Object.getOwnPropertyDescriptor(o,n)?.get;return a?((h4[e]||={})[n]=a,a.call(t)):t[n]}var yw={};function zz(e,t,n){const r=`${e}.${String(n)}`;if(yw[r])return yw[r].bind(t);const o=CI(e)[n];return typeof o!="function"?t[n]:(yw[r]=o,o.bind(t))}function h0e(e){return Lr("Node",e,"ownerDocument")}function p0e(e){return Lr("Node",e,"childNodes")}function m0e(e){return Lr("Node",e,"parentNode")}function g0e(e){return Lr("Node",e,"parentElement")}function v0e(e){return Lr("Node",e,"textContent")}function y0e(e){return Lr("Node",e,"firstChild")}function b0e(e){return Lr("Node",e,"lastChild")}function S0e(e){return Lr("Node",e,"nextSibling")}function C0e(e){return Lr("Node",e,"previousSibling")}function E0e(e,t){return zz("Node",e,"contains")(t)}function w0e(e){return zz("Node",e,"getRootNode")()}function x0e(e){return!e||!("host"in e)?null:Lr("ShadowRoot",e,"host")}function _0e(e){return e.styleSheets}function I0e(e){return!e||!("shadowRoot"in e)?null:Lr("Element",e,"shadowRoot")}function A0e(e,t){return Lr("Element",e,"querySelector")(t)}function T0e(e,t){return Lr("Element",e,"querySelectorAll")(t)}function $z(){const e=CI("MutationObserver");f4++;let t=!1;return[e.constructor,()=>{if(t||(t=!0,--f4!==0))return;const n=$x.MutationObserver;if(n)try{n()}finally{delete Gd.MutationObserver,delete $x.MutationObserver}}]}var Pf=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Pf=()=>new Date().getTime());function fl(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}var Ne={ownerDocument:h0e,childNodes:p0e,parentNode:m0e,parentElement:g0e,textContent:v0e,firstChild:y0e,lastChild:b0e,nextSibling:S0e,previousSibling:C0e,contains:E0e,getRootNode:w0e,host:x0e,styleSheets:_0e,shadowRoot:I0e,querySelector:A0e,querySelectorAll:T0e,nowTimestamp:Pf,mutationObserverCtor:$z,patch:fl};function jz(e){return e.nodeType===e.ELEMENT_NODE}function sf(e){const t=e&&"host"in e&&"mode"in e&&Ne.host(e)||null;return!!(t&&"shadowRoot"in t&&Ne.shadowRoot(t)===e)}function lf(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function R0e(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function O0e(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function jx(e){try{const t=e.rules||e.cssRules;if(!t)return null;let n=e.href;return!n&&e.ownerNode&&(n=e.ownerNode.baseURI),R0e(Array.from(t,r=>Bz(r,n)).join(""))}catch{return null}}function Bz(e,t){if(N0e(e)){let n;try{n=jx(e.styleSheet)||O0e(e)}catch{n=e.cssText}return e.styleSheet.href?Rg(n,e.styleSheet.href):n}else{let n=e.cssText;return P0e(e)&&e.selectorText.includes(":")&&(n=M0e(n)),t?Rg(n,t):n}}function M0e(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function N0e(e){return"styleSheet"in e}function P0e(e){return"selectorText"in e}var Hz=class{idNodeMap=new Map;nodeMetaMap=new WeakMap;getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r));const n=Ne.shadowRoot(e);n&&this.removeNodeFromMap(n)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function k0e(){return new Hz}function Ag({element:e,maskInputOptions:t,tagName:n,type:r,value:o,maskInputFn:a}){let l=o||"";const c=r&&$s(r);return(t[n.toLowerCase()]||c&&t[c])&&(a?l=a(l,e):l="*".repeat(l.length)),l}function $s(e){return e.toLowerCase()}var p4="__rrweb_original__";function D0e(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const a=t.getImageData,l=p4 in a?a[p4]:a;if(new Uint32Array(l.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function Tg(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?$s(t):null}function qz(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}function L0e(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var U0e=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F0e=/^(?:[a-z+]+:)?\/\//i,z0e=/^www\..*/i,$0e=/^(data:)([^,]*),(.*)/i,j0e=/^blob:/i;function Rg(e,t){return(e||"").replace(U0e,(n,r,o,a,l,c)=>{const d=o||l||c,f=r||a||"";if(!d)return n;if(F0e.test(d)||z0e.test(d))return`url(${f}${d}${f})`;if($0e.test(d)||j0e.test(d))return`url(${f}${d}${f})`;if(d[0]==="#")return`url(${f}${d}${f})`;if(d[0]==="/")return`url(${f}${L0e(t)+d}${f})`;const p=d.split("#")[0],m=d.substring(p.length),g=t.split("#")[0].split("/"),v=p.split("/");g.pop();for(const S of v)S!=="."&&(S===".."?g.pop():g.push(S));return`url(${f}${g.join("/")}${m}${f})`})}var Vz="(?:/\\*[^*]*\\*/)|[\\s;]",B0e=new RegExp(`${Vz}|\\b(0)px?`,"g"),H0e=new RegExp(Vz,"g");function um(e,t=!1){return t?e.replace(H0e,""):e.replace(B0e,"$1")}function q0e(e,t,n=!1){const r=Array.from(t.childNodes),o=[];let a=0;if(r.length>1&&e&&typeof e=="string"){let l=um(e,n);const c=l.length/e.length;for(let d=1;d<r.length;d++)if(r[d].textContent&&typeof r[d].textContent=="string"){const f=um(r[d].textContent,n),p=100;let m=3;for(;m<f.length&&(f[m].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,m),1)!==-1);m++);for(;m<f.length;m++){let g=f.substring(0,m),v=l.split(g),S=-1;if(v.length===2)S=v[0].length;else if(v.length>2&&v[0]===""&&r[d-1].textContent!=="")S=l.indexOf(g,1);else if(v.length===1){if(g=g.substring(0,g.length-1),v=l.split(g),v.length<=1)return o.push(e),o;m=101}else m===f.length-1&&(S=l.indexOf(g));if(v.length>=2&&m>p){const C=r[d-1].textContent;if(C&&typeof C=="string"){const w=um(C).length;S=l.indexOf(g,w)}S===-1&&(S=v[0].length)}if(S!==-1){let C=Math.floor(S/c);for(;C>0&&C<e.length;){if(a+=1,a>50*r.length)return o.push(e),o;const w=um(e.substring(0,C),n);if(w.length===S){o.push(e.substring(0,C)),e=e.substring(C),l=l.substring(S);break}else w.length<S?C+=Math.max(1,Math.floor((S-w.length)/c)):C-=Math.max(1,Math.floor((w.length-S)*c))}break}}}}return o.push(e),o}function V0e(e,t){return q0e(e,t).join("/* rr_split */")}var W0e=1,G0e=new RegExp("[^a-z0-9-_:]");function Wz(){return W0e++}function K0e(e){if(e instanceof HTMLFormElement)return"form";const t=$s(e.tagName);return G0e.test(t)?"div":t}var lc,m4,Z0e=/^[^ \t\n\r\u000c]+/,Y0e=/^[, \t\n\r\u000c]+/;function Q0e(e,t){if(t.trim()==="")return t;let n=0;function r(a){let l;const c=a.exec(t.substring(n));return c?(l=c[0],n+=l.length,l):""}const o=[];for(;r(Y0e),!(n>=t.length);){let a=r(Z0e);if(a.slice(-1)===",")a=xc(e,a.substring(0,a.length-1)),o.push(a);else{let l="";a=xc(e,a);let c=!1;for(;;){const d=t.charAt(n);if(d===""){o.push((a+l).trim());break}else if(c)d===")"&&(c=!1);else if(d===","){n+=1,o.push((a+l).trim());break}else d==="("&&(c=!0);l+=d,n+=1}}}return o.join(", ")}var g4=new WeakMap;function xc(e,t){return!t||t.trim()===""?t:EI(e,t)}function X0e(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function EI(e,t){let n=g4.get(e);if(n||(n=e.createElement("a"),g4.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Gz(e,t,n,r){return r&&(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r[0]!=="#"||n==="background"&&["table","td","th"].includes(t)?xc(e,r):n==="srcset"?Q0e(e,r):n==="style"?Rg(r,EI(e)):t==="object"&&n==="data"?xc(e,r):r)}function Kz(e,t,n){return["video","audio"].includes(e)&&$s(t)==="autoplay"}function Zz(e,t,n){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const o=e.classList[r];if(t.test(o))return!0}if(n)return e.matches(n)}catch{}return!1}function Og(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?Og(Ne.parentNode(e),t,n):!1;for(let r=e.classList.length;r--;){const o=e.classList[r];if(t.test(o))return!0}return n?Og(Ne.parentNode(e),t,n):!1}function Yz(e,t,n,r){let o;if(jz(e)){if(o=e,!Ne.childNodes(o).length)return!1}else{if(Ne.parentElement(e)===null)return!1;o=Ne.parentElement(e)}try{if(typeof t=="string"){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(Og(o,t,r))return!0;if(n){if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}}catch{}return!1}function J0e(e,t,n){const r=e.contentWindow;if(!r)return;let o=!1,a;try{a=r.document.readyState}catch{return}if(a!=="complete"){const c=setTimeout(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{clearTimeout(c),o=!0,t()});return}const l="about:blank";if(r.location.href!==l||e.src===l||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function eSe(e,t,n){let r=!1,o;try{o=e.sheet}catch{return}if(o)return;const a=setTimeout(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{clearTimeout(a),r=!0,t()})}function tSe(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:a,needsMask:l,inlineStylesheet:c,maskInputOptions:d={},maskTextFn:f,maskInputFn:p,dataURLOptions:m={},inlineImages:g,recordCanvas:v,keepIframeSrcFn:S,newlyAddedElement:C=!1,cssCaptured:w=!1}=t,x=nSe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:yn.Document,childNodes:[],compatMode:e.compatMode}:{type:yn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:yn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:x};case e.ELEMENT_NODE:return oSe(e,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:c,maskInputOptions:d,maskInputFn:p,dataURLOptions:m,inlineImages:g,recordCanvas:v,keepIframeSrcFn:S,newlyAddedElement:C,rootId:x});case e.TEXT_NODE:return rSe(e,{doc:n,needsMask:l,maskTextFn:f,rootId:x,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:yn.CDATA,textContent:"",rootId:x};case e.COMMENT_NODE:return{type:yn.Comment,textContent:Ne.textContent(e)||"",rootId:x};default:return!1}}function nSe(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function rSe(e,t){const{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:a}=t,l=Ne.parentNode(e),c=l&&l.tagName;let d="";const f=c==="STYLE"?!0:void 0,p=c==="SCRIPT"?!0:void 0;return p?d="SCRIPT_PLACEHOLDER":a||(d=Ne.textContent(e),f&&d&&(d=Rg(d,EI(t.doc)))),!f&&!p&&d&&n&&(d=r?r(d,Ne.parentElement(e)):d.replace(/[\S]/g,"*")),{type:yn.Text,textContent:d||"",rootId:o}}function oSe(e,t){const{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:c,dataURLOptions:d={},inlineImages:f,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:g=!1,rootId:v}=t,S=Zz(e,r,o),C=K0e(e);let w={};const x=e.attributes.length;for(let T=0;T<x;T++){const O=e.attributes[T];Kz(C,O.name,O.value)||(w[O.name]=Gz(n,C,$s(O.name),O.value))}if(C==="link"&&a){const T=Array.from(n.styleSheets).find(D=>D.href===e.href);let O=null;T&&(O=jx(T)),O&&(delete w.rel,delete w.href,w._cssText=O)}if(C==="style"&&e.sheet){let T=jx(e.sheet);T&&(e.childNodes.length>1&&(T=V0e(T,e)),w._cssText=T)}if(["input","textarea","select"].includes(C)){const T=e.value,O=e.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&T?w.value=Ag({element:e,type:Tg(e),tagName:C,value:T,maskInputOptions:l,maskInputFn:c}):O&&(w.checked=O)}if(C==="option"&&(e.selected&&!l.select?w.selected=!0:delete w.selected),C==="dialog"&&e.open&&(w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),C==="canvas"&&p){if(e.__context==="2d")D0e(e)||(w.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const T=e.toDataURL(d.type,d.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height,T!==O.toDataURL(d.type,d.quality)&&(w.rr_dataURL=T)}}if(C==="img"&&f){lc||(lc=n.createElement("canvas"),m4=lc.getContext("2d"));const T=e,O=T.currentSrc||T.getAttribute("src")||"<unknown-src>",D=T.crossOrigin,P=()=>{T.removeEventListener("load",P);try{lc.width=T.naturalWidth,lc.height=T.naturalHeight,m4.drawImage(T,0,0),w.rr_dataURL=lc.toDataURL(d.type,d.quality)}catch(M){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?P():T.addEventListener("load",P);return}else console.warn(`Cannot inline img src=${O}! Error: ${M}`)}T.crossOrigin==="anonymous"&&(D?w.crossOrigin=D:T.removeAttribute("crossorigin"))};T.complete&&T.naturalWidth!==0?P():T.addEventListener("load",P)}if(["audio","video"].includes(C)){const T=w;T.rr_mediaState=e.paused?"paused":"played",T.rr_mediaCurrentTime=e.currentTime,T.rr_mediaPlaybackRate=e.playbackRate,T.rr_mediaMuted=e.muted,T.rr_mediaLoop=e.loop,T.rr_mediaVolume=e.volume}if(g||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),S){const{width:T,height:O}=e.getBoundingClientRect();w={class:w.class,rr_width:`${T}px`,rr_height:`${O}px`}}C==="iframe"&&!m(w.src)&&(e.contentDocument||(w.rr_src=w.src),delete w.src);let I;try{customElements.get(C)&&(I=!0)}catch{}return{type:yn.Element,tagName:C,attributes:w,childNodes:[],isSVG:X0e(e)||void 0,needBlock:S,rootId:v,isCustom:I}}function Ft(e){return e==null?"":e.toLowerCase()}function Qz(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function aSe(e,t){if(t.comment&&e.type===yn.Comment)return!0;if(e.type===yn.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&qz(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(Ft(e.attributes.name).match(/^msapplication-tile(image|color)$/)||Ft(e.attributes.name)==="application-name"||Ft(e.attributes.rel)==="icon"||Ft(e.attributes.rel)==="apple-touch-icon"||Ft(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&Ft(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ft(e.attributes.property).match(/^(og|twitter|fb):/)||Ft(e.attributes.name).match(/^(og|twitter):/)||Ft(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(Ft(e.attributes.name)==="robots"||Ft(e.attributes.name)==="googlebot"||Ft(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(Ft(e.attributes.name)==="author"||Ft(e.attributes.name)==="generator"||Ft(e.attributes.name)==="framework"||Ft(e.attributes.name)==="publisher"||Ft(e.attributes.name)==="progid"||Ft(e.attributes.property).match(/^article:/)||Ft(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(Ft(e.attributes.name)==="google-site-verification"||Ft(e.attributes.name)==="yandex-verification"||Ft(e.attributes.name)==="csrf-token"||Ft(e.attributes.name)==="p:domain_verify"||Ft(e.attributes.name)==="verify-v1"||Ft(e.attributes.name)==="verification"||Ft(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function _c(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,skipChild:d=!1,inlineStylesheet:f=!0,maskInputOptions:p={},maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:S={},inlineImages:C=!1,recordCanvas:w=!1,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:T=5e3,onStylesheetLoad:O,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:P=()=>!1,newlyAddedElement:M=!1,cssCaptured:L=!1}=t;let{needsMask:z}=t,{preserveWhiteSpace:G=!0}=t;z||(z=Yz(e,l,c,z===void 0));const j=tSe(e,{doc:n,mirror:r,blockClass:o,blockSelector:a,needsMask:z,inlineStylesheet:f,maskInputOptions:p,maskTextFn:m,maskInputFn:g,dataURLOptions:S,inlineImages:C,recordCanvas:w,keepIframeSrcFn:P,newlyAddedElement:M,cssCaptured:L});if(!j)return console.warn(e,"not serialized"),null;let F;r.hasNode(e)?F=r.getId(e):aSe(j,v)||!G&&j.type===yn.Text&&!j.textContent.replace(/^\s+|\s+$/gm,"").length?F=-2:F=Wz();const q=Object.assign(j,{id:F});if(r.add(e,q),F===-2)return null;x&&x(e);let X=!d;if(q.type===yn.Element){X=X&&!q.needBlock,delete q.needBlock;const W=Ne.shadowRoot(e);W&&lf(W)&&(q.isShadowHost=!0)}if((q.type===yn.Document||q.type===yn.Element)&&X){v.headWhitespace&&q.type===yn.Element&&q.tagName==="head"&&(G=!1);const W={doc:n,mirror:r,blockClass:o,blockSelector:a,needsMask:z,maskTextClass:l,maskTextSelector:c,skipChild:d,inlineStylesheet:f,maskInputOptions:p,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:S,inlineImages:C,recordCanvas:w,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:P,cssCaptured:!1};if(!(q.type===yn.Element&&q.tagName==="textarea"&&q.attributes.value!==void 0)){q.type===yn.Element&&q.attributes._cssText!==void 0&&typeof q.attributes._cssText=="string"&&(W.cssCaptured=!0);for(const me of Array.from(Ne.childNodes(e))){const ge=_c(me,W);ge&&q.childNodes.push(ge)}}let ee=null;if(jz(e)&&(ee=Ne.shadowRoot(e)))for(const me of Array.from(Ne.childNodes(ee))){const ge=_c(me,W);ge&&(lf(ee)&&(ge.isShadow=!0),q.childNodes.push(ge))}}const Se=Ne.parentNode(e);return Se&&sf(Se)&&lf(Se)&&(q.isShadow=!0),q.type===yn.Element&&q.tagName==="iframe"&&!Zz(e,o,a)&&J0e(e,()=>{const W=e.contentDocument;if(W&&I){const ee=_c(W,{doc:W,mirror:r,blockClass:o,blockSelector:a,needsMask:z,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:S,inlineImages:C,recordCanvas:w,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:P});ee&&I(e,ee)}},T),q.type===yn.Element&&q.tagName==="link"&&typeof q.attributes.rel=="string"&&(q.attributes.rel==="stylesheet"||q.attributes.rel==="preload"&&typeof q.attributes.href=="string"&&qz(q.attributes.href)==="css")&&eSe(e,()=>{if(O){const W=_c(e,{doc:n,mirror:r,blockClass:o,blockSelector:a,needsMask:z,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:f,maskInputOptions:p,maskTextFn:m,maskInputFn:g,slimDOMOptions:v,dataURLOptions:S,inlineImages:C,recordCanvas:w,preserveWhiteSpace:G,onSerialize:x,onIframeLoad:I,iframeLoadTimeout:T,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:P});W&&O(e,W)}},D),q}function sSe(e,t){const{mirror:n=new Hz,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,inlineImages:d=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskTextFn:m,maskInputFn:g,slimDOM:v=!1,dataURLOptions:S,preserveWhiteSpace:C,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:I,onStylesheetLoad:T,stylesheetLoadTimeout:O,keepIframeSrcFn:D=()=>!1}=t||{};return _c(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:m,maskInputFn:g,slimDOMOptions:Qz(v),dataURLOptions:S,inlineImages:d,recordCanvas:f,preserveWhiteSpace:C,onSerialize:w,onIframeLoad:x,iframeLoadTimeout:I,onStylesheetLoad:T,stylesheetLoadTimeout:O,keepIframeSrcFn:D,newlyAddedElement:!1})}var iSe=class Xz{parentElement=null;parentNode=null;ownerDocument;firstChild=null;lastChild=null;previousSibling=null;nextSibling=null;ELEMENT_NODE=1;TEXT_NODE=3;nodeType;nodeName;RRNodeType;constructor(...t){}get childNodes(){const t=[];let n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(t instanceof Xz){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};function Fn(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var yc=`Please stop import mirror directly. Instead of that,\r
106
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
107
+ or you can use record.mirror to access the mirror instance during recording.`,v4={map:{},getId(){return console.error(yc),-1},getNode(){return console.error(yc),null},removeNodeFromMap(){console.error(yc)},has(){return console.error(yc),!1},reset(){console.error(yc)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(v4=new Proxy(v4,{get(e,t,n){return t==="map"&&console.error(yc),Reflect.get(e,t,n)}}));function kf(e,t,n={}){let r=null,o=0;return function(...a){const l=Date.now();!o&&n.leading===!1&&(o=l);const c=t-(l-o),d=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),o=l,e.apply(d,a)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(d,a)},c))}}function ny(e,t,n,r,o=window){const a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(l){setTimeout(()=>{n.set.call(this,l)},0),a&&a.set&&a.set.call(this,l)}}),()=>ny(e,t,a||{},!0)}function Jz(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t.documentElement.scrollLeft||t?.body&&Ne.parentElement(t.body)?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body&&Ne.parentElement(t.body)?.scrollTop||t?.body?.scrollTop||0}}function e7(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function t7(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function n7(e){return e?e.nodeType===e.ELEMENT_NODE?e:Ne.parentElement(e):null}function Qn(e,t,n,r){if(!e)return!1;const o=n7(e);if(!o)return!1;try{if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(Og(o,t,r))return!0}catch{}return!!(n&&(o.matches(n)||r&&o.closest(n)!==null))}function lSe(e,t){return t.getId(e)!==-1}function bw(e,t,n){return e.tagName==="TITLE"&&n.headTitleMutations?!0:t.getId(e)===-2}function r7(e,t){if(sf(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const r=Ne.parentNode(e);return r&&r.nodeType===e.DOCUMENT_NODE?!1:r?r7(r,t):!0}function Bx(e){return!!e.changedTouches}function cSe(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function o7(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function a7(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Hx(e){return e?e instanceof iSe&&"shadowRoot"in e?!!e.shadowRoot:!!Ne.shadowRoot(e):!1}var uSe=class{id=1;styleIDMap=new WeakMap;idStyleMap=new Map;getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return t===void 0?n=this.id++:n=t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function s7(e){let t=null;return"getRootNode"in e&&Ne.getRootNode(e)?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&Ne.host(Ne.getRootNode(e))&&(t=Ne.host(Ne.getRootNode(e))),t}function dSe(e){let t=e,n;for(;n=s7(t);)t=n;return t}function fSe(e){const t=Ne.ownerDocument(e);if(!t)return!1;const n=dSe(e);return Ne.contains(t,n)}function qx(e){const t=Ne.ownerDocument(e);return t?Ne.contains(t,e)||fSe(e):!1}var y4=(e,t)=>`${e}@${t}`,hSe=class{frozen=!1;locked=!1;texts=[];attributes=[];attributeMap=new WeakMap;removes=[];mapRemoves=[];movedMap={};addedSet=new Set;movedSet=new Set;droppedSet=new Set;removesSubTreeCache=new Set;mutationCb;blockClass;blockSelector;maskTextClass;maskTextSelector;inlineStylesheet;maskInputOptions;maskTextFn;maskInputFn;keepIframeSrcFn;recordCanvas;inlineImages;slimDOMOptions;dataURLOptions;doc;mirror;iframeManager;stylesheetManager;shadowDomManager;processedNodeManager;unattachedDoc;init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0}unlock(){this.locked=!1,this.emit()}processMutations=e=>{e.forEach(this.processMutation),this.emit()};emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const m of this.movedSet){const g=Ne.parentNode(m);this.removesSubTreeCache.has(g)&&!this.movedSet.has(g)||this.addedSet.add(m)}let n=null,r=null,o=-1,a=null,l=!1;const c=new Set,d=this.addedSet.values();let f=d.next();for(;this.addedSet.size;){if(n!==null&&this.addedSet.has(Ne.previousSibling(n)))a=n,n=Ne.previousSibling(n);else{for(this.addedSet.has(f.value)||(f=d.next()),n=f.value;;){if(r=Ne.parentNode(n),this.addedSet.has(r)){n=r;continue}break}if(c.has(r))r=null;else if(r){if(qx(r)?(l=b4(this.droppedSet,r)||this.removesSubTreeCache.has(r),l&&b4(this.movedSet,n)&&(l=!1)):l=!0,this.addedSet.has(Ne.lastChild(r)))n=Ne.lastChild(r),a=null;else for(;;){if(a=Ne.nextSibling(n),this.addedSet.has(a)){n=a;continue}break}if(o=sf(r)?this.mirror.getId(s7(n)):this.mirror.getId(r),o===-1&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const S=Ne.host(r);o=this.mirror.getId(S)}}}if(this.addedSet.delete(n),!r||o===-1){c.add(n);continue}else if(l){this.droppedSet.add(n);continue}let m=!1;if(n.nodeType===Node.TEXT_NODE){const S=r.tagName;if(S==="TEXTAREA")continue;S==="STYLE"&&t.has(o)&&(m=!0)}let g=a?this.mirror.getId(a):null;for(;g===-2;)a=a&&Ne.nextSibling(a),g=a&&this.mirror.getId(a);if(g===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",a),n=null;continue}const v=_c(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:S=>{o7(S,this.mirror)&&this.iframeManager.addIframe(S),a7(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),Hx(n)&&this.shadowDomManager.addShadowRoot(Ne.shadowRoot(n),this.doc)},onIframeLoad:(S,C)=>{this.iframeManager.attachIframe(S,C),this.shadowDomManager.observeAttachShadow(S)},onStylesheetLoad:(S,C)=>{this.stylesheetManager.attachLinkElement(S,C)},cssCaptured:m});v&&(e.push({parentId:o,nextId:g,node:v}),t.add(v.id))}const p={texts:this.texts.map(m=>{const g=m.node,v=Ne.parentNode(g);return v&&v.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(v),{id:this.mirror.getId(g),value:m.value}}).filter(m=>!t.has(m.id)).filter(m=>this.mirror.has(m.id)),attributes:this.attributes.map(m=>{const{attributes:g}=m;if(typeof g.style=="string"){const v=JSON.stringify(m.styleDiff),S=JSON.stringify(m._unchangedStyles);v.length<g.style.length&&(v+S).split("var(").length===g.style.split("var(").length&&(g.style=m.styleDiff)}return{id:this.mirror.getId(m.node),attributes:g}}).filter(m=>!t.has(m.id)).filter(m=>this.mirror.has(m.id)),removes:this.removes,adds:e};!p.texts.length&&!p.attributes.length&&!p.removes.length&&!p.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(p))};genTextAreaValueMutation=e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const n=Array.from(Ne.childNodes(e),r=>Ne.textContent(r)||"").join("");t.attributes.value=Ag({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Tg(e),value:n,maskInputFn:this.maskInputFn})};processMutation=e=>{if(!bw(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=Ne.textContent(e.target);!Qn(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Yz(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,n7(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target,n=$s(t.tagName);let r=e.attributeName,o=e.target.getAttribute(r);if(r==="value"){const l=Tg(t);o=Ag({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:l,value:o,maskInputFn:this.maskInputFn})}if(Qn(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;let a=this.attributeMap.get(e.target);if(n==="iframe"&&r==="src"&&!this.keepIframeSrcFn(o))if(!t.contentDocument)r="rr_src";else return;if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),r==="type"&&n==="input"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Kz(n,r))if(a.attributes[r]=Gz(this.doc,n,$s(r),o),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const c of Array.from(t.style)){const d=t.style.getPropertyValue(c),f=t.style.getPropertyPriority(c);d!==l.style.getPropertyValue(c)||f!==l.style.getPropertyPriority(c)?f===""?a.styleDiff[c]=d:a.styleDiff[c]=[d,f]:a._unchangedStyles[c]=[d,f]}for(const c of Array.from(l.style))t.style.getPropertyValue(c)===""&&(a.styleDiff[c]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":if(Qn(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{qx(t)||this.shadowDomManager.removeShadowRootsIn(t);const n=this.mirror.getId(t),r=sf(e.target)?this.mirror.getId(Ne.host(e.target)):this.mirror.getId(e.target);Qn(e.target,this.blockClass,this.blockSelector,!1)||bw(t,this.mirror,this.slimDOMOptions)||!lSe(t,this.mirror)||(this.addedSet.has(t)?(Vx(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||r7(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[y4(n,r)]?Vx(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:sf(e.target)&&lf(e.target)?!0:void 0}),pSe(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}};genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(bw(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[y4(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Qn(e,this.blockClass,this.blockSelector,!1)||(Ne.childNodes(e).forEach(n=>this.genAdds(n)),Hx(e)&&Ne.childNodes(Ne.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}}};function Vx(e,t){e.delete(t),Ne.childNodes(t).forEach(n=>Vx(e,n))}function pSe(e,t){const n=[e];for(;n.length;){const r=n.pop();t.has(r)||(t.add(r),Ne.childNodes(r).forEach(o=>n.push(o)))}}function b4(e,t){return e.size===0?!1:i7(e,t)}function i7(e,t){if(e.has(t))return!0;const n=Ne.parentNode(t);return n?i7(e,n):!1}var cf;function mSe(e){cf=e}function gSe(){cf=void 0}var ct=e=>cf?((...n)=>{try{return e(...n)}catch(r){if(cf&&cf(r)===!0)return;throw r}}):e,Dc=new Set;function oh(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function l7(e,t){const n=new hSe;Dc.add(n),n.init(e);const[r,o]=$z(),a=new r(ct(n.processMutations.bind(n)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),()=>{a.disconnect(),Dc.delete(n),o()}}function vSe({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let l=[],c;const d=kf(ct(m=>{const g=Date.now()-c;e(l.map(v=>(v.timeOffset-=g,v)),m),l=[],c=null}),a),f=ct(kf(ct(m=>{const g=oh(m),{clientX:v,clientY:S}=Bx(m)?m.changedTouches[0]:m;c||(c=Pf()),l.push({x:v,y:S,id:r.getId(g),timeOffset:Pf()-c}),d(typeof DragEvent<"u"&&m instanceof DragEvent?lt.Drag:m instanceof MouseEvent?lt.MouseMove:lt.TouchMove)}),o,{trailing:!1})),p=[Fn("mousemove",f,n),Fn("touchmove",f,n),Fn("drag",f,n)];return ct(()=>{p.forEach(m=>m())})}function ySe({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const l=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,c=[];let d=null;const f=p=>m=>{const g=oh(m);if(Qn(g,r,o,!0))return;let v=null,S=p;if("pointerType"in m){switch(m.pointerType){case"mouse":v=hs.Mouse;break;case"touch":v=hs.Touch;break;case"pen":v=hs.Pen}v===hs.Touch?Ar[p]===Ar.MouseDown?S="TouchStart":Ar[p]===Ar.MouseUp&&(S="TouchEnd"):hs.Pen}else Bx(m)&&(v=hs.Touch);v!==null?(d=v,(S.startsWith("Touch")&&v===hs.Touch||S.startsWith("Mouse")&&v===hs.Mouse)&&(v=null)):Ar[p]===Ar.Click&&(v=d,d=null);const C=Bx(m)?m.changedTouches[0]:m;if(!C)return;const w=n.getId(g),{clientX:x,clientY:I}=C;ct(e)({type:Ar[S],id:w,x,y:I,...v!==null&&{pointerType:v}})};return Object.keys(Ar).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&l[p]!==!1).forEach(p=>{let m=$s(p);const g=f(p);if(window.PointerEvent)switch(Ar[p]){case Ar.MouseDown:case Ar.MouseUp:m=m.replace("mouse","pointer");break;case Ar.TouchStart:case Ar.TouchEnd:return}c.push(Fn(m,g,t))}),ct(()=>{c.forEach(p=>p())})}function c7({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:a}){return Fn("scroll",ct(kf(ct(l=>{const c=oh(l);if(!c||Qn(c,r,o,!0))return;const d=n.getId(c);if(c===t&&t.defaultView){const f=Jz(t.defaultView);e({id:d,x:f.left,y:f.top})}else e({id:d,x:c.scrollLeft,y:c.scrollTop})}),a.scroll||100)),t)}function bSe({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Fn("resize",ct(kf(ct(()=>{const o=e7(),a=t7();(n!==o||r!==a)&&(e({width:Number(a),height:Number(o)}),n=o,r=a)}),200)),t)}var SSe=["INPUT","TEXTAREA","SELECT"],S4=new WeakMap;function CSe({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:a,ignoreSelector:l,maskInputOptions:c,maskInputFn:d,sampling:f,userTriggeredOnInput:p}){function m(x){let I=oh(x);const T=x.isTrusted,O=I&&I.tagName;if(I&&O==="OPTION"&&(I=Ne.parentElement(I)),!I||!O||SSe.indexOf(O)<0||Qn(I,r,o,!0)||I.classList.contains(a)||l&&I.matches(l))return;let D=I.value,P=!1;const M=Tg(I)||"";M==="radio"||M==="checkbox"?P=I.checked:(c[O.toLowerCase()]||c[M])&&(D=Ag({element:I,maskInputOptions:c,tagName:O,type:M,value:D,maskInputFn:d})),g(I,p?{text:D,isChecked:P,userTriggered:T}:{text:D,isChecked:P});const L=I.name;M==="radio"&&L&&P&&t.querySelectorAll(`input[type="radio"][name="${L}"]`).forEach(z=>{if(z!==I){const G=z.value;g(z,p?{text:G,isChecked:!P,userTriggered:!1}:{text:G,isChecked:!P})}})}function g(x,I){const T=S4.get(x);if(!T||T.text!==I.text||T.isChecked!==I.isChecked){S4.set(x,I);const O=n.getId(x);ct(e)({...I,id:O})}}const v=(f.input==="last"?["change"]:["input","change"]).map(x=>Fn(x,ct(m),t)),S=t.defaultView;if(!S)return()=>{v.forEach(x=>x())};const C=S.Object.getOwnPropertyDescriptor(S.HTMLInputElement.prototype,"value"),w=[[S.HTMLInputElement.prototype,"value"],[S.HTMLInputElement.prototype,"checked"],[S.HTMLSelectElement.prototype,"value"],[S.HTMLTextAreaElement.prototype,"value"],[S.HTMLSelectElement.prototype,"selectedIndex"],[S.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&v.push(...w.map(x=>ny(x[0],x[1],{set(){ct(m)({target:this,isTrusted:!1})}},!1,S))),ct(()=>{v.forEach(x=>x())})}function Mg(e){const t=[];function n(r,o){if(dm("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||dm("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||dm("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||dm("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);return o.unshift(a),n(r.parentRule,o)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(a)}return o}return n(e,t)}function Cs(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function ESe({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ct((p,m,g)=>{const[v,S]=g,{id:C,styleId:w}=Cs(m,t,n.styleMirror);return(C&&C!==-1||w&&w!==-1)&&e({id:C,styleId:w,adds:[{rule:v,index:S}]}),p.apply(m,g)})}),r.CSSStyleSheet.prototype.addRule=function(p,m,g=this.cssRules.length){const v=`${p} { ${m} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[v,g])};const a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:ct((p,m,g)=>{const[v]=g,{id:S,styleId:C}=Cs(m,t,n.styleMirror);return(S&&S!==-1||C&&C!==-1)&&e({id:S,styleId:C,removes:[{index:v}]}),p.apply(m,g)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let l;r.CSSStyleSheet.prototype.replace&&(l=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:ct((p,m,g)=>{const[v]=g,{id:S,styleId:C}=Cs(m,t,n.styleMirror);return(S&&S!==-1||C&&C!==-1)&&e({id:S,styleId:C,replace:v}),p.apply(m,g)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:ct((p,m,g)=>{const[v]=g,{id:S,styleId:C}=Cs(m,t,n.styleMirror);return(S&&S!==-1||C&&C!==-1)&&e({id:S,styleId:C,replaceSync:v}),p.apply(m,g)})}));const d={};fm("CSSGroupingRule")?d.CSSGroupingRule=r.CSSGroupingRule:(fm("CSSMediaRule")&&(d.CSSMediaRule=r.CSSMediaRule),fm("CSSConditionRule")&&(d.CSSConditionRule=r.CSSConditionRule),fm("CSSSupportsRule")&&(d.CSSSupportsRule=r.CSSSupportsRule));const f={};return Object.entries(d).forEach(([p,m])=>{f[p]={insertRule:m.prototype.insertRule,deleteRule:m.prototype.deleteRule},m.prototype.insertRule=new Proxy(f[p].insertRule,{apply:ct((g,v,S)=>{const[C,w]=S,{id:x,styleId:I}=Cs(v.parentStyleSheet,t,n.styleMirror);return(x&&x!==-1||I&&I!==-1)&&e({id:x,styleId:I,adds:[{rule:C,index:[...Mg(v),w||0]}]}),g.apply(v,S)})}),m.prototype.deleteRule=new Proxy(f[p].deleteRule,{apply:ct((g,v,S)=>{const[C]=S,{id:w,styleId:x}=Cs(v.parentStyleSheet,t,n.styleMirror);return(w&&w!==-1||x&&x!==-1)&&e({id:w,styleId:x,removes:[{index:[...Mg(v),C]}]}),g.apply(v,S)})})}),ct(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=a,l&&(r.CSSStyleSheet.prototype.replace=l),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(d).forEach(([p,m])=>{m.prototype.insertRule=f[p].insertRule,m.prototype.deleteRule=f[p].deleteRule})})}function u7({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(Ne.host(n));const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(l){const c=a.set?.call(this,l);if(r!==null&&r!==-1)try{t.adoptStyleSheets(l,r)}catch{}return c}}),ct(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function wSe({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:ct((c,d,f)=>{const[p,m,g]=f;if(n.has(p))return a.apply(d,[p,m,g]);const{id:v,styleId:S}=Cs(d.parentRule?.parentStyleSheet,t,r.styleMirror);return(v&&v!==-1||S&&S!==-1)&&e({id:v,styleId:S,set:{property:p,value:m,priority:g},index:Mg(d.parentRule)}),c.apply(d,f)})});const l=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:ct((c,d,f)=>{const[p]=f;if(n.has(p))return l.apply(d,[p]);const{id:m,styleId:g}=Cs(d.parentRule?.parentStyleSheet,t,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&e({id:m,styleId:g,remove:{property:p},index:Mg(d.parentRule)}),c.apply(d,f)})}),ct(()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=l})}function xSe({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o,doc:a}){const l=ct(d=>kf(ct(f=>{const p=oh(f);if(!p||!(p instanceof HTMLMediaElement)||Qn(p,t,n,!0))return;const{currentTime:m,volume:g,muted:v,playbackRate:S,loop:C}=p;e({type:d,id:r.getId(p),currentTime:m,volume:g,muted:v,playbackRate:S,loop:C})}),o.media||500)),c=[Fn("play",l(Pd.Play),a),Fn("pause",l(Pd.Pause),a),Fn("seeked",l(Pd.Seeked),a),Fn("volumechange",l(Pd.VolumeChange),a),Fn("ratechange",l(Pd.RateChange),a)];return ct(()=>{c.forEach(d=>d())})}function _Se({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,a=n.FontFace;n.FontFace=function(d,f,p){const m=new a(d,f,p);return o.set(m,{family:d,buffer:typeof f!="string",descriptors:p,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),m};const l=fl(t.fonts,"add",function(c){return function(d){return setTimeout(ct(()=>{const f=o.get(d);f&&(e(f),o.delete(d))}),0),c.apply(this,[d])}});return r.push(()=>{n.FontFace=a}),r.push(l),ct(()=>{r.forEach(c=>c())})}function ISe(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:a}=e;let l=!0;const c=ct(()=>{const d=t.getSelection();if(!d||l&&d?.isCollapsed)return;l=d.isCollapsed||!1;const f=[],p=d.rangeCount||0;for(let m=0;m<p;m++){const{startContainer:g,startOffset:v,endContainer:S,endOffset:C}=d.getRangeAt(m);Qn(g,r,o,!0)||Qn(S,r,o,!0)||f.push({start:n.getId(g),startOffset:v,end:n.getId(S),endOffset:C})}a({ranges:f})});return c(),Fn("selectionchange",c)}function ASe({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:fl(n.customElements,"define",function(r){return function(o,a,l){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return r.apply(this,[o,a,l])}})}function TSe(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:a,viewportResizeCb:l,inputCb:c,mediaInteractionCb:d,styleSheetRuleCb:f,styleDeclarationCb:p,canvasMutationCb:m,fontCb:g,selectionCb:v,customElementCb:S}=e;e.mutationCb=(...C)=>{t.mutation&&t.mutation(...C),n(...C)},e.mousemoveCb=(...C)=>{t.mousemove&&t.mousemove(...C),r(...C)},e.mouseInteractionCb=(...C)=>{t.mouseInteraction&&t.mouseInteraction(...C),o(...C)},e.scrollCb=(...C)=>{t.scroll&&t.scroll(...C),a(...C)},e.viewportResizeCb=(...C)=>{t.viewportResize&&t.viewportResize(...C),l(...C)},e.inputCb=(...C)=>{t.input&&t.input(...C),c(...C)},e.mediaInteractionCb=(...C)=>{t.mediaInteaction&&t.mediaInteaction(...C),d(...C)},e.styleSheetRuleCb=(...C)=>{t.styleSheetRule&&t.styleSheetRule(...C),f(...C)},e.styleDeclarationCb=(...C)=>{t.styleDeclaration&&t.styleDeclaration(...C),p(...C)},e.canvasMutationCb=(...C)=>{t.canvasMutation&&t.canvasMutation(...C),m(...C)},e.fontCb=(...C)=>{t.font&&t.font(...C),g(...C)},e.selectionCb=(...C)=>{t.selection&&t.selection(...C),v(...C)},e.customElementCb=(...C)=>{t.customElement&&t.customElement(...C),S(...C)}}function RSe(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};TSe(e,t);let r;e.recordDOM&&(r=l7(e,e.doc));const o=vSe(e),a=ySe(e),l=c7(e),c=bSe(e,{win:n}),d=CSe(e),f=xSe(e);let p=()=>{},m=()=>{},g=()=>{},v=()=>{};e.recordDOM&&(p=ESe(e,{win:n}),m=u7(e,e.doc),g=wSe(e,{win:n}),e.collectFonts&&(v=_Se(e)));const S=ISe(e),C=ASe(e),w=[];for(const x of e.plugins)w.push(x.observer(x.callback,n,x.options));return ct(()=>{r?.(),o(),a(),l(),c(),d(),f(),p(),m(),g(),v(),S(),C(),w.forEach(x=>x())})}function dm(e){return typeof window[e]<"u"}function fm(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var C4=class{generateIdFn;iframeIdToRemoteIdMap=new WeakMap;iframeRemoteIdToIdMap=new WeakMap;constructor(e){this.generateIdFn=e}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e);let l=o.get(t);return l||(l=this.generateIdFn(),o.set(t,l),a.set(l,t)),l}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(r=>this.getRemoteId(e,r,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},OSe=class{iframes=new WeakMap;crossOriginIframeMap=new WeakMap;crossOriginIframeMirror=new C4(Wz);crossOriginIframeStyleMirror;crossOriginIframeRootIdMap=new WeakMap;mirror;mutationCb;wrappedEmit;loadListener;unloadListener;attachedWindows=new Map;messageHandler=e=>this.handleMessage(e);stylesheetManager;recordCrossOriginIframes;constructor(e){this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new C4(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}addUnloadListener(e){this.unloadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.watchIframeWindow(e),this.loadListener?.(e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}destroy(){window.removeEventListener("message",this.messageHandler),this.attachedWindows.forEach(e=>e())}watchIframeWindow(e){const t=e.contentWindow;if(!t||this.attachedWindows.has(t))return;const n=[],r=()=>{this.attachedWindows.delete(t),n.forEach(o=>{try{o()}catch{}})};this.attachedWindows.set(t,r),this.recordCrossOriginIframes&&n.push(Fn("message",this.messageHandler,t)),n.push(Fn("pagehide",o=>{if(o.persisted)return;const a=t.document;r(),this.unloadListener?.(a)},t))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case it.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:it.IncrementalSnapshot,data:{source:lt.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case it.Meta:case it.Load:case it.DomContentLoaded:return!1;case it.Annotation:case it.Plugin:return t;case it.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case it.IncrementalSnapshot:switch(t.data.source){case lt.Mutation:return t.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(n.node,r)}),t.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"])}),t.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"])}),t.data.texts.forEach(n=>{this.replaceIds(n,e,["id"])}),t;case lt.Drag:case lt.TouchMove:case lt.MouseMove:return t.data.positions.forEach(n=>{this.replaceIds(n,e,["id"])}),t;case lt.ViewportResize:return!1;case lt.MediaInteraction:case lt.MouseInteraction:case lt.Scroll:case lt.CanvasMutation:case lt.Input:return this.replaceIds(t.data,e,["id"]),t;case lt.StyleSheetRule:case lt.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case lt.Font:return t;case lt.Selection:return t.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"])}),t;case lt.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(n=>{this.replaceStyleIds(n,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const o of r)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,t)})}patchRootIdOnNode(e,t){e.type!==yn.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t)})}},MSe=class{shadowDoms=new Map;mutationCb;scrollCb;bypassOptions;mirror;restoreHandlers=[];constructor(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!lf(e)||this.shadowDoms.has(e))return;const n=[];this.shadowDoms.set(e,n);const r=l7({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);n.push(r),n.push(c7({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{this.shadowDoms.get(e)===n&&(e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Ne.host(e))),n.push(u7({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)))},0)}removeShadowRootsIn(e){if(this.shadowDoms.size===0)return;const t=Ne.shadowRoot(e);t&&(this.shadowDoms.has(t)&&this.removeShadowRoot(t),this.removeShadowRootsIn(t)),Ne.childNodes(e).forEach(n=>this.removeShadowRootsIn(n))}removeShadowRoot(e){const t=this.shadowDoms.get(e);this.shadowDoms.delete(e),t?.forEach(Sw)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(fl(e.prototype,"attachShadow",function(r){return function(o){const a=r.call(this,o),l=Ne.shadowRoot(this);return l&&qx(this)&&n.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(Sw),this.restoreHandlers=[];const e=this.shadowDoms;this.shadowDoms=new Map,e.forEach(t=>t.forEach(Sw))}};function Sw(e){try{e()}catch{}}var Ic="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NSe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var hm=0;hm<Ic.length;hm++)NSe[Ic.charCodeAt(hm)]=hm;var PSe=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=Ic[t[n]>>2],o+=Ic[(t[n]&3)<<4|t[n+1]>>4],o+=Ic[(t[n+1]&15)<<2|t[n+2]>>6],o+=Ic[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},E4=new Map;function kSe(e,t){let n=E4.get(e);return n||(n=new Map,E4.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var d7=(e,t,n)=>{if(!e||!(h7(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=kSe(n,r);let a=o.indexOf(e);return a===-1&&(a=o.length,o.push(e)),a};function Vm(e,t,n){if(e instanceof Array)return e.map(r=>Vm(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:PSe(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Vm(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else{if(e instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:e.toDataURL()};if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Vm(e.data,t,n),e.width,e.height]};if(h7(e,t)||typeof e=="object")return{rr_type:e.constructor.name,index:d7(e,t,n)}}return e}var f7=(e,t,n)=>e.map(r=>Vm(r,t,n)),h7=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function").find(r=>e instanceof t[r]);function DSe(e,t,n,r){const o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of a)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const c=fl(t.CanvasRenderingContext2D.prototype,l,function(d){return function(...f){return Qn(this.canvas,n,r,!0)||setTimeout(()=>{const p=f7(f,t,this);e(this.canvas,{type:Nf["2D"],property:l,args:p})},0),d.apply(this,f)}});o.push(c)}catch{const c=ny(t.CanvasRenderingContext2D.prototype,l,{set(d){e(this.canvas,{type:Nf["2D"],property:l,args:[d],setter:!0})}});o.push(c)}return()=>{o.forEach(l=>l())}}function LSe(e){return e==="experimental-webgl"?"webgl":e}function w4(e,t,n,r){const o=[];try{const a=fl(e.HTMLCanvasElement.prototype,"getContext",function(l){return function(c,...d){if(!Qn(this,t,n,!0)){const f=LSe(c);if("__context"in this||(this.__context=f),r&&["webgl","webgl2"].includes(f))if(d[0]&&typeof d[0]=="object"){const p=d[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[c,...d])}});o.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach(a=>a())}}function x4(e,t,n,r,o,a){const l=[],c=Object.getOwnPropertyNames(e);for(const d of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const f=fl(e,d,function(p){return function(...m){const g=p.apply(this,m);if(d7(g,a,this),"tagName"in this.canvas&&!Qn(this.canvas,r,o,!0)){const v=f7(m,a,this),S={type:t,property:d,args:v};n(this.canvas,S)}return g}});l.push(f)}catch{const f=ny(e,d,{set(p){n(this.canvas,{type:t,property:d,args:[p],setter:!0})}});l.push(f)}return l}function USe(e,t,n,r){const o=[];return typeof t.WebGLRenderingContext<"u"&&o.push(...x4(t.WebGLRenderingContext.prototype,Nf.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...x4(t.WebGL2RenderingContext.prototype,Nf.WebGL2,e,n,r,t)),()=>{o.forEach(a=>a())}}var p7=`(function() {
108
+ // ../../node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js
109
+ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
110
+ var lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
111
+ for (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;
112
+ var encode = function(arraybuffer) {
113
+ var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";
114
+ for (i = 0; i < len; i += 3) {
115
+ base64 += chars[bytes[i] >> 2];
116
+ base64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];
117
+ base64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];
118
+ base64 += chars[bytes[i + 2] & 63];
119
+ }
120
+ if (len % 3 === 2) base64 = base64.substring(0, base64.length - 1) + "=";
121
+ else if (len % 3 === 1) base64 = base64.substring(0, base64.length - 2) + "==";
122
+ return base64;
123
+ };
124
+ // ../rrweb/src/record/workers/image-bitmap-data-url-worker.ts
125
+ const lastBlobMap = /* @__PURE__ */ new Map();
126
+ const transparentBlobMap = /* @__PURE__ */ new Map();
127
+ async function getTransparentBlobFor(width, height, dataURLOptions) {
128
+ const id = \`\${width}-\${height}\`;
129
+ if ("OffscreenCanvas" in globalThis) {
130
+ if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
131
+ const offscreen = new OffscreenCanvas(width, height);
132
+ offscreen.getContext("2d");
133
+ const base64 = encode(await (await offscreen.convertToBlob(dataURLOptions)).arrayBuffer());
134
+ transparentBlobMap.set(id, base64);
135
+ return base64;
136
+ } else return "";
137
+ }
138
+ const worker = self;
139
+ worker.onmessage = async function(e) {
140
+ if ("OffscreenCanvas" in globalThis) {
141
+ const { id, bitmap, width, height, dataURLOptions } = e.data;
142
+ const transparentBase64 = getTransparentBlobFor(width, height, dataURLOptions);
143
+ const offscreen = new OffscreenCanvas(width, height);
144
+ offscreen.getContext("2d").drawImage(bitmap, 0, 0);
145
+ bitmap.close();
146
+ const blob = await offscreen.convertToBlob(dataURLOptions);
147
+ const type = blob.type;
148
+ const base64 = encode(await blob.arrayBuffer());
149
+ if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
150
+ lastBlobMap.set(id, base64);
151
+ return worker.postMessage({ id });
152
+ }
153
+ if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
154
+ worker.postMessage({
155
+ id,
156
+ type,
157
+ base64,
158
+ width,
159
+ height
160
+ });
161
+ lastBlobMap.set(id, base64);
162
+ } else return worker.postMessage({ id: e.data.id });
163
+ };
164
+ })();
165
+
166
+ //# sourceMappingURL=image-bitmap-data-url-worker-DVcMqE1_.js.map`,_4=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",p7],{type:"text/javascript;charset=utf-8"});function FSe(e){let t;try{if(t=_4&&(self.URL||self.webkitURL).createObjectURL(_4),!t)throw"";const n=new Worker(t,{name:e?.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(p7),{name:e?.name})}}var zSe=class{pendingCanvasMutations=new Map;rafStamps={latestId:0,invokeId:null};mirror;mutationCb;resetObservers;frozen=!1;locked=!1;reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(n,r,o),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:l})}processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};initCanvasFPSObserver(e,t,n,r,o){const a=w4(t,n,r,!0),l=new Map,c=new FSe;c.onmessage=v=>{const{id:S}=v.data;if(l.set(S,!1),!("base64"in v.data))return;const{base64:C,type:w,width:x,height:I}=v.data;this.mutationCb({id:S,type:Nf["2D"],commands:[{property:"clearRect",args:[0,0,x,I]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:w}]},0,0]}]})};const d=1e3/e;let f=0,p;const m=()=>{const v=[];return t.document.querySelectorAll("canvas").forEach(S=>{Qn(S,n,r,!0)||v.push(S)}),v},g=v=>{if(f&&v-f<d){p=requestAnimationFrame(g);return}f=v,m().forEach(async S=>{const C=this.mirror.getId(S);if(l.get(C)||S.width===0||S.height===0)return;if(l.set(C,!0),["webgl","webgl2"].includes(S.__context)){const x=S.getContext(S.__context);x?.getContextAttributes()?.preserveDrawingBuffer===!1&&x.clear(x.COLOR_BUFFER_BIT)}const w=await createImageBitmap(S);c.postMessage({id:C,bitmap:w,width:S.width,height:S.height,dataURLOptions:o.dataURLOptions},[w])}),p=requestAnimationFrame(g)};p=requestAnimationFrame(g),this.resetObservers=()=>{a(),cancelAnimationFrame(p)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=w4(e,t,n,!1),o=DSe(this.processMutation.bind(this),e,t,n),a=USe(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;const r=n.map(a=>{const{type:l,...c}=a;return c}),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}},$Se=class{trackedLinkElements=new WeakSet;mutationCb;adoptedStyleSheetCb;styleMirror=new uSe;constructor(e){this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const n={id:t,styleIds:[]},r=[];for(const o of e){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),r.push({styleId:a,rules:Array.from(o.rules||CSSRule,(l,c)=>({rule:Bz(l,o.href),index:c}))})),n.styleIds.push(a)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},jSe=class{nodeMap=new WeakMap;active=!1;inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(r=>r!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Xt,Wm,vs,Df=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var Gr=k0e();function mu(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:a=null,ignoreClass:l="rr-ignore",ignoreSelector:c=null,maskTextClass:d="rr-mask",maskTextSelector:f=null,inlineStylesheet:p=!0,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:v,maskInputFn:S,maskTextFn:C,hooks:w,packFn:x,sampling:I={},dataURLOptions:T={},mousemoveWait:O,recordDOM:D=!0,recordCanvas:P=!1,recordCrossOriginIframes:M=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:z=!1,collectFonts:G=!1,inlineImages:j=!1,plugins:F,keepIframeSrcFn:q=()=>!1,ignoreCSSAttributes:X=new Set([]),errorHandler:Se}=e;mSe(Se);const W=M?window.parent===window:!0;let ee=!1;if(!W)try{window.parent.document&&(ee=!1)}catch{ee=!0}if(W&&!t)throw new Error("emit function is required");if(!W&&!ee)return()=>{};O!==void 0&&I.mousemove===void 0&&(I.mousemove=O),Gr.reset();const me=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:g!==void 0?g:{password:!0},ge=Qz(v);cSe();let Te,$=0;const te=we=>{for(const wt of F||[])wt.eventProcessor&&(we=wt.eventProcessor(we));return x&&!ee&&(we=x(we)),we};Xt=(we,wt)=>{const Ge=we;if(Ge.timestamp=Pf(),Ge.type!==it.FullSnapshot&&!(Ge.type===it.IncrementalSnapshot&&Ge.data.source===lt.Mutation)){vs.unfreeze();for(const Dt of Dc)if(Dt.isFrozen())Dt.unfreeze();else break}if(W)t?.(te(Ge),wt);else if(ee){const Dt={type:"rrweb",event:te(Ge),origin:window.location.origin,isCheckout:wt};window.parent.postMessage(Dt,"*")}if(Ge.type===it.FullSnapshot)Te=Ge,$=0;else if(Ge.type===it.IncrementalSnapshot){if(Ge.data.source===lt.Mutation&&Ge.data.isAttachIframe)return;$++;const Dt=r&&$>=r,Cn=n&&Ge.timestamp-Te.timestamp>n;(Dt||Cn)&&Wm(!0)}};const fe=we=>{Xt({type:it.IncrementalSnapshot,data:{source:lt.Mutation,...we}})},ce=we=>Xt({type:it.IncrementalSnapshot,data:{source:lt.Scroll,...we}}),be=we=>Xt({type:it.IncrementalSnapshot,data:{source:lt.CanvasMutation,...we}}),Fe=we=>Xt({type:it.IncrementalSnapshot,data:{source:lt.AdoptedStyleSheet,...we}}),ke=new $Se({mutationCb:fe,adoptedStyleSheetCb:Fe}),ae=new OSe({mirror:Gr,mutationCb:fe,stylesheetManager:ke,recordCrossOriginIframes:M,wrappedEmit:Xt});for(const we of F||[])we.getMirror&&we.getMirror({nodeMirror:Gr,crossOriginIframeMirror:ae.crossOriginIframeMirror,crossOriginIframeStyleMirror:ae.crossOriginIframeStyleMirror});const Ae=new jSe;vs=new zSe({recordCanvas:P,mutationCb:be,win:window,blockClass:o,blockSelector:a,mirror:Gr,sampling:I.canvas,dataURLOptions:T});const Je=new MSe({mutationCb:fe,scrollCb:ce,bypassOptions:{blockClass:o,blockSelector:a,maskTextClass:d,maskTextSelector:f,inlineStylesheet:p,maskInputOptions:me,dataURLOptions:T,maskTextFn:C,maskInputFn:S,recordCanvas:P,inlineImages:j,sampling:I,slimDOMOptions:ge,iframeManager:ae,stylesheetManager:ke,canvasManager:vs,keepIframeSrcFn:q,processedNodeManager:Ae},mirror:Gr});Wm=(we=!1)=>{if(!D)return;Xt({type:it.Meta,data:{href:window.location.href,width:t7(),height:e7()}},we),ke.reset(),Je.init(),vs.lock(),Dc.forEach(Ge=>Ge.lock());const wt=sSe(document,{mirror:Gr,blockClass:o,blockSelector:a,maskTextClass:d,maskTextSelector:f,inlineStylesheet:p,maskAllInputs:me,maskTextFn:C,maskInputFn:S,slimDOM:ge,dataURLOptions:T,recordCanvas:P,inlineImages:j,onSerialize:Ge=>{o7(Ge,Gr)&&ae.addIframe(Ge),a7(Ge,Gr)&&ke.trackLinkElement(Ge),Hx(Ge)&&Je.addShadowRoot(Ne.shadowRoot(Ge),document)},onIframeLoad:(Ge,Dt)=>{ae.attachIframe(Ge,Dt),Je.observeAttachShadow(Ge)},onStylesheetLoad:(Ge,Dt)=>{ke.attachLinkElement(Ge,Dt)},keepIframeSrcFn:q});if(!wt)return console.warn("Failed to snapshot the document");Xt({type:it.FullSnapshot,data:{node:wt,initialOffset:Jz(window)}},we),vs.unlock(),Dc.forEach(Ge=>Ge.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ke.adoptStyleSheets(document.adoptedStyleSheets,Gr.getId(document))};try{const we=[],wt=Cn=>ct(RSe)({mutationCb:fe,mousemoveCb:(He,Fa)=>Xt({type:it.IncrementalSnapshot,data:{source:Fa,positions:He}}),mouseInteractionCb:He=>Xt({type:it.IncrementalSnapshot,data:{source:lt.MouseInteraction,...He}}),scrollCb:ce,viewportResizeCb:He=>Xt({type:it.IncrementalSnapshot,data:{source:lt.ViewportResize,...He}}),inputCb:He=>Xt({type:it.IncrementalSnapshot,data:{source:lt.Input,...He}}),mediaInteractionCb:He=>Xt({type:it.IncrementalSnapshot,data:{source:lt.MediaInteraction,...He}}),styleSheetRuleCb:He=>Xt({type:it.IncrementalSnapshot,data:{source:lt.StyleSheetRule,...He}}),styleDeclarationCb:He=>Xt({type:it.IncrementalSnapshot,data:{source:lt.StyleDeclaration,...He}}),canvasMutationCb:be,fontCb:He=>Xt({type:it.IncrementalSnapshot,data:{source:lt.Font,...He}}),selectionCb:He=>{Xt({type:it.IncrementalSnapshot,data:{source:lt.Selection,...He}})},customElementCb:He=>{Xt({type:it.IncrementalSnapshot,data:{source:lt.CustomElement,...He}})},blockClass:o,ignoreClass:l,ignoreSelector:c,maskTextClass:d,maskTextSelector:f,maskInputOptions:me,inlineStylesheet:p,sampling:I,recordDOM:D,recordCanvas:P,inlineImages:j,userTriggeredOnInput:z,collectFonts:G,doc:Cn,maskInputFn:S,maskTextFn:C,keepIframeSrcFn:q,blockSelector:a,slimDOMOptions:ge,dataURLOptions:T,mirror:Gr,iframeManager:ae,stylesheetManager:ke,shadowDomManager:Je,processedNodeManager:Ae,canvasManager:vs,ignoreCSSAttributes:X,plugins:F?.filter(He=>He.observer)?.map(He=>({observer:He.observer,options:He.options,callback:Fa=>Xt({type:it.Plugin,data:{plugin:He.name,payload:Fa}})}))||[]},w),Ge=new Map;ae.addLoadListener(Cn=>{try{const He=Cn.contentDocument;if(Ge.has(He))return;Ge.set(He,wt(He))}catch(He){console.warn(He)}}),ae.addUnloadListener(Cn=>{const He=Ge.get(Cn);He&&(Ge.delete(Cn),He(),Je.removeShadowRootsIn(Cn),Gr.removeNodeFromMap(Cn))});const Dt=()=>{Wm(),we.push(wt(document)),Df=!0};return["interactive","complete"].includes(document.readyState)?Dt():(we.push(Fn("DOMContentLoaded",()=>{Xt({type:it.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&Dt()})),we.push(Fn("load",()=>{Xt({type:it.Load,data:{}}),L==="load"&&Dt()},window))),()=>{[...we,...Ge.values()].forEach(Cn=>{try{Cn()}catch(He){String(He).toLowerCase().includes("cross-origin")||console.warn(He)}}),Ge.clear(),ae.destroy(),Ae.destroy(),Je.reset(),vs.reset(),Df=!1,gSe()}}catch(we){console.warn(we)}}mu.addCustomEvent=(e,t)=>{if(!Df)throw new Error("please add custom event after start recording");Xt({type:it.Custom,data:{tag:e,payload:t}})};mu.addAnnotation=e=>{if(!Df)throw new Error("please add annotation after recording started");Xt({type:it.Annotation,data:e})};mu.freezePage=()=>{vs.freeze(),Dc.forEach(e=>e.freeze())};mu.takeFullSnapshot=e=>{if(!Df)throw new Error("please take full snapshot after start recording");Wm(e)};mu.mirror=Gr;const BSe="rrweb",HSe={maskAllInputs:!0,maskTextSelector:"*",maskInputOptions:void 0},qSe={additionalSampleRate:1,batchSize:50,flushInterval:5e3,recordOptions:{slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,recordCrossOriginIframes:!1}},I4=qSe;class VSe extends ro{constructor(t){super(BSe),this.recordingEvents=[],this.isRecording=!1,this.recordingStartTime=null,this.flushTimer=null,this.stopRecording=null,this.enabled=!1;const n=Object.assign(Object.assign(Object.assign({},I4.recordOptions),t?.recordOptions),HSe);this.config=Object.assign(Object.assign(Object.assign({},I4),t),{recordOptions:n}),Ce.info("RRWebPlugin initialized",{additionalSampleRate:this.config.additionalSampleRate,batchSize:this.config.batchSize,flushInterval:this.config.flushInterval})}enable(){var t;if(this.enabled){Ce.info("RRWebPlugin already enabled");return}const n=(t=this.context)===null||t===void 0?void 0:t.getSession();if(!n||!n.record){Ce.warn("RRWebPlugin skipping - session not being recorded",{hasSession:!!n,sessionRecord:n?.record});return}const r=Math.random();if(r>this.config.additionalSampleRate){Ce.warn("RRWebPlugin skipping - session replay additionalSampleRate",{randomValue:r,samplingRate:this.config.additionalSampleRate});return}this.enabled=!0,Ce.info("RRWebPlugin enabled - starting recording"),this.startRecording()}disable(){if(!this.enabled){Ce.info("RRWebPlugin already disabled");return}Ce.info("RRWebPlugin disabled - stopping recording"),this.enabled=!1,this.stopCurrentRecording()}record(t){const n=t?.action;n==="start"?(Ce.info("RRWebPlugin manual start recording"),this.startRecording()):n==="stop"&&(Ce.info("RRWebPlugin manual stop recording"),this.stopCurrentRecording())}onload(){}startRecording(){this.recordingStartTime=Date.now(),this.recordingEvents=[],this.isRecording=!0,Ce.info("RRWebPlugin starting rrweb recording",{startTime:this.recordingStartTime});const t=mu(Object.assign(Object.assign({},this.config.recordOptions),{emit:this.handleRRWebEvent.bind(this)}));t?(this.stopRecording=t,Ce.info("RRWebPlugin rrweb recording initialized successfully")):Ce.warn("RRWebPlugin failed to initialize rrweb recording"),this.flushTimer=window.setInterval(()=>{this.flush()},this.config.flushInterval)}stopCurrentRecording(){if(!this.isRecording){Ce.info("RRWebPlugin stopCurrentRecording called but not recording");return}Ce.info("RRWebPlugin stopping current recording"),this.isRecording=!1,this.stopRecording&&(this.stopRecording(),this.stopRecording=null,Ce.info("RRWebPlugin rrweb recording stopped")),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null,Ce.info("RRWebPlugin flush timer cleared")),this.flush()}handleRRWebEvent(t){this.isRecording&&(this.recordingEvents.push(t),this.recordingEvents.length>=this.config.batchSize&&(Ce.info("RRWebPlugin flushing events due to batch size",{eventCount:this.recordingEvents.length,batchSize:this.config.batchSize}),this.flush()))}flush(){if(this.recordingEvents.length===0){Ce.info("RRWebPlugin flushEvent called but no events to flush");return}Ce.info("RRWebPlugin flushing events",{eventCount:this.recordingEvents.length});const t=[...this.recordingEvents],n={version:"1.0.0",events:t,eventCount:t.length};this.context.record(KD,n),Ce.info("RRWebPlugin events sent to RUM",{eventType:KD,eventCount:this.recordingEvents.length}),this.recordingEvents=[]}}var WSe=function(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},Wx;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(Wx||(Wx={}));const m7="us-west-2",Gx=`https://dataplane.rum.${m7}.amazonaws.com`,g7=()=>({unique:!1,domain:window.location.hostname,path:"/",sameSite:"Strict",secure:!0}),v7=e=>({allowCookies:!1,batchLimit:100,client:cye,compressionStrategy:{enabled:!0},cookieAttributes:e,debug:!1,disableAutoPageView:!1,dispatchInterval:5*1e3,enableRumClient:!0,enableXRay:!1,endpoint:Gx,endpointUrl:new URL(Gx),eventCacheSize:1e3,eventPluginsToLoad:[],pageIdFormat:Wx.Path,pagesToExclude:[],pagesToInclude:[/.*/],signing:!1,recordResourceUrl:!0,retries:2,routeChangeComplete:100,routeChangeTimeout:1e4,sessionAttributes:{},sessionEventLimit:200,sessionLengthSeconds:1800,sessionSampleRate:1,suppressSessionStartEvent:!1,useBeacon:!0,userIdRetentionDays:30,enableW3CTraceId:!1,candidatesCacheSize:10});let GSe=class{constructor(t,n,r,o={}){var{cookieAttributes:a}=o,l=WSe(o,["cookieAttributes"]);this.eventBus=new _z,typeof r>"u"&&(r="us-west-2"),this.applicationId=t;const c=Object.assign(Object.assign({},g7()),a);this.config=Object.assign(Object.assign({fetchFunction:fetch},v7(c)),l),this.config.sessionId&&(this.config.suppressSessionStartEvent=!0),this.config.endpoint=l.endpoint?l.endpoint:Gx.replace(m7,r),this.config.endpointUrl=new URL(this.config.endpoint),Ce.configure(this.config.debug),Ce.info("Initialized RUM Slim"),this.eventCache=new Sbe({id:t,version:n},this.config,this.eventBus),this.dispatchManager=this.initDispatch(r,t),this.pluginManager=this.initPluginManager(t,n),this.eventCache.setPluginFlushHook(()=>this.pluginManager.flush()),this.config.enableRumClient?this.enable():this.disable()}setAwsCredentials(t){this.dispatchManager.setAwsCredentials(t)}setSigningConfigFactory(t){this.dispatchManager.setSigningConfigFactory(t)}addSessionAttributes(t){this.eventCache.addSessionAttributes(t)}getSessionId(){return this.eventCache.getSessionId()}pinSessionId(t){this.eventCache.pinSessionId(t)}startSession(t){return this.eventCache.startSession(t)}getUserId(){return this.eventCache.getUserId()}pinUserId(t){this.eventCache.pinUserId(t)}setEventMetadataHook(t){this.eventCache.setEventMetadataHook(t)}clearEventMetadataHook(){this.eventCache.clearEventMetadataHook()}addPlugin(t){this.pluginManager.addPlugin(t)}dispatch(){this.dispatchManager.dispatchFetch()}dispatchBeacon(){this.dispatchManager.dispatchBeacon()}enable(){this.eventCache.enable(),this.pluginManager.enable(),this.dispatchManager.enable()}disable(){this.dispatchManager.disable(),this.pluginManager.disable(),this.eventCache.disable()}allowCookies(t){this.config.allowCookies=t}clearCookies(){const t=this.config.cookieAttributes;[Cg,Eg,Wc,`${Cg}_${this.applicationId}`,`${Eg}_${this.applicationId}`,`${Wc}_${this.applicationId}`].forEach(r=>fbe(r,t))}recordPageView(t){this.eventCache.recordPageView(t)}recordError(t){this.pluginManager.record("com.amazonaws.rum.js-error",t)}registerDomEvents(t){this.pluginManager.updatePlugin("com.amazonaws.rum.dom-event",t)}recordEvent(t,n,r){this.eventCache.recordEvent(t,n,r)}initDispatch(t,n){return new uye(n,t,this.config.endpointUrl,this.eventCache,this.config)}initPluginManager(t,n){const r={applicationId:t,applicationVersion:n,config:this.config,record:this.eventCache.recordEvent,recordCandidate:this.eventCache.recordCandidate,recordPageView:this.eventCache.recordPageView,getSession:this.eventCache.getSession,eventBus:this.eventBus},o=new dbe(r);return this.config.disableAutoPageView||o.addPlugin(new Fbe),this.config.eventPluginsToLoad.forEach(a=>{o.addPlugin(a)}),o}};var go;(function(e){e.Errors="errors",e.Performance="performance",e.Interaction="interaction",e.Http="http",e.Replay="replay"})(go||(go={}));var A4;(function(e){e.Path="PATH",e.Hash="HASH",e.PathAndHash="PATH_AND_HASH"})(A4||(A4={}));const KSe=e=>Object.assign(Object.assign({},v7(e)),{signing:!0,telemetries:[go.Errors,go.Performance,go.Http,go.Replay]});class ZSe extends GSe{constructor(t,n,r,o={}){super(t,n,r,Object.assign(Object.assign({},KSe(g7())),o)),Ce.info(`RUM client initialized for app: ${t}`),Ce.info(`Telemetries enabled: ${this.config.telemetries.join(", ")||"none"}`)}initDispatch(t,n){const r=super.initDispatch(t,n);return r.setSigningConfigFactory(zye),r.setCognitoCredentialProviderFactory((o,a,l,c)=>{const d={identityPoolId:l,guestRoleArn:c,cookieAttributes:o.cookieAttributes};return l&&c?new tbe(d,a).ChainAnonymousCredentialsProvider:new nbe(d,a).ChainAnonymousCredentialsProvider}),this.config.signing&&this.config.identityPoolId&&r.setCognitoCredentials(this.config.identityPoolId,this.config.guestRoleArn),r}initPluginManager(t,n){const r=super.initPluginManager(t,n);return this.constructBuiltinPlugins().forEach(a=>{r.addPlugin(a)}),r}recordError(t){this.pluginManager.record(Tz,t)}registerDomEvents(t){this.pluginManager.updatePlugin(Iz,t)}constructBuiltinPlugins(){let t=[];const n=this.telemetryFunctor();return this.config.telemetries.forEach(r=>{typeof r=="string"&&n[r.toLowerCase()]?t=[...t,...n[r.toLowerCase()]({})]:Array.isArray(r)&&n[r[0].toLowerCase()]&&(t=[...t,...n[r[0].toLowerCase()](r[1])])}),t}telemetryFunctor(){return{[go.Errors]:t=>[new Mbe(t)],[go.Performance]:t=>[new kbe(t),new $be(t),new s0e(t)],[go.Interaction]:t=>[new dI(t)],[go.Http]:t=>[new d0e(t),new l0e(t)],[go.Replay]:t=>[new VSe(t)]}}}const y7={recordPageView:()=>{},recordError:()=>{},recordEvent:()=>{},recordTiming:()=>{}},YSe=/([?&](token|access_token|id_token|authorization)=[^&]*)|\/messages\/[a-z0-9_-]+/gi,QSe=/\/reset-password\/[^/?#\s]+/gi;function b7(e){return e.replace(YSe,"[redacted]").replace(QSe,"/reset-password/[redacted]")}function XSe(e){const t=e.indexOf("?"),n=e.indexOf("#"),r=t===-1&&n===-1?e.length:t===-1?n:n===-1?t:Math.min(t,n);return b7(e.slice(0,r))}function JSe(e){const t=b7(e.message);if(t===e.message)return e;const n=new Error(t);return n.name=e.name,n.stack=e.stack,n}function e1e(e){return{recordPageView(t){e.recordPageView(XSe(t))},recordError(t,n){e.recordError(JSe(t)),n&&e.recordEvent("telemetry.error_context",n)},recordEvent(t,n){e.recordEvent(t,n??{})},recordTiming(t,n,r){e.recordEvent("telemetry.timing",{...r,name:t,durationMs:String(n)})}}}function T4(e){return e instanceof Error?e:new Error(String(e))}function t1e(e){window.addEventListener("error",t=>{e.recordError(T4(t.error??t.message))}),window.addEventListener("unhandledrejection",t=>{e.recordError(T4(t.reason))})}function n1e(){const{appMonitorId:e,identityPoolId:t,region:n}=iu().rum;if(!e)return y7;const r=new ZSe(e,"1.0.0",n,{sessionSampleRate:1,identityPoolId:t,endpoint:`https://dataplane.rum.${n}.amazonaws.com`,telemetries:["performance"],disableAutoPageView:!0,allowCookies:!1,enableXRay:!1}),o=e1e(r);return t1e(o),o}const r1e="remit.stale-build-reload:",o1e=({reload:e,guard:t,commit:n})=>{if(t===null)return!1;const r=`${r1e}${n}`;return t.getItem(r)!==null?!1:(t.setItem(r,String(Date.now())),e(),!0)},a1e=()=>{window.addEventListener("vite:preloadError",e=>{o1e({reload:()=>window.location.reload(),guard:F_(),commit:cv})&&e.preventDefault()})},S7=_.createContext(y7);function QDe(){return _.useContext(S7)}const Kx="remit.theme",s1e="dark";function R4(){return typeof localStorage>"u"?"system":localStorage.getItem(Kx)??"system"}function Zx(e){if(typeof document>"u")return;const t=e==="dark"||e==="system"&&typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches;document.documentElement.classList.toggle(s1e,t)}function XDe(e){typeof localStorage<"u"&&(e==="system"?localStorage.removeItem(Kx):localStorage.setItem(Kx,e)),Zx(e)}const i1e=()=>{if(typeof window>"u"||(Zx(R4()),typeof window.matchMedia!="function"))return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=()=>{Zx(R4())};typeof e.addEventListener=="function"?e.addEventListener("change",t):e.addListener(t)},l1e=e=>e==="true"||e==="false"||e==="null"||/^["[{]/.test(e)||e!==""&&Number.isFinite(Number(e));function O4(e){return typeof e=="object"&&e!==null?JSON.stringify(e):typeof e=="string"?l1e(e)?JSON.stringify(e):e:String(e)}function c1e(e){const t=new URLSearchParams;for(const r of Object.keys(e)){const o=e[r];if(o!==void 0){if(Array.isArray(o)){for(const a of o)t.append(r,O4(a));continue}t.set(r,O4(o))}}const n=t.toString();return n===""?"":`?${n}`}const u1e=(e,t,n,r)=>{const o=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);Fi(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},M4={},Yx=(e,t,n,r)=>{Fi(n)&&M4[n]||(Fi(n)&&(M4[n]=new Date),u1e(e,t,n,r))},C7=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},Qx=(e,t,n)=>{e.loadNamespaces(t,C7(e,n))},N4=(e,t,n,r)=>{if(Fi(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Qx(e,n,r);n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,C7(e,r))},d1e=(e,t,n={})=>!t.languages||!t.languages.length?(Yx(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),Fi=e=>typeof e=="string",f1e=e=>typeof e=="object"&&e!==null,h1e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,p1e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},m1e=e=>p1e[e],g1e=e=>e.replace(h1e,m1e);let Xx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:g1e};const v1e=(e={})=>{Xx={...Xx,...e}},y1e=()=>Xx;let E7;const b1e=e=>{E7=e},S1e=()=>E7,C1e={type:"3rdParty",init(e){v1e(e.options.react),b1e(e)}},E1e=_.createContext();class w1e{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const x1e=(e,t)=>{const n=_.useRef();return _.useEffect(()=>{n.current=e},[e,t]),n.current},w7=(e,t,n,r)=>e.getFixedT(t,n,r),_1e=(e,t,n,r)=>_.useCallback(w7(e,t,n,r),[e,t,n,r]),x7=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:o}=_.useContext(E1e)||{},a=n||r||S1e();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new w1e),!a){Yx(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(P,M)=>Fi(M)?M:f1e(M)&&Fi(M.defaultValue)?M.defaultValue:Array.isArray(P)?P[P.length-1]:P,D=[O,{},!1];return D.t=O,D.i18n={},D.ready=!1,D}a.options.react?.wait&&Yx(a,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const l={...y1e(),...a.options.react,...t},{useSuspense:c,keyPrefix:d}=l;let f=e||o||a.options?.defaultNS;f=Fi(f)?[f]:f||["translation"],a.reportNamespaces.addUsedNamespaces?.(f);const p=(a.isInitialized||a.initializedStoreOnce)&&f.every(O=>d1e(O,a,l)),m=_1e(a,t.lng||null,l.nsMode==="fallback"?f:f[0],d),g=()=>m,v=()=>w7(a,t.lng||null,l.nsMode==="fallback"?f:f[0],d),[S,C]=_.useState(g);let w=f.join();t.lng&&(w=`${t.lng}${w}`);const x=x1e(w),I=_.useRef(!0);_.useEffect(()=>{const{bindI18n:O,bindI18nStore:D}=l;I.current=!0,!p&&!c&&(t.lng?N4(a,t.lng,f,()=>{I.current&&C(v)}):Qx(a,f,()=>{I.current&&C(v)})),p&&x&&x!==w&&I.current&&C(v);const P=()=>{I.current&&C(v)};return O&&a?.on(O,P),D&&a?.store.on(D,P),()=>{I.current=!1,a&&O&&O?.split(" ").forEach(M=>a.off(M,P)),D&&a&&D.split(" ").forEach(M=>a.store.off(M,P))}},[a,w]),_.useEffect(()=>{I.current&&p&&C(g)},[a,d,p]);const T=[S,a,p];if(T.t=S,T.i18n=a,T.ready=p,p||!p&&!c)return T;throw new Promise(O=>{t.lng?N4(a,t.lng,f,()=>O()):Qx(a,f,()=>O())})},I1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts",...e,headers:{"Content-Type":"application/json",...e.headers}}),A1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/oauth/microsoft/start",...e,headers:{"Content-Type":"application/json",...e.headers}}),T1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/test-connection",...e,headers:{"Content-Type":"application/json",...e.headers}}),R1e=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...e}),O1e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),M1e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...e}),N1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters",...e,headers:{"Content-Type":"application/json",...e.headers}}),P1e=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...e}),k1e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/filters/{filterId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),D1e=e=>(e.client??pe).put({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/folder-roles/{role}",...e,headers:{"Content-Type":"application/json",...e.headers}}),JDe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...e}),L1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),U1e=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...e}),F1e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/labels/{labelId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),z1e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...e}),$1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes",...e,headers:{"Content-Type":"application/json",...e.headers}}),e4e=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...e}),j1e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/mailboxes/{mailboxId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),B1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/messages/rescan",...e,headers:{"Content-Type":"application/json",...e.headers}}),H1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize",...e,headers:{"Content-Type":"application/json",...e.headers}}),q1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/preview",...e,headers:{"Content-Type":"application/json",...e.headers}}),V1e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/organize/{organizeJobId}",...e}),W1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync",...e}),G1e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/sync/status",...e}),K1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/accounts/{accountId}/trash/empty",...e}),Z1e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/search",...e}),Y1e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/addresses/{addressId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),Q1e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events",...e}),X1e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events",...e,headers:{"Content-Type":"application/json",...e.headers}}),J1e=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e}),eCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e}),tCe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-events/{calendarObjectId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),nCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-free-busy",...e}),rCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions",...e}),oCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/accept",...e,headers:{"Content-Type":"application/json",...e.headers}}),aCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/decline",...e}),sCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/dismiss",...e,headers:{"Content-Type":"application/json",...e.headers}}),iCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-suggestions/{suggestionId}/reopen",...e}),lCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks",...e}),cCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks",...e,headers:{"Content-Type":"application/json",...e.headers}}),uCe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e}),dCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e}),fCe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendar-tasks/{calendarTaskId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),hCe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars",...e}),pCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars",...e,headers:{"Content-Type":"application/json",...e.headers}}),mCe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}",...e}),gCe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),vCe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),yCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),bCe=e=>(e.client??pe).put({security:[{name:"Authorization",type:"apiKey"}],url:"/calendars/{calendarId}/feed",...e}),SCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/classification-stats",...e}),CCe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config",...e}),ECe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/config/export",...e}),wCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/config/import",...e,headers:{"Content-Type":"application/json",...e.headers}}),t4e=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads",...e}),xCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/mailboxes/{mailboxId}/threads/search",...e}),_Ce=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/me",...e,headers:{"Content-Type":"application/json",...e.headers}}),ICe=e=>(e?.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/me/export",...e}),ACe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/quarantine",...e}),TCe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/me/vip-suggestions",...e}),RCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/delete",...e,headers:{"Content-Type":"application/json",...e.headers}}),OCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/flags",...e,headers:{"Content-Type":"application/json",...e.headers}}),MCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),NCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/move",...e,headers:{"Content-Type":"application/json",...e.headers}}),n4e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/not-spam",...e,headers:{"Content-Type":"application/json",...e.headers}}),r4e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/report-spam",...e,headers:{"Content-Type":"application/json",...e.headers}}),PCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}",...e}),kCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/calendar-suggestions",...e}),DCe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/flags",...e,headers:{"Content-Type":"application/json",...e.headers}}),LCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/messages/{messageId}/raw",...e}),UCe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...e}),FCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox",...e,headers:{"Content-Type":"application/json",...e.headers}}),zCe=e=>(e.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e}),$Ce=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e}),jCe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),BCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/attachments",...e,headers:{"Content-Type":"application/json",...e.headers}}),HCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/attachments/{outboxAttachmentId}/complete",...e}),qCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/outbox/{outboxMessageId}/send",...e}),VCe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/people",...e}),o4e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/step-up",...e,headers:{"Content-Type":"application/json",...e.headers}}),a4e=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),s4e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}/password-reset",...e,headers:{"Content-Type":"application/json",...e.headers}}),i4e=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/people/{userId}/sign-out",...e,headers:{"Content-Type":"application/json",...e.headers}}),WCe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/settings",...e}),GCe=e=>(e.client??pe).patch({security:[{name:"Authorization",type:"apiKey"}],url:"/settings",...e,headers:{"Content-Type":"application/json",...e.headers}}),KCe=e=>(e?.client??pe).delete({security:[{name:"Authorization",type:"apiKey"}],url:"/settings/classification-provider",...e}),ZCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/settings/classification-test",...e,headers:{"Content-Type":"application/json",...e.headers}}),_7=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...e}),YCe=e=>(e.client??pe).post({security:[{name:"Authorization",type:"apiKey"}],url:"/system/update",...e,headers:{"Content-Type":"application/json",...e.headers}}),QCe=e=>(e?.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads",...e}),XCe=e=>(e.client??pe).get({security:[{name:"Authorization",type:"apiKey"}],url:"/threads/{threadId}/messages",...e}),l4e=e=>({mutationFn:async n=>{const{data:r}=await I1e({...e,...n,throwOnError:!0});return r}}),vt=(e,t,n,r)=>{const o={_id:e,baseUrl:t?.baseUrl||(t?.client??pe).getConfig().baseUrl};return t?.body&&(o.body=t.body),t?.headers&&(o.headers=t.headers),t?.path&&(o.path=t.path),t?.query&&(o.query=t.query),[o]},c4e=e=>({mutationFn:async n=>{const{data:r}=await A1e({...e,...n,throwOnError:!0});return r}}),u4e=e=>({mutationFn:async n=>{const{data:r}=await T1e({...e,...n,throwOnError:!0});return r}}),d4e=e=>({mutationFn:async n=>{const{data:r}=await R1e({...e,...n,throwOnError:!0});return r}}),f4e=e=>({mutationFn:async n=>{const{data:r}=await O1e({...e,...n,throwOnError:!0});return r}}),JCe=e=>vt("filterOperationsListFilters",e),h4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await M1e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:JCe(e)}),p4e=e=>({mutationFn:async n=>{const{data:r}=await N1e({...e,...n,throwOnError:!0});return r}}),m4e=e=>({mutationFn:async n=>{const{data:r}=await P1e({...e,...n,throwOnError:!0});return r}}),g4e=e=>vt("filterDetailOperationsGetFilter",e),v4e=e=>({mutationFn:async n=>{const{data:r}=await k1e({...e,...n,throwOnError:!0});return r}}),eEe=e=>({mutationFn:async n=>{const{data:r}=await D1e({...e,...n,throwOnError:!0});return r}}),y4e=e=>vt("labelOperationsListLabels",e),b4e=e=>({mutationFn:async n=>{const{data:r}=await L1e({...e,...n,throwOnError:!0});return r}}),S4e=e=>({mutationFn:async n=>{const{data:r}=await U1e({...e,...n,throwOnError:!0});return r}}),C4e=e=>({mutationFn:async n=>{const{data:r}=await F1e({...e,...n,throwOnError:!0});return r}}),wI=e=>vt("mailboxOperationsListMailboxes",e),Jx=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await z1e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:wI(e)}),tEe=e=>({mutationFn:async n=>{const{data:r}=await $1e({...e,...n,throwOnError:!0});return r}}),E4e=e=>({mutationFn:async n=>{const{data:r}=await j1e({...e,...n,throwOnError:!0});return r}}),w4e=e=>({mutationFn:async n=>{const{data:r}=await H1e({...e,...n,throwOnError:!0});return r}}),x4e=e=>({mutationFn:async n=>{const{data:r}=await q1e({...e,...n,throwOnError:!0});return r}}),nEe=e=>vt("organizeJobDetailOperationsGetOrganizeJob",e),_4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await V1e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:nEe(e)}),I4e=e=>({mutationFn:async n=>{const{data:r}=await W1e({...e,...n,throwOnError:!0});return r}}),rEe=e=>vt("syncOperationsGetSyncStatus",e),A4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await G1e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:rEe(e)}),T4e=e=>({mutationFn:async n=>{const{data:r}=await K1e({...e,...n,throwOnError:!0});return r}}),oEe=e=>vt("addressOperationsSearchAddresses",e),R4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await Z1e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:oEe(e)}),O4e=e=>({mutationFn:async n=>{const{data:r}=await Y1e({...e,...n,throwOnError:!0});return r}}),aEe=e=>vt("calendarEventOperationsListCalendarEvents",e),M4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await Q1e({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:aEe(e)}),N4e=e=>({mutationFn:async n=>{const{data:r}=await X1e({...e,...n,throwOnError:!0});return r}}),P4e=e=>({mutationFn:async n=>{const{data:r}=await J1e({...e,...n,throwOnError:!0});return r}}),sEe=e=>vt("calendarEventDetailOperationsGetCalendarEvent",e),k4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await eCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:sEe(e)}),D4e=e=>({mutationFn:async n=>{const{data:r}=await tCe({...e,...n,throwOnError:!0});return r}}),iEe=e=>vt("calendarFreeBusyOperationsListCalendarFreeBusy",e),L4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await nCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:iEe(e)}),lEe=e=>vt("calendarSuggestionOperationsListCalendarSuggestions",e),U4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await rCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:lEe(e)}),F4e=e=>({mutationFn:async n=>{const{data:r}=await oCe({...e,...n,throwOnError:!0});return r}}),z4e=e=>({mutationFn:async n=>{const{data:r}=await aCe({...e,...n,throwOnError:!0});return r}}),$4e=e=>({mutationFn:async n=>{const{data:r}=await sCe({...e,...n,throwOnError:!0});return r}}),j4e=e=>({mutationFn:async n=>{const{data:r}=await iCe({...e,...n,throwOnError:!0});return r}}),cEe=e=>vt("calendarTaskOperationsListCalendarTasks",e),B4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await lCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:cEe(e)}),H4e=e=>({mutationFn:async n=>{const{data:r}=await cCe({...e,...n,throwOnError:!0});return r}}),q4e=e=>({mutationFn:async n=>{const{data:r}=await uCe({...e,...n,throwOnError:!0});return r}}),uEe=e=>vt("calendarTaskDetailOperationsGetCalendarTask",e),V4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await dCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:uEe(e)}),W4e=e=>({mutationFn:async n=>{const{data:r}=await fCe({...e,...n,throwOnError:!0});return r}}),dEe=e=>vt("calendarOperationsListCalendars",e),G4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await hCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:dEe(e)}),K4e=e=>({mutationFn:async n=>{const{data:r}=await pCe({...e,...n,throwOnError:!0});return r}}),Z4e=e=>({mutationFn:async n=>{const{data:r}=await mCe({...e,...n,throwOnError:!0});return r}}),Y4e=e=>({mutationFn:async n=>{const{data:r}=await gCe({...e,...n,throwOnError:!0});return r}}),Q4e=e=>({mutationFn:async n=>{const{data:r}=await vCe({...e,...n,throwOnError:!0});return r}}),fEe=e=>vt("calendarDetailOperationsGetCalendarFeed",e),X4e=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await yCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:fEe(e)}),J4e=e=>({mutationFn:async n=>{const{data:r}=await bCe({...e,...n,throwOnError:!0});return r}}),hEe=e=>vt("classificationStatsOperationsGetClassificationStats",e),eLe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await SCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:hEe(e)}),I7=e=>vt("configOperationsGetConfig",e),xI=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await CCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:I7(e)}),pEe=e=>vt("configOperationsExportConfig",e),tLe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await ECe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:pEe(e)}),nLe=e=>({mutationFn:async n=>{const{data:r}=await wCe({...e,...n,throwOnError:!0});return r}}),mEe=e=>vt("threadOperationsListThreads",e),A7=e=>vt("threadOperationsSearchThreads",e),rLe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await xCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:A7(e)}),oLe=e=>({mutationFn:async n=>{const{data:r}=await _Ce({...e,...n,throwOnError:!0});return r}}),aLe=e=>({mutationFn:async n=>{const{data:r}=await ICe({...e,...n,throwOnError:!0});return r}}),gEe=e=>vt("meOperationsListQuarantine",e),vEe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await ACe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:gEe(e)}),yEe=e=>vt("meOperationsListVipSuggestions",e),sLe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await TCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:yEe(e)}),iLe=e=>({mutationFn:async n=>{const{data:r}=await RCe({...e,...n,throwOnError:!0});return r}}),lLe=e=>({mutationFn:async n=>{const{data:r}=await OCe({...e,...n,throwOnError:!0});return r}}),cLe=e=>({mutationFn:async n=>{const{data:r}=await MCe({...e,...n,throwOnError:!0});return r}}),uLe=e=>({mutationFn:async n=>{const{data:r}=await NCe({...e,...n,throwOnError:!0});return r}}),bEe=e=>vt("messageOperationsDescribeMessage",e),dLe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await PCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:bEe(e)}),SEe=e=>vt("messageCalendarSuggestionOperationsListMessageCalendarSuggestions",e),fLe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await kCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:SEe(e)}),hLe=e=>({mutationFn:async n=>{const{data:r}=await DCe({...e,...n,throwOnError:!0});return r}}),CEe=e=>vt("messageOperationsGetRawMessage",e),pLe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await LCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:CEe(e)}),T7=e=>vt("outboxOperationsListOutboxMessages",e),mLe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await UCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:T7(e)}),gLe=e=>({mutationFn:async n=>{const{data:r}=await FCe({...e,...n,throwOnError:!0});return r}}),vLe=e=>({mutationFn:async n=>{const{data:r}=await zCe({...e,...n,throwOnError:!0});return r}}),EEe=e=>vt("outboxDetailOperationsGetOutboxMessage",e),wEe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await $Ce({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:EEe(e)}),yLe=e=>({mutationFn:async n=>{const{data:r}=await jCe({...e,...n,throwOnError:!0});return r}}),bLe=e=>({mutationFn:async n=>{const{data:r}=await BCe({...e,...n,throwOnError:!0});return r}}),SLe=e=>({mutationFn:async n=>{const{data:r}=await HCe({...e,...n,throwOnError:!0});return r}}),CLe=e=>({mutationFn:async n=>{const{data:r}=await qCe({...e,...n,throwOnError:!0});return r}}),xEe=e=>vt("peopleOperationsListPeople",e),_Ee=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await VCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:xEe(e)}),IEe=e=>vt("userSettingsOperationsGetUserSettings",e),ELe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await WCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:IEe(e)}),wLe=e=>({mutationFn:async n=>{const{data:r}=await GCe({...e,...n,throwOnError:!0});return r}}),xLe=e=>({mutationFn:async n=>{const{data:r}=await KCe({...e,...n,throwOnError:!0});return r}}),_Le=e=>({mutationFn:async n=>{const{data:r}=await ZCe({...e,...n,throwOnError:!0});return r}}),e_=e=>vt("systemOperationsGetSystemUpdate",e),AEe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await _7({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:e_(e)}),TEe=e=>({mutationFn:async n=>{const{data:r}=await YCe({...e,...n,throwOnError:!0});return r}}),R7=e=>vt("unifiedThreadOperationsListAllThreads",e),REe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await QCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:R7(e)}),O7=e=>vt("threadDetailOperationsListThreadMessages",e),ILe=e=>({queryFn:async({queryKey:t,signal:n})=>{const{data:r}=await XCe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:O7(e)}),M7=_.createContext(void 0),OEe=2e3,MEe=6e4,NEe=e=>e==="unfiled"||e==="failed"||e==="blocked",PEe=pv(404),P4=(e,t)=>NEe(e)||t!=null,kEe=({children:e})=>{const[t,n]=_.useState(),r=Ws(),{data:o,error:a}=Qi({...wEe({path:{outboxMessageId:t??""}}),enabled:!!t,meta:PEe,retry:(g,v)=>!E8(v)&&g<1,refetchInterval:g=>P4(g.state.data?.status,g.state.error)?!1:OEe}),l=_.useCallback(()=>{n(void 0),r.invalidateQueries({queryKey:T7()})},[r]);_.useEffect(()=>{t&&P4(o?.status,a)&&l()},[o,a,t,l]),_.useEffect(()=>{if(!t)return;const g=setTimeout(l,MEe);return()=>clearTimeout(g)},[t,l]);const c=_.useCallback(g=>{n(g)},[]),d=_.useRef(new Map),f=_.useCallback((g,v)=>{const S=d.current.get(g);return S?(S(v),!0):!1},[]),p=_.useCallback((g,v)=>(d.current.set(g,v),()=>{d.current.get(g)===v&&d.current.delete(g)}),[]),m=_.useMemo(()=>({startSendPolling:c,insertIntoOpenReply:f,registerOpenReply:p}),[c,f,p]);return R.jsx(M7.Provider,{value:m,children:e})},ALe=()=>{const e=_.useContext(M7);if(!e)throw new Error("useCompose must be used within a ComposeProvider");return e};function t_(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function k4(e,t="|"){return e.map(n=>U7(n)).join(t)}function n_(e,t){return typeof t=="bigint"?t.toString():t}class DEe{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function _I(e){return new DEe(e)}function LEe(e){return e==null}function II(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function UEe(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}const D4=Symbol("evaluating");function FEe(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==D4)return r===void 0&&(r=D4,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Gs(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function N7(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Pa(e){return N7(e._zod.def)??e._zod.def.shape}function P7(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return Gs(this,t,r),r},enumerable:!0,configurable:!0})}function k7(e,t,n){t in e?Gs(e,t,n):e[t]=n}function Xi(e,t,n,r){const o=Pa(t);for(const a of n){const l=Object.getOwnPropertyDescriptor(o,a);l.enumerable&&(l.get?P7(e,a,()=>{const c=t._zod.def.shape[a];return r?r(c,a):c}):k7(e,a,r?r(l.value,a):l.value))}}function zEe(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?P7(e,n,()=>t[n]):k7(e,n,r.value))}}function Or(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function $Ee(e){return JSON.stringify(e)}function jEe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const D7="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ng(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const BEe=_I(()=>{if(Co.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Gc(e){if(Ng(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Ng(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function L7(e){return Gc(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const HEe=new Set(["string","number","symbol"]);function Kc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ks(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Pe(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new 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 U7(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function qEe(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const F7={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},VEe={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function WEe(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const a={};return Xi(a,e,ry(e,t)),Ks(e,Or(n,{shape:a,checks:[]}))}function ry(e,t){const n=Pa(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function GEe(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const a=new Set(ry(e,t)),l={};return Xi(l,e,Reflect.ownKeys(Pa(e)).filter(c=>!a.has(c))),Ks(e,Or(n,{shape:l,checks:[]}))}function KEe(e,t){if(!Gc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=Pa(e);for(const a of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ks(e,Or(e._zod.def,{shape:z7(e,t)}))}function z7(e,t){const n={};return Xi(n,e,Reflect.ownKeys(Pa(e))),zEe(n,t),n}function ZEe(e,t){if(!Gc(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Ks(e,Or(e._zod.def,{shape:z7(e,t)}))}function YEe(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};Xi(n,e,Reflect.ownKeys(Pa(e))),Xi(n,t,Reflect.ownKeys(Pa(t)));const r=Or(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ks(e,r)}function L4(e,t,n,r="partial"){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(ry(t,n)):void 0,d={};return Xi(d,t,Reflect.ownKeys(Pa(t)),e&&((f,p)=>c&&!c.has(p)?f:new e({type:"optional",innerType:f}))),Ks(t,Or(t._zod.def,{shape:d,checks:[]}))}function QEe(e,t,n){const r=n?new Set(ry(t,n)):void 0,o={};return Xi(o,t,Reflect.ownKeys(Pa(t)),(a,l)=>r&&!r.has(l)?a:new e({type:"nonoptional",innerType:a})),Ks(t,Or(t._zod.def,{shape:o}))}function wa(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 XEe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ac(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function kd(e){return typeof e=="string"?e:e?.message}function U4(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function r_(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function js(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const a=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,l=e.message?e.message:kd(e.inst?._zod.def?.error?.(e))??kd(a?.(e))??kd(t?.error?.(e))??kd(n.customError?.(e))??kd(n.localeError?.(e))??"Invalid input",c={};for(const d of Object.keys(e))d==="inst"||d==="schema"||d==="continue"||d==="input"||d==="__proto__"||(c[d]=e[d]);return c.path??(c.path=[]),c.message=l,t?.reportInput&&(c.input=e.input),c}const JEe=/[\uD800-\uDBFF]/;function AI(e){const t=e.length;if(!JEe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function TI(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ewe(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Lf(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function twe(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):nwe(e,n,r.value)}}function Bs(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function $7(e,t,n){return Bs(e,t,n,!1)}function j7(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Bs(this,n,r(this))},set(o){Bs(this,n,o)}})}return t}function nwe(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Bs(this,t,n.bind(this))},set(r){Bs(this,t,r)}})}function rwe(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let Cw,ys=!1;const owe={configurable:!0,get(){ys=!0}};function ut(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&Cw!==e._zod){Cw=void 0;return}Cw=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,owe);const o=ys;ys=!1;try{const a=n(this);return ys?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:a}),ys=ys||o,a}catch(a){throw delete this[t],ys=ys||o,a}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function awe(e,t,n,r){const o=rwe(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const a={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,a),a.value=n(this),Object.defineProperty(this,t,a),a.value},set(a){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:a})}})}const swe="~constantCatch";function iwe(e){const t=()=>e;return t[swe]=!0,t}var F4;const Ew={value:void 0,enumerable:!1};let z4="captureStackTrace"in Error?Error:null;function lwe(e){const t=z4;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return z4=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function re(e,t,n,r){const o={};function a(g){this.def=g,this.constr=m,this.traits=new Set}a.prototype=o;const l=n,c=l&&new WeakSet;function d(g,v){if(g._zod){if(g._zod.traits.has(e))return}else{Ew.value=new a(v);try{Object.defineProperty(g,"_zod",Ew)}finally{Ew.value=void 0}}if(g._zod.traits.add(e),t(g,v),c){const C=Object.getPrototypeOf(g),w=g._zod.constr.prototype;let x=C;for(;x&&x!==w;)x=Object.getPrototypeOf(x);const I=x??C;c.has(I)||(c.add(I),twe(I,l))}const S=m.prototype;for(const C in S)Object.prototype.hasOwnProperty.call(S,C)&&(C in g||(g[C]=S[C].bind(g)))}const f=r?.Parent??Object;class p extends f{}Object.defineProperty(p,"name",{value:e});function m(g){const v=r?.Parent?lwe(p):this;d(v,g);const S=v._zod.deferred;if(S){for(const w of S)w();v._zod.deferred=void 0}const C=globalThis.__zod_globalConfig?.postProcessor;return C&&C(v),v}return Object.defineProperty(m,"init",{value:d}),Object.defineProperty(m,Symbol.hasInstance,{value:g=>r?.Parent&&g instanceof r.Parent?!0:g?._zod?.traits?.has(e)}),Object.defineProperty(m,"name",{value:e}),m}class zi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class B7 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(F4=globalThis).__zod_globalConfig??(F4.__zod_globalConfig={});const Co=globalThis.__zod_globalConfig;function jo(e){return e&&Object.assign(Co,e),Co}function cwe(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,n_,2)),e.message}function uwe(e){this._zod.message=e}const dwe={get:cwe,set:uwe,enumerable:!0,configurable:!0},ww={value:void 0,enumerable:!1},$4=new WeakSet([Object.prototype,Error.prototype]),H7=(e,t)=>{e.name="$ZodError",ww.value=t,Object.defineProperty(e,"issues",ww),ww.value=void 0,Object.defineProperty(e,"message",dwe);const n=Object.getPrototypeOf(e);$4.has(n)||($4.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},fwe=re("$ZodError",H7),q7=re("$ZodError",H7,void 0,{Parent:Error});function hwe(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function pwe(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?hwe(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function mwe(e,t=n=>n.message){const n={_errors:[]},r=(o,a=[])=>{for(const l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>r({issues:c},[...a,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...a,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...a,...l.path]);else{const c=[...a,...l.path];if(c.length===0)n._errors.push(t(l));else{let d=n,f=0;for(;f<c.length;){const p=c[f],m=f===c.length-1;if(p==="_errors"){m&&d._errors.push(t(l)),f++;continue}Object.prototype.hasOwnProperty.call(d,p)||Object.defineProperty(d,p,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const g=d[p];m&&g._errors.push(t(l)),d=g,f++}}}};return r(e),n}function oy(e,t){return{callee:t?.callee??e,Err:t?.Err}}const ay=e=>{const t=(n,r,o,a)=>{const l=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},l);if(c instanceof Promise)throw new zi;if(c.issues.length){const d=new(a?.Err??e)(c.issues.map(f=>js(f,l,jo())));throw D7(d,a?.callee??t),d}return c.value};return t},TLe=ay(q7),sy=e=>{const t=async(n,r,o,a)=>{const l=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},l);if(c instanceof Promise&&(c=await c),c.issues.length){const d=new(a?.Err??e)(c.issues.map(f=>js(f,l,jo())));throw D7(d,a?.callee??t),d}return c.value};return t},RLe=sy(q7),RI=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new zi;return a.issues.length?V7(e,a.issues,o):{success:!0,data:a.value}};function V7(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>js(o,n,jo()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const OI=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let a=t._zod.run({value:n,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?V7(e,a.issues,o):{success:!0,data:a.value}},gwe=Symbol.for("zod.compile.invalid"),vwe=Symbol.for("zod.compile.fallback"),ywe=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==gwe)return!0;if(r.definite===!0&&n===void 0)return!1}return bwe(e,t,n)});function bwe(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let a;if(o?(r[vwe]=!0,a=o({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new zi;return a.issues.length===0}const Swe=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},Cwe=e=>{const t=ay(e),n=(r,o,a,l)=>{const c=a?{...a,direction:"backward"}:{direction:"backward"};return t(r,o,c,oy(n,l))};return n},Ewe=e=>{const t=ay(e),n=(r,o,a,l)=>t(r,o,a,oy(n,l));return n},wwe=e=>{const t=sy(e),n=async(r,o,a,l)=>{const c=a?{...a,direction:"backward"}:{direction:"backward"};return await t(r,o,c,oy(n,l))};return n},xwe=e=>{const t=sy(e),n=async(r,o,a,l)=>await t(r,o,a,oy(n,l));return n},_we=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return RI(e)(t,n,o)},Iwe=e=>(t,n,r)=>RI(e)(t,n,r),Awe=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return OI(e)(t,n,o)},Twe=e=>async(t,n,r)=>OI(e)(t,n,r),Rwe=/^[cC][0-9a-z]{6,}$/,Owe=/^[0-9a-z]+$/,Mwe=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Nwe=/^[0-9a-vA-V]{20}$/,Pwe=/^[A-Za-z0-9]{27}$/,kwe=/^[a-zA-Z0-9_-]{21}$/;function Dwe(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const Lwe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Uwe=/^([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})$/,j4=e=>e?new 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)$/,Fwe=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,zwe="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function $we(){return new RegExp(zwe,"u")}const jwe=/^(?:(?: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])$/,Bwe=/^(([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}|:))$/,Hwe=/^((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])$/,qwe=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Vwe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wwe=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Gwe=/^https?$/,Kwe=/^\+[1-9]\d{6,14}$/,W7="(?:(?:\\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])))";function Zwe(e){return new RegExp(`^${e}$`)}const Ywe=Zwe(W7);function o_(e){const 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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Qwe(e){return new RegExp(`^${o_(e)}$`)}function Xwe(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${o_({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${o_({precision:e.precision})}`:n;return new RegExp(`^${W7}T(?:${r})$`)}const Jwe=/^[\s\S]{0,}$/,exe=/^-?\d+$/,MI=/^-?\d+(?:\.\d+)?$/,txe=/^(?:true|false)$/i,nxe=/^null$/i,rxe=/^[^A-Z]*$/,oxe=/^[^a-z]*$/,vr=re("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),NI=e=>{const t=e.value;return!LEe(t)&&t.length!==void 0},Pg={number:"number",bigint:"bigint",object:"date"},G7=re("$ZodCheckLessThan",(e,t)=>{vr.init(e,t);const n=Pg[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Pg[typeof r.value]??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})}}),K7=re("$ZodCheckGreaterThan",(e,t)=>{vr.init(e,t);const n=Pg[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Pg[typeof r.value]??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})}}),axe=re("$ZodCheckMultipleOf",(e,t)=>{vr.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):UEe(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})}}),sxe=re("$ZodCheckNumberFormat",(e,t)=>{vr.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,a]=F7[t.format];e._zod.check=l=>{const c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>a&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ixe=re("$ZodCheckMaxLength",(e,t)=>{var n;vr.init(e,t),(n=e._zod.def).when??(n.when=NI),e._zod.check=r=>{const o=r.value,a=o.length;if((typeof o=="string"&&a>t.maximum?AI(o):a)<=t.maximum)return;const c=TI(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),lxe=re("$ZodCheckMinLength",(e,t)=>{var n;vr.init(e,t),(n=e._zod.def).when??(n.when=NI),e._zod.check=r=>{const o=r.value,a=o.length;if((typeof o=="string"&&a>=t.minimum&&a<t.minimum*2?AI(o):a)>=t.minimum)return;const c=TI(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),cxe=re("$ZodCheckLengthEquals",(e,t)=>{var n;vr.init(e,t),(n=e._zod.def).when??(n.when=NI),e._zod.check=r=>{const o=r.value,a=o.length,l=typeof o=="string"&&a>=t.length&&a<=t.length*2?AI(o):a;if(l===t.length)return;const c=TI(o),d=l>t.length;r.issues.push({origin:c,...d?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),iy=re("$ZodCheckStringFormat",(e,t)=>{var n,r;vr.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),uxe=re("$ZodCheckRegex",(e,t)=>{iy.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})}}),dxe=re("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=rxe),iy.init(e,t)}),fxe=re("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=oxe),iy.init(e,t)}),hxe=re("$ZodCheckIncludes",(e,t)=>{vr.init(e,t);const n=Kc(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),pxe=re("$ZodCheckStartsWith",(e,t)=>{vr.init(e,t);const n=new RegExp(`^${Kc(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),mxe=re("$ZodCheckEndsWith",(e,t)=>{vr.init(e,t);const n=new RegExp(`.*${Kc(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),gxe=re("$ZodCheckOverwrite",(e,t)=>{vr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class vxe{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
167
+ `).filter(l=>l),o=Math.min(...r.map(l=>l.length-l.trimStart().length)),a=r.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of a)this.content.push(l)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
168
+ ${n.join(`
169
+ `)}
170
+ };`)(...Object.values(this.closed))}}const yxe={major:4,minor:6,patch:7},qt=re("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=yxe;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(const a of o)for(const l of a._zod.onattach)l(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(c,d,f)=>{if(c.memo)return c;let p=wa(c),m;for(const g of d){if(g._zod.def.when){if(XEe(c)||!g._zod.def.when(c))continue}else if(p)continue;const v=c.issues.length,S=g._zod.check(c);if(S instanceof Promise&&f?.async===!1)throw new zi;if(m||S instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await S,c.issues.length!==v&&(r_(c.issues,v,e),p||(p=wa(c,v)))});else{if(c.issues.length===v)continue;r_(c.issues,v,e),p||(p=wa(c,v))}}return m?m.then(()=>c):c},l=(c,d,f)=>{if(wa(c))return c.aborted=!0,c;const p=a(d,o,f);if(p instanceof Promise){if(f.async===!1)throw new zi;return p.then(m=>e._zod.parse(m,f))}return e._zod.parse(p,f)};e._zod.run=(c,d)=>{if(d.skipChecks)return e._zod.parse(c,d);if(d.direction==="backward"){const p=e._zod.parse({value:c.value,issues:[]},{...d,skipChecks:!0});return p instanceof Promise?p.then(m=>l(m,c,d)):l(p,c,d)}const f=e._zod.parse(c,d);if(f instanceof Promise){if(d.async===!1)throw new zi;return f.then(p=>a(p,o,d))}return a(f,o,d)}}},{get"~standard"(){return $7(this,"~standard",Y7(this))},set"~standard"(e){Bs(this,"~standard",e)}}),Z7=(e,t)=>e.issues.length?{issues:e.issues.map(n=>js(n,t,jo()))}:{value:e.value};async function bxe(e,t){const n={async:!0};return Z7(await e._zod.run({value:t,issues:[]},n),n)}function Y7(e){return{validate:t=>{const n={async:!1};try{const r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Z7(r,n)}catch{}return bxe(e,t)},vendor:"zod",version:1}}const PI=re("$ZodString",(e,t)=>{qt.init(e,t),e._zod.pattern=t.pattern??Jwe,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}}),Zt=re("$ZodStringFormat",(e,t)=>{iy.init(e,t),PI.init(e,t)}),Sxe=re("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Uwe),Zt.init(e,t)}),Cxe=re("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=j4(r))}else t.pattern??(t.pattern=j4());Zt.init(e,t)}),Exe=re("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Fwe),Zt.init(e,t)}),Q7=1,kg=2;function X7(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function wxe(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?X7(e)||kg:xxe(e,t)}function xxe(e,t){if(!t.normalize&&t.protocol?.source===Gwe.source&&!/^https?:\/\//i.test(e))return Q7;try{if(typeof URL<"u"){const n=URL;if(typeof n.parse=="function")return n.parse(e)??kg}return new URL(e)}catch{return kg}}const _xe=/[\t\n\r]/g;function B4(e){return e.replace(_xe,"")}function Ixe(e,t){return t.lastIndex=0,t.test(e.hostname)}function Axe(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const Txe=re("$ZodURL",(e,t)=>{Zt.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=wxe(r,t);if(o===Q7){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}if(o===kg){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});return}if(o===!0){n.value=B4(r);return}t.hostname&&!Ixe(o,t.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&&!Axe(o,t.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?o.href:B4(r);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Rxe=re("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=$we()),Zt.init(e,t)}),Oxe=re("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?kwe:Dwe(t.length)),Zt.init(e,t)}),Mxe=re("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Rwe),Zt.init(e,t)}),Nxe=re("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Owe),Zt.init(e,t)}),Pxe=re("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Mwe),Zt.init(e,t)}),kxe=re("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Nwe),Zt.init(e,t)}),Dxe=re("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pwe),Zt.init(e,t)}),Lxe=re("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Xwe(t)),Zt.init(e,t)}),Uxe=re("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ywe),Zt.init(e,t)}),Fxe=re("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Qwe(t)),Zt.init(e,t)}),zxe=re("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Lwe),Zt.init(e,t)}),$xe=re("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=jwe),Zt.init(e,t)}),jxe=/^[0-9a-fA-F:.]+$/;function J7(e){return jxe.test(e)?X7(`http://[${e}]`):!1}const Bxe=re("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bwe),Zt.init(e,t),e._zod.check=n=>{J7(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),Hxe=re("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Hwe),Zt.init(e,t)});function qxe(e){const t=e.split("/");if(t.length!==2)return!1;const[n,r]=t;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:J7(n)}const Vxe=re("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=qwe),Zt.init(e,t),e._zod.check=n=>{qxe(n.value)||n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function e$(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const t$=/^[0-9a-zA-Z+/]*={0,2}$/,Wxe=re("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=t$),Zt.init(e,t),e._zod.check=n=>{e$(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),kI=/^[A-Za-z0-9_-]*$/;function Gxe(e){if(!kI.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return e$(n)}const Kxe=re("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=kI),Zt.init(e,t),e._zod.check=n=>{Gxe(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Zxe=re("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Kwe),Zt.init(e,t)});function Yxe(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const Qxe=re("$ZodJWT",(e,t)=>{Zt.init(e,t),e._zod.check=n=>{Yxe(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),n$=re("$ZodNumber",(e,t)=>{qt.init(e,t),e._zod.pattern=MI,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...a?{received:a}:{}}),n}}),Xxe=re("$ZodNumberFormat",(e,t)=>{sxe.init(e,t),n$.init(e,t)}),Jxe=re("$ZodBoolean",(e,t)=>{qt.init(e,t),e._zod.pattern=txe,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),e_e=re("$ZodNull",(e,t)=>{qt.init(e,t),e._zod.pattern=nxe,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),t_e=re("$ZodUnknown",(e,t)=>{qt.init(e,t),e._zod.parse=n=>n}),n_e=re("$ZodNever",(e,t)=>{qt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function r_e(e,t){const n=U4(e._zod.def.checks);if(!n.length)return;const r=Math.min(...n.map(a=>a[0])),o=e._zod.parse;e._zod.parse=(a,l)=>{const c=t(a.value);if(c>r&&!l?.skipChecks&&l?.direction!=="backward"){for(const[d,f]of U4(e._zod.def.checks))if(c>d&&f._zod.def.when(a)){const p=a.issues.length;return f._zod.check(a),a.issues[p].continue=!1,r_(a.issues,p,e),a}}return o(a,l)}}const o_e=e=>Array.isArray(e)?e.length:-1;function H4(e,t,n){e.issues.length&&t.issues.push(...Ac(n,e.issues)),t.value[n]=e.value}const a_e=re("$ZodArray",(e,t)=>{qt.init(e,t);const n=Co.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{const a=r.value;if(!Array.isArray(a))return r.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),o):Array(a.length);const l=[],c=o?.abortEarly;for(let d=0;d<a.length;d++){const f=a[d],p=t.element._zod.run({value:f,issues:[]},o);if(p instanceof Promise)l.push(p.then(m=>H4(m,r,d)));else if(H4(p,r,d),c&&p.issues.length!==0&&wa(p))break}return l.length?Promise.all(l).then(()=>r):r},r_e(e,o_e)});function Dg(e,t,n,r,o,a){const l=n in r,c=a==="optional";if(!(!l&&c&&o==="optional")){if(e.issues.length){if(o!==void 0&&c&&!l)return;t.issues.push(...Ac(n,e.issues))}if(!l&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?(l||o==="defaulted"&&!c)&&(t.value[n]=void 0):t.value[n]=e.value}}const s_e=[];function r$(e){const t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:s_e,o=r.length?[...t,...r]:t;for(const l of o)if(!e.shape?.[l]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(l)}": expected a Zod schema`);const a=qEe(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function o$(e,t,n,r,o,a,l){const c=[],d=o.keySet,f=o.catchall._zod,p=f.def.type,m=f.optin,g=f.optout;let v=0;for(const S in t){if(l&&n.issues.length!==v){if(wa(n,v))break;v=n.issues.length}if(d.has(S))continue;if(S==="__proto__"){p==="never"&&c.push(S);continue}if(p==="never"){c.push(S);continue}const C=f.run({value:t[S],issues:[]},r);C instanceof Promise?e.push(C.then(w=>Dg(w,n,S,t,m,g))):Dg(C,n,S,t,m,g)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}const i_e=re("$ZodObject",(e,t)=>{qt.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape"),r=n?.get?n.get.raw:t.shape??{};if(r){const f=()=>{const p={...r};return Object.defineProperty(t,"shape",{value:p}),f.raw=p,p};f.raw=r,Object.defineProperty(t,"shape",{get:f})}const o=_I(()=>r$(t));ut(e,"propValues",f=>{const p=f.def.shape,m={};for(const g in p){const v=p[g]._zod;if(v.values){Object.prototype.hasOwnProperty.call(m,g)||Gs(m,g,new Set);for(const S of v.values)m[g].add(S);v.optin!==void 0&&m[g].add(void 0)}}return m});const a=Ng,l=t.catchall;let c;const d=Co.memoizer;d?.attach(e),e._zod.parse=(f,p)=>{c??(c=o.value);const m=f.value;if(!a(m))return f.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),f;f.value=d?d.alloc(e,f,{},p):{};const g=[],v=c.shape,S=p?.abortEarly;let C=f.issues.length;for(const w of c.allKeys){if(S&&f.issues.length!==C){if(wa(f,C))break;C=f.issues.length}if(w==="__proto__")continue;const x=v[w],I=x._zod.optin,T=x._zod.optout,O=x._zod.run({value:m[w],issues:[]},p);O instanceof Promise?g.push(O.then(D=>Dg(D,f,w,m,I,T))):Dg(O,f,w,m,I,T)}return l?o$(g,m,f,p,o.value,e,S===!0):g.length?Promise.all(g).then(()=>f):f}}),l_e=re("$ZodObjectJIT",(e,t)=>{i_e.init(e,t);const n=e._zod.parse,r=_I(()=>r$(t)),o=Co.memoizer,a=v=>{const S=r.value,C=S.symbolKeys,w=new vxe(["payload","ctx"],{shape:v,inst:e,memo:o,syms:C}),x=D=>`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`,I=(D,P)=>`
171
+ let ${D}_ab = false;
172
+ for (let i = 0; i < ${D}.issues.length; i++) {
173
+ const iss = ${D}.issues[i];
174
+ iss.path = iss.path ? [${P}, ...iss.path] : [${P}];
175
+ payload.issues.push(iss);
176
+ if (iss.continue !== true) ${D}_ab = true;
177
+ }
178
+ if (${D}_ab && ctx && ctx.abortEarly) {
179
+ payload.value = newResult;
180
+ return payload;
181
+ }`;w.write("const input = payload.value;");const T=Object.create(null);let O=0;for(const D of S.allKeys)T[D]=`key_${O++}`;w.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const D of S.allKeys){if(D==="__proto__")continue;const P=T[D],M=typeof D=="symbol"?`syms[${C.indexOf(D)}]`:$Ee(D),L=`${M} in input`,z=v[D],G=z?._zod?.optin,j=G!==void 0,F=z?._zod?.optout==="optional";if(w.write(`const ${P} = ${x(M)};`),j&&F){const q=G==="optional"?`${P}_present`:`${P}.value !== undefined || ${P}_present`;w.write(`
182
+ const ${P}_present = ${L};
183
+ if (!${P}.issues.length || ${P}_present) {
184
+ if (${P}.issues.length) {${I(P,M)}
185
+ }
186
+
187
+ if (${q}) {
188
+ newResult[${M}] = ${P}.value;
189
+ }
190
+ }
191
+
192
+ `)}else j?(w.write(`
193
+ if (${P}.issues.length) {${I(P,M)}
194
+ }
195
+ `),G==="defaulted"?w.write(`newResult[${M}] = ${P}.value;`):w.write(`
196
+ if (${P}.value !== undefined || ${L}) {
197
+ newResult[${M}] = ${P}.value;
198
+ }
199
+ `)):w.write(`
200
+ const ${P}_present = ${L};
201
+ if (${P}.issues.length) {${I(P,M)}
202
+ }
203
+ if (!${P}_present && !${P}.issues.length) {
204
+ payload.issues.push({
205
+ code: "invalid_type",
206
+ expected: "nonoptional",
207
+ input: undefined,
208
+ path: [${M}]
209
+ });
210
+ if (ctx && ctx.abortEarly) {
211
+ payload.value = newResult;
212
+ return payload;
213
+ }
214
+ }
215
+
216
+ if (${P}_present) {
217
+ newResult[${M}] = ${P}.value;
218
+ }
219
+
220
+ `)}return w.write("payload.value = newResult;"),w.write("return payload;"),w.compile()};let l;const c=Ng,d=!Co.jitless,p=d&&BEe.value,m=t.catchall;let g;e._zod.parse=(v,S)=>{g??(g=r.value);const C=v.value;return c(C)?d&&p&&S?.async===!1&&S.jitless!==!0?(l||(l=a(t.shape)),v=l(v,S),m?o$([],C,v,S,g,e,S?.abortEarly===!0):v):n(v,S):(v.issues.push({expected:"object",code:"invalid_type",input:C,inst:e}),v)}});function q4(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const o=e.filter(a=>!wa(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(l=>js(l,r,jo())))}),t)}const c_e=re("$ZodUnion",(e,t)=>{qt.init(e,t),ut(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),ut(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ut(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),ut(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>II(a.source)).join("|")})$`)}});const n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let a=!1;const l=[];for(const c of t.options){const d=c._zod.run({value:r.value,issues:[]},o);if(d instanceof Promise)l.push(d),a=!0;else{if(d.issues.length===0)return d;l.push(d)}}return a?Promise.all(l).then(c=>q4(c,r,e,o)):q4(l,r,e,o)}}),u_e=re("$ZodIntersection",(e,t)=>{qt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,a=t.left._zod.run({value:o,issues:[]},r),l=t.right._zod.run({value:o,issues:[]},r);return a instanceof Promise||l instanceof Promise?Promise.all([a,l]).then(([d,f])=>V4(n,d,f)):V4(n,a,l)}});function a_(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Gc(e)&&Gc(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const a of r){if(a==="__proto__")continue;const l=a_(e[a],t[a]);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};o[a]=l.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],a=t[r],l=a_(o,a);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function V4(e,t,n){const r=new Map;let o;const a=new Map,l=(f,p)=>{let m;if(f.code==="unrecognized_keys"&&!f.path?.length)o??(o=f),m=f.keys;else if(f.code==="invalid_key"&&f.origin==="record"&&f.path?.length===1){const g=String(f.path[0]);a.has(g)||a.set(g,f),m=[g]}else return!1;for(const g of m)r.has(g)||r.set(g,{}),r.get(g)[p]=!0;return!0};for(const f of t.issues)l(f,"l")||e.issues.push(f);for(const f of n.issues)l(f,"r")||e.issues.push(f);const c=[...r].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(c.length){const f=o?c.filter(p=>o.keys.includes(p)):[];f.length&&e.issues.push({...o,keys:f});for(const p of c)!f.includes(p)&&a.has(p)&&e.issues.push(a.get(p))}const d=a_(t.value,n.value);if(!d.valid){if(wa(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`)}return e.value=d.data,e}const d_e=re("$ZodRecord",(e,t)=>{qt.init(e,t);const n=Co.memoizer;n?.attach(e),e._zod.parse=(r,o)=>{const a=r.value;if(!Gc(a))return r.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),r;const l=[],c=t.keyType._zod.values;if(c&&!t.partial){r.value=n?n.alloc(e,r,{},o):{};const d=new Set;for(const p of c)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){if(d.add(typeof p=="number"?p.toString():p),p==="__proto__")continue;const m=t.keyType._zod.run({value:p,issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(S=>js(S,o,jo())),input:p,path:[p],inst:e});continue}const g=m.value;if(g==="__proto__")continue;const v=t.valueType._zod.run({value:a[p],issues:[]},o);v instanceof Promise?l.push(v.then(S=>{S.issues.length&&r.issues.push(...Ac(p,S.issues)),r.value[g]=S.value})):(v.issues.length&&r.issues.push(...Ac(p,v.issues)),r.value[g]=v.value)}let f;for(const p in a)if(!d.has(p))if(t.mode==="loose"){if(p==="__proto__")continue;r.value[p]=a[p]}else f=f??[],f.push(p);f&&f.length>0&&r.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:f,continue:!0})}else{r.value=n?n.alloc(e,r,{},o):{};let d;for(const f of Reflect.ownKeys(a)){if(f==="__proto__"||!Object.prototype.propertyIsEnumerable.call(a,f))continue;let p=t.keyType._zod.run({value:f,issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&MI.test(f)&&p.issues.length){const S=t.keyType._zod.run({value:Number(f),issues:[]},o);if(S instanceof Promise)throw new Error("Async schemas not supported in object keys currently");S.issues.length===0&&(p=S)}if(p.issues.length){t.mode==="loose"?r.value[f]=a[f]:c?(d=d??[],d.push(f)):r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(S=>js(S,o,jo())),input:f,path:[f],inst:e});continue}const g=p.value;if(g==="__proto__")continue;const v=t.valueType._zod.run({value:a[f],issues:[]},o);v instanceof Promise?l.push(v.then(S=>{S.issues.length&&r.issues.push(...Ac(f,S.issues)),r.value[g]=S.value})):(v.issues.length&&r.issues.push(...Ac(f,v.issues)),r.value[g]=v.value)}d&&d.length>0&&r.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:d,continue:!0})}return l.length?Promise.all(l).then(()=>r):r}}),f_e=re("$ZodEnum",(e,t)=>{qt.init(e,t);const n=t_(t.entries),r=new Set(n);e._zod.values=r,ut(e,"pattern",o=>{const a=t_(o.def.entries).filter(l=>HEe.has(typeof l));return new RegExp(a.length?`^(${a.map(l=>Kc(l.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,a)=>{const l=o.value;return r.has(l)||o.issues.push({code:"invalid_value",values:n,input:l,inst:e}),o}}),h_e=re("$ZodLiteral",(e,t)=>{qt.init(e,t);const n=new Set(t.values);e._zod.values=n,ut(e,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(a=>typeof a=="string"?Kc(a):a?Kc(a.toString()):String(a)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(r,o)=>{const a=r.value;return n.has(a)||r.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),r}}),p_e=re("$ZodTransform",(e,t)=>{qt.init(e,t),e._zod.optin="optional",Co.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new B7(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(l=>(n.value=l,n));if(o instanceof Promise)throw new zi;return n.value=o,n}});function W4(e,t){return e.value=t.issues.length?void 0:t.value,e}const a$=re("$ZodOptional",(e,t)=>{qt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",ut(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),ut(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${II(r.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(n.value===void 0){if(t.innerType._zod.optin!=="defaulted")return n;const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(a=>W4(n,a)):W4(n,o)}return t.innerType._zod.run(n,r)}}),m_e=re("$ZodExactOptional",(e,t)=>{a$.init(e,t),ut(e,"values",n=>n.def.innerType._zod.values),ut(e,"pattern",n=>n.def.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),g_e=re("$ZodNullable",(e,t)=>{qt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin),ut(e,"optout",n=>n.def.innerType._zod.optout),ut(e,"pattern",n=>{const r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${II(r.source)}|null)$`):void 0}),ut(e,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),v_e=re("$ZodDefault",(e,t)=>{qt.init(e,t),e._zod.optin="defaulted",ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>G4(a,t)):G4(o,t)}});function G4(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const y_e=re("$ZodPrefault",(e,t)=>{qt.init(e,t),e._zod.optin="defaulted",ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),b_e=re("$ZodNonOptional",(e,t)=>{qt.init(e,t),ut(e,"values",n=>{const r=n.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>K4(a,e)):K4(o,e)}});function K4(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Z4(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>js(o,r,jo()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}const S_e=re("$ZodCatch",(e,t)=>{qt.init(e,t),ut(e,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ut(e,"optout",n=>n.def.innerType._zod.optout),ut(e,"values",n=>n.def.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(a=>Z4(n,a,t,r)):Z4(n,o,t,r)}}),C_e=re("$ZodPipe",(e,t)=>{qt.init(e,t),ut(e,"values",n=>n.def.in._zod.values),ut(e,"optin",n=>n.def.in._zod.optin),ut(e,"optout",n=>n.def.out._zod.optout),ut(e,"propValues",n=>n.def.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(l=>pm(l,t.in,r)):pm(a,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(a=>pm(a,t.out,r)):pm(o,t.out,r)}});function pm(e,t,n){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const E_e=re("$ZodReadonly",(e,t)=>{qt.init(e,t),ut(e,"propValues",n=>n.def.innerType._zod.propValues),ut(e,"values",n=>n.def.innerType._zod.values),ut(e,"optin",n=>n.def.innerType?._zod?.optin),ut(e,"optout",n=>n.def.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Y4):Y4(o)}});function Y4(e){return e.memo||(e.value=Object.freeze(e.value)),e}const w_e=re("$ZodLazy",(e,t)=>{qt.init(e,t),FEe(e._zod,"innerType",()=>{const n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),ut(e,"pattern",n=>n.innerType?._zod?.pattern),ut(e,"propValues",n=>n.innerType?._zod?.propValues),ut(e,"optin",n=>n.innerType?._zod?.optin??void 0),ut(e,"optout",n=>n.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),x_e=re("$ZodCustom",(e,t)=>{vr.init(e,t),qt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(a=>Q4(a,n,r,e));Q4(o,n,r,e)}});function Q4(e,t,n,r){if(!e){const o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),t.issues.push(Lf(o))}}class __e extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const s_="~memo",X4=[];function s$(e){return e!==null&&typeof e=="object"}function xw(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}const i$=new WeakMap,Kd=0,Gm=1,uf=2;function Km(e,t,n){const r=i$.get(e);if(r!==void 0)return r?uf:Kd;if(t.has(e))return uf;t.add(e);let o=Kd;const a=p=>{if(o!==uf&&p?._zod){const m=Km(p,t);m>o&&(o=m)}},l=(p,m)=>{let g=Kd;for(const v of Reflect.ownKeys(p)){const S=Object.getOwnPropertyDescriptor(p,v);if(!S.enumerable)continue;const C=S.get?Gm:S.value?._zod?Km(S.value,t):Kd;C>g&&(g=C)}return g},c=p=>{p>o&&(o=p)},d=e._zod.def;switch(d.type){case"object":{const p=N7(d);c(p?l(p):Gm),a(d.catchall);break}case"array":a(d.element);break;case"tuple":for(const p of d.items)a(p);a(d.rest);break;case"record":case"map":a(d.keyType),a(d.valueType);break;case"set":a(d.valueType);break;case"union":for(const p of d.options)a(p);break;case"intersection":a(d.left),a(d.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":a(d.innerType);break;case"pipe":a(d.in),a(d.out);break;case"function":a(d.input),a(d.output);break;case"lazy":{const p=d._cachedInner??void 0;c(p?Km(p,t):Gm);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const p in d){const m=Object.getOwnPropertyDescriptor(d,p);if(!m||m.get)continue;const g=m.value;if(!(!g||typeof g!="object")){if(g._zod)a(g);else if(Array.isArray(g))for(const v of g)a(v)}}}return t.delete(e),I_e(e,o)}function I_e(e,t){return t!==Gm&&i$.set(e,t===uf),t}function A_e(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}let mm;const gm=[],T_e={alloc(e,t,n){const r=mm;if(!r)return n;mm=void 0;const o={value:n,issues:null};return r.set(t.value,o),gm.push(o),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const n=e._zod.parse,r=(o,a)=>{if(a.direction!=="backward"&&O_e(a,o.value))throw new __e;return n(o,a)};e._zod.parse=r,e._zod.run===n&&(e._zod.run=r)})},attach(e){var t;let n,r=!1,o,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const l=e._zod.parse,c=(d,f)=>{if(n===void 0){const x=Km(e,new Set);if(x===Kd)return e._zod.parse=l,e._zod.run===c&&(e._zod.run=l),l(d,f);x===uf||r?n=!0:r=!0}const p=d.value;if(!s$(p))return l(d,f);let m=f[s_];m||(m={buckets:new WeakMap,backEdges:void 0},f[s_]=m);let g;o===f?g=a:(g=A_e(m,e),o=f,a=g);const v=g.get(p);if(v)return d.value=v.value,v.issues?v.issues.length&&d.issues.push(...xw(v.issues)):(d.memo=!0,m.backEdges??(m.backEdges=new WeakSet),m.backEdges.add(v.value)),d;mm=g;const S=gm.length,C=l(d,f);mm=void 0;const w=gm.length>S?gm.pop():void 0;return C instanceof Promise?C.then(x=>(w&&(w.issues=x.issues.length?xw(x.issues):X4),x)):(w&&(w.issues=C.issues.length?xw(C.issues):X4),C)};e._zod.parse=c,e._zod.run===l&&(e._zod.run=c)})}};function R_e(){return T_e}function O_e(e,t){const n=e[s_]?.backEdges;return n!==void 0&&s$(t)&&n.has(t)}const M_e=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(a){return e[a]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(a,l){return a==="number"&&typeof l=="number"&&!Number.isFinite(l)?String(l):r[a]??a}return a=>{switch(a.code){case"invalid_type":{const l=o(a.expected),c=ewe(a.input),d=o(c,a.input);return`Invalid input: expected ${l}, received ${d}`}case"invalid_value":return a.values.length===1?`Invalid input: expected ${U7(a.values[0])}`:`Invalid option: expected one of ${k4(a.values,"|")}`;case"too_big":{const l=a.exact?"exactly ":a.inclusive?"<=":"<",c=t(a.origin);return c?`Too big: expected ${a.origin??"value"} to have ${l}${a.maximum.toString()} ${c.unit??"elements"}`:`Too big: expected ${a.origin??"value"} to be ${l}${a.maximum.toString()}`}case"too_small":{const l=a.exact?"exactly ":a.inclusive?">=":">",c=t(a.origin);return c?`Too small: expected ${a.origin} to have ${l}${a.minimum.toString()} ${c.unit}`:`Too small: expected ${a.origin} to be ${l}${a.minimum.toString()}`}case"invalid_format":{const l=a;return l.format==="starts_with"?`Invalid string: must start with "${l.prefix}"`:l.format==="ends_with"?`Invalid string: must end with "${l.suffix}"`:l.format==="includes"?`Invalid string: must include "${l.includes}"`:l.format==="regex"?`Invalid string: must match pattern ${l.pattern}`:`Invalid ${n[l.format]??a.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${a.divisor}`;case"unrecognized_keys":return`Unrecognized key${a.keys.length>1?"s":""}: ${k4(a.keys,", ")}`;case"invalid_key":return`Invalid key in ${a.origin}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Invalid discriminator value. Expected ${a.options.map(c=>`'${c}'`).join(" | ")}`:a.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${a.origin}`;default:return"Invalid input"}}};function N_e(){return{localeError:M_e()}}var J4;class P_e{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function k_e(){return new P_e}(J4=globalThis).__zod_globalRegistry??(J4.__zod_globalRegistry=k_e());const Zd=globalThis.__zod_globalRegistry;function DI(e){return e.checks&&(e.checks=[...e.checks]),e}function D_e(e,t){return new e(DI({type:"string",...Pe(t)}))}function l$(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Pe(t)})}function L_e(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Pe(t)})}function U_e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Pe(t)})}function F_e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Pe(t)})}function z_e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Pe(t)})}function $_e(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Pe(t)})}function j_e(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Pe(t)})}function B_e(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Pe(t)})}function H_e(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Pe(t)})}function q_e(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Pe(t)})}function V_e(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Pe(t)})}function W_e(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Pe(t)})}function G_e(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Pe(t)})}function K_e(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Pe(t)})}function Z_e(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Pe(t)})}function Y_e(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Pe(t)})}function Q_e(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Pe(t)})}function X_e(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Pe(t)})}function J_e(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Pe(t)})}function e2e(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Pe(t)})}function t2e(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Pe(t)})}function n2e(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Pe(t)})}function c$(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Pe(t)})}function u$(e,t){return new e({type:"string",format:"date",check:"string_format",...Pe(t)})}function r2e(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Pe(t)})}function o2e(e,t){return new e({type:"string",format:"duration",check:"string_format",...Pe(t)})}function a2e(e,t){return new e(DI({type:"number",checks:[],...Pe(t)}))}function OLe(e,t){return new e(DI({type:"number",coerce:!0,checks:[],...Pe(t)}))}function s2e(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Pe(t)})}function i2e(e,t){return new e({type:"boolean",...Pe(t)})}function l2e(e,t){return new e({type:"null",...Pe(t)})}function c2e(e){return new e({type:"unknown"})}function u2e(e,t){return new e({type:"never",...Pe(t)})}function eL(e,t){return new G7({check:"less_than",...Pe(t),value:e,inclusive:!1})}function _w(e,t){return new G7({check:"less_than",...Pe(t),value:e,inclusive:!0})}function tL(e,t){return new K7({check:"greater_than",...Pe(t),value:e,inclusive:!1})}function Iw(e,t){return new K7({check:"greater_than",...Pe(t),value:e,inclusive:!0})}function nL(e,t){return new axe({check:"multiple_of",...Pe(t),value:e})}function d$(e,t){return new ixe({check:"max_length",...Pe(t),maximum:e})}function Lg(e,t){return new lxe({check:"min_length",...Pe(t),minimum:e})}function f$(e,t){return new cxe({check:"length_equals",...Pe(t),length:e})}function d2e(e,t){return new uxe({check:"string_format",format:"regex",...Pe(t),pattern:e})}function f2e(e){return new dxe({check:"string_format",format:"lowercase",...Pe(e)})}function h2e(e){return new fxe({check:"string_format",format:"uppercase",...Pe(e)})}function p2e(e,t){return new hxe({check:"string_format",format:"includes",...Pe(t),includes:e})}function m2e(e,t){return new pxe({check:"string_format",format:"starts_with",...Pe(t),prefix:e})}function g2e(e,t){return new mxe({check:"string_format",format:"ends_with",...Pe(t),suffix:e})}function gu(e){return new gxe({check:"overwrite",tx:e})}function v2e(e){return gu(t=>t.normalize(e))}function y2e(){return gu(e=>e.trim())}function b2e(){return gu(e=>e.toLowerCase())}function S2e(){return gu(e=>e.toUpperCase())}function C2e(){return gu(e=>jEe(e))}function E2e(e,t,n){return new e({type:"array",element:t,...Pe(n)})}function w2e(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Pe(n)})}function x2e(e,t){const n=_2e(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Lf(o,r.value,n._zod.def));else{const a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=n),a.continue??(a.continue=!n._zod.def.abort),r.issues.push(Lf(a))}},e(r.value,r)),t);return n}function _2e(e,t){const n=new vr({check:"custom",...Pe(t)});return n._zod.check=e,n}function df(e,...t){for(const n of t)for(const r of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,r)&&Gs(e,r,n[r]);return e}function h$(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Zd,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Hs(e,t,n,r,o){const a=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:r.path,message:o}):t.unrepresentable;if(a==="any")return!1;if(a===void 0||a==="throw")throw new Error(o);return Object.assign(n,a),!0}function sn(e,t,n={path:[],schemaPath:[]}){var r;const o=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const c=e._zod.toJSONSchema?.();if(c)l.schema=c;else{const p={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,p);else{const g=l.schema,v=t.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,t,g,p)}const m=e._zod.parent;m&&(l.ref||(l.ref=m),sn(m,t,p),t.seen.get(m).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&df(l.schema,d),t.io==="input"&&Zn(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&"_prefault"in l.schema&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function rL(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function p$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const l of e.seen.entries()){const c=e.metadataRegistry.get(l[0])?.id;if(c){const d=r.get(c);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,l[0])}}const o=l=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=e.external.registry.get(l[0])?.id,g=e.external.uri??(S=>S);if(m)return{ref:g(m)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${rL(v)}`}}const d="#",f=`${d}/${c}/`;if(l[1]===n&&!l[1].schema.id)return{ref:d};const p=l[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:f+rL(p)}},a=l=>{if(l[1].schema.$ref)return;const c=l[1],{ref:d,defId:f}=o(l);c.def={...c.schema},f&&(c.defId=f);const p=c.schema;for(const m in p)delete p[m];p.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const c=l[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
221
+
222
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const c=l[1];if(t===l[0]){a(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){a(l);continue}}if(e.metadataRegistry.get(l[0])?.id){a(l);continue}if(c.cycle){a(l);continue}c.count>1&&e.reused==="ref"&&a(l)}e.external&&(e.sharedDefsExtractedFor=e.external)}function m$(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const n=[];for(const r of t){if(!r||typeof r!="object")return;m$(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const a=r.type;for(const l of Array.isArray(a)?a:[a]){if(typeof l!="string")return;n.includes(l)||n.push(l)}}delete e.anyOf,e.type=n.length===1?n[0]:n}const g$=new Set(["type","properties","required","additionalProperties"]),oL=["oneOf","anyOf"];function aL(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function i_(e){const t=[];for(const a of e){if(typeof a!="object"||a.type!=="object")return null;for(const l in a)if(!g$.has(l))return null;t.push(a)}const n={},r=new Set;for(const a of t){for(const l in a.properties){if(Object.prototype.hasOwnProperty.call(n,l))continue;const c=[];for(const f of t){const p=f.properties?.[l]??aL(f);p!=null&&(c.some(m=>JSON.stringify(m)===JSON.stringify(p))||c.push(p))}const d=c.length===1?c[0]:i_(c)??{allOf:c};Gs(n,l,d)}for(const l of a.required??[])r.add(l)}const o={type:"object",properties:n};if(r.size&&(o.required=[...r]),t.every(a=>a.additionalProperties===!1))o.additionalProperties=!1;else{const a=[];for(const l of t){const c=aL(l);c&&!a.some(d=>JSON.stringify(d)===JSON.stringify(c))&&a.push(c)}a.length===1?o.additionalProperties=a[0]:a.length>1&&(o.additionalProperties={allOf:a})}return o}function I2e(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of g$)if(o in e)return;const n=t.filter(o=>oL.some(a=>Array.isArray(o[a])));let r=null;if(!n.length)r=i_(t);else{const o=n[0],a=oL.find(d=>Array.isArray(o[d]));if(Object.keys(o).length!==1)return;const l=t.filter(d=>d!==o),c=o[a].map(d=>i_([...l,d]));if(c.some(d=>!d))return;r={[a]:c}}r&&(delete e.allOf,df(e,r))}function v$(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const d=e.seen.get(c);if(d.ref===null)return;const f=d.def??d.schema,p={...f},m=d.ref;if(d.ref=null,m){r(m);const v=e.seen.get(m),S=v.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(S)):df(f,S),df(f,p),c._zod.parent===m)for(const w in f)w==="$ref"||w==="allOf"||w in p||delete f[w];if(S.$ref&&v.def)for(const w in f)w==="$ref"||w==="allOf"||w in v.def&&JSON.stringify(f[w])===JSON.stringify(v.def[w])&&delete f[w]}const g=c._zod.parent;if(g&&g!==m){r(g);const v=e.seen.get(g);if(v?.schema.$ref&&(f.$ref=v.schema.$ref,v.def))for(const S in f)S==="$ref"||S==="allOf"||S in v.def&&JSON.stringify(f[S])===JSON.stringify(v.def[S])&&delete f[S]}e.override({zodSchema:c,jsonSchema:f,path:d.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const c of[...e.seen.entries()].reverse())r(c[0]);if(e.target!=="openapi-3.0")for(const c of e.seen.entries())m$(c[1].def??c[1].schema);for(const c of e.deferred)c();if(e.intersections.length){const c=new Map;for(const d of e.seen.values())for(const f of[d.schema,d.def]){const p=f?.allOf;if(!Array.isArray(p))continue;const m=c.get(p);m?m.push(f):c.set(p,[f])}for(const d of e.intersections)for(const f of c.get(d)??[])I2e(f)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}df(o,n.defId?n.schema:n.def??n.schema);const a=e.metadataRegistry.get(t)?.id;a!==void 0&&o.id===a&&delete o.id;const l=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const c of e.seen.entries()){const d=c[1];d.def&&d.defId&&(d.def.id===d.defId&&delete d.def.id,Gs(l,d.defId,d.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(l).length>0&&(e.target==="draft-2020-12"?o.$defs=l:o.definitions=l);try{const c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ug(t,"input",e.processors),output:Ug(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Zn(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Zn(r.element,n);if(r.type==="set")return Zn(r.valueType,n);if(r.type==="lazy")return Zn(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"||r.type==="catch")return Zn(r.innerType,n);if(r.type==="intersection")return Zn(r.left,n)||Zn(r.right,n);if(r.type==="record"||r.type==="map")return Zn(r.keyType,n)||Zn(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Zn(r.in,n)||Zn(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Zn(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Zn(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Zn(o,n))return!0;return!!(r.rest&&Zn(r.rest,n))}return!1}const A2e=(e,t={})=>n=>{const r=h$({...n,processors:t});return sn(e,r),p$(r,e),v$(r,e)},Ug=(e,t,n={})=>r=>{const{libraryOptions:o,target:a}=r??{},l=h$({...o??{},target:a,io:t,processors:n});return sn(e,l),p$(l,e),v$(l,e)},Zc=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Yc=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},sL=(e,t)=>{Zc(e,"minimum",t),Yc(e,"maximum",t)},y$=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},b$=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},S$=(e,t)=>{e.mime=e.mime?e.mime.filter(n=>t.includes(n)):[...t]},C$=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},iL=(e,t)=>Zc(e,"minimum",t.minimum),lL=(e,t)=>Yc(e,"maximum",t.maximum),cL=e=>(t,n)=>{C$(t,n.format);const[r,o]=e[n.format];Zc(t,"minimum",r),Yc(t,"maximum",o)},T2e={greater_than:(e,t)=>Zc(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Yc(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>y$(e,t.value),number_format:cL(F7),bigint_format:cL(VEe),min_length:iL,max_length:lL,length_equals:(e,t)=>sL(e,t.length),min_size:iL,max_size:lL,size_equals:(e,t)=>sL(e,t.size),string_format:(e,t)=>{C$(e,t.format),t.pattern&&b$(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>S$(e,t.mime)};function vo(e){const t={},n=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[];for(const a of r)T2e[a._zod.def.check]?.(t,a._zod.def);const o=e._zod.bag;o.minimum!==void 0&&Zc(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&Zc(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Yc(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Yc(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&y$(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&S$(t,o.mime);for(const a of o.patterns??[])b$(t,a);return t}const R2e={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},O2e=new Map([[t$,Vwe],[kI,Wwe]]),E$=e=>O2e.get(e)??e,M2e=(e,t,n,r)=>{const o=n;o.type="string";const{minimum:a,maximum:l,format:c,patterns:d,contentEncoding:f,laxFormat:p}=vo(e);if(typeof a=="number"&&(o.minLength=a),typeof l=="number"&&(o.maxLength=l),c&&(o.format=R2e[c]??c,o.format===""&&delete o.format,(c==="time"||p)&&delete o.format),f&&(o.contentEncoding=f),d&&d.size>0){const m=[...d].map(E$);m.length===1?o.pattern=m[0].source:m.length>1&&(o.allOf=[...m.map(g=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:g.source}))])}},N2e=(e,t,n,r)=>{const o=n,{minimum:a,maximum:l,multipleOf:c,exclusiveMaximum:d,exclusiveMinimum:f,isInt:p}=vo(e);o.type=p?"integer":"number";const m=typeof f=="number"&&f>=(a??Number.NEGATIVE_INFINITY),g=typeof d=="number"&&d<=(l??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";if(m?v?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof a=="number"&&(o.minimum=a),g?v?(o.maximum=d,o.exclusiveMaximum=!0):o.exclusiveMaximum=d:typeof l=="number"&&(o.maximum=l),c){const S=new Set;for(const x of c)Number.isFinite(x)&&x!==0?S.add(Math.abs(x)):Hs(e,t,o,r,`A multipleOf divisor of ${x} cannot be represented in JSON Schema`);const[C,...w]=S;C!==void 0&&(o.multipleOf=C),w.length&&(o.allOf=[...o.allOf??[],...w.map(x=>({multipleOf:x}))])}},P2e=(e,t,n,r)=>{n.type="boolean"},k2e=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},D2e=(e,t,n,r)=>{n.not={}},L2e=(e,t,n,r)=>{},U2e=(e,t,n,r)=>{const o=e._zod.def,a=t_(o.entries);if(a.length===0){n.not={};return}a.every(l=>typeof l=="number")&&(n.type="number"),a.every(l=>typeof l=="string")&&(n.type="string"),n.enum=a},F2e=(e,t,n,r)=>{const o=e._zod.def;if(o.values.length===0){n.not={};return}const a=[];for(const l of o.values)if(l===void 0){if(Hs(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof l=="bigint"){if(Hs(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;a.push(Number(l))}else a.push(l);if(a.length!==0)if(a.length===1){const l=a[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else a.every(l=>typeof l=="number")&&(n.type="number"),a.every(l=>typeof l=="string")&&(n.type="string"),a.every(l=>typeof l=="boolean")&&(n.type="boolean"),a.every(l=>l===null)&&(n.type="null"),n.enum=a},z2e=(e,t,n,r)=>{Hs(e,t,n,r,"Custom types cannot be represented in JSON Schema")},$2e=(e,t,n,r)=>{Hs(e,t,n,r,"Transforms cannot be represented in JSON Schema")},j2e=(e,t,n,r)=>{const o=n,a=e._zod.def,{minimum:l,maximum:c}=vo(e);typeof l=="number"&&(o.minItems=l),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=sn(a.element,t,{...r,path:[...r.path,"items"]})};function Fg(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Fg(t.out):t.type==="catch"?Fg(t.innerType):e._zod.optin}const B2e=(e,t,n,r)=>{const o=n,a=e._zod.def,l=a.shape;if(Object.getOwnPropertySymbols(l).length&&Hs(e,t,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const f in l)Gs(o.properties,f,sn(l[f],t,{...r,path:[...r.path,"properties",f]}));const d=[];for(const f of Object.keys(l)){const p=a.shape[f];(t.io==="input"?Fg(p)===void 0:p._zod.optout===void 0)&&d.push(f)}d.length>0&&(o.required=d),a.catchall?._zod.def.type==="never"?o.additionalProperties=!1:a.catchall?a.catchall&&(o.additionalProperties=sn(a.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},H2e=(e,t,n,r)=>{const o=e._zod.def,a=o.inclusive===!1,l=o.options.map((c,d)=>sn(c,t,{...r,path:[...r.path,a?"oneOf":"anyOf",d]}));a?n.oneOf=l:n.anyOf=l},q2e=(e,t,n,r)=>{const o=e._zod.def,a=sn(o.left,t,{...r,path:[...r.path,"allOf",0]}),l=sn(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,d=[...c(a)?a.allOf:[a],...c(l)?l.allOf:[l]];n.allOf=d,t.intersections.push(d)};function l_(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);const S=e.get(t)?.def;if(!S)return t;const C=l_(e,S,n);return C===S?t:C}for(const S of["anyOf","oneOf"]){const C=t[S];if(!Array.isArray(C))continue;const w=C.map(x=>l_(e,x,n));w.some((x,I)=>x!==C[I])&&(t={...t,[S]:w})}const r=Array.isArray(t.type)?t.type:[t.type],o=!r.includes("string")&&r.some(S=>S==="number"||S==="integer"),a=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!a?.some(S=>typeof S=="number"))return t;const{minimum:l,maximum:c,exclusiveMinimum:d,exclusiveMaximum:f,multipleOf:p,format:m,id:g,...v}=t;return v.enum?v.enum=v.enum.map(S=>typeof S=="number"?String(S):S):typeof v.const=="number"&&(v.const=String(v.const)),o&&(v.type="string",a||(v.pattern=(r.includes("number")?MI:exe).source)),v}const c_=new WeakMap;function V2e(e){const t=new Map;for(const r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);const n=new Map;for(const r of c_.get(e)??[]){const o=e.seen.get(r),a=(o?.def??o?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;const l=l_(t,a,new Set);l!==a&&n.set(a,l)}if(n.size)for(const r of e.seen.values())for(const o of[r.schema,r.def]){const a=o&&n.get(o.propertyNames);a&&(o.propertyNames=a)}}const W2e=(e,t,n,r)=>{const o=n,a=e._zod.def;o.type="object";const l=a.keyType,c=vo(l).patterns;if(a.mode==="loose"&&c&&c.size>0){const p=sn(a.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const m of c)Gs(o.patternProperties,E$(m).source,p)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=sn(a.keyType,t,{...r,path:[...r.path,"propertyNames"]});let p=c_.get(t);p||(p=[],c_.set(t,p),t.deferred.push(()=>V2e(t))),p.push(e)}o.additionalProperties=sn(a.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}const d=l._zod.values,f=t.io==="input"&&Fg(a.valueType)!==void 0;if(d&&!a.partial&&!f){const p=[...d].filter(m=>typeof m=="string"||typeof m=="number");p.length>0&&(o.required=p.map(String))}},G2e=(e,t,n,r)=>{const o=e._zod.def,a=sn(o.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=o.innerType,n.nullable=!0):n.anyOf=[a,{type:"null"}]},K2e=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType},LI=Symbol();function w$(e,t,n,r,o){let a=!1;const l=JSON.stringify(e,(c,d)=>typeof d!="bigint"?d:(a=!0,null));return a?(Hs(t,n,r,o,"BigInt defaults cannot be represented in JSON Schema"),LI):JSON.parse(l)}const Z2e=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType;const l=w$(o.defaultValue,e,t,n,r);l!==LI&&(n.default=l)},Y2e=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const a=t.seen.get(e);if(a.ref=o.innerType,t.io!=="input")return;const l=w$(o.defaultValue,e,t,n,r);l!==LI&&(n._prefault=l)},Q2e=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType;let l;try{l=o.catchValue(void 0)}catch{Hs(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=l},X2e=(e,t,n,r)=>{const o=e._zod.def,a=o.in._zod.traits.has("$ZodTransform"),l=t.io==="input"?a?o.out:o.in:o.out;sn(l,t,r);const c=t.seen.get(e);c.ref=l},J2e=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType,n.readOnly=!0},x$=(e,t,n,r)=>{const o=e._zod.def;sn(o.innerType,t,r);const a=t.seen.get(e);a.ref=o.innerType},eIe=(e,t,n,r)=>{const o=e._zod.innerType;sn(o,t,r);const a=t.seen.get(e);a.ref=o},uL=new WeakSet([Object.prototype,Error.prototype]);function vm(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}const tIe=(e,t)=>{fwe.init(e,t),e.name="ZodError";const n=Object.getPrototypeOf(e);uL.has(n)||(uL.add(n),vm(n,"format",r=>o=>mwe(r,o)),vm(n,"flatten",r=>o=>pwe(r,o)),vm(n,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,n_,2)}),vm(n,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,n_,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},oo=re("ZodError",tIe,void 0,{Parent:Error}),nIe=ay(oo),rIe=sy(oo),oIe=RI(oo),aIe=OI(oo),sIe=Cwe(oo),iIe=Ewe(oo),lIe=wwe(oo),cIe=xwe(oo),uIe=_we(oo),dIe=Iwe(oo),fIe=Awe(oo),hIe=Twe(oo);function pIe(){Co.localeError||jo(N_e())}function ly(){Co.memoizer||jo({memoizer:R_e()})}const Vt=re("ZodType",(e,t)=>(pIe(),qt.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(Or(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ks(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(cAe(e,t))},superRefine(e,t){return this.check(uAe(e,t))},overwrite(e){return this.check(gu(e))},optional(){return hL(this)},exactOptional(){return ZIe(this)},nullable(){return pL(this)},nullish(){return hL(pL(this))},nonoptional(e){return tAe(this,e)},array(){return ue(this)},or(e){return Ke([this,e])},and(e){return VIe(this,e)},transform(e){return mL(this,KIe(e))},default(e){return XIe(this,e)},prefault(e){return eAe(this,e)},catch(e){return rAe(this,e)},pipe(e){return mL(this,e)},readonly(){return sAe(this)},describe(e){const t=this.clone();return Zd.add(t,{description:e}),t},meta(...e){if(e.length===0)return Zd.get(this);const t=this.clone();return Zd.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return $7(this,"~standard",{...Y7(this),jsonSchema:{input:Ug(this,"input"),output:Ug(this,"output")}})},set"~standard"(e){Bs(this,"~standard",e)},parse:function e(t,n){return nIe(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await rIe(this,t,n,{callee:e})},safeParse(e,t){return oIe(this,e,t)},async safeParseAsync(e,t){return aIe(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Bs(this,"spa",e)},validate(e,t){return ywe(this,e,t)},validateAsync(e,t){return Swe(this,e,t)},encode:function e(t,n){return sIe(this,t,n,{callee:e})},decode:function e(t,n){return iIe(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await lIe(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await cIe(this,t,n,{callee:e})},safeEncode(e,t){return uIe(this,e,t)},safeDecode(e,t){return dIe(this,e,t)},async safeEncodeAsync(e,t){return fIe(this,e,t)},async safeDecodeAsync(e,t){return hIe(this,e,t)},toJSONSchema(e){return A2e(this,{})(e)},get description(){return Zd.get(this)?.description},get _def(){return this._zod.def}}),_$=re("_ZodString",(e,t)=>{PI.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>M2e(e,n,r)},j7({format:e=>vo(e).format??null,minLength:e=>vo(e).minimum??null,maxLength:e=>vo(e).maximum??null},{regex(...e){return this.check(d2e(...e))},includes(...e){return this.check(p2e(...e))},startsWith(...e){return this.check(m2e(...e))},endsWith(...e){return this.check(g2e(...e))},min(...e){return this.check(Lg(...e))},max(...e){return this.check(d$(...e))},length(...e){return this.check(f$(...e))},nonempty(...e){return this.check(Lg(1,...e))},lowercase(e){return this.check(f2e(e))},uppercase(e){return this.check(h2e(e))},trim(){return this.check(y2e())},normalize(...e){return this.check(v2e(...e))},toLowerCase(){return this.check(b2e())},toUpperCase(){return this.check(S2e())},slugify(){return this.check(C2e())}})),mIe=re("ZodString",(e,t)=>{PI.init(e,t),_$.init(e,t)},{email(e){return this.check(l$(T$,e))},url(e){return this.check(j_e(bIe,e))},jwt(e){return this.check(n2e(kIe,e))},emoji(e){return this.check(B_e(SIe,e))},guid(e){return this.check(L_e(yIe,e))},uuid(e){return this.check(U_e(ym,e))},uuidv4(e){return this.check(F_e(ym,e))},uuidv6(e){return this.check(z_e(ym,e))},uuidv7(e){return this.check($_e(ym,e))},nanoid(e){return this.check(H_e(CIe,e))},cuid(e){return this.check(q_e(EIe,e))},cuid2(e){return this.check(V_e(wIe,e))},ulid(e){return this.check(W_e(xIe,e))},base64(e){return this.check(J_e(MIe,e))},base64url(e){return this.check(e2e(NIe,e))},xid(e){return this.check(G_e(_Ie,e))},ksuid(e){return this.check(K_e(IIe,e))},ipv4(e){return this.check(Z_e(AIe,e))},ipv6(e){return this.check(Y_e(TIe,e))},cidrv4(e){return this.check(Q_e(RIe,e))},cidrv6(e){return this.check(X_e(OIe,e))},e164(e){return this.check(t2e(PIe,e))},datetime(e){return this.check(c$(I$,e))},date(e){return this.check(u$(A$,e))},time(e){return this.check(r2e(gIe,e))},duration(e){return this.check(o2e(vIe,e))}});function E(e){return D_e(mIe,e)}const tn=re("ZodStringFormat",(e,t)=>{Zt.init(e,t),_$.init(e,t)}),I$=re("ZodISODateTime",(e,t)=>{Lxe.init(e,t),tn.init(e,t)}),A$=re("ZodISODate",(e,t)=>{Uxe.init(e,t),tn.init(e,t)}),gIe=re("ZodISOTime",(e,t)=>{Fxe.init(e,t),tn.init(e,t)}),vIe=re("ZodISODuration",(e,t)=>{zxe.init(e,t),tn.init(e,t)}),T$=re("ZodEmail",(e,t)=>{Exe.init(e,t),tn.init(e,t)});function MLe(e){return l$(T$,e)}const yIe=re("ZodGUID",(e,t)=>{Sxe.init(e,t),tn.init(e,t)}),ym=re("ZodUUID",(e,t)=>{Cxe.init(e,t),tn.init(e,t)}),bIe=re("ZodURL",(e,t)=>{Txe.init(e,t),tn.init(e,t)}),SIe=re("ZodEmoji",(e,t)=>{Rxe.init(e,t),tn.init(e,t)}),CIe=re("ZodNanoID",(e,t)=>{Oxe.init(e,t),tn.init(e,t)}),EIe=re("ZodCUID",(e,t)=>{Mxe.init(e,t),tn.init(e,t)}),wIe=re("ZodCUID2",(e,t)=>{Nxe.init(e,t),tn.init(e,t)}),xIe=re("ZodULID",(e,t)=>{Pxe.init(e,t),tn.init(e,t)}),_Ie=re("ZodXID",(e,t)=>{kxe.init(e,t),tn.init(e,t)}),IIe=re("ZodKSUID",(e,t)=>{Dxe.init(e,t),tn.init(e,t)}),AIe=re("ZodIPv4",(e,t)=>{$xe.init(e,t),tn.init(e,t)}),TIe=re("ZodIPv6",(e,t)=>{Bxe.init(e,t),tn.init(e,t)}),RIe=re("ZodCIDRv4",(e,t)=>{Hxe.init(e,t),tn.init(e,t)}),OIe=re("ZodCIDRv6",(e,t)=>{Vxe.init(e,t),tn.init(e,t)}),MIe=re("ZodBase64",(e,t)=>{Wxe.init(e,t),tn.init(e,t)}),NIe=re("ZodBase64URL",(e,t)=>{Kxe.init(e,t),tn.init(e,t)}),PIe=re("ZodE164",(e,t)=>{Zxe.init(e,t),tn.init(e,t)}),kIe=re("ZodJWT",(e,t)=>{Qxe.init(e,t),tn.init(e,t)}),R$=re("ZodNumber",(e,t)=>{n$.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>N2e(e,n,r,o),e.isFinite=!0},j7({minValue:e=>{const{minimum:t,exclusiveMinimum:n}=vo(e);return Math.max(t??Number.NEGATIVE_INFINITY,n??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:t,exclusiveMaximum:n}=vo(e);return Math.min(t??Number.POSITIVE_INFINITY,n??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:t,multipleOf:n}=vo(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>vo(e).format??null},{gt(e,t){return this.check(tL(e,t))},gte(e,t){return this.check(Iw(e,t))},min(e,t){return this.check(Iw(e,t))},lt(e,t){return this.check(eL(e,t))},lte(e,t){return this.check(_w(e,t))},max(e,t){return this.check(_w(e,t))},int(e){return this.check(dL(e))},safe(e){return this.check(dL(e))},positive(e){return this.check(tL(0,e))},nonnegative(e){return this.check(Iw(0,e))},negative(e){return this.check(eL(0,e))},nonpositive(e){return this.check(_w(0,e))},multipleOf(e,t){return this.check(nL(e,t))},step(e,t){return this.check(nL(e,t))},finite(){return this}}));function N(e){return a2e(R$,e)}const DIe=re("ZodNumberFormat",(e,t)=>{Xxe.init(e,t),R$.init(e,t)});function dL(e){return s2e(DIe,e)}const LIe=re("ZodBoolean",(e,t)=>{Jxe.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>P2e(e,n,r)});function le(e){return i2e(LIe,e)}const UIe=re("ZodNull",(e,t)=>{e_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>k2e(e,n,r)});function qn(e){return l2e(UIe,e)}const FIe=re("ZodUnknown",(e,t)=>{t_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>L2e()});function Ji(){return c2e(FIe)}const zIe=re("ZodNever",(e,t)=>{n_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>D2e(e,n,r)});function $Ie(e){return u2e(zIe,e)}const jIe=re("ZodArray",(e,t)=>{ly(),a_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>j2e(e,n,r,o),e.element=t.element},{min(e,t){return this.check(Lg(e,t))},nonempty(e){return this.check(Lg(1,e))},max(e,t){return this.check(d$(e,t))},length(e,t){return this.check(f$(e,t))},unwrap(){return this.element}});function ue(e,t){return E2e(jIe,e,t)}const BIe=re("ZodObject",(e,t)=>{ly(),l_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>B2e(e,n,r,o),awe(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return de(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Or(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Or(this._zod.def,{catchall:Ji()}))},loose(){return this.clone(Or(this._zod.def,{catchall:Ji()}))},strict(){return this.clone(Or(this._zod.def,{catchall:$Ie()}))},strip(){return this.clone(Or(this._zod.def,{catchall:void 0}))},extend(e){return KEe(this,e)},safeExtend(e){return ZEe(this,e)},merge(e){return YEe(this,e)},pick(e){return WEe(this,e)},omit(e){return GEe(this,e)},partial(...e){return L4(O$,this,e[0])},exactPartial(...e){return L4(M$,this,e[0],"exactPartial")},required(...e){return QEe(N$,this,e[0])}});function U(e,t){const n={type:"object",shape:e??{},...Pe(t)};return new BIe(n)}const HIe=re("ZodUnion",(e,t)=>{c_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>H2e(e,n,r,o),e.options=t.options});function Ke(e,t){return new HIe({type:"union",options:e,...Pe(t)})}const qIe=re("ZodIntersection",(e,t)=>{u_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>q2e(e,n,r,o)});function VIe(e,t){return new qIe({type:"intersection",left:e,right:t})}const fL=re("ZodRecord",(e,t)=>{ly(),d_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>W2e(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Yt(e,t,n){return!t||!t._zod?new fL({type:"record",keyType:E(),valueType:e,...Pe(t)}):new fL({type:"record",keyType:e,valueType:t,...Pe(n)})}const u_=re("ZodEnum",(e,t)=>{f_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(r,o,a)=>U2e(e,r,o),e.enum=t.entries,e.options=[...e._zod.values];const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const a={};for(const l of r)if(n.has(l))a[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new u_({...t,checks:[],...Pe(o),entries:a})},e.exclude=(r,o)=>{const a={...t.entries};for(const l of r)if(n.has(l))delete a[l];else throw new Error(`Key ${l} not found in enum`);return new u_({...t,checks:[],...Pe(o),entries:a})}});function de(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new u_({type:"enum",entries:n,...Pe(t)})}const WIe=re("ZodLiteral",(e,t)=>{h_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>F2e(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function he(e,t){return new WIe({type:"literal",values:Array.isArray(e)?e:[e],...Pe(t)})}const GIe=re("ZodTransform",(e,t)=>{ly(),p_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$2e(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new B7(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(Lf(a,n.value,t));else{const l=a;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),"input"in l||(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Lf(l))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(a=>(n.value=a,n)):(n.value=o,n)}});function KIe(e){return new GIe({type:"transform",transform:e})}const O$=re("ZodOptional",(e,t)=>{a$.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>x$(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function hL(e){return new O$({type:"optional",innerType:e})}const M$=re("ZodExactOptional",(e,t)=>{m_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>x$(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function ZIe(e){return new M$({type:"optional",innerType:e})}const YIe=re("ZodNullable",(e,t)=>{g_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>G2e(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function pL(e){return new YIe({type:"nullable",innerType:e})}const QIe=re("ZodDefault",(e,t)=>{v_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Z2e(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function XIe(e,t){return new QIe({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():L7(t)}})}const JIe=re("ZodPrefault",(e,t)=>{y_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Y2e(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function eAe(e,t){return new JIe({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():L7(t)}})}const N$=re("ZodNonOptional",(e,t)=>{b_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>K2e(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function tAe(e,t){return new N$({type:"nonoptional",innerType:e,...Pe(t)})}const nAe=re("ZodCatch",(e,t)=>{S_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Q2e(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function rAe(e,t){return new nAe({type:"catch",innerType:e,catchValue:typeof t=="function"?t:iwe(t)})}const oAe=re("ZodPipe",(e,t)=>{C_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>X2e(e,n,r,o),e.in=t.in,e.out=t.out});function mL(e,t){return new oAe({type:"pipe",in:e,out:t})}const aAe=re("ZodReadonly",(e,t)=>{E_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>J2e(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function sAe(e){return new aAe({type:"readonly",innerType:e})}const iAe=re("ZodLazy",(e,t)=>{w_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eIe(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});function Lc(e){return new iAe({type:"lazy",getter:e})}const lAe=re("ZodCustom",(e,t)=>{x_e.init(e,t),Vt.init(e,t),e._zod.processJSONSchema=(n,r,o)=>z2e(e,n,r,o)});function cAe(e,t={}){return w2e(lAe,e,t)}function uAe(e,t){return x2e(e,t)}function dAe(e){return c$(I$,e)}function fAe(e){return u$(A$,e)}const P$=de(["Pending","Processing","Ready","Failed"]),UI=de(["Inbox","Drafts","Sent","Archive","Junk","Trash","All","Flagged"]),k$=de(["BodyParse"]),D$=de(["UnknownCharset","UnreadableBody"]),L$=de(["Header","Body"]),U$=de(["active","deleting"]),FI=de(["password","oauthMicrosoft"]),ah=de(["Mail","Calendar"]),F$=de(["not_authenticated","authenticated","selected","logout","reauth_required","credentials_missing"]),zI=de(["idle","discovering_mailboxes","syncing_inbox","syncing_others","complete","error"]),hAe=de(["Appointed","Flagged","Reserved","Proposed","Stale","None"]),pAe=de(["validate","apply"]),mAe=de(["abort","merge"]),gAe=de(["ok","failed","disabled"]),vAe=de(["checking","pulling","snapshotting","stopping","starting","verifying","committing","rollingBack","recovering"]),yAe=de(["succeeded","rolledBack","rollbackFailed","abandoned"]),z$=de(["Active","Disabled"]);de(["sign_in_disabled","caller_disabled","foreign_origin","step_up_required","wrong_password","step_up_locked","cannot_disable_self"]);const bAe=de(["SignOut","Disable","Enable","ResetPassword"]),$I=de(["personal","other_users","shared"]),$$=de(["synced","pending","failed","deleting"]),SAe=de(["normal","cursor_invalid","rebuilding"]),jI=de(["All","Archive","Drafts","Flagged","Junk","Sent","Trash","Important"]),sh=de(["Standing","Temporary"]),cy=de(["Active","Expired","Disabled"]),BI=de(["None","UserDisabled","AwaitingFolder","FolderCreateFailed","FolderMissing"]),Zs=de(["And","Or"]),CAe=de(["From","Subject","HasWords","ListId","FromDomain"]),j$=de(["Is","Contains"]),EAe=de(["From","Subject","ListId"]),wAe=de(["All","Localpart","Domain","RegistrableDomain"]),uy=de(["Spam","Phishing","Priority","Personal","Newsletter","Marketing","Automated","Transactional","Social","ColdOutreach"]),ih=de(["Default","Red","Orange","Yellow","Green","Teal","Blue","Purple","Gray"]);de(["Present","Pending","Missing"]);const HI=de(["Pending","Running","Complete","Failed"]),dy=de(["Cal1","Cal2","Cal3","Cal4","Cal5","Cal6"]),B$=de(["VeventOnly","VtodoOnly"]),H$=de(["Default","UserCreated","MailDerived","Subscribed"]),vu=de(["Confirmed","Tentative","Cancelled"]),yu=de(["Opaque","Transparent"]),lh=de(["Local","Explicit","Ambiguous"]),q$=de(["Unscheduled","Organizer","NeedsAction","Accepted","Tentative","Declined"]),xAe=de(["Organizer","Guest"]),_Ae=de(["NeedsAction","Accepted","Tentative","Declined"]),fy=de(["Request","Reply","Cancel","Counter","Publish","None"]),qI=de(["draft","queued","sending","sent","unfiled","failed","blocked"]);de(["This","Following","All"]);const V$=de(["Accepted","Tentative","Declined"]),ch=de(["Jev","Jina","Mistral","Gemini","OpenAiCompatible","Local"]),IAe=de(["Hosted","Custom","Local"]),AAe=de(["DecisionApi","ChatJsonSchema","JinaClassify"]),cc=de(["Saved","Deployment","Default"]),TAe=de(["NoBaseUrl","NoApiKey"]),Uf=de(["MoveToSpam","WarnOnly"]),RAe=de(["Unauthorized","ModelNotFound","RateLimited","Rejected","ProviderError","Unreachable","TimedOut","Unparseable"]),OAe=de(["ApiKey","Model","BaseUrl"]),hl=de(["uncategorized","personal","newsletter","marketing","automated","transactional","social","coldOutreach"]),W$=de(["None","Warn","Junk"]),G$=de(["Spam","Phishing"]);de(["asc","desc"]);const hy=de(["none","yellow","orange","red","purple","blue","teal","green","yellow_bang","red_bang","purple_question","blue_info","orange_guillemet","green_check","yellow_check","blue_star"]),K$=de(["unknown","wellknown","vip"]),py=de(["active","deleting","deleted","moving"]),my=de(["synced","pending","failed","abandoned"]),gy=de(["none","move","delete","copy"]),Z$=de(["MoveToInbox","MoveToJunk"]),Y$=de(["inbox","junk","other"]),MAe=de(["Confident","Unsure"]),NAe=de(["sender=blocked","sender=untrusted","sender=never-spam","sender=vip","sender=wellknown","classifier=spam","spam=clean","provider=spam","dkim-mismatch","dmarc=fail","dmarc=pass","deferred-to-llm","missing-signals","no-confident-signal","placed-in-junk","already-moved-by-remit","body-unreadable","junk-not-rescued"]),PAe=de(["ReportedSender","NeverSpam","Vip","WellKnown","KnownSender","Newsletter"]),kAe=de(["DmarcFail","DkimDmarcFail","SignerMismatch","ReplyToMismatch","LinkTextMismatch","LinkDomainDistant","PunycodeDomain","MixedScriptDomain","ConfusableDomains","SingleOffDomainLink","GeneratedName","FirstContactDomain","RecentlyRegisteredDomain","UnknownRegistrationDate","ClassifierSpam","ClassifierPhishing","ProviderSpam","DisplayNameForeignAddress","DisplayNameLookalike","ModelImpersonation","ModelSpam","ModelClean","ListedPhishingLink","BackendSymbol"]),DAe=de(["Answered","NotConfigured","DailyLimit","RateLimited","OutOfBand"]),LAe=de(["Inline","Rspamd","Model"]),UAe=de(["Unreachable","TimedOut","ServiceError","Unparseable"]),Q$=de(["Pending","Stored"]),X$=de(["EmptyFile","UnusableFilename","FileTooLarge","MessageTooLarge","TooManyAttachments","ReservationExpired","UploadMissing","SizeMismatch"]);de(["neverSpam","blocked","vip"]);const FAe=de(["trusted","blocked","muted","vip","junkOnly","category","autoArchive","unsubscribed","neverSpam"]),J$=de(["NotExamined","Examined"]),Uc=de(["Pass","Fail","None","Neutral","Softfail"]),ej=de(["from","sender","reply_to","to","cc","bcc"]),tj=de(["TEXT","IMAGE","AUDIO","VIDEO","APPLICATION","MULTIPART","MESSAGE"]),zAe=de(["7BIT","8BIT","BINARY","BASE64","QUOTED-PRINTABLE"]),nj=de(["inline","attachment"]),$Ae=de(["mixed","alternative","digest","parallel","related","signed","encrypted","form-data","report"]),rj=de(["in_reply_to","references"]),jAe=de(["RateLimited","DailyCap","NotSettled","NotFound","NotPermitted"]),BAe=de(["Apply","Remove"]),oj=de(["Pending","Accepted","Declined","Tentative","Dismissed","Superseded"]),aj=de(["IcalendarPart","IcalendarAttachment","TextHeuristic"]),HAe=de(["None","Cancellation"]),sj=de(["\\Seen","\\Answered","\\Flagged","\\Deleted","\\Draft"]),ij=de(["$Forwarded","$MDNSent","$Junk","$NotJunk","$Phishing"]),qAe=de(["\\NonExistent","\\Noinferiors","\\Noselect","\\HasChildren","\\HasNoChildren","\\Marked","\\Unmarked","\\Subscribed","\\Remote"]),VAe=de(["s3","filesystem","inline","database"]),WAe=de(["none","gzip","zstd"]);de(["none","blocked","neverSpam"]);de(["Theme","Density","DefaultComposerFormat","PinnedFolders","AccountSignaturePlainText","AccountSignatureHtml","AccountDisplayName","AccountMuted","AccountComposeLanguages","MailboxDisplayName","MailboxMuted","FolderRoleAppointment","FolderRoleAppointmentLabel","MailboxRole","DefaultInvitationSenderAccountId","ClassificationPresetId","ClassificationModel","ClassificationBaseUrl","ClassificationApiKey","ClassificationEnabled","ClassificationDailyLimit","ClassificationUsage","SpamPlacementSpam","SpamPlacementPhishing"]);const GAe=de(["Pending","Complete"]),KAe=de(["FolderRole","MailboxOverride","FilterAction"]);de(["Corresponds","Lookalike","ForeignAddress","Unrelated","NoClaim"]);de(["Retrying","GaveUp"]);const ZAe=de(["Spam","Clean","Absent"]),YAe=de(["pending","queued","processing","processed"]),QAe=de(["add","remove"]),XAe=de(["pending","queued","processing","processed"]);U({type:he("apiKey"),in:he("header"),name:he("Authorization")});const gL=U({code:E(),message:E(),details:Yt(E(),E()).optional()}),JAe=U({path:E(),rule:E(),message:E()});U({statusCode:he(400),code:E(),message:E(),details:Yt(E(),E()).optional(),errors:ue(JAe).optional()});U({statusCode:he(401),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(404),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(409),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(422),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(403),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(204)});U({statusCode:he(409),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(409),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(422),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(412),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(404),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(409),code:E(),message:E(),details:Yt(E(),E()).optional()});U({statusCode:he(409),code:E(),message:E(),details:Yt(E(),E()).optional()});U({type:he("aws_proxy"),httpMethod:he("POST"),passthroughBehavior:he("when_no_match"),uri:U({"Fn::Sub":he("arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:{{HandlerFunctionName}}/invocations")})});U({statusCode:he(500),code:E(),message:E(),details:Yt(E(),E()).optional()});U({confirmEmail:E()});U({statusCode:he(202),message:E()});const eTe=U({addressId:E().min(25).max(25),displayName:E().optional(),normalizedEmail:E(),inboundCount:N(),outboundCount:N(),replyCount:N(),lastReplyAt:N().optional(),lastInboundAt:N().optional()});U({suggestions:ue(eTe)});U({statusCode:he(202),exportId:E()});U({accountExportRequestId:E().min(25).max(25),accountConfigId:E().min(25).max(25),userId:E(),state:P$,createdAt:N(),updatedAt:N(),expiresAt:N().optional(),objectKey:E().optional(),downloadUrl:E().optional(),errorMessage:E().optional()});U({accountExportRequestId:E().min(25).max(25),accountConfigId:E().min(25).max(25),userId:E(),state:P$,createdAt:N(),updatedAt:N(),expiresAt:N().optional(),objectKey:E().optional(),downloadUrl:E().optional(),errorMessage:E().optional()});const lj=U({depth:N(),contentType:E().max(140)}),tTe=U({quarantineId:E().min(25).max(25),accountConfigId:E().min(25).max(25),accountId:E().min(25).max(25),mailboxId:E().min(25).max(25),uidValidity:N(),uid:N(),mailboxRole:UI.optional(),mailboxPath:E().max(512),quarantinedAt:N(),attempts:N(),failureStage:k$,failureCode:D$,failureMessage:E().max(512),failurePartPath:E().max(140).optional(),workerVersion:E().max(64),contentType:E().max(140).optional(),transferEncoding:E().max(64).optional(),charset:E().max(64).optional(),sizeBytes:N().optional(),structure:ue(lj),messageIdHash:E().max(140).optional(),createdAt:N(),updatedAt:N()}),nTe=U({syncWarningId:E().min(25).max(25),accountConfigId:E().min(25).max(25),accountId:E().min(25).max(25),mailboxId:E().min(25).max(25),uidValidity:N(),uid:N(),stage:L$,attempts:N(),createdAt:N()});U({entries:ue(tTe),warnings:ue(nTe),warningsTotal:N()});U({quarantineId:E().min(25).max(25),accountConfigId:E().min(25).max(25),accountId:E().min(25).max(25),mailboxId:E().min(25).max(25),uidValidity:N(),uid:N(),mailboxRole:UI.optional(),mailboxPath:E().max(512),quarantinedAt:N(),attempts:N(),failureStage:k$,failureCode:D$,failureMessage:E().max(512),failurePartPath:E().max(140).optional(),workerVersion:E().max(64),contentType:E().max(140).optional(),transferEncoding:E().max(64).optional(),charset:E().max(64).optional(),sizeBytes:N().optional(),structure:ue(lj),messageIdHash:E().max(140).optional(),createdAt:N(),updatedAt:N()});U({syncWarningId:E().min(25).max(25),accountConfigId:E().min(25).max(25),accountId:E().min(25).max(25),mailboxId:E().min(25).max(25),uidValidity:N(),uid:N(),stage:L$,attempts:N(),createdAt:N()});const rTe=U({accountConfigId:E().min(25).max(25),userId:E().min(25).max(25),name:E().optional(),state:U$,deletedAt:N().optional(),cascadeStartedAt:N().optional(),createdAt:N(),updatedAt:N()}),pl=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),oTe=U({role:UI,source:hAe,mailboxId:E().min(25).max(25).optional(),staleAppointmentMailboxId:E().min(25).max(25).optional(),staleAppointmentPath:E().max(512).optional()}),aTe=U({accountId:E().min(25).max(25),accountConfigId:E().min(25).max(25),username:E().min(1),email:E(),authType:FI,syncedServices:ue(ah),grantedScopes:ue(E()),imapHost:E().min(1),imapPort:N().min(1).max(65535),imapTls:le(),imapStartTls:le(),smtpEnabled:le(),smtpHost:E(),smtpPort:N().min(1).max(65535),smtpTls:le(),smtpStartTls:le(),smtpUsername:E(),isActive:le(),connectionState:F$,lastConnectedAt:N().optional(),lastSyncAt:N().optional(),lastError:E().optional(),syncPhase:zI.optional(),mailboxCountTotal:N().min(0).optional(),mailboxCountSynced:N().min(0).optional(),createdAt:N(),updatedAt:N(),displayName:E().optional(),muted:pl.optional(),signaturePlainText:E().optional(),signatureHtml:E().optional(),composeLanguages:ue(E()).optional(),folderAppointments:ue(oTe)}),sTe=U({importId:E().min(25).max(25),folderPaths:ue(E())});U({accountConfig:rTe,accounts:ue(aTe),buildCommit:E(),pendingImport:sTe.optional()});U({accountConfigId:E().min(25).max(25),userId:E().min(25).max(25),name:E().optional(),state:U$,deletedAt:N().optional(),cascadeStartedAt:N().optional(),createdAt:N(),updatedAt:N()});U({accountId:E().min(25).max(25),accountConfigId:E().min(25).max(25),username:E().min(1),email:E(),authType:FI,syncedServices:ue(ah),grantedScopes:ue(E()),passwordHash:E().optional(),oauthRefreshTokenHash:E().optional(),oauthTokenUpdatedAt:N().optional(),imapHost:E().min(1),imapPort:N().min(1).max(65535),imapTls:le(),imapStartTls:le(),smtpEnabled:le(),smtpHost:E(),smtpPort:N().min(1).max(65535),smtpTls:le(),smtpStartTls:le(),smtpUsername:E(),smtpPasswordHash:E().optional(),isActive:le(),connectionState:F$,lastConnectedAt:N().optional(),lastSyncAt:N().optional(),lastError:E().optional(),syncPhase:zI.optional(),mailboxCountTotal:N().min(0).optional(),mailboxCountSynced:N().min(0).optional(),createdAt:N(),updatedAt:N(),deletedAt:N().optional()});U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional()});U({schemaVersion:N(),document:Yt(E(),Ji())});U({mode:pAe.optional(),onExisting:mAe.optional(),document:Yt(E(),Ji())});const iTe=U({section:E(),key:E(),verdict:E(),reason:E().optional()});U({importId:E().min(25).max(25).optional(),valid:le(),schemaVersion:N(),applied:le(),items:ue(iTe),errors:ue(gL),warnings:ue(gL),accountsNeedingCredentials:ue(E().min(25).max(25))});U({statusCode:he(409),code:E(),message:E(),details:Yt(E(),E()).optional()});const lTe=U({status:gAe,lastCheckedAt:E().optional(),latestVersion:E().optional(),publishedAt:E().optional(),summary:E().optional(),releaseNotesUrl:E().optional(),updateAvailable:le().optional(),schemaVersion:N().optional(),error:E().optional()}),cTe=U({runId:E(),fromVersion:E(),targetVersion:E(),phase:vAe,outcome:Ke([yAe,qn()]),startedAt:E(),updatedAt:E(),message:E(),logCommand:E()});U({currentVersion:E(),currentSchemaVersion:N().optional(),check:lTe,run:Ke([cTe,qn()])});U({targetVersion:E()});const cj=U({userId:E(),email:E(),createdAt:N(),lastSignInAt:N(),sessionCount:N(),status:z$,isCaller:le()});U({people:ue(cj)});U({statusCode:he(403),message:E(),details:Yt(E(),E()).optional(),code:Ke([he("sign_in_disabled"),he("caller_disabled"),he("foreign_origin"),he("step_up_required"),he("wrong_password")])});U({password:E(),action:bAe,userId:E()});U({stepUpToken:E(),expiresAt:N()});U({statusCode:he(429),message:E(),details:Yt(E(),E()).optional(),code:he("step_up_locked")});U({stepUpToken:E()});U({status:z$,stepUpToken:E()});U({statusCode:he(409),message:E(),details:Yt(E(),E()).optional(),code:he("cannot_disable_self")});U({stepUpToken:E()});U({person:cj,resetUrl:E(),expiresAt:N()});U({mailboxId:E().min(25).max(25),accountId:E().min(25).max(25),namespaceType:$I,namespacePrefix:E(),hierarchyDelimiter:E().min(1).max(1),fullPath:E().min(1).max(512),uidValidity:N().min(1),uidNext:N().min(1),highestModseq:E().max(32),messageCount:N().min(0),unseenCount:N().min(0),deletedCount:N().min(0),totalSize:N().min(0),lastSyncUid:N(),highWaterMarkUid:N(),lastMessageSyncAt:N(),initialSyncCompletedAt:N().optional(),parentMailboxId:E(),syncStatus:$$,pendingPath:E().max(512).optional(),syncFailureReason:E(),statusRefused:le(),cursorState:SAe,specialUse:ue(jI).optional(),createdAt:N(),updatedAt:N()});const uTe=U({mailboxId:E().min(25).max(25),accountId:E().min(25).max(25),namespaceType:$I,namespacePrefix:E(),hierarchyDelimiter:E().min(1).max(1),fullPath:E().min(1).max(512),messageCount:N().min(0),unseenCount:N().min(0),deletedCount:N().min(0),lastSyncUid:N(),highWaterMarkUid:N(),lastMessageSyncAt:N(),syncStatus:$$,pendingPath:E().max(512).optional(),syncFailureReason:E(),statusRefused:le(),specialUse:ue(jI).optional(),createdAt:N(),updatedAt:N(),muted:pl.optional(),displayNameOverride:E().max(256).optional()});U({continuationToken:E().max(800).optional(),items:ue(uTe)});U({namespaceType:$I,fullPath:E().min(1).max(512)});U({fullPath:E().max(512).optional(),muted:Ke([pl,qn()]).optional(),displayNameOverride:Ke([E(),qn()]).optional()});U({mailboxId:Ke([E(),qn()])});const Ys=U({field:CAe,value:E().max(256)}),uj=U({version:he(0)}),vy=U({test:he("header"),match:j$,header:EAe,key:E().max(256)}),yy=U({test:he("address"),match:j$,part:wAe,key:E().max(256)}),by=U({test:he("hasWords"),words:ue(E().max(256))}),Sy=U({test:he("classification"),label:uy}),Cy=U({test:he("allof"),tests:ue(Ke([Lc(()=>Cy),Lc(()=>Ey),Lc(()=>wy),vy,yy,by,Sy])).min(1).max(50)}),Ey=U({test:he("anyof"),tests:ue(Ke([Cy,Lc(()=>Ey),Lc(()=>wy),vy,yy,by,Sy])).min(1).max(50)}),wy=U({test:he("not"),operand:Ke([Cy,Ey,Lc(()=>wy),vy,yy,by,Sy])}),bu=U({version:he(1),test:Ke([Cy,Ey,wy,vy,yy,by,Sy])});U({filterId:E().min(25).max(25),accountConfigId:E().min(25).max(25),name:E().max(256),scope:sh,expiresAt:E().optional(),ttl:N().optional(),state:cy,disabledReason:BI,ruleChangedAt:N(),actionChangedAt:N(),matchOperator:Zs,literalClauses:ue(Ys),rule:Ke([uj,bu]),priority:N(),stop:le(),actionLabelId:E(),actionMailboxId:E(),createdAt:N(),updatedAt:N()});U({filterId:E().min(25).max(25),accountConfigId:E().min(25).max(25),name:E().max(256),scope:sh,expiresAt:E().optional(),state:cy,disabledReason:BI,ruleChangedAt:N(),actionChangedAt:N(),matchOperator:Zs,literalClauses:ue(Ys),priority:N(),stop:le(),actionLabelId:E(),actionMailboxId:E(),createdAt:N(),updatedAt:N(),rule:bu});U({name:E().max(256),scope:sh,expiresAt:E().optional(),matchOperator:Zs,actionLabelId:E(),actionMailboxId:E(),priority:N().optional(),stop:le().optional(),literalClauses:ue(Ys).optional(),rule:bu.optional()});U({filterId:E().min(25).max(25),accountConfigId:E().min(25).max(25),name:E().max(256),scope:sh,expiresAt:E().optional(),state:cy,disabledReason:BI,ruleChangedAt:N(),actionChangedAt:N(),matchOperator:Zs,literalClauses:ue(Ys),priority:N(),stop:le(),actionLabelId:E(),actionMailboxId:E(),createdAt:N(),updatedAt:N(),rule:bu,organizeJobId:E()});U({name:E().max(256).optional(),scope:sh.optional(),expiresAt:E().optional(),state:cy.optional(),matchOperator:Zs.optional(),literalClauses:ue(Ys).optional(),priority:N().optional(),stop:le().optional(),actionLabelId:E().optional(),actionMailboxId:E().optional(),rule:bu.optional()});U({labelId:E().min(25).max(25),accountConfigId:E().min(25).max(25),name:E().max(140),normalizedName:E().max(140),color:ih,createdAt:N(),updatedAt:N()});const dTe=U({accountId:E().min(25).max(25),state:Ke([he("Present"),he("Pending")]),mailboxId:E().min(25).max(25),fullPath:E().max(512)}),fTe=U({accountId:E().min(25).max(25),state:he("Missing")});U({labelId:E().min(25).max(25),accountConfigId:E().min(25).max(25),name:E().max(140),color:ih,createdAt:N(),updatedAt:N(),filterCount:N(),folders:ue(Ke([dTe,fTe]))});U({name:E().max(140),color:ih});U({name:E().max(140),color:ih});U({startPosition:E().optional(),filterId:E().min(25).max(25).optional(),matchOperator:Zs,literalClauses:ue(Ys),actionLabelId:E(),actionMailboxId:E()});U({statusCode:he(202),organizeJobId:E(),state:HI});U({matchedCount:N(),messageIds:ue(E())});U({organizeJobId:E().min(25).max(25),accountConfigId:E().min(25).max(25),userId:E(),state:HI,filterId:E(),matchOperator:Zs,literalClauses:ue(Ys),rule:Ke([uj,bu]),actionLabelId:E(),actionMailboxId:E(),sourceMailboxId:E(),sentAfter:E(),sentBefore:E(),matchedCount:N(),appliedCount:N(),startPosition:E(),nextPosition:E(),remainingCount:N(),failedCount:N(),errorMessage:E(),ttl:N(),createdAt:N(),updatedAt:N()});U({organizeJobId:E().min(25).max(25),accountConfigId:E().min(25).max(25),userId:E(),state:HI,filterId:E(),matchOperator:Zs,literalClauses:ue(Ys),actionLabelId:E(),actionMailboxId:E(),matchedCount:N(),appliedCount:N(),nextPosition:E(),remainingCount:N(),failedCount:N(),errorMessage:E(),createdAt:N(),updatedAt:N()});const hTe=U({calendarId:E().min(25).max(25),accountConfigId:E().min(25).max(25),urlSegment:E().max(64),displayName:E().max(140),color:dy,componentSet:B$,source:H$,timezone:E().max(64),syncSequence:N(),subscriptionUrl:E().max(2048),subscriptionEnabled:le(),subscriptionCheckedAt:N(),subscriptionFetchedAt:N(),subscriptionError:E().max(512),createdAt:N(),updatedAt:N()});U({items:ue(hTe)});U({calendarId:E().min(25).max(25),accountConfigId:E().min(25).max(25),urlSegment:E().max(64),displayName:E().max(140),color:dy,componentSet:B$,source:H$,timezone:E().max(64),syncSequence:N(),subscriptionUrl:E().max(2048),subscriptionEnabled:le(),subscriptionCheckedAt:N(),subscriptionFetchedAt:N(),subscriptionError:E().max(512),createdAt:N(),updatedAt:N()});U({displayName:E().max(140),urlSegment:E().max(64),color:dy.optional(),timezone:E().max(64).optional(),subscriptionUrl:E().max(2048).optional()});U({displayName:E().max(140),color:dy,timezone:E().max(64),subscriptionEnabled:le()});U({statusCode:he(204)});U({calendarId:E().min(25).max(25),createdAt:N(),rotatedAt:N()});U({calendarId:E().min(25).max(25),feedToken:E().max(512),createdAt:N(),rotatedAt:N()});U({contentType:he("text/calendar; charset=utf-8"),etag:E(),lastModified:E(),icalData:E()});U({statusCode:he(304),etag:E(),lastModified:E()});U({statusCode:he(404),contentType:he("text/plain; charset=utf-8"),message:E()});const pTe=U({calendarId:E().min(25).max(25),calendarObjectId:E().min(25).max(25),recurrenceId:E().max(64),icalUid:E().max(512),summary:E().max(512),start:E().max(64),end:E().max(64),allDay:le(),status:vu,transparency:yu,zoneCertainty:lh,etag:E().max(64),hasRecurrence:le(),participation:q$});U({items:ue(pTe)});const dj=U({email:E().max(512),displayName:E().max(512)});U({calendarId:E().min(25).max(25),summary:E().max(512),description:E().max(2048).optional(),location:E().max(512).optional(),start:E().max(64),end:E().max(64),allDay:le().optional(),timeZone:E().max(64).optional(),status:vu.optional(),transparency:yu.optional(),recurrenceRule:E().max(512).optional(),attendees:ue(dj).optional(),organizerAccountId:E().min(25).max(25).optional()});U({calendarObjectId:E().min(25).max(25),calendarId:E().min(25).max(25),resourceName:E().max(256),icalUid:E().max(512),icalData:E(),etag:E().max(64),sequence:N(),syncSequence:N(),summary:E().max(512),dtStart:E().max(64),dtEnd:E().max(64),allDay:le(),zoneCertainty:lh,status:vu,transparency:yu,hasRecurrence:le(),expandedThrough:E().max(64),createdAt:N(),updatedAt:N()});const mTe=U({email:E().max(512),displayName:E().max(512),role:xAe,status:_Ae}),gTe=U({accepted:N(),declined:N(),tentative:N(),needsAction:N()}),fj=U({email:E().max(512),outboxMessageId:E().min(25).max(25),method:fy,status:qI});U({calendarObjectId:E().min(25).max(25),calendarId:E().min(25).max(25),resourceName:E().max(256),icalUid:E().max(512),icalData:E(),etag:E().max(64),sequence:N(),syncSequence:N(),summary:E().max(512),dtStart:E().max(64),dtEnd:E().max(64),allDay:le(),zoneCertainty:lh,status:vu,transparency:yu,hasRecurrence:le(),expandedThrough:E().max(64),createdAt:N(),updatedAt:N(),participation:q$,organizer:E().max(512),attendees:ue(mTe),attendeeCounts:gTe,sends:ue(fj)});const vTe=U({summary:E().max(512).optional(),description:E().max(2048).optional(),location:E().max(512).optional(),start:E().max(64).optional(),end:E().max(64).optional(),allDay:le().optional(),timeZone:E().max(64).optional(),status:vu.optional(),transparency:yu.optional(),recurrenceRule:E().max(512).optional(),attendees:ue(dj).optional(),organizerAccountId:E().min(25).max(25).optional(),answer:V$.optional()});U({statusCode:he(200),sends:ue(fj)});const yTe=U({start:E().max(64),end:E().max(64)});U({items:ue(yTe)});const bTe=U({state:he("Priced"),currency:he("USD"),perMillionInputTokens:N()}),hj=U({state:he("NoPrice")}),STe=U({presetId:ch,label:E(),group:IAe,adapterShape:AAe,defaultBaseUrl:E().optional(),defaultModel:E(),needsKey:le(),price:Ke([bTe,hj])}),CTe=U({state:he("NotConfigured")}),ETe=U({presetId:cc,model:cc,baseUrl:cc,apiKey:cc,enabled:cc,dailyLimit:cc}),wTe=U({state:he("Priced"),currency:he("USD"),amount:N()}),xTe=U({accountId:E().min(25).max(25),calls:N(),dailyLimit:N(),resetsAt:E().datetime(),cost:Ke([wTe,hj])}),_Te=U({state:he("Configured"),presetId:ch,model:E(),baseUrl:E(),enabled:le(),dailyLimit:N(),sources:ETe,usage:ue(xTe)}),ITe=U({state:he("Unrunnable"),presetId:ch,reason:TAe}),pj=U({state:he("Unset")}),VI=U({state:he("Set"),cleanBelow:N().min(0).max(1),spamAt:N().min(0).max(1)}),ATe=U({thresholds:Ke([pj,VI]),spamPlacement:Uf,phishingPlacement:Uf});U({defaultInvitationSenderAccountId:E().min(25).max(25).optional(),defaultInvitationSenderChosen:le(),classificationPresets:ue(STe),classification:Ke([CTe,_Te,ITe]),spam:ATe});U({defaultInvitationSenderAccountId:E().min(25).max(25).optional(),classificationPresetId:ch.optional(),classificationModel:E().optional(),classificationBaseUrl:E().optional(),classificationApiKey:E().optional(),classificationEnabled:le().optional(),classificationDailyLimit:N().min(1).optional(),spamPlacementSpam:Uf.optional(),spamPlacementPhishing:Uf.optional()});U({presetId:ch,model:E(),baseUrl:E(),apiKey:E()});U({state:he("Passed"),latencyMs:N(),label:uy,confidence:N()});U({state:he("Failed"),latencyMs:N(),status:N().optional(),kind:RAe,field:OAe.optional(),fix:E()});const TTe=U({category:hl,count:N()}),RTe=U({label:uy,count:N()}),OTe=U({spamReportedNotJunk:N(),categoryOverridden:N()}),MTe=U({date:E(),action:W$,kind:G$,count:N()}),NTe=U({from:N().min(0).max(1),count:N()});U({since:E(),examined:N(),byCategory:ue(TTe),byLabel:ue(RTe),corrections:OTe,spamByDay:ue(MTe),spamScoreBands:ue(NTe)});const PTe=U({calendarTaskId:E().min(25).max(25),calendarId:E().min(25).max(25),resourceName:E().max(256),icalUid:E().max(512),icalData:E(),etag:E().max(64),summary:E().max(512),description:E().max(2048),due:E().max(64),dueAt:E().max(64),allDay:le(),completed:le(),createdAt:N(),updatedAt:N()});U({items:ue(PTe)});U({calendarTaskId:E().min(25).max(25),calendarId:E().min(25).max(25),resourceName:E().max(256),icalUid:E().max(512),icalData:E(),etag:E().max(64),summary:E().max(512),description:E().max(2048),due:E().max(64),dueAt:E().max(64),allDay:le(),completed:le(),createdAt:N(),updatedAt:N()});U({calendarId:E().min(25).max(25).optional(),summary:E().max(512),description:E().max(2048).optional(),due:E().max(64),allDay:le().optional(),timeZone:E().max(64).optional()});U({summary:E().max(512).optional(),description:E().max(2048).optional(),due:E().max(64).optional(),allDay:le().optional(),timeZone:E().max(64).optional(),completed:le().optional()});U({deletedCount:N()});U({triggered:le(),message:E()});const kTe=U({mailboxId:E().min(25).max(25),fullPath:E(),phase:E(),messagesTotal:N(),messagesSynced:N(),highWaterMarkUid:N(),lastSyncedAt:N().optional()});U({accountId:E().min(25).max(25),syncPhase:zI.optional(),mailboxCountTotal:N().optional(),mailboxCountSynced:N().optional(),lastSyncAt:N().optional(),mailboxes:ue(kTe)});U({email:E().min(1),displayName:E().optional(),username:E().optional(),authType:FI.optional(),syncedServices:ue(ah).optional(),password:E().optional(),imapHost:E().min(1),imapPort:N().min(1).max(65535),imapTls:le(),imapStartTls:le(),smtpEnabled:le().optional(),smtpHost:E().optional(),smtpPort:N().min(1).max(65535).optional(),smtpTls:le().optional(),smtpStartTls:le().optional(),smtpUsername:E().optional(),smtpPassword:E().optional()});U({accountId:E().min(25).max(25).optional(),username:E().min(1),password:E().optional(),imapHost:E().min(1),imapPort:N().min(1).max(65535),imapTls:le(),imapStartTls:le(),smtpHost:E().optional(),smtpPort:N().min(1).max(65535).optional(),smtpTls:le().optional(),smtpStartTls:le().optional(),smtpUsername:E().optional(),smtpPassword:E().optional()});U({imapSuccess:le(),imapError:E().optional(),smtpSuccess:le().optional(),smtpError:E().optional()});U({displayName:E().optional(),password:E().optional(),imapHost:E().optional(),imapPort:N().min(1).max(65535).optional(),imapTls:le().optional(),imapStartTls:le().optional(),smtpEnabled:le().optional(),smtpHost:E().optional(),smtpPort:N().min(1).max(65535).optional(),smtpTls:le().optional(),smtpStartTls:le().optional(),smtpUsername:E().optional(),smtpPassword:E().optional(),isActive:le().optional(),syncedServices:ue(ah).optional(),signaturePlainText:E().optional(),signatureHtml:E().optional(),composeLanguages:ue(E()).optional(),muted:Ke([pl,qn()]).optional()});U({accountId:E().min(25).max(25),deletedAt:N(),message:E()});U({threadMessageId:E().min(25).max(25),threadId:E().min(25).max(25),messageId:E().min(25).max(25),accountConfigId:E().min(25).max(25),mailboxId:E().min(25).max(25),uid:N().min(1),messageIdHeader:E().optional(),inReplyTo:E().optional(),referenceOrder:N().min(0),fromEmail:E().optional(),fromName:E().optional(),subject:E().optional(),listId:E().max(256).optional(),internalDate:N(),sentDate:N(),isRead:le(),hasAttachment:le(),star:hy,hasStars:le(),isDeleted:le(),snippet:E().max(256).optional(),category:hl,createdAt:N(),updatedAt:N()});const xy=U({fromDomain:E(),dkimDomain:E().optional(),dkimMismatch:le(),signerDomain:E().optional(),envelopeDomain:E().optional(),signerMessageCount:N().optional(),signerFirstSeenAt:N().optional()}),mj=U({action:Z$.optional(),fromPlacement:Y$.optional(),fromMailboxId:E().min(25).max(25).optional(),destinationMailboxId:E().min(25).max(25).optional(),filterId:E().min(25).max(25).optional()}),gj=U({labelId:E().min(25).max(25),name:E().max(140),color:ih}),_y=U({reportedAt:N()}),WI=U({action:Z$,confidence:MAe,fromPlacement:Y$,reasons:ue(NAe),dryRun:le(),decidedAt:N()}),uh=U({state:he("NotChecked")}),DTe=U({rule:PAe}),LTe=U({rule:he("Filter"),filterId:E().min(25).max(25)}),dh=U({state:he("ScreenedOut"),screen:Ke([DTe,LTe])}),UTe=U({name:kAe,symbol:E(),score:N(),options:ue(E())}),fh=U({state:he("Checked"),score:N().min(0).max(1),action:W$,kind:G$,reasons:ue(UTe),modelOutcome:DAe,decidedBy:LAe}),hh=U({state:he("Failed"),kind:UAe}),vj=U({threadMessageId:E().min(25).max(25),threadId:E().min(25).max(25),messageId:E().min(25).max(25),accountConfigId:E().min(25).max(25),mailboxId:E().min(25).max(25),fromEmail:E().optional(),fromName:E().optional(),subject:E().optional(),sentDate:N(),isRead:le(),hasAttachment:le(),star:hy,hasStars:le(),isDeleted:le(),snippet:E().max(256).optional(),createdAt:N(),updatedAt:N(),category:hl,senderTrust:K$,muted:le(),authenticity:xy.optional(),status:py,syncStatus:my,abandonedMutation:gy,accountId:E().min(25).max(25),autoMoved:mj.optional(),labels:ue(gj).optional(),spamReport:_y.optional(),placementVerdict:WI.optional(),spamVerdict:Ke([uh,dh,fh,hh]),spamCleared:le()});U({continuationToken:E().max(800).optional(),items:ue(vj)});U({items:ue(vj).optional(),continuationToken:E().max(800).optional(),count:N().optional()});U({accountId:E().min(25).max(25),toAddresses:ue(E()).min(1),ccAddresses:ue(E()).optional(),bccAddresses:ue(E()).optional(),subject:E().optional(),textBody:E().optional(),htmlBody:E().optional(),inReplyTo:E().optional(),references:ue(E()).optional(),sendImmediately:le().optional()});U({outboxMessageId:E().min(25).max(25),accountId:E().min(25).max(25),accountConfigId:E().min(25).max(25),fromAddress:E(),fromName:E().optional(),toAddresses:ue(E()),ccAddresses:ue(E()),bccAddresses:ue(E()),replyToAddress:E().optional(),subject:E().optional(),messageIdValue:E(),inReplyTo:E().optional(),references:ue(E()),textBody:E().optional(),htmlBody:E().optional(),status:qI,lastError:E().optional(),lastSmtpCode:N().optional(),sentAt:N().optional(),smtpMessageId:E().optional(),appendedUid:N(),createdAt:N(),updatedAt:N()});const FTe=U({outboxAttachmentId:E().min(25).max(25),outboxMessageId:E().min(25).max(25),filename:E().max(256),contentType:E().max(256),sizeBytes:N().min(0),state:Q$,contentId:E().max(256),contentUrl:E().url()}),zTe=U({outboxMessageId:E().min(25).max(25),accountId:E().min(25).max(25),fromAddress:E(),fromName:E().optional(),toAddresses:ue(E()),ccAddresses:ue(E()),bccAddresses:ue(E()),subject:E().optional(),inReplyTo:E().optional(),references:ue(E()),textBody:E().optional(),htmlBody:E().optional(),status:qI,lastError:E().optional(),sentAt:N().optional(),createdAt:N(),updatedAt:N(),attachments:ue(FTe)});U({outboxAttachmentId:E().min(25).max(25),outboxMessageId:E().min(25).max(25),accountId:E().min(25).max(25),accountConfigId:E().min(25).max(25),filename:E().max(256),contentType:E().max(256),sizeBytes:N().min(0),state:Q$,storageKey:E().max(2048),reservationExpiresAt:N().min(0),createdAt:N(),updatedAt:N()});U({continuationToken:E().max(800).optional(),items:ue(zTe)});U({attachmentIds:ue(E().min(25).max(25)).optional(),toAddresses:ue(E()).optional(),ccAddresses:ue(E()).optional(),bccAddresses:ue(E()).optional(),subject:E().optional(),textBody:E().optional(),htmlBody:E().optional(),inReplyTo:E().optional(),references:ue(E()).optional()});U({filename:E().max(256),contentType:E().max(256),sizeBytes:N().min(1)});U({outboxAttachmentId:E().min(25).max(25),outboxMessageId:E().min(25).max(25),filename:E().max(256),contentType:E().max(256),sizeBytes:N().min(1),contentId:E().max(256),uploadUrl:E().max(2048),uploadExpiresAt:N()});U({code:E(),reason:X$,message:E().max(512),limitBytes:N().min(0),usedBytes:N().min(0)});U({statusCode:Ke([he(400),he(413)]),code:E(),reason:X$,message:E().max(512),limitBytes:N().min(0),usedBytes:N().min(0)});const yj=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),bj=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),Sj=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),Cj=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),Ej=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),wj=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),xj=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:hl}),_j=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),Ij=U({setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional(),value:le()}),GI=U({trusted:yj.optional(),blocked:bj.optional(),neverSpam:Sj.optional(),muted:pl.optional(),vip:Cj.optional(),wellknown:Ej.optional(),junkOnly:wj.optional(),category:xj.optional(),autoArchive:_j.optional(),unsubscribed:Ij.optional()});U({addressId:E().min(25).max(25),accountConfigId:E().min(25).max(25),displayName:E().optional(),localPart:E().min(1),domain:E().min(1),normalizedEmail:E(),normalizedCompound:E(),flags:GI,inboundCount:N(),outboundCount:N(),replyCount:N(),lastInboundAt:N(),lastOutboundAt:N().optional(),lastReplyAt:N(),createdAt:N(),updatedAt:N()});U({addressId:E().min(25).max(25),accountConfigId:E().min(25).max(25),displayName:E().optional(),localPart:E().min(1),domain:E().min(1),normalizedEmail:E(),flags:GI,inboundCount:N(),outboundCount:N(),replyCount:N(),lastInboundAt:N(),lastReplyAt:N(),createdAt:N(),updatedAt:N()});const $Te=U({trusted:Ke([yj,qn()]).optional(),blocked:Ke([bj,qn()]).optional(),neverSpam:Ke([Sj,qn()]).optional(),muted:Ke([pl,qn()]).optional(),vip:Ke([Cj,qn()]).optional(),wellknown:Ke([Ej,qn()]).optional(),junkOnly:Ke([wj,qn()]).optional(),category:Ke([xj,qn()]).optional(),autoArchive:Ke([_j,qn()]).optional(),unsubscribed:Ke([Ij,qn()]).optional()});U({flags:$Te.optional(),clearFlags:ue(FAe).optional()});const jTe=U({messageId:E().min(25).max(25),mailboxId:E().min(25).max(25),uid:N().min(1),rfc822Size:N().min(0),internalDate:N(),status:py,syncStatus:my,abandonedMutation:gy,authenticity:xy.optional(),spamVerdict:Ke([uh,dh,fh,hh]),spamCleared:le(),messageIdHeader:E().optional(),autoMoved:mj.optional(),labels:ue(gj).optional(),spamReport:_y.optional()}),Dd=U({addressId:E().min(25).max(25),displayName:E().optional(),normalizedEmail:E(),addressRole:ej,addressOrder:N(),flags:GI.optional()}),BTe=U({messageId:E().min(25).max(25),date:N(),subject:E().optional(),messageIdValue:E().optional(),from:ue(Dd),to:ue(Dd),cc:ue(Dd),bcc:ue(Dd),replyTo:ue(Dd),category:hl,senderTrust:K$}),HTe=U({bodyPartId:E().min(25).max(25),partPath:E().min(1),mediaType:tj,mediaSubtype:E().min(1),contentId:E().optional(),sizeOctets:N().min(0),disposition:nj.optional(),dispositionFilename:E().optional(),isMultipart:le(),contentUrl:E().url()}),qTe=U({messageIdValue:E(),referenceType:rj,referenceOrder:N().min(0)});U({message:jTe,envelope:BTe,flags:ue(E()),bodyParts:ue(HTe),references:ue(qTe)});const Aj=U({dmarc:Uc.optional(),spf:Uc.optional(),dkim:Uc.optional()}),Tj=U({classified:le(),score:E().optional(),source:E().optional()}),Rj=U({filterId:E().min(25).max(25),sourceMailboxId:E().min(25).max(25),destinationMailboxId:E().min(25).max(25),decidedAt:N()}),KI=U({label:uy,confidence:N().min(0).max(1),confident:le()});U({messageId:E().min(25).max(25),mailboxId:E().min(25).max(25),uid:N().min(1),sequenceNumber:N().min(1),rfc822Size:N().min(0),internalDate:N(),envelopeId:E().min(25).max(25),rootBodyPartId:E().min(25).max(25),bodyStorageKey:E().optional(),status:py,syncStatus:my,abandonedMutation:gy,originalMailboxId:E().min(25).max(25).optional(),originalUid:N().optional(),category:hl,classificationState:J$,authenticity:xy.optional(),authResult:Aj.optional(),providerSpam:Tj.optional(),hasListUnsubscribe:le(),movedByRemit:le(),placementVerdict:WI.optional(),filterMove:Rj.optional(),placementDecidedAt:N().optional(),classifierScores:ue(KI),spamReport:_y.optional(),spamVerdict:Ke([uh,dh,fh,hh]),spamCleared:le(),createdAt:N(),updatedAt:N()});U({messageId:E().min(25).max(25),mailboxId:E().min(25).max(25),uid:N().min(1),sequenceNumber:N().min(1),rfc822Size:N().min(0),internalDate:N(),envelopeId:E().min(25).max(25),rootBodyPartId:E().min(25).max(25),bodyStorageKey:E().optional(),status:py,syncStatus:my,abandonedMutation:gy,originalMailboxId:E().min(25).max(25).optional(),originalUid:N().optional(),category:hl,classificationState:J$,authenticity:xy.optional(),authResult:Aj.optional(),providerSpam:Tj.optional(),hasListUnsubscribe:le(),movedByRemit:le(),placementVerdict:WI.optional(),filterMove:Rj.optional(),placementDecidedAt:N().optional(),classifierScores:ue(KI),spamReport:_y.optional(),spamVerdict:Ke([uh,dh,fh,hh]),spamCleared:le(),createdAt:N(),updatedAt:N(),messageIdHeader:E().optional()});U({bodyPartId:E().min(25).max(25),messageId:E().min(25).max(25),parentBodyPartId:E().min(25).max(25).optional(),partPath:E().min(1),mediaType:tj,mediaSubtype:E().min(1),contentId:E().optional(),contentDescription:E().optional(),transferEncoding:zAe,sizeOctets:N().min(0),lineCount:N().optional(),md5Hash:E().optional(),disposition:nj.optional(),dispositionFilename:E().optional(),language:E().optional(),location:E().optional(),isMultipart:le(),multipartSubtype:$Ae.optional(),createdAt:N(),updatedAt:N()});U({messageReferenceId:E().min(25).max(25),messageId:E().min(25).max(25),envelopeId:E().min(25).max(25),messageIdValue:E(),referenceType:rj,referenceOrder:N().min(0),createdAt:N(),updatedAt:N()});U({raw:E()});U({isRead:le().optional(),isStarred:le().optional(),starColor:hy.optional()});U({messageIds:ue(E().min(25).max(25)).min(1).max(10),move:le().optional()});const VTe=U({messageId:E().min(25).max(25),verdict:Ke([uh,dh,fh,hh]),labels:ue(E())}),WTe=U({messageId:E().min(25).max(25),code:jAe,retryable:le()});U({successful:ue(VTe),failed:ue(WTe)});U({messageIds:ue(E().min(25).max(25)).min(1).max(100),isRead:le().optional(),isStarred:le().optional(),starColor:hy.optional()});U({successCount:N(),failureCount:N()});U({messageIds:ue(E().min(25).max(25)).min(1).max(100),permanent:le().optional()});U({messageIds:ue(E().min(25).max(25)).min(1).max(100)});U({messageIds:ue(E().min(25).max(25)).min(1).max(100),destinationMailboxId:E().min(25).max(25)});U({messageIds:ue(E().min(25).max(25)).min(1).max(100),destinationMailboxId:E().min(25).max(25)});U({messageIds:ue(E().min(25).max(25)).min(1).max(100),labelId:E().min(25).max(25),action:BAe});const GTe=U({messageId:E().min(25).max(25),reason:E()});U({successCount:N(),failureCount:N(),failures:ue(GTe).optional()});U({suggestionId:E().min(25).max(25),accountConfigId:E().min(25).max(25),messageId:E().min(25).max(25),bodyPartId:E().min(25).max(25),icalUid:E().max(512),sequence:N(),method:fy,source:aj,state:oj,summary:E().max(512),dtStart:E().max(64),dtEnd:E().max(64),endsAtUtc:E().max(64),allDay:le(),location:E().max(512),organizer:E().max(256),zoneCertainty:lh,icalData:E(),acceptedCalendarObjectId:E(),supersededByMessageId:E(),createdAt:N(),updatedAt:N()});U({suggestionId:E().min(25).max(25),accountConfigId:E().min(25).max(25),messageId:E().min(25).max(25),bodyPartId:E().min(25).max(25),icalUid:E().max(512),sequence:N(),method:fy,source:aj,state:oj,summary:E().max(512),dtStart:E().max(64),dtEnd:E().max(64),endsAtUtc:E().max(64),allDay:le(),location:E().max(512),organizer:E().max(256),zoneCertainty:lh,acceptedCalendarObjectId:E(),supersededByMessageId:E(),createdAt:N(),updatedAt:N(),supersededByThreadId:E(),answerOvertakenBy:HAe});U({calendarId:E().min(25).max(25),answer:V$.optional(),event:vTe.optional()});U({muteSender:le()});U({envelopeAddressId:E().min(25).max(25),messageId:E().min(25).max(25),addressId:E().min(25).max(25),displayName:E().optional(),normalizedEmail:E(),addressRole:ej,addressOrder:N().min(0),createdAt:N(),updatedAt:N()});const KTe=U({kind:KAe,accountId:E().min(25).max(25),folderPath:E().max(512),target:E().max(256),mailboxId:E()});U({importId:E().min(25).max(25),accountConfigId:E().min(25).max(25),schemaVersion:N(),state:GAe,document:Yt(E(),Ji()),unresolvedRefs:ue(KTe),createdAt:N(),completedAt:N(),updatedAt:N()});U({kind:E()});const ZTe=U({kind:he("Boolean"),value:le()}),YTe=U({kind:he("String"),value:E()}),QTe=U({kind:he("Number"),value:N()}),XTe=U({kind:he("StringList"),value:ue(E())}),JTe=U({kind:he("Map"),value:Yt(E(),E())}),eRe=U({kind:he("MutedFlag"),value:pl}),tRe=U({date:E().date(),calls:N()}),nRe=U({kind:he("DailyCount"),value:tRe});U({accountSettingId:E().min(25).max(25),accountConfigId:E().min(25).max(25),name:E(),value:Ke([ZTe,YTe,QTe,XTe,JTe,eRe,nRe]),createdAt:N(),updatedAt:N()});U({mailboxAttributeId:E().min(25).max(25),mailboxId:E().min(25).max(25),attributeName:qAe});U({mailboxSpecialUseId:E().min(25).max(25),mailboxId:E().min(25).max(25),specialUse:jI});U({mailboxFlagId:E().min(25).max(25),mailboxId:E().min(25).max(25),flagName:Ke([sj,ij,E()]),isPermanent:le()});U({mailboxId:E().min(25).max(25),eventName:E(),accountId:E().min(25).max(25),lockId:E().min(25).max(25),acquiredAt:N(),lockedBy:E(),ttl:N()});U({messageFlagId:E().min(25).max(25),messageId:E().min(25).max(25),flagName:Ke([sj,ij,E()]),setAt:N(),createdAt:N(),updatedAt:N()});const Oj=U({name:E(),value:E()}),rRe=U({href:E(),text:E()}),oRe=U({raw:E(),headers:ue(Oj),text:E(),html:E(),links:ue(rRe)}),aRe=U({mailFrom:E(),rcpt:ue(E()),ip:E(),helo:E(),hostname:E()}),sRe=U({dmarc:Uc,spf:Uc,dkim:Uc,signerDomain:E(),envelopeDomain:E()}),iRe=U({verdict:ZAe,score:E(),headers:ue(Oj)}),lRe=U({knownSender:le(),senderMessagesSeen:N(),senderDomainMessagesSeen:N(),senderDomainRegisteredAt:E().optional(),receivedAt:E(),classifierScores:ue(KI),modelAllowed:le()});U({message:oRe,envelope:aRe,authentication:sRe,provider:iRe,context:lRe});U({name:he("Inline"),thresholds:Ke([pj,VI])});U({name:he("Rspamd"),url:E()});U({name:he("Model"),thresholds:VI});U({messageId:E().min(25).max(25),accountId:E().min(25).max(25),accountConfigId:E().min(25).max(25),sourceMailboxId:E().min(25).max(25),destinationMailboxId:E().min(25).max(25),state:YAe,createdAt:N(),updatedAt:N()});U({messageId:E().min(25).max(25),flagName:E(),accountId:E().min(25).max(25),accountConfigId:E().min(25).max(25),mailboxId:E().min(25).max(25),operation:QAe,state:XAe,createdAt:N(),updatedAt:N()});U({envelopeId:E().min(25).max(25),messageId:E().min(25).max(25),dateValue:N(),dateRaw:E(),subject:E().optional(),messageIdValue:E().optional(),createdAt:N(),updatedAt:N()});const cRe=U({state:he("Published"),registeredAt:E()}),uRe=U({state:he("Unpublished")});U({domainRegistrationId:E().max(256),registration:Ke([cRe,uRe]),createdAt:N(),updatedAt:N()});U({accountConfigId:E().min(25).max(25),senderKey:E().max(256),signerDomain:E().max(256),messageCount:N(),firstSeenAt:N(),lastSeenAt:N(),userAffirmedAt:N(),createdAt:N(),updatedAt:N()});U({bodyPartParameterId:E().min(25).max(25),messageId:E().min(25).max(25),bodyPartId:E().min(25).max(25),parameterName:E().min(1),parameterValue:E(),createdAt:N(),updatedAt:N()});U({messageId:E().min(25).max(25),createdAt:N(),updatedAt:N()});U({messageId:E().min(25).max(25),text:E(),createdAt:N(),updatedAt:N()});U({rawStorageId:E().min(25).max(25),messageId:E().min(25).max(25),storageType:VAe,storageLocation:E(),storageKey:E(),sizeBytes:N().min(0),checksumSha256:E().min(64).max(64),contentEncoding:WAe,storedAt:N(),expiresAt:N().optional(),createdAt:N(),updatedAt:N()});U({outboxMessageId:E().min(25).max(25),accountConfigId:E().min(25).max(25),calendarObjectId:E().min(25).max(25),recipient:E().max(512),method:fy,sequence:N(),icalData:E(),createdAt:N(),updatedAt:N()});U({calendarId:E().min(25).max(25),calendarObjectId:E().min(25).max(25),recurrenceId:E().max(64),startAt:E().max(64),endAt:E().max(64),allDay:le(),summary:E().max(512),status:vu,transparency:yu,createdAt:N(),updatedAt:N()});U({feedTokenId:E().min(25).max(25),accountConfigId:E().min(25).max(25),calendarId:E().min(25).max(25),tokenHash:E().max(64),createdAt:N(),rotatedAt:N(),updatedAt:N()});U({messageLabelId:E().min(25).max(25),messageId:E().min(25).max(25),labelId:E().min(25).max(25),accountConfigId:E().min(25).max(25),appliedByFilterId:E().min(25).max(25).optional(),createdAt:N(),updatedAt:N()});U({labelMailboxId:E().min(25).max(25),labelId:E().min(25).max(25),accountId:E().min(25).max(25),mailboxId:E().min(25).max(25),createdAt:N(),updatedAt:N()});U({email:E().optional(),services:ue(ah).min(1).optional()});U({authorizationUrl:E()});U({kind:he("Boolean"),value:le()});U({kind:he("String"),value:E()});U({kind:he("String"),value:Uf});U({kind:he("Number"),value:N()});U({kind:he("StringList"),value:ue(E())});U({kind:he("Map"),value:Yt(E(),E())});U({kind:he("Map"),value:U({encryptedDek:E(),encryptedData:E(),iv:E(),authTag:E()})});U({kind:he("DailyCount"),value:U({date:E(),calls:N().int()})});U({kind:he("MutedFlag"),value:U({value:le(),setAt:N(),setBy:E().optional(),expiresAt:N().optional(),reason:E().optional()})});const dRe=e=>e.hierarchyDelimiter.length===0?[e.fullPath]:e.fullPath.split(e.hierarchyDelimiter),Ff=e=>{const t=dRe(e);return t[t.length-1]||e.fullPath},fRe=(e,t)=>{switch(e.kind){case"appointed":case"flagged":return{allowed:!0,mailbox:e.mailbox};case"proposed":return t==="resolved"?{allowed:!0,mailbox:e.mailbox}:{allowed:!1,reason:"unconfirmed"};case"appointment_stale":return{allowed:!1,reason:"stale"};default:return{allowed:!1,reason:"none"}}},hRe=(e,t)=>fRe(e,t).allowed,pRe={[ec.Appointed]:{kind:"appointed",mailbox:null},[ec.Flagged]:{kind:"flagged",mailbox:null},[ec.Reserved]:{kind:"reserved",mailbox:null},[ec.Proposed]:{kind:"proposed",mailbox:null},[ec.Stale]:{kind:"appointment_stale",appointedMailboxId:"",fallback:{kind:"none"}},[ec.None]:{kind:"none"}},mRe=(e,t)=>hRe(pRe[e],t),ZI=()=>typeof navigator<"u"&&(navigator.language||navigator.languages?.[0])||"en-US",Bo=(e,t)=>new Intl.NumberFormat(ZI(),t).format(e),gRe=/^-?\d+$/,YI=e=>{if(e instanceof Date)return e;if(typeof e=="number")return new Date(e);if(typeof e=="string"){const t=e.trim();return gRe.test(t)?new Date(Number(t)):new Date(t)}return new Date(Number.NaN)},QI=e=>Number.isFinite(e.getTime()),Yd=(e,t)=>{const n=YI(e);return QI(n)?new Intl.DateTimeFormat(ZI(),t).format(n):""},Mj=(e,t)=>Yd(e,{short:{month:"short",day:"numeric"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"},time:{hour:"numeric",minute:"numeric"},datetime:{month:"short",day:"numeric",hour:"numeric",minute:"numeric"}}[t]),NLe=e=>{const t=YI(e);if(!QI(t))return"";const n=new Intl.RelativeTimeFormat(ZI(),{numeric:"auto"}),r=Date.now(),o=t.getTime()-r,a=Math.round(o/1e3),l=Math.round(o/(1e3*60)),c=Math.round(o/(1e3*60*60)),d=Math.round(o/(1e3*60*60*24)),f=Math.round(o/(1e3*60*60*24*7));return Math.abs(a)<60?n.format(a,"second"):Math.abs(l)<60?n.format(l,"minute"):Math.abs(c)<24?n.format(c,"hour"):Math.abs(d)<7?n.format(d,"day"):Math.abs(f)<4?n.format(f,"week"):Mj(t,"medium")},PLe=e=>{const t=YI(e);if(!QI(t))return"";const n=new Date,r=t.toDateString()===n.toDateString(),o=new Date(n);o.setDate(o.getDate()-1);const a=t.toDateString()===o.toDateString(),l=new Date(n);l.setDate(l.getDate()-6);const c=t>=l&&t<n,d=t.getFullYear()===n.getFullYear();return r?Yd(t,{hour:"numeric",minute:"numeric"}):a?"Yesterday":c?Yd(t,{weekday:"long"}):d?Yd(t,{month:"short",day:"numeric"}):Yd(t,{month:"short",day:"numeric",year:"numeric"})},vRe=e=>`Move ${e===1?"1":Bo(e)} ${e===1?"message":"messages"} to Trash?`,kLe=({targets:e,trashByAccount:t,hasAppointments:n,isError:r})=>{if(r)return"unavailable";if(!n||e.length===0)return"unknown";let o=!1,a=!1;for(const l of e){if(l.accountId===void 0)return"unknown";const c=t.get(l.accountId);if(c===void 0)return"unknown";if(c.source==="Stale")return"staleTrash";if(c.mailboxId===void 0)return"noTrash";c.mailboxId===l.mailboxId&&(o=!0,mRe(c.source,"confirmed")||(a=!0))}return a?"unconfirmed":o?"permanent":"trash"},yRe=e=>e==="permanent"||e==="unconfirmed",DLe=(e,t,n={})=>{const r=e===1?"1":Bo(e),o=e===1?"message":"messages",{trashFolderLabel:a,staleFolderLabel:l}=n;if(t==="noTrash")return{title:`Can't delete ${r} ${o} yet`,description:"No folder on this account is set as Trash, so there is nowhere to move the mail. Nothing has been deleted.",confirmLabel:"Pick a Trash folder"};if(t==="staleTrash")return{title:`Can't delete ${r} ${o} yet`,description:l?`The folder you set as this account's Trash — ${l} — is gone from the mail server. Nothing has been deleted.`:"The folder you set as this account's Trash is gone from the mail server. Nothing has been deleted.",confirmLabel:"Pick another folder"};if(t==="unconfirmed"){const c=a?`reader files this account's deleted mail in ${a} because of its name — nobody confirmed it.`:"reader files this account's deleted mail in a folder it matched by name — nobody confirmed it.";return{title:"Confirm this account's Trash folder",description:e>0?`${c} Deleting ${r} ${o} there erases them from the mail server, and that cannot be restored. Nothing has been deleted.`:`${c} Emptying a folder erases everything in it from the mail server, and that cannot be restored. Nothing has been emptied.`,confirmLabel:"Confirm the folder"}}return t==="unavailable"?{title:`Can't delete ${r} ${o}`,description:"reader couldn't read this account's folder settings, so it can't say whether this would move the mail to Trash or erase it. Nothing has been deleted.",confirmLabel:"Sign in again"}:t==="unknown"?{title:`Delete ${r} ${o}?`,description:"Checking where this account files deleted mail…",confirmLabel:"Delete"}:t==="permanent"?{title:`Permanently delete ${r} ${o}?`,description:"They are erased from the mail server and cannot be restored.",confirmLabel:"Delete permanently"}:{title:vRe(e),description:"You can restore them from Trash later.",confirmLabel:"Move to Trash"}},bRe={delete:(e,t)=>`Deleting ${e} of ${t}…`,move:(e,t)=>`Moving ${e} of ${t}…`,markRead:(e,t)=>`Marking ${e} of ${t} as read…`},SRe={delete:"moved to Trash",move:"moved",markRead:"marked as read"},Nj=(e,t)=>e==="delete"&&yRe(t)?"permanently deleted":SRe[e],CRe={delete:"couldn't be deleted",move:"couldn't be moved",markRead:"couldn't be marked as read"},ERe={delete:"Couldn't delete these messages",move:"Couldn't move these messages",markRead:"Couldn't mark these messages as read"},wRe={delete:"The delete didn't finish.",move:"The move didn't finish.",markRead:"The update didn't finish."},LLe=(e,t,n)=>bRe[e](Bo(t),Bo(n)),xRe=(e,t,n="trash")=>`${Bo(t)} ${Nj(e,n)}. Your mail server is still catching up.`,_Re=e=>`Stopped after ${Bo(e)}`,IRe=(e,t,n,r="trash")=>`${Bo(t)} of ${Bo(n)} ${Nj(e,r)}. The rest were not sent, apart from the ones already on their way when you stopped — those may still have gone through.`,vL=(e,t)=>t>0?`Stopped after ${Bo(t)} — some messages ${CRe[e]}`:ERe[e],ARe=e=>wRe[e],TRe={delete:e=>`A delete of ${e} messages`,move:e=>`A move of ${e} messages`,markRead:e=>`Marking ${e} messages as read`},RRe=(e,t,n)=>`${TRe[e](Bo(t))}${n?` in ${n}`:""} is still running — stop it first.`,ULe=e=>e==="delete"?"danger":"info",FLe=(e,t,n,r)=>n.error!==void 0?null:n.cancelled?{severity:"warning",title:_Re(n.done),detail:IRe(e,n.done,t,r)}:{severity:"info",title:xRe(e,n.done,r)},Pj=100,ORe=(e,t)=>e.kind==="move"?[t,e.destinationMailboxId]:[t],MRe=new AbortController().signal,d_=async e=>e.then(t=>({ok:!0,value:t}),t=>({ok:!1,error:t})),NRe=(e,t=Pj)=>{if(e.length===0)return[];const n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n},PRe=(e,t=Pj)=>{const n=new Map;for(const r of e){const o=n.get(r.accountId);if(o){o.push(r.id);continue}n.set(r.accountId,[r.id])}return[...n.values()].flatMap(r=>NRe(r,t))},kj=async(e,t,n,r)=>{const o=PRe(e),a=e.length;let l=0,c=0;const d=[];for(let f=0;f<o.length;f++){if(r.aborted)return d.push(...o.slice(f).flat()),{done:l,failedIds:d,refused:c,cancelled:!0};const p=o[f],m=await d_(t(p,r));if(!m.ok)return d.push(...o.slice(f).flat()),r.aborted?{done:l,failedIds:d,refused:c,cancelled:!0}:(n({done:l,total:a}),{done:l,failedIds:d,refused:c,cancelled:!1,error:m.error});c+=m.value?.failureCount??0,l+=p.length,n({done:l,total:a})}return{done:l,failedIds:d,refused:c,cancelled:!1}},zLe=async(e,t)=>{await kj(e.map(n=>({id:n,accountId:void 0})),async n=>(await t(n),{successCount:n.length,failureCount:0}),()=>{},MRe)},kRe=async(e,t,n,r,o)=>{let a=0,l=0;const c=[];let d;do{if(o.aborted)return{done:a,failedIds:c,refused:l,cancelled:!0};const f=await d_(e(d,o));if(!f.ok)return o.aborted?{done:a,failedIds:c,refused:l,cancelled:!0}:{done:a,failedIds:c,refused:l,cancelled:!1,error:f.error};const p=f.value;if(p.ids.length>0){const m=await d_(n(p.ids,o));if(!m.ok)return o.aborted?{done:a,failedIds:c,refused:l,cancelled:!0}:{done:a,failedIds:c,refused:l,cancelled:!1,error:m.error};l+=m.value?.failureCount??0,a+=p.ids.length,r({done:a,total:t})}d=p.continuationToken}while(d);return{done:a,failedIds:c,refused:l,cancelled:!1}},DRe=e=>({done:e.done,total:Math.max(e.total,e.done)}),LRe=e=>typeof e=="object"&&e!==null&&Array.isArray(e.pages),URe=e=>typeof e=="object"&&e!==null&&Array.isArray(e.items),FRe=(e,t)=>e===void 0?e:LRe(e)?{...e,pages:e.pages.map(n=>({...n,items:t(n.items)}))}:URe(e)?{...e,items:t(e.items)}:e,Dj=e=>{const t=[];for(const n of new Set(e))t.push(mEe({path:{mailboxId:n}})),t.push(A7({path:{mailboxId:n}}));return t.push(R7()),t},$Le=(e,t)=>Promise.all(t.map(n=>e.cancelQueries({queryKey:n}))),jLe=(e,t)=>t.flatMap(n=>e.getQueriesData({queryKey:n})).filter(n=>n[1]!==void 0).map(([n,r])=>({queryKey:n,data:r})),BLe=(e,t,n)=>{const r=o=>FRe(o,n);for(const o of t)e.setQueriesData({queryKey:o},r)},HLe=(e,t)=>{for(const n of t)e.setQueryData(n.queryKey,n.data)},Lj=(e,t)=>{for(const n of t)e.invalidateQueries({queryKey:n})},Uj=_.createContext(void 0),zRe=e=>{if(e.action)return e.action;if((e.severity??"error")==="error")return{label:"Report an issue",href:cu(Hi({title:`Bug: ${e.title}`,errorMessage:e.detail?`${e.title} — ${e.detail}`:e.title,stack:e.error instanceof Error?e.error.stack:void 0}))}},Fj=()=>{const e=_.useContext(Uj);if(!e)throw new Error("useErrorBanners must be used within an ErrorBannerProvider");return e},yL=5,$Re=(e,t,n)=>({title:e,detail:zj(n)??t,error:n}),zj=e=>{if(e!=null){if(e instanceof Error)return e.message||void 0;if(typeof e=="string")return e||void 0;if(typeof e=="object"&&"message"in e&&typeof e.message=="string")return e.message||void 0}},qLe=e=>ol(e)?.code==="message_gone_from_server",VLe=e=>{const t=zj(e);return t?t.startsWith("Message not found"):!1},jRe=(e,t,n)=>e.severity===n&&e.title===t.title&&e.detail===t.detail,BRe=(e,t)=>{const r=[...e.filter(o=>!jRe(o,{title:t.title,detail:t.detail,severity:t.severity},t.severity)),t];return r.length<=yL?r:r.slice(r.length-yL)},HRe=(e,t)=>e.filter(n=>n.id!==t),qRe=(e,t,n)=>({id:t,severity:e.severity??"error",title:e.title,detail:e.detail,action:e.action,onRetry:e.onRetry,createdAt:n}),VRe=new Set(["none","stale","unconfirmed"]),WRe=new Set(Object.values(ote)),Aw=(e,t)=>{const n=e?.[t];return typeof n=="string"?n:void 0},GRe=e=>{const t=ol(e);if(t?.code!=="folder_role_unresolved")return;const{details:n}=t;if(!n)return;const r=Aw(n,"reason"),o=Aw(n,"role"),a=Aw(n,"accountId");if(!(!r||!VRe.has(r))&&!(!o||!WRe.has(o)||!a))return{reason:r,role:o,accountId:a}},KRe=e=>ol(e)?.code==="mailbox_not_settled",ZRe=3e4,YRe=1e3,QRe="The folder couldn't be created on the mail server. Please try again.",XRe="The folder was created but the mail server hasn't confirmed it yet, so nothing was attached to it. It's in your folder list — try again in a moment.",JRe=(e,t)=>new Promise((n,r)=>{if(t?.aborted){r(t.reason);return}const o=setTimeout(()=>{t?.removeEventListener("abort",a),n()},e),a=()=>{clearTimeout(o),r(t?.reason)};t?.addEventListener("abort",a,{once:!0})});async function eOe({fetchMailboxes:e,mailboxId:t,signal:n,timeoutMs:r=ZRe,pollIntervalMs:o=YRe,delay:a=JRe,now:l=Date.now}){const c=l()+r;for(;;){n?.throwIfAborted();const f=(await e()).find(p=>p.mailboxId===t);if(f?.syncStatus===FN.synced)return f;if(f?.syncStatus===FN.failed)throw new Error(QRe);if(l()>=c)throw new Error(XRe);await a(o,n)}}function $j(e,t){const n=e.trim();return t?`${t.fullPath}${t.hierarchyDelimiter}${n}`:n}const bL=(e,t)=>{const n=t.length===0?[e]:e.split(t);return n[0]?.toLowerCase()==="inbox"&&(n[0]="INBOX"),n.join(t)};function tOe({name:e,delimiter:t,parent:n,existingPaths:r}){const o=e.trim();if(o==="")return"Enter a folder name.";if(t.length>0&&o.includes(t))return`A folder name can't contain "${t}".`;const a=bL($j(o,n),t);if(r.some(c=>bL(c,t)===a))return"A folder with that name already exists."}function nOe(e){const t=Ws(),{data:n}=Qi({...Jx({path:{accountId:e??""}}),enabled:!!e}),r=Y2({...tEe(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:wI({path:{accountId:e}})})}}),o=_.useRef(new Map),a=_.useCallback(async(c,d,f)=>{if(!e)throw new Error("No account to create the folder in. Pick messages from a single account first.");const p=n?.items??[],m=d?p.find(w=>w.fullPath===d):void 0;if(d&&!m)throw new Error(`Couldn't find the folder "${d}" to create this one inside.`);const g=m?{fullPath:m.fullPath,hierarchyDelimiter:m.hierarchyDelimiter}:void 0,v=$j(c,g);let S=o.current.get(v);if(!S){const w=g?.hierarchyDelimiter??p[0]?.hierarchyDelimiter??"/",x=tOe({name:c,delimiter:w,parent:g,existingPaths:p.map(T=>T.fullPath)});if(x)throw new Error(x);S=(await r.mutateAsync({path:{accountId:e},body:{fullPath:v,namespaceType:"personal"}})).mailboxId,o.current.set(v,S)}const C=await eOe({mailboxId:S,signal:f,fetchMailboxes:async()=>(await t.fetchQuery({...Jx({path:{accountId:e}}),staleTime:0})).items??[]});return o.current.delete(v),{id:C.mailboxId,label:Ff(C),path:C.fullPath}},[r,e,n,t]);return{createFolder:_.useCallback((c,d)=>a(c,"",d),[a]),createFolderIn:a,mutation:r}}const rOe=()=>{const{t:e}=x7("mail",{useSuspense:!1});return _.useCallback((t,n)=>e(t,{defaultValue:n}),[e])},Tw={Inbox:"inbox",Drafts:"drafts",Sent:"sent",Archive:"archive",Junk:"junk",Trash:"trash",All:"all",Flagged:"flagged"},WLe={inbox:"Inbox",drafts:"Drafts",sent:"Sent",archive:"Archive",junk:"Junk",trash:"Trash",all:"All",flagged:"Flagged"},zf=["inbox","flagged","drafts","sent","archive","all","junk","trash"];function Iy(e){const t=new Map,n=[...e].sort((r,o)=>zf.indexOf(Tw[r.role])-zf.indexOf(Tw[o.role]));for(const r of n){if(!r.mailboxId||t.has(r.mailboxId))continue;const o=Tw[r.role];o&&t.set(r.mailboxId,o)}return t}function jj(e,t,n){const r=e.displayNameOverride?.trim();if(r)return r;const o=Ff(e);return!t||!n?o:n(`sidebar.${t}`,o)}const oOe=new Set(["sent","drafts","trash"]),GLe=e=>e===void 0||!oOe.has(e),KLe=100,aOe=e=>e.trim().toLowerCase()==="inbox",sOe=(e,t)=>{if(e.hierarchyDelimiter.length===0)return!1;const n=`${e.fullPath}${e.hierarchyDelimiter}`;return t.some(r=>r.mailboxId!==e.mailboxId&&r.fullPath.startsWith(n))},iOe=["Appointed","Flagged","Reserved"],lOe=(e,t)=>e.mailboxId!==t.mailboxId?!1:e.source==="Stale"?t.specialUse?.includes(e.role)??!1:iOe.includes(e.source),cOe=(e,t)=>t.find(n=>lOe(n,e))?.role;function ZLe(e,t,n){if(aOe(e.fullPath))return{deletable:!1,reason:"inbox",message:"The inbox can't be deleted."};const r=cOe(e,n);return r?{deletable:!1,reason:"role",message:`This folder is your ${r} folder. Reassign that role before deleting it.`}:sOe(e,t)?{deletable:!1,reason:"children",message:"This folder has subfolders. Delete them first."}:{deletable:!0}}function uOe(e,t){return e.filter(n=>n.mailboxId!==t)}function YLe(e){return{total:e,moved:0,phase:e===0?"moved":"moving"}}function QLe(e,t){if(e.phase!=="moving")return e;const n=Math.min(e.total,e.moved+Math.max(0,t));return{...e,moved:n,phase:n>=e.total?"moved":"moving"}}function XLe(e,t){return{...e,phase:"failed",error:t}}function JLe(e){return`Moved ${e.moved} of ${e.total}`}function e6e(e){const t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function t6e(e){return e>0?"choose-fate":"confirm-empty"}const dOe=new Set(["outbox","postvak uit","boîte d'envoi","postausgang","buzón de salida","posta in uscita","送信トレイ","送件匣","发件箱","skrzynka nadawcza"]),fOe=e=>{const t=Ff(e).trim().toLowerCase();return dOe.has(t)},SL=zf.length,hOe=(e,t)=>{const n=Iy(t);return[...e.filter(o=>{const a=n.get(o.mailboxId);return a==="drafts"||a==="sent"?!1:!fOe(o)})].sort((o,a)=>{const l=n.has(o.mailboxId)?zf.indexOf(n.get(o.mailboxId)??"inbox"):SL,c=n.has(a.mailboxId)?zf.indexOf(n.get(a.mailboxId)??"inbox"):SL;return l!==c?l-c:Ff(o).localeCompare(Ff(a),void 0,{sensitivity:"base",numeric:!0})})},pOe=e=>e[0]?.hierarchyDelimiter??"/",mOe=({mailboxes:e,folderAppointments:t,currentMailboxId:n,excludeMailboxId:r,translator:o})=>{const a=hOe(e,t),l=Iy(t);return(r?uOe(a,r):a).map(d=>({id:d.mailboxId,label:jj(d,l.get(d.mailboxId),o),path:d.fullPath,isCurrent:d.mailboxId===n,messageCount:d.messageCount}))},Bj=_.createContext(void 0),CL=Symbol("appoint-failed"),gOe=({children:e})=>{const t=Ws(),n=rOe(),[r,o]=_.useState(null),[a,l]=_.useState(),[c,d]=_.useState({kind:"choosing"}),f=r?.accountId,{data:p}=Qi({...xI(),staleTime:1/0,enabled:!!f}),{data:m}=Qi({...Jx({path:{accountId:f??""}}),enabled:!!f}),{createFolderIn:g}=nOe(f),v=Y2({...eEe(),meta:pv(409)}),S=p?.accounts.find(F=>F.accountId===f),C=_.useMemo(()=>m?.items??[],[m]),w=_.useMemo(()=>S?.folderAppointments??[],[S]),x=_.useMemo(()=>mOe({mailboxes:C,folderAppointments:w,translator:n}),[C,w,n]),I=w.find(F=>F.role===r?.role),T=r?.guessedMailboxId??I?.mailboxId,O=C.find(F=>F.mailboxId===T),D=r?.trashFolderLabel??(O?jj(O,Iy(w).get(O.mailboxId),n):void 0),P=_.useRef(null),M=_.useCallback(()=>{P.current=null,o(null),l(void 0),d({kind:"choosing"})},[]),L=_.useCallback(F=>{P.current=F,o(F),d({kind:"choosing"}),l(F.reason==="unconfirmed"?F.guessedMailboxId:void 0)},[]),z=_.useCallback(F=>{P.current===F&&M()},[M]),G=_.useCallback(F=>{r&&(d({kind:"appointing"}),v.mutateAsync({path:{accountId:r.accountId,role:r.role},body:{mailboxId:F}}).catch(q=>(d({kind:"appoint-failed",cause:KRe(q)?"mailbox-pending":"generic"}),CL)).then(async q=>{q!==CL&&(await t.invalidateQueries({queryKey:I7()}),d({kind:"acting"}),await r.onAppointed(),z(r))}).catch(()=>z(r)))},[r,v,t,z]),j=_.useMemo(()=>({requestAppointment:L}),[L]);return R.jsxs(Bj.Provider,{value:j,children:[e,r&&R.jsx(ute,{open:!0,reason:r.reason,action:r.action,folders:x,delimiter:pOe(C),trashFolderLabel:D,guessedMailboxId:T,staleFolderLabel:r.staleFolderLabel??I?.staleAppointmentPath,accountEmail:(p?.accounts.length??0)>1?S?.email:void 0,phase:c,selectedId:a,onSelect:l,onCreateFolder:g,onConfirm:G,onCancel:M})]})},vOe=()=>{const e=_.useContext(Bj);if(!e)throw new Error("useRoleAppointmentPrompt must be used within a RoleAppointmentPromptProvider");return e},Hj=_.createContext(void 0),yOe=({children:e})=>{const[t,n]=_.useState(void 0),r=_.useRef(void 0),o=_.useRef(void 0),a=_.useRef(void 0),l=_.useRef(new Set),c=Ws(),{pushError:d}=Fj(),{requestAppointment:f}=vOe(),p=_.useRef(async()=>({kind:"ran",outcome:{done:0,failedIds:[],refused:0,cancelled:!1}})),m=_.useCallback(C=>{Lj(c,Dj(ORe(C.action,C.mailboxId)));const w=new Set;if(C.accountId&&w.add(C.accountId),C.source.kind==="targets")for(const x of C.source.targets)x.accountId&&w.add(x.accountId);for(const x of w)c.invalidateQueries({queryKey:wI({path:{accountId:x}})})},[c]),g=_.useCallback(async C=>{const w=a.current;if(w)return{kind:"refused",reason:RRe(w.action.kind,w.matched,w.mailboxLabel)};const x=Symbol("bulk-run"),I=new AbortController;r.current=I,o.current=x,a.current=C,C.claimEnding&&(l.current.add(x),C.claimEnding(()=>l.current.delete(x))),n({action:C.action,mailboxId:C.mailboxId,progress:{done:0,total:C.matched}});const T=M=>{o.current===x&&n(L=>L&&{...L,progress:DRe(M)})},O=C.source.kind==="targets"?await kj(C.source.targets,C.applyBatch,T,I.signal):await kRe(C.source.fetchPage,C.matched,C.applyBatch,T,I.signal),D=l.current.delete(x);o.current===x&&(o.current=void 0,a.current=void 0,n(void 0));const P=O.error?GRe(O.error):void 0;return P?f({accountId:P.accountId,role:P.role,reason:P.reason,action:{kind:"delete",count:C.matched},onAppointed:async()=>{const M=await p.current({...C,claimEnding:void 0});M.kind==="refused"&&d({title:vL(C.action.kind,0),detail:M.reason})}}):O.error?d($Re(vL(C.action.kind,O.done),ARe(C.action.kind),O.error)):O.refused>0&&d({severity:"warning",title:O.refused>1?`Couldn't delete ${O.refused} of ${C.matched} messages yet`:"Couldn't delete this message yet",detail:"Something else moved them while the delete was being prepared. They are back where they now sit — try again."}),D||C.reportEnding?.(C.action.kind,C.matched,O),O.done>0&&m(C),{kind:"ran",outcome:O}},[m,d,f]);p.current=g;const v=_.useCallback(C=>{a.current?.mailboxId===C&&r.current?.abort()},[]);_.useEffect(()=>{const C=l.current;return()=>{r.current?.abort(),r.current=void 0,o.current=void 0,a.current=void 0,C.clear()}},[]);const S=_.useMemo(()=>({run:t,start:g,stop:v}),[t,g,v]);return R.jsx(Hj.Provider,{value:S,children:e})},n6e=()=>{const e=_.useContext(Hj);if(!e)throw new Error("useBulkRun must be used within a BulkRunProvider");return e},bOe=["Phishing","Spam"],qj=e=>bOe.flatMap(t=>e?.filter(n=>n.name===t)??[])[0],SOe=e=>e.state==="Checked"&&e.action!=="None"?{...e,action:e.action}:void 0,COe=(e,t)=>{if(e.spamCleared)return;const n=qj(e.labels);if(n)return{label:n,suspected:!t.has(e.mailboxId)}},r6e=(e,t)=>!e.spamCleared&&(e.spamVerdict.state==="Failed"||qj(e.labels)!==void 0&&e.spamVerdict.state==="Checked"&&!t),Vj=(e,t)=>cu(Hi({title:`Spam check: ${e}`,errorMessage:`${e}. ${t}`})),o6e=e=>Vj(`Unknown spam reason ${e}`,`The spam check named ${e}, which this version has no sentence for.`),EL=10,EOe=e=>{const t=new Map;for(const r of e){const o=t.get(r.accountId)??[];o.push(r),t.set(r.accountId,o)}const n=[];for(const[r,o]of t)for(let a=0;a<o.length;a+=EL)n.push({accountId:r,targets:o.slice(a,a+EL)});return n},wOe={nowSpam:0,nowSuspected:0,noLongerSuspected:0},xOe=(e,t,n)=>{const r=SOe(n)?.action,o=t?t.suspected?"Warn":"Junk":void 0;return r===o?e:r==="Junk"?{...e,nowSpam:e.nowSpam+1}:r==="Warn"?{...e,nowSuspected:e.nowSuspected+1}:{...e,noLongerSuspected:e.noLongerSuspected+1}},_Oe=(e,t,n)=>{const r=new Map(t.targets.map(l=>[l.messageId,l])),o=n.successful.reduce((l,c)=>xOe(l,r.get(c.messageId)?.before,c.verdict),e.summary),a=[...e.failures,...n.failed.map(l=>({messageId:l.messageId,subject:r.get(l.messageId)?.subject??"(No subject)",code:l.code,retryable:l.retryable}))];return{summary:o,failures:a}},wL=(e,t)=>({successful:[],failed:e.targets.map(n=>({messageId:n.messageId,code:t,retryable:!1}))}),Wj=_.createContext(void 0),a6e=()=>_.useContext(Wj),IOe=async e=>{const t=await B1e({path:{accountId:e.accountId},body:{messageIds:e.targets.map(r=>r.messageId)}});if(t.data)return t.data;if(!t.response)throw t.error;const n=t.response.status;if(n===401)return"SignedOut";if(n===403)return wL(e,"NotPermitted");if(n===404)return wL(e,"NotFound");throw new Zf(`Check again failed with ${n}`,n,t.error)};function AOe({children:e}){const t=Ws(),{pushError:n}=Fj(),[r,o]=_.useState(void 0),[a,l]=_.useState(new Set),[c,d]=_.useState(new Map),f=_.useRef(!1),p=_.useRef(!1),m=_.useRef(void 0),g=_.useCallback(I=>{Lj(t,Dj(I.map(T=>T.mailboxId)));for(const T of new Set(I.map(O=>O.threadId)))T&&t.invalidateQueries({queryKey:O7({path:{threadId:T}})})},[t]),v=_.useCallback(async(I,T)=>{const O=I.length;let D={summary:wOe,failures:[]},P=0;T&&o({state:"Running",checked:P,total:O});for(const L of EOe(I)){if(p.current)break;l(new Set(L.targets.map(G=>G.messageId)));const z=await IOe(L);if(z==="SignedOut"){Gv(),l(new Set);return}D=_Oe(D,L,z),P+=L.targets.length,d(G=>{const j=new Map(G);for(const F of z.successful)j.delete(F.messageId);for(const F of z.failed)j.set(F.messageId,F.code);return j}),T&&o({state:"Running",checked:P,total:O})}if(l(new Set),g(I),p.current){o(void 0);return}if(!T){for(const L of D.failures){const z=L.retryable?I.find(G=>G.messageId===L.messageId):void 0;n({title:"Couldn't check this message again",detail:`${L.subject}: ${s8[L.code]}`,onRetry:z&&(()=>m.current?.([z],!1))})}return}if(D.failures.length===0){o({state:"Done",total:O,summary:D.summary});return}const M=new Set(D.failures.filter(L=>L.retryable).map(L=>L.messageId));o({state:"PartialFailure",checked:P,total:O,failures:D.failures,retry:I.filter(L=>M.has(L.messageId))})},[n,g]),S=_.useCallback((I,T)=>{if(I.length!==0){if(f.current){n({severity:"info",title:"Check again is already running",detail:"Wait for the run in progress to finish, or stop it."});return}f.current=!0,p.current=!1,v(I,T).catch(O=>{l(new Set),o(void 0),Kv(O)}).finally(()=>{f.current=!1})}},[v,n]);m.current=S;const C=_.useCallback((I,T)=>{S([...I],T.panel)},[S]),w=_.useMemo(()=>({checkAgain:C,pendingIds:a,failures:c}),[C,a,c]),x=(()=>{if(r)return r.state==="Running"?{...r,onStop:()=>{p.current=!0}}:r.state==="Done"?{...r,onDone:()=>o(void 0)}:{state:"PartialFailure",checked:r.checked,total:r.total,failures:r.failures,reportIssueHref:Vj("Check again left messages unchecked",r.failures.map(I=>`${I.messageId}: ${I.code}`).join(", ")),onRetry:()=>S(r.retry,!0),onClose:()=>o(void 0)}})();return R.jsxs(Wj.Provider,{value:w,children:[e,x&&R.jsx("div",{className:"pointer-events-none fixed inset-x-3 bottom-3 z-40 flex justify-center",children:R.jsx("div",{className:"pointer-events-auto w-full max-w-md",children:R.jsx(Eee,{...x})})})]})}const s6e=(e,t)=>({messageId:e.messageId,accountId:e.accountId,mailboxId:e.mailboxId,threadId:e.threadId,subject:e.subject??"(No subject)",before:COe(e,t)}),i6e=e=>e.mailboxId&&e.accountId?{messageId:e.id,accountId:e.accountId,mailboxId:e.mailboxId,threadId:e.threadId,subject:e.subject,before:e.spam}:void 0,TOe=600,ROe=300,Gj="remit logs",OOe="https://github.com/remit-mail/reader/releases/tag/";function Kj(e,t){const n=t?.check.lastCheckedAt;return n!==void 0&&n!==e.since}function MOe(e){const t=mn(e);return`The check could not be requested — ${t===void 0?"the server did not answer":`the server answered ${t}`}. Run \`remit logs backend\` to see why.`}const NOe={checking:"preparing",pulling:"preparing",snapshotting:"preparing",stopping:"restarting",starting:"restarting",verifying:"reconnecting",committing:"reconnecting",rollingBack:"reconnecting",recovering:"reconnecting"};function XI(e){return NOe[e]??"reconnecting"}function Zj(e){const t=mn(e);return t===404||t===403||t===401}function f_(e,t){const n=e?.run??null;return n===null||n.outcome!==null||n.runId===t?null:n}function Yj(e,t){const n=e?.check;if(n?.status==="ok"&&!(!n.updateAvailable||!n.latestVersion))return{version:n.latestVersion,releasedAt:zg(n.publishedAt)??t,releaseNotesUrl:n.releaseNotesUrl??Qj(n.latestVersion),summary:n.summary??""}}function POe(e){const t=e?.check.schemaVersion,n=e?.currentSchemaVersion;return t===void 0||n===void 0?!1:t>n}function h_(){return TOe+ROe}function p_(e,t){return Math.max(0,Math.floor((t-e)/1e3))}function zg(e){if(!e)return;const t=Date.parse(e);return Number.isNaN(t)?void 0:t}function Qj(e){return`${OOe}${e}`}function $f(e,t,n,r,o){return{status:"applying",runId:e,version:t,target:n,phase:r,elapsedSeconds:o}}function kOe(e,t,n){switch(n){case"succeeded":return{status:"succeeded",runId:t.runId,version:t.targetVersion,previousVersion:t.fromVersion,releaseNotesUrl:e.check.releaseNotesUrl??Qj(t.targetVersion)};case"rolledBack":return{status:"rolledBack",runId:t.runId,version:t.fromVersion,attemptedVersion:t.targetVersion,reason:t.message,logsCommand:t.logCommand};case"rollbackFailed":return{status:"rollbackFailed",runId:t.runId,attemptedVersion:t.targetVersion,previousVersion:t.fromVersion,reason:t.message,logsCommand:t.logCommand};case"abandoned":return{status:"abandoned",runId:t.runId,version:t.fromVersion,attemptedVersion:t.targetVersion,reason:t.message,logsCommand:t.logCommand};default:return n}}function DOe(e,t,n,r){const o=e.check,a=zg(o.lastCheckedAt);if(n!==null)return{status:"checkFailed",version:e.currentVersion,reason:n,lastCheckedAt:a};if(t!==null&&!Kj(t,e))return{status:"checking",version:e.currentVersion};if(o.status==="failed")return{status:"checkFailed",version:e.currentVersion,reason:o.error??"Remit could not reach the update service.",lastCheckedAt:a};if(o.status==="disabled")return{status:"neverChecked",version:e.currentVersion,lastCheckedAt:a};const l=Yj(e,r);return l?{status:"available",version:e.currentVersion,release:l}:{status:"upToDate",version:e.currentVersion,checkedAt:zg(o.lastCheckedAt)??r}}function xL(e,t,n){return{surface:{status:"ready",section:e,overlay:t},releaseHeld:n}}function Xj(e,t,n,r){return{status:"ready",section:$f(e,t,n,"reconnecting",r),overlay:{kind:"applying",target:n,phase:"reconnecting",elapsedSeconds:r}}}function Jj(e,t,n,r,o){return{status:"ready",section:$f(e,t,n,"reconnecting",r),overlay:{kind:"neverCameBack",attemptedVersion:n,previousVersion:t,elapsedSeconds:r,logsCommand:o}}}function LOe(e,t){return{surface:Jj(e.runId,e.previousVersion,e.attemptedVersion,t,Gj),releaseHeld:!1}}function UOe(e,t,n,r,o){const a=p_(e.startedAt,o),l=t?.currentVersion??e.previousVersion,c=!r&&n!==null&&n.runId===e.runId;if(c&&n!==null&&n.outcome!==null)return null;if(c&&n!==null){const d=XI(n.phase);return xL($f(n.runId,l,n.targetVersion,d,a),{kind:"applying",target:n.targetVersion,phase:d,elapsedSeconds:a},!1)}return r?a>h_()?LOe(e,a):{surface:Xj(e.runId,e.previousVersion,e.attemptedVersion,a),releaseHeld:!1}:t===void 0?{surface:{status:"loading"},releaseHeld:!1}:a>h_()?{surface:{status:"ready",section:{status:"unreachable",runId:e.runId,previousVersion:e.previousVersion,attemptedVersion:e.attemptedVersion,elapsedSeconds:a,logsCommand:n?.logCommand??Gj},overlay:{kind:"none"}},releaseHeld:!0}:xL($f(e.runId,l,e.attemptedVersion,e.phase,a),{kind:"applying",target:e.attemptedVersion,phase:e.phase,elapsedSeconds:a},!1)}function _L(e){const{data:t,isError:n,dismissedRunId:r,checkPress:o,checkFailure:a,sighting:l,now:c}=e;if(n){const p=f_(t,r);if(p!==null){const m=l!==null&&l.runId===p.runId?l.observedAt:c,g=p_(m,c);return g>h_()?Jj(p.runId,p.fromVersion,p.targetVersion,g,p.logCommand):Xj(p.runId,p.fromVersion,p.targetVersion,g)}return{status:"ready",section:{status:"checkFailed",version:t?.currentVersion??"the current version",reason:"Remit could not reach the update service."},overlay:{kind:"none"}}}if(!t)return{status:"loading"};const d=t.run,f=d!==null&&r!==null&&d.runId===r;if(d!==null&&!f&&d.outcome!==null)return{status:"ready",section:kOe(t,d,d.outcome),overlay:{kind:"none"}};if(d!==null&&!f&&d.outcome===null){const p=p_(zg(d.startedAt)??c,c),m=XI(d.phase);return{status:"ready",section:$f(d.runId,d.fromVersion,d.targetVersion,m,p),overlay:{kind:"applying",target:d.targetVersion,phase:m,elapsedSeconds:p}}}return{status:"ready",section:DOe(t,o,a,c),overlay:{kind:"none"}}}function FOe(e){const{data:t,isError:n,error:r,held:o,now:a}=e,l=t?.run??null;if(Zj(r)&&!o)return{surface:{status:"absent"},releaseHeld:!0};if(o){const c=UOe(o,t,l,n,a);return c||{surface:_L(e),releaseHeld:!0}}return{surface:_L(e),releaseHeld:!1}}const zOe=3e4,$Oe=5e3,jOe=K_,BOe={...K_,...Gte},HOe=3e4,qOe="The updater did not answer. Run `remit logs updater` to see why.";function VOe(e,t,n,r){if(Zj(e)&&!n)return!1;const o=t!==null&&t.outcome===null;return n||o||r?$Oe:zOe}function WOe(){const e=Ws(),[t,n]=_.useState(null),[r,o]=_.useState(null),[a,l]=_.useState(null),[c,d]=_.useState(null),[f,p]=_.useState(null),m=_.useRef(t);m.current=t;const g=_.useRef(a);g.current=a;const v=e.getQueryData(e_()),S=t!==null||f_(v,r)!==null,C=Qi({...AEe(),retry:!1,meta:S?BOe:jOe,refetchInterval:F=>VOe(F.state.error,F.state.data?.run??null,m.current!==null,g.current!==null)}),w=_.useRef(C.data);w.current=C.data;const x=FOe({data:C.data,isError:C.isError,error:C.error,held:t,dismissedRunId:r,checkPress:a,checkFailure:c,sighting:f,now:Date.now()}),I=f_(C.data,r);_.useEffect(()=>{if(I===null){p(F=>F===null?F:null);return}p(F=>F!==null&&F.runId===I.runId?F:{runId:I.runId,observedAt:Date.now()})},[I]);const T=_.useRef(null);T.current=x.surface.status==="ready"&&"runId"in x.surface.section?x.surface.section.runId:null;const{releaseHeld:O}=x;_.useEffect(()=>{O&&n(F=>F===null?F:null)},[O]),_.useEffect(()=>{a!==null&&Kj(a,C.data)&&l(null)},[a,C.data]),_.useEffect(()=>{if(a===null)return;const F=a.pressedAt+HOe-Date.now(),q=setTimeout(()=>{l(null),d(qOe)},Math.max(0,F));return()=>clearTimeout(q)},[a]);const{refetch:D}=C,P=_.useCallback(()=>{d(null),l({pressedAt:Date.now(),since:w.current?.check.lastCheckedAt}),_7({query:{refresh:!0},throwOnError:!0}).then(()=>{D()}).catch(F=>{Kv(F,K_),l(null),d(MOe(F))})},[D]),M=_.useCallback(()=>{D()},[D]),L=Y2({...TEe(),meta:{softError:!0},onSuccess:F=>{const q=F.run;q!==null&&(n({runId:q.runId,attemptedVersion:q.targetVersion,previousVersion:q.fromVersion,phase:XI(q.phase),startedAt:Date.now()}),o(null)),e.setQueryData(e_(),F)},onError:()=>{D()}}),{mutate:z}=L,G=_.useCallback(F=>{z({body:{targetVersion:F}})},[z]),j=_.useCallback(()=>{T.current!==null&&o(T.current),n(null),l(null),d(null)},[]);return{surface:x.surface,appliesSchemaMigration:POe(C.data),currentVersion:C.data?.currentVersion,release:Yj(C.data,Date.now()),onCheck:P,install:G,onDismissResult:j,onRetryConnection:M}}const JI=_.createContext(null);function GOe({children:e}){const t=WOe();return _.createElement(JI.Provider,{value:t},e)}function KOe(){const e=_.useContext(JI);if(e===null)throw new Error("useSelfUpdate must be used within a SelfUpdateProvider");return e}function ZOe(){return _.useContext(JI)}function YOe(){const{surface:e,onRetryConnection:t}=KOe();if(e.status!=="ready")return null;const{overlay:n}=e;return n.kind==="applying"?R.jsx(Ote,{target:n.target,phase:n.phase,elapsedSeconds:n.elapsedSeconds}):n.kind==="neverCameBack"?R.jsx(Mte,{attemptedVersion:n.attemptedVersion,previousVersion:n.previousVersion,elapsedSeconds:n.elapsedSeconds,logsCommand:n.logsCommand,onRetryConnection:t}):null}const QOe=()=>typeof globalThis.crypto<"u"&&typeof globalThis.crypto.randomUUID=="function"?globalThis.crypto.randomUUID():`banner-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,XOe=({children:e})=>{const[t,n]=_.useState([]),r=_.useCallback(c=>{if(c.error!=null&&C8(c.error))return Bc(c.error).correlationId;const d=qRe({...c,action:zRe(c)},QOe(),Date.now());return n(f=>BRe(f,d)),d.id},[]),o=_.useCallback(c=>{n(d=>HRe(d,c))},[]),a=_.useCallback(()=>{n([])},[]),l=_.useMemo(()=>({errors:t,pushError:r,dismissError:o,clearAll:a}),[t,r,o,a]);return R.jsxs(Uj.Provider,{value:l,children:[e,R.jsx(Aee,{errors:t,onDismiss:o})]})},IL="mt-6 inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-md bg-accent px-4 text-sm font-medium text-accent-fg hover:bg-accent-hover focus-visible:ring-2 focus-visible:ring-ring";function eB(){const[e,t]=_.useState(Ave),{Account:n}=Ive(),r=_.useRef(null);return _.useEffect(()=>Tve(t),[]),ov({id:"signed-out",open:e}),av(r,e),e?R.jsx("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-canvas/80 p-4 backdrop-blur-sm",children:R.jsxs("div",{ref:r,role:"alertdialog","aria-modal":"true","aria-labelledby":"signed-out-title","aria-describedby":"signed-out-text",tabIndex:-1,className:"w-full max-w-sm rounded-lg border border-line bg-surface p-6 shadow-xl outline-none",children:[R.jsx("h2",{id:"signed-out-title",className:"text-lg font-semibold text-fg",children:"You're signed out"}),R.jsx("p",{id:"signed-out-text",className:"mt-2 text-sm text-fg-muted",children:"The server no longer accepts this session. Sign in again to carry on here; you will come back to this screen."}),R.jsx(n,{fallback:R.jsxs("button",{type:"button",onClick:()=>{LD(),window.location.reload()},className:IL,children:[R.jsx(AN,{className:"size-4","aria-hidden":"true"}),"Sign in"]}),children:({signOut:o})=>R.jsxs("button",{type:"button",onClick:()=>{LD(),o()},className:IL,children:[R.jsx(AN,{className:"size-4","aria-hidden":"true"}),"Sign in"]})})]})}):null}const JOe=({error:e,reset:t,info:n})=>{if(hv(e))return Gv(),R.jsx(eB,{});const r=uv(e),o=Bc(e,{recoverable:r,componentStack:n?.componentStack});return R.jsx(R8,{fatal:o,onRetry:r?t:void 0})},Qs=kge()({component:nMe,errorComponent:JOe}),eMe=()=>{const{t:e}=x7("common",{useSuspense:!1});return R.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:z-50 focus:p-4 focus:bg-canvas focus:text-fg focus:rounded-md",children:e("accessibility.skipToContent","Skip to main content")})},tMe=({children:e})=>iu().updateMode==="managed"?e:R.jsxs(GOe,{children:[e,R.jsx(YOe,{})]});function nMe(){return R.jsxs(XOe,{children:[R.jsx(gOe,{children:R.jsx(yOe,{children:R.jsx(AOe,{children:R.jsx(tMe,{children:R.jsxs(kEe,{children:[R.jsx(eMe,{}),R.jsx("main",{id:"main-content",className:"h-dvh overflow-hidden",children:R.jsx(_.Suspense,{fallback:R.jsx(lv,{}),children:R.jsx(X9,{})})})]})})})})}),R.jsx(T8,{}),R.jsx(eB,{})]})}const rMe=xe("/")({beforeLoad:()=>{throw cl({to:"/mail/brief"})}}),oMe=iu().apiUrl;pe.setConfig({baseUrl:oMe,fetch:hU});pe.interceptors.error.use((e,t)=>e instanceof Zf||!t?e:zte(e,t.status));const aMe=()=>Me(()=>import("./calendar-Cf7D8za1.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),sMe=xe("/calendar")({loader:({context:{queryClient:e}})=>{e.prefetchQuery(xI())},component:Oe(aMe,"component")}),iMe=()=>Me(()=>import("./import-DJMjk1Ri.js"),__vite__mapDeps([14,15,16,17,18,19,20,21,22])),lMe=xe("/import")({component:Oe(iMe,"component")}),cMe=de(["match","properties","folder","rule","name","review","run"]),uMe=he("search"),dMe=uMe.optional().catch(void 0),fMe=()=>Vv({from:"/mail",select:e=>e.wizardFrom}),hMe=cMe.optional().catch(void 0),pMe=(e,t)=>m8(e,t)+1,tB=()=>Vv({from:"/mail",select:e=>e.wizard}),mMe=()=>{const e=nh();return _.useCallback((t,n)=>{e({to:".",search:r=>({...r,wizard:t,wizardFrom:n})})},[e])},l6e=()=>{const e=tB(),t=mMe(),[n,r]=_.useState("organize"),o=_.useCallback(l=>{r(l),t("match")},[t]),a=_.useCallback(()=>{t("properties","search")},[t]);return{verb:n,start:o,startFromSearch:a,isOpen:e!==void 0}},c6e=e=>{const t=gr(),n=nh(),r=tB(),o=fMe(),a=_.useRef(r!==void 0),l=_.useRef(o),c=_.useRef(void 0);_.useEffect(()=>{c.current=void 0},[r]),_.useEffect(()=>{if(!a.current)return;a.current=!1;const m=l.current;(async()=>(await n({to:".",search:g=>({...g,wizard:void 0,wizardFrom:void 0}),replace:!0}),await n({to:".",search:g=>({...g,wizard:e,wizardFrom:m})})))()},[e,n]);const d=_.useCallback(m=>{m===r||c.current===m||(c.current=m,n({to:".",search:g=>({...g,wizard:m})}))},[n,r]),f=_.useCallback(()=>{t.history.back()},[t]),p=_.useCallback((m,g)=>{t.history.go(-pMe(m,g))},[t]);return{step:r,goToStep:d,goBack:f,closeWizard:p}},Su=U({q:E().optional()}),eA=Su.extend({}),nB=Su.extend({}),rB=Su.extend({}),gMe=Su.extend({}),oB=Su.extend({}),aB=eA,vMe=Su.extend({wizard:hMe,wizardFrom:dMe}),bm=U({body:E().optional()}),u6e=e=>{const{body:t,...n}=e;return n},Ay={brief:eA.extend(bm.shape),flagged:nB.extend(bm.shape),mailbox:oB.extend(bm.shape),label:rB.extend(bm.shape)},yMe=new Map;function bMe({fullPath:e,hierarchyDelimiter:t}){return e.split(t).some(n=>n.endsWith("_remit"))}function d6e(e){const t=new Map;for(const n of e){const r=Iy(n.folderAppointments);for(const[o,a]of r)t.set(o,{role:a});for(const o of n.mailboxes){if(bMe(o))continue;const a=r.get(o.mailboxId),l={providerPath:o.fullPath,hierarchyDelimiter:o.hierarchyDelimiter};t.set(o.mailboxId,a?{role:a,...l}:l)}}return t}function f6e(e){const t=[];for(const[n,r]of e)r.role==="junk"&&t.push(n);return t}function h6e(e,t){const n=t[0];if(!e)return n?{mailboxId:n}:{};for(const o of t){const a=e.get(o);if(a&&rte(a)!==void 0)return{mailboxId:o,folder:a}}if(!n)return{};const r=e.get(n);return{mailboxId:n,...r?{folder:r}:{}}}const SMe=_.createContext(null),p6e=()=>_.useContext(SMe)??{accounts:[],mailboxNameIndex:new Map,accountNameIndex:new Map,resultFolderIndex:yMe,searchQuery:"",searchInput:"",searchViewKey:"",onSearchChange:()=>{},onSearchClear:()=>{},onSearchClearQuery:()=>{},intelligenceOpen:!1,onToggleIntelligence:()=>{},onRaiseIntelligence:()=>{}},CMe=()=>Me(()=>import("./mail-B-_K5JCo.js"),__vite__mapDeps([23,5,4,3,1,2,6,7,8,9,10,11,24,25,26,27,28,29,30,31,32,17,13,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])),EMe=xe("/mail")({loader:({context:{queryClient:e}})=>{e.prefetchQuery(xI()),e.prefetchQuery({...REe(),staleTime:6e4})},component:Oe(CMe,"component"),validateSearch:vMe}),wMe=()=>Me(()=>import("./onboarding-pnezHKXj.js"),__vite__mapDeps([50,51,15,16,17,18,19,30,10,21,49,52,22])),xMe=xe("/onboarding")({component:Oe(wMe,"component")});function _Me(){const e=ZOe(),t=e?.surface.status==="ready"&&e.surface.section.status==="available";return R.jsx(o8,{label:t?"Update available":void 0,children:R.jsx(nJ,{className:"size-4"})})}function IMe(){return Qi({...vEe()})}const Rw={listed:"Sync warnings",unread:"Warnings could not be read",signedOut:"Session ended"};function AMe(e,t){if(hv(t))return Rw.signedOut;if(t)return Rw.unread;if(e&&((e.entries?.length??0)>0||(e.warnings?.length??0)>0))return Rw.listed}function TMe(){const e=IMe();return AMe(e.data,e.error)}function RMe(){const e=TMe();return R.jsx(o8,{label:e,children:R.jsx(j_,{className:"size-4"})})}const OMe=pv(403,404),m6e={...pv(403,404,409,429),...Kte},MMe=new Set([Oi.SignInDisabled,Oi.CallerDisabled]),sB=e=>{if(mn(e)!==403)return!1;const t=ol(e)?.code;return t!==void 0&&MMe.has(t)},NMe=e=>{if(fv(e))return"The server could not be reached. Nothing changed. Try again.";const t=ol(e)?.code;return t===Oi.CannotDisableSelf?"You cannot disable your own account, so one account always stays on.":t===Oi.StepUpRequired?"The password check did not carry over to the action. Nothing changed. Try again.":t===Oi.ForeignOrigin?"The server refused a request from this address. Nothing changed. Open this page from the server's own address.":mn(e)===404?"That account is gone, or this server no longer has a People page. Reload the page.":"Something went wrong on the server. Nothing changed. Try again."},g6e=e=>fv(e)?"The server could not be reached. Check your connection and try again.":"The server did not answer as expected. Try again.",v6e=e=>{if(mn(e)===401||sB(e))return{kind:"signedOut"};const t=ol(e)?.code;return t===Oi.WrongPassword?{kind:"wrongPassword"}:t===Oi.StepUpLocked?{kind:"locked"}:{kind:"failed",reason:NMe(e)}},y6e=(e,t)=>e==="Disable"?{title:`Disable ${t}?`,body:"They are signed out everywhere within 15 minutes and cannot sign in until you enable them again. Their calendar feed links stop working. Their mail stays.",confirmLabel:"Disable",failedTitle:`${t} was not disabled`,destructive:!0}:e==="Enable"?{title:`Enable ${t}?`,body:"They can sign in again with their password. Calendar feed links they shared before stay off; they make new ones in Settings.",confirmLabel:"Enable",failedTitle:`${t} was not enabled`,destructive:!1}:e==="SignOut"?{title:`Sign ${t} out everywhere?`,body:"Every session and connected app of theirs ends within 15 minutes. They can sign in again with their password.",confirmLabel:"Sign out everywhere",failedTitle:`${t} was not signed out`,destructive:!0}:{title:`Reset the password of ${t}?`,body:"Their password stops working at once and they are signed out everywhere. You get a link to give them, which works once, for 24 hours.",confirmLabel:"Make a reset link",failedTitle:`No reset link was made for ${t}`,destructive:!0},b6e=(e,t)=>{const n=mn(t),r=ol(t)?.code,o=t instanceof Error?t.message:String(t),a=[n??"no response",r,o].filter(l=>l!==void 0&&l!=="").join(" ");return cu(Hi({title:`People: ${e}`,errorMessage:`${e}. The server answered: ${a}`}))},PMe=(e,t)=>e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),S6e=(e,t)=>PMe(new Date(e),t)?"Today":Mj(e,"medium"),C6e=(e,t)=>e.map(n=>n.userId===t.userId?t:n),kMe=()=>({..._Ee(),meta:OMe,retry:!1}),DMe=()=>{const e=Qi(kMe()),t=e.isError&&sB(e.error);return _.useEffect(()=>{t&&Gv()},[t]),{...e,unavailable:e.isError&&E8(e.error)}},iB=_.createContext([]),LMe=iB.Provider,UMe=()=>_.useContext(iB),FMe=()=>Me(()=>import("./settings-C8z99CK0.js"),[]),zMe=[{id:"accounts",label:"Accounts",icon:R.jsx(OU,{className:"size-4"})},{id:"senders",label:"Senders & Rules",icon:R.jsx(tJ,{className:"size-4"})},{id:"folders",label:"Folder roles",icon:R.jsx(BX,{className:"size-4"})},{id:"filters",label:"Filters",icon:R.jsx(HX,{className:"size-4"})},{id:"labels",label:"Labels",icon:R.jsx(XX,{className:"size-4"})},{id:"classification",label:"Mail classification",icon:R.jsx(YX,{className:"size-4"})},{id:"spam",label:"Spam & phishing",icon:R.jsx(ZX,{className:"size-4"})},{id:"calendars",label:"Calendars",icon:R.jsx(DX,{className:"size-4"})},{id:"appearance",label:"Appearance",icon:R.jsx(WX,{className:"size-4"})},{id:"warnings",label:"Warnings",icon:R.jsx(RMe,{})},{id:"advanced",label:"Advanced",icon:R.jsx(_Me,{})}],$Me={id:"people",label:"People",icon:R.jsx(eJ,{className:"size-4"})},E6e=()=>{const e=DMe(),t=UMe(),n=[...zMe];if(n.splice(1,0,...t.map(({id:o,label:a,icon:l})=>({id:o,label:a,icon:l}))),!e.isSuccess)return n;const r=n.findIndex(o=>o.id==="advanced");return[...n.slice(0,r),$Me,...n.slice(r)]},jMe=xe("/settings")({component:Oe(FMe,"component")}),BMe=["year","month","week","day","agenda"],HMe=de(BMe),lB="week",w6e=e=>e==="agenda";function qMe(e){const t=HMe.safeParse(e);return t.success?t.data:void 0}const VMe=/^\d{4}-\d{2}-\d{2}$/;function WMe(e){if(!VMe.test(e))return;const[t,n,r]=e.split("-").map(Number),o=Date.UTC(t,n-1,r),a=new Date(o);if(a.getUTCFullYear()===t&&a.getUTCMonth()===n-1&&a.getUTCDate()===r)return e}const Qc=e=>String(e).padStart(2,"0");function cB(e){return`${e.getFullYear()}-${Qc(e.getMonth()+1)}-${Qc(e.getDate())}`}function GMe(e,t){return{view:qMe(e.view)??lB,date:WMe(e.date)??t}}function x6e(e,t,n){const[r,o,a]=e.split("-").map(Number);if(t==="year")return AL(r+n,o,a);if(t==="month")return AL(r,o+n,a);const l=t==="day"?1:7,c=new Date(Date.UTC(r,o-1,a+l*n));return KMe(c)}const KMe=e=>`${e.getUTCFullYear()}-${Qc(e.getUTCMonth()+1)}-${Qc(e.getUTCDate())}`;function AL(e,t,n){const r=e+Math.floor((t-1)/12),o=((t-1)%12+12)%12+1,a=new Date(Date.UTC(r,o,0)).getUTCDate();return`${r}-${Qc(o)}-${Qc(Math.min(n,a))}`}const ZMe=E().min(1);function YMe(e){const t=e==null?[]:[e].flat(),n=new Set;for(const r of t){if(typeof r!="string"&&typeof r!="number")continue;const o=ZMe.safeParse(String(r));o.success&&n.add(o.data)}return[...n].sort()}const tA=U({calendarId:Ji().transform(YMe).transform(e=>e.length===0?void 0:e).optional()});function _6e(e,t){return t?e==="week"?"day":e==="year"?"month":e:e}const QMe=xe("/calendar/")({validateSearch:tA,beforeLoad:({search:e,location:t})=>{throw cl({to:"/calendar/$view/$date",params:{view:lB,date:cB(new Date)},search:e,hash:t.hash,replace:!0})}}),XMe=xe("/mail/")({validateSearch:aB,beforeLoad:({search:e,location:t})=>{throw cl({to:"/mail/brief",search:e,hash:t.hash,replace:!0})}}),JMe=()=>Me(()=>import("./_mailboxId-CjHcitFP.js"),__vite__mapDeps([53,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,54,45,55,56,49,9,39,38,40,41,57,18,58,59,37,8,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,73,74,35,36,75,76,77,78,79,80,81])),eNe=xe("/mail/$mailboxId")({component:Oe(JMe,"component"),validateSearch:oB}),tNe=()=>Me(()=>import("./brief-DBLwMpYO.js"),__vite__mapDeps([82,13])),nNe=()=>Me(()=>import("./brief--Wmhw18k.js"),__vite__mapDeps([83,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,84,55,56,49,9,39,38,40,41,57,18,58,59,37,8,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,73,74,75,35,36,85,81])),rNe=xe("/mail/brief")({component:Oe(nNe,"component"),validateSearch:eA,errorComponent:Oe(tNe,"errorComponent")}),oNe=()=>Me(()=>import("./flagged-Cj4ARwpT.js"),__vite__mapDeps([86,13])),aNe=()=>Me(()=>import("./flagged-BLzcJrUz.js"),__vite__mapDeps([87,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,88,44,38,45,55,56,49,9,39,40,41,57,18,58,59,37,8,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,73,74,76,85,81])),sNe=xe("/mail/flagged")({component:Oe(aNe,"component"),validateSearch:nB,errorComponent:Oe(oNe,"errorComponent")}),iNe=()=>Me(()=>import("./outbox-CLnMeXYO.js"),__vite__mapDeps([89,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,90,56,49,47,77,42,9,36,70,91,92,81])),lNe=xe("/mail/outbox")({component:Oe(iNe,"component"),validateSearch:gMe}),cNe=xe("/reset-password/$token")({beforeLoad:()=>{throw cl({to:"/"})}}),uNe=()=>Me(()=>import("./index-B3pRGruo.js"),[]),dNe=xe("/settings/")({component:Oe(uNe,"component")}),fNe=()=>Me(()=>import("./_slotId-BgSRkGdw.js"),__vite__mapDeps([93,4,3,6,94,7,18,95,42,62])),hNe=xe("/settings/$slotId")({component:Oe(fNe,"component")}),pNe=()=>Me(()=>import("./accounts-B2HAE5Mp.js"),__vite__mapDeps([96,51,15,16,17,18,19,30,10,21,49,52,29,97,33,13,60,6,98,94,7,95,42,62,64,91])),mNe=U({editAccountId:E().optional(),focusSmtp:le().optional(),connected:E().optional(),oauthError:E().optional(),oauthEmail:E().optional(),missingServices:E().optional()}),gNe=xe("/settings/accounts")({component:Oe(pNe,"component"),validateSearch:mNe}),vNe=()=>Me(()=>import("./advanced-BBWKSR4H.js"),__vite__mapDeps([99,20,4,3,5,6,19,60,18,21,92,80,100,74,70,78,98,49,94,7,95,42,62])),yNe=xe("/settings/advanced")({component:Oe(vNe,"component")}),bNe=()=>Me(()=>import("./appearance-oUeDfZvm.js"),__vite__mapDeps([101,6,98,49,94,7,18,95,42,62,71])),SNe=xe("/settings/appearance")({component:Oe(bNe,"component")}),CNe=()=>Me(()=>import("./calendars-9OZeuRv6.js"),__vite__mapDeps([102,66,13,38,41,16,17,19,64,103,31,104,105,25,62,33,18,37,106,6,94,7,95,42])),ENe=xe("/settings/calendars")({component:Oe(CNe,"component")}),wNe=()=>Me(()=>import("./classification-BxsZLEnC.js"),__vite__mapDeps([107,108,13,109,16,17,33,97,18,6,94,7,95,42,62])),xNe=xe("/settings/classification")({component:Oe(wNe,"component")}),_Ne=()=>Me(()=>import("./filters-BOpD_izN.js"),__vite__mapDeps([110,13,3,40,41,63,32,16,17,64,73,71,80,79,18,6,94,7,95,42,62])),INe=U({filterId:E().optional()}),ANe=xe("/settings/filters")({component:Oe(_Ne,"component"),validateSearch:INe}),TNe=()=>Me(()=>import("./folders-NwCVYN5L.js"),__vite__mapDeps([111,41,72,46,6,94,7,18,95,42,62,13,16,17,25])),RNe=xe("/settings/folders")({component:Oe(TNe,"component")}),ONe=()=>Me(()=>import("./labels-CwGUliq_.js"),__vite__mapDeps([112,73,40,41,16,17,6,94,7,18,95,42,62,13,33])),MNe=xe("/settings/labels")({component:Oe(ONe,"component")}),NNe=()=>Me(()=>import("./people-BhhvdCU4.js"),__vite__mapDeps([113,109,106,59,6,94,7,18,95,42,62])),PNe=xe("/settings/people")({component:Oe(NNe,"component")}),kNe=["vip","muted","blocked","neverSpam"],DNe=()=>Me(()=>import("./senders-lMWjFLIX.js"),__vite__mapDeps([114,31,6,98,49,13,94,7,18,95,42,62])),LNe=U({group:de(kNe).optional()}),UNe=xe("/settings/senders")({component:Oe(DNe,"component"),validateSearch:LNe}),FNe=()=>Me(()=>import("./spam-D6paxCM2.js"),__vite__mapDeps([115,108,57,40,41,4,3,5,73,13,71,6,94,7,18,95,42,62])),zNe=xe("/settings/spam")({component:Oe(FNe,"component")}),$Ne=()=>Me(()=>import("./suggested-vips-DXCCMmOn.js"),[]),jNe=xe("/settings/suggested-vips")({component:Oe($Ne,"component")}),BNe=()=>Me(()=>import("./warnings-zZSUr-_I.js"),__vite__mapDeps([116,43,38,18,80,106,100,13,6,98,49,94,7,95,42,62])),HNe=xe("/settings/warnings")({component:Oe(BNe,"component")}),qNe=()=>Me(()=>import("./_view._date-BCOouUgc.js"),__vite__mapDeps([117,66,13,38,41,103,31,118,119,4,3,5,12,65,67,10,64,68,70,120,48,17,95,121,122,104,105,25,62,123,69,16,42,2,124])),VNe=xe("/calendar/$view/$date")({validateSearch:tA,beforeLoad:({params:e,search:t,location:n})=>{const r=GMe(e,cB(new Date));if(!(r.view===e.view&&r.date===e.date))throw cl({to:"/calendar/$view/$date",params:r,search:t,hash:n.hash,replace:!0})},component:Oe(qNe,"component")}),WNe=()=>Me(()=>import("./index-BoKIe_Hw.js"),__vite__mapDeps([125,54,45,55,56,49,34,11,4,3,5,24,9,17,39,38,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,35,36,75,76,77,78,79,80])),GNe=xe("/mail/$mailboxId/")({component:Oe(WNe,"component")}),KNe=()=>Me(()=>import("./_threadId-BGKDrxuA.js"),[]),ZNe=xe("/mail/$mailboxId/$threadId")({component:Oe(KNe,"component")}),YNe=()=>Me(()=>import("./index-h2rbe_XB.js"),__vite__mapDeps([126,84,55,56,49,34,11,4,3,5,24,9,17,39,38,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,75,35,36,85])),QNe=xe("/mail/brief/")({component:Oe(YNe,"component")}),XNe=()=>Me(()=>import("./_threadId-D9ge4hnK.js"),[]),JNe=xe("/mail/brief/$threadId")({component:Oe(XNe,"component")}),ePe=()=>Me(()=>import("./index-6MdUWIJB.js"),__vite__mapDeps([127,88,44,38,45,55,56,49,34,11,4,3,5,24,9,17,39,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,76,85])),tPe=xe("/mail/flagged/")({component:Oe(ePe,"component")}),nPe=()=>Me(()=>import("./_threadId-Ba8E2aAx.js"),[]),rPe=xe("/mail/flagged/$threadId")({component:Oe(nPe,"component")}),oPe=xe("/mail/label/")({validateSearch:aB,beforeLoad:({search:e,location:t})=>{throw cl({to:"/mail/brief",search:e,hash:t.hash,replace:!0})}}),aPe=()=>Me(()=>import("./_labelId-QQEJSaaH.js"),__vite__mapDeps([128,26,5,4,3,24,27,28,29,30,31,32,6,17,13,33,34,11,88,44,38,45,55,56,49,9,39,40,41,57,18,58,59,37,8,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,73,74,76,85,81])),sPe=xe("/mail/label/$labelId")({component:Oe(aPe,"component"),validateSearch:rB}),iPe=()=>Me(()=>import("./index-PBPFqVVA.js"),__vite__mapDeps([129,90,56,49,34,11,4,3,5,24,47,77,42,9,36,70,91,92])),lPe=xe("/mail/outbox/")({component:Oe(iPe,"component")}),cPe=()=>Me(()=>import("./index-DtqBFgK5.js"),[]),uPe=xe("/calendar/$view/$date/")({component:Oe(cPe,"component")}),dPe=()=>Me(()=>import("./_calendarObjectId-DA9THlEZ.js"),[]),fPe=xe("/calendar/$view/$date/$calendarObjectId")({component:Oe(dPe,"component")}),_a=e=>String(e).padStart(2,"0"),uB=e=>`${e.getUTCFullYear()}-${_a(e.getUTCMonth()+1)}-${_a(e.getUTCDate())}`,nA=e=>{const t=e<0?"-":"+",n=Math.abs(e);return`${t}${_a(Math.floor(n/60))}:${_a(n%60)}`};function dB(e,t){const n=new Date(`${e}T${t}:00`);return`${e}T${t}:00${nA(-n.getTimezoneOffset())}`}const Ow=new Map;function hPe(e){if(Ow.has(e))return Ow.get(e);let t;try{t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{t=void 0}return Ow.set(e,t),t}function m_(e,t){const n=hPe(e);if(!n)return Number.NaN;const r=n.formatToParts(new Date(t)),o=c=>Number(r.find(d=>d.type===c)?.value),a=o("hour")%24;return(Date.UTC(o("year"),o("month")-1,o("day"),a,o("minute"),o("second"))-t)/6e4}function TL(e,t,n){if(n==="")return`${e}T${t}:00+00:00`;const r=Date.parse(`${e}T${t}:00Z`),o=m_(n,r);if(Number.isNaN(o))return dB(e,t);const a=m_(n,r-o*6e4);return`${e}T${t}:00${nA(Number.isNaN(a)?o:a)}`}function RL(e,t){const n=Date.parse(e),r=m_(t,n),o=Number.isNaN(r)?-new Date(n).getTimezoneOffset():r,a=new Date(n+o*6e4);return`${uB(a)}T${_a(a.getUTCHours())}:${_a(a.getUTCMinutes())}:${_a(a.getUTCSeconds())}${nA(o)}`}const $g=e=>dB(e,"00:00");function Ts(e,t){const[n,r,o]=e.split("-").map(Number);return uB(new Date(Date.UTC(n,r-1,o+t)))}function Mw(e){const[t,n,r]=e.split("-").map(Number),o=new Date(Date.UTC(t,n-1,r));return Ts(e,-((o.getUTCDay()+6)%7))}function pPe(e,t){const[n,r]=t.split("-").map(Number);if(e==="year")return[`${n}-01-01`,`${n+1}-01-01`];if(e==="month"){const a=`${n}-${_a(r)}-01`,l=r===12?`${n+1}-01-01`:`${n}-${_a(r+1)}-01`;return[Mw(a),Ts(Mw(Ts(l,-1)),7)]}if(e==="day")return[t,Ts(t,1)];const o=Mw(t);return[o,Ts(o,7)]}function I6e(e,t){const[n,r]=pPe(e,t);return{from:$g(n),to:$g(r)}}function A6e(e,t){return{from:$g(e),to:$g(Ts(e,t))}}const mPe=dAe({offset:!0,local:!1}),fB=fAe(),OL=Ji().transform(e=>{const t=Ke([mPe,fB]).safeParse(e);return t.success?t.data:void 0}).optional(),gPe=tA.extend({start:OL,end:OL}),Sm=e=>fB.safeParse(e).success;function Cm(e){return{date:e,endDate:e,startTime:"09:00",endTime:"10:00",allDay:!1}}function T6e(e,t,n,r){if(e===void 0||t===void 0)return Cm(n);if(Sm(e)&&Sm(t)){const l=Ts(t,-1);return l<e?Cm(n):{date:e,endDate:l,startTime:"",endTime:"",allDay:!0}}if(Sm(e)||Sm(t)||Date.parse(t)<=Date.parse(e))return Cm(n);const o=RL(e,r),a=RL(t,r);return{date:o.slice(0,10),endDate:a.slice(0,10),startTime:o.slice(11,16),endTime:a.slice(11,16),allDay:!1}}function R6e(e,t){return e.allDay?{start:e.date,end:Ts(e.endDate,1)}:{start:TL(e.date,e.startTime,t),end:TL(e.endDate,e.endTime,t)}}const vPe=()=>Me(()=>import("./new-DKJdGwfE.js"),__vite__mapDeps([130,131,122,67,104,105,66,13,38,41,25,62,119,118,103,31,68,4,3,12,5,121,123,132,16,17,33])),yPe=xe("/calendar/$view/$date/new")({validateSearch:gPe,component:Oe(vPe,"component")}),bPe=()=>Me(()=>import("./index-CO7AhNVu.js"),__vite__mapDeps([133,54,45,55,56,49,34,11,4,3,5,24,9,17,39,38,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,35,36,75,76,77,78,79,80])),SPe=xe("/mail/$mailboxId/$threadId/")({component:Oe(bPe,"component")}),CPe=()=>Me(()=>import("./_messageId-CO7AhNVu.js"),__vite__mapDeps([134,54,45,55,56,49,34,11,4,3,5,24,9,17,39,38,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,35,36,75,76,77,78,79,80])),EPe=xe("/mail/$mailboxId/$threadId/$messageId")({component:Oe(CPe,"component")}),wPe=()=>Me(()=>import("./compose._-_outboxMessageId_-CivLnC_Q.js"),__vite__mapDeps([135,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),xPe=xe("/mail/$mailboxId/compose/{-$outboxMessageId}")({component:Oe(wPe,"component")}),_Pe=()=>Me(()=>import("./index-D0sfforj.js"),__vite__mapDeps([136,84,55,56,49,34,11,4,3,5,24,9,17,39,38,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,75,35,36,85])),IPe=xe("/mail/brief/$threadId/")({component:Oe(_Pe,"component")}),APe=()=>Me(()=>import("./_messageId-D0sfforj.js"),__vite__mapDeps([137,84,55,56,49,34,11,4,3,5,24,9,17,39,38,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,75,35,36,85])),TPe=xe("/mail/brief/$threadId/$messageId")({component:Oe(APe,"component")}),RPe=()=>Me(()=>import("./compose._-_outboxMessageId_-BGkih4eY.js"),__vite__mapDeps([138,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),OPe=xe("/mail/brief/compose/{-$outboxMessageId}")({component:Oe(RPe,"component")}),MPe=()=>Me(()=>import("./index-CR5Op_4t.js"),__vite__mapDeps([139,88,44,38,45,55,56,49,34,11,4,3,5,24,9,17,39,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,76,85])),NPe=xe("/mail/flagged/$threadId/")({component:Oe(MPe,"component")}),PPe=()=>Me(()=>import("./_messageId-BR_TgwKr.js"),__vite__mapDeps([140,88,44,38,45,55,56,49,34,11,4,3,5,24,9,17,39,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,76,85])),kPe=xe("/mail/flagged/$threadId/$messageId")({component:Oe(PPe,"component")}),DPe=()=>Me(()=>import("./compose._-_outboxMessageId_-nFk2BCjJ.js"),__vite__mapDeps([141,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),LPe=xe("/mail/flagged/compose/{-$outboxMessageId}")({component:Oe(DPe,"component")}),UPe=()=>Me(()=>import("./index-DqCcXbbs.js"),__vite__mapDeps([142,88,44,38,45,55,56,49,34,11,4,3,5,24,9,17,39,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,76,85])),FPe=xe("/mail/label/$labelId/")({component:Oe(UPe,"component")}),zPe=()=>Me(()=>import("./_threadId-Br_FU4M4.js"),[]),$Pe=xe("/mail/label/$labelId/$threadId")({component:Oe(zPe,"component")}),jPe=()=>Me(()=>import("./compose._-_outboxMessageId_-cX-iEK_S.js"),__vite__mapDeps([143,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),BPe=xe("/mail/outbox/compose/{-$outboxMessageId}")({component:Oe(jPe,"component")}),HPe=()=>Me(()=>import("./_outboxMessageId-CuYUqctH.js"),__vite__mapDeps([144,90,56,49,34,11,4,3,5,24,47,77,42,9,36,70,91,92])),qPe=xe("/mail/outbox/draft/$outboxMessageId")({component:Oe(HPe,"component")}),VPe=()=>Me(()=>import("./index-GZXGsbCN.js"),__vite__mapDeps([145,146,66,13,38,41,119,118,68,4,3,12,5,123,105,25,104,62,33])),WPe=xe("/calendar/$view/$date/$calendarObjectId/")({component:Oe(VPe,"component")}),GPe=()=>Me(()=>import("./_recurrenceId-CLQuwNQw.js"),[]),KPe=xe("/calendar/$view/$date/$calendarObjectId/$recurrenceId")({component:Oe(GPe,"component")}),ZPe=()=>Me(()=>import("./edit-DRr0H801.js"),__vite__mapDeps([147,131,122,67,104,105,66,13,38,41,25,62,119,118,103,31,68,4,3,12,5,121,123,132,16,17,33])),YPe=xe("/calendar/$view/$date/$calendarObjectId/edit")({component:Oe(ZPe,"component")}),QPe=()=>Me(()=>import("./suggestion._suggestionId-zlbObxkn.js"),__vite__mapDeps([148,66,13,38,41,122,67,104,105,25,62,68,123,69,61,132,16,17,4,3,12,5])),XPe=xe("/calendar/$view/$date/suggestion/$suggestionId")({component:Oe(QPe,"component")}),JPe=()=>Me(()=>import("./task._calendarTaskId-CgBc-n43.js"),__vite__mapDeps([149,66,13,38,41,118,4,3,12,5,120,105,25])),eke=xe("/calendar/$view/$date/task/$calendarTaskId")({component:Oe(JPe,"component")}),tke=()=>Me(()=>import("./index-BDF8UTpu.js"),__vite__mapDeps([150,88,44,38,45,55,56,49,34,11,4,3,5,24,9,17,39,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,76,85])),nke=xe("/mail/label/$labelId/$threadId/")({component:Oe(tke,"component")}),rke=()=>Me(()=>import("./_messageId-CAxQBVFC.js"),__vite__mapDeps([151,88,44,38,45,55,56,49,34,11,4,3,5,24,9,17,39,40,41,28,29,30,31,32,6,57,18,58,59,37,8,13,10,60,7,61,62,63,16,64,65,66,67,68,12,69,52,70,71,2,42,72,33,73,74,76,85])),oke=xe("/mail/label/$labelId/$threadId/$messageId")({component:Oe(rke,"component")}),ake=()=>Me(()=>import("./compose._-_outboxMessageId_-DhaK6pb5.js"),__vite__mapDeps([152,27,28,24,5,4,3,29,30,31,32,6,17,13,33])),ske=xe("/mail/label/$labelId/compose/{-$outboxMessageId}")({component:Oe(ake,"component")}),ike=()=>Me(()=>import("./index-DLuz5acm.js"),__vite__mapDeps([153,146,66,13,38,41,119,118,68,4,3,12,5,123,105,25,104,62,33])),lke=xe("/calendar/$view/$date/$calendarObjectId/$recurrenceId/")({component:Oe(ike,"component")}),cke=()=>Me(()=>import("./edit-CO4QGWtB.js"),__vite__mapDeps([154,131,122,67,104,105,66,13,38,41,25,62,119,118,103,31,68,4,3,12,5,121,123,132,16,17,33])),uke=xe("/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit")({component:Oe(cke,"component")}),dke=xe("/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:Ay.mailbox}),fke=xe("/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:Ay.brief}),hke=xe("/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:Ay.flagged}),pke=xe("/mail/label/$labelId/$threadId/$messageId/$mode/{-$outboxMessageId}")({validateSearch:Ay.label}),mke=rMe.update({id:"/",path:"/",getParentRoute:()=>Qs}),rA=sMe.update({id:"/calendar",path:"/calendar",getParentRoute:()=>Qs}),gke=lMe.update({id:"/import",path:"/import",getParentRoute:()=>Qs}),Xs=EMe.update({id:"/mail",path:"/mail",getParentRoute:()=>Qs}),vke=xMe.update({id:"/onboarding",path:"/onboarding",getParentRoute:()=>Qs}),Wn=jMe.update({id:"/settings",path:"/settings",getParentRoute:()=>Qs}),yke=QMe.update({id:"/",path:"/",getParentRoute:()=>rA}),bke=XMe.update({id:"/",path:"/",getParentRoute:()=>Xs}),Ty=eNe.update({id:"/$mailboxId",path:"/$mailboxId",getParentRoute:()=>Xs}),Ry=rNe.update({id:"/brief",path:"/brief",getParentRoute:()=>Xs}),Oy=sNe.update({id:"/flagged",path:"/flagged",getParentRoute:()=>Xs}),My=lNe.update({id:"/outbox",path:"/outbox",getParentRoute:()=>Xs}),Ske=cNe.update({id:"/reset-password/$token",path:"/reset-password/$token",getParentRoute:()=>Qs}),Cke=dNe.update({id:"/",path:"/",getParentRoute:()=>Wn}),Eke=hNe.update({id:"/$slotId",path:"/$slotId",getParentRoute:()=>Wn}),wke=gNe.update({id:"/accounts",path:"/accounts",getParentRoute:()=>Wn}),xke=yNe.update({id:"/advanced",path:"/advanced",getParentRoute:()=>Wn}),_ke=SNe.update({id:"/appearance",path:"/appearance",getParentRoute:()=>Wn}),Ike=ENe.update({id:"/calendars",path:"/calendars",getParentRoute:()=>Wn}),Ake=xNe.update({id:"/classification",path:"/classification",getParentRoute:()=>Wn}),Tke=ANe.update({id:"/filters",path:"/filters",getParentRoute:()=>Wn}),Rke=RNe.update({id:"/folders",path:"/folders",getParentRoute:()=>Wn}),Oke=MNe.update({id:"/labels",path:"/labels",getParentRoute:()=>Wn}),Mke=PNe.update({id:"/people",path:"/people",getParentRoute:()=>Wn}),Nke=UNe.update({id:"/senders",path:"/senders",getParentRoute:()=>Wn}),Pke=zNe.update({id:"/spam",path:"/spam",getParentRoute:()=>Wn}),kke=jNe.update({id:"/suggested-vips",path:"/suggested-vips",getParentRoute:()=>Wn}),Dke=HNe.update({id:"/warnings",path:"/warnings",getParentRoute:()=>Wn}),Cu=VNe.update({id:"/$view/$date",path:"/$view/$date",getParentRoute:()=>rA}),Lke=GNe.update({id:"/",path:"/",getParentRoute:()=>Ty}),oA=ZNe.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>Ty}),Uke=QNe.update({id:"/",path:"/",getParentRoute:()=>Ry}),aA=JNe.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>Ry}),Fke=tPe.update({id:"/",path:"/",getParentRoute:()=>Oy}),sA=rPe.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>Oy}),zke=oPe.update({id:"/label/",path:"/label/",getParentRoute:()=>Xs}),Ny=sPe.update({id:"/label/$labelId",path:"/label/$labelId",getParentRoute:()=>Xs}),$ke=lPe.update({id:"/",path:"/",getParentRoute:()=>My}),jke=uPe.update({id:"/",path:"/",getParentRoute:()=>Cu}),Py=fPe.update({id:"/$calendarObjectId",path:"/$calendarObjectId",getParentRoute:()=>Cu}),Bke=yPe.update({id:"/new",path:"/new",getParentRoute:()=>Cu}),Hke=SPe.update({id:"/",path:"/",getParentRoute:()=>oA}),hB=EPe.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>oA}),qke=xPe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>Ty}),Vke=IPe.update({id:"/",path:"/",getParentRoute:()=>aA}),pB=TPe.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>aA}),Wke=OPe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>Ry}),Gke=NPe.update({id:"/",path:"/",getParentRoute:()=>sA}),mB=kPe.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>sA}),Kke=LPe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>Oy}),Zke=FPe.update({id:"/",path:"/",getParentRoute:()=>Ny}),iA=$Pe.update({id:"/$threadId",path:"/$threadId",getParentRoute:()=>Ny}),Yke=BPe.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>My}),Qke=qPe.update({id:"/draft/$outboxMessageId",path:"/draft/$outboxMessageId",getParentRoute:()=>My}),Xke=WPe.update({id:"/",path:"/",getParentRoute:()=>Py}),lA=KPe.update({id:"/$recurrenceId",path:"/$recurrenceId",getParentRoute:()=>Py}),Jke=YPe.update({id:"/edit",path:"/edit",getParentRoute:()=>Py}),e3e=XPe.update({id:"/suggestion/$suggestionId",path:"/suggestion/$suggestionId",getParentRoute:()=>Cu}),t3e=eke.update({id:"/task/$calendarTaskId",path:"/task/$calendarTaskId",getParentRoute:()=>Cu}),n3e=nke.update({id:"/",path:"/",getParentRoute:()=>iA}),gB=oke.update({id:"/$messageId",path:"/$messageId",getParentRoute:()=>iA}),r3e=ske.update({id:"/compose/{-$outboxMessageId}",path:"/compose/{-$outboxMessageId}",getParentRoute:()=>Ny}),o3e=lke.update({id:"/",path:"/",getParentRoute:()=>lA}),a3e=uke.update({id:"/edit",path:"/edit",getParentRoute:()=>lA}),s3e=dke.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>hB}),i3e=fke.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>pB}),l3e=hke.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>mB}),c3e=pke.update({id:"/$mode/{-$outboxMessageId}",path:"/$mode/{-$outboxMessageId}",getParentRoute:()=>gB}),u3e={CalendarViewDateCalendarObjectIdRecurrenceIdEditRoute:a3e,CalendarViewDateCalendarObjectIdRecurrenceIdIndexRoute:o3e},d3e=lA._addFileChildren(u3e),f3e={CalendarViewDateCalendarObjectIdRecurrenceIdRoute:d3e,CalendarViewDateCalendarObjectIdEditRoute:Jke,CalendarViewDateCalendarObjectIdIndexRoute:Xke},h3e=Py._addFileChildren(f3e),p3e={CalendarViewDateCalendarObjectIdRoute:h3e,CalendarViewDateNewRoute:Bke,CalendarViewDateIndexRoute:jke,CalendarViewDateSuggestionSuggestionIdRoute:e3e,CalendarViewDateTaskCalendarTaskIdRoute:t3e},m3e=Cu._addFileChildren(p3e),g3e={CalendarIndexRoute:yke,CalendarViewDateRoute:m3e},v3e=rA._addFileChildren(g3e),y3e={MailMailboxIdThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:s3e},b3e=hB._addFileChildren(y3e),S3e={MailMailboxIdThreadIdMessageIdRoute:b3e,MailMailboxIdThreadIdIndexRoute:Hke},C3e=oA._addFileChildren(S3e),E3e={MailMailboxIdThreadIdRoute:C3e,MailMailboxIdIndexRoute:Lke,MailMailboxIdComposeChar123OutboxMessageIdChar125Route:qke},w3e=Ty._addFileChildren(E3e),x3e={MailBriefThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:i3e},_3e=pB._addFileChildren(x3e),I3e={MailBriefThreadIdMessageIdRoute:_3e,MailBriefThreadIdIndexRoute:Vke},A3e=aA._addFileChildren(I3e),T3e={MailBriefThreadIdRoute:A3e,MailBriefIndexRoute:Uke,MailBriefComposeChar123OutboxMessageIdChar125Route:Wke},R3e=Ry._addFileChildren(T3e),O3e={MailFlaggedThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:l3e},M3e=mB._addFileChildren(O3e),N3e={MailFlaggedThreadIdMessageIdRoute:M3e,MailFlaggedThreadIdIndexRoute:Gke},P3e=sA._addFileChildren(N3e),k3e={MailFlaggedThreadIdRoute:P3e,MailFlaggedIndexRoute:Fke,MailFlaggedComposeChar123OutboxMessageIdChar125Route:Kke},D3e=Oy._addFileChildren(k3e),L3e={MailOutboxIndexRoute:$ke,MailOutboxComposeChar123OutboxMessageIdChar125Route:Yke,MailOutboxDraftOutboxMessageIdRoute:Qke},U3e=My._addFileChildren(L3e),F3e={MailLabelLabelIdThreadIdMessageIdModeChar123OutboxMessageIdChar125Route:c3e},z3e=gB._addFileChildren(F3e),$3e={MailLabelLabelIdThreadIdMessageIdRoute:z3e,MailLabelLabelIdThreadIdIndexRoute:n3e},j3e=iA._addFileChildren($3e),B3e={MailLabelLabelIdThreadIdRoute:j3e,MailLabelLabelIdIndexRoute:Zke,MailLabelLabelIdComposeChar123OutboxMessageIdChar125Route:r3e},H3e=Ny._addFileChildren(B3e),q3e={MailMailboxIdRoute:w3e,MailBriefRoute:R3e,MailFlaggedRoute:D3e,MailOutboxRoute:U3e,MailIndexRoute:bke,MailLabelLabelIdRoute:H3e,MailLabelIndexRoute:zke},V3e=Xs._addFileChildren(q3e),W3e={SettingsSlotIdRoute:Eke,SettingsAccountsRoute:wke,SettingsAdvancedRoute:xke,SettingsAppearanceRoute:_ke,SettingsCalendarsRoute:Ike,SettingsClassificationRoute:Ake,SettingsFiltersRoute:Tke,SettingsFoldersRoute:Rke,SettingsLabelsRoute:Oke,SettingsPeopleRoute:Mke,SettingsSendersRoute:Nke,SettingsSpamRoute:Pke,SettingsSuggestedVipsRoute:kke,SettingsWarningsRoute:Dke,SettingsIndexRoute:Cke},G3e=Wn._addFileChildren(W3e),K3e={IndexRoute:mke,CalendarRoute:v3e,ImportRoute:gke,MailRoute:V3e,OnboardingRoute:vke,SettingsRoute:G3e,ResetPasswordTokenRoute:Ske},Z3e=Qs._addFileChildren(K3e)._addFileTypes(),Y3e=(e,t,n)=>{const r=Yge({routeTree:Z3e,context:{queryClient:e},history:n,stringifySearch:c1e,defaultPreload:"intent",defaultPendingComponent:lv,defaultPendingMs:200,defaultPendingMinMs:300});return r.subscribe("onResolved",o=>{t.recordPageView(o.toLocation.pathname),cne(o.toLocation.pathname)}),r},Be=e=>typeof e=="string",Ld=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},ML=e=>e==null?"":""+e,Q3e=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},X3e=/###/g,NL=e=>e&&e.indexOf("###")>-1?e.replace(X3e,"."):e,PL=e=>!e||Be(e),ff=(e,t,n)=>{const r=Be(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(PL(e))return{};const a=NL(r[o]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o}return PL(e)?{}:{obj:e,k:NL(r[o])}},kL=(e,t,n)=>{const{obj:r,k:o}=ff(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],l=t.slice(0,t.length-1),c=ff(e,l,Object);for(;c.obj===void 0&&l.length;)a=`${l[l.length-1]}.${a}`,l=l.slice(0,l.length-1),c=ff(e,l,Object),c?.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},J3e=(e,t,n,r)=>{const{obj:o,k:a}=ff(e,t,Object);o[a]=o[a]||[],o[a].push(n)},jg=(e,t)=>{const{obj:n,k:r}=ff(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},e5e=(e,t,n)=>{const r=jg(e,n);return r!==void 0?r:jg(t,n)},vB=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Be(e[r])||e[r]instanceof String||Be(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):vB(e[r],t[r],n):e[r]=t[r]);return e},uc=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var t5e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const n5e=e=>Be(e)?e.replace(/[&<>"'\/]/g,t=>t5e[t]):e;class r5e{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const o5e=[" ",",","?","!",";"],a5e=new r5e(20),s5e=(e,t,n)=>{t=t||"",n=n||"";const r=o5e.filter(l=>t.indexOf(l)<0&&n.indexOf(l)<0);if(r.length===0)return!0;const o=a5e.getRegExp(`(${r.map(l=>l==="?"?"\\?":l).join("|")})`);let a=!o.test(e);if(!a){const l=e.indexOf(n);l>0&&!o.test(e.substring(0,l))&&(a=!0)}return a},g_=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let l,c="";for(let d=a;d<r.length;++d)if(d!==a&&(c+=n),c+=r[d],l=o[c],l!==void 0){if(["string","number","boolean"].indexOf(typeof l)>-1&&d<r.length-1)continue;a+=d-a+1;break}o=l}return o},Bg=e=>e?.replace("_","-"),i5e={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)}};class Hg{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||i5e,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(Be(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Hg(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Hg(this.logger,t)}}var ko=new Hg;class ky{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(l=>{let[c,d]=l;for(let f=0;f<d;f++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(l=>{let[c,d]=l;for(let f=0;f<d;f++)c.apply(c,[t,...r])})}}class DL extends ky{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):Be(r)&&a?c.push(...r.split(a)):c.push(r)));const d=jg(this.data,c);return!d&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),d||!l||!Be(r)?d:g_(this.data?.[t]?.[n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(l?r.split(l):r)),t.indexOf(".")>-1&&(c=t.split("."),o=n,n=c[1]),this.addNamespaces(n),kL(this.data,c,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(Be(r[a])||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),o=r,r=n,n=c[1]),this.addNamespaces(n);let d=jg(this.data,c)||{};l.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?vB(d,r,a):d={...d,...r},kL(this.data,c,d),l.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var yB={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{t=this.processors[a]?.process(t,n,r,o)??t}),t}};const LL={},UL=e=>!Be(e)&&typeof e!="boolean"&&typeof e!="number";class qg extends ky{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Q3e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ko.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const l=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!s5e(t,r,o);if(l&&!c){const d=t.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:t,namespaces:Be(a)?[a]:a};const f=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(f[0])>-1)&&(a=f.shift()),t=f.join(o)}return{key:t,namespaces:Be(a)?[a]:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(t[t.length-1],n),d=c[c.length-1],f=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode"){if(p){const j=n.nsSeparator||this.options.nsSeparator;return o?{res:`${d}${j}${l}`,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:`${d}${j}${l}`}return o?{res:l,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:l}const m=this.resolve(t,n);let g=m?.res;const v=m?.usedKey||l,S=m?.exactUsedKey||l,C=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,I=n.count!==void 0&&!Be(n.count),T=qg.hasDefaultValue(n),O=I?this.pluralResolver.getSuffix(f,n.count,n):"",D=n.ordinal&&I?this.pluralResolver.getSuffix(f,n.count,{ordinal:!1}):"",P=I&&!n.ordinal&&n.count===0,M=P&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${O}`]||n[`defaultValue${D}`]||n.defaultValue;let L=g;x&&!g&&T&&(L=M);const z=UL(L),G=Object.prototype.toString.apply(L);if(x&&L&&z&&C.indexOf(G)<0&&!(Be(w)&&Array.isArray(L))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,L,{...n,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return o?(m.res=j,m.usedParams=this.getUsedParamsDetails(n),m):j}if(a){const j=Array.isArray(L),F=j?[]:{},q=j?S:v;for(const X in L)if(Object.prototype.hasOwnProperty.call(L,X)){const Se=`${q}${a}${X}`;T&&!g?F[X]=this.translate(Se,{...n,defaultValue:UL(M)?M[X]:void 0,joinArrays:!1,ns:c}):F[X]=this.translate(Se,{...n,joinArrays:!1,ns:c}),F[X]===Se&&(F[X]=L[X])}g=F}}else if(x&&Be(w)&&Array.isArray(g))g=g.join(w),g&&(g=this.extendTranslation(g,t,n,r));else{let j=!1,F=!1;!this.isValidLookup(g)&&T&&(j=!0,g=M),this.isValidLookup(g)||(F=!0,g=l);const X=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&F?void 0:g,Se=T&&M!==g&&this.options.updateMissing;if(F||j||Se){if(this.logger.log(Se?"updateKey":"missingKey",f,d,l,Se?M:g),a){const ge=this.resolve(l,{...n,keySeparator:!1});ge&&ge.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 W=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let ge=0;ge<ee.length;ge++)W.push(ee[ge]);else this.options.saveMissingTo==="all"?W=this.languageUtils.toResolveHierarchy(n.lng||this.language):W.push(n.lng||this.language);const me=(ge,Te,$)=>{const te=T&&$!==g?$:X;this.options.missingKeyHandler?this.options.missingKeyHandler(ge,d,Te,te,Se,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ge,d,Te,te,Se,n),this.emit("missingKey",ge,d,Te,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?W.forEach(ge=>{const Te=this.pluralResolver.getSuffixes(ge,n);P&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Te.indexOf(`${this.options.pluralSeparator}zero`)<0&&Te.push(`${this.options.pluralSeparator}zero`),Te.forEach($=>{me([ge],l+$,n[`defaultValue${$}`]||M)})}):me(W,l,M))}g=this.extendTranslation(g,t,n,m,r),F&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${d}:${l}`),(F||j)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}:${l}`:l,j?g:void 0))}return o?(m.res=g,m.usedParams=this.getUsedParamsDetails(n),m):g}extendTranslation(t,n,r,o,a){var l=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=Be(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(f){const g=t.match(this.interpolator.nestingRegexp);p=g&&g.length}let m=r.replace&&!Be(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),t=this.interpolator.interpolate(t,m,r.lng||this.language||o.usedLng,r),f){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;p<v&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var g=arguments.length,v=new Array(g),S=0;S<g;S++)v[S]=arguments[S];return a?.[0]===v[0]&&!r.context?(l.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):l.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,d=Be(c)?[c]:c;return t!=null&&d?.length&&r.applyPostProcessor!==!1&&(t=yB.handle(d,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,l,c;return Be(t)&&(t=[t]),t.forEach(d=>{if(this.isValidLookup(r))return;const f=this.extractFromKey(d,n),p=f.key;o=p;let m=f.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const g=n.count!==void 0&&!Be(n.count),v=g&&!n.ordinal&&n.count===0,S=n.context!==void 0&&(Be(n.context)||typeof n.context=="number")&&n.context!=="",C=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);m.forEach(w=>{this.isValidLookup(r)||(c=w,!LL[`${C[0]}-${w}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(c)&&(LL[`${C[0]}-${w}`]=!0,this.logger.warn(`key "${o}" for languages "${C.join(", ")}" won't get resolved as namespace "${c}" 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!!!")),C.forEach(x=>{if(this.isValidLookup(r))return;l=x;const I=[p];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(I,p,x,w,n);else{let O;g&&(O=this.pluralResolver.getSuffix(x,n.count,n));const D=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(I.push(p+O),n.ordinal&&O.indexOf(P)===0&&I.push(p+O.replace(P,this.options.pluralSeparator)),v&&I.push(p+D)),S){const M=`${p}${this.options.contextSeparator}${n.context}`;I.push(M),g&&(I.push(M+O),n.ordinal&&O.indexOf(P)===0&&I.push(M+O.replace(P,this.options.pluralSeparator)),v&&I.push(M+D))}}let T;for(;T=I.pop();)this.isValidLookup(r)||(a=T,r=this.getResource(x,w,T,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:l,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Be(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class FL{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ko.create("languageUtils")}getScriptPartFromCode(t){if(t=Bg(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Bg(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Be(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Be(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=l=>{l&&(this.isSupportedCode(l)?o.push(l):this.logger.warn(`rejecting language code not found in supportedLngs: ${l}`))};return Be(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):Be(t)&&a(this.formatLanguageCode(t)),r.forEach(l=>{o.indexOf(l)<0&&a(this.formatLanguageCode(l))}),o}}const zL={zero:0,one:1,two:2,few:3,many:4,other:5},$L={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class l5e{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ko.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Bg(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let l;try{l=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),$L;if(!t.match(/-|_/))return $L;const d=this.languageUtils.getLanguagePartFromCode(t);l=this.getRule(d,n)}return this.pluralRulesCache[a]=l,l}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>zL[o]-zL[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const jL=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=e5e(e,t,n);return!a&&o&&Be(n)&&(a=g_(e,n,r),a===void 0&&(a=g_(t,n,r))),a},Nw=e=>e.replace(/\$/g,"$$$$");class c5e{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ko.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:l,suffix:c,suffixEscaped:d,formatSeparator:f,unescapeSuffix:p,unescapePrefix:m,nestingPrefix:g,nestingPrefixEscaped:v,nestingSuffix:S,nestingSuffixEscaped:C,nestingOptionsSeparator:w,maxReplaces:x,alwaysFormat:I}=t.interpolation;this.escape=n!==void 0?n:n5e,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?uc(a):l||"{{",this.suffix=c?uc(c):d||"}}",this.formatSeparator=f||",",this.unescapePrefix=p?"":m||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=g?uc(g):v||uc("$t("),this.nestingSuffix=S?uc(S):C||uc(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=x||1e3,this.alwaysFormat=I!==void 0?I:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let a,l,c;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},f=v=>{if(v.indexOf(this.formatSeparator)<0){const x=jL(n,d,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...o,...n,interpolationkey:v}):x}const S=v.split(this.formatSeparator),C=S.shift().trim(),w=S.join(this.formatSeparator).trim();return this.format(jL(n,d,C,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...o,...n,interpolationkey:C})};this.resetRegExp();const p=o?.missingInterpolationHandler||this.options.missingInterpolationHandler,m=o?.interpolation?.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>Nw(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?Nw(this.escape(v)):Nw(v)}].forEach(v=>{for(c=0;a=v.regex.exec(t);){const S=a[1].trim();if(l=f(S),l===void 0)if(typeof p=="function"){const w=p(t,a,o);l=Be(w)?w:""}else if(o&&Object.prototype.hasOwnProperty.call(o,S))l="";else if(m){l=a[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${t}`),l="";else!Be(l)&&!this.useRawValueToEscape&&(l=ML(l));const C=v.safeValue(l);if(t=t.replace(a[0],C),m?(v.regex.lastIndex+=l.length,v.regex.lastIndex-=a[0].length):v.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,l;const c=(d,f)=>{const p=this.nestingOptionsSeparator;if(d.indexOf(p)<0)return d;const m=d.split(new RegExp(`${p}[ ]*{`));let g=`{${m[1]}`;d=m[0],g=this.interpolate(g,l);const v=g.match(/'/g),S=g.match(/"/g);((v?.length??0)%2===0&&!S||S.length%2!==0)&&(g=g.replace(/'/g,'"'));try{l=JSON.parse(g),f&&(l={...f,...l})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,C),`${d}${p}${g}`}return l.defaultValue&&l.defaultValue.indexOf(this.prefix)>-1&&delete l.defaultValue,d};for(;o=this.nestingRegexp.exec(t);){let d=[];l={...r},l=l.replace&&!Be(l.replace)?l.replace:l,l.applyPostProcessor=!1,delete l.defaultValue;let f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const p=o[1].split(this.formatSeparator).map(m=>m.trim());o[1]=p.shift(),d=p,f=!0}if(a=n(c.call(this,o[1].trim(),l),l),a&&o[0]===t&&!Be(a))return a;Be(a)||(a=ML(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),f&&(a=d.reduce((p,m)=>this.format(p,m,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}const u5e=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(l=>{if(l){const[c,...d]=l.split(":"),f=d.join(":").trim().replace(/^'+|'+$/g,""),p=c.trim();n[p]||(n[p]=f),f==="false"&&(n[p]=!1),f==="true"&&(n[p]=!0),isNaN(f)||(n[p]=parseInt(f,10))}})}return{formatName:t,formatOptions:n}},dc=e=>{const t={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const l=r+JSON.stringify(a);let c=t[l];return c||(c=e(Bg(r),o),t[l]=c),c(n)}};class d5e{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ko.create("formatter"),this.options=t,this.formats={number:dc((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:dc((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:dc((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:dc((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:dc((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=dc(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(c=>c.indexOf(")")>-1)){const c=a.findIndex(d=>d.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce((c,d)=>{const{formatName:f,formatOptions:p}=u5e(d);if(this.formats[f]){let m=c;try{const g=o?.formatParams?.[o.interpolationkey]||{},v=g.locale||g.lng||o.locale||o.lng||r;m=this.formats[f](c,v,{...p,...o,...g})}catch(g){this.logger.warn(g)}return m}else this.logger.warn(`there was no format function for ${f}`);return c},t)}}const f5e=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class h5e extends ky{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=ko.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,o.backend,o)}queueLoad(t,n,r,o){const a={},l={},c={},d={};return t.forEach(f=>{let p=!0;n.forEach(m=>{const g=`${f}|${m}`;!r.reload&&this.store.hasResourceBundle(f,m)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?l[g]===void 0&&(l[g]=!0):(this.state[g]=1,p=!1,l[g]===void 0&&(l[g]=!0),a[g]===void 0&&(a[g]=!0),d[m]===void 0&&(d[m]=!0)))}),p||(c[f]=!0)}),(Object.keys(a).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(l),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(d)}}loaded(t,n,r){const o=t.split("|"),a=o[0],l=o[1];n&&this.emit("failedLoading",a,l,n),!n&&r&&this.store.addResourceBundle(a,l,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const c={};this.queue.forEach(d=>{J3e(d.loaded,[a],l),f5e(d,t),n&&d.errors.push(n),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(f=>{c[f]||(c[f]={});const p=d.loaded[f];p.length&&p.forEach(m=>{c[f][m]===void 0&&(c[f][m]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(d=>!d.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,l=arguments.length>5?arguments[5]:void 0;if(!t.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:l});return}this.readingCalls++;const c=(f,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(f&&p&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,l)},a);return}l(f,p)},d=this.backend[r].bind(this.backend);if(d.length===2){try{const f=d(t,n);f&&typeof f.then=="function"?f.then(p=>c(null,p)).catch(c):c(null,f)}catch(f){c(f)}return}return d(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Be(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Be(n)&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(l=>{this.loadOne(l)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(l,c)=>{l&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,l),!l&&c&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,c),this.loaded(t,l,c)})}saveMissing(t,n,r,o,a){let l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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(!(r==null||r==="")){if(this.backend?.create){const d={...l,isUpdate:a},f=this.backend.create.bind(this.backend);if(f.length<6)try{let p;f.length===5?p=f(t,n,r,o,d):p=f(t,n,r,o),p&&typeof p.then=="function"?p.then(m=>c(null,m)).catch(c):c(null,p)}catch(p){c(p)}else f(t,n,r,o,c,d)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const BL=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",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]),Be(e[1])&&(t.defaultValue=e[1]),Be(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),HL=e=>(Be(e.ns)&&(e.ns=[e.ns]),Be(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Be(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),Em=()=>{},p5e=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class jf extends ky{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=HL(t),this.services={},this.logger=ko,this.modules={external:[]},p5e(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(Be(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=BL();this.options={...o,...this.options,...HL(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?ko.init(a(this.modules.logger),this.options):ko.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=d5e;const m=new FL(this.options);this.store=new DL(this.options.resources,this.options);const g=this.services;g.logger=ko,g.resourceStore=this.store,g.languageUtils=m,g.pluralResolver=new l5e(m,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(g.formatter=a(p),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new c5e(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new h5e(a(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(v){for(var S=arguments.length,C=new Array(S>1?S-1:0),w=1;w<S;w++)C[w-1]=arguments[w];t.emit(v,...C)}),this.modules.languageDetector&&(g.languageDetector=a(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=a(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new qg(this.services,this.options),this.translator.on("*",function(v){for(var S=arguments.length,C=new Array(S>1?S-1:0),w=1;w<S;w++)C[w-1]=arguments[w];t.emit(v,...C)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Em),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[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(p=>{this[p]=function(){return t.store[p](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=function(){return t.store[p](...arguments),t}});const d=Ld(),f=()=>{const p=(m,g)=>{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),d.resolve(g),r(m,g)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),d}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Em;const o=Be(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(f=>{f!=="cimode"&&a.indexOf(f)<0&&a.push(f)})};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>l(d)),this.options.preload?.forEach?.(c=>l(c)),this.services.backendConnector.load(a,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const o=Ld();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=Em),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&yB.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Ld();this.emit("languageChanging",t);const a=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,f)=>{f?(a(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(d,function(){return r.t(...arguments)})},c=d=>{!t&&!d&&this.services.languageDetector&&(d=[]);const f=Be(d)?d:this.services.languageUtils.getBestMatchFromCodes(d);f&&(this.language||a(f),this.translator.language||this.translator.changeLanguage(f),this.services.languageDetector?.cacheUserLanguage?.(f)),this.loadResources(f,p=>{l(p,f)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),o}getFixedT(t,n,r){var o=this;const a=function(l,c){let d;if(typeof c!="object"){for(var f=arguments.length,p=new Array(f>2?f-2:0),m=2;m<f;m++)p[m-2]=arguments[m];d=o.options.overloadTranslationOptionHandler([l,c].concat(p))}else d={...c};d.lng=d.lng||a.lng,d.lngs=d.lngs||a.lngs,d.ns=d.ns||a.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||r||a.keyPrefix);const g=o.options.keySeparator||".";let v;return d.keyPrefix&&Array.isArray(l)?v=l.map(S=>`${d.keyPrefix}${g}${S}`):v=d.keyPrefix?`${d.keyPrefix}${g}${l}`:l,o.t(v,d)};return Be(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.translator?.translate(...n)}exists(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.translator?.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};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;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const l=(c,d)=>{const f=this.services.backendConnector.state[`${c}|${d}`];return f===-1||f===0||f===2};if(n.precheck){const c=n.precheck(this,l);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||l(r,t)&&(!o||l(a,t)))}loadNamespaces(t,n){const r=Ld();return this.options.ns?(Be(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Ld();Be(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(l=>o.indexOf(l)<0&&this.services.languageUtils.isSupportedCode(l));return a.length?(this.options.preload=o.concat(a),this.loadResources(l=>{r.resolve(),n&&n(l)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["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"],r=this.services?.languageUtils||new FL(BL());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new jf(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Em;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new jf(o);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const c=Object.keys(this.store.data).reduce((d,f)=>(d[f]={...this.store.data[f]},Object.keys(d[f]).reduce((p,m)=>(p[m]={...d[f][m]},p),{})),{});a.store=new DL(c,o),a.services.resourceStore=a.store}return a.translator=new qg(a.services,o),a.translator.on("*",function(c){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];a.emit(c,...f)}),a.init(o,n),a.translator.options=o,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}}}const Gn=jf.createInstance();Gn.createInstance=jf.createInstance;Gn.createInstance;Gn.dir;Gn.init;Gn.loadResources;Gn.reloadResources;Gn.use;Gn.changeLanguage;Gn.getFixedT;Gn.t;Gn.exists;Gn.setDefaultNamespace;Gn.hasLoadedNamespace;Gn.loadNamespaces;Gn.loadLanguages;const{slice:m5e,forEach:g5e}=[];function v5e(e){return g5e.call(m5e.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function y5e(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const qL=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,b5e=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const l=r.maxAge-0;if(Number.isNaN(l))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(l)}`}if(r.domain){if(!qL.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!qL.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(a+="; Partitioned"),a},VL={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=b5e(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var S5e={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return VL.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:a}=t;n&&typeof document<"u"&&VL.create(n,e,r,o,a)}},C5e={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const a=r.substring(1).split("&");for(let l=0;l<a.length;l++){const c=a[l].indexOf("=");c>0&&a[l].substring(0,c)===t&&(n=a[l].substring(c+1))}}return n}},E5e={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:o}=window.location;if(o&&o.length>2){const a=o.substring(1);if(t){const l=a.split("&");for(let c=0;c<l.length;c++){const d=l[c].indexOf("=");d>0&&l[c].substring(0,d)===t&&(r=l[c].substring(d+1))}}if(r)return r;if(!r&&n>-1){const l=o.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?l[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let fc=null;const WL=()=>{if(fc!==null)return fc;try{if(fc=typeof window<"u"&&window.localStorage!==null,!fc)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{fc=!1}return fc};var w5e={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&WL())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&WL()&&window.localStorage.setItem(n,e)}};let hc=null;const GL=()=>{if(hc!==null)return hc;try{if(hc=typeof window<"u"&&window.sessionStorage!==null,!hc)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{hc=!1}return hc};var x5e={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&GL())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&GL()&&window.sessionStorage.setItem(n,e)}},_5e={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},I5e={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},A5e={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},T5e={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let bB=!1;try{document.cookie,bB=!0}catch{}const SB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];bB||SB.splice(1,1);const R5e=()=>({order:SB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class CB{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=v5e(n,this.options||{},R5e()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(S5e),this.addDetector(C5e),this.addDetector(w5e),this.addDetector(x5e),this.addDetector(_5e),this.addDetector(I5e),this.addDetector(A5e),this.addDetector(T5e),this.addDetector(E5e)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.filter(r=>r!=null&&!y5e(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}CB.type="languageDetector";const EB=["__proto__","constructor","prototype"];function wB(e){return!(typeof e!="string"||e.length===0||e.length>128||EB.indexOf(e)>-1||e.indexOf("..")>-1||e.indexOf("\\")>-1||/[?#%:&=;\s]/.test(e)||/[\x00-\x1F\x7F]/.test(e))}function xB(e){return!(!wB(e)||e.indexOf("/")>-1||e.indexOf("@")>-1)}function O5e(e){return!(!wB(e)||e.indexOf("//")>-1)}const M5e={lng:xB,ns:O5e};function wm(e){return typeof e!="string"?e:e.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function N5e(e){if(typeof e!="string"||e.length===0)return e;try{const t=new URL(e);return t.username||t.password?(t.username="",t.password="",t.toString()):e}catch{return e.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function _B(){return typeof XMLHttpRequest=="function"||typeof XMLHttpRequest=="object"}function P5e(e){return!!e&&typeof e.then=="function"}function k5e(e){return P5e(e)?e:Promise.resolve(e)}const D5e=/\{\{(.+?)\}\}/g,KL=/^[/\\]{2}/;function ZL(e,t){let n=!1;const r=e.replace(D5e,(o,a)=>{const l=a.trim();if(EB.indexOf(l)>-1)return o;const c=t[l];if(c==null)return o;const d=M5e[l]||xB,f=String(c).split("+");for(const p of f)if(!d(p))return n=!0,o;return f.join("+")});return n||KL.test(r)&&!KL.test(e)?null:r}const $i=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof window<"u"?window:void 0;let Vg;typeof fetch=="function"?Vg=fetch:$i&&typeof $i.fetch=="function"&&(Vg=$i.fetch);const YL=_B()&&$i?$i.XMLHttpRequest:void 0,L5e=typeof ActiveXObject=="function"&&$i?$i.ActiveXObject:void 0,IB=["__proto__","constructor","prototype"],v_=(e,t)=>{if(t&&typeof t=="object"){let n="";for(const r of Object.keys(t))IB.indexOf(r)>-1||(n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]));if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},QL=(e,t,n,r)=>{const o=a=>{if(!a.ok)return n(a.statusText||"Error",{status:a.status});a.text().then(l=>{n(null,{status:a.status,data:l})}).catch(n)};if(r){const a=r(e,t);if(a instanceof Promise){a.then(o).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(o).catch(n):Vg(e,t).then(o).catch(n)},U5e=(e,t,n,r)=>{e.queryStringParams&&(t=v_(t,e.queryStringParams));const o={...typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders};typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]=`i18next-http-backend (node/${global.process.version}; ${global.process.platform} ${global.process.arch})`),n&&(o["Content-Type"]="application/json");const a=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,l={method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o,...e._omitFetchOptions?{}:a},c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{QL(t,l,r,c)}catch(d){if(!a||Object.keys(a).length===0||!d.message||d.message.indexOf("not implemented")<0)return r(d);try{Object.keys(a).forEach(f=>{delete l[f]}),QL(t,l,r,c),e._omitFetchOptions=!0}catch(f){r(f)}}},F5e=(e,t,n,r)=>{n&&typeof n=="object"&&(n=v_("",n).slice(1)),e.queryStringParams&&(t=v_(t,e.queryStringParams));try{const o=YL?new YL:new L5e("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");let a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(const l of Object.keys(a))IB.indexOf(l)>-1||o.setRequestHeader(l,a[l]);o.onreadystatechange=()=>{o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(o){console&&console.log(o)}},z5e=(e,t,n,r)=>{if(typeof n=="function"&&(r=n,n=void 0),r=r||(()=>{}),Vg&&t.indexOf("file:")!==0)return U5e(e,t,n,r);if(_B()||typeof ActiveXObject=="function")return F5e(e,t,n,r);r(new Error("No fetch and no xhr implementation found!"))},$5e=()=>({loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:e=>JSON.parse(e),stringify:JSON.stringify,parsePayload:(e,t,n)=>({[t]:n||""}),parseLoadPayload:(e,t)=>{},request:z5e,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}});var AB=class{constructor(e,t={},n={}){this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}init(e,t={},n={}){if(this.services=e,this.options={...$5e(),...this.options||{},...t},this.allOptions=n,this.services&&this.options.reloadInterval){const r=setInterval(()=>this.reload(),this.options.reloadInterval);typeof r=="object"&&typeof r.unref=="function"&&r.unref()}}readMulti(e,t,n){this._readAny(e,e,t,t,n)}read(e,t,n){this._readAny([e],e,[t],t,n)}_readAny(e,t,n,r,o){let a=this.options.loadPath;typeof this.options.loadPath=="function"&&(a=this.options.loadPath(e,n)),a=k5e(a),a.then(l=>{if(!l)return o(null,{});const c=ZL(l,{lng:e.join("+"),ns:n.join("+")});if(c==null){const d=e.map(wm).join(", "),f=n.map(wm).join(", ");return o(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+d+"] namespaces=["+f+"]"),!1)}this.loadUrl(c,o,t,r)})}loadUrl(e,t,n,r){const o=typeof n=="string"?[n]:n,a=typeof r=="string"?[r]:r,l=this.options.parseLoadPayload(o,a),c=wm(N5e(e));this.options.request(this.options,e,l,(d,f)=>{if(f&&(f.status>=500&&f.status<600||!f.status))return t("failed loading "+c+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return t("failed loading "+c+"; status code: "+f.status,!1);if(!f&&d&&d.message){const g=d.message.toLowerCase();if(["failed","fetch","network","load"].find(v=>g.indexOf(v)>-1))return t("failed loading "+c+": "+wm(d.message),!0)}if(d)return t(d,!1);let p,m;try{typeof f.data=="string"?p=this.options.parse(f.data,n,r):p=f.data}catch{m="failed parsing "+c+" to json"}if(m)return t(m,!1);t(null,p)})}create(e,t,n,r,o){if(!this.options.addPath)return;typeof e=="string"&&(e=[e]);const a=this.options.parsePayload(t,n,r);let l=0;const c=[],d=[];e.forEach(f=>{let p=this.options.addPath;typeof this.options.addPath=="function"&&(p=this.options.addPath(f,t));const m=ZL(p,{lng:f,ns:t});if(m==null){l+=1,o&&l===e.length&&o(c,d);return}this.options.request(this.options,m,a,(g,v)=>{l+=1,c.push(g),d.push(v),l===e.length&&typeof o=="function"&&o(c,d)})})}reload(){const{backendConnector:e,languageUtils:t,logger:n}=this.services,r=e.language;if(r&&r.toLowerCase()==="cimode")return;const o=[],a=l=>{t.toResolveHierarchy(l).forEach(c=>{o.indexOf(c)<0&&o.push(c)})};a(r),this.allOptions.preload&&this.allOptions.preload.forEach(l=>a(l)),o.forEach(l=>{this.allOptions.ns.forEach(c=>{e.read(l,c,"read",null,null,(d,f)=>{d&&n.warn(`loading namespace ${c} for language ${l} failed`,d),!d&&f&&n.log(`loaded namespace ${c} for language ${l}`,f),e.loaded(`${l}|${c}`,d,f)})})})}};AB.type="backend";Gn.use(AB).use(CB).use(C1e).init({fallbackLng:"en",supportedLngs:["en","nl","de","fr"],ns:["common","mail"],defaultNS:"common",backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},detection:{order:["navigator","htmlTag"],caches:[]},interpolation:{escapeValue:!1},react:{useSuspense:!0,bindI18n:"languageChanged loaded"}});const j5e=({authProvider:e,settingsSlots:t=[],rootElementId:n="root"})=>{sne(),i1e(),e.configure(),Eve(e);const r=n1e();Yte(r);const o=new Kpe({queryCache:new E9({onError:Rve}),mutationCache:new C9({onError:Ove}),defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,retry:1}}});a1e();const a=Y3e(o,r);for(const d of t)if(Object.hasOwn(a.routesByPath,`/settings/${d.id}`))throw new Error(`Settings slot "${d.id}" collides with a built-in settings section`);r.recordPageView(window.location.pathname);const l=document.getElementById(n);if(!l)throw new Error(`Root element not found: #${n}`);const{Shell:c}=e;ove.createRoot(l).render(R.jsx(_.StrictMode,{children:R.jsx(S7.Provider,{value:r,children:R.jsxs(Zpe,{client:o,children:[R.jsx(_ve,{value:e,children:R.jsx(LMe,{value:t,children:R.jsx(c,{children:R.jsx(Jge,{router:a})})})}),!1]})})}))};j5e({authProvider:_pe});export{jj as $,lv as A,zn as B,DX as C,see as D,$_ as E,$X as F,kX as G,zX as H,OU as I,o8 as J,K9 as K,PU as L,VX as M,gr as N,X9 as O,p6e as P,TMe as Q,vne as R,YX as S,JX as T,Lj as U,Dj as V,x7 as W,Yw as X,Jx as Y,mLe as Z,Iy as _,Qi as a,Mj as a$,GLe as a0,mEe as a1,Xc as a2,W1e as a3,wI as a4,hv as a5,Wte as a6,Kv as a7,iu as a8,SMe as a9,Hi as aA,K_ as aB,oLe as aC,aLe as aD,DN as aE,gNe as aF,d4e as aG,NLe as aH,A4e as aI,Tee as aJ,BDe as aK,tee as aL,jDe as aM,tLe as aN,KOe as aO,Ute as aP,Dte as aQ,kte as aR,mn as aS,Zf as aT,R4 as aU,XDe as aV,fEe as aW,X4e as aX,Q4e as aY,J4e as aZ,E8 as a_,Ive as aa,UMe as ab,eNe as ac,WDe as ad,hNe as ae,E6e as af,j_ as ag,OLe as ah,R$ as ai,B as aj,TLe as ak,RLe as al,fwe as am,Fj as an,$Re as ao,u4e as ap,l4e as aq,mf as ar,h8 as as,yU as at,U as au,le as av,E as aw,MLe as ax,hDe as ay,cu as az,Et as b,qj as b$,K4e as b0,Y4e as b1,dEe as b2,pDe as b3,mDe as b4,sDe as b5,Dee as b6,uDe as b7,lDe as b8,aDe as b9,ZLe as bA,Tw as bB,KRe as bC,WLe as bD,m6e as bE,xEe as bF,C6e as bG,o4e as bH,i4e as bI,s4e as bJ,a4e as bK,y6e as bL,v6e as bM,Gv as bN,DMe as bO,g6e as bP,b6e as bQ,S6e as bR,R4e as bS,O4e as bT,Yd as bU,UNe as bV,kNe as bW,GX as bX,sLe as bY,yEe as bZ,eLe as b_,Qee as ba,G_ as bb,g4e as bc,v4e as bd,nOe as be,rOe as bf,mOe as bg,pOe as bh,ANe as bi,Uee as bj,dDe as bk,Jee as bl,JRe as bm,e4e as bn,z1e as bo,YLe as bp,XLe as bq,NCe as br,QLe as bs,KLe as bt,t4e as bu,t6e as bv,JLe as bw,e6e as bx,eEe as by,E4e as bz,xI as c,rme as c$,SOe as c0,Z5e as c1,PLe as c2,ELe as c3,W5e as c4,Vj as c5,jp as c6,QCe as c7,Kte as c8,ol as c9,H5e as cA,V5e as cB,zj as cC,bLe as cD,SLe as cE,yLe as cF,hU as cG,gLe as cH,Me as cI,ALe as cJ,wEe as cK,CLe as cL,vLe as cM,PEe as cN,$J as cO,qJ as cP,jJ as cQ,XJ as cR,Ff as cS,bEe as cT,hu as cU,bn as cV,ug as cW,h9 as cX,Hpe as cY,Ype as cZ,Jpe as c_,wLe as ca,xLe as cb,_Le as cc,_De as cd,fDe as ce,IMe as cf,d6e as cg,tJ as ch,UJ as ci,k4e as cj,cB as ck,TL as cl,R6e as cm,w6e as cn,x6e as co,_6e as cp,pr as cq,Ege as cr,de as cs,GDe as ct,Vv as cu,GMe as cv,u6e as cw,XQ as cx,fM as cy,B5e as cz,Xr as d,G5e as d$,eme as d0,tme as d1,Yn as d2,ame as d3,nD as d4,nme as d5,R7 as d6,y4e as d7,b4e as d8,C4e as d9,bDe as dA,EDe as dB,qX as dC,rte as dD,ZX as dE,BJ as dF,HX as dG,uS as dH,fte as dI,m8 as dJ,TDe as dK,IDe as dL,DDe as dM,Ate as dN,UDe as dO,RDe as dP,LDe as dQ,Ite as dR,pte as dS,Yr as dT,iDe as dU,$De as dV,FDe as dW,zDe as dX,kDe as dY,NDe as dZ,y8 as d_,S4e as da,JDe as db,qDe as dc,HDe as dd,sme as de,vOe as df,GRe as dg,T4e as dh,A7 as di,xCe as dj,T7 as dk,DLe as dl,Bo as dm,COe as dn,l6e as dp,tB as dq,FLe as dr,a6e as ds,xRe as dt,LLe as du,ULe as dv,s6e as dw,r6e as dx,CDe as dy,SDe as dz,Ws as e,x4e as e$,X5e as e0,eDe as e1,J5e as e2,Y5e as e3,Q5e as e4,tDe as e5,nDe as e6,mee as e7,K5e as e8,yee as e9,qLe as eA,VLe as eB,A6e as eC,xDe as eD,o6e as eE,mMe as eF,kLe as eG,n6e as eH,OCe as eI,RCe as eJ,rLe as eK,LRe as eL,URe as eM,fMe as eN,c6e as eO,ADe as eP,MDe as eQ,ODe as eR,PDe as eS,i6e as eT,cLe as eU,XX as eV,Mee as eW,rDe as eX,oDe as eY,w4e as eZ,_4e as e_,gee as ea,s8 as eb,lLe as ec,zLe as ed,HLe as ee,O7 as ef,$Le as eg,jLe as eh,BLe as ei,iLe as ej,uv as ek,uLe as el,ILe as em,FRe as en,hLe as eo,oEe as ep,Bc as eq,gDe as er,h6e as es,yDe as et,vDe as eu,dLe as ev,r4e as ew,n4e as ex,wDe as ey,pLe as ez,Y2 as f,cDe as f0,h4e as f1,p4e as f2,JCe as f3,m4e as f4,Ts as f5,I6e as f6,RL as f7,G4e as f8,N4e as f9,uke as fA,FX as fB,D4e as fa,P4e as fb,Z4e as fc,M4e as fd,L4e as fe,fLe as ff,F4e as fg,z4e as fh,$4e as fi,j4e as fj,U4e as fk,rCe as fl,f6e as fm,REe as fn,YI as fo,H4e as fp,W4e as fq,q4e as fr,B4e as fs,V4e as ft,sPe as fu,T6e as fv,WPe as fw,YPe as fx,eke as fy,lke as fz,nLe as g,f4e as h,I4e as i,R as j,I7 as k,QDe as l,c4e as m,ov as n,av as o,Kt as p,QX as q,_ as r,pv as s,vf as t,nh as u,Bee as v,zee as w,LX as x,CU as y,KX as z};