PageSourceSearch

https://edgemxtiming.com/assets/index-Ct8eLu1I.js

js edgemxtiming.com collected 2026-10-02 01:27:57 UTC 835,072 bytes, 498 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Landing-Nb59b7pH.js","assets/zap-DvDo5oFM.js","assets/bike-BIqava6h.js","assets/search-BsvfnwMH.js","assets/timer-BmWXyNuG.js","assets/banknote-1tZxZg_8.js","assets/file-text-DHRhOFvY.js","assets/radio-tsTiTjcV.js","assets/message-square-DX3LWn6G.js","assets/palette-DPXSCY9R.js","assets/chart-column-CyZwS_ZC.js","assets/calendar-days-DHySvoZM.js","assets/smartphone-BkakhVKE.js","assets/trophy-Bwwh5BxN.js","assets/OrganizationFinder-BY8g52wS.js","assets/avatar-B8AgHX-V.js","assets/index-CJLyLLo7.js","assets/skeleton-Bbz92LbC.js","assets/building-2-BSn65gGt.js","assets/textarea-ZX0L5GAv.js","assets/ClassChangeConfirmation-DsgSriUE.js","assets/separator-DhStLv6w.js","assets/calendar-CbKSfKX5.js","assets/format-ybceeo2k.js","assets/en-US-CGO0aXMi.js","assets/map-pin-DUB0IYFr.js","assets/mail-BgXQiqCk.js","assets/Organizations-3O5uodF2.js","assets/Tracks-CO_1Th6p.js","assets/TrackFormDialog-BpXq1nQ1.js","assets/checkbox-s2xEAdOA.js","assets/slider-7jwSdK_r.js","assets/rotate-ccw-LStRxjRV.js","assets/flag-BttTACQc.js","assets/trash-2-LxvlgA12.js","assets/upload-BEA5_Dm0.js","assets/TrackFormDialog-Dgihpmma.css","assets/TrackTraceMap-CsH7PoJO.js","assets/plus-Dwixvwn_.js","assets/chevron-left-m_yK3qef.js","assets/TrackDetail-BsXsF6hp.js","assets/useTrackLayouts-KitONxSp.js","assets/pencil-7iZSNVNj.js","assets/globe-Cc4mX4QA.js","assets/phone-CEN_vm4h.js","assets/Auth-BDD1OEYg.js","assets/password-input-DW2M4R6A.js","assets/eye-off-D8k5J7Ic.js","assets/eye-BX6Kc3UM.js","assets/ExistingAccountResetHelper-DlBMMj0u.js","assets/circle-check-big-B2qMybdU.js","assets/key-round-CQA2_xI6.js","assets/triangle-alert-DJpcx1Nd.js","assets/shield-DH9kevRQ.js","assets/types-3c7sL9OC.js","assets/Privacy-CGoDA1gv.js","assets/PlatformLegalContent-Ddjq3bFW.js","assets/privacyPolicy-Cb9096LF.js","assets/Terms-Cf2phBSp.js","assets/termsOfService-DV63O_cZ.js","assets/ForgotPassword-BLOX7Grm.js","assets/arrow-left-xu1INuH2.js","assets/ResetPassword-CWEALgUb.js","assets/Dashboard-BQQ_kwmv.js","assets/switch-BivgU5Jr.js","assets/useEventShareLink-OomMXAME.js","assets/image-B91W3doo.js","assets/refresh-cw-B5_EXY-e.js","assets/copy-BLDCcnKG.js","assets/external-link-Jsfrs_aE.js","assets/baseUrl-1OnSOMcw.js","assets/KioskAdapterContext-D-dkJDI6.js","assets/usePosCoupons-Bkdgdhd2.js","assets/tabs-BxjRtXE_.js","assets/wand-sparkles-DfXyfbHp.js","assets/raceTypeRegistry-BM4qdEpd.js","assets/popover-Dz6tNqoF.js","assets/useTimingClassesForOrg-B1awIF23.js","assets/useTimingEnabled-Cvj4NnkE.js","assets/useSeriesNames-D-FBl3wm.js","assets/youtube-C2Lay5Hh.js","assets/tv-CB4JMdlq.js","assets/youtube-2shWwjb9.js","assets/StreamBoxYouTubePicker-CyXKlnAl.js","assets/video-D_bIpV8P.js","assets/settings-BD4WVUAh.js","assets/square-Dj1m7lf5.js","assets/play-ktVocCtn.js","assets/save-BTwFz6YM.js","assets/scroll-area-XBOZYw_N.js","assets/user-plus-BtybScnH.js","assets/user-minus-CH-X5NjL.js","assets/teams-DBnJNHQ0.js","assets/users-YMaWm21U.js","assets/info-CsKlkfEH.js","assets/tags-Bj30yghl.js","assets/list-checks-VUACUc5Z.js","assets/sortable.esm-BtzrZVCe.js","assets/folder-open-BTqxP00f.js","assets/sparkles-BqYnitDi.js","assets/wrench-BSVL6hRJ.js","assets/useClassTierPricing-B99QFAM7.js","assets/useEvents-OEgpvBj7.js","assets/lock-open-DrGa9BlT.js","assets/lock-DoxhL5bS.js","assets/crown-BRNTTOQs.js","assets/link-2-CQzSERbh.js","assets/square-pen-CMzwsyoA.js","assets/calendar-clock-r7IGAA3h.js","assets/database-COmqmgFs.js","assets/progress-CZ_7l-CT.js","assets/formTemplates-C2Tiiina.js","assets/radio-group-C9ucw0LR.js","assets/star-Fld3FsQo.js","assets/credit-card-COtItE6V.js","assets/award-BLsrLjlR.js","assets/clock-B75jo-2Q.js","assets/shirt-yZVtQS9T.js","assets/alert-lZXLZ_nC.js","assets/alert-dialog-C_VGpbHe.js","assets/pen-line-BqF8oo-a.js","assets/table--nl4fhep.js","assets/book-open-Cwme-l2i.js","assets/SetupWizard-IaKRIBAl.js","assets/circle-alert-D7I9Hadn.js","assets/link-BavsN2MW.js","assets/circle-help-CwDSlQnd.js","assets/dollar-sign-4EtnXuIa.js","assets/heart-CxFOlzMB.js","assets/settings-2-DErlimpU.js","assets/layers-DmHX825Z.js","assets/useTicketingEnabled-BHYJhIeX.js","assets/useContractGate-B-u-IG-p.js","assets/useOrganizationContract-Bo4Bhwq2.js","assets/useCommunicationsEnabled-Bl43oEqU.js","assets/share-2-B_pwvqGV.js","assets/index-Cq7HmRmP.js","assets/printer-BlI7yuPd.js","assets/collapsible-CE2zbKIJ.js","assets/index-0rGuXlz0.js","assets/qr-code-DoldjWbb.js","assets/PayoutStatusBanner-DE72iT2P.js","assets/useBridgeUpdateStatus-COe3w6Ft.js","assets/wifi-DF0qkFFr.js","assets/useOrgStripeAccount-Bh_CIe7T.js","assets/shield-alert-CyDikKSJ.js","assets/EmailBlastWizard-RF981D9G.js","assets/sanitized-html-D_hDi9wu.js","assets/purify.es-C
15KSVp3G.js","assets/megaphone-EgNztnZk.js","assets/ExtrasRecipientPicker-C02xnSlF.js","assets/index-DvDyV3_k.js","assets/index-Dh4i1-J3.js","assets/index-ouk_GpjY.js","assets/send-BmfKE8XA.js","assets/code-B3uDdoMW.js","assets/underline-DzSBTR4Z.js","assets/list-ordered-D8sNfrla.js","assets/useRidersForOrg-HvJYLxMM.js","assets/useSendSMS-CjXzQ05F.js","assets/hash-BYELCNZI.js","assets/useRaceFeed-CT1TwYhi.js","assets/calendar-range-oVQrytng.js","assets/shopping-bag-CTD0jp3M.js","assets/phone-input-ObFGKXW2.js","assets/phone-Ltld9YKt.js","assets/useSaveRider-CSxyPq1H.js","assets/AssignCouponPackDialog-Ckpsh84t.js","assets/useBikeMakeLogos-BM39csav.js","assets/BikeMakeChip-7vyjE7JD.js","assets/bikeMakeStyle-RND07Se0.js","assets/package-BIcii-RO.js","assets/user-check-BwC8fXcP.js","assets/barcode-scanner-button-BDgHuj0e.js","assets/camera-C-_PLVKn.js","assets/useTimingSettings-DIhfPadn.js","assets/shield-check-DDmMofdK.js","assets/useLiveTimingUsage-B2XYbwgj.js","assets/orgNetRevenue-Bfw6BRxN.js","assets/unlink-Cfws_j2J.js","assets/shield-off-DVme6Lss.js","assets/calendar-DxDCzZX-.js","assets/startOfMonth-B1VOnNUT.js","assets/endOfMonth--R-WtYph.js","assets/differenceInCalendarMonths-D2gXU8RP.js","assets/user-search-Dy1tb6A5.js","assets/tag-C5ddNuVX.js","assets/CouponPosterPreview-CT-kus9n.js","assets/useProxiedImageUrl-Bv4V2bP0.js","assets/circle-x-DAvesdV7.js","assets/xlsx-B6sNpj_1.js","assets/handshake-BJgUvp2R.js","assets/scale-8QB8m9UR.js","assets/history-BS_575gd.js","assets/user-cog-dP_KiGsa.js","assets/trending-up-B0p3k3C_.js","assets/bot-D2DTHCn_.js","assets/AdminAnalytics-DBRrUthr.js","assets/accordion-Bs0Mu6GB.js","assets/useEventAnalytics-CAAWlxxZ.js","assets/resolveClassName-DvVkNNVP.js","assets/estimated-progress-DFkHOaMw.js","assets/ellipsis-V9ZC2bJz.js","assets/usePlatformServiceFees-Dia1sN9c.js","assets/file-check-D7f7QP0i.js","assets/pen-cK6y1lt9.js","assets/user-x-Df6xAmC1.js","assets/useRiderDatabaseLookup-CxiGBdVC.js","assets/RiderScheduleSection-CmGjxrfd.js","assets/bell-Xgq8E1Rt.js","assets/useUserEmails-DmVLOekm.js","assets/useTimingCombinedSchedule-CDtrk_d6.js","assets/SignatureCanvas-Bne5z1Q4.js","assets/eraser-Cj28LSL_.js","assets/ContractViewer-BbbkAGBi.js","assets/file-pen-line-YwOq1UbA.js","assets/generateReconciliationCsv-CSqiX4a2.js","assets/jspdf.plugin.autotable-B3ApGzWF.js","assets/useRaceReadiness-D8VTYFJS.js","assets/TutorialProgress-CE6t8s7v.js","assets/layout-dashboard-D8LWXH2Z.js","assets/graduation-cap-BuZhPhGL.js","assets/SuperAdminDashboard-CzYfvLfh.js","assets/usePayoutSchedule-BHj2eq8M.js","assets/payoutInvoicePdf-gjnl3NuR.js","assets/pause-BtiaXahv.js","assets/flask-conical-Dirlu9de.js","assets/file-pen-TYd5rHoG.js","assets/circle-play-BTmpRwov.js","assets/useOrganizations-DanNpAtC.js","assets/useOrgSetupChecklist-js7IifXQ.js","assets/OrganizationBranding-DMu3UltM.js","assets/useFeeSettings-BkED3tUc.js","assets/OrgLiveTimingFeesCard-D1bOpKEH.js","assets/percent-CM_9yqKj.js","assets/AIFloatingButton-DzuTziAn.js","assets/ImageLightbox-DzJkaBWN.js","assets/minus-CoO45ah2.js","assets/thumbs-up-CrpZt3t6.js","assets/thumbs-down-ChN-DmeG.js","assets/crosshair-gUHo1kGG.js","assets/file-down-CbRcBN9_.js","assets/RegressionTestsPage-Di7HHu0j.js","assets/sanitizeUrl-CAP9M8eB.js","assets/nicknameVariants-CT_QG-k6.js","assets/searchTokens-CTUj4aZL.js","assets/signupLabel-CoOzVGDj.js","assets/shopping-cart-Bqj-YZFe.js","assets/monitor-Chxxi-hB.js","assets/clipboard-check-DIM5JbBn.js","assets/activity-dhGYkICl.js","assets/calendar-check-DLZtpLCH.js","assets/RegistrationFamilyLinkBackfillPage-DWrivYZd.js","assets/RiderDedupePage-2fO5VJ2x.js","assets/RaceReadinessPage-C5wljCRd.js","assets/RiderMatchReviewPage-iHibRkTV.js","assets/PlatformCouponsPage-FJX5RzCd.js","assets/SuperAdminToolsPage-CxLXVgOJ.js","assets/ResultsAuditPage-DO5vphj7.js","assets/IdentitySyncPage-7voHyOmf.js","assets/OrgReconciliationPage-Dop_AJ_J.js","assets/PlatformFinancePage-n4WX9VHF.js","assets/BridgeReleasesPage-7VxxNjQv.js","assets/HandheldDevicesCard-CqjVIDfk.js","assets/handheldDevice-4EDGj-kb.js","assets/KnowledgeBasePage-CiKl4CvG.js","assets/BridgeMonitorPage-eedwYrWS.js","assets/useActiveBridge-BcT4Pn5_.js","assets/StreamBoxLicensesPage-FlA-qm2I.js","assets/streamBoxLayers-b_ieUFxu.js","assets/StagingCheckIn-9635MsGU.js","assets/enduranceRoster-cEk3MqhI.js","assets/useOrganizationSlug-Im1jCHRI.js","assets/useTimingEvents-a-TBF05g.js","assets/useTimingRaceOrder
1-CrSEwQiR.js","assets/BikeMakeBadge-CLPRnHpn.js","assets/useEnduranceTeams-QPesV-E6.js","assets/scan-line-BGvhTSjS.js","assets/repeat-BBFhnpV6.js","assets/BridgeDownloadPage-DwNIBdPB.js","assets/TagProgrammerPage-Bd9aAvUP.js","assets/normalizeEpc-DqujmFKo.js","assets/volume-2-D1GY6zle.js","assets/StreamBoxPage-iK8i52pJ.js","assets/monitor-play-Z9n1FPOa.js","assets/GuideLayout-BzZXem3X.js","assets/life-buoy-BrLDFTk8.js","assets/GuidesHubPage-D9fQgw6n.js","assets/HardwareGuidePage-CLd59ATR.js","assets/GuideChrome-ja57l5RI.js","assets/zoom-in-CyOAw4UX.js","assets/lightbulb-DecL0Y6g.js","assets/BridgeInstallGuidePage-4E4fLZAj.js","assets/bridge-status-paired.webp.asset-B-aO-pD0.js","assets/BridgeInstallMacGuidePage-9nfCWg3W.js","assets/ConnectReaderGuidePage-ElzFzxox.js","assets/rfid-reader-controls-modal.webp.asset-vwXYv5SZ.js","assets/RunRaceGuidePage-Dkk6rOPz.js","assets/TroubleshootingGuidePage-OLdAgy5v.js","assets/HandheldR7GuidePage-BFXzMF3r.js","assets/R7SettingsSheet-DQ1mbieF.js","assets/FormBuilderPage-BuTg--tf.js","assets/useBikeMakes-o3WGcIc4.js","assets/useConfirmationFields-C8Z-PULf.js","assets/ElementPickerDialog-BNONH90Y.js","assets/formImageStyles-B4p3kKKU.js","assets/inline-rich-text-editor-BJwpKsR-.js","assets/EnduranceEntryField-xlmy_fFw.js","assets/TeamSignupSection-Ca2hmmm0.js","assets/facebook-DyrCiiOy.js","assets/linkedin-DS5j75_D.js","assets/ImageStudioDialog-BAMPr83x.js","assets/type-BUNMsbJH.js","assets/arrow-up-Di3GSD7x.js","assets/maximize-GPXI9VnQ.js","assets/image-plus-CvAibaJ5.js","assets/share-DmzxqR6a.js","assets/trash-ChBAcH4p.js","assets/house-BVsC_rqc.js","assets/gift-C-KFjWTZ.js","assets/square-check-big-D-Ckz70G.js","assets/square-plus-Bl_KURzR.js","assets/receipt-3pKGVuPA.js","assets/log-in-BUn-YFrb.js","assets/layout-list-bcBh1cNM.js","assets/EventSettingsPage-CDyclNV5.js","assets/useCoupons-CXWHOTac.js","assets/OrganizationBadge-5pjWJhs2.js","assets/scoringPresets-4EVa62pc.js","assets/EventAnalyticsPage-BOxgnM_q.js","assets/EventRegistrationsPage-C89a-BH2.js","assets/formatDistanceToNow-nzxXZqmT.js","assets/differenceInMilliseconds-CVPzdaho.js","assets/FeeSettingsPage-ByELQf6m.js","assets/OrgPayoutsCard-BXlATKSG.js","assets/PayoutsPage-BFC2qlAa.js","assets/PayoutDetailPage-5vTsF3Fd.js","assets/TransactionsPage-pc5kKR1M.js","assets/useRegistrationTransactions-BNkwnXTT.js","assets/ImportRidersPage-C6Ht1iVR.js","assets/EditRegistrationPage--jnhMtMc.js","assets/DynamicFormField-BT5ksDo5.js","assets/use-mobile-CWiys2s2.js","assets/SocialShareButtons-Cwc34G6H.js","assets/RegistrationActivityTimeline-BBwxpSSb.js","assets/useRegistrationActivity-C3DzRjCM.js","assets/useUnifiedEditorFlag-BsykBH5a.js","assets/useEditableEventClasses-DClO0Efg.js","assets/reconstructLineItems-CaO-q4lF.js","assets/BrandingPage-D7qCIEmO.js","assets/LandingPageBuilderPage-DWaKVQiV.js","assets/useLandingPageFields-DXDks8YY.js","assets/CustomPageBuilder-PP6Z43ij.js","assets/useCustomPageFields-CjotJQo4.js","assets/CustomPageBuilderPage-tNXi7HrR.js","assets/GettingStartedPage-BhoF1n5q.js","assets/calendar-plus-eA9xa1c3.js","assets/KioskPage-D1J5zWD0.js","assets/KioskCheckoutProcessing-B1xndfGP.js","assets/selectedRoundsFromResponses-CREygxYZ.js","assets/RiderTransponderManager-KkKU190K.js","assets/EnduranceTeamAssignDialog-6sXrVnpE.js","assets/kioskReturn-BDgNN9U0.js","assets/kioskCashContext-C5rYJs9s.js","assets/RegistrationClosedMessage-BT8-B7I3.js","assets/CheckoutProcessing-KUf7KzyO.js","assets/TimingPage-D1XuvpzL.js","assets/TvResultsPage-BKlU04-s.js","assets/minimize-ZuqHVVT-.js","assets/RaceFeedPage-BzaxdKsV.js","assets/useRaceFeedComments-DP5lK-7N.js","assets/pin-HivEzZZx.js","assets/sheet-BpJkNSYq.js","assets/pin-off-BCu_Hb9s.js","assets/CombinedRacesPage-BVUbnNpw.js","assets/AdminShellLayout-RCt59QQM.js","assets/endurance-B_3nOsV8.js","assets/lapOutliers-CZi5QlI6.js","assets/OrgRaceFeed-BDk-0NCn.js","assets/PublicPostCard-DpH8PYAh.js","assets/PostComments-W5orljD5.js","assets/OrgFeedPost-PuqCFvCB.js","assets/EmbedRaceFeed-CYx7z56N.js","assets/SocialLoginButtons-BRhX2Tdp.js","assets/EmbedAuth-BEVFInI-.js","assets/PosVerifier-Bv-veIx2.js","assets/CouponView-D4fVmpHK.js","assets/SponsorCouponView-CuUOhy7E.js","assets/TimingLayout-N_JkLBVP.js","assets/TimingSelectionContext-0R53bEzZ.js","assets/TimingTabMemoryContext-C4jz6T-L.js","assets/MyRidersFilterContext-B5HDUcVn.js","assets/useRiderFamily-BWVYDRiJ.js","assets/InnerLoader-urptWcjN.js","assets/TimingHome-BPGqQHpR.js","assets/TimingEventPicker-HqK0wNRr.js","assets/TimingSchedulePage-BJd5mNYk.js","assets/EventTitleBanner-CFigM9TL.js","assets/CombinedScheduleTab-C_IgyIMX.js","assets/useSelectedTimingEvent-IKCMbW8S.js","assets/resolveClassNames-B8m22UiV.js","assets/TimingRaceDayPage-DyT31N-N.js","assets/LiveTimingTab-DUGc1m7-.js","assets/usePublicLabLiveTiming-Cag7extT.js","assets/CamerasTab-iOOZcl1r.js","assets/GatePickTab-BNtlypES.js","assets/FeedTab-DFHF1Ywr.js","assets/TimingResultsPage-C_1Qg9rA.js","assets/TimingLegalPage-vikPscWX.js","assets/RaceResultsTab-DTSTW7ZU.js","assets/RiderProfileDialog-DAi80iMe.js","assets/useRiderResults-Cb6CRYFg.js","assets/PodiumTab-CbmpDvjy.js","assets/LapTimesTab-CS7-MqPn.js","assets/SeriesPointsTab-Cqpo5aQa.js","assets/TimingClassesPage-ma66-DEI.js","assets/TimingSectionGate-efqMrRgh.js","assets/OverlaySidebarPage-CVrMS6Fj.js","assets/OverlayStagePage-Bm_ZuMQE.js","assets/OrgHome-ByGP-Lff.js","assets/OrgLandingPage-BFg1-rA6.js","assets/LandingPageRenderer-Bcr_KE1h.js","assets/OrgCustomPage-OiOraqM-.js","assets/OrgEvents-JAWV5me6.js","assets/OrgRegister-C2FU1qJ1.js","assets/useRegistrationDrafts-8iQMGiGb.js","assets/RiderAccountPromoDialog-B9KDuLEG.js","assets/OrgLogin-BjfViBN4.js","assets/OrgEditRegistration-BcW4Q5nl.js","assets/OrgForgotPassword-C3gArGU5.js","assets/OrgConfirmation-LKG8xyeh.js","assets/OrgRegistrationLookup-D7d48jti.js","assets/OrgAccount-Cp5U3LfW.js","assets/OrgTeamPage-BnC8xXmK.js","assets/OrgKiosk-2QE66kG7.js","assets/OrgKioskWorkspace-DgpZvGqi.js","assets/OrgFundraiserPage-CAz37trh.js","assets/TicketPurchasePage-b5QjfQ1v.js","assets/TicketPassPage-Ih4Dgst0.js","assets/EventTicketsPage-CfQRhR3C.js","assets/OrgPrivacy-BYqAWxrp.js","assets/OrgTerms-HlTAaiu6.js","assets/OrgInstall-Da4QSTQI.js","assets/OrgGatePos-Ca70l2_g.js","assets/OrgVolunteerKiosk-B2WF_-QZ.js","assets/AdminVolunteers-CoNCBSkO.js"])))=>i.map(i=>d[i]);
2var tk=Object.defineProperty;var dv=e=>{throw TypeError(e)};var rk=(e,t,r)=>t in e?tk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fv=(e,t,r)=>rk(e,typeof t!="symbol"?t+"":t,r),rf=(e,t,r)=>t.has(e)||dv("Cannot "+r);var T=(e,t,r)=>(rf(e,t,"read from private field"),r?r.call(e):t.get(e)),ne=(e,t,r)=>t.has(e)?dv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),G=(e,t,r,n)=>(rf(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),he=(e,t,r)=>(rf(e,t,"access private method"),r);var Yl=(e,t,r,n)=>({set _(o){G(e,t,o,r)},get _(){return T(e,t,n)}});function J0(e,t){for(var r=0;r<t.length;r++){const n=t[r];
vendor: 6,171 bytes, lines 2-10
2if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(n,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>n[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"]'))n(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();var No=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var X0={exports:{}},rd={},Z0={exports:{}},ve={};/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var kl=Symbol.for("react.element"),nk=Symbol.for("react.portal"),ok=Symbol.for("react.fragment"),sk=Symbol.for("react.strict_mode"),ik=Symbol.for("react.profiler"),ak=Symbol.for("react.provider"),lk=Symbol.for("react.context"),ck=Symbol.for("react.forward_ref"),uk=Symbol.for("react.suspense"),dk=Symbol.for("react.memo"),fk=Symbol.for("react.lazy"),hv=Symbol.iterator;function hk(e){return e===null||typeof e!="object"?null:(e=hv&&e[hv]||e["@@iterator"],typeof e=="function"?e:null)}var eb={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tb=Object.assign,rb={};function Ui(e,t,r){this.props=e,this.context=t,this.refs=rb,this.updater=r||eb}Ui.prototype.isReactComponent={};Ui.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ui.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nb(){}nb.prototype=Ui.prototype;function om(e,t,r){this.props=e,this.context=t,this.refs=rb,this.updater=r||eb}var sm=om.prototype=new nb;sm.constructor=om;tb(sm,Ui.prototype);sm.isPureReactComponent=!0;var pv=Array.isArray,ob=Object.prototype.hasOwnProperty,im={current:null},sb={key:!0,ref:!0,__self:!0,__source:!0};function ib(e,t,r){var n,o={},s=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)ob.call(t,n)&&!sb.hasOwnProperty(n)&&(o[n]=t[n]);var a=arguments.length-2;if(a===1)o.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)o[n]===void 0&&(o[n]=a[n]);return{$$typeof:kl,type:e,key:s,ref:i,props:o,_owner:im.current}}function pk(e,t){return{$$typeof:kl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function am(e){return typeof e=="object"&&e!==null&&e.$$typeof===kl}function mk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var mv=/\/+/g;function nf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?mk(""+e.key):t.toString(36)}function Lc(e,t,r,n,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case kl:case nk:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+nf(i,0):n,pv(o)?(r="",e!=null&&(r=e.replace(mv,"$&/")+"/"),Lc(o,t,r,"",function(c){return c})):o!=null&&(am(o)&&(o=pk(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(mv,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",pv(e))for(var a=0;a<e.length;a++){s=e[a];var l=n+nf(s,a);i+=Lc(s,t,r,l,o)}else if(l=hk(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=n+nf(s,a++),i+=Lc(s,t,r,l,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Jl(e,t,r){if(e==null)return e;var n=[],o=0;return Lc(e,n,"","",function(s){return t.call(r,s,o++)}),n}function gk(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ct={current:null},Dc={transition:null},vk={ReactCurrentDispatcher:Ct,ReactCurrentBatchConfig:Dc,ReactCurrentOwner:im};function ab(){throw Error("act(...) is not supported in production builds of React.")}ve.Children={map:Jl,forEach:function(e,t,r){Jl(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Jl(e,function(){t++}),t},toArray:function(e){return Jl(e,function(t){return t})||[]},only:function(e){if(!am(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ve.Component=Ui;ve.Fragment=ok;ve.Profiler=ik;ve.PureComponent=om;ve.StrictMode=sk;ve.Suspense=uk;
vendor: 5,180 bytes, lines 10-26
10ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;ve.act=ab;ve.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=tb({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=im.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ob.call(t,l)&&!sb.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:kl,type:e.type,key:o,ref:s,props:n,_owner:i}};ve.createContext=function(e){return e={$$typeof:lk,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ak,_context:e},e.Consumer=e};ve.createElement=ib;ve.createFactory=function(e){var t=ib.bind(null,e);return t.type=e,t};ve.createRef=function(){return{current:null}};ve.forwardRef=function(e){return{$$typeof:ck,render:e}};ve.isValidElement=am;ve.lazy=function(e){return{$$typeof:fk,_payload:{_status:-1,_result:e},_init:gk}};ve.memo=function(e,t){return{$$typeof:dk,type:e,compare:t===void 0?null:t}};ve.startTransition=function(e){var t=Dc.transition;Dc.transition={};try{e()}finally{Dc.transition=t}};ve.unstable_act=ab;ve.useCallback=function(e,t){return Ct.current.useCallback(e,t)};ve.useContext=function(e){return Ct.current.useContext(e)};ve.useDebugValue=function(){};ve.useDeferredValue=function(e){return Ct.current.useDeferredValue(e)};ve.useEffect=function(e,t){return Ct.current.useEffect(e,t)};ve.useId=function(){return Ct.current.useId()};ve.useImperativeHandle=function(e,t,r){return Ct.current.useImperativeHandle(e,t,r)};ve.useInsertionEffect=function(e,t){return Ct.current.useInsertionEffect(e,t)};ve.useLayoutEffect=function(e,t){return Ct.current.useLayoutEffect(e,t)};ve.useMemo=function(e,t){return Ct.current.useMemo(e,t)};ve.useReducer=function(e,t,r){return Ct.current.useReducer(e,t,r)};ve.useRef=function(e){return Ct.current.useRef(e)};ve.useState=function(e){return Ct.current.useState(e)};ve.useSyncExternalStore=function(e,t,r){return Ct.current.useSyncExternalStore(e,t,r)};ve.useTransition=function(){return Ct.current.useTransition()};ve.version="18.3.1";Z0.exports=ve;var v=Z0.exports;const A=wo(v),lm=J0({__proto__:null,default:A},[v]);/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var yk=v,wk=Symbol.for("react.element"),bk=Symbol.for("react.fragment"),_k=Object.prototype.hasOwnProperty,xk=yk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ek={key:!0,ref:!0,__self:!0,__source:!0};function lb(e,t,r){var n,o={},s=null,i=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)_k.call(t,n)&&!Ek.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:wk,type:e,key:s,ref:i,props:o,_owner:xk.current}}rd.Fragment=bk;rd.jsx=lb;rd.jsxs=lb;X0.exports=rd;var f=X0.exports;(()=>{try{const{pathname:e,hash:t,search:r}=window.location;if(e==="/reset-password"||!t||t.length<2)return;const n=new URLSearchParams(t.slice(1)),o=n.get("type")==="recovery",s=n.get("error_code")==="otp_expired"||n.get("error")==="access_denied"&&n.has("error_code");(o||s)&&window.location.replace(`/reset-password${r}${t}`)}catch{}})();var cb={exports:{}},Yt={},ub={exports:{}},db={};/**
19 * @license React
20 * scheduler.production.min.js
21 *
22 * Copyright (c) Facebook, Inc. and its affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */(function(e){function t(R,k){var B=R.length;R.push(k);e:for(;0<B;){var te=B-1>>>1,J=R[te];if(0<o(J,k))R[te]=k,R[B]=J,B=te;else break e}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var k=R[0],B=R.pop();if(B!==k){R[0]=B;e:for(var te=0,J=R.length,le=J>>>1;te<le;){var ie=2*(te+1)-1,je=R[ie],Ae=ie+1,V=R[Ae];if(0>o(je,B))Ae<J&&0>o(V,je)?(R[te]=V,R[Ae]=B,te=Ae):(R[te]=je,R[ie]=B,te=ie);else if(Ae<J&&0>o(V,B))R[te]=V,R[Ae]=B,te=Ae;else break e}}return k}function o(R,k){var B=R.sortIndex-k.sortIndex;return B!==0?B:R.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],c=[],u=1,d=null,p=3,h=!1,g=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(R){for(var k=r(c);k!==null;){if(k.callback===null)n(c);else if(k.startTime<=R)n(c),k.sortIndex=k.expirationTime,t(l,k);else break;k=r(c)}}
vendor: 9,410 bytes, lines 26-35
26function x(R){if(m=!1,_(R),!g)if(r(l)!==null)g=!0,q(E);else{var k=r(c);k!==null&&re(x,k.startTime-R)}}function E(R,k){g=!1,m&&(m=!1,w(P),P=-1),h=!0;var B=p;try{for(_(k),d=r(l);d!==null&&(!(d.expirationTime>k)||R&&!$());){var te=d.callback;if(typeof te=="function"){d.callback=null,p=d.priorityLevel;var J=te(d.expirationTime<=k);k=e.unstable_now(),typeof J=="function"?d.callback=J:d===r(l)&&n(l),_(k)}else n(l);d=r(l)}if(d!==null)var le=!0;else{var ie=r(c);ie!==null&&re(x,ie.startTime-k),le=!1}return le}finally{d=null,p=B,h=!1}}var S=!1,C=null,P=-1,I=5,j=-1;function $(){return!(e.unstable_now()-j<I)}function M(){if(C!==null){var R=e.unstable_now();j=R;var k=!0;try{k=C(!0,R)}finally{k?W():(S=!1,C=null)}}else S=!1}var W;if(typeof y=="function")W=function(){y(M)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,oe=U.port2;U.port1.onmessage=M,W=function(){oe.postMessage(null)}}else W=function(){b(M,0)};function q(R){C=R,S||(S=!0,W())}function re(R,k){P=b(function(){R(e.unstable_now())},k)}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(R){R.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,q(E))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(R){switch(p){case 1:case 2:case 3:var k=3;break;default:k=p}var B=p;p=k;try{return R()}finally{p=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,k){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var B=p;p=R;try{return k()}finally{p=B}},e.unstable_scheduleCallback=function(R,k,B){var te=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?te+B:te):B=te,R){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=B+J,R={id:u++,callback:k,priorityLevel:R,startTime:B,expirationTime:J,sortIndex:-1},B>te?(R.sortIndex=B,t(c,R),r(l)===null&&R===r(c)&&(m?(w(P),P=-1):m=!0,re(x,B-te))):(R.sortIndex=J,t(l,R),g||h||(g=!0,q(E))),R},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(R){var k=p;return function(){var B=p;p=k;try{return R.apply(this,arguments)}finally{p=B}}}})(db);ub.exports=db;var Sk=ub.exports;/**
27 * @license React
28 * react-dom.production.min.js
29 *
30 * Copyright (c) Facebook, Inc. and its affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var Tk=v,Qt=Sk;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var fb=new Set,qa={};function ys(e,t){Ei(e,t),Ei(e+"Capture",t)}function Ei(e,t){for(qa[e]=t,e=0;e<t.length;e++)fb.add(t[e])}var gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nh=Object.prototype.hasOwnProperty,Ck=/^[: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]*$/,gv={},vv={};function Pk(e){return nh.call(vv,e)?!0:nh.call(gv,e)?!1:Ck.test(e)?vv[e]=!0:(gv[e]=!0,!1)}function kk(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ok(e,t,r,n){if(t===null||typeof t>"u"||kk(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pt(e,t,r,n,o,s,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=i}var ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ut[e]=new Pt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ut[t]=new Pt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ut[e]=new Pt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ut[e]=new Pt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ut[e]=new Pt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ut[e]=new Pt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ut[e]=new Pt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ut[e]=new Pt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ut[e]=new Pt(e,5,!1,e.toLowerCase(),null,!1,!1)});var cm=/[\-:]([a-z])/g;function um(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(cm,um);ut[t]=new Pt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(cm,um);ut[t]=new Pt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(cm,um);ut[t]=new Pt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ut[e]=new Pt(e,1,!1,e.toLowerCase(),null,!1,!1)});ut.xlinkHref=new Pt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ut[e]=new Pt(e,1,!1,e.toLowerCase(),null,!0,!0)});function dm(e,t,r,n){var o=ut.hasOwnProperty(t)?ut[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Ok(t,r,o,n)&&(r=null),n||o===null?Pk(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var En=Tk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xl=Symbol.for("react.element"),Us=Symbol.for("react.portal"),Bs=Symbol.for("react.fragment"),fm=Symbol.for("react.strict_mode"),oh=Symbol.for("react.profiler"),hb=Symbol.for("react.provider"),pb=Symbol.for("react.context"),hm=Symbol.for("react.forward_ref"),sh=Symbol.for("react.suspense"),ih=Symbol.for("react.suspense_list"),pm=Symbol.for("react.memo"),Mn=Symbol.for("react.lazy"),mb=Symbol.for("react.offscreen"),yv=Symbol.iterator;function ia(e){return e===null||typeof e!="object"?null:(e=yv&&e[yv]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Object.assign,of;function _a(e){if(of===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);of=t&&t[1]||""}return`
35`+of+e}var sf=!1;function af(e,t){if(!e||sf)return"";sf=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}
vendor: 13,968 bytes, lines 35-38
35catch(c){if(c&&n&&typeof c.stack=="string"){for(var o=c.stack.split(`
36`),s=n.stack.split(`
37`),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var l=`
38`+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{sf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?_a(e):""}function Rk(e){switch(e.tag){case 5:return _a(e.type);case 16:return _a("Lazy");case 13:return _a("Suspense");case 19:return _a("SuspenseList");case 0:case 2:case 15:return e=af(e.type,!1),e;case 11:return e=af(e.type.render,!1),e;case 1:return e=af(e.type,!0),e;default:return""}}function ah(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bs:return"Fragment";case Us:return"Portal";case oh:return"Profiler";case fm:return"StrictMode";case sh:return"Suspense";case ih:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pb:return(e.displayName||"Context")+".Consumer";case hb:return(e._context.displayName||"Context")+".Provider";case hm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case pm:return t=e.displayName||null,t!==null?t:ah(e.type)||"Memo";case Mn:t=e._payload,e=e._init;try{return ah(e(t))}catch{}}return null}function jk(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ah(t);case 8:return t===fm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function po(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ak(e){var t=gb(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){n=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zl(e){e._valueTracker||(e._valueTracker=Ak(e))}function vb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=gb(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ou(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function lh(e,t){var r=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function wv(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=po(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function yb(e,t){t=t.checked,t!=null&&dm(e,"checked",t,!1)}function ch(e,t){yb(e,t);var r=po(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?uh(e,t.type,r):t.hasOwnProperty("defaultValue")&&uh(e,t.type,po(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bv(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function uh(e,t,r){(t!=="number"||ou(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var xa=Array.isArray;function Xs(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+po(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function dh(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _v(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(F(92));if(xa(r)){if(1<r.length)throw Error(F(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:po(r)}}function wb(e,t){var r=po(t.value),n=po(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function xv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bb(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function fh(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bb(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ec,_b=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ec=ec||document.createElement("div"),ec.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ec.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ga(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Na={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nk=["Webkit","ms","Moz","O"];Object.keys(Na).forEach(function(e){Nk.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Na[t]=Na[e]})});function xb(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Na.hasOwnProperty(e)&&Na[e]?(""+t).trim():t+"px"}function Eb(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=xb(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var Ik=qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hh(e,t){if(t){if(Ik[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function ph(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var mh=null;function mm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gh=null,Zs=null,ei=null;function Ev(e){if(e=jl(e)){if(typeof gh!="function")throw Error(F(280));var t=e.stateNode;t&&(t=ad(t),gh(e.stateNode,e.type,t))}}function Sb(e){Zs?ei?ei.push(e):ei=[e]:Zs=e}function Tb(){if(Zs){var e=Zs,t=ei;if(ei=Zs=null,Ev(e),t)for(e=0;e<t.length;e++)Ev(t[e])}}function Cb(e,t){return e(t)}function Pb(){}var lf=!1;function kb(e,t,r){if(lf)return e(t,r);lf=!0;try{return Cb(e,t,r)}finally{lf=!1,(Zs!==null||ei!==null)&&(Pb(),Tb())}}function Ka(e,t){var r=e.stateNode;if(r===null)return null;var n=ad(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(F(231,t,typeof r));return r}var vh=!1;if(gn)try{var aa={};Object.defineProperty(aa,"passive",{get:function(){vh=!0}}),window.addEventListener("test",aa,aa),window.removeEventListener("test",aa,aa)}catch{vh=!1}function Lk(e,t,r,n,o,s,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(u){this.onError(u)}}var Ia=!1,su=null,iu=!1,yh=null,Dk={onError:function(e){Ia=!0,su=e}};function Mk(e,t,r,n,o,s,i,a,l){Ia=!1,su=null,Lk.apply(Dk,arguments)}function $k(e,t,r,n,o,s,i,a,l){if(Mk.apply(this,arguments),Ia){if(Ia){var c=su;Ia=!1,su=null}else throw Error(F(198));iu||(iu=!0,yh=c)}}function ws(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Ob(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Sv(e){if(ws(e)!==e)throw Error(F(188))}function Fk(e){var t=e.alternate;if(!t){if(t=ws(e),t===null)throw Error(F(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var s=o.alternate;if(s===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===r)return Sv(o),e;if(s===n)return Sv(o),t;s=s.sibling}throw Error(F(188))}if(r.return!==n.return)r=o,n=s;else{for(var i=!1,a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i)throw Error(F(189))}}if(r.alternate!==n)throw Error(F(190))}if(r.tag!==3)throw Error(F(188));return r.stateNode.current===r?e:t}function Rb(e){return e=Fk(e),e!==null?jb(e):null}function jb(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=jb(e);if(t!==null)return t;e=e.sibling}return null}var Ab=Qt.unstable_scheduleCallback,Tv=Qt.unstable_cancelCallback,Uk=Qt.unstable_shouldYield,Bk=Qt.unstable_requestPaint,Qe=Qt.unstable_now,zk=Qt.unstable_getCurrentPriorityLevel,gm=Qt.unstable_ImmediatePriority,Nb=Qt.unstable_UserBlockingPriority,au=Qt.unstable_NormalPriority,Vk=Qt.unstable_LowPriority,Ib=Qt.unstable_IdlePriority,nd=null,Gr=null;function Wk(e){if(Gr&&typeof Gr.onCommitFiberRoot=="function")try{Gr.onCommitFiberRoot(nd,e,void 0,(e.current.flags&128)===128)}catch{}}var Cr=Math.clz32?Math.clz32:Gk,Hk=Math.log,qk=Math.LN2;function Gk(e){return e>>>=0,e===0?32:31-(Hk(e)/qk|0)|0}var tc=64,rc=4194304;function Ea(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lu(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,s=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~o;a!==0?n=Ea(a):(s&=i,s!==0&&(n=Ea(s)))}else i=r&~o,i!==0?n=Ea(i):s!==0&&(n=Ea(s));if(n===0)return 0;if(t!==0&&t!==n&&!(t&o)&&(o=n&-n,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Cr(t),o=1<<r,n|=e[r],t&=~o;return n}function Kk(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qk(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Cr(s),a=1<<i,l=o[i];l===-1?(!(a&r)||a&n)&&(o[i]=Kk(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function wh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}
vendor: 4,209 bytes, line 38
38function Lb(){var e=tc;return tc<<=1,!(tc&4194240)&&(tc=64),e}function cf(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ol(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Cr(t),e[t]=r}function Yk(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Cr(r),s=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~s}}function vm(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Cr(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Re=0;function Db(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Mb,ym,$b,Fb,Ub,bh=!1,nc=[],no=null,oo=null,so=null,Qa=new Map,Ya=new Map,Fn=[],Jk="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 submit".split(" ");function Cv(e,t){switch(e){case"focusin":case"focusout":no=null;break;case"dragenter":case"dragleave":oo=null;break;case"mouseover":case"mouseout":so=null;break;case"pointerover":case"pointerout":Qa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ya.delete(t.pointerId)}}function la(e,t,r,n,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:s,targetContainers:[o]},t!==null&&(t=jl(t),t!==null&&ym(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Xk(e,t,r,n,o){switch(t){case"focusin":return no=la(no,e,t,r,n,o),!0;case"dragenter":return oo=la(oo,e,t,r,n,o),!0;case"mouseover":return so=la(so,e,t,r,n,o),!0;case"pointerover":var s=o.pointerId;return Qa.set(s,la(Qa.get(s)||null,e,t,r,n,o)),!0;case"gotpointercapture":return s=o.pointerId,Ya.set(s,la(Ya.get(s)||null,e,t,r,n,o)),!0}return!1}function Bb(e){var t=zo(e.target);if(t!==null){var r=ws(t);if(r!==null){if(t=r.tag,t===13){if(t=Ob(r),t!==null){e.blockedOn=t,Ub(e.priority,function(){$b(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=_h(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);mh=n,r.target.dispatchEvent(n),mh=null}else return t=jl(r),t!==null&&ym(t),e.blockedOn=r,!1;t.shift()}return!0}function Pv(e,t,r){Mc(e)&&r.delete(t)}function Zk(){bh=!1,no!==null&&Mc(no)&&(no=null),oo!==null&&Mc(oo)&&(oo=null),so!==null&&Mc(so)&&(so=null),Qa.forEach(Pv),Ya.forEach(Pv)}function ca(e,t){e.blockedOn===t&&(e.blockedOn=null,bh||(bh=!0,Qt.unstable_scheduleCallback(Qt.unstable_NormalPriority,Zk)))}function Ja(e){function t(o){return ca(o,e)}if(0<nc.length){ca(nc[0],e);for(var r=1;r<nc.length;r++){var n=nc[r];n.blockedOn===e&&(n.blockedOn=null)}}for(no!==null&&ca(no,e),oo!==null&&ca(oo,e),so!==null&&ca(so,e),Qa.forEach(t),Ya.forEach(t),r=0;r<Fn.length;r++)n=Fn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Fn.length&&(r=Fn[0],r.blockedOn===null);)Bb(r),r.blockedOn===null&&Fn.shift()}var ti=En.ReactCurrentBatchConfig,cu=!0;function eO(e,t,r,n){var o=Re,s=ti.transition;ti.transition=null;try{Re=1,wm(e,t,r,n)}finally{Re=o,ti.transition=s}}function tO(e,t,r,n){var o=Re,s=ti.transition;ti.transition=null;try{Re=4,wm(e,t,r,n)}finally{Re=o,ti.transition=s}}function wm(e,t,r,n){if(cu){var o=_h(e,t,r,n);if(o===null)wf(e,t,n,uu,r),Cv(e,n);else if(Xk(o,e,t,r,n))n.stopPropagation();else if(Cv(e,n),t&4&&-1<Jk.indexOf(e)){for(;o!==null;){var s=jl(o);if(s!==null&&Mb(s),s=_h(e,t,r,n),s===null&&wf(e,t,n,uu,r),s===o)break;o=s}o!==null&&n.stopPropagation()}else wf(e,t,n,null,r)}}var uu=null;function _h(e,t,r,n){if(uu=null,e=mm(n),e=zo(e),e!==null)if(t=ws(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Ob(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return uu=e,null}
vendor: 10,401 bytes, line 38
38function zb(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(zk()){case gm:return 1;case Nb:return 4;case au:case Vk:return 16;case Ib:return 536870912;default:return 16}default:return 16}}var eo=null,bm=null,$c=null;function Vb(){if($c)return $c;var e,t=bm,r=t.length,n,o="value"in eo?eo.value:eo.textContent,s=o.length;for(e=0;e<r&&t[e]===o[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===o[s-n];n++);return $c=o.slice(e,1<n?1-n:void 0)}function Fc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function oc(){return!0}function kv(){return!1}function Jt(e){function t(r,n,o,s,i){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?oc:kv,this.isPropagationStopped=kv,this}return qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=oc)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=oc)},persist:function(){},isPersistent:oc}),t}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_m=Jt(Bi),Rl=qe({},Bi,{view:0,detail:0}),rO=Jt(Rl),uf,df,ua,od=qe({},Rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ua&&(ua&&e.type==="mousemove"?(uf=e.screenX-ua.screenX,df=e.screenY-ua.screenY):df=uf=0,ua=e),uf)},movementY:function(e){return"movementY"in e?e.movementY:df}}),Ov=Jt(od),nO=qe({},od,{dataTransfer:0}),oO=Jt(nO),sO=qe({},Rl,{relatedTarget:0}),ff=Jt(sO),iO=qe({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),aO=Jt(iO),lO=qe({},Bi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cO=Jt(lO),uO=qe({},Bi,{data:0}),Rv=Jt(uO),dO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fO={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"},hO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hO[e])?!!t[e]:!1}function xm(){return pO}var mO=qe({},Rl,{key:function(e){if(e.key){var t=dO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?fO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xm,charCode:function(e){return e.type==="keypress"?Fc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gO=Jt(mO),vO=qe({},od,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jv=Jt(vO),yO=qe({},Rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xm}),wO=Jt(yO),bO=qe({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),_O=Jt(bO),xO=qe({},od,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),EO=Jt(xO),SO=[9,13,27,32],Em=gn&&"CompositionEvent"in window,La=null;gn&&"documentMode"in document&&(La=document.documentMode);var TO=gn&&"TextEvent"in window&&!La,Wb=gn&&(!Em||La&&8<La&&11>=La),Av=" ",Nv=!1;function Hb(e,t){switch(e){case"keyup":return SO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zs=!1;function CO(e,t){switch(e){case"compositionend":return qb(t);case"keypress":return t.which!==32?null:(Nv=!0,Av);case"textInput":return e=t.data,e===Av&&Nv?null:e;default:return null}}function PO(e,t){if(zs)return e==="compositionend"||!Em&&Hb(e,t)?(e=Vb(),$c=bm=eo=null,zs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wb&&t.locale!=="ko"?null:t.data;default:return null}}var kO={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 Iv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kO[e.type]:t==="textarea"}function Gb(e,t,r,n){Sb(n),t=du(t,"onChange"),0<t.length&&(r=new _m("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Da=null,Xa=null;function OO(e){o_(e,0)}function sd(e){var t=Hs(e);if(vb(t))return e}function RO(e,t){if(e==="change")return t}var Kb=!1;if(gn){var hf;if(gn){var pf="oninput"in document;if(!pf){var Lv=document.createElement("div");Lv.setAttribute("oninput","return;"),pf=typeof Lv.oninput=="function"}hf=pf}else hf=!1;Kb=hf&&(!document.documentMode||9<document.documentMode)}function Dv(){Da&&(Da.detachEvent("onpropertychange",Qb),Xa=Da=null)}function Qb(e){if(e.propertyName==="value"&&sd(Xa)){var t=[];Gb(t,Xa,e,mm(e)),kb(OO,t)}}function jO(e,t,r){e==="focusin"?(Dv(),Da=t,Xa=r,Da.attachEvent("onpropertychange",Qb)):e==="focusout"&&Dv()}function AO(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sd(Xa)}function NO(e,t){if(e==="click")return sd(t)}function IO(e,t){if(e==="input"||e==="change")return sd(t)}function LO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Or=typeof Object.is=="function"?Object.is:LO;function Za(e,t){if(Or(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!nh.call(t,o)||!Or(e[o],t[o]))return!1}return!0}function Mv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $v(e,t){var r=Mv(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Mv(r)}}function Yb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jb(){for(var e=window,t=ou();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ou(e.document)}return t}function Sm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function DO(e){var t=Jb(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Yb(r.ownerDocument.documentElement,r)){if(n!==null&&Sm(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,s=Math.min(n.start,o);n=n.end===void 0?s:Math.min(n.end,o),!e.extend&&s>n&&(o=n,n=s,s=o),o=$v(r,s);var i=$v(r,n);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var MO=gn&&"documentMode"in document&&11>=document.documentMode,Vs=null,xh=null,Ma=null,Eh=!1;function Fv(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Eh||Vs==null||Vs!==ou(n)||(n=Vs,"selectionStart"in n&&Sm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,383 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),Ma&&Za(Ma,n)||(Ma=n,n=du(xh,"onSelect"),0<n.length&&(t=new _m("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Vs)))}function sc(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Ws={animationend:sc("Animation","AnimationEnd"),animationiteration:sc("Animation","AnimationIteration"),animationstart:sc("Animation","AnimationStart"),transitionend:sc("Transition","TransitionEnd")},mf={},Xb={};gn&&(Xb=document.createElement("div").style,"AnimationEvent"in window||(delete Ws.animationend.animation,delete Ws.animationiteration.animation,delete Ws.animationstart.animation),"TransitionEvent"in window||delete Ws.transitionend.transition);function id(e){if(mf[e])return mf[e];if(!Ws[e])return e;var t=Ws[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Xb)return mf[e]=t[r];return e}var Zb=id("animationend"),e_=id("animationiteration"),t_=id("animationstart"),r_=id("transitionend"),n_=new Map,Uv="abort auxClick 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(" ");function bo(e,t){n_.set(e,t),ys(t,[e])}for(var gf=0;gf<Uv.length;gf++){var vf=Uv[gf],$O=vf.toLowerCase(),FO=vf[0].toUpperCase()+vf.slice(1);bo($O,"on"+FO)}bo(Zb,"onAnimationEnd");bo(e_,"onAnimationIteration");bo(t_,"onAnimationStart");bo("dblclick","onDoubleClick");bo("focusin","onFocus");bo("focusout","onBlur");bo(r_,"onTransitionEnd");Ei("onMouseEnter",["mouseout","mouseover"]);Ei("onMouseLeave",["mouseout","mouseover"]);Ei("onPointerEnter",["pointerout","pointerover"]);Ei("onPointerLeave",["pointerout","pointerover"]);ys("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ys("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ys("onBeforeInput",["compositionend","keypress","textInput","paste"]);ys("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ys("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ys("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sa="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(" "),UO=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sa));function Bv(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,$k(n,t,void 0,e),e.currentTarget=null}function o_(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;Bv(o,a,c),s=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;Bv(o,a,c),s=l}}}if(iu)throw e=yh,iu=!1,yh=null,e}function Me(e,t){var r=t[kh];r===void 0&&(r=t[kh]=new Set);var n=e+"__bubble";r.has(n)||(s_(t,e,2,!1),r.add(n))}function yf(e,t,r){var n=0;t&&(n|=4),s_(r,e,n,t)}var ic="_reactListening"+Math.random().toString(36).slice(2);function el(e){if(!e[ic]){e[ic]=!0,fb.forEach(function(r){r!=="selectionchange"&&(UO.has(r)||yf(r,!1,e),yf(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ic]||(t[ic]=!0,yf("selectionchange",!1,t))}}function s_(e,t,r,n){switch(zb(t)){case 1:var o=eO;break;case 4:o=tO;break;default:o=wm}r=o.bind(null,t,r,e),o=void 0,!vh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function wf(e,t,r,n,o){var s=n;
vendor: 22,643 bytes, lines 38-39
38if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=zo(a),i===null)return;if(l=i.tag,l===5||l===6){n=s=i;continue e}a=a.parentNode}}n=n.return}kb(function(){var c=s,u=mm(r),d=[];e:{var p=n_.get(e);if(p!==void 0){var h=_m,g=e;switch(e){case"keypress":if(Fc(r)===0)break e;case"keydown":case"keyup":h=gO;break;case"focusin":g="focus",h=ff;break;case"focusout":g="blur",h=ff;break;case"beforeblur":case"afterblur":h=ff;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Ov;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=oO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=wO;break;case Zb:case e_:case t_:h=aO;break;case r_:h=_O;break;case"scroll":h=rO;break;case"wheel":h=EO;break;case"copy":case"cut":case"paste":h=cO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=jv}var m=(t&4)!==0,b=!m&&e==="scroll",w=m?p!==null?p+"Capture":null:p;m=[];for(var y=c,_;y!==null;){_=y;var x=_.stateNode;if(_.tag===5&&x!==null&&(_=x,w!==null&&(x=Ka(y,w),x!=null&&m.push(tl(y,x,_)))),b)break;y=y.return}0<m.length&&(p=new h(p,g,null,r,u),d.push({event:p,listeners:m}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&r!==mh&&(g=r.relatedTarget||r.fromElement)&&(zo(g)||g[vn]))break e;if((h||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,h?(g=r.relatedTarget||r.toElement,h=c,g=g?zo(g):null,g!==null&&(b=ws(g),g!==b||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=c),h!==g)){if(m=Ov,x="onMouseLeave",w="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=jv,x="onPointerLeave",w="onPointerEnter",y="pointer"),b=h==null?p:Hs(h),_=g==null?p:Hs(g),p=new m(x,y+"leave",h,r,u),p.target=b,p.relatedTarget=_,x=null,zo(u)===c&&(m=new m(w,y+"enter",g,r,u),m.target=_,m.relatedTarget=b,x=m),b=x,h&&g)t:{for(m=h,w=g,y=0,_=m;_;_=Os(_))y++;for(_=0,x=w;x;x=Os(x))_++;for(;0<y-_;)m=Os(m),y--;for(;0<_-y;)w=Os(w),_--;for(;y--;){if(m===w||w!==null&&m===w.alternate)break t;m=Os(m),w=Os(w)}m=null}else m=null;h!==null&&zv(d,p,h,m,!1),g!==null&&b!==null&&zv(d,b,g,m,!0)}}e:{if(p=c?Hs(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var E=RO;else if(Iv(p))if(Kb)E=IO;else{E=AO;var S=jO}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(E=NO);if(E&&(E=E(e,c))){Gb(d,E,r,u);break e}S&&S(e,p,c),e==="focusout"&&(S=p._wrapperState)&&S.controlled&&p.type==="number"&&uh(p,"number",p.value)}switch(S=c?Hs(c):window,e){case"focusin":(Iv(S)||S.contentEditable==="true")&&(Vs=S,xh=c,Ma=null);break;case"focusout":Ma=xh=Vs=null;break;case"mousedown":Eh=!0;break;case"contextmenu":case"mouseup":case"dragend":Eh=!1,Fv(d,r,u);break;case"selectionchange":if(MO)break;case"keydown":case"keyup":Fv(d,r,u)}var C;if(Em)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else zs?Hb(e,r)&&(P="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(P="onCompositionStart");P&&(Wb&&r.locale!=="ko"&&(zs||P!=="onCompositionStart"?P==="onCompositionEnd"&&zs&&(C=Vb()):(eo=u,bm="value"in eo?eo.value:eo.textContent,zs=!0)),S=du(c,P),0<S.length&&(P=new Rv(P,e,null,r,u),d.push({event:P,listeners:S}),C?P.data=C:(C=qb(r),C!==null&&(P.data=C)))),(C=TO?CO(e,r):PO(e,r))&&(c=du(c,"onBeforeInput"),0<c.length&&(u=new Rv("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=C))}o_(d,t)})}function tl(e,t,r){return{instance:e,listener:t,currentTarget:r}}function du(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Ka(e,r),s!=null&&n.unshift(tl(e,s,o)),s=Ka(e,t),s!=null&&n.push(tl(e,s,o))),e=e.return}return n}function Os(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function zv(e,t,r,n,o){for(var s=t._reactName,i=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,o?(l=Ka(r,s),l!=null&&i.unshift(tl(r,l,a))):o||(l=Ka(r,s),l!=null&&i.push(tl(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var BO=/\r\n?/g,zO=/\u0000|\uFFFD/g;function Vv(e){return(typeof e=="string"?e:""+e).replace(BO,`
39`).replace(zO,"")}function ac(e,t,r){if(t=Vv(t),Vv(e)!==t&&r)throw Error(F(425))}function fu(){}var Sh=null,Th=null;function Ch(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ph=typeof setTimeout=="function"?setTimeout:void 0,VO=typeof clearTimeout=="function"?clearTimeout:void 0,Wv=typeof Promise=="function"?Promise:void 0,WO=typeof queueMicrotask=="function"?queueMicrotask:typeof Wv<"u"?function(e){return Wv.resolve(null).then(e).catch(HO)}:Ph;function HO(e){setTimeout(function(){throw e})}function bf(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),Ja(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);Ja(t)}function io(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Hv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),Vr="__reactFiber$"+zi,rl="__reactProps$"+zi,vn="__reactContainer$"+zi,kh="__reactEvents$"+zi,qO="__reactListeners$"+zi,GO="__reactHandles$"+zi;function zo(e){var t=e[Vr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vn]||r[Vr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Hv(e);e!==null;){if(r=e[Vr])return r;e=Hv(e)}return t}e=r,r=e.parentNode}return null}function jl(e){return e=e[Vr]||e[vn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Hs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(33))}function ad(e){return e[rl]||null}var Oh=[],qs=-1;function _o(e){return{current:e}}function $e(e){0>qs||(e.current=Oh[qs],Oh[qs]=null,qs--)}function Le(e,t){qs++,Oh[qs]=e.current,e.current=t}var mo={},wt=_o(mo),$t=_o(!1),os=mo;function Si(e,t){var r=e.type.contextTypes;if(!r)return mo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in r)o[s]=t[s];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ft(e){return e=e.childContextTypes,e!=null}function hu(){$e($t),$e(wt)}function qv(e,t,r){if(wt.current!==mo)throw Error(F(168));Le(wt,t),Le($t,r)}function i_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(F(108,jk(e)||"Unknown",o));return qe({},r,n)}function pu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mo,os=wt.current,Le(wt,e),Le($t,$t.current),!0}function Gv(e,t,r){var n=e.stateNode;if(!n)throw Error(F(169));r?(e=i_(e,t,os),n.__reactInternalMemoizedMergedChildContext=e,$e($t),$e(wt),Le(wt,e)):$e($t),Le($t,r)}var an=null,ld=!1,_f=!1;function a_(e){an===null?an=[e]:an.push(e)}function KO(e){ld=!0,a_(e)}function xo(){if(!_f&&an!==null){_f=!0;var e=0,t=Re;try{var r=an;for(Re=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}an=null,ld=!1}catch(o){throw an!==null&&(an=an.slice(e+1)),Ab(gm,xo),o}finally{Re=t,_f=!1}}return null}var Gs=[],Ks=0,mu=null,gu=0,rr=[],nr=0,ss=null,un=1,dn="";function Io(e,t){Gs[Ks++]=gu,Gs[Ks++]=mu,mu=e,gu=t}function l_(e,t,r){rr[nr++]=un,rr[nr++]=dn,rr[nr++]=ss,ss=e;var n=un;e=dn;var o=32-Cr(n)-1;n&=~(1<<o),r+=1;var s=32-Cr(t)+o;if(30<s){var i=o-o%5;s=(n&(1<<i)-1).toString(32),n>>=i,o-=i,un=1<<32-Cr(t)+o|r<<o|n,dn=s+e}else un=1<<s|r<<o|n,dn=e}function Tm(e){e.return!==null&&(Io(e,1),l_(e,1,0))}function Cm(e){for(;e===mu;)mu=Gs[--Ks],Gs[Ks]=null,gu=Gs[--Ks],Gs[Ks]=null;for(;e===ss;)ss=rr[--nr],rr[nr]=null,dn=rr[--nr],rr[nr]=null,un=rr[--nr],rr[nr]=null}var Gt=null,qt=null,ze=!1,Sr=null;function c_(e,t){var r=sr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Kv(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Gt=e,qt=io(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Gt=e,qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ss!==null?{id:un,overflow:dn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=sr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Gt=e,qt=null,!0):!1;default:return!1}}function Rh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function jh(e){if(ze){var t=qt;if(t){var r=t;if(!Kv(e,t)){if(Rh(e))throw Error(F(418));t=io(r.nextSibling);var n=Gt;t&&Kv(e,t)?c_(n,r):(e.flags=e.flags&-4097|2,ze=!1,Gt=e)}}else{if(Rh(e))throw Error(F(418));e.flags=e.flags&-4097|2,ze=!1,Gt=e}}}function Qv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Gt=e}function lc(e){if(e!==Gt)return!1;if(!ze)return Qv(e),ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ch(e.type,e.memoizedProps)),t&&(t=qt)){if(Rh(e))throw u_(),Error(F(418));for(;t;)c_(e,t),t=io(t.nextSibling)}if(Qv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){qt=io(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}qt=null}}else qt=Gt?io(e.stateNode.nextSibling):null;return!0}function u_(){for(var e=qt;e;)e=io(e.nextSibling)}function Ti(){qt=Gt=null,ze=!1}function Pm(e){Sr===null?Sr=[e]:Sr.push(e)}var QO=En.ReactCurrentBatchConfig;function da(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(F(309));var n=r.stateNode}if(!n)throw Error(F(147,e));var o=n,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(F(284));if(!r._owner)throw Error(F(290,e))}return e}function cc(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Yv(e){var t=e._init;return t(e._payload)}function d_(e){function t(w,y){if(e){var _=w.deletions;_===null?(w.deletions=[y],w.flags|=16):_.push(y)}}function r(w,y){if(!e)return null;for(;y!==null;)t(w,y),y=y.sibling;return null}function n(w,y){for(w=new Map;y!==null;)y.key!==null?w.set(y.key,y):w.set(y.index,y),y=y.sibling;return w}function o(w,y){return w=uo(w,y),w.index=0,w.sibling=null,w}function s(w,y,_){return w.index=_,e?(_=w.alternate,_!==null?(_=_.index,_<y?(w.flags|=2,y):_):(w.flags|=2,y)):(w.flags|=1048576,y)}function i(w){return e&&w.alternate===null&&(w.flags|=2),w}function a(w,y,_,x){return y===null||y.tag!==6?(y=kf(_,w.mode,x),y.return=w,y):(y=o(y,_),y.return=w,y)}function l(w,y,_,x){var E=_.type;return E===Bs?u(w,y,_.props.children,x,_.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Mn&&Yv(E)===y.type)?(x=o(y,_.props),x.ref=da(w,y,_),x.return=w,x):(x=qc(_.type,_.key,_.props,null,w.mode,x),x.ref=da(w,y,_),x.return=w,x)}function c(w,y,_,x){return y===null||y.tag!==4||y.stateNode.containerInfo!==_.containerInfo||y.stateNode.implementation!==_.implementation?(y=Of(_,w.mode,x),y.return=w,y):(y=o(y,_.children||[]),y.return=w,y)}function u(w,y,_,x,E){return y===null||y.tag!==7?(y=ns(_,w.mode,x,E),y.return=w,y):(y=o(y,_),y.return=w,y)}function d(w,y,_){if(typeof y=="string"&&y!==""||typeof y=="number")return y=kf(""+y,w.mode,_),y.return=w,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Xl:return _=qc(y.type,y.key,y.props,null,w.mode,_),_.ref=da(w,null,y),_.return=w,_;case Us:return y=Of(y,w.mode,_),y.return=w,y;case Mn:var x=y._init;return d(w,x(y._payload),_)}if(xa(y)||ia(y))return y=ns(y,w.mode,_,null),y.return=w,y;cc(w,y)}return null}function p(w,y,_,x){var E=y!==null?y.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return E!==null?null:a(w,y,""+_,x);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Xl:return _.key===E?l(w,y,_,x):null;case Us:return _.key===E?c(w,y,_,x):null;case Mn:return E=_._init,p(w,y,E(_._payload),x)}if(xa(_)||ia(_))return E!==null?null:u(w,y,_,x,null);cc(w,_)}return null}function h(w,y,_,x,E){if(typeof x=="string"&&x!==""||typeof x=="number")return w=w.get(_)||null,a(y,w,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Xl:return w=w.get(x.key===null?_:x.key)||null,l(y,w,x,E);case Us:return w=w.get(x.key===null?_:x.key)||null,c(y,w,x,E);case Mn:var S=x._init;return h(w,y,_,S(x._payload),E)}if(xa(x)||ia(x))return w=w.get(_)||null,u(y,w,x,E,null);cc(y,x)}return null}function g(w,y,_,x){for(var E=null,S=null,C=y,P=y=0,I=null;C!==null&&P<_.length;P++){C.index>P?(I=C,C=null):I=C.sibling;var j=p(w,C,_[P],x);if(j===null){C===null&&(C=I);break}e&&C&&j.alternate===null&&t(w,C),y=s(j,y,P),S===null?E=j:S.sibling=j,S=j,C=I}if(P===_.length)return r(w,C),ze&&Io(w,P),E;if(C===null){for(;P<_.length;P++)C=d(w,_[P],x),C!==null&&(y=s(C,y,P),S===null?E=C:S.sibling=C,S=C);return ze&&Io(w,P),E}for(C=n(w,C);P<_.length;P++)I=h(C,w,P,_[P],x),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?P:I.key),y=s(I,y,P),S===null?E=I:S.sibling=I,S=I);return e&&C.forEach(function($){return t(w,$)}),ze&&Io(w,P),E}function m(w,y,_,x){var E=ia(_);if(typeof E!="function")throw Error(F(150));if(_=E.call(_),_==null)throw Error(F(151));for(var S=E=null,C=y,P=y=0,I=null,j=_.next();C!==null&&!j.done;P++,j=_.next()){C.index>P?(I=C,C=null):I=C.sibling;var $=p(w,C,j.value,x);if($===null){C===null&&(C=I);break}e&&C&&$.alternate===null&&t(w,C),y=s($,y,P),S===null?E=$:S.sibling=$,S=$,C=I}if(j.done)return r(w,C),ze&&Io(w,P),E;if(C===null){for(;!j.done;P++,j=_.next())j=d(w,j.value,x),j!==null&&(y=s(j,y,P),S===null?E=j:S.sibling=j,S=j);return ze&&Io(w,P),E}for(C=n(w,C);!j.done;P++,j=_.next())j=h(C,w,P,j.value,x),j!==null&&(e&&j.alternate!==null&&C.delete(j.key===null?P:j.key),y=s(j,y,P),S===null?E=j:S.sibling=j,S=j);return e&&C.forEach(function(M){return t(w,M)}),ze&&Io(w,P),E}function b(w,y,_,x){if(typeof _=="object"&&_!==null&&_.type===Bs&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Xl:e:{for(var E=_.key,S=y;S!==null;){if(S.key===E){if(E=_.type,E===Bs){if(S.tag===7){r(w,S.sibling),y=o(S,_.props.children),y.return=w,w=y;break e}}else if(S.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Mn&&Yv(E)===S.type){r(w,S.sibling),y=o(S,_.props),y.ref=da(w,S,_),y.return=w,w=y;break e}r(w,S);break}else t(w,S);S=S.sibling}_.type===Bs?(y=ns(_.props.children,w.mode,x,_.key),y.return=w,w=y):(x=qc(_.type,_.key,_.props,null,w.mode,x),x.ref=da(w,y,_),x.return=w,w=x)}return i(w);case Us:e:{for(S=_.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===_.containerInfo&&y.stateNode.implementation===_.implementation){r(w,y.sibling),y=o(y,_.children||[]),y.return=w,w=y;break e}else{r(w,y);break}else t(w,y);y=y.sibling}y=Of(_,w.mode,x),y.return=w,w=y}return i(w);case Mn:return S=_._init,b(w,y,S(_._payload),x)}if(xa(_))return g(w,y,_,x);if(ia(_))return m(w,y,_,x);cc(w,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,y!==null&&y.tag===6?(r(w,y.sibling),y=o(y,_),y.return=w,w=y):(r(w,y),y=kf(_,w.mode,x),y.return=w,w=y),i(w)):r(w,y)}return b}var Ci=d_(!0),f_=d_(!1),vu=_o(null),yu=null,Qs=null,km=null;function Om(){km=Qs=yu=null}function Rm(e){var t=vu.current;$e(vu),e._currentValue=t}function Ah(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ri(e,t){yu=e,km=Qs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dt=!0),e.firstContext=null)}function cr(e){var t=e._currentValue;if(km!==e)if(e={context:e,memoizedValue:t,next:null},Qs===null){if(yu===null)throw Error(F(308));Qs=e,yu.dependencies={lanes:0,firstContext:e}}else Qs=Qs.next=e;return t}var Vo=null;function jm(e){Vo===null?Vo=[e]:Vo.push(e)}function h_(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,jm(t)):(r.next=o.next,o.next=r),t.interleaved=r,yn(e,n)}function yn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var $n=!1;function Am(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function p_(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ao(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ee&2){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,yn(e,r)}return o=n.interleaved,o===null?(t.next=t,jm(n)):(t.next=o.next,o.next=t),n.interleaved=t,yn(e,r)}function Uc(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,vm(e,r)}}function Jv(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?o=s=i:s=s.next=i,r=r.next}while(r!==null);s===null?o=s=t:s=s.next=t}else o=s=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function wu(e,t,r,n){var o=e.updateQueue;$n=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=o.baseState;i=0,u=c=l=null,a=s;do{var p=a.lane,h=a.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,m=a;switch(p=t,h=r,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(h,d,p);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,p=typeof g=="function"?g.call(h,d,p):g,p==null)break e;d=qe({},d,p);break e;case 2:$n=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,i|=p;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;p=a,a=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);as|=i,e.lanes=i,e.memoizedState=d}}function Xv(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(F(191,o));o.call(n)}}}var Al={},Kr=_o(Al),nl=_o(Al),ol=_o(Al);function Wo(e){if(e===Al)throw Error(F(174));return e}function Nm(e,t){switch(Le(ol,t),Le(nl,e),Le(Kr,Al),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fh(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fh(t,e)}$e(Kr),Le(Kr,t)}function Pi(){$e(Kr),$e(nl),$e(ol)}function m_(e){Wo(ol.current);var t=Wo(Kr.current),r=fh(t,e.type);t!==r&&(Le(nl,e),Le(Kr,r))}function Im(e){nl.current===e&&($e(Kr),$e(nl))}var Ve=_o(0);function bu(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var xf=[];function Lm(){for(var e=0;e<xf.length;e++)xf[e]._workInProgressVersionPrimary=null;xf.length=0}var Bc=En.ReactCurrentDispatcher,Ef=En.ReactCurrentBatchConfig,is=0,We=null,Ze=null,rt=null,_u=!1,$a=!1,sl=0,YO=0;function ht(){throw Error(F(321))}function Dm(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Or(e[r],t[r]))return!1;return!0}function Mm(e,t,r,n,o,s){if(is=s,We=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bc.current=e===null||e.memoizedState===null?eR:tR,e=r(n,o),$a){s=0;do{if($a=!1,sl=0,25<=s)throw Error(F(301));s+=1,rt=Ze=null,t.updateQueue=null,Bc.current=rR,e=r(n,o)}while($a)}if(Bc.current=xu,t=Ze!==null&&Ze.next!==null,is=0,rt=Ze=We=null,_u=!1,t)throw Error(F(300));return e}function $m(){var e=sl!==0;return sl=0,e}function Dr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?We.memoizedState=rt=e:rt=rt.next=e,rt}function ur(){if(Ze===null){var e=We.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=rt===null?We.memoizedState:rt.next;if(t!==null)rt=t,Ze=e;else{if(e===null)throw Error(F(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},rt===null?We.memoizedState=rt=e:rt=rt.next=e}return rt}function il(e,t){return typeof t=="function"?t(e):t}
vendor: 5,780 bytes, line 39
39function Sf(e){var t=ur(),r=t.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=e;var n=Ze,o=n.baseQueue,s=r.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}n.baseQueue=o=s,r.pending=null}if(o!==null){s=o.next,n=n.baseState;var a=i=null,l=null,c=s;do{var u=c.lane;if((is&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,i=n):l=l.next=d,We.lanes|=u,as|=u}c=c.next}while(c!==null&&c!==s);l===null?i=n:l.next=a,Or(n,t.memoizedState)||(Dt=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do s=o.lane,We.lanes|=s,as|=s,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Tf(e){var t=ur(),r=t.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,s=t.memoizedState;if(o!==null){r.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Or(s,t.memoizedState)||(Dt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,n]}function g_(){}function v_(e,t){var r=We,n=ur(),o=t(),s=!Or(n.memoizedState,o);if(s&&(n.memoizedState=o,Dt=!0),n=n.queue,Fm(b_.bind(null,r,n,e),[e]),n.getSnapshot!==t||s||rt!==null&&rt.memoizedState.tag&1){if(r.flags|=2048,al(9,w_.bind(null,r,n,o,t),void 0,null),nt===null)throw Error(F(349));is&30||y_(r,t,o)}return o}function y_(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function w_(e,t,r,n){t.value=r,t.getSnapshot=n,__(t)&&x_(e)}function b_(e,t,r){return r(function(){__(t)&&x_(e)})}function __(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Or(e,r)}catch{return!0}}function x_(e){var t=yn(e,1);t!==null&&Pr(t,e,1,-1)}function Zv(e){var t=Dr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:e},t.queue=e,e=e.dispatch=ZO.bind(null,We,e),[t.memoizedState,e]}function al(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function E_(){return ur().memoizedState}function zc(e,t,r,n){var o=Dr();We.flags|=e,o.memoizedState=al(1|t,r,void 0,n===void 0?null:n)}function cd(e,t,r,n){var o=ur();n=n===void 0?null:n;var s=void 0;if(Ze!==null){var i=Ze.memoizedState;if(s=i.destroy,n!==null&&Dm(n,i.deps)){o.memoizedState=al(t,r,s,n);return}}We.flags|=e,o.memoizedState=al(1|t,r,s,n)}function ey(e,t){return zc(8390656,8,e,t)}function Fm(e,t){return cd(2048,8,e,t)}function S_(e,t){return cd(4,2,e,t)}function T_(e,t){return cd(4,4,e,t)}function C_(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function P_(e,t,r){return r=r!=null?r.concat([e]):null,cd(4,4,C_.bind(null,t,e),r)}function Um(){}function k_(e,t){var r=ur();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Dm(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function O_(e,t){var r=ur();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Dm(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function R_(e,t,r){return is&21?(Or(r,t)||(r=Lb(),We.lanes|=r,as|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Dt=!0),e.memoizedState=r)}function JO(e,t){var r=Re;Re=r!==0&&4>r?r:4,e(!0);var n=Ef.transition;Ef.transition={};try{e(!1),t()}finally{Re=r,Ef.transition=n}}function j_(){return ur().memoizedState}function XO(e,t,r){var n=co(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},A_(e))N_(t,r);else if(r=h_(e,t,r,n),r!==null){var o=Tt();Pr(r,e,n,o),I_(r,t,n)}}function ZO(e,t,r){var n=co(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(A_(e))N_(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,r);if(o.hasEagerState=!0,o.eagerState=a,Or(a,i)){var l=t.interleaved;l===null?(o.next=o,jm(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=h_(e,t,o,n),r!==null&&(o=Tt(),Pr(r,e,n,o),I_(r,t,n))}}function A_(e){var t=e.alternate;return e===We||t!==null&&t===We}function N_(e,t){$a=_u=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function I_(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,vm(e,r)}}var xu={readContext:cr,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},eR={readContext:cr,useCallback:function(e,t){return Dr().memoizedState=[e,t===void 0?null:t],e},useContext:cr,useEffect:ey,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,zc(4194308,4,C_.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zc(4194308,4,e,t)},useInsertionEffect:function(e,t){return zc(4,2,e,t)},useMemo:function(e,t){var r=Dr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Dr();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=XO.bind(null,We,e),[n.memoizedState,e]}
vendor: 7,431 bytes, lines 39-41
39,useRef:function(e){var t=Dr();return e={current:e},t.memoizedState=e},useState:Zv,useDebugValue:Um,useDeferredValue:function(e){return Dr().memoizedState=e},useTransition:function(){var e=Zv(!1),t=e[0];return e=JO.bind(null,e[1]),Dr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=We,o=Dr();if(ze){if(r===void 0)throw Error(F(407));r=r()}else{if(r=t(),nt===null)throw Error(F(349));is&30||y_(n,t,r)}o.memoizedState=r;var s={value:r,getSnapshot:t};return o.queue=s,ey(b_.bind(null,n,s,e),[e]),n.flags|=2048,al(9,w_.bind(null,n,s,r,t),void 0,null),r},useId:function(){var e=Dr(),t=nt.identifierPrefix;if(ze){var r=dn,n=un;r=(n&~(1<<32-Cr(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=sl++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=YO++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},tR={readContext:cr,useCallback:k_,useContext:cr,useEffect:Fm,useImperativeHandle:P_,useInsertionEffect:S_,useLayoutEffect:T_,useMemo:O_,useReducer:Sf,useRef:E_,useState:function(){return Sf(il)},useDebugValue:Um,useDeferredValue:function(e){var t=ur();return R_(t,Ze.memoizedState,e)},useTransition:function(){var e=Sf(il)[0],t=ur().memoizedState;return[e,t]},useMutableSource:g_,useSyncExternalStore:v_,useId:j_,unstable_isNewReconciler:!1},rR={readContext:cr,useCallback:k_,useContext:cr,useEffect:Fm,useImperativeHandle:P_,useInsertionEffect:S_,useLayoutEffect:T_,useMemo:O_,useReducer:Tf,useRef:E_,useState:function(){return Tf(il)},useDebugValue:Um,useDeferredValue:function(e){var t=ur();return Ze===null?t.memoizedState=e:R_(t,Ze.memoizedState,e)},useTransition:function(){var e=Tf(il)[0],t=ur().memoizedState;return[e,t]},useMutableSource:g_,useSyncExternalStore:v_,useId:j_,unstable_isNewReconciler:!1};function yr(e,t){if(e&&e.defaultProps){t=qe({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Nh(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:qe({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var ud={isMounted:function(e){return(e=e._reactInternals)?ws(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Tt(),o=co(e),s=pn(n,o);s.payload=t,r!=null&&(s.callback=r),t=ao(e,s,o),t!==null&&(Pr(t,e,o,n),Uc(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Tt(),o=co(e),s=pn(n,o);s.tag=1,s.payload=t,r!=null&&(s.callback=r),t=ao(e,s,o),t!==null&&(Pr(t,e,o,n),Uc(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Tt(),n=co(e),o=pn(r,n);o.tag=2,t!=null&&(o.callback=t),t=ao(e,o,n),t!==null&&(Pr(t,e,n,r),Uc(t,e,n))}};function ty(e,t,r,n,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,i):t.prototype&&t.prototype.isPureReactComponent?!Za(r,n)||!Za(o,s):!0}function L_(e,t,r){var n=!1,o=mo,s=t.contextType;return typeof s=="object"&&s!==null?s=cr(s):(o=Ft(t)?os:wt.current,n=t.contextTypes,s=(n=n!=null)?Si(e,o):mo),t=new t(r,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ud,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function ry(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&ud.enqueueReplaceState(t,t.state,null)}function Ih(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},Am(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=cr(s):(s=Ft(t)?os:wt.current,o.context=Si(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Nh(e,t,s,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&ud.enqueueReplaceState(o,o.state,null),wu(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ki(e,t){try{var r="",n=t;do r+=Rk(n),n=n.return;while(n);var o=r}catch(s){o=`
40Error generating stack: `+s.message+`
41`+s.stack}return{value:e,source:t,stack:o,digest:null}}function Cf(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Lh(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var nR=typeof WeakMap=="function"?WeakMap:Map;function D_(e,t,r){r=pn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Su||(Su=!0,Hh=n),Lh(e,t)},r}function M_(e,t,r){r=pn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){Lh(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Lh(e,t),typeof n!="function"&&(lo===null?lo=new Set([this]):lo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function ny(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new nR;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=vR.bind(null,e,t,r),t.then(e,e))}function oy(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function sy(e,t,r,n,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=pn(-1,1),t.tag=2,ao(r,t,1))),r.lanes|=1),e)}var oR=En.ReactCurrentOwner,Dt=!1;function xt(e,t,r,n){t.child=e===null?f_(t,null,r,n):Ci(t,e.child,r,n)}function iy(e,t,r,n,o){r=r.render;var s=t.ref;return ri(t,o),n=Mm(e,t,r,n,s,o),r=$m(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,wn(e,t,o)):(ze&&r&&Tm(t),t.flags|=1,xt(e,t,n,o),t.child)}function ay(e,t,r,n,o){if(e===null){var s=r.type;return typeof s=="function"&&!Km(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,$_(e,t,s,n,o)):(e=qc(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(r=r.compare,r=r!==null?r:Za,r(i,n)&&e.ref===t.ref)return wn(e,t,o)}return t.flags|=1,e=uo(s,n),e.ref=t.ref,e.return=t,t.child=e}function $_(e,t,r,n,o){if(e!==null){var s=e.memoizedProps;if(Za(s,n)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=n=s,(e.lanes&o)!==0)e.flags&131072&&(Dt=!0);else return t.lanes=e.lanes,wn(e,t,o)}return Dh(e,t,r,n,o)}function F_(e,t,r){var n=t.pendingProps,o=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(Js,zt),zt|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Le(Js,zt),zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:r,Le(Js,zt),zt|=n}else s!==null?(n=s.baseLanes|r,t.memoizedState=null):n=r,Le(Js,zt),zt|=n;return xt(e,t,o,r),t.child}function U_(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}
vendor: 4,711 bytes, line 41
41function Dh(e,t,r,n,o){var s=Ft(r)?os:wt.current;return s=Si(t,s),ri(t,o),r=Mm(e,t,r,n,s,o),n=$m(),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,wn(e,t,o)):(ze&&n&&Tm(t),t.flags|=1,xt(e,t,r,o),t.child)}function ly(e,t,r,n,o){if(Ft(r)){var s=!0;pu(t)}else s=!1;if(ri(t,o),t.stateNode===null)Vc(e,t),L_(t,r,n),Ih(t,r,n,o),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=r.contextType;typeof c=="object"&&c!==null?c=cr(c):(c=Ft(r)?os:wt.current,c=Si(t,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==c)&&ry(t,i,n,c),$n=!1;var p=t.memoizedState;i.state=p,wu(t,n,i,o),l=t.memoizedState,a!==n||p!==l||$t.current||$n?(typeof u=="function"&&(Nh(t,r,u,n),l=t.memoizedState),(a=$n||ty(t,r,a,n,p,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=c,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,p_(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:yr(t.type,a),i.props=c,d=t.pendingProps,p=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=cr(l):(l=Ft(r)?os:wt.current,l=Si(t,l));var h=r.getDerivedStateFromProps;(u=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||p!==l)&&ry(t,i,n,l),$n=!1,p=t.memoizedState,i.state=p,wu(t,n,i,o);var g=t.memoizedState;a!==d||p!==g||$t.current||$n?(typeof h=="function"&&(Nh(t,r,h,n),g=t.memoizedState),(c=$n||ty(t,r,c,n,p,g,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,g,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=g),i.props=n,i.state=g,i.context=l,n=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),n=!1)}return Mh(e,t,r,n,s,o)}function Mh(e,t,r,n,o,s){U_(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return o&&Gv(t,r,!1),wn(e,t,s);n=t.stateNode,oR.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=Ci(t,e.child,null,s),t.child=Ci(t,null,a,s)):xt(e,t,a,s),t.memoizedState=n.state,o&&Gv(t,r,!0),t.child}function B_(e){var t=e.stateNode;t.pendingContext?qv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&qv(e,t.context,!1),Nm(e,t.containerInfo)}function cy(e,t,r,n,o){return Ti(),Pm(o),t.flags|=256,xt(e,t,r,n),t.child}var $h={dehydrated:null,treeContext:null,retryLane:0};function Fh(e){return{baseLanes:e,cachePool:null,transitions:null}}function z_(e,t,r){var n=t.pendingProps,o=Ve.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Le(Ve,o&1),e===null)return jh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,s?(n=t.mode,s=t.child,i={mode:"hidden",children:i},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=hd(i,n,0,null),e=ns(e,n,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Fh(r),t.memoizedState=$h,e):Bm(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return sR(e,t,i,n,a,o,r);if(s){s=n.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=uo(o,l),n.subtreeFlags=o.subtreeFlags&14680064),a!==null?s=uo(a,s):(s=ns(s,i,r,null),s.flags|=2),s.return=t,n.return=t,n.sibling=s,t.child=n,n=s,s=t.child,i=e.child.memoizedState,i=i===null?Fh(r):{base
vendor: 4,933 bytes, line 41
41Lanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~r,t.memoizedState=$h,n}return s=e.child,e=s.sibling,n=uo(s,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Bm(e,t){return t=hd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function uc(e,t,r,n){return n!==null&&Pm(n),Ci(t,e.child,null,r),e=Bm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sR(e,t,r,n,o,s,i){if(r)return t.flags&256?(t.flags&=-257,n=Cf(Error(F(422))),uc(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=n.fallback,o=t.mode,n=hd({mode:"visible",children:n.children},o,0,null),s=ns(s,o,i,null),s.flags|=2,n.return=t,s.return=t,n.sibling=s,t.child=n,t.mode&1&&Ci(t,e.child,null,i),t.child.memoizedState=Fh(i),t.memoizedState=$h,s);if(!(t.mode&1))return uc(e,t,i,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(F(419)),n=Cf(s,n,void 0),uc(e,t,i,n)}if(a=(i&e.childLanes)!==0,Dt||a){if(n=nt,n!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(n.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,yn(e,o),Pr(n,e,o,-1))}return Gm(),n=Cf(Error(F(421))),uc(e,t,i,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=yR.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,qt=io(o.nextSibling),Gt=t,ze=!0,Sr=null,e!==null&&(rr[nr++]=un,rr[nr++]=dn,rr[nr++]=ss,un=e.id,dn=e.overflow,ss=t),t=Bm(t,n.children),t.flags|=4096,t)}function uy(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Ah(e.return,t,r)}function Pf(e,t,r,n,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=r,s.tailMode=o)}function V_(e,t,r){var n=t.pendingProps,o=n.revealOrder,s=n.tail;if(xt(e,t,n.children,r),n=Ve.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uy(e,r,t);else if(e.tag===19)uy(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Le(Ve,n),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&bu(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),Pf(t,!1,o,r,s);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&bu(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}Pf(t,!0,r,null,s);break;case"together":Pf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function wn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),as|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,r=uo(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=uo(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function iR(e,t,r){switch(t.tag){case 3:B_(t),Ti();break;case 5:m_(t);break;case 1:Ft(t.type)&&pu(t);break;case 4:Nm(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Le(vu,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Le(Ve,Ve.current&1),t.flags|=128,null):r&t.child.childLanes?z_(e,t,r):(Le(Ve,Ve.current&1),e=wn(e,t,r),e!==null?e.sibling:null);Le(Ve,Ve.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return V_(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Le(Ve,Ve.current),n)break;return null;case 22:case 23:return t.lanes=0,F_(e,t,r)}return wn(e,t,r)}var W_,Uh,H_,q_;W_=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Uh=function(){};H_=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,Wo(Kr.current);var s=null;switch(r){case"input":o=lh(e,o),n=lh(e,n),s=[];break;case"select":o=qe({},o,{value:void 0}),n=qe({},n,{value:void 0}),s=[];break;
vendor: 4,232 bytes, line 41
41case"textarea":o=dh(e,o),n=dh(e,n),s=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=fu)}hh(r,n);var i;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(qa.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(a=o!=null?o[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(s||(s=[]),s.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(qa.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Me("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};q_=function(e,t,r,n){r!==n&&(t.flags|=4)};function fa(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function aR(e,t,r){var n=t.pendingProps;switch(Cm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return Ft(t.type)&&hu(),pt(t),null;case 3:return n=t.stateNode,Pi(),$e($t),$e(wt),Lm(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(lc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Sr!==null&&(Kh(Sr),Sr=null))),Uh(e,t),pt(t),null;case 5:Im(t);var o=Wo(ol.current);if(r=t.type,e!==null&&t.stateNode!=null)H_(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(F(166));return pt(t),null}if(e=Wo(Kr.current),lc(t)){n=t.stateNode,r=t.type;var s=t.memoizedProps;switch(n[Vr]=t,n[rl]=s,e=(t.mode&1)!==0,r){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(o=0;o<Sa.length;o++)Me(Sa[o],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":wv(n,s),Me("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Me("invalid",n);break;case"textarea":_v(n,s),Me("invalid",n)}hh(r,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?n.textContent!==a&&(s.suppressHydrationWarning!==!0&&ac(n.textContent,a,e),o=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&ac(n.textContent,a,e),o=["children",""+a]):qa.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&Me("scroll",n)}switch(r){case"input":Zl(n),bv(n,s,!0);break;case"textarea":Zl(n),xv(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=fu)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bb(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Vr]=t,e[rl]=n,W_(e,t,!1,!1),t.stateNode=e;
vendor: 17,844 bytes, line 41
41e:{switch(i=ph(r,n),r){case"dialog":Me("cancel",e),Me("close",e),o=n;break;case"iframe":case"object":case"embed":Me("load",e),o=n;break;case"video":case"audio":for(o=0;o<Sa.length;o++)Me(Sa[o],e);o=n;break;case"source":Me("error",e),o=n;break;case"img":case"image":case"link":Me("error",e),Me("load",e),o=n;break;case"details":Me("toggle",e),o=n;break;case"input":wv(e,n),o=lh(e,n),Me("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=qe({},n,{value:void 0}),Me("invalid",e);break;case"textarea":_v(e,n),o=dh(e,n),Me("invalid",e);break;default:o=n}hh(r,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Eb(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&_b(e,l)):s==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Ga(e,l):typeof l=="number"&&Ga(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(qa.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Me("scroll",e):l!=null&&dm(e,s,l,i))}switch(r){case"input":Zl(e),bv(e,n,!1);break;case"textarea":Zl(e),xv(e);break;case"option":n.value!=null&&e.setAttribute("value",""+po(n.value));break;case"select":e.multiple=!!n.multiple,s=n.value,s!=null?Xs(e,!!n.multiple,s,!1):n.defaultValue!=null&&Xs(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=fu)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pt(t),null;case 6:if(e&&t.stateNode!=null)q_(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(F(166));if(r=Wo(ol.current),Wo(Kr.current),lc(t)){if(n=t.stateNode,r=t.memoizedProps,n[Vr]=t,(s=n.nodeValue!==r)&&(e=Gt,e!==null))switch(e.tag){case 3:ac(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ac(n.nodeValue,r,(e.mode&1)!==0)}s&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Vr]=t,t.stateNode=n}return pt(t),null;case 13:if($e(Ve),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&qt!==null&&t.mode&1&&!(t.flags&128))u_(),Ti(),t.flags|=98560,s=!1;else if(s=lc(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(F(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(F(317));s[Vr]=t}else Ti(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pt(t),s=!1}else Sr!==null&&(Kh(Sr),Sr=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Ve.current&1?tt===0&&(tt=3):Gm())),t.updateQueue!==null&&(t.flags|=4),pt(t),null);case 4:return Pi(),Uh(e,t),e===null&&el(t.stateNode.containerInfo),pt(t),null;case 10:return Rm(t.type._context),pt(t),null;case 17:return Ft(t.type)&&hu(),pt(t),null;case 19:if($e(Ve),s=t.memoizedState,s===null)return pt(t),null;if(n=(t.flags&128)!==0,i=s.rendering,i===null)if(n)fa(s,!1);else{if(tt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=bu(e),i!==null){for(t.flags|=128,fa(s,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)s=r,e=n,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Le(Ve,Ve.current&1|2),t.child}e=e.sibling}s.tail!==null&&Qe()>Oi&&(t.flags|=128,n=!0,fa(s,!1),t.lanes=4194304)}else{if(!n)if(e=bu(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),fa(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!ze)return pt(t),null}else 2*Qe()-s.renderingStartTime>Oi&&r!==1073741824&&(t.flags|=128,n=!0,fa(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(r=s.last,r!==null?r.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Qe(),t.sibling=null,r=Ve.current,Le(Ve,n?r&1|2:r&1),t):(pt(t),null);case 22:case 23:return qm(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?zt&1073741824&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function lR(e,t){switch(Cm(t),t.tag){case 1:return Ft(t.type)&&hu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pi(),$e($t),$e(wt),Lm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Im(t),null;case 13:if($e(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));Ti()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $e(Ve),null;case 4:return Pi(),null;case 10:return Rm(t.type._context),null;case 22:case 23:return qm(),null;case 24:return null;default:return null}}var dc=!1,vt=!1,cR=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Ys(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ke(e,t,n)}else r.current=null}function Bh(e,t,r){try{r()}catch(n){Ke(e,t,n)}}var dy=!1;function uR(e,t){if(Sh=cu,e=Jb(),Sm(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var h;d!==r||o!==0&&d.nodeType!==3||(a=i+o),d!==s||n!==0&&d.nodeType!==3||(l=i+n),d.nodeType===3&&(i+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===r&&++c===o&&(a=i),p===s&&++u===n&&(l=i),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Th={focusedElem:e,selectionRange:r},cu=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,b=g.memoizedState,w=t.stateNode,y=w.getSnapshotBeforeUpdate(t.elementType===t.type?m:yr(t.type,m),b);w.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(x){Ke(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return g=dy,dy=!1,g}function Fa(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var s=o.destroy;o.destroy=void 0,s!==void 0&&Bh(t,r,s)}o=o.next}while(o!==n)}}function dd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function zh(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function G_(e){var t=e.alternate;t!==null&&(e.alternate=null,G_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vr],delete t[rl],delete t[kh],delete t[qO],delete t[GO])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function K_(e){return e.tag===5||e.tag===3||e.tag===4}function fy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||K_(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=fu));else if(n!==4&&(e=e.child,e!==null))for(Vh(e,t,r),e=e.sibling;e!==null;)Vh(e,t,r),e=e.sibling}function Wh(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Wh(e,t,r),e=e.sibling;e!==null;)Wh(e,t,r),e=e.sibling}var at=null,xr=!1;function An(e,t,r){for(r=r.child;r!==null;)Q_(e,t,r),r=r.sibling}function Q_(e,t,r){if(Gr&&typeof Gr.onCommitFiberUnmount=="function")try{Gr.onCommitFiberUnmount(nd,r)}catch{}switch(r.tag){case 5:vt||Ys(r,t);case 6:var n=at,o=xr;at=null,An(e,t,r),at=n,xr=o,at!==null&&(xr?(e=at,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):at.removeChild(r.stateNode));break;case 18:at!==null&&(xr?(e=at,r=r.stateNode,e.nodeType===8?bf(e.parentNode,r):e.nodeType===1&&bf(e,r),Ja(e)):bf(at,r.stateNode));break;case 4:n=at,o=xr,at=r.stateNode.containerInfo,xr=!0,An(e,t,r),at=n,xr=o;break;case 0:case 11:case 14:case 15:if(!vt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Bh(r,t,i),o=o.next}while(o!==n)}An(e,t,r);break;case 1:if(!vt&&(Ys(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Ke(r,t,a)}An(e,t,r);break;case 21:An(e,t,r);break;case 22:r.mode&1?(vt=(n=vt)||r.memoizedState!==null,An(e,t,r),vt=n):An(e,t,r);break;default:An(e,t,r)}}function hy(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new cR),t.forEach(function(n){var o=wR.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function pr(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var s=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:at=a.stateNode,xr=!1;break e;case 3:at=a.stateNode.containerInfo,xr=!0;break e;case 4:at=a.stateNode.containerInfo,xr=!0;break e}a=a.return}if(at===null)throw Error(F(160));Q_(s,i,o),at=null,xr=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ke(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Y_(t,e),t=t.sibling}function Y_(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pr(t,e),Lr(e),n&4){try{Fa(3,e,e.return),dd(3,e)}catch(m){Ke(e,e.return,m)}try{Fa(5,e,e.return)}catch(m){Ke(e,e.return,m)}}break;case 1:pr(t,e),Lr(e),n&512&&r!==null&&Ys(r,r.return);break;case 5:if(pr(t,e),Lr(e),n&512&&r!==null&&Ys(r,r.return),e.flags&32){var o=e.stateNode;try{Ga(o,"")}catch(m){Ke(e,e.return,m)}}if(n&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=r!==null?r.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&yb(o,s),ph(a,i);var c=ph(a,s);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];u==="style"?Eb(o,d):u==="dangerouslySetInnerHTML"?_b(o,d):u==="children"?Ga(o,d):dm(o,u,d,c)}switch(a){case"input":ch(o,s);break;case"textarea":wb(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Xs(o,!!s.multiple,h,!1):p!==!!s.multiple&&(s.defaultValue!=null?Xs(o,!!s.multiple,s.defaultValue,!0):Xs(o,!!s.multiple,s.multiple?[]:"",!1))}o[rl]=s}catch(m){Ke(e,e.return,m)}}break;case 6:if(pr(t,e),Lr(e),n&4){if(e.stateNode===null)throw Error(F(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(m){Ke(e,e.return,m)}}break;case 3:if(pr(t,e),Lr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ja(t.containerInfo)}catch(m){Ke(e,e.return,m)}break;case 4:pr(t,e),Lr(e);break;case 13:pr(t,e),Lr(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Wm=Qe())),n&4&&hy(e);break;case 22:if(u=r!==null&&r.memoizedState!==null,e.mode&1?(vt=(c=vt)||u,pr(t,e),vt=c):pr(t,e),Lr(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(Q=e,u=e.child;u!==null;){for(d=Q=u;Q!==null;){switch(p=Q,h=p.child,p.tag){case 0:case 11:case 14:case 15:Fa(4,p,p.return);break;case 1:Ys(p,p.return);var g=p.stateNode;if(typeof g.componentWillUnmount=="function"){n=p,r=p.return;try{t=n,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){Ke(n,r,m)}}break;case 5:Ys(p,p.return);break;case 22:if(p.memoizedState!==null){my(d);continue}}h!==null?(h.return=p,Q=h):my(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=xb("display",i))}catch(m){Ke(e,e.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){Ke(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:pr(t,e),Lr(e),n&4&&hy(e);break;case 21:break;default:pr(t,e),Lr(e)}}function Lr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(K_(r)){var n=r;break e}r=r.return}throw Error(F(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(Ga(o,""),n.flags&=-33);var s=fy(e);Wh(e,s,o);break;case 3:case 4:var i=n.stateNode.containerInfo,a=fy(e);Vh(e,a,i);break;default:throw Error(F(161))}}catch(l){Ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function dR(e,t,r){Q=e,J_(e)}function J_(e,t,r){for(var n=(e.mode&1)!==0;Q!==null;){var o=Q,s=o.child;if(o.tag===22&&n){var i=o.memoizedState!==null||dc;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||vt;a=dc;var c=vt;if(dc=i,(vt=l)&&!c)for(Q=o;Q!==null;)i=Q,l=i.child,i.tag===22&&i.memoizedState!==null?gy(o):l!==null?(l.return=i,Q=l):gy(o);for(;s!==null;)Q=s,J_(s),s=s.sibling;Q=o,dc=a,vt=c}py(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,Q=s):py(e)}}function py(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vt||dd(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!vt)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:yr(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Xv(t,s,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Xv(t,i,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Ja(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}vt||t.flags&512&&zh(t)}catch(p){Ke(t,t.return,p)}}if(t===e){Q=null;break}if(r=t.sibling,r!==null){r.return=t.return,Q=r;break}Q=t.return}}function my(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Q=r;break}Q=t.return}}function gy(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{dd(4,t)}catch(l){Ke(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){Ke(t,o,l)}}var s=t.return;try{zh(t)}catch(l){Ke(t,s,l)}break;case 5:var i=t.return;try{zh(t)}catch(l){Ke(t,i,l)}}}catch(l){Ke(t,t.return,l)}if(t===e){Q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Q=a;break}Q=t.return}}var fR=Math.ceil,Eu=En.ReactCurrentDispatcher,zm=En.ReactCurrentOwner,ar=En.ReactCurrentBatchConfig,Ee=0,nt=null,Xe=null,ct=0,zt=0,Js=_o(0),tt=0,ll=null,as=0,fd=0,Vm=0,Ua=null,It=null,Wm=0,Oi=1/0,on=null,Su=!1,Hh=null,lo=null,fc=!1,to=null,Tu=0,Ba=0,qh=null,Wc=-1,Hc=0;function Tt(){return Ee&6?Qe():Wc!==-1?Wc:Wc=Qe()}function co(e){return e.mode&1?Ee&2&&ct!==0?ct&-ct:QO.transition!==null?(Hc===0&&(Hc=Lb()),Hc):(e=Re,e!==0||(e=window.event,e=e===void 0?16:zb(e.type)),e):1}function Pr(e,t,r,n){if(50<Ba)throw Ba=0,qh=null,Error(F(185));Ol(e,r,n),(!(Ee&2)||e!==nt)&&(e===nt&&(!(Ee&2)&&(fd|=r),tt===4&&Un(e,ct)),Ut(e,n),r===1&&Ee===0&&!(t.mode&1)&&(Oi=Qe()+500,ld&&xo()))}function Ut(e,t){var r=e.callbackNode;Qk(e,t);var n=lu(e,e===nt?ct:0);if(n===0)r!==null&&Tv(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Tv(r),t===1)e.tag===0?KO(vy.bind(null,e)):a_(vy.bind(null,e)),WO(function(){!(Ee&6)&&xo()}),r=null;else{switch(Db(n)){case 1:r=gm;break;case 4:r=Nb;break;case 16:r=au;break;case 536870912:r=Ib;break;default:r=au}r=sx(r,X_.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function X_(e,t){if(Wc=-1,Hc=0,Ee&6)throw Error(F(327));var r=e.callbackNode;if(ni()&&e.callbackNode!==r)return null;var n=lu(e,e===nt?ct:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Cu(e,n);else{t=n;var o=Ee;Ee|=2;var s=ex();(nt!==e||ct!==t)&&(on=null,Oi=Qe()+500,rs(e,t));do try{mR();break}catch(a){Z_(e,a)}while(!0);Om(),Eu.current=s,Ee=o,Xe!==null?t=0:(nt=null,ct=0,t=tt)}
vendor: 2,965 bytes, line 41
41if(t!==0){if(t===2&&(o=wh(e),o!==0&&(n=o,t=Gh(e,o))),t===1)throw r=ll,rs(e,0),Un(e,n),Ut(e,Qe()),r;if(t===6)Un(e,n);else{if(o=e.current.alternate,!(n&30)&&!hR(o)&&(t=Cu(e,n),t===2&&(s=wh(e),s!==0&&(n=s,t=Gh(e,s))),t===1))throw r=ll,rs(e,0),Un(e,n),Ut(e,Qe()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(F(345));case 2:Lo(e,It,on);break;case 3:if(Un(e,n),(n&130023424)===n&&(t=Wm+500-Qe(),10<t)){if(lu(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Ph(Lo.bind(null,e,It,on),t);break}Lo(e,It,on);break;case 4:if(Un(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var i=31-Cr(n);s=1<<i,i=t[i],i>o&&(o=i),n&=~s}if(n=o,n=Qe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*fR(n/1960))-n,10<n){e.timeoutHandle=Ph(Lo.bind(null,e,It,on),n);break}Lo(e,It,on);break;case 5:Lo(e,It,on);break;default:throw Error(F(329))}}}return Ut(e,Qe()),e.callbackNode===r?X_.bind(null,e):null}function Gh(e,t){var r=Ua;return e.current.memoizedState.isDehydrated&&(rs(e,t).flags|=256),e=Cu(e,t),e!==2&&(t=It,It=r,t!==null&&Kh(t)),e}function Kh(e){It===null?It=e:It.push.apply(It,e)}function hR(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],s=o.getSnapshot;o=o.value;try{if(!Or(s(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Un(e,t){for(t&=~Vm,t&=~fd,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Cr(t),n=1<<r;e[r]=-1,t&=~n}}function vy(e){if(Ee&6)throw Error(F(327));ni();var t=lu(e,0);if(!(t&1))return Ut(e,Qe()),null;var r=Cu(e,t);if(e.tag!==0&&r===2){var n=wh(e);n!==0&&(t=n,r=Gh(e,n))}if(r===1)throw r=ll,rs(e,0),Un(e,t),Ut(e,Qe()),r;if(r===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Lo(e,It,on),Ut(e,Qe()),null}function Hm(e,t){var r=Ee;Ee|=1;try{return e(t)}finally{Ee=r,Ee===0&&(Oi=Qe()+500,ld&&xo())}}function ls(e){to!==null&&to.tag===0&&!(Ee&6)&&ni();var t=Ee;Ee|=1;var r=ar.transition,n=Re;try{if(ar.transition=null,Re=1,e)return e()}finally{Re=n,ar.transition=r,Ee=t,!(Ee&6)&&xo()}}function qm(){zt=Js.current,$e(Js)}function rs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,VO(r)),Xe!==null)for(r=Xe.return;r!==null;){var n=r;switch(Cm(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&hu();break;case 3:Pi(),$e($t),$e(wt),Lm();break;case 5:Im(n);break;case 4:Pi();break;case 13:$e(Ve);break;case 19:$e(Ve);break;case 10:Rm(n.type._context);break;case 22:case 23:qm()}r=r.return}if(nt=e,Xe=e=uo(e.current,null),ct=zt=t,tt=0,ll=null,Vm=fd=as=0,It=Ua=null,Vo!==null){for(t=0;t<Vo.length;t++)if(r=Vo[t],n=r.interleaved,n!==null){r.interleaved=null;
vendor: 9,934 bytes, line 41
41var o=n.next,s=r.pending;if(s!==null){var i=s.next;s.next=o,n.next=i}r.pending=n}Vo=null}return e}function Z_(e,t){do{var r=Xe;try{if(Om(),Bc.current=xu,_u){for(var n=We.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}_u=!1}if(is=0,rt=Ze=We=null,$a=!1,sl=0,zm.current=null,r===null||r.return===null){tt=1,ll=t,Xe=null;break}e:{var s=e,i=r.return,a=r,l=t;if(t=ct,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=oy(i);if(h!==null){h.flags&=-257,sy(h,i,a,s,t),h.mode&1&&ny(s,c,t),t=h,l=c;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){ny(s,c,t),Gm();break e}l=Error(F(426))}}else if(ze&&a.mode&1){var b=oy(i);if(b!==null){!(b.flags&65536)&&(b.flags|=256),sy(b,i,a,s,t),Pm(ki(l,a));break e}}s=l=ki(l,a),tt!==4&&(tt=2),Ua===null?Ua=[s]:Ua.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var w=D_(s,l,t);Jv(s,w);break e;case 1:a=l;var y=s.type,_=s.stateNode;if(!(s.flags&128)&&(typeof y.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(lo===null||!lo.has(_)))){s.flags|=65536,t&=-t,s.lanes|=t;var x=M_(s,a,t);Jv(s,x);break e}}s=s.return}while(s!==null)}rx(r)}catch(E){t=E,Xe===r&&r!==null&&(Xe=r=r.return);continue}break}while(!0)}function ex(){var e=Eu.current;return Eu.current=xu,e===null?xu:e}function Gm(){(tt===0||tt===3||tt===2)&&(tt=4),nt===null||!(as&268435455)&&!(fd&268435455)||Un(nt,ct)}function Cu(e,t){var r=Ee;Ee|=2;var n=ex();(nt!==e||ct!==t)&&(on=null,rs(e,t));do try{pR();break}catch(o){Z_(e,o)}while(!0);if(Om(),Ee=r,Eu.current=n,Xe!==null)throw Error(F(261));return nt=null,ct=0,tt}function pR(){for(;Xe!==null;)tx(Xe)}function mR(){for(;Xe!==null&&!Uk();)tx(Xe)}function tx(e){var t=ox(e.alternate,e,zt);e.memoizedProps=e.pendingProps,t===null?rx(e):Xe=t,zm.current=null}function rx(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=lR(r,t),r!==null){r.flags&=32767,Xe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{tt=6,Xe=null;return}}else if(r=aR(r,t,zt),r!==null){Xe=r;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);tt===0&&(tt=5)}function Lo(e,t,r){var n=Re,o=ar.transition;try{ar.transition=null,Re=1,gR(e,t,r,n)}finally{ar.transition=o,Re=n}return null}function gR(e,t,r,n){do ni();while(to!==null);if(Ee&6)throw Error(F(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(F(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(Yk(e,s),e===nt&&(Xe=nt=null,ct=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||fc||(fc=!0,sx(au,function(){return ni(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=ar.transition,ar.transition=null;var i=Re;Re=1;var a=Ee;Ee|=4,zm.current=null,uR(e,r),Y_(r,e),DO(Th),cu=!!Sh,Th=Sh=null,e.current=r,dR(r),Bk(),Ee=a,Re=i,ar.transition=s}else e.current=r;if(fc&&(fc=!1,to=e,Tu=o),s=e.pendingLanes,s===0&&(lo=null),Wk(r.stateNode),Ut(e,Qe()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(Su)throw Su=!1,e=Hh,Hh=null,e;return Tu&1&&e.tag!==0&&ni(),s=e.pendingLanes,s&1?e===qh?Ba++:(Ba=0,qh=e):Ba=0,xo(),null}function ni(){if(to!==null){var e=Db(Tu),t=ar.transition,r=Re;try{if(ar.transition=null,Re=16>e?16:e,to===null)var n=!1;else{if(e=to,to=null,Tu=0,Ee&6)throw Error(F(331));var o=Ee;for(Ee|=4,Q=e.current;Q!==null;){var s=Q,i=s.child;if(Q.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Q=c;Q!==null;){var u=Q;switch(u.tag){case 0:case 11:case 15:Fa(8,u,s)}var d=u.child;if(d!==null)d.return=u,Q=d;else for(;Q!==null;){u=Q;var p=u.sibling,h=u.return;if(G_(u),u===c){Q=null;break}if(p!==null){p.return=h,Q=p;break}Q=h}}}var g=s.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}Q=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,Q=i;else e:for(;Q!==null;){if(s=Q,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Fa(9,s,s.return)}var w=s.sibling;if(w!==null){w.return=s.return,Q=w;break e}Q=s.return}}var y=e.current;for(Q=y;Q!==null;){i=Q;var _=i.child;if(i.subtreeFlags&2064&&_!==null)_.return=i,Q=_;else e:for(i=y;Q!==null;){if(a=Q,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:dd(9,a)}}catch(E){Ke(a,a.return,E)}if(a===i){Q=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,Q=x;break e}Q=a.return}}if(Ee=o,xo(),Gr&&typeof Gr.onPostCommitFiberRoot=="function")try{Gr.onPostCommitFiberRoot(nd,e)}catch{}n=!0}return n}finally{Re=r,ar.transition=t}}return!1}function yy(e,t,r){t=ki(r,t),t=D_(e,t,1),e=ao(e,t,1),t=Tt(),e!==null&&(Ol(e,1,t),Ut(e,t))}function Ke(e,t,r){if(e.tag===3)yy(e,e,r);else for(;t!==null;){if(t.tag===3){yy(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(lo===null||!lo.has(n))){e=ki(r,e),e=M_(t,e,1),t=ao(t,e,1),e=Tt(),t!==null&&(Ol(t,1,e),Ut(t,e));break}}t=t.return}}function vR(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Tt(),e.pingedLanes|=e.suspendedLanes&r,nt===e&&(ct&r)===r&&(tt===4||tt===3&&(ct&130023424)===ct&&500>Qe()-Wm?rs(e,0):Vm|=r),Ut(e,t)}function nx(e,t){t===0&&(e.mode&1?(t=rc,rc<<=1,!(rc&130023424)&&(rc=4194304)):t=1);var r=Tt();e=yn(e,t),e!==null&&(Ol(e,t,r),Ut(e,r))}function yR(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),nx(e,r)}function wR(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(F(314))}n!==null&&n.delete(t),nx(e,r)}var ox;ox=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||$t.current)Dt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Dt=!1,iR(e,t,r);Dt=!!(e.flags&131072)}else Dt=!1,ze&&t.flags&1048576&&l_(t,gu,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Vc(e,t),e=t.pendingProps;var o=Si(t,wt.current);ri(t,r),o=Mm(null,t,n,e,o,r);var s=$m();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ft(n)?(s=!0,pu(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Am(t),o.updater=ud,t.stateNode=o,o._reactInternals=t,Ih(t,n,e,r),t=Mh(null,t,n,!0,s,r)):(t.tag=0,ze&&s&&Tm(t),xt(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Vc(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=_R(n),e=yr(n,e),o){case 0:t=Dh(null,t,n,e,r);break e;case 1:t=ly(null,t,n,e,r);break e;case 11:t=iy(null,t,n,e,r);break e;case 14:t=ay(null,t,n,yr(n.type,e),r);break e}throw Error(F(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:yr(n,o),Dh(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:yr(n,o),ly(e,t,n,o,r);case 3:e:{if(B_(t),e===null)throw Error(F(387));n=t.pendingProps,s=t.memoizedState,o=s.element,p_(e,t),wu(t,n,null,r);var i=t.memoizedState;if(n=i.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=ki(Error(F(423)),t),t=cy(e,t,n,r,o);break e}else if(n!==o){o=ki(Error(F(424)),t),t=cy(e,t,n,r,o);break e}else for(qt=io(t.stateNode.containerInfo.firstChild),Gt=t,ze=!0,Sr=null,r=f_(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ti(),n===o){t=wn(e,t,r);break e}xt(e,t,n,r)}t=t.child}return t;case 5:return m_(t),e===null&&jh(t),n=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Ch(n,o)?i=null:s!==null&&Ch(n,s)&&(t.flags|=32),U_(e,t),xt(e,t,i,r),t.child;case 6:return e===null&&jh(t),null;case 13:return z_(e,t,r);case 4:return Nm(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ci(t,null,n,r):xt(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:yr(n,o),iy(e,t,n,o,r);case 7:return xt(e,t,t.pendingProps,r),t.child;case 8:return xt(e,t,t.pendingProps.children,r),t.child;case 12:return xt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,Le(vu,n._currentValue),n._currentValue=i,s!==null)if(Or(s.value,i)){if(s.children===o.children&&!$t.current){t=wn(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=pn(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),Ah(s.return,r,t),a.lanes|=r;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(F(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),Ah(i,r,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}xt(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,ri(t,r),o=cr(o),n=n(o),t.flags|=1,xt(e,t,n,r),t.child;case 14:return n=t.type,o=yr(n,t.pendingProps),o=yr(n.type,o),ay(e,t,n,o,r);case 15:return $_(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:yr(n,o),Vc(e,t),t.tag=1,Ft(n)?(e=!0,pu(t)):e=!1,ri(t,r),L_(t,n,o),Ih(t,n,o,r),Mh(null,t,n,!0,e,r);case 19:return V_(e,t,r);case 22:return F_(e,t,r)}throw Error(F(156,t.tag))};function sx(e,t){return Ab(e,t)}function bR(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 9,682 bytes, line 41
41ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sr(e,t,r,n){return new bR(e,t,r,n)}function Km(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _R(e){if(typeof e=="function")return Km(e)?1:0;if(e!=null){if(e=e.$$typeof,e===hm)return 11;if(e===pm)return 14}return 2}function uo(e,t){var r=e.alternate;return r===null?(r=sr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function qc(e,t,r,n,o,s){var i=2;if(n=e,typeof e=="function")Km(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Bs:return ns(r.children,o,s,t);case fm:i=8,o|=8;break;case oh:return e=sr(12,r,t,o|2),e.elementType=oh,e.lanes=s,e;case sh:return e=sr(13,r,t,o),e.elementType=sh,e.lanes=s,e;case ih:return e=sr(19,r,t,o),e.elementType=ih,e.lanes=s,e;case mb:return hd(r,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hb:i=10;break e;case pb:i=9;break e;case hm:i=11;break e;case pm:i=14;break e;case Mn:i=16,n=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=sr(i,r,t,o),t.elementType=e,t.type=n,t.lanes=s,t}function ns(e,t,r,n){return e=sr(7,e,n,t),e.lanes=r,e}function hd(e,t,r,n){return e=sr(22,e,n,t),e.elementType=mb,e.lanes=r,e.stateNode={isHidden:!1},e}function kf(e,t,r){return e=sr(6,e,null,t),e.lanes=r,e}function Of(e,t,r){return t=sr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xR(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cf(0),this.expirationTimes=cf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cf(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Qm(e,t,r,n,o,s,i,a,l){return e=new xR(e,t,r,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=sr(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Am(s),e}function ER(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Us,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function ix(e){if(!e)return mo;e=e._reactInternals;e:{if(ws(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var r=e.type;if(Ft(r))return i_(e,r,t)}return t}function ax(e,t,r,n,o,s,i,a,l){return e=Qm(r,n,!0,e,o,s,i,a,l),e.context=ix(null),r=e.current,n=Tt(),o=co(r),s=pn(n,o),s.callback=t??null,ao(r,s,o),e.current.lanes=o,Ol(e,o,n),Ut(e,n),e}function pd(e,t,r,n){var o=t.current,s=Tt(),i=co(o);return r=ix(r),t.context===null?t.context=r:t.pendingContext=r,t=pn(s,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ao(o,t,i),e!==null&&(Pr(e,o,i,s),Uc(e,o,i)),i}function Pu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function wy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ym(e,t){wy(e,t),(e=e.alternate)&&wy(e,t)}function SR(){return null}var lx=typeof reportError=="function"?reportError:function(e){console.error(e)};function Jm(e){this._internalRoot=e}md.prototype.render=Jm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));pd(e,t,null,null)};md.prototype.unmount=Jm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ls(function(){pd(null,e,null,null)}),t[vn]=null}};function md(e){this._internalRoot=e}md.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fb();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Fn.length&&t!==0&&t<Fn[r].priority;r++);Fn.splice(r,0,e),r===0&&Bb(e)}};function Xm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function by(){}function TR(e,t,r,n,o){if(o){if(typeof n=="function"){var s=n;n=function(){var c=Pu(i);s.call(c)}}var i=ax(t,n,e,0,null,!1,!1,"",by);return e._reactRootContainer=i,e[vn]=i.current,el(e.nodeType===8?e.parentNode:e),ls(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var a=n;n=function(){var c=Pu(l);a.call(c)}}var l=Qm(e,0,!1,null,null,!1,!1,"",by);return e._reactRootContainer=l,e[vn]=l.current,el(e.nodeType===8?e.parentNode:e),ls(function(){pd(t,l,r,n)}),l}function vd(e,t,r,n,o){var s=r._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=Pu(i);a.call(l)}}pd(t,i,e,o)}else i=TR(r,t,e,o,n);return Pu(i)}Mb=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Ea(t.pendingLanes);r!==0&&(vm(t,r|1),Ut(t,Qe()),!(Ee&6)&&(Oi=Qe()+500,xo()))}break;case 13:ls(function(){var n=yn(e,1);if(n!==null){var o=Tt();Pr(n,e,1,o)}}),Ym(e,1)}};ym=function(e){if(e.tag===13){var t=yn(e,134217728);if(t!==null){var r=Tt();Pr(t,e,134217728,r)}Ym(e,134217728)}};$b=function(e){if(e.tag===13){var t=co(e),r=yn(e,t);if(r!==null){var n=Tt();Pr(r,e,t,n)}Ym(e,t)}};Fb=function(){return Re};Ub=function(e,t){var r=Re;try{return Re=e,t()}finally{Re=r}};gh=function(e,t,r){switch(t){case"input":if(ch(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=ad(n);if(!o)throw Error(F(90));vb(n),ch(n,o)}}}break;case"textarea":wb(e,r);break;case"select":t=r.value,t!=null&&Xs(e,!!r.multiple,t,!1)}};Cb=Hm;Pb=ls;var CR={usingClientEntryPoint:!1,Events:[jl,Hs,ad,Sb,Tb,Hm]},ha={findFiberByHostInstance:zo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},PR={bundleType:ha.bundleType,version:ha.version,rendererPackageName:ha.rendererPackageName,rendererConfig:ha.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:En.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Rb(e),e===null?null:e.stateNode},findFiberByHostInstance:ha.findFiberByHostInstance||SR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hc.isDisabled&&hc.supportsFiber)try{nd=hc.inject(PR),Gr=hc}catch{}}Yt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CR;Yt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xm(t))throw Error(F(200));return ER(e,t,null,r)};Yt.createRoot=function(e,t){if(!Xm(e))throw Error(F(299));var r=!1,n="",o=lx;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Qm(e,1,!1,null,null,r,!1,n,o),e[vn]=t.current,el(e.nodeType===8?e.parentNode:e),new Jm(t)};Yt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=Rb(t),e=e===null?null:e.stateNode,e};Yt.flushSync=function(e){return ls(e)};Yt.hydrate=function(e,t,r){if(!gd(t))throw Error(F(200));return vd(null,e,t,!0,r)};Yt.hydrateRoot=function(e,t,r){if(!Xm(e))throw Error(F(405));var n=r!=null&&r.hydratedSources||null,o=!1,s="",i=lx;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=ax(t,null,e,1,r??null,o,!1,s,i),e[vn]=t.current,el(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new md(t)};Yt.render=function(e,t,r){if(!gd(t))throw Error(F(200));return vd(null,e,t,!1,r)};Yt.unmountComponentAtNode=function(e){if(!gd(e))throw Error(F(40));return e._reactRootContainer?(ls(function(){vd(null,null,e,!1,function(){e._reactRootContainer=null,e[vn]=null})}),!0):!1};Yt.unstable_batchedUpdates=Hm;Yt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!gd(r))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return vd(e,t,r,!1,n)};Yt.version="18.3.1-next-f1338f8080-20240426";
41function cx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cx)}catch(e){console.error(e)}}cx(),cb.exports=Yt;var kr=cb.exports;const oi=wo(kr);var ux,_y=kr;ux=_y.createRoot,_y.hydrateRoot;const kR="modulepreload",OR=function(e){return"/"+e},xy={},L=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.allSettled(r.map(l=>{if(l=OR(l),l in xy)return;xy[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":kR,c||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),c)return new Promise((p,h)=>{d.addEventListener("load",p),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},RR=Date.now(),jR=3e4,dx="bp_chunk_recovery",fx=e=>{const t=e instanceof Error?e.message:String(e??"");return/Importing a module script failed|dynamically imported module|Load failed|Failed to fetch|error loading dynamically imported module|ChunkLoadError|Unexpected token '<'|MIME type|module script failed/i.test(t)},AR=e=>new Promise(t=>setTimeout(t,e)),NR=()=>{try{return sessionStorage.getItem(dx)==="1"}catch{return!0}},IR=()=>{try{sessionStorage.setItem(dx,"1")}catch{}},LR=async()=>{if(NR()||Date.now()-RR>jR)return!1;IR();try{if("caches"in window){const t=await caches.keys();await Promise.all(t.map(r=>caches.delete(r)))}if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistrations();await Promise.all(t.map(r=>r.unregister()))}}catch{}const e=new URL(window.location.href);return e.searchParams.set("v",Date.now().toString()),window.location.replace(e.toString()),await new Promise(()=>{}),!0};function D(e){return v.lazy(async()=>{const t=[0,300,900];let r;for(const n of t){n&&await AR(n);try{return await e()}catch(o){if(r=o,!fx(o))throw o}}throw await LR(),r})}var Vi=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(){}},cs=typeof window>"u"||"Deno"in globalThis;function Et(){}function DR(e,t){return typeof e=="function"?e(t):e}function Qh(e){return typeof e=="number"&&e>=0&&e!==1/0}function hx(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fo(e,t){return typeof e=="function"?e(t):e}function tr(e,t){return typeof e=="function"?e(t):e}function Ey(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(n){if(t.queryHash!==Zm(i,t.options))return!1}else if(!cl(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||s&&!s(t))}function Sy(e,t){const{exact:r,status:n,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(us(t.options.mutationKey)!==us(s))return!1}else if(!cl(t.options.mutationKey,s))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function Zm(e,t){return((t==null?void 0:t.queryKeyHashFn)||us)(e)}function us(e){return JSON.stringify(e,(t,r)=>Yh(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function cl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>cl(e[r],t[r])):!1}function px(e,t){if(e===t)return e;const r=Ty(e)&&Ty(t);if(r||Yh(e)&&Yh(t)){const n=r?e:Object.keys(e),o=n.length,s=r?t:Object.keys(t),i=s.length,a=r?[]:{},l=new Set(n);let c=0;for(let u=0;u<i;u++){const d=r?u:s[u];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,c++):(a[d]=px(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&c++)}return o===i&&c===o?e:a}return t}function ku(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Ty(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Yh(e){if(!Cy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Cy(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Cy(e){return Object.prototype.toString.call(e)==="[object Object]"}function MR(e){return new Promise(t=>{setTimeout(t,e)})}function Jh(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?px(e,t):t}function QV(e){return e}function $R(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function FR(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var eg=Symbol();function mx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===eg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function gx(e,t){return typeof e=="function"?e(...t):!!e}var Go,Wn,di,B0,UR=(B0=class extends Vi{constructor(){super();ne(this,Go);ne(this,Wn);ne(this,di);G(this,di,t=>{if(!cs&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){T(this,Wn)||this.setEventListener(T(this,di))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Wn))==null||t.call(this),G(this,Wn,void 0))}setEventListener(t){var r;G(this,di,t),(r=T(this,Wn))==null||r.call(this),G(this,Wn,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){T(this,Go)!==t&&(G(this,Go,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 4,517 bytes, line 41
41this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof T(this,Go)=="boolean"?T(this,Go):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Go=new WeakMap,Wn=new WeakMap,di=new WeakMap,B0),tg=new UR,fi,Hn,hi,z0,BR=(z0=class extends Vi{constructor(){super();ne(this,fi,!0);ne(this,Hn);ne(this,hi);G(this,hi,t=>{if(!cs&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){T(this,Hn)||this.setEventListener(T(this,hi))}onUnsubscribe(){var t;this.hasListeners()||((t=T(this,Hn))==null||t.call(this),G(this,Hn,void 0))}setEventListener(t){var r;G(this,hi,t),(r=T(this,Hn))==null||r.call(this),G(this,Hn,t(this.setOnline.bind(this)))}setOnline(t){T(this,fi)!==t&&(G(this,fi,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return T(this,fi)}},fi=new WeakMap,Hn=new WeakMap,hi=new WeakMap,z0),Ou=new BR;function Xh(){let e,t;const r=new Promise((o,s)=>{e=o,t=s});r.status="pending",r.catch(()=>{});function n(o){Object.assign(r,o),delete r.resolve,delete r.reject}return r.resolve=o=>{n({status:"fulfilled",value:o}),e(o)},r.reject=o=>{n({status:"rejected",reason:o}),t(o)},r}function zR(e){return Math.min(1e3*2**e,3e4)}function vx(e){return(e??"online")==="online"?Ou.isOnline():!0}var yx=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Rf(e){return e instanceof yx}function wx(e){let t=!1,r=0,n=!1,o;const s=Xh(),i=m=>{var b;n||(p(new yx(m)),(b=e.abort)==null||b.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>tg.isFocused()&&(e.networkMode==="always"||Ou.isOnline())&&e.canRun(),u=()=>vx(e.networkMode)&&e.canRun(),d=m=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,m),o==null||o(),s.resolve(m))},p=m=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,m),o==null||o(),s.reject(m))},h=()=>new Promise(m=>{var b;o=w=>{(n||c())&&m(w)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;o=void 0,n||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(n)return;let m;const b=r===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(w){m=Promise.reject(w)}Promise.resolve(m).then(d).catch(w=>{var S;if(n)return;const y=e.retry??(cs?0:3),_=e.retryDelay??zR,x=typeof _=="function"?_(r,w):_,E=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,w);if(t||!E){p(w);return}r++,(S=e.onFail)==null||S.call(e,r,w),MR(x).then(()=>c()?void 0:h()).then(()=>{t?p(w):g()})})};return{promise:s,cancel:i,continue:()=>(o==null||o(),s),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?g():h().then(g),s)}}var VR=e=>setTimeout(e,0);function WR(){let e=[],t=0,r=a=>{a()},n=a=>{a()},o=VR;const s=a=>{t?e.push(a):o(()=>{r(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{o=a}}}var et=WR(),Ko,V0,bx=(V0=class{constructor(){ne(this,Ko)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qh(this.gcTime)&&G(this,Ko,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(cs?1/0:5*60*1e3))}clearGcTimeout(){T(this,Ko)&&(clearTimeout(T(this,Ko)),G(this,Ko,void 0))}},Ko=new WeakMap,V0),pi,Qo,er,Yo,mt,El,Jo,br,rn,W0,HR=(W0=class extends bx{constructor(t){super();ne(this,br);ne(this,pi);ne(this,Qo);ne(this,er);ne(this,Yo);ne(this,mt);ne(this,El);ne(this,Jo);G(this,Jo,!1),G(this,El,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,Yo,t.client),G(this,er,T(this,Yo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,pi,qR(this.options)),this.state=t.state??T(this,pi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=T(this,mt))==null?void 0:t.promise}setOptions(t){this.options={...T(this,El),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,er).remove(this)}setData(t,r){const n=Jh(this.state.data,t,this.options);return he(this,br,rn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){he(this,br,rn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,o;const r=(n=T(this,mt))==null?void 0:n.promise;
41return(o=T(this,mt))==null||o.cancel(t),r?r.then(Et).catch(Et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,pi))}isActive(){return this.observers.some(t=>tr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eg||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>fo(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!hx(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,mt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=T(this,mt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),T(this,er).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(T(this,mt)&&(T(this,Jo)?T(this,mt).cancel({revert:!0}):T(this,mt).cancelRetry()),this.scheduleGc()),T(this,er).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,br,rn).call(this,{type:"invalidate"})}fetch(t,r){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(T(this,mt))return T(this,mt).continueRetry(),T(this,mt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(h=>h.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,o=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(G(this,Jo,!0),n.signal)})},s=()=>{const p=mx(this.options,r),g=(()=>{const m={client:T(this,Yo),queryKey:this.queryKey,meta:this.meta};return o(m),m})();return G(this,Jo,!1),this.options.persister?this.options.persister(p,g,this):p(g)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:T(this,Yo),state:this.state,fetchFn:s};return o(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),G(this,Qo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&he(this,br,rn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=p=>{var h,g,m,b;Rf(p)&&p.silent||he(this,br,rn).call(this,{type:"error",error:p}),Rf(p)||((g=(h=T(this,er).config).onError)==null||g.call(h,p,this),(b=(m=T(this,er).config).onSettled)==null||b.call(m,this.state.data,p,this)),this.scheduleGc()};return G(this,mt,wx({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var h,g,m,b;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(w){l(w);return}(g=(h=T(this,er).config).onSuccess)==null||g.call(h,p,this),(b=(m=T(this,er).config).onSettled)==null||b.call(m,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,h)=>{he(this,br,rn).call(this,{type:"failed",failureCount:p,error:h})},onPause:()=>{he(this,br,rn).call(this,{type:"pause"})},onContinue:()=>{he(this,br,rn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),T(this,mt).start()}},pi=new WeakMap,Qo=new WeakMap,er=new WeakMap,Yo=new WeakMap,mt=new WeakMap,El=new WeakMap,Jo=new WeakMap,br=new WeakSet,rn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,..._x(n.data,this.options),fetchMeta:t.meta??null};case"success":return G(this,Qo,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Rf(o)&&o.revert&&T(this,Qo)?{...T(this,Qo),fetchStatus:"idle"}
vendor: 5,100 bytes, line 41
41:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),et.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),T(this,er).notify({query:this,type:"updated",action:t})})},W0);function _x(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vx(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var $r,H0,GR=(H0=class extends Vi{constructor(t={}){super();ne(this,$r);this.config=t,G(this,$r,new Map)}build(t,r,n){const o=r.queryKey,s=r.queryHash??Zm(o,r);let i=this.get(s);return i||(i=new HR({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(i)),i}add(t){T(this,$r).has(t.queryHash)||(T(this,$r).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=T(this,$r).get(t.queryHash);r&&(t.destroy(),r===t&&T(this,$r).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){et.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return T(this,$r).get(t)}getAll(){return[...T(this,$r).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Ey(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Ey(t,n)):r}notify(t){et.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){et.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){et.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$r=new WeakMap,H0),Fr,bt,Xo,Ur,Ln,q0,KR=(q0=class extends bx{constructor(t){super();ne(this,Ur);ne(this,Fr);ne(this,bt);ne(this,Xo);this.mutationId=t.mutationId,G(this,bt,t.mutationCache),G(this,Fr,[]),this.state=t.state||xx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){T(this,Fr).includes(t)||(T(this,Fr).push(t),this.clearGcTimeout(),T(this,bt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,Fr,T(this,Fr).filter(r=>r!==t)),this.scheduleGc(),T(this,bt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){T(this,Fr).length||(this.state.status==="pending"?this.scheduleGc():T(this,bt).remove(this))}continue(){var t;return((t=T(this,Xo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,a,l,c,u,d,p,h,g,m,b,w,y,_,x,E,S,C,P;const r=()=>{he(this,Ur,Ln).call(this,{type:"continue"})};G(this,Xo,wx({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(I,j)=>{he(this,Ur,Ln).call(this,{type:"failed",failureCount:I,error:j})},onPause:()=>{he(this,Ur,Ln).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,bt).canRun(this)}));const n=this.state.status==="pending",o=!T(this,Xo).canStart();try{if(n)r();else{he(this,Ur,Ln).call(this,{type:"pending",variables:t,isPaused:o}),await((i=(s=T(this,bt).config).onMutate)==null?void 0:i.call(s,t,this));const j=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));j!==this.state.context&&he(this,Ur,Ln).call(this,{type:"pending",context:j,variables:t,isPaused:o})}const I=await T(this,Xo).start();return await((u=(c=T(this,bt).config).onSuccess)==null?void 0:u.call(c,I,t,this.state.context,this)),await((p=(d=this.options).onSuccess)==null?void 0:p.call(d,I,t,this.state.context)),await((g=(h=T(this,bt).config).onSettled)==null?void 0:g.call(h,I,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,I,null,t,this.state.context)),he(this,Ur,Ln).call(this,{type:"success",data:I}),I}catch(I){try{throw await((y=(w=T(this,bt).config).onError)==null?void 0:y.call(w,I,t,this.state.context,this)),await((x=(_=this.options).onError)==null?void 0:x.call(_,I,t,this.state.context)),await((S=(E=T(this,bt).config).onSettled)==null?void 0:S.call(E,void 0,I,this.state.variables,this.state.context,this)),await((P=(C=this.options).onSettled)==null?void 0:P.call(C,void 0,I,t,this.state.context)),I}finally{he(this,Ur,Ln).call(this,{type:"error",error:I})}}finally{T(this,bt).runNext(this)}}},Fr=new WeakMap,bt=new WeakMap,Xo=new WeakMap,Ur=new WeakSet,Ln=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
41case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),et.batch(()=>{T(this,Fr).forEach(n=>{n.onMutationUpdate(t)}),T(this,bt).notify({mutation:this,type:"updated",action:t})})},q0);function xx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ln,_r,Sl,G0,QR=(G0=class extends Vi{constructor(t={}){super();ne(this,ln);ne(this,_r);ne(this,Sl);this.config=t,G(this,ln,new Set),G(this,_r,new Map),G(this,Sl,0)}build(t,r,n){const o=new KR({mutationCache:this,mutationId:++Yl(this,Sl)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){T(this,ln).add(t);const r=pc(t);if(typeof r=="string"){const n=T(this,_r).get(r);n?n.push(t):T(this,_r).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(T(this,ln).delete(t)){const r=pc(t);if(typeof r=="string"){const n=T(this,_r).get(r);if(n)if(n.length>1){const o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&T(this,_r).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=pc(t);if(typeof r=="string"){const n=T(this,_r).get(r),o=n==null?void 0:n.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var n;const r=pc(t);if(typeof r=="string"){const o=(n=T(this,_r).get(r))==null?void 0:n.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){et.batch(()=>{T(this,ln).forEach(t=>{this.notify({type:"removed",mutation:t})}),T(this,ln).clear(),T(this,_r).clear()})}getAll(){return Array.from(T(this,ln))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Sy(r,n))}findAll(t={}){return this.getAll().filter(r=>Sy(t,r))}notify(t){et.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
41r.state.isPaused);return et.batch(()=>Promise.all(t.map(r=>r.continue().catch(Et))))}},ln=new WeakMap,_r=new WeakMap,Sl=new WeakMap,G0);function pc(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Py(e){return{onFetch:(t,r)=>{var u,d,p,h,g;const n=t.options,o=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],i=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const b=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},w=mx(t.options,t.fetchOptions),y=async(_,x,E)=>{if(m)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const C=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:x,direction:E?"backward":"forward",meta:t.options.meta};return b($),$})(),P=await w(C),{maxPages:I}=t.options,j=E?FR:$R;return{pages:j(_.pages,P,I),pageParams:j(_.pageParams,x,I)}};if(o&&s.length){const _=o==="backward",x=_?YR:ky,E={pages:s,pageParams:i},S=x(n,E);a=await y(E,S,_)}else{const _=e??s.length;do{const x=l===0?i[0]??n.initialPageParam:ky(n,a);if(l>0&&x==null)break;a=await y(a,x),l++}while(l<_)}return a};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function ky(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function YR(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ge,qn,Gn,mi,gi,Kn,vi,yi,K0,JR=(K0=class{constructor(e={}){ne(this,Ge);ne(this,qn);ne(this,Gn);ne(this,mi);ne(this,gi);ne(this,Kn);ne(this,vi);ne(this,yi);G(this,Ge,e.queryCache||new GR),G(this,qn,e.mutationCache||new QR),G(this,Gn,e.defaultOptions||{}),G(this,mi,new Map),G(this,gi,new Map),G(this,Kn,0)}mount(){Yl(this,Kn)._++,T(this,Kn)===1&&(G(this,vi,tg.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ge).onFocus())})),G(this,yi,Ou.subscribe(async e=>{e&&(await this.resumePausedMutations(),T(this,Ge).onOnline())})))}unmount(){var e,t;Yl(this,Kn)._--,T(this,Kn)===0&&((e=T(this,vi))==null||e.call(this),G(this,vi,void 0),(t=T(this,yi))==null||t.call(this),G(this,yi,void 0))}isFetching(e){return T(this,Ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return T(this,qn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,Ge).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=T(this,Ge).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(fo(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return T(this,Ge).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),o=T(this,Ge).get(n.queryHash),s=o==null?void 0:o.state.data,i=DR(t,s);if(i!==void 0)return T(this,Ge).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return et.batch(()=>T(this,Ge).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=T(this,Ge).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=T(this,Ge);et.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=T(this,Ge);return et.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=et.batch(()=>T(this,Ge).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Et).catch(Et)}invalidateQueries(e,t={}){return et.batch(()=>(T(this,Ge).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=et.batch(()=>T(this,Ge).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,r);return r.throwOnError||(s=s.catch(Et)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(n).then(Et)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=T(this,Ge).build(this,t);return r.isStaleByTime(fo(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}
vendor: 4,746 bytes, line 41
41prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e.behavior=Py(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}ensureInfiniteQueryData(e){return e.behavior=Py(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ou.isOnline()?T(this,qn).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Ge)}getMutationCache(){return T(this,qn)}getDefaultOptions(){return T(this,Gn)}setDefaultOptions(e){G(this,Gn,e)}setQueryDefaults(e,t){T(this,mi).set(us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...T(this,mi).values()],r={};return t.forEach(n=>{cl(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){T(this,gi).set(us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...T(this,gi).values()],r={};return t.forEach(n=>{cl(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...T(this,Gn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Zm(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===eg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...T(this,Gn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){T(this,Ge).clear(),T(this,qn).clear()}},Ge=new WeakMap,qn=new WeakMap,Gn=new WeakMap,mi=new WeakMap,gi=new WeakMap,Kn=new WeakMap,vi=new WeakMap,yi=new WeakMap,K0),jt,ye,Tl,_t,Zo,wi,Qn,Yn,Cl,bi,_i,es,ts,Jn,xi,Oe,Ta,Zh,ep,tp,rp,np,op,sp,Ex,Q0,XR=(Q0=class extends Vi{constructor(t,r){super();ne(this,Oe);ne(this,jt);ne(this,ye);ne(this,Tl);ne(this,_t);ne(this,Zo);ne(this,wi);ne(this,Qn);ne(this,Yn);ne(this,Cl);ne(this,bi);ne(this,_i);ne(this,es);ne(this,ts);ne(this,Jn);ne(this,xi,new Set);this.options=r,G(this,jt,t),G(this,Yn,null),G(this,Qn,Xh()),this.options.experimental_prefetchInRender||T(this,Qn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,ye).addObserver(this),Oy(T(this,ye),this.options)?he(this,Oe,Ta).call(this):this.updateResult(),he(this,Oe,rp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ip(T(this,ye),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ip(T(this,ye),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,Oe,np).call(this),he(this,Oe,op).call(this),T(this,ye).removeObserver(this)}setOptions(t){const r=this.options,n=T(this,ye);if(this.options=T(this,jt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof tr(this.options.enabled,T(this,ye))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,Oe,sp).call(this),T(this,ye).setOptions(this.options),r._defaulted&&!ku(this.options,r)&&T(this,jt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,ye),observer:this});const o=this.hasListeners();o&&Ry(T(this,ye),n,this.options,r)&&he(this,Oe,Ta).call(this),this.updateResult(),o&&(T(this,ye)!==n||tr(this.options.enabled,T(this,ye))!==tr(r.enabled,T(this,ye))||fo(this.options.staleTime,T(this,ye))!==fo(r.staleTime,T(this,ye)))&&he(this,Oe,Zh).call(this);const s=he(this,Oe,ep).call(this);o&&(T(this,ye)!==n||tr(this.options.enabled,T(this,ye))!==tr(r.enabled,T(this,ye))||s!==T(this,Jn))&&he(this,Oe,tp).call(this,s)}getOptimisticResult(t){const r=T(this,jt).getQueryCache().build(T(this,jt),t),n=this.createResult(r,t);return ej(this,n)&&(G(this,_t,n),G(this,wi,this.options),G(this,Zo,T(this,ye).state)),n}getCurrentResult(){return T(this,_t)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r==null||r(o),Reflect.get(n,o))})}trackProp(t){T(this,xi).add(t)}getCurrentQuery(){return T(this,ye)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=T(this,jt).defaultQueryOptions(t),n=T(this,jt).getQueryCache().build(T(this,jt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return he(this,Oe,Ta).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,_t)))}createResult(t,r){var I;const n=T(this,ye),o=this.options,s=T(this,_t),i=T(this,Zo),a=T(this,wi),c=t!==n?t.state:T(this,Tl),{state:u}=t;let d={...u},p=!1,h;
41if(r._optimisticResults){const j=this.hasListeners(),$=!j&&Oy(t,r),M=j&&Ry(t,n,r,o);($||M)&&(d={...d,..._x(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:b}=d;h=d.data;let w=!1;if(r.placeholderData!==void 0&&h===void 0&&b==="pending"){let j;s!=null&&s.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData)?(j=s.data,w=!0):j=typeof r.placeholderData=="function"?r.placeholderData((I=T(this,_i))==null?void 0:I.state.data,T(this,_i)):r.placeholderData,j!==void 0&&(b="success",h=Jh(s==null?void 0:s.data,j,r),p=!0)}if(r.select&&h!==void 0&&!w)if(s&&h===(i==null?void 0:i.data)&&r.select===T(this,Cl))h=T(this,bi);else try{G(this,Cl,r.select),h=r.select(h),h=Jh(s==null?void 0:s.data,h,r),G(this,bi,h),G(this,Yn,null)}catch(j){G(this,Yn,j)}T(this,Yn)&&(g=T(this,Yn),h=T(this,bi),m=Date.now(),b="error");const y=d.fetchStatus==="fetching",_=b==="pending",x=b==="error",E=_&&y,S=h!==void 0,P={status:b,fetchStatus:d.fetchStatus,isPending:_,isSuccess:b==="success",isError:x,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:y,isRefetching:y&&!_,isLoadingError:x&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:x&&S,isStale:rg(t,r),refetch:this.refetch,promise:T(this,Qn),isEnabled:tr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=W=>{P.status==="error"?W.reject(P.error):P.data!==void 0&&W.resolve(P.data)},$=()=>{const W=G(this,Qn,P.promise=Xh());j(W)},M=T(this,Qn);switch(M.status){case"pending":t.queryHash===n.queryHash&&j(M);break;case"fulfilled":(P.status==="error"||P.data!==M.value)&&$();break;case"rejected":(P.status!=="error"||P.error!==M.reason)&&$();break}}return P}updateResult(){const t=T(this,_t),r=this.createResult(T(this,ye),this.options);if(G(this,Zo,T(this,ye).state),G(this,wi,this.options),T(this,Zo).data!==void 0&&G(this,_i,T(this,ye)),ku(r,t))return;G(this,_t,r);const n=()=>
vendor: 4,701 bytes, line 41
41{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!T(this,xi).size)return!0;const i=new Set(s??T(this,xi));return this.options.throwOnError&&i.add("error"),Object.keys(T(this,_t)).some(a=>{const l=a;return T(this,_t)[l]!==t[l]&&i.has(l)})};he(this,Oe,Ex).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,Oe,rp).call(this)}},jt=new WeakMap,ye=new WeakMap,Tl=new WeakMap,_t=new WeakMap,Zo=new WeakMap,wi=new WeakMap,Qn=new WeakMap,Yn=new WeakMap,Cl=new WeakMap,bi=new WeakMap,_i=new WeakMap,es=new WeakMap,ts=new WeakMap,Jn=new WeakMap,xi=new WeakMap,Oe=new WeakSet,Ta=function(t){he(this,Oe,sp).call(this);let r=T(this,ye).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Et)),r},Zh=function(){he(this,Oe,np).call(this);const t=fo(this.options.staleTime,T(this,ye));if(cs||T(this,_t).isStale||!Qh(t))return;const n=hx(T(this,_t).dataUpdatedAt,t)+1;G(this,es,setTimeout(()=>{T(this,_t).isStale||this.updateResult()},n))},ep=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,ye)):this.options.refetchInterval)??!1},tp=function(t){he(this,Oe,op).call(this),G(this,Jn,t),!(cs||tr(this.options.enabled,T(this,ye))===!1||!Qh(T(this,Jn))||T(this,Jn)===0)&&G(this,ts,setInterval(()=>{(this.options.refetchIntervalInBackground||tg.isFocused())&&he(this,Oe,Ta).call(this)},T(this,Jn)))},rp=function(){he(this,Oe,Zh).call(this),he(this,Oe,tp).call(this,he(this,Oe,ep).call(this))},np=function(){T(this,es)&&(clearTimeout(T(this,es)),G(this,es,void 0))},op=function(){T(this,ts)&&(clearInterval(T(this,ts)),G(this,ts,void 0))},sp=function(){const t=T(this,jt).getQueryCache().build(T(this,jt),this.options);if(t===T(this,ye))return;const r=T(this,ye);G(this,ye,t),G(this,Tl,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Ex=function(t){et.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(T(this,_t))}),T(this,jt).getQueryCache().notify({query:T(this,ye),type:"observerResultsUpdated"})})},Q0);function ZR(e,t){return tr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Oy(e,t){return ZR(e,t)||e.state.data!==void 0&&ip(e,t,t.refetchOnMount)}function ip(e,t,r){if(tr(t.enabled,e)!==!1&&fo(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&rg(e,t)}return!1}function Ry(e,t,r,n){return(e!==t||tr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&rg(e,r)}function rg(e,t){return tr(t.enabled,e)!==!1&&e.isStaleByTime(fo(t.staleTime,e))}function ej(e,t){return!ku(e.getCurrentResult(),t)}var Xn,Zn,At,cn,mn,Gc,ap,Y0,tj=(Y0=class extends Vi{constructor(r,n){super();ne(this,mn);ne(this,Xn);ne(this,Zn);ne(this,At);ne(this,cn);G(this,Xn,r),this.setOptions(n),this.bindMethods(),he(this,mn,Gc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var o;const n=this.options;this.options=T(this,Xn).defaultMutationOptions(r),ku(this.options,n)||T(this,Xn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,At),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&us(n.mutationKey)!==us(this.options.mutationKey)?this.reset():((o=T(this,At))==null?void 0:o.state.status)==="pending"&&T(this,At).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=T(this,At))==null||r.removeObserver(this)}onMutationUpdate(r){he(this,mn,Gc).call(this),he(this,mn,ap).call(this,r)}getCurrentResult(){return T(this,Zn)}reset(){var r;(r=T(this,At))==null||r.removeObserver(this),G(this,At,void 0),he(this,mn,Gc).call(this),he(this,mn,ap).call(this)}mutate(r,n){var o;return G(this,cn,n),(o=T(this,At))==null||o.removeObserver(this),G(this,At,T(this,Xn).getMutationCache().build(T(this,Xn),this.options)),T(this,At).addObserver(this),T(this,At).execute(r)}},Xn=new WeakMap,Zn=new WeakMap,At=new WeakMap,cn=new WeakMap,mn=new WeakSet,Gc=function(){var n;const r=((n=T(this,At))==null?void 0:n.state)??xx();G(this,Zn,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},ap=function(r){et.batch(()=>{var n,o,s,i,a,l,c,u;if(T(this,cn)&&this.hasListeners()){const d=T(this,Zn).variables,p=T(this,Zn).context;(r==null?void 0:r.type)==="success"?((o=(n=T(this,cn)).onSuccess)==null||o.call(n,r.data,d,p),(i=(s=T(this,cn)).onSettled)==null||i.call(s,r.data,null,d,p)):(r==null?void 0:r.type)==="error"&&((l=(a=T(this,cn)).onError)==null||l.call(a,r.error,d,p),(u=(c=T(this,cn)).onSettled)==null||u.call(c,void 0,r.error,d,p))}
41this.listeners.forEach(d=>{d(T(this,Zn))})})},Y0),Sx=v.createContext(void 0),yd=e=>{const t=v.useContext(Sx);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rj=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(Sx.Provider,{value:e,children:t})),Tx=v.createContext(!1),nj=()=>v.useContext(Tx);Tx.Provider;function oj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sj=v.createContext(oj()),ij=()=>v.useContext(sj),aj=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},lj=e=>{v.useEffect(()=>{e.clearReset()},[e])},cj=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||gx(r,[e.error,n])),uj=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},dj=(e,t)=>e.isLoading&&e.isFetching&&!t,fj=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,jy=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function hj(e,t,r){var d,p,h,g,m;const n=nj(),o=ij(),s=yd(),i=s.defaultQueryOptions(e);(p=(d=s.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,i),i._optimisticResults=n?"isRestoring":"optimistic",uj(i),aj(i,o),lj(o);const a=!s.getQueryCache().get(i.queryHash),[l]=v.useState(()=>new t(s,i)),c=l.getOptimisticResult(i),u=!n&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(b=>{const w=u?l.subscribe(et.batchCalls(b)):Et;return l.updateResult(),w},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),v.useEffect(()=>{l.setOptions(i)},[i,l]),fj(i,c))throw jy(i,l,o);if(cj({result:c,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw c.error;if((g=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||g.call(h,i,c),i.experimental_prefetchInRender&&!cs&&dj(c,n)){const b=a?jy(i,l,o):(m=s.getQueryCache().get(i.queryHash))==null?void 0:m.promise;b==null||b.catch(Et).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?c:l.trackResult(c)}function bn(e,t){return hj(e,XR)}function Ca(e,t){const r=yd(),[n]=v.useState(()=>new tj(r,e));v.useEffect(()=>{n.setOptions(e)},[n,e]);const o=v.useSyncExternalStore(v.useCallback(i=>n.subscribe(et.batchCalls(i)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),s=v.useCallback((i,a)=>{n.mutate(i,a).catch(Et)},[n]);if(o.error&&gx(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}var ng={},Ru={},lp=function(e,t){return lp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},lp(e,t)};function Cx(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");lp(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var or=function(){return or=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];
vendor: 4,097 bytes, line 41
41for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},or.apply(this,arguments)};function Eo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Px(e,t,r,n){var o=arguments.length,s=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function kx(e,t){return function(r,n){t(r,n,e)}}function Ox(e,t,r,n,o,s){function i(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var a=n.kind,l=a==="getter"?"get":a==="setter"?"set":"value",c=!t&&e?n.static?e:e.prototype:null,u=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),d,p=!1,h=r.length-1;h>=0;h--){var g={};for(var m in n)g[m]=m==="access"?{}:n[m];for(var m in n.access)g.access[m]=n.access[m];g.addInitializer=function(w){if(p)throw new TypeError("Cannot add initializers after decoration has completed");s.push(i(w||null))};var b=(0,r[h])(a==="accessor"?{get:u.get,set:u.set}:u[l],g);if(a==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=i(b.get))&&(u.get=d),(d=i(b.set))&&(u.set=d),(d=i(b.init))&&o.unshift(d)}else(d=i(b))&&(a==="field"?o.unshift(d):u[l]=d)}c&&Object.defineProperty(c,n.name,u),p=!0}function Rx(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function jx(e){return typeof e=="symbol"?e:"".concat(e)}function Ax(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Nx(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Y(e,t,r,n){function o(s){return s instanceof r?s:new r(function(i){i(s)})}return new(r||(r=Promise))(function(s,i){function a(u){try{c(n.next(u))}catch(d){i(d)}}function l(u){try{c(n.throw(u))}catch(d){i(d)}}function c(u){u.done?s(u.value):o(u.value).then(a,l)}c((n=n.apply(e,t||[])).next())})}function Ix(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,o,s,i=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(r=0)),r;)try{if(n=1,o&&(s=c[0]&2?o.return:c[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,c[1])).done)return s;switch(o=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],o=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var wd=Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};function Lx(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&wd(t,e,r)}function ju(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
vendor: 5,028 bytes, line 41
41if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function og(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return s}function Dx(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(og(arguments[t]));return e}function Mx(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var s=arguments[t],i=0,a=s.length;i<a;i++,o++)n[o]=s[i];return n}function sg(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}function Ri(e){return this instanceof Ri?(this.v=e,this):new Ri(e)}function $x(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,s=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",i),o[Symbol.asyncIterator]=function(){return this},o;function i(h){return function(g){return Promise.resolve(g).then(h,d)}}function a(h,g){n[h]&&(o[h]=function(m){return new Promise(function(b,w){s.push([h,m,b,w])>1||l(h,m)})},g&&(o[h]=g(o[h])))}function l(h,g){try{c(n[h](g))}catch(m){p(s[0][3],m)}}function c(h){h.value instanceof Ri?Promise.resolve(h.value.v).then(u,d):p(s[0][2],h)}function u(h){l("next",h)}function d(h){l("throw",h)}function p(h,g){h(g),s.shift(),s.length&&l(s[0][0],s[0][1])}}function Fx(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,s){t[o]=e[o]?function(i){return(r=!r)?{value:Ri(e[o](i)),done:!1}:s?s(i):i}:s}}function Ux(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof ju=="function"?ju(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(s){r[s]=e[s]&&function(i){return new Promise(function(a,l){i=e[s](i),o(a,l,i.done,i.value)})}}function o(s,i,a,l){Promise.resolve(l).then(function(c){s({value:c,done:a})},i)}}function Bx(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var pj=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},cp=function(e){return cp=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},cp(e)};function zx(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=cp(e),n=0;n<r.length;n++)r[n]!=="default"&&wd(t,e,r[n]);return pj(t,e),t}function Vx(e){return e&&e.__esModule?e:{default:e}}function Wx(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Hx(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function qx(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Gx(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");o&&(n=function(){try{o.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var mj=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function Kx(e){function t(s){e.error=e.hasError?new mj(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var r,n=0;function o(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(s).then(o,function(i){return t(i),o()})}else n|=1}catch(i){t(i)}
41if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()}function Qx(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,s,i){return n?t?".jsx":".js":o&&(!s||!i)?r:o+s+"."+i.toLowerCase()+"js"}):e}const gj={__extends:Cx,__assign:or,__rest:Eo,__decorate:Px,__param:kx,__esDecorate:Ox,__runInitializers:Rx,__propKey:jx,__setFunctionName:Ax,__metadata:Nx,__awaiter:Y,__generator:Ix,__createBinding:wd,__exportStar:Lx,__values:ju,__read:og,__spread:Dx,__spreadArrays:Mx,__spreadArray:sg,__await:Ri,__asyncGenerator:$x,__asyncDelegator:Fx,__asyncValues:Ux,__makeTemplateObject:Bx,__importStar:zx,__importDefault:Vx,__classPrivateFieldGet:Wx,__classPrivateFieldSet:Hx,__classPrivateFieldIn:qx,__addDisposableResource:Gx,__disposeResources:Kx,__rewriteRelativeImportExtension:Qx},vj=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:Gx,get __assign(){return or},__asyncDelegator:Fx,__asyncGenerator:$x,__asyncValues:Ux,__await:Ri,__awaiter:Y,__classPrivateFieldGet:Wx,__classPrivateFieldIn:qx,__classPrivateFieldSet:Hx,__createBinding:wd,__decorate:Px,__disposeResources:Kx,__esDecorate:Ox,__exportStar:Lx,__extends:Cx,__generator:Ix,__importDefault:Vx,__importStar:zx,__makeTemplateOb
41ject:Bx,__metadata:Nx,__param:kx,__propKey:jx,__read:og,__rest:Eo,__rewriteRelativeImportExtension:Qx,__runInitializers:Rx,__setFunctionName:Ax,__spread:Dx,__spreadArray:sg,__spreadArrays:Mx,__values:ju,default:gj},Symbol.toStringTag,{value:"Module"})),yj=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);let bd=class extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}},Yx=class extends bd{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}},up=class extends bd{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}},dp=class extends bd{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}};var Au;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Au||(Au={}));class wj{constructor(t,{headers:r={},customFetch:n,region:o=Au.Any}={}){this.url=t,this.headers=r,this.region=o,this.fetch=yj(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return Y(this,arguments,void 0,function*(r,n={}){var o;let s,i;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=n;let p={},{region:h}=n;h||(h=this.region);const g=new URL(`${this.url}/${r}`);h&&h!=="any"&&(p["x-region"]=h,g.searchParams.set("forceFunctionRegion",h));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(p["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(p["Content-Type"]="application/json",m=JSON.stringify(c)):m=c;let b=u;d&&(i=new AbortController,s=setTimeout(()=>i.abort(),d),u?(b=i.signal,u.addEventListener("abort",()=>i.abort())):b=i.signal);const w=yield this.fetch(g.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:m,signal:b}).catch(E=>{throw new Yx(E)}),y=w.headers.get("x-relay-error");if(y&&y==="true")throw new up(w);if(!w.ok)throw new dp(w);let _=((o=w.headers.get("Content-Type"))!==null&&o!==void 0?o:"text/plain").split(";")[0].trim(),x;return _==="application/json"?x=yield w.json():_==="application/octet-stream"||_==="application/pdf"?x=yield w.blob():_==="text/event-stream"?x=w:_==="multipart/form-data"?x=yield w.formData():x=yield w.text(),{data:x,error:null,response:w}}catch(a){return{data:null,error:a,response:a instanceof dp||a instanceof up?a.context:void 0}}finally{s&&clearTimeout(s)}})}}const bj=Object.freeze(Object.defineProperty({__proto__:null,get FunctionRegion(){return Au},FunctionsClient:wj,FunctionsError:bd,FunctionsFetchError:Yx,FunctionsHttpError:dp,FunctionsRelayError:up},Symbol.toStringTag,{value:"Module"})),Jx=Pl(bj);var yt={};const Wi=Pl(vj);var mc={},gc={},vc={},yc={},wc={},bc={},Ay;function Xx(){if(Ay)return bc;Ay=1,Object.defineProperty(bc,"__esModule",{value:!0});class e extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.co
41de=r.code}}return bc.default=e,bc}var Ny;function Zx(){if(Ny)return wc;Ny=1,Object.defineProperty(wc,"__esModule",{value:!0});const t=Wi.__importDefault(Xx());let r=class{constructor(o){var s,i;this.shouldThrowOnError=!1,this.method=o.method,this.url=o.url,this.headers=new Headers(o.headers),this.schema=o.schema,this.body=o.body,this.shouldThrowOnError=(s=o.shouldThrowOnError)!==null&&s!==void 0?s:!1,this.signal=o.signal,this.isMaybeSingle=(i=o.isMaybeSingle)!==null&&i!==void 0?i:!1,o.fetch?this.fetch=o.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,s){return this.headers=new Headers(this.headers),this.headers.set(o,s),this}then(o,s){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const i=this.fetch;let a=i(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async l=>{var c,u,d,p;let h=null,g=null,m=null,b=l.status,w=l.statusText;if(l.ok){if(this.method!=="HEAD"){const E=await l.text();E===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((c=this.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?g=E:g=JSON.parse(E))}const _=(u=this.headers.get("Prefer"))===null||u===void 0?void 0:u.match(/count=(exact|planned|estimated)/),x=(d=l.headers.get("content-range"))===null||d===void 0?void 0:d.split("/");_&&x&&x.length>1&&(m=parseInt(x[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(g)&&(g.length>1?(h={code:"PGRST116",details:`Results contain ${g.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},g=null,m=null,b=406,w="Not Acceptable"):g.length===1?g=g[0]:g=null)}else{const _=await l.text();try{h=JSON.parse(_),Array.isArray(h)&&l.status===404&&(g=[],h=null,b=200,w="OK")}catch{l.status===404&&_===""?(b=204,w="No Content"):h={message:_}}if(h&&this.isMaybeSingle&&(!((p=h==null?void 0:h.details)===null||p===void 0)&&p.includes("0 rows"))&&(h=null,b=200,w="OK"),h&&this.shouldThrowOnError)throw new t.default(h)}return{error:h,data:g,count:m,status:b,statusText:w}});return this.shouldThrowOnError||(a=a.catch(l=>{var c,u,d,p,h,g;let m="";const b=l==null?void 0:l.cause;if(b){const w=(c=b==null?void 0:b.message)!==null&&c!==void 0?c:"",y=(u=b==null?void 0:b.code)!==null&&u!==void 0?u:"";m=`${(d=l==null?void 0:l.name)!==null&&d!==void 0?d:"FetchError"}: ${l==null?void 0:l.message}`,m+=`
42
43Caused by: ${(p=b==null?void 0:b.name)!==null&&p!==void 0?p:"Error"}: ${w}`,y&&(m+=` (${y})`),b!=null&&b.stack&&(m+=`
44${b.stack}`)}else m=(h=l==null?void 0:l.stack)!==null&&h!==void 0?h:"";return{error:{message:`${(g=l==null?void 0:l.name)!==null&&g!==void 0?g:"FetchError"}: ${l==null?void 0:l.message}`,details:m,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),a.then(o,s)}returns(){return this}overrideTypes(){return this}};return wc.default=r,wc}var Iy;function eE(){if(Iy)return yc;Iy=1,Object.defineProperty(yc,"__esModule",{value:!0});const t=Wi.__importDefault(Zx());let r=class extends t.default{select(o){let s=!1;const i=(o??"*").split("").map(a=>/\s/.test(a)&&!s?"":(a==='"'&&(s=!s),a)).join("");return this.url.searchParams.set("select",i),this.headers.append("Prefer","return=representation"),this}order(o,{ascending:s=!0,nullsFirst:i,foreignTable:a,referencedTable:l=a}={}){const c=l?`${l}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${o}.${s?"asc":"desc"}${i===void 0?"":i?".nullsfirst":".nullslast"}`),this}limit(o,{foreignTable:s,referencedTable:i=s}={}){const a=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(a,`${o}`),this}range(o,s,{foreignTable:i,referencedTable:a=i}={}){const l=typeof a>"u"?"offset":`${a}.offset`,c=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${o}`),this.url.searchParams.set(c,`${s-o+1}`),this}abortSignal(o){return this.signal=o,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
44explain({analyze:o=!1,verbose:s=!1,settings:i=!1,buffers:a=!1,wal:l=!1,format:c="text"}={}){var u;const d=[o?"analyze":null,s?"verbose":null,i?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${p}"; options=${d};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(o){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${o}`),this}};return yc.default=r,yc}var Ly;function ig(){if(Ly)return vc;Ly=1,Object.defineProperty(vc,"__esModule",{value:!0});const t=Wi.__importDefault(eE()),r=new RegExp("[,()]");let n=class extends t.default{eq(s,i){return this.url.searchParams.append(s,`eq.${i}`),this}neq(s,i){return this.url.searchParams.append(s,`neq.${i}`),this}gt(s,i){return this.url.searchParams.append(s,`gt.${i}`),this}gte(s,i){return this.url.searchParams.append(s,`gte.${i}`),this}lt(s,i){return this.url.searchParams.append(s,`lt.${i}`),this}lte(s,i){return this.url.searchParams.append(s,`lte.${i}`),this}like(s,i){return this.url.searchParams.append(s,`like.${i}`),this}likeAllOf(s,i){return this.url.searchParams.append(s,`like(all).{${i.join(",")}}`),this}likeAnyOf(s,i){return this.url.searchParams.append(s,`like(any).{${i.join(",")}}`),this}ilike(s,i){return this.url.searchParams.append(s,`ilike.${i}`),this}ilikeAllOf(s,i){return this.url.searchParams.append(s,`ilike(all).{${i.join(",")}}`),this}ilikeAnyOf(s,i){return this.url.searchParams.append(s,`ilike(any).{${i.join(",")}}`),this}regexMatch(s,i){return this.url.searchParams.append(s,`match.${i}`),this}regexIMatch(s,i){return this.url.searchParams.append(s,`imatch.${i}`),this}is(s,i){return this.url.searchParams.append(s,`is.${i}`),this}isDistinct(s,i){return this.url.searchParams.append(s,`isdistinct.${i}`),this}in(s,i){const a=Array.from(new Set(i)).map(l=>typeof l=="string"&&r.test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(s,`in.(${a})`),this}contains(s,i){return typeof i=="string"?this.url.searchParams.append(s,`cs.${i}`):Array.isArray(i)?this.url.searchParams.append(s,`cs.{${i.join(",")}}`):this.url.searchParams.append(s,`cs.${JSON.stringify(i)}`),this}containedBy(s,i){return typeof i=="string"?this.url.searchParams.append(s,`cd.${i}`):Array.isArray(i)?this.url.searchParams.append(s,`cd.{${i.join(",")}}`):this.url.searchParams.append(s,`cd.${JSON.stringify(i)}`),this}rangeGt(s,i){return this.url.searchParams.append(s,`sr.${i}`),this}rangeGte(s,i){return this.url.searchParams.append(s,`nxl.${i}`),this}rangeLt(s,i){return this.url.searchParams.append(s,`sl.${i}`),this}rangeLte(s,i){return this.url.searchParams.append(s,`nxr.${i}`),this}rangeAdjacent(s,i){return this.url.searchParams.append(s,`adj.${i}`),this}overlaps(s,i){return typeof i=="string"?this.url.searchParams.append(s,`ov.${i}`):this.url.searchParams.append(s,`ov.{${i.join(",")}}`),this}textSearch(s,i,{config:a,type:l}={}){let c="";l==="plain"?c="pl":l==="phrase"?c="ph":l==="websearch"&&(c="w");const u=a===void 0?"":`(${a})`;return this.url.searchParams.append(s,`${c}fts${u}.${i}`),this}match(s){return Object.entries(s).forEach(([i,a])=>{this.url.searchParams.append(i,`eq.${a}`)}),this}not(s,i,a){return this.url.searchParams.append(s,`not.${i}.${a}`),this}or(s,{foreignTable:i,referencedTable:a=i}={}){const l=a?`${a}.or`:"or";return this.url.searchParams.append(l,`(${s})`),this}filter(s,i,a){return this.url.searchParams.append(s,`${i}.${a}`),this}};return vc.default=n,vc}var Dy;function tE(){if(Dy)return gc;Dy=1,Object.defineProperty(gc,"__esModule",{value:!0});const t=Wi.__importDefault(ig());let r=class{constructor(o,{headers:s={},schema:i,fetch:a}){this.url=o,this.headers=new Headers(s),this.schema=i,this.fetch=a}select(o,s){const{head:i=!1,count:a}=s??{},l=i?"HEAD":"GET";let c=!1;const u=(o??"*").split("").map(d=>/\s/.test(d)&&!c?"":(d==='"'&&(c=!c),d)).join("");return this.url.searchParams.set("select",u),a&&this.headers.append("Prefer",`count=${a}`),new t.default({method:l,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(o,{count:s,defaultToNull:i=!0}={}){var a;const l="POST";if(s&&this.headers.append("Prefer",`count=${s}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(o)){const c=o.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);this.url.searchParams.set("columns",u.join(","))}}return new t.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:o,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}upsert(o,{onConflict:s,ignoreDuplicates:i=!1,count:a,defaultToNull:l=!0}={}){var c;const u="POST";if(this.headers.append("Prefer",`resolution=${i?"ignore":"merge"}-duplicates`),s!==void 0&&this.url.searchParams.set("on_conflict",s),a&&this.headers.append("Prefer",`count=${a}`),l||this.headers.append("Prefer","missing=default"),Array.isArray(o)){const d=o.reduce((p,h)=>p.concat(Object.keys(h)),[]);if(d.length>0){const p=[...new Set(d)].map(h=>`"${h}"`);this.url.searchParams.set("columns",p.join(","))}}return new t.default({method:u,url:this.url,headers:this.headers,schema:this.schema,body:o,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}update(o,{count:s}={}){var i;const a="PATCH";return s&&this.headers.append("Prefer",`count=${s}`),new t.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:o,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}delete({count:o}={}){var s;const i="DELETE";return o&&this.headers.append("Prefer",`count=${o}`),new t.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch})}};return gc.default=r,gc}var My;function _j(){if(My)return mc;My=1,Object.defineProperty(mc,"__esModule",{value:!0});
44const e=Wi,t=e.__importDefault(tE()),r=e.__importDefault(ig());let n=class rE{constructor(s,{headers:i={},schema:a,fetch:l}={}){this.url=s,this.headers=new Headers(i),this.schemaName=a,this.fetch=l}from(s){if(!s||typeof s!="string"||s.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");const i=new URL(`${this.url}/${s}`);return new t.default(i,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(s){return new rE(this.url,{headers:this.headers,schema:s,fetch:this.fetch})}rpc(s,i={},{head:a=!1,get:l=!1,count:c}={}){var u;let d;const p=new URL(`${this.url}/rpc/${s}`);let h;a||l?(d=a?"HEAD":"GET",Object.entries(i).filter(([m,b])=>b!==void 0).map(([m,b])=>[m,Array.isArray(b)?`{${b.join(",")}}`:`${b}`]).forEach(([m,b])=>{p.searchParams.append(m,b)})):(d="POST",h=i);const g=new Headers(this.headers);return c&&g.set("Prefer",`count=${c}`),new r.default({method:d,url:p,headers:g,schema:this.schemaName,body:h,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}};return mc.default=n,mc}Object.defineProperty(yt,"__esModule",{value:!0});yt.PostgrestError=yt.PostgrestBuilder=yt.PostgrestTransformBuilder=yt.PostgrestFilterBuilder=yt.PostgrestQueryBuilder=yt.PostgrestClient=void 0;const Hi=Wi,nE=Hi.__importDefault(_j());yt.PostgrestClient=nE.default;const oE=Hi.__importDefault(tE());yt.PostgrestQueryBuilder=oE.default;const sE=Hi.__importDefault(ig());yt.PostgrestFilterBuilder=sE.default;const iE=Hi.__importDefault(eE());yt.PostgrestTransformBuilder=iE.default;const aE=Hi.__importDefault(Zx());yt.PostgrestBuilder=aE.default;const lE=Hi.__importDefault(Xx());yt.PostgrestError=lE.default;yt.default={PostgrestClient:nE.default,PostgrestQueryBuilder:oE.default,PostgrestFilterBuilder:sE.default,PostgrestTransformBuilder:iE.default,PostgrestBuilder:aE.default,PostgrestError:lE.default};class cE{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,o=parseInt(n.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
45import ws from "ws"
46new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
47
48Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const xj="2.87.1",Ej=`realtime-js/${xj}`,uE="1.0.0",Sj="2.0.0",$y=uE,fp=1e4,Tj=1e3,Cj=100;var Fo;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Fo||(Fo={}));var Ye;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Ye||(Ye={}));var Er;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Er||(Er={}));var hp;(function(e){e.websocket="websocket"})(hp||(hp={}));var Uo;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Uo||(Uo={}));class Pj{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const o=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,o)}_encodeJsonUserBroadcastPush(t){var r,n;const o=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},i=new TextEncoder().encode(JSON.stringify(o)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var o,s;const i=t.topic,a=(o=t.ref)!==null&&o!==void 0?o:"",l=(s=t.join_ref)!==null&&s!==void 0?s:"",c=t.payload.event,u=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const p=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+c.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+p);
48let g=new DataView(h),m=0;g.setUint8(m++,this.KINDS.userBroadcastPush),g.setUint8(m++,l.length),g.setUint8(m++,a.length),g.setUint8(m++,i.length),g.setUint8(m++,c.length),g.setUint8(m++,d.length),g.setUint8(m++,r),Array.from(l,w=>g.setUint8(m++,w.charCodeAt(0))),Array.from(a,w=>g.setUint8(m++,w.charCodeAt(0))),Array.from(i,w=>g.setUint8(m++,w.charCodeAt(0))),Array.from(c,w=>g.setUint8(m++,w.charCodeAt(0))),Array.from(d,w=>g.setUint8(m++,w.charCodeAt(0)));var b=new Uint8Array(h.byteLength+n.byteLength);return b.set(new Uint8Array(h),0),b.set(new Uint8Array(n),h.byteLength),b.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[o,s,i,a,l]=n;return r({join_ref:o,ref:s,topic:i,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),o=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,o)}}_decodeUserBroadcast(t,r,n){const o=r.getUint8(1),s=r.getUint8(2),i=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(t.slice(l,l+o));l=l+o;const u=n.decode(t.slice(l,l+s));l=l+s;const d=n.decode(t.slice(l,l+i));l=l+i;const p=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,g={type:this.BROADCAST_EVENT,event:u,payload:h};return i>0&&(g.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class dE{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ie;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ie||(Ie={}));const Fy=(e,t,r={})=>{var n;const o=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((s,i)=>(s[i]=kj(i,e,t,o),s),{}):{}},kj=(e,t,r,n)=>{const o=t.find(a=>a.name===e),s=o==null?void 0:o.type,i=r[e];return s&&!n.includes(s)?fE(s,i):pp(i)},fE=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return Aj(t,r)}switch(e){case Ie.bool:return Oj(t);case Ie.float4:case Ie.float8:case Ie.int2:case Ie.int4:case Ie.int8:case Ie.numeric:case Ie.oid:return Rj(t);case Ie.json:case Ie.jsonb:return jj(t);case Ie.timestamp:return Nj(t);case Ie.abstime:case Ie.date:case Ie.daterange:case Ie.int4range:case Ie.int8range:case Ie.money:case Ie.reltime:case Ie.text:case Ie.time:case Ie.timestamptz:case Ie.timetz:case Ie.tsrange:case Ie.tstzrange:return pp(t);default:return pp(t)}},pp=e=>e,Oj=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Rj=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},jj=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},Aj=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let s;const i=e.slice(1,r);try{s=JSON.parse("["+i+"]")}catch{s=i?i.split(","):[]}return s.map(a=>fE(t,a))}return e},Nj=e=>typeof e=="string"?e.replace(" ","T"):e,hE=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class jf{constructor(t,r,n={},o=fp){this.channel=t,this.event=r,this.payload=n,this.timeout=o,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHo
48oks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var mp;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(mp||(mp={}));let pE=class Kc{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},o=>{const{onJoin:s,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Kc.syncState(this.state,o,s,i),this.pendingDiffs.forEach(l=>{this.state=Kc.syncDiff(this.state,l,s,i)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},o=>{const{onJoin:s,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(o):(this.state=Kc.syncDiff(this.state,o,s,i),a())}),this.onJoin((o,s,i)=>{this.channel._trigger("presence",{event:"join",key:o,currentPresences:s,newPresences:i})}),this.onLeave((o,s,i)=>{this.channel._trigger("presence",{event:"leave",key:o,currentPresences:s,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,o){const s=this.cloneDeep(t),i=this.transformState(r),a={},l={};return this.map(s,(c,u)=>{i[c]||(l[c]=u)}),this.map(i,(c,u)=>{const d=s[c];if(d){const p=u.map(b=>b.presence_ref),h=d.map(b=>b.presence_ref),g=u.filter(b=>h.indexOf(b.presence_ref)<0),m=d.filter(b=>p.indexOf(b.presence_ref)<0);g.length>0&&(a[c]=g),m.length>0&&(l[c]=m)}else a[c]=u}),this.syncDiff(s,{joins:a,leaves:l},n,o)}static syncDiff(t,r,n,o){const{joins:s,leaves:i}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),o||(o=()=>{}),this.map(s,(a,l)=>{var c;const u=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),u.length>0){const d=t[a].map(h=>h.presence_ref),p=u.filter(h=>d.indexOf(h.presence_ref)<0);t[a].unshift(...p)}n(a,u,l)}),this.map(i,(a,l)=>{let c=t[a];if(!c)return;const u=l.map(d=>d.presence_ref);c=c.filter(d=>u.indexOf(d.presence_ref)<0),t[a]=c,o(a,c,l),c.length===0&&delete t[a]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const o=t[n];return"metas"in o?r[n]=o.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):r[n]=o,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}};var gp;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(gp||(gp={}));var si;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(si||(si={}));var Mr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Mr||(Mr={}));const Ij=Ye;let mE=class Pa{constructor(t,r={config:{}},n){var o,s;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Ye.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new jf(this,Er.join,this.params,this.timeout),this.rejoinTimer=new dE(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ye.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>
48i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ye.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ye.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ye.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ye.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Er.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new pE(this),this.broadcastEndpointURL=hE(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((s=(o=this.params.config)===null||o===void 0?void 0:o.broadcast)===null||s===void 0)&&s.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,o,s;if(this.socket.isConnected()||this.socket.connect(),this.state==Ye.closed){const{config:{broadcast:i,presence:a,private:l}}=this.params,c=(o=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&o!==void 0?o:[],u=!!this.bindings[si.PRESENCE]&&this.bindings[si.PRESENCE].length>0||((s=this.params.config.presence)===null||s===void 0?void 0:s.enabled)===!0,d={},p={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>t==null?void 0:t(Mr.CHANNEL_ERROR,h)),this._onClose(()=>t==null?void 0:t(Mr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},d)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var g;if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){t==null||t(Mr.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,b=(g=m==null?void 0:m.length)!==null&&g!==void 0?g:0,w=[];for(let y=0;y<b;y++){const _=m[y],{filter:{event:x,schema:E,table:S,filter:C}}=_,P=h&&h[y];if(P&&P.event===x&&Pa.isFilterValueEqual(P.schema,E)&&Pa.isFilterValueEqual(P.table,S)&&Pa.isFilterValueEqual(P.filter,C))w.push(Object.assign(Object.assign({},_),{id:P.id}));else{this.unsubscribe(),this.state=Ye.errored,t==null||t(Mr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=w,t&&t(Mr.SUBSCRIBED);return}}).receive("error",h=>{this.state=Ye.errored,t==null||t(Mr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Mr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===Ye.joined&&t===si.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var o;const s=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(r==null)return Promise.reject("Payload is required for httpSend()");const i={method:"POST",headers:{Authorization:s,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(o=n.timeout)!==null&&o!==void 0?o:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,o;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
48in the future. Please use httpSend() explicitly for REST delivery.");const{event:s,payload:i}=t,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:i,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((o=c.body)===null||o===void 0?void 0:o.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var i,a,l;const c=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),c.receive("ok",()=>s("ok")),c.receive("error",()=>s("error")),c.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Ye.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Er.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(o=>{n=new jf(this,Er.leave,{},t),n.receive("ok",()=>{r(),o("ok")}).receive("timeout",()=>{r(),o("timed out")}).receive("error",()=>{o("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ye.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const o=new AbortController,s=setTimeout(()=>o.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:o.signal}));return clearTimeout(s),i}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let o=new jf(this,t,r,n);return this._canPush()?o.send():this._addToPushBuffer(o),o}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>Cj){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var o,s;const i=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=Er;if(n&&[a,l,c,u].indexOf(i)>=0&&n!==this._joinRef())return;let p=this._onMessage(i,r,n);if(r&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(o=this.bindings.postgres_changes)===null||o===void 0||o.filter(h=>{var g,m,b;return((g=h.filter)===null||g===void 0?void 0:g.event)==="*"||((b=(m=h.filter)===null||m===void 0?void 0:m.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===i}).map(h=>h.callback(p,n)):(s=this.bindings[i])===null||s===void 0||s.filter(h=>{var g,m,b,w,y,_;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in h){const x=h.id,E=(g=h.filter)===null||g===void 0?void 0:g.event;return x&&((m=r.ids)===null||m===void 0?void 0:m.includes(x))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((b=r.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const x=(y=(w=h==null?void 0:h.filter)===null||w===void 0?void 0:w.event)===null||y===void 0?void 0:y.toLocaleLowerCase();return x==="*"||x===((_=r==null?void 0:r.event)===null||_===void 0?void 0:_.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===i}).map(h=>{if(typeof p=="object"&&"ids"in p){const g=p.data,{schema:m,table:b,commit_timestamp:w,type:y,errors:_}=g;p=Object.assign(Object.assign({},{schema:m,table:b,commit_timestamp:w,eventType:y,new:{},old:{},errors:_}),this._getPayloadRecords(g))}h.callback(p,n)})}_isClosed(){return this.state===Ye.closed}_isJoined(){return this.state===Ye.joined}_isJoining(){return this.state===Ye.joining}_isLeaving(){return this.state===Ye.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const o=t.toLocaleLowerCase(),s={type:o,filter:r,callback:n};return this.bindings[o]?this.bindings[o].push(s):this.bindings[o]=[s],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(o=>{var s;return!(((s=o.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===n&&Pa.isEqual(o.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Er.close,{},t)}_onError(t){this._on(Er.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ye.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Fy(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Fy(t.columns,t.old_record)),r}};const Af=()=>{},_c={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Lj=[1e3,2e3,5e3,1e4],Dj=1e4,Mj=`
49  addEventListener("message", (e) => {
50    if (e.data.event === "start") {
51      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
52    }
53  });`;let $j=class{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=fp,this.transport=null,this.heartbeatIntervalMs=_c.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Af,this.ref=0,this.reconnectTimer=null,this.vsn=$y,this.logger=Af,this.conn=null,this.sendBuffer=[],this.serializer
53=new Pj,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=o=>o?(...s)=>o(...s):(...s)=>fetch(...s),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${hp.websocket}`,this.httpEndpoint=hE(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=cE.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r}
54
55To use Realtime in Node.js, you need to provide a WebSocket implementation:
56
57Option 1: Use Node.js 22+ which has native WebSocket support
58Option 2: Install and provide the "ws" package:
59
60  npm install ws
61
62  import ws from "ws"
63  const client = new RealtimeClient(url, {
64    ...options,
65    transport: ws
66  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Fo.connecting:return Uo.Connecting;case Fo.open:return Uo.Open;case Fo.closing:return Uo.Closing;default:return Uo.Closed}}isConnected(){return this.connectionState()===Uo.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,o=this.getChannels().find(s=>s.topic===n);if(o)return o;{const s=new mE(`realtime:${t}`,r,this);return this.channels.push(s),s}}push(t){const{topic:r,event:n,payload:o,ref:s}=t,i=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${s})`,o),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(Tj,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
66heduleTimeout()},_c.HEARTBEAT_TIMEOUT_FALLBACK);return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(c){this.log("error","error in heartbeat callback",c)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:o,payload:s,ref:i}=r,a=i?`(${i})`:"",l=s.status||"";this.log("receive",`${l} ${n} ${o} ${a}`.trim(),s),this.channels.filter(c=>c._isMember(n)).forEach(c=>c._trigger(o,s,i)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){if(this.conn){if(this.conn.readyState===Fo.open||this.conn.readyState===Fo.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
66heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(Er.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",o=new URLSearchParams(r);return`${t}${n}${o}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([Mj],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(o){this.log("error","Error fetching access token from callback",o),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(o=>{const s={access_token:r,version:Ej};r&&o.updateJoinPayload(s),o.joinedOnce&&o._isJoined()&&o._push(Er.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(o){this.log("error",`error in ${t} callback`,o)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new dE(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},_c.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,o,s,i,a,l,c,u,d,p,h;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:fp,this.heartbeatIntervalMs=(o=t==null?void 0:t.heartbeatIntervalMs)!==null&&o!==void 0?o:_c.HEARTBEAT_INTERVAL,this.worker=(s=t==null?void 0:t.worker)!==null&&s!==void 0?s:!1,this.accessToken=(i=t==null?void 0:t.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:Af,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:$y,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=t==null?void 0:t.reconnectAfterMs)!==null&&c!==void 0?c:g=>Lj[g-1]||Dj,this.vsn){case uE:this.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:(g,m)=>m(JSON.stringify(g)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:(g,m)=>m(JSON.parse(g));break;case Sj:this.encode=(p=t==null?void 0:t.encode)!==null&&p!==void 0?p:this.serializer.encode.bind(this.serializer),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}};const Fj=Object.freeze(Object.defineProperty({__proto__:null,REALTIME_CHANNEL_STATES:Ij,get REALTIME_LISTEN_TYPES(){return si},get REALTIME_POSTGRES_CHANGES_LISTEN_EVENT(){return gp},get REALTIME_PRESENCE_LISTEN_EVENTS(){return mp},get REALTIME_SUBSCRIBE_STATES(){return Mr},RealtimeChannel:mE,RealtimeClient:$j,RealtimePresence:pE,WebSocketFactory:cE},Symbol.toStringTag,{value:"Module"})),gE=Pl(Fj);class Nl extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Ue(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class vE extends Nl{constructor(t,r,n){super(t),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}
66class Nu extends Nl{constructor(t,r){super(t),this.name="StorageUnknownError",this.originalError=r}}const ag=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Uj=()=>Response,vp=e=>{if(Array.isArray(e))return e.map(r=>vp(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const o=r.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[o]=vp(n)}),t},Bj=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},zj=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Nf=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},Vj=(e,t,r)=>Y(void 0,void 0,void 0,function*(){const n=yield Uj();e instanceof n&&!(r!=null&&r.noResolveJson)?e.json().then(o=>{const s=e.status||500,i=(o==null?void 0:o.statusCode)||s+"";t(new vE(Nf(o),s,i))}).catch(o=>{t(new Nu(Nf(o),o))}):t(new Nu(Nf(e),e))}),Wj=(e,t,r,n)=>{const o={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?o:(Bj(n)?(o.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),o.body=JSON.stringify(n)):o.body=n,t!=null&&t.duplex&&(o.duplex=t.duplex),Object.assign(Object.assign({},o),r))};function Il(e,t,r,n,o,s){return Y(this,void 0,void 0,function*(){return new Promise((i,a)=>{e(r,Wj(t,n,o,s)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>Vj(l,a,n))})})}function ul(e,t,r,n){return Y(this,void 0,void 0,function*(){return Il(e,"GET",t,r,n)})}function wr(e,t,r,n,o){return Y(this,void 0,void 0,function*(){return Il(e,"POST",t,n,o,r)})}function yp(e,t,r,n,o){return Y(this,void 0,void 0,function*(){return Il(e,"PUT",t,n,o,r)})}function Hj(e,t,r,n){return Y(this,void 0,void 0,function*(){return Il(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function lg(e,t,r,n,o){return Y(this,void 0,void 0,function*(){return Il(e,"DELETE",t,n,o,r)})}class qj{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r}then(t,r){return this.execute().then(t,r)}execute(){return Y(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Ue(t))return{data:null,error:t};throw t}})}}var yE;class Gj{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r,this[yE]="BlobDownloadBuilder",this.promise=null}asStream(){return new qj(this.downloadFn,this.shouldThrowOnError)}then(t,r){return this.getPromise().then(t,r)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return Y(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Ue(t))return{data:null,error:t};throw t}})}}yE=Symbol.toStringTag;const Kj={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Uy={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class Qj{constructor(t,r={},n,o){this.shouldThrowOnError=!1,this.url=t,this.headers=r,this.bucketId=n,this.fetch=ag(o)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,r,n,o){return Y(this,void 0,void 0,function*(){try{let s;const i=Object.assign(Object.assign({},Uy),o);let a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&n instanceof Blob?(s=new FormData,s.append("cacheControl",i.cacheControl),l&&s.append("metadata",this.encodeMetadata(l)),s.append("",n)):typeof FormData<"u"&&n instanceof FormData?(s=n,s.has("cacheControl")||s.append("cacheControl",i.cacheControl),l&&!s.has("metadata")&&s.append("metadata",this.encodeMetadata(l))):(s=n,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l))),(typeof ReadableStream<"u"&&s instanceof ReadableStream||s&&typeof s=="object"&&"pipe"in s&&typeof s.pipe=="function")&&!i.duplex&&(i.duplex="half")),o!=null&&o.headers&&(a=Object.assign(Object.assign({},a),o.headers));const c=this._removeEmptyFolders(r),u=this._getFinalPath(c),d=yield(t=="PUT"?yp:wr)(this.fetch,`${this.url}/object/${u}`,s,Object.assign({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{data:{path:c,id:d.Id,fullPath:d.Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Ue(s))return{data:null,error:s};throw s}})}upload(t,r,n){return Y(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,r,n)})}uploadToSignedUrl(t,r,n,o){return Y(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(t),i=this._getFinalPath(s),a=new URL(this.url+`/object/upload/sign/${i}`);a.searchParams.set("token",r);try{let l;const c=Object.assign({upsert:Uy.upsert},o),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",c.cacheControl)):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType);const d=yield yp(this.fetch,a.toString(),l,{headers:u});return{data:{path:s,fullPath:d.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(Ue(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,r){return Y(this,void 0,void 0,function*(){try{let n=this._getFinalPath(t);const o=Object.assign({},this.headers);r!=null&&r.upsert&&(o["x-upsert"]="true");const s=yield wr(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:o}),i=new URL(this.url+s.url),a=i.searchParams.get("token");if(!a)throw new Nl("No token returned by API");return{data:{signedUrl:i.toString(),path:t,token:a},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}update(t,r,n){return Y(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,r,n)})}move(t,r,n){return Y(this,void 0,void 0,function*(){try{return{data:yield wr(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Ue(o))return{data:null,error:o};throw o}})}copy(t,r,n){return Y(this,void 0,void 0,function*(){try{return{data:{path:(yield wr(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Ue(o))return{data:null,error:o};throw o}})}createSignedUrl(t,r,n){return Y(this,void 0,void 0,function*(){try{let o=this._getFinalPath(t),s=yield wr(this.fetch,`${this.url}/object/sign/${o}
66`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${i}`)},{data:s,error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Ue(o))return{data:null,error:o};throw o}})}createSignedUrls(t,r,n){return Y(this,void 0,void 0,function*(){try{const o=yield wr(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:t},{headers:this.headers}),s=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:o.map(i=>Object.assign(Object.assign({},i),{signedUrl:i.signedURL?encodeURI(`${this.url}${i.signedURL}${s}`):null})),error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Ue(o))return{data:null,error:o};throw o}})}download(t,r){const o=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),i=s?`?${s}`:"",a=this._getFinalPath(t),l=()=>ul(this.fetch,`${this.url}/${o}/${a}${i}`,{headers:this.headers,noResolveJson:!0});return new Gj(l,this.shouldThrowOnError)}info(t){return Y(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{const n=yield ul(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:vp(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}exists(t){return Y(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{return yield Hj(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n)&&n instanceof Nu){const o=n.originalError;if([400,404].includes(o==null?void 0:o.status))return{data:!1,error:n}}throw n}})}getPublicUrl(t,r){const n=this._getFinalPath(t),o=[],s=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";s!==""&&o.push(s);const a=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});l!==""&&o.push(l);let c=o.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${c}`)}}}remove(t){return Y(this,void 0,void 0,function*(){try{return{data:yield lg(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}list(t,r,n){return Y(this,void 0,void 0,function*(){try{const o=Object.assign(Object.assign(Object.assign({},Kj),r),{prefix:t||""});return{data:yield wr(this.fetch,`${this.url}/object/list/${this.bucketId}`,o,{headers:this.headers},n),error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Ue(o))return{data:null,error:o};throw o}})}listV2(t,r){return Y(this,void 0,void 0,function*(){try{const n=Object.assign({},t);return{data:yield wr(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const r=[];return t.width&&r.push(`width=${t.width}`),t.height&&r.push(`height=${t.height}`),t.resize&&r.push(`resize=${t.resize}`),t.format&&r.push(`format=${t.format}`),t.quality&&r.push(`quality=${t.quality}`),r.join("&")}}const wE="2.87.1",bE={"X-Client-Info":`storage-js/${wE}`};class Yj{constructor(t,r={},n,o){this.shouldThrowOnError=!1;const s=new URL(t);o!=null&&o.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase.")),this.url=s.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},bE),r),this.fetch=ag(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(t){return Y(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(t);return{data:yield ul(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}getBucket(t){return Y(this,void 0,void 0,function*(){try{return{data:yield ul(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}createBucket(t){return Y(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield wr(this.fetch,`${this.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Ue(o))return{data:null,error:o};throw o}})}updateBucket(t,r){return Y(this,void 0,void 0,function*(){try{return{data:yield yp(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Ue(n))return{data:null,error:n};throw n}})}emptyBucket(t){return Y(this,void 0,void 0,function*(){try{return{data:yield wr(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Y(this,void 0,void 0,function*(){try{return{data:yield lg(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(t){const r={};return t&&("limit"in t&&(r.limit=String(t.limit)),"offset"in t&&(r.offset=String(t.offset)),t.search&&(r.search=t.search),t.sortColumn&&(r.sortColumn=t.sortColumn),t.sortOrder&&(r.sortOrder=t.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}
66var dl=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Jj(e,t,r){const n=new URL(t,e);if(r)for(const[o,s]of Object.entries(r))s!==void 0&&n.searchParams.set(o,s);return n.toString()}async function Xj(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function Zj(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:o,body:s,headers:i}){const a=Jj(e.baseUrl,n,o),l=await Xj(e.auth),c=await t(a,{method:r,headers:{...s?{"Content-Type":"application/json"}:{},...l,...i},body:s?JSON.stringify(s):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),p=d&&u?JSON.parse(u):u;if(!c.ok){const h=d?p:void 0,g=h==null?void 0:h.error;throw new dl((g==null?void 0:g.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:h})}return{status:c.status,headers:c.headers,data:p}}}}function xc(e){return e.join("�")}var eA=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:xc(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${xc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${xc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${xc(e.namespace)}`}),!0}catch(t){if(t instanceof dl&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof dl&&r.status===409)return;throw r}}};function Rs(e){return e.join("�")}var tA=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Rs(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Rs(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Rs(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Rs(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Rs(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Rs(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof dl&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof dl&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},rA=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=Zj({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new eA(this.client,t),this.tableOps=new tA(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
66async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};class _E{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},bE),r),this.fetch=ag(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Y(this,void 0,void 0,function*(){try{return{data:yield wr(this.fetch,`${this.url}/bucket`,{name:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}listBuckets(t){return Y(this,void 0,void 0,function*(){try{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),o=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield ul(this.fetch,o,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Y(this,void 0,void 0,function*(){try{return{data:yield lg(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Ue(r))return{data:null,error:r};throw r}})}from(t){if(!zj(t))throw new Nl("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new rA({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:()=>Y(this,void 0,void 0,function*(){return this.headers})},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const a=s[i];return typeof a!="function"?a:(...l)=>Y(this,void 0,void 0,function*(){try{return{data:yield a.apply(s,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}})}})}}const cg={"X-Client-Info":`storage-js/${wE}`,"Content-Type":"application/json"};class ug extends Error{constructor(t){super(t),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function Lt(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}class Qc extends ug{constructor(t,r,n){super(t),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class xE extends ug{constructor(t,r){super(t),this.name="StorageVectorsUnknownError",this.originalError=r}}var wp;(function(e){e.InternalError="InternalError",e.S3VectorConflictException="S3VectorConflictException",e.S3VectorNotFoundException="S3VectorNotFoundException",e.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",e.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",e.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(wp||(wp={}));const _d=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),nA=()=>Response,EE=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},oA=e=>Array.from(new Float32Array(e)),sA=(e,t)=>{if(t!==void 0&&e.float32.length!==t)throw new Error(`Vector dimension mismatch: expected ${t}, got ${e.float32.length}`)},By=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),iA=(e,t,r)=>Y(void 0,void 0,void 0,function*(){if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const o=e.status||500,s=e;if(typeof s.json=="function")s.json().then(i=>{const a=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||o+"";t(new Qc(By(i),o,a))}).catch(()=>{const i=o+"",a=s.statusText||`HTTP ${o} error`;t(new Qc(a,o,i))});else{const i=o+"",a=s.statusText||`HTTP ${o} error`;t(new Qc(a,o,i))}}else t(new xE(By(e),e))}),aA=(e,t,r,n)=>{const o={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(EE(n)?(o.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),o.body=JSON.stringify(n)):o.body=n,Object.assign(Object.assign({},o),r)):o};function lA(e,t,r,n,o,s){return Y(this,void 0,void 0,function*(){return new Promise((i,a)=>{e(r,aA(t,n,o,s)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const c=l.headers.get("content-type");return!c||!c.includes("application/json")?{}:l.json()}).then(l=>i(l)).catch(l=>iA(l,a,n))})})}function Ht(e,t,r,n,o){return Y(this,void 0,void 0,function*(){return lA(e,"POST",t,n,o,r)})}class SE{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},cg),r),this.fetch=_d(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(t){return Y(this,void 0,void 0,function*(){try{return{data:(yield Ht(this.fetch,`${this.url}/CreateIndex`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}getIndex(t,r){return Y(this,void 0,void 0,function*(){try{return{data:yield Ht(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Lt(n))return{data:null,error:n};throw n}})}listIndexes(t){return Y(this,void 0,void 0,function*(){try{return{data:yield Ht(this.fetch,`${this.url}/ListIndexes`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}deleteIndex(t,r){return Y(this,void 0,void 0,function*(){try{return{data:(yield Ht(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Lt(n))return{data:null,error:n};throw n}})}}class TE{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},cg),r),this.fetch=_d(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(t){return Y(this,void 0,void 0,function*(){try{if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield Ht(this.fetch,`${this.url}/PutVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}getVectors(t){return Y(this,void 0,void 0,function*(){try{return{data:yield Ht(this.fetch,`${this.url}/GetVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}listVectors(t){return Y(this,void 0,void 0,function*(){try{if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
66if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return{data:yield Ht(this.fetch,`${this.url}/ListVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}queryVectors(t){return Y(this,void 0,void 0,function*(){try{return{data:yield Ht(this.fetch,`${this.url}/QueryVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}deleteVectors(t){return Y(this,void 0,void 0,function*(){try{if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield Ht(this.fetch,`${this.url}/DeleteVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}}class CE{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},cg),r),this.fetch=_d(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return Y(this,void 0,void 0,function*(){try{return{data:(yield Ht(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}getBucket(t){return Y(this,void 0,void 0,function*(){try{return{data:yield Ht(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}listBuckets(){return Y(this,arguments,void 0,function*(t={}){try{return{data:yield Ht(this.fetch,`${this.url}/ListVectorBuckets`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}deleteBucket(t){return Y(this,void 0,void 0,function*(){try{return{data:(yield Ht(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Lt(r))return{data:null,error:r};throw r}})}}class PE extends CE{constructor(t,r={}){super(t,r.headers||{},r.fetch)}from(t){return new kE(this.url,this.headers,t,this.fetch)}createBucket(t){const r=Object.create(null,{createBucket:{get:()=>super.createBucket}});return Y(this,void 0,void 0,function*(){return r.createBucket.call(this,t)})}getBucket(t){const r=Object.create(null,{getBucket:{get:()=>super.getBucket}});return Y(this,void 0,void 0,function*(){return r.getBucket.call(this,t)})}listBuckets(){const t=Object.create(null,{listBuckets:{get:()=>super.listBuckets}});return Y(this,arguments,void 0,function*(r={}){return t.listBuckets.call(this,r)})}deleteBucket(t){const r=Object.create(null,{deleteBucket:{get:()=>super.deleteBucket}});return Y(this,void 0,void 0,function*(){return r.deleteBucket.call(this,t)})}}class kE extends SE{constructor(t,r,n,o){super(t,r,o),this.vectorBucketName=n}createIndex(t){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return Y(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const t=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return Y(this,arguments,void 0,function*(r={}){return t.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(t){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return Y(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,t)})}deleteIndex(t){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return Y(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,t)})}index(t){return new OE(this.url,this.headers,this.vectorBucketName,t,this.fetch)}}class OE extends TE{constructor(t,r,n,o,s){super(t,r,s),this.vectorBucketName=n,this.indexName=o}putVectors(t){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return Y(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(t){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return Y(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const t=Object.create(null,{listVectors:{get:()=>super.listVectors}});return Y(this,arguments,void 0,function*(r={}){return t.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(t){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return Y(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(t){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return Y(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class cA extends Yj{constructor(t,r={},n,o){super(t,r,n,o)}from(t){return new Qj(this.url,this.headers,t,this.fetch)}get vectors(){return new PE(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new _E(this.url+"/iceberg",this.headers,this.fetch)}}const uA=Object.freeze(Object.defineProperty({__proto__:null,StorageAnalyticsClient:_E,StorageApiError:vE,StorageClient:cA,StorageError:Nl,StorageUnknownError:Nu,StorageVectorsApiError:Qc,StorageVectorsClient:PE,StorageVectorsError:ug,get StorageVectorsErrorCode(){return wp}
66,StorageVectorsUnknownError:xE,VectorBucketApi:CE,VectorBucketScope:kE,VectorDataApi:TE,VectorIndexApi:SE,VectorIndexScope:OE,isPlainObject:EE,isStorageError:Ue,isStorageVectorsError:Lt,normalizeToFloat32:oA,resolveFetch:_d,resolveResponse:nA,validateVectorDimension:sA},Symbol.toStringTag,{value:"Module"})),dA=Pl(uA);var RE={},xd={};Object.defineProperty(xd,"__esModule",{value:!0});xd.version=void 0;xd.version="2.87.1";(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_REALTIME_OPTIONS=e.DEFAULT_AUTH_OPTIONS=e.DEFAULT_DB_OPTIONS=e.DEFAULT_GLOBAL_OPTIONS=e.DEFAULT_HEADERS=void 0;const t=xd;let r="";typeof Deno<"u"?r="deno":typeof document<"u"?r="web":typeof navigator<"u"&&navigator.product==="ReactNative"?r="react-native":r="node",e.DEFAULT_HEADERS={"X-Client-Info":`supabase-js-${r}/${t.version}`},e.DEFAULT_GLOBAL_OPTIONS={headers:e.DEFAULT_HEADERS},e.DEFAULT_DB_OPTIONS={schema:"public"},e.DEFAULT_AUTH_OPTIONS={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},e.DEFAULT_REALTIME_OPTIONS={}})(RE);var jE={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fetchWithAuth=e.resolveHeadersConstructor=e.resolveFetch=void 0;const t=o=>o?(...s)=>o(...s):(...s)=>fetch(...s);e.resolveFetch=t;const r=()=>Headers;e.resolveHeadersConstructor=r;const n=(o,s,i)=>{const a=(0,e.resolveFetch)(i),l=(0,e.resolveHeadersConstructor)();return async(c,u)=>{var d;const p=(d=await s())!==null&&d!==void 0?d:o;let h=new l(u==null?void 0:u.headers);return h.has("apikey")||h.set("apikey",o),h.has("Authorization")||h.set("Authorization",`Bearer ${p}`),a(c,Object.assign(Object.assign({},u),{headers:h}))}};e.fetchWithAuth=n})(jE);var So={};Object.defineProperty(So,"__esModule",{value:!0});So.isBrowser=void 0;So.uuid=fA;So.ensureTrailingSlash=AE;So.applySettingDefaults=pA;So.validateSupabaseUrl=mA;function fA(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,r=e=="x"?t:t&3|8;return r.toString(16)})}function AE(e){return e.endsWith("/")?e:e+"/"}const hA=()=>typeof window<"u";So.isBrowser=hA;function pA(e,t){var r,n;const{db:o,auth:s,realtime:i,global:a}=e,{db:l,auth:c,realtime:u,global:d}=t,p={db:Object.assign(Object.assign({},l),o),auth:Object.assign(Object.assign({},c),s),realtime:Object.assign(Object.assign({},u),i),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?p.accessToken=e.accessToken:delete p.accessToken,p}function mA(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(AE(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Ed={};const NE="2.87.1",$s=30*1e3,bp=3,If=bp*$s,gA="http://localhost:9999",vA="supabase.auth.token",yA={"X-Client-Info":`gotrue-js/${NE}`},_p="X-Supabase-Api-Version",IE={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},wA=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,bA=10*60*1e3;let ji=class extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}};function ee(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}let LE=class extends ji{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}};function DE(e){return ee(e)&&e.name==="AuthApiError"}let Bn=class extends ji{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}},Sn=class extends ji{constructor(t,r,n,o){super(t,n,o),this.name=r,this.status=n}},Rt=class extends Sn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}};function ME(e){return ee(e)&&e.name==="AuthSessionMissingError"}let Do=class extends Sn{constructor(){super("Auth session or user missing","AuthInvalidToken
66ResponseError",500,void 0)}},ka=class extends Sn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}},Oa=class extends Sn{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};function $E(e){return ee(e)&&e.name==="AuthImplicitGrantRedirectError"}let xp=class extends Sn{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}},Iu=class extends Sn{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}};function Yc(e){return ee(e)&&e.name==="AuthRetryableFetchError"}let Ep=class extends Sn{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}};function _A(e){return ee(e)&&e.name==="AuthWeakPasswordError"}let Lu=class extends Sn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}};const Du="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),zy=` 	
67\r=`.split(""),xA=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<zy.length;t+=1)e[zy[t].charCodeAt(0)]=-2;for(let t=0;t<Du.length;t+=1)e[Du[t].charCodeAt(0)]=t;return e})();function Vy(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Du[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Du[n]),t.queuedBits-=6}}function FE(e,t,r){const n=xA[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Wy(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},o={queue:0,queuedBits:0},s=i=>{TA(i,n,r)};for(let i=0;i<e.length;i+=1)FE(e.charCodeAt(i),o,s);return t.join("")}function EA(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function SA(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const o=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|o)+65536,r+=1}EA(n,t)}}function TA(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function ii(e){const t=[],r={queue:0,queuedBits:0},n=o=>{t.push(o)};for(let o=0;o<e.length;o+=1)FE(e.charCodeAt(o),r,n);return new Uint8Array(t)}function CA(e){const t=[];return SA(e,r=>t.push(r)),new Uint8Array(t)}function Ho(e){const t=[],r={queue:0,queuedBits:0},n=o=>{t.push(o)};return e.forEach(o=>Vy(o,r,n)),Vy(null,r,n),t.join("")}function PA(e){return Math.round(Date.now()/1e3)+e}function kA(){return Symbol("auth-callback")}const it=()=>typeof window<"u"&&typeof document<"u",jo={tested:!1,writable:!1},UE=()=>{if(!it())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(jo.tested)return jo.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),jo.tested=!0,jo.writable=!0}catch{jo.tested=!0,jo.writable=!1}return jo.writable};function OA(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((o,s)=>{t[s]=o})}catch{}return r.searchParams.forEach((n,o)=>{t[o]=n}),t}const BE=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),RA=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Fs=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Ao=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},st=async(e,t)=>{await e.removeItem(t)};class Sd{constructor(){this.promise=new Sd.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Sd.promiseConstructor=Promise;function Lf(e){const t=e.split(".");if(t.length!==3)throw new Lu("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!wA.test(t[n]))throw new Lu("JWT not in base64url format");return{header:JSON.parse(Wy(t[0])),payload:JSON.parse(Wy(t[1])),signature:ii(t[2]),raw:{header:t[0],payload:t[1]}}}async function jA(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function AA(e,t){return new Promise((n,o)=>{(async()=>{for(let s=0;s<1/0;s++)try{const i=await e(s);if(!t(s,null,i)){n(i);return}}catch(i){if(!t(s,i)){o(i);return}}})()})}function NA(e){return("0"+e.toString(16)).substr(-2)}function IA(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let o="";for(let s=0;s<56;s++)o+=r.charAt(Math.floor(Math.random()*n));return o}return crypto.getRandomValues(t),Array.from(t,NA).join("")}async function LA(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),o=new Uint8Array(n);return Array.from(o).map(s=>String.fromCharCode(s)).join("")}async function DA(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code 
67challenge method will default to use plain instead of sha256."),e;const r=await LA(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function js(e,t,r=!1){const n=IA();let o=n;r&&(o+="/PASSWORD_RECOVERY"),await Fs(e,`${t}-code-verifier`,o);const s=await DA(n);return[s,n===s?"plain":"s256"]}const MA=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function $A(e){const t=e.headers.get(_p);if(!t||!t.match(MA))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function FA(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function UA(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const BA=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function As(e){if(!BA.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Df(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function zA(e,t){return new Proxy(e,{get:(r,n,o)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const s=n.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)"||s==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,o)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,o)}})}function Hy(e){return JSON.parse(JSON.stringify(e))}const Mo=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),VA=[502,503,504];async function qy(e){var t;if(!RA(e))throw new Iu(Mo(e),0);if(VA.includes(e.status))throw new Iu(Mo(e),e.status);let r;try{r=await e.json()}catch(s){throw new Bn(Mo(s),s)}let n;const o=$A(e);if(o&&o.getTime()>=IE["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new Ep(Mo(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new Rt}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((s,i)=>s&&typeof i=="string",!0))throw new Ep(Mo(r),e.status,r.weak_password.reasons);throw new LE(Mo(r),e.status||500,n)}const WA=(e,t,r,n)=>{const o={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?o:(o.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),o.body=JSON.stringify(n),Object.assign(Object.assign({},o),r))};async function se(e,t,r,n){var o;const s=Object.assign({},n==null?void 0:n.headers);s[_p]||(s[_p]=IE["2024-01-01"].name),n!=null&&n.jwt&&(s.Authorization=`Bearer ${n.jwt}`);const i=(o=n==null?void 0:n.query)!==null&&o!==void 0?o:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await HA(e,t,r+a,{headers:s,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function HA(e,t,r,n,o,s){const i=WA(t,n,o,s);let a;try{a=await e(r,Object.assign({},i))}catch(l){throw console.error(l),new Iu(Mo(l),0)}if(a.ok||await qy(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await qy(l)}}function gr(e){var t;let r=null;KA(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=PA(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Gy(e){const t=gr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function zn(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function qA(e){return{data:e,error:null}}function GA(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:o,verification_type:s}=e,i=Eo(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:r,hashed_token:n,redirect_to:o,verification_type:s},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function Ky(e){return e}function KA(e){return e.access_token&&e.refresh_token&&e.expires_in}const Jc=["global","local","others"];let dg=class{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=BE(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}
67async signOut(t,r=Jc[0]){if(Jc.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Jc.join(", ")}`);try{return await se(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ee(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await se(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:zn})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Eo(t,["options"]),o=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(o.new_email=n==null?void 0:n.newEmail,delete o.newEmail),await se(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:o,headers:this.headers,xform:GA,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(ee(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await se(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:zn})}catch(r){if(ee(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,o,s,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await se(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(s=(o=t==null?void 0:t.perPage)===null||o===void 0?void 0:o.toString())!==null&&s!==void 0?s:""},xform:Ky});if(u.error)throw u.error;const d=await u.json(),p=(i=u.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(g.split(";")[1].split("=")[1]);c[`${b}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(ee(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){As(t);try{return await se(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:zn})}catch(r){if(ee(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){As(t);try{return await se(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:zn})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){As(t);try{return await se(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:zn})}catch(n){if(ee(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){As(t.userId);try{const{data:r,error:n}=await se(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:o=>({data:{factors:o},error:null})});return{data:r,error:n}}catch(r){if(ee(r))return{data:null,error:r};throw r}}async _deleteFactor(t){As(t.userId),As(t.id);try{return{data:await se(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(ee(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,o,s,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await se(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(s=(o=t==null?void 0:t.perPage)===null||o===void 0?void 0:o.toString())!==null&&s!==void 0?s:""},xform:Ky});if(u.error)throw u.error;const d=await u.json(),p=(i=u.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(g.split(";")[1].split("=")[1]);c[`${b}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(ee(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(t){try{return await se(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ee(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await se(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ee(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await se(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ee(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await se(this.fetch,"DELET
67E",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ee(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await se(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ee(r))return{data:null,error:r};throw r}}};function Qy(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const $o={debug:!!(globalThis&&UE()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class fg extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}let zE=class extends fg{};class QA extends fg{}async function VE(e,t,r){$o.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),$o.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async o=>{if(o){$o.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,o.name);try{return await r()}finally{$o.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,o.name)}}else{if(t===0)throw $o.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new zE(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if($o.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null,"  "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}const Yy={};async function YA(e,t,r){var n;const o=(n=Yy[e])!==null&&n!==void 0?n:Promise.resolve(),s=Promise.race([o.catch(()=>null),t>=0?new Promise((i,a)=>{setTimeout(()=>{a(new QA(`Acquring process lock with name "${e}" timed out`))},t)}):null].filter(i=>i)).catch(i=>{if(i&&i.isAcquireTimeout)throw i;return null}).then(async()=>await r());return Yy[e]=s.catch(async i=>{if(i&&i.isAcquireTimeout)return await o,null;throw i}),await s}function JA(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function WE(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function XA(e){return parseInt(e,16)}function ZA(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function eN(e){var t;const{chainId:r,domain:n,expirationTime:o,issuedAt:s=new Date,nonce:i,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:p}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
68`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=WE(e.address),g=u?`${u}://${n}`:n,m=e.statement?`${e.statement}
69`:"",b=`${g} wants you to sign in with your Ethereum account:
70${h}
71
72${m}`;let w=`URI: ${d}
73Version: ${p}
74Chain ID: ${r}${i?`
75Nonce: ${i}`:""}
76Issued At: ${s.toISOString()}`;
76if(o&&(w+=`
77Expiration Time: ${o.toISOString()}`),a&&(w+=`
78Not Before: ${a.toISOString()}`),l&&(w+=`
79Request ID: ${l}`),c){let y=`
80Resources:`;for(const _ of c){if(!_||typeof _!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${_}`);y+=`
81- ${_}`}w+=y}return`${b}
82${w}`}class Je extends Error{constructor({message:t,code:r,cause:n,name:o}){var s;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(s=o??(n instanceof Error?n.name:void 0))!==null&&s!==void 0?s:"Unknown Error",this.code=r}}class Mu extends Je{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function tN({error:e,options:t}){var r,n,o;const{publicKey:s}=t;if(!s)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Je({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=s.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Je({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=s.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Je({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((o=s.authenticatorSelection)===null||o===void 0?void 0:o.userVerification)==="required")return new Je({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Je({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Je({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return s.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Je({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Je({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(HE(i)){if(s.rp.id!==i)return new Je({message:`The RP ID "${s.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Je({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(s.user.id.byteLength<1||s.user.id.byteLength>64)return new Je({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Je({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Je({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function rN({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Je({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Je({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(HE(n)){if(r.rpId!==n)return new Je({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Je({message:`${window.location.hostname}
82 is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Je({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Je({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class nN{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const oN=new nN;function sN(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,o=Eo(e,["challenge","user","excludeCredentials"]),s=ii(t).buffer,i=Object.assign(Object.assign({},r),{id:ii(r.id).buffer}),a=Object.assign(Object.assign({},o),{challenge:s,user:i});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:ii(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function iN(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Eo(e,["challenge","allowCredentials"]),o=ii(t).buffer,s=Object.assign(Object.assign({},n),{challenge:o});if(r&&r.length>0){s.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const a=r[i];s.allowCredentials[i]=Object.assign(Object.assign({},a),{id:ii(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return s}function aN(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Ho(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ho(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function lN(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),o=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ho(new Uint8Array(o.authenticatorData)),clientDataJSON:Ho(new Uint8Array(o.clientDataJSON)),signature:Ho(new Uint8Array(o.signature)),userHandle:o.userHandle?Ho(new Uint8Array(o.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function HE(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Jy(){var e,t;return!!(it()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function cN(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Mu("Browser returned unexpected credential type",t)}:{data:null,error:new Mu("Empty credential response",t)}}catch(t){return{data:null,error:tN({error:t,options:e})}}}async function uN(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Mu("Browser returned unexpected credential type",t)}:{data:null,error:new Mu("Empty credential response",t)}}
82catch(t){return{data:null,error:rN({error:t,options:e})}}}const dN={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},fN={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function $u(...e){const t=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),r=o=>o instanceof ArrayBuffer||ArrayBuffer.isView(o),n={};for(const o of e)if(o)for(const s in o){const i=o[s];if(i!==void 0)if(Array.isArray(i))n[s]=i;else if(r(i))n[s]=i;else if(t(i)){const a=n[s];t(a)?n[s]=$u(a,i):n[s]=$u(i)}else n[s]=i}return n}function hN(e,t){return $u(dN,e,t||{})}function pN(e,t){return $u(fN,e,t||{})}class mN{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:o},s){try{const{data:i,error:a}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!i)return{data:null,error:a};const l=o??oN.createNewAbortSignal();if(i.webauthn.type==="create"){const{user:c}=i.webauthn.credential_options.publicKey;c.name||(c.name=`${c.id}:${n}`),c.displayName||(c.displayName=c.name)}switch(i.webauthn.type){case"create":{const c=hN(i.webauthn.credential_options.publicKey,s==null?void 0:s.create),{data:u,error:d}=await cN({publicKey:c,signal:l});return u?{data:{factorId:t,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:u}},error:null}:{data:null,error:d}}case"request":{const c=pN(i.webauthn.credential_options.publicKey,s==null?void 0:s.request),{data:u,error:d}=await uN(Object.assign(Object.assign({},i.webauthn.credential_options),{publicKey:c,signal:l}));return u?{data:{factorId:t,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:u}},error:null}:{data:null,error:d}}}}catch(i){return ee(i)?{data:null,error:i}:{data:null,error:new Bn("Unexpected error in challenge",i)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},s){if(!r)return{data:null,error:new ji("rpId is required for WebAuthn authentication")};try{if(!Jy())return{data:null,error:new Bn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:o},{request:s});if(!i)return{data:null,error:a};const{webauthn:l}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(i){return ee(i)?{data:null,error:i}:{data:null,error:new Bn("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:o}={}},s){if(!r)return{data:null,error:new ji("rpId is required for WebAuthn registration")};try{if(!Jy())return{data:null,error:new Bn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===t&&p.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:o},{create:s});return l?this._verify({factorId:i.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(i){return ee(i)?{data:null,error:i}:{data:null,error:new Bn("Unexpected error in register",i)}}}}JA();const gN={url:gA,storageKey:vA,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:yA,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function Xy(e,t,r){return await r()}const Ns={};let hg=class Sp{get jwks(){var t,r;return(r=(t=Ns[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Ns[this.storageKey]=Object.assign(Object.assign({},Ns[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Ns[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ns[this.storageKey]=Object.assign(Object.assign({},Ns[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,o;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const s=Object.assign(Object.assign({},gN),t);if(this.storageKey=s.storageKey,this.instanceID=(r=Sp.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Sp.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&it()){const i=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=s.persistSession,this.autoRefreshToken=s.autoRefreshToken,this.admin=new dg({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=BE(s.fetch),this.lock=s.lock||Xy,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,this.throwOnError=s.throwOnError,s.lock?this.lock=s.lock:this.persistSession&&it()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=VE:this.lock=Xy,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new mN(this)}
82,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:UE()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Qy(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=Qy(this.memoryStorage)),it()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(o=this.broadcastChannel)===null||o===void 0||o.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${NE}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(it()&&(r=OA(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),it()&&this.detectSessionInUrl&&n!=="none"){const{data:o,error:s}=await this._getSessionFromURL(r,n);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),$E(s)){const l=(t=s.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:s}}return await this._removeSession(),{error:s}}const{session:i,redirectType:a}=o;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return ee(r)?this._returnResult({error:r}):this._returnResult({error:new Bn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,o;try{const s=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(o=t==null?void 0:t.options)===null||o===void 0?void 0:o.captchaToken}},xform:gr}),{data:i,error:a}=s;
82if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(ee(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signUp(t){var r,n,o;try{let s;if("email"in t){const{email:u,password:d,options:p}=t;let h=null,g=null;this.flowType==="pkce"&&([h,g]=await js(this.storage,this.storageKey)),s=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:u,password:d,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:h,code_challenge_method:g},xform:gr})}else if("phone"in t){const{phone:u,password:d,options:p}=t;s=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(o=p==null?void 0:p.channel)!==null&&o!==void 0?o:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:gr})}else throw new ka("You must provide either an email or phone number and a password");const{data:i,error:a}=s;
82if(a||!i)return await st(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(await st(this.storage,`${this.storageKey}-code-verifier`),ee(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithPassword(t){try{let r;if("email"in t){const{email:s,password:i,options:a}=t;r=await se(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Gy})}else if("phone"in t){const{phone:s,password:i,options:a}=t;r=await se(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Gy})}else throw new ka("You must provide either an email or phone number and a password");const{data:n,error:o}=r;if(o)return this._returnResult({data:{user:null,session:null},error:o});if(!n||!n.session||!n.user){const s=new Do;return this._returnResult({data:{user:null,session:null},error:s})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:o})}catch(r){if(ee(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,o,s;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(o=t.options)===null||o===void 0?void 0:o.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,o,s,i,a,l,c,u,d,p;let h,g;if("message"in t)h=t.message,g=t.signature;else{const{chain:m,wallet:b,statement:w,options:y}=t;let _;if(it())if(typeof b=="object")_=b;else{const I=window;if("ethereum"in I&&typeof I.ethereum=="object"&&"request"in I.ethereum&&typeof I.ethereum.request=="function")_=I.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=b}const x=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href),E=await _.request({method:"eth_requestAccounts"}).then(I=>I).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const S=WE(E[0]);let C=(n=y==null?void 0:y.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const I=await _.request({method:"eth_chainId"});C=XA(I)}const P={domain:x.host,address:S,statement:w,uri:x.href,version:"1",chainId:C,nonce:(o=y==null?void 0:y.signInWithEthereum)===null||o===void 0?void 0:o.nonce,issuedAt:(i=(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=y==null?void 0:y.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.resources};
82h=eN(P),g=await _.request({method:"personal_sign",params:[ZA(h),S]})}try{const{data:m,error:b}=await se(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:g},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:gr});if(b)throw b;if(!m||!m.session||!m.user){const w=new Do;return this._returnResult({data:{user:null,session:null},error:w})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:b})}catch(m){if(ee(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,o,s,i,a,l,c,u,d,p,h;let g,m;if("message"in t)g=t.message,m=t.signature;else{const{chain:b,wallet:w,statement:y,options:_}=t;let x;if(it())if(typeof w=="object")x=w;else{const S=window;if("solana"in S&&typeof S.solana=="object"&&("signIn"in S.solana&&typeof S.solana.signIn=="function"||"signMessage"in S.solana&&typeof S.solana.signMessage=="function"))x=S.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(_!=null&&_.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=w}const E=new URL((r=_==null?void 0:_.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in x&&x.signIn){const S=await x.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},_==null?void 0:_.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),y?{statement:y}:null));let C;if(Array.isArray(S)&&S[0]&&typeof S[0]=="object")C=S[0];else if(S&&typeof S=="object"&&"signedMessage"in S&&"signature"in S)C=S;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)g=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),m=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in x)||typeof x.signMessage!="function"||!("publicKey"in x)||typeof x!="object"||!x.publicKey||!("toBase58"in x.publicKey)||typeof x.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${E.host} wants you to sign in with your Solana account:`,x.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(o=(n=_==null?void 0:_.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&o!==void 0?o:new Date().toISOString()}`,...!((s=_==null?void 0:_.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${_.signInWithSolana.notBefore}`]:[],...!((i=_==null?void 0:_.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${_.signInWithSolana.expirationTime}`]:[],...!((a=_==null?void 0:_.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${_.signInWithSolana.chainId}`]:[],...!((l=_==null?void 0:_.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${_.signInWithSolana.nonce}`]:[],...!((c=_==null?void 0:_.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${_.signInWithSolana.requestId}`]:[],...!((d=(u=_==null?void 0:_.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",..._.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
83`);const S=await x.signMessage(new TextEncoder().encode(g),"utf8");if(!S||!(S instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=S}}try{const{data:b,error:w}=await se(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:Ho(m)},!((p=t.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:gr});if(w)throw w;if(!b||!b.session||!b.user){const y=new Do;return this._returnResult({data:{user:null,session:null},error:y})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:w})}catch(b){if(ee(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const r=await Ao(this.storage,`${this.storageKey}-code-verifier`),[n,o]=(r??"").split("/");try{const{data:s,error:i}=await se(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:gr});if(await st(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!s||!s.session||!s.user){const a=new Do;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:Object.assign(Object.assign({},s),{redirectType:o??null}),error:i})}catch(s){if(await st(this.storage,`${this.storageKey}-code-verifier`),ee(s))return this._returnResult({data:{user:null,session:null,redirectType:null},error:s});throw s}}async signInWithIdToken(t){try{const{options:r,provider:n,token:o,access_token:s,nonce:i}=t,a=await se(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:o,access_token:s,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:gr}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new Do;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(ee(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,o,s,i;try{if("email"in t){const{email:a,options:l}=t;
83let c=null,u=null;this.flowType==="pkce"&&([c,u]=await js(this.storage,this.storageKey));const{error:d}=await se(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await se(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(o=l==null?void 0:l.data)!==null&&o!==void 0?o:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new ka("You must provide either an email or phone number.")}catch(a){if(await st(this.storage,`${this.storageKey}-code-verifier`),ee(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let o,s;"options"in t&&(o=(r=t.options)===null||r===void 0?void 0:r.redirectTo,s=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:a}=await se(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:o,xform:gr});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,c=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(ee(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithSSO(t){var r,n,o,s,i;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await js(this.storage,this.storageKey));const c=await se(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((o=t==null?void 0:t.options)===null||o===void 0)&&o.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:qA});return!((s=c.data)===null||s===void 0)&&s.url&&it()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await st(this.storage,`${this.storageKey}-code-verifier`),ee(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new Rt;const{error:o}=await se(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:o})})}catch(t){if(ee(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:o,options:s}=t,{error:i}=await se(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:n,type:o,options:s}=t,{data:i,error:a}=await se(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:o,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a})}throw new ka("You must provide either an email or phone number and a type")}catch(r){if(ee(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),o=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await o}catch{}})()),o}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const o=[...this.pendingInLock];await Promise.all(o),this.pendingInLock.splice(0,o.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Ao(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
83id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<If:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await Ao(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=Df()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=zA(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:o,error:s}=await this._callRefreshToken(t.refresh_token);return s?this._returnResult({data:{session:null},error:s}):this._returnResult({data:{session:o},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(-1,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await se(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:zn}):await this._useSession(async r=>{var n,o,s;const{data:i,error:a}=r;if(a)throw a;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Rt}:await se(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(o=i.session)===null||o===void 0?void 0:o.access_token)!==null&&s!==void 0?s:void 0,xform:zn})})}catch(r){if(ee(r))return ME(r)&&(await this._removeSession(),await st(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:o,error:s}=n;if(s)throw s;if(!o.session)throw new Rt;const i=o.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await js(this.storage,this.storageKey));const{data:c,error:u}=await se(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:zn});if(u)throw u;return i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(await st(this.storage,`${this.storageKey}-code-verifier`),ee(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Rt;const r=Date.now()/1e3;let n=r,o=!0,s=null;const{payload:i}=Lf(t.access_token);if(i.exp&&(n=i.exp,o=n<=r),o){const{data:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};s=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;s={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return this._returnResult({data:{user:s.user,session:s},error:null})}catch(r){if(ee(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:i,error:a}=r;if(a)throw a;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new Rt;const{data:o,error:s}=await this._callRefreshToken(t.refresh_token);return s?this._returnResult({data:{user:null,session:null},error:s}):o?this._returnResult({data:{user:o.user,session:o},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(ee(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!it())throw new Oa("No browser detected.");
83if(t.error||t.error_description||t.error_code)throw new Oa(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new xp("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Oa("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new xp("No code detected.");const{data:y,error:_}=await this._exchangeCodeForSession(t.code);if(_)throw _;const x=new URL(window.location.href);return x.searchParams.delete("code"),window.history.replaceState(window.history.state,"",x.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:o,access_token:s,refresh_token:i,expires_in:a,expires_at:l,token_type:c}=t;if(!s||!a||!i||!c)throw new Oa("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let p=u+d;l&&(p=parseInt(l));const h=p-u;h*1e3<=$s&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const g=p-d;u-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,p,u):u-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,p,u);const{data:m,error:b}=await this._getUser(s);if(b)throw b;const w={provider_token:n,provider_refresh_token:o,access_token:s,expires_in:d,expires_at:p,refresh_token:i,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:w,redirectType:t.type},error:null})}catch(n){if(ee(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Ao(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:o,error:s}=r;if(s)return this._returnResult({error:s});const i=(n=o.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:a}=await this.admin.signOut(i,t);if(a&&!(DE(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await st(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=kA(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,o;try{const{data:{session:s},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((o=this.stateChangeEmitters.get(t))===null||o===void 0?void 0:o.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),console.error(s)}})}async resetPasswordForEmail(t,r={}){let n=null,o=null;this.flowType==="pkce"&&([n,o]=await js(this.storage,this.storageKey,!0));try{return await se(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:o,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(s){if(await st(this.storage,`${this.storageKey}-code-verifier`),ee(s))return this._returnResult({data:null,error:s});throw s}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(ee(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:o}=await this._useSession(async s=>{var i,a,l,c,u;const{data:d,error:p}=s;if(p)throw p;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await se(this.fetch,"GET",h,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(o)throw o;return it()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(ee(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:o,data:{session:s}}=r;if(o)throw o;const{options:i,provider:a,token:l,access_token:c,nonce:u}=t,d=await se(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=s==null?void 0:s.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:gr}),{data:p,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new Do}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:h}))}catch(o){if(await st(this.storage,`${this.storageKey}-code-verifier`),ee(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,o;const{data:s,error:i}=r;if(i)throw i;
83return await se(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(o=(n=s.session)===null||n===void 0?void 0:n.access_token)!==null&&o!==void 0?o:void 0})})}catch(r){if(ee(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await AA(async o=>(o>0&&await jA(200*Math.pow(2,o-1)),this._debug(r,"refreshing attempt",o),await se(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:gr})),(o,s)=>{const i=200*Math.pow(2,o);return s&&Yc(s)&&Date.now()+i-n<$s})}catch(n){if(this._debug(r,"error",n),ee(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),it()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const o=await Ao(this.storage,this.storageKey);if(o&&this.userStorage){let i=await Ao(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:o.user},await Fs(this.userStorage,this.storageKey+"-user",i)),o.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:Df()}else if(o&&!o.user&&!o.user){const i=await Ao(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(o.user=i.user,await st(this.storage,this.storageKey+"-user"),await Fs(this.storage,this.storageKey,o)):o.user=Df()}if(this._debug(n,"session from storage",o),!this._isValidSession(o)){this._debug(n,"session is not valid"),o!==null&&await this._removeSession();return}const s=((r=o.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<If;if(this._debug(n,`session has${s?"":" not"} expired with margin of ${If}s`),s){if(this.autoRefreshToken&&o.refresh_token){const{error:i}=await this._callRefreshToken(o.refresh_token);i&&(console.error(i),Yc(i)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(o.user&&o.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(o.access_token);!a&&(i!=null&&i.user)?(o.user=i.user,await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",o)}catch(o){this._debug(n,"error",o),console.error(o);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var r,n;if(!t)throw new Rt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const o=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(o,"begin");try{this.refreshingDeferred=new Sd;const{data:s,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!s.session)throw new Rt;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const a={data:s.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(s){if(this._debug(o,"error",s),ee(s)){const i={data:null,error:s};return Yc(s)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(s),s}finally{this.refreshingDeferred=null,this._debug(o,"end")}}async _notifyAllSubscribers(t,r,n=!0){const o=`#_notifyAllSubscribers(${t})`;this._debug(o,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const s=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,r)}catch(l){s.push(l)}});if(await Promise.all(i),s.length>0){for(let a=0;a<s.length;a+=1)console.error(s[a]);throw s[0]}}finally{this._debug(o,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await st(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Fs(this.userStorage,this.storageKey+"-user",{user:r.user});const o=Object.assign({},r);delete o.user;const s=Hy(o);await Fs(this.storage,this.storageKey,s)}else{const o=Hy(r);await Fs(this.storage,this.storageKey,o)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await st(this.storage,this.storageKey),await st(this.storage,this.storageKey+"-code-verifier"),await st(this.storage,this.storageKey+"-user"),this.userStorage&&await st(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;
83try{t&&it()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),$s);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const o=Math.floor((n.expires_at*1e3-t)/$s);this._debug("#_autoRefreshTokenTick()",`access token expires in ${o} ticks, a tick lasts ${$s}ms, refresh threshold is ${bp} ticks`),o<=bp&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof fg)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!it()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,r,n){const o=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&o.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&o.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[s,i]=await js(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(i)}`});o.push(a.toString())}if(n!=null&&n.queryParams){const s=new URLSearchParams(n.queryParams);o.push(s.toString())}return n!=null&&n.skipBrowserRedirect&&o.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${o.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:o,error:s}=r;return s?this._returnResult({data:null,error:s}):await se(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(ee(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,o;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:c}=await se(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(t.factorType==="totp"&&l.type==="totp"&&(!((o=l==null?void 0:l.totp)===null||o===void 0)&&o.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(ee(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:o,error:s}=r;if(s)return this._returnResult({data:null,error:s});const i=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?aN(t.webauthn.credential_response):lN(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await se(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(ee(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:o,error:s}=r;if(s)return this._returnResult({data:null,error:s});const i=await se(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});if(i.error)return i;const{data:a}=i;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:sN(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:iN(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(ee(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const o={all:[],phone:[],totp:[],webauthn:[]};for(const s of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])o.all.push(s),s.status==="verified"&&o[s.factor_type].push(s);return{data:o,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:o}
83=await this.getSession();if(o)return this._returnResult({data:null,error:o});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:s}=Lf(n.access_token);let i=null;s.aal&&(i=s.aal);let a=i;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(u=>u.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const c=s.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:c},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:o}=r;return o?this._returnResult({data:null,error:o}):n?await se(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Rt})})}catch(r){if(ee(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:o},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!o)return this._returnResult({data:null,error:new Rt});const i=await se(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&it()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:o},error:s}=n;if(s)return this._returnResult({data:null,error:s});if(!o)return this._returnResult({data:null,error:new Rt});const i=await se(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:o.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&it()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await se(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new Rt})})}catch(t){if(ee(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:o}=r;return o?this._returnResult({data:null,error:o}):n?(await se(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Rt})})}catch(r){if(ee(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const o=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+bA>o)return n;const{data:s,error:i}=await se(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=o,n=s.keys.find(a=>a.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:g}
83=await this.getSession();if(g||!h.session)return this._returnResult({data:null,error:g});n=h.session.access_token}const{header:o,payload:s,signature:i,raw:{header:a,payload:l}}=Lf(n);r!=null&&r.allowExpired||FA(s.exp);const c=!o.alg||o.alg.startsWith("HS")||!o.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(o.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!c){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:s,header:o,signature:i},error:null}}const u=UA(o.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,i,CA(`${a}.${l}`)))throw new Lu("Invalid JWT signature");return{data:{claims:s,header:o,signature:i},error:null}}catch(n){if(ee(n))return this._returnResult({data:null,error:n});throw n}}};hg.nextInstanceID={};const vN=dg,yN=hg,wN=Object.freeze(Object.defineProperty({__proto__:null,AuthAdminApi:vN,AuthApiError:LE,AuthClient:yN,AuthError:ji,AuthImplicitGrantRedirectError:Oa,AuthInvalidCredentialsError:ka,AuthInvalidJwtError:Lu,AuthInvalidToken
83ResponseError:Do,AuthPKCEGrantCodeExchangeError:xp,AuthRetryableFetchError:Iu,AuthSessionMissingError:Rt,AuthUnknownError:Bn,AuthWeakPasswordError:Ep,CustomAuthError:Sn,GoTrueAdminApi:dg,GoTrueClient:hg,NavigatorLockAcquireTimeoutError:zE,SIGN_OUT_SCOPES:Jc,isAuthApiError:DE,isAuthError:ee,isAuthImplicitGrantRedirectError:$E,isAuthRetryableFetchError:Yc,isAuthSessionMissingError:ME,isAuthWeakPasswordError:_A,lockInternals:$o,navigatorLock:VE,processLock:YA},Symbol.toStringTag,{value:"Module"})),qE=Pl(wN);Object.defineProperty(Ed,"__esModule",{value:!0});Ed.SupabaseAuthClient=void 0;const bN=qE;class _N extends bN.AuthClient{constructor(t){super(t)}}Ed.SupabaseAuthClient=_N;Object.defineProperty(Ru,"__esModule",{value:!0});const xN=Jx,EN=yt,SN=gE,TN=dA,Ec=RE,CN=jE,Zy=So,PN=Ed;let kN=class{constructor(t,r,n){var o,s,i;this.supabaseUrl=t,this.supabaseKey=r;const a=(0,Zy.validateSupabaseUrl)(t);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const l=`sb-${a.hostname.split(".")[0]}-auth-token`,c={db:Ec.DEFAULT_DB_OPTIONS,realtime:Ec.DEFAULT_REALTIME_OPTIONS,auth:Object.assign(Object.assign({},Ec.DEFAULT_AUTH_OPTIONS),{storageKey:l}),global:Ec.DEFAULT_GLOBAL_OPTIONS},u=(0,Zy.applySettingDefaults)(n??{},c);this.storageKey=(o=u.auth.storageKey)!==null&&o!==void 0?o:"",this.headers=(s=u.global.headers)!==null&&s!==void 0?s:{},u.accessToken?(this.accessToken=u.accessToken,this.auth=new Proxy({},{get:(d,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((i=u.auth)!==null&&i!==void 0?i:{},this.headers,u.global.fetch),this.fetch=(0,CN.fetchWithAuth)(r,this._getAccessToken.bind(this),u.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},u.realtime)),this.accessToken&&this.accessToken().then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new EN.PostgrestClient(new URL("rest/v1",a).href,{headers:this.headers,schema:u.db.schema,fetch:this.fetch}),this.storage=new TN.StorageClient(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),u.accessToken||this._listenForAuthEvents()}get functions(){return new xN.FunctionsClient(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,r,n)}channel(t,r={config:{}}){return this.realtime.channel(t,r)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(t=n.session)===null||t===void 0?void 0:t.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:o,userStorage:s,storageKey:i,flowType:a,lock:l,debug:c,throwOnError:u},d,p){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new PN.SupabaseAuthClient({url:this.authUrl.href,headers:Object.assign(Object.assign({},h),d),storageKey:i,autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:o,userStorage:s,flowType:a,lock:l,debug:c,throwOnError:u,fetch:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(g=>g.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new SN.RealtimeClient(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(t,r,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};Ru.default=kN;(function(e){var t=No&&No.__createBinding||(Object.create?function(u,d,p,h){h===void 0&&(h=p);var g=Object.getOwnPropertyDescriptor(d,p);(!g||("get"in g?!d.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return d[p]}}),Object.defineProperty(u,h,g)}:function(u,d,p,h){h===void 0&&(h=p),u[h]=d[p]}),r=No&&No.__exportStar||function(u,d){for(var p in u)p!=="default"&&!Object.prototype.hasOwnProperty.call(d,p)&&t(d,u,p)}
83,n=No&&No.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.createClient=e.SupabaseClient=e.FunctionRegion=e.FunctionsError=e.FunctionsRelayError=e.FunctionsFetchError=e.FunctionsHttpError=e.PostgrestError=void 0;const o=n(Ru);r(qE,e);var s=yt;Object.defineProperty(e,"PostgrestError",{enumerable:!0,get:function(){return s.PostgrestError}});var i=Jx;Object.defineProperty(e,"FunctionsHttpError",{enumerable:!0,get:function(){return i.FunctionsHttpError}}),Object.defineProperty(e,"FunctionsFetchError",{enumerable:!0,get:function(){return i.FunctionsFetchError}}),Object.defineProperty(e,"FunctionsRelayError",{enumerable:!0,get:function(){return i.FunctionsRelayError}}),Object.defineProperty(e,"FunctionsError",{enumerable:!0,get:function(){return i.FunctionsError}}),Object.defineProperty(e,"FunctionRegion",{enumerable:!0,get:function(){return i.FunctionRegion}}),r(gE,e);var a=Ru;Object.defineProperty(e,"SupabaseClient",{enumerable:!0,get:function(){return n(a).default}});const l=(u,d,p)=>new o.default(u,d,p);e.createClient=l;function c(){if(typeof window<"u"||typeof process>"u")return!1;const u=process.version;if(u==null)return!1;const d=u.match(/^v(\d+)\./);return d?parseInt(d[1],10)<=18:!1}c()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217")})(ng);const GE=wo(ng),ON=J0({__proto__:null,default:GE},[ng]),{PostgrestError:_8,FunctionsHttpError:x8,FunctionsFetchError:E8,FunctionsRelayError:S8,FunctionsError:T8,FunctionRegion:C8,SupabaseClient:P8,createClient:RN,GoTrueAdminApi:k8,GoTrueClient:O8,AuthAdminApi:R8,AuthClient:j8,navigatorLock:A8,NavigatorLockAcquireTimeoutError:N8,lockInternals:I8,processLock:L8,SIGN_OUT_SCOPES:D8,AuthError:M8,AuthApiError:$8,AuthUnknownError:F8,CustomAuthError:U8,AuthSessionMissingError:B8,AuthInvalidToken
83ResponseError:z8,AuthInvalidCredentialsError:V8,AuthImplicitGrantRedirectError:W8,AuthPKCEGrantCodeExchangeError:H8,AuthRetryableFetchError:q8,AuthWeakPasswordError:G8,AuthInvalidJwtError:K8,isAuthError:Q8,isAuthApiError:Y8,isAuthSessionMissingError:J8,isAuthImplicitGrantRedirectError:X8,isAuthRetryableFetchError:Z8,isAuthWeakPasswordError:e6,RealtimePresence:t6,RealtimeChannel:r6,RealtimeClient:n6,REALTIME_LISTEN_TYPES:o6,REALTIME_POSTGRES_CHANGES_LISTEN_EVENT:s6,REALTIME_PRESENCE_LISTEN_EVENTS:i6,REALTIME_SUBSCRIBE_STATES:a6,REALTIME_CHANNEL_STATES:l6}=GE||ON;function jN(){var b,w;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(y=>e===y||e.endsWith("."+y)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",o=r?((b=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:b[1])??((w=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:w[1]):void 0,s=window.parent&&window.parent!==window;if(!o||!s)return localStorage;const i=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=i?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),c=l&&a.test(l)?[l]:i?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],u="lovable-preview-auth:result",d=2e3,p=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(y,_,x)=>new Promise(E=>{const S=p();let C=!1,P;const I=M=>{C||(C=!0,clearTimeout(P),window.removeEventListener("message",j),E(M))},j=M=>{if(c.indexOf(M.origin)<0)return;const W=M.data;W&&W.type===u&&W.requestId===S&&I(W)};window.addEventListener("message",j);const $={type:y,requestId:S,projectId:o,key:_};x!==void 0&&($.value=x);for(const M of c)window.parent.postMessage($,M);P=setTimeout(()=>I(null),d)});let g=!0;const m=250;return{getItem:async y=>{let _=await h("lovable-preview-auth:get",y);return!_&&g&&(await new Promise(x=>setTimeout(x,m)),_=await h("lovable-preview-auth:get",y)),g=!1,_&&_.ok&&typeof _.value=="string"?_.value===""?(localStorage.removeItem(y),null):_.value:localStorage.getItem(y)},setItem:(y,_)=>(localStorage.setItem(y,_),h("lovable-preview-auth:set",y,_).then(x=>{x&&x.ok&&typeof x.value=="string"&&localStorage.getItem(y)===_&&(x.value===""?localStorage.removeItem(y):localStorage.setItem(y,x.value))})),removeItem:y=>(localStorage.removeItem(y),h("lovable-preview-auth:remove",y).then(()=>{}))}}const AN="https://hhkjvpdlkhxblpqzugic.supabase.co",NN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imhoa2p2cGRsa2h4YmxwcXp1Z2ljIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjU0Njk0NjAsImV4cCI6MjA4MTA0NTQ2MH0.lmlLUKecJ7qKzZXJm_BIRvXJm7eizBY-cS543YAeD6Y",xe=RN(AN,NN,{auth:{storage:jN(),persistSession:!0,autoRefreshToken:!0}}),c6=Object.freeze(Object.defineProperty({__proto__:null,supabase:xe},Symbol.toStringTag,{value:"Module"}));function Tn(){const[e,t]=v.useState(null),[r,n]=v.useState(null),[o,s]=v.useState(!0),[i,a]=v.useState(!1),[l,c]=v.useState(!1),[u,d]=v.useState(!0),[p,h]=v.useState(null),g=v.useRef(!1),m=v.useRef(null),b=async(x,E=!1)=>{if(!(!E&&m.current===x)){d(!0);try{const{data:S,error:C}=await xe.from("user_roles").select("role").eq("user_id",x).eq("role","admin").maybeSingle();C?(console.error("Error checking admin status:",C),a(!1)):a(!!S);const{data:P,error:I}=await xe.rpc("is_super_admin",{_user_id:x});I?(console.error("Error checking super admin status:",I),c(!1)):c(!!P);const{data:j,error:$}=await xe.from("organization_members").select("organization_id").eq("user_id",x).maybeSingle();h(!$&&j?j.organization_id:null),m.current=x}catch(S){console.error("Error checking admin status:",S),a(!1),c(!1)}finally{m.current=x,d(!1)}}};return v.useEffect(()=>{const{data:{subscription:x}}=xe.auth.onAuthStateChange((E,S)=>{n(S),t((S==null?void 0:S.user)??null),g.current&&(s(!1),S!=null&&S.user?setTimeout(()=>{b(S.user.id)},0):(m.current=null,a(!1),c(!1),h(null),d(!1)))});return xe.auth.getSession().then(({data:{session:E}})=>{n(E),t((E==null?void 0:E.user)??null),g.current=!0,s(!1),E!=null&&E.user?b(E.user.id):(a(!1),c(!1),h(null),d(!1))}).catch(E=>{console.error("Error getting session:",E),g.current=!0,s(!1),a(!1),c(!1),d(!1)}),()=>x.unsubscribe()},[]),{user:e,session:r,loading:o,isAdmin:i,isSuperAdmin:l,isAdminLoading:u,userOrganization:p,signIn:async(x,E)=>{const{error:S}=await xe.auth.signInWithPassword({email:x,password:E});return{error:S}},signUp:async(x,E,S)=>{var $,M;const C=`${window.location.origin}/`,{data:P,error:I}=await xe.auth.signUp({email:x,password:E,options:{emailRedirectTo:C,data:{full_name:S}}}),j=!!(($=I==null?void 0:I.message)!=null&&$.toLowerCase().includes("already registered"))||!I&&!!(P!=null&&P.user)&&(((M=P.user.identities)==null?void 0:M.length)??0)===0;return{error:I,alreadyRegistered:j}},signOut:async()=>{t(null),n(null),a(!1),c(!1),h(null),d(!1),m.current=null;const{error:x}=await xe.auth.signOut({scope:"local"});try{Object.keys(localStorage).forEach(E=>{E.startsWith("sb-")&&E.includes("-auth-token")&&localStorage.removeItem(E)})}catch(E){console.warn("Failed to clear local auth storage:",E)}return{error:x}}}}function IN(){const{user:e,isSuperAdmin:t}=Tn();return bn({queryKey:["user-organizations",e==null?void 0:e.id,t],queryFn:async()=>
83{if(!e)return[];if(t){const{data:o,error:s}=await xe.from("organizations").select("id, name, slug, logo_url, favicon_url, timing_website_url, timing_link_text, timing_admin_url, primary_color, font_heading, font_body, event_type, admin_access_disabled").eq("is_active",!0).is("archived_at",null).order("name");if(s)throw s;return(o||[]).map(i=>({...i,has_mysql_host:i.event_type==="motorsports",role:"super_admin"}))}const{data:r,error:n}=await xe.from("organization_members").select(`
84          role,
85          organizations:organization_id (
86            id,
87            name,
88            slug,
89            logo_url,
90            favicon_url,
91            timing_website_url,
92            timing_link_text,
93            timing_admin_url,
94            primary_color,
95            font_heading,
96            font_body,
97            event_type,
98            admin_access_disabled,
99            archived_at
100          )
101        `).eq("user_id",e.id);if(n)throw n;return(r||[]).filter(o=>o.organizations&&!o.organizations.archived_at).map(o=>{const s=o.organizations;return{id:s.id,name:s.name,slug:s.slug,logo_url:s.logo_url,favicon_url:s.favicon_url,timing_website_url:s.timing_website_url,timing_link_text:s.timing_link_text,timing_admin_url:s.timing_admin_url,primary_color:s.primary_color,font_heading:s.font_heading,font_body:s.font_body,event_type:s.event_type,admin_access_disabled:!!s.admin_access_disabled,has_mysql_host:s.event_type==="motorsports",role:o.role}})},enabled:!!e})}const KE=v.createContext(void 0),Sc="selectedOrganizationId";function LN({children:e}){const{data:t=[],isLoading:r}=IN(),[n,o]=v.useState(null);v.useEffect(()=>{if(t.length>0&&!n){const i=localStorage.getItem(Sc),a=i?t.find(l=>l.id===i):null;o(a||t[0])}},[t,n]),v.useEffect(()=>{if(t.length>0&&n&&!t.some(i=>i.id===n.id)){const i=t[0];o(i),localStorage.setItem(Sc,i.id)}},[t,n]),v.useEffect(()=>{t.length===0&&n&&(o(null),localStorage.removeItem(Sc))},[t,n]),v.useEffect(()=>{const i=document.documentElement;n!=null&&n.primary_color?i.style.setProperty("--org-primary",n.primary_color):i.style.removeProperty("--org-primary"),n!=null&&n.font_heading?i.style.setProperty("--org-font-heading",`"${n.font_heading}"`):i.style.removeProperty("--org-font-heading"),n!=null&&n.font_body?i.style.setProperty("--org-font-body",`"${n.font_body}"`):i.style.removeProperty("--org-font-body")},[n==null?void 0:n.primary_color,n==null?void 0:n.font_heading,n==null?void 0:n.font_body]);const s=i=>{o(i),localStorage.setItem(Sc,i.id)};return f.jsx(KE.Provider,{value:{currentOrganization:n,organizations:t,isLoading:r,setCurrentOrganization:s},children:e})}function bs(){const e=v.useContext(KE);if(e===void 0)throw new Error("useOrganization must be used within an OrganizationProvider");return e}function QE(e){const{currentOrganization:t}=bs(),{data:r,isLoading:n}=bn({queryKey:["has-feature",t==null?void 0:t.id,e],queryFn:async()=>{if(!(t!=null&&t.id))return!1;const{data:o,error:s}=await xe.from("organization_features").select("is_enabled").eq("organization_id",t.id).eq("feature_name",e).maybeSingle();return s?(console.error("Error checking feature access:",s),!1):(o==null?void 0:o.is_enabled)??!1},enabled:!!(t!=null&&t.id)});return{hasAccess:r??!1,isLoading:n}}function u6(e){const{currentOrganization:t}=bs(),{data:r,isLoading:n}=bn({queryKey:["has-features",t==null?void 0:t.id,e],queryFn:async()=>{if(!(t!=null&&t.id))return Object.fromEntries(e.map(a=>[a,!1]));const{data:o,error:s}=await xe.from("organization_features").select("feature_name, is_enabled").eq("organization_id",t.id).in("feature_name",e);if(s)return console.error("Error checking features access:",s),Object.fromEntries(e.map(a=>[a,!1]));const i={};for(const a of e){const l=o==null?void 0:o.find(c=>c.feature_name===a);i[a]=(l==null?void 0:l.is_enabled)??!1}return i},enabled:!!(t!=null&&t.id)&&e.length>0});return{features:r??Object.fromEntries(e.map(o=>[o,!1])),isLoading:n}}function YE(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=YE(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function JE(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=YE(e))&&(n&&(n+=" "),n+=t);return n}const pg="-",DN=e=>{const t=$N(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const a=i.split(pg);return a[0]===""&&a.length!==1&&a.shift(),XE(a,t)||MN(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},XE=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),o=n?XE(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(pg);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},ew=/^\[(.+)\]$/,MN=e=>{if(ew.test(e)){const t=ew.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}
vendor: 5,193 bytes, line 101
101,$N=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return UN(Object.entries(e.classGroups),r).forEach(([s,i])=>{Tp(i,n,s,t)}),n},Tp=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:tw(t,o);s.classGroupId=r;return}if(typeof o=="function"){if(FN(o)){Tp(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([s,i])=>{Tp(i,tw(t,s),r,n)})})},tw=(e,t)=>{let r=e;return t.split(pg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},FN=e=>e.isThemeGetter,UN=(e,t)=>t?e.map(([r,n])=>{const o=n.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[r,o]}):e,BN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const o=(s,i)=>{r.set(s,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=n.get(s))!==void 0)return o(s,i),i},set(s,i){r.has(s)?r.set(s,i):o(s,i)}}},ZE="!",zN=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let c=0,u=0,d;for(let b=0;b<a.length;b++){let w=a[b];if(c===0){if(w===o&&(n||a.slice(b,b+s)===t)){l.push(a.slice(u,b)),u=b+s;continue}if(w==="/"){d=b;continue}}w==="["?c++:w==="]"&&c--}const p=l.length===0?a:a.substring(u),h=p.startsWith(ZE),g=h?p.substring(1):p,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:i}):i},VN=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},WN=e=>({cache:BN(e.cacheSize),parseClassName:zN(e),...DN(e)}),HN=/\s+/,qN=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(HN);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:h}=r(c);let g=!!h,m=n(g?p.substring(0,h):p);if(!m){if(!g){a=c+(a.length>0?" "+a:a);continue}if(m=n(p),!m){a=c+(a.length>0?" "+a:a);continue}g=!1}const b=VN(u).join(":"),w=d?b+ZE:b,y=w+m;if(s.includes(y))continue;s.push(y);const _=o(m,g);for(let x=0;x<_.length;++x){const E=_[x];s.push(w+E)}a=c+(a.length>0?" "+a:a)}return a};function GN(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=eS(t))&&(n&&(n+=" "),n+=r);return n}const eS=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=eS(e[n]))&&(r&&(r+=" "),r+=t);return r};function KN(e,...t){let r,n,o,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return r=WN(c),n=r.cache.get,o=r.cache.set,s=a,a(l)}function a(l){const c=n(l);if(c)return c;const u=qN(l,r);return o(l,u),u}return function(){return s(GN.apply(null,arguments))}}const De=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},tS=/^\[(?:([a-z-]+):)?(.+)\]$/i,QN=/^\d+\/\d+$/,YN=new Set(["px","full","screen"]),JN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XN=/\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$/,ZN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,eI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,tn=e=>ai(e)||YN.has(e)||QN.test(e),Nn=e=>qi(e,"length",cI),ai=e=>!!e&&!Number.isNaN(Number(e)),Mf=e=>qi(e,"number",ai),pa=e=>!!e&&Number.isInteger(Number(e)),rI=e=>e.endsWith("%")&&ai(e.slice(0,-1)),fe=e=>tS.test(e),In=e=>JN.test(e),nI=new Set(["length","size","percentage"]),oI=e=>qi(e,nI,rS),sI=e=>qi(e,"position",rS),iI=new Set(["image","url"]),aI=e=>qi(e,iI,dI),lI=e=>qi(e,"",uI),ma=()=>!0,qi=(e,t,r)=>{const n=tS.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},cI=e=>XN.test(e)&&!ZN.test(e),rS=()=>!1,uI=e=>eI.test(e),dI=e=>tI.test(e),fI=()=>{const e=De("colors"),t=De("spacing"),r=De("blur"),n=De("brightness"),o=De("borderColor"),s=De("borderRadius"),i=De("borderSpacing"),a=De("borderWidth"),l=De("contrast"),c=De("grayscale"),u=De("hueRotate"),d=De("invert"),p=De("gap"),h=De("gradientColorStops"),g=De("gradientColorStopPositions"),m=De("inset"),b=De("margin"),w=De("opacity"),y=De("padding"),_=De("saturate"),x=De("scale"),E=De("sepia"),S=De("skew"),C=De("space"),P=De("translate"),I=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",fe,t],M=()=>[fe,t],W=()=>["",tn,Nn],U=()=>["auto",ai,fe],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",fe],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[ai,fe];return{cacheSize:500,separator:":",theme:{colors:[ma],spacing:[tn,Nn],blur:["none","",In,fe],brightness:te(),borderColor:[e],borderRadius:["n
101one","","full",In,fe],borderSpacing:M(),borderWidth:W(),contrast:te(),grayscale:k(),hueRotate:te(),invert:k(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[rI,Nn],inset:$(),margin:$(),opacity:te(),padding:M(),saturate:te(),scale:te(),sepia:k(),skew:te(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[In]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:[...oe(),fe]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",pa,fe]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",pa,fe]}],"grid-cols":[{"grid-cols":[ma]}],"col-start-end":[{col:["auto",{span:["full",pa,fe]},fe]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[ma]}],"row-start-end":[{row:["auto",{span:[pa,fe]},fe]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[In]},In]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",In,Nn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mf]}],"font-family":[{font:[ma]}],"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",fe]}],"line-clamp":[{"line-clamp":["none",ai,Mf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",tn,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",tn,Nn]}],"underline-offset":[{"underline-offset":["auto",tn,fe]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],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",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),sI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",oI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},aI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}
vendor: 5,184 bytes, line 101
101],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:q()}],"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:["",...q()]}],"outline-offset":[{"outline-offset":[tn,fe]}],"outline-w":[{outline:[tn,Nn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[tn,Nn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",In,lI]}],"shadow-color":[{shadow:[ma]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...re(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",In,fe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",fe]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[pa,fe]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],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",fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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"]}
vendor: 5,347 bytes, line 101
101],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",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[tn,Nn,Mf]}],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"]}}},hI=KN(fI);function pe(...e){return hI(JE(e))}const nS=v.forwardRef(({className:e,...t},r)=>f.jsx("div",{ref:r,className:pe("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));nS.displayName="Card";const pI=v.forwardRef(({className:e,...t},r)=>f.jsx("div",{ref:r,className:pe("flex flex-col space-y-1.5 p-6",e),...t}));pI.displayName="CardHeader";const mI=v.forwardRef(({className:e,...t},r)=>f.jsx("h3",{ref:r,className:pe("text-2xl font-semibold leading-none tracking-tight",e),...t}));mI.displayName="CardTitle";const gI=v.forwardRef(({className:e,...t},r)=>f.jsx("p",{ref:r,className:pe("text-sm text-muted-foreground",e),...t}));gI.displayName="CardDescription";const oS=v.forwardRef(({className:e,...t},r)=>f.jsx("div",{ref:r,className:pe("p-6 pt-0",e),...t}));oS.displayName="CardContent";const vI=v.forwardRef(({className:e,...t},r)=>f.jsx("div",{ref:r,className:pe("flex items-center p-6 pt-0",e),...t}));vI.displayName="CardFooter";const yI="data:image/webp;base64,UklGRroFAABXRUJQVlA4IK4FAADQHACdASpgAGAAPlEgjkSjoiGTKk7kOAUEtgBn7QCuLwk/B/1L9dfyx+YauP1r8C+rPwMkFdYv8f7mfd7/oPYB5gH6S9IDzAfr1/yP9z7x/9e9UX+n9Qj9uesI9Az9ovTK/ZX4P/2g/b72mf/pnIH937VP7tXY/57hz2o91YybanZiHjo+pvYI6QHodnRzKYKjUwhZXWInsLeV/zbr/jLU/m9RxNALIbFSiA/9PVVmOpaHcgZWA7SViqtyMfPXnIOpKIcYsW39IL3LwOBulF82HfASmS9oN76NTbCkI8xlUwDWU1UYCOqekoyn4Q9LAAD7xGp5by1ru1AV0GdzWv/mqR6N92hcHPv/zz755984emPyD7DiOVfP0EHLgqSEEO5Qq3HYcOgJfB/EnunUz6VXwBLZqR02JtV4A4kaK2w+UacIoKtEHcxrZ0QLXRiN7ts/HLiRKy/HaZuoNcVaQ3fsk5b+tj20lDt5SX/uTG4flUVQYXgbSaDvmb6vtnhL9lpZSjf+YFd1YOtCp3Cwilmek0zwxTrL8D12ciTX3/ywwOcPu9fU8AF9rlRDAidXt6/xKX2DONweLaBYAQcMEtJWiTHo0Zuo1xAm/QFwH+BxoklNxFUzHdb8jkRIxVZzUO4QuBy4N5ZyC2o6B/LRVjdW4bnyhm5wOH247tZaOqkykNcBzep0fWON/JOQJCdAp8gvGcBuipEnQez2aauMQLiV0qUfPJ16TzCCtsLaJki5qArQeYbec+D7TNsKnGI6GSEDdsqH1y8N3aS9+V7cAUFNyiWuLTpGcNGn/JX9W+l+4hj+1Bezmu27r9QlL0JwLL/cHq0c5N95olX9S/wkYnDgn3g31bzrG+BH0vQbxu/EQgZ2FuRiB3EWa4nJVKHyf3fqGRnWH0wqyYUv/395td/SG2NzePA6RgiRlWlCXWTpNfDDlE1nX42XfAZrTdx/fzAE6RocfPCiF0tqTqJvfFwiC/tBjP/PsiGpeoEbA+2sxHk1B5nsypdev9AAdz0Ha7Wo/ABGMkJYH8ryjbVrflR6jP2MdcAk68Ube51PB2+DXroCaPhEVE+KtJlNr8kjJNFZvvCtHBBypBEBD7Oyp6MMSepZClKOfh3Fo8mIibotV0q94wmq0UUtLkbLWXmShKLkUaA+BCw23LO963n2da4eBPuQeHWm2/RqxRRITMmsbUVA/6LAQE/LlL+DJZdMM/72dApG8sOcJ029wN3MNBd0qjjx2Lvu6V3jxJRDqG9Oxl8mwEAsuKybiglvyc+3RenyQHLemy9Mm8hnkZ5EfUcEMSfaefP+8VFdndRHMM5QMFeSuAOLDQq0Febm1JkVt5k1p+sIyy7HTWwHKGr/Z86Xs1nij6OehX25a/76hfy0U4OlcR1CRvv06EhYWNgd15J5R+B0cyoe2LFWNsFT+OnBH4O2UCOn8fKni9xkVyL5/9QXZ/7xnkbUOYtL372RXAdc5gMqFeMyfBQCDo+05YpZzhOGg15S4yCnPHnACujOa/eV1KvfJ/MI7sYjol7vD7D72m7ZD7zo714W7WQiUfrt9xmZ7qroKDu2zbf8KzQ/O6OOAyCxXF+cInJZDlPsOshgfCHSRbgt5Du2o13vUUFeVds0kuqQ3fMLiZhLwT/ZHY8xDL6hOpkMzZuFTDUsL12xyRMT2XCGa9g7INGnI/Lpy7Vfznd923
10161qiJ+/+vZEb/1RXmhLSfXb0BAyyNzFRFpP3xBYKyxo7xWB1/5Y+zIDEpLcSOp3m8fFVdLdYN+HxmH0ob738HPaYGwG4e9aEobFgjw6gQ2ZftPFWpLGcPUwM3SkP5YBGAQic3d6RvWWV+6dDXbijuw4ScGAYgbGkVkIIC3FXuxQ+ADEK3zxJ7Z7IxMR53KIqGaMgu9QKr3z5W4bV6waWcBIQ+ixPIfRdtovcFnabrTOqUBlEAAAA==",sS=v.forwardRef(({className:e="h-4 w-4",style:t,...r},n)=>f.jsx("img",{ref:n,src:yI,alt:"","aria-hidden":"true",className:`animate-spin rounded-full object-cover ${e}`,style:{animationDuration:"1.2s",...t},...r}));sS.displayName="BpSpinner";function $f({feature:e,label:t,children:r}){const{isSuperAdmin:n}=Tn(),{hasAccess:o,isLoading:s}=QE(e);return n||o?f.jsx(f.Fragment,{children:r}):s?f.jsxs("div",{className:"p-8 text-center text-muted-foreground",children:[f.jsx(sS,{className:"mr-2 inline h-5 w-5 animate-spin"}),"Loading…"]}):f.jsx("div",{className:"container mx-auto max-w-2xl py-10","data-testid":"feature-locked",children:f.jsx(nS,{children:f.jsxs(oS,{className:"py-8 text-center",children:[f.jsxs("h1",{className:"text-xl font-semibold",children:[t," is not turned on"]}),f.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Contact Beyond Pro support to enable ",t," for this track."]})]})})})}const wI=1,bI=1e6;let Ff=0;function _I(){return Ff=(Ff+1)%Number.MAX_SAFE_INTEGER,Ff.toString()}const Uf=new Map,rw=e=>{if(Uf.has(e))return;const t=setTimeout(()=>{Uf.delete(e),za({type:"REMOVE_TOAST",toastId:e})},bI);Uf.set(e,t)},iS=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,wI)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?rw(r):e.toasts.forEach(n=>{rw(n.id)}),{...e,toasts:e.toasts.map(n=>
101n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Xc=[];let Zc={toasts:[]};function za(e){Zc=iS(Zc,e),Xc.forEach(t=>{t(Zc)})}function Va({...e}){const t=_I(),r=o=>za({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>za({type:"DISMISS_TOAST",toastId:t});return za({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}function aS(){const[e,t]=v.useState(Zc);return v.useEffect(()=>(Xc.push(t),()=>{const r=Xc.indexOf(t);r>-1&&Xc.splice(r,1)}),[e]),{...e,toast:Va,dismiss:r=>za({type:"DISMISS_TOAST",toastId:r})}}const d6=Object.freeze(Object.defineProperty({__proto__:null,reducer:iS,toast:Va,useToast:aS},Symbol.toStringTag,{value:"Module"}));function H(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function nw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Td(...e){return t=>{let r=!1;const n=e.map(o=>{const s=nw(o,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():nw(e[o],null)}}}}function ke(...e){return v.useCallback(Td(...e),e)}function xI(e,t){const r=v.createContext(t),n=s=>{const{children:i,...a}=s,l=v.useMemo(()=>a,Object.values(a));return f.jsx(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function o(s){const i=v.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[n,o]}function Cn(e,t=[]){let r=[];function n(s,i){const a=v.createContext(i),l=r.length;r=[...r,i];const c=d=>{var w;const{scope:p,children:h,...g}=d,m=((w=p==null?void 0:p[e])==null?void 0:w[l])||a,b=v.useMemo(()=>g,Object.values(g));return f.jsx(m.Provider,{value:b,children:h})};c.displayName=s+"Provider";function u(d,p){var m;const h=((m=p==null?void 0:p[e])==null?void 0:m[l])||a,g=v.useContext(h);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=r.map(i=>v.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,EI(o,...t)]}function EI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=n.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function ds(e){const t=TI(e),r=v.forwardRef((n,o)=>{const{children:s,...i}=n,a=v.Children.toArray(s),l=a.find(PI);if(l){const c=l.props.children,u=a.map(d=>d===l?v.Children.count(c)>1?v.Children.only(null):v.isValidElement(c)?c.props.children:null:d);return f.jsx(t,{...i,ref:o,children:v.isValidElement(c)?v.cloneElement(c,void 0,u):null})}return f.jsx(t,{...i,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}var SI=ds("Slot");function TI(e){const t=v.forwardRef((r,n)=>{const{children:o,...s}=r;if(v.isValidElement(o)){const i=OI(o),a=kI(s,o.props);return o.type!==v.Fragment&&(a.ref=n?Td(n,i):i),v.cloneElement(o,a)}return v.Children.count(o)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lS=Symbol("radix.slottable");function CI(e){const t=({children:r})=>f.jsx(f.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=lS,t}function PI(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lS}function kI(e,t){const r={...t};for(const n in t){const o=e[n],s=t[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...s}:n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function OI(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Cd(e){const t=e+"CollectionProvider",[r,n]=Cn(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:b,children:w}=m,y=A.useRef(null),_=A.useRef(new Map).current;return f.jsx(o,{scope:b,itemMap:_,collectionRef:y,children:w})};i.displayName=t;const a=e+"CollectionSlot",l=ds(a),c=A.forwardRef((m,b)=>{const{scope:w,children:y}=m,_=s(a,w),x=ke(b,_.collectionRef);return f.jsx(l,{ref:x,children:y})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=ds(u),h=A.forwardRef((m,b)=>{const{scope:w,children:y,..._}=m,x=A.useRef(null),E=ke(b,x),S=s(u,w);return A.useEffect(()=>(S.itemMap.set(x,{ref:x,..._}),()=>void S.itemMap.delete(x))),f.jsx(p,{[d]:"",ref:E,children:y})});h.displayName=u;function g(m){const b=s(e+"CollectionConsumer",m);return A.useCallback(()=>{const y=b.collectionRef.current;if(!y)return[];const _=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((S,C)=>_.indexOf(S.ref.current)-_.indexOf(C.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},g,n]}var RI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],de=RI.reduce((e,t)=>
vendor: 8,605 bytes, line 101
101{const r=ds(`Primitive.${t}`),n=v.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(l,{...a,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function mg(e,t){e&&kr.flushSync(()=>e.dispatchEvent(t))}function Bt(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function jI(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e);v.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var AI="DismissableLayer",Cp="dismissableLayer.update",NI="dismissableLayer.pointerDownOutside",II="dismissableLayer.focusOutside",ow,cS=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gi=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=v.useContext(cS),[u,d]=v.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),g=ke(t,C=>d(C)),m=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=m.indexOf(b),y=u?m.indexOf(u):-1,_=c.layersWithOutsidePointerEventsDisabled.size>0,x=y>=w,E=DI(C=>{const P=C.target,I=[...c.branches].some(j=>j.contains(P));!x||I||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},p),S=MI(C=>{const P=C.target;[...c.branches].some(j=>j.contains(P))||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},p);return jI(C=>{y===c.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},p),v.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ow=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),sw(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ow)}},[u,p,r,c]),v.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),sw())},[u,c]),v.useEffect(()=>{const C=()=>h({});return document.addEventListener(Cp,C),()=>document.removeEventListener(Cp,C)},[]),f.jsx(de.div,{...l,ref:g,style:{pointerEvents:_?x?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,S.onFocusCapture),onBlurCapture:H(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,E.onPointerDownCapture)})});Gi.displayName=AI;var LI="DismissableLayerBranch",uS=v.forwardRef((e,t)=>{const r=v.useContext(cS),n=v.useRef(null),o=ke(t,n);return v.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),f.jsx(de.div,{...e,ref:o})});uS.displayName=LI;function DI(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e),n=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){dS(NI,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function MI(e,t=globalThis==null?void 0:globalThis.document){const r=Bt(e),n=v.useRef(!1);return v.useEffect(()=>{const o=s=>{s.target&&!n.current&&dS(II,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function sw(){const e=new CustomEvent(Cp);document.dispatchEvent(e)}function dS(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?mg(o,s):o.dispatchEvent(s)}var $I=Gi,FI=uS,dt=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},UI="Portal",Ll=v.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,s]=v.useState(!1);dt(()=>s(!0),[]);const i=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?oi.createPortal(f.jsx(de.div,{...n,ref:t}),i):null});Ll.displayName=UI;function BI(e,t){return v.useReducer((r,n)=>t[r][n]??r,e)}var Xr=e=>{const{present:t,children:r}=e,n=zI(t),o=typeof r=="function"?r({present:n.isPresent}):v.Children.only(r),s=ke(n.ref,VI(o));return typeof r=="function"||n.isPresent?v.cloneElement(o,{ref:s}):null};Xr.displayName="Presence";function zI(e){const[t,r]=v.useState(),n=v.useRef(null),o=v.useRef(e),s=v.useRef("none"),i=e?"mounted":"unmounted",[a,l]=BI(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const c=Tc(n.current);s.current=a==="mounted"?c:"none"},[a]),dt(()=>{const c=n.current,u=o.current;if(u!==e){const p=s.current,h=Tc(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),dt(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=h=>{const m=Tc(n.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=h=>{h.target===t&&(s.current=Tc(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:v.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Tc(e){return(e==null?void 0:e.animationName)||"none"}function VI(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var WI=lm[" useInsertionEffect ".trim().toString()]||dt;function fs({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,s,i]=HI({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{const u=v.useRef(e!==void 0);v.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}const c=v.useCallback(u=>{var d;if(a){const p=qI(u)?u(e):u;p!==e&&((d=i.current)==null||d.call(i,p))}else s(u)},[a,e,s,i]);return[l,c]}function HI({defaultProp:e,onChange:t}){const[r,n]=v.useState(e),o=v.useRef(r),s=v.useRef(t);return WI(()=>{s.current=t},[t]),v.useEffect(()=>{var i;o.current!==r&&((i=s.current)==null||i.call(s,r),o.current=r)},[r,o]),[r,n,s]}function qI(e){return typeof e=="function"}var fS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),GI="VisuallyHidden",Pd=v.forwardRef((e,t)=>f.jsx(de.span,{...e,ref:t,style:{...fS,...e.style}}));Pd.displayName=GI;var KI=Pd,gg="ToastProvider",[vg,QI,YI]=Cd("Toast"),[hS,f6]=Cn("Toast",[YI]),[JI,kd]=hS(gg),pS=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=v.useState(null),[c,u]=v.useState(0),d=v.useRef(!1),p=v.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${gg}\`. Expected non-empty \`string\`.`),f.jsx(vg.Provider,{scope:t,children:f.jsx(JI,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:v.useCallback(()=>u(h=>h+1),[]),onToastRemove:v.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:p,children:i})})};pS.displayName=gg;var mS="ToastViewport",XI=["F8"],Pp="toast.viewportPause",kp="toast.viewportResume",gS=v.forwardRef((e,t)=>
101{const{__scopeToast:r,hotkey:n=XI,label:o="Notifications ({hotkey})",...s}=e,i=kd(mS,r),a=QI(r),l=v.useRef(null),c=v.useRef(null),u=v.useRef(null),d=v.useRef(null),p=ke(t,d,i.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;v.useEffect(()=>{const b=w=>{var _;n.length!==0&&n.every(x=>w[x]||w.code===x)&&((_=d.current)==null||_.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),v.useEffect(()=>{const b=l.current,w=d.current;if(g&&b&&w){const y=()=>{if(!i.isClosePausedRef.current){const S=new CustomEvent(Pp);w.dispatchEvent(S),i.isClosePausedRef.current=!0}},_=()=>{if(i.isClosePausedRef.current){const S=new CustomEvent(kp);w.dispatchEvent(S),i.isClosePausedRef.current=!1}},x=S=>{!b.contains(S.relatedTarget)&&_()},E=()=>{b.contains(document.activeElement)||_()};return b.addEventListener("focusin",y),b.addEventListener("focusout",x),b.addEventListener("pointermove",y),b.addEventListener("pointerleave",E),window.addEventListener("blur",y),window.addEventListener("focus",_),()=>{b.removeEventListener("focusin",y),b.removeEventListener("focusout",x),b.removeEventListener("pointermove",y),b.removeEventListener("pointerleave",E),window.removeEventListener("blur",y),window.removeEventListener("focus",_)}}},[g,i.isClosePausedRef]);const m=v.useCallback(({tabbingDirection:b})=>{const y=a().map(_=>{const x=_.ref.current,E=[x,...dL(x)];return b==="forwards"?E:E.reverse()});return(b==="forwards"?y.reverse():y).flat()},[a]);return v.useEffect(()=>{const b=d.current;if(b){const w=y=>{var E,S,C;const _=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!_){const P=document.activeElement,I=y.shiftKey;if(y.target===b&&I){(E=c.current)==null||E.focus();return}const M=m({tabbingDirection:I?"backwards":"forwards"}),W=M.findIndex(U=>U===P);Bf(M.slice(W+1))?y.preventDefault():I?(S=c.current)==null||S.focus():(C=u.current)==null||C.focus()}};return b.addEventListener("keydown",w),()=>b.removeEventListener("keydown",w)}},[a,m]),f.jsxs(FI,{ref:l,role:"region","aria-label":o.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&f.jsx(Op,{ref:c,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"forwards"});Bf(b)}}),f.jsx(vg.Slot,{scope:r,children:f.jsx(de.ol,{tabIndex:-1,...s,ref:p})}),g&&f.jsx(Op,{ref:u,onFocusFromOutsideViewport:()=>{const b=m({tabbingDirection:"backwards"});Bf(b)}})]})});gS.displayName=mS;var vS="ToastFocusProxy",Op=v.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,s=kd(vS,r);return f.jsx(Pd,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&n()}})});Op.displayName=vS;var Dl="Toast",ZI="toast.swipeStart",eL="toast.swipeMove",tL="toast.swipeCancel",rL="toast.swipeEnd",yS=v.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:o,onOpenChange:s,...i}=e,[a,l]=fs({prop:n,defaultProp:o??!0,onChange:s,caller:Dl});return f.jsx(Xr,{present:r||a,children:f.jsx(sL,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Bt(e.onPause),onResume:Bt(e.onResume),onSwipeStart:H(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:H(e.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:H(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:H(e.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});yS.displayName=Dl;var[nL,oL]=hS(Dl,{onClose(){}}),sL=v.forwardRef((e,t)=>
101{const{__scopeToast:r,type:n="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:p,onSwipeEnd:h,...g}=e,m=kd(Dl,r),[b,w]=v.useState(null),y=ke(t,U=>w(U)),_=v.useRef(null),x=v.useRef(null),E=o||m.duration,S=v.useRef(0),C=v.useRef(E),P=v.useRef(0),{onToastAdd:I,onToastRemove:j}=m,$=Bt(()=>{var oe;(b==null?void 0:b.contains(document.activeElement))&&((oe=m.viewport)==null||oe.focus()),i()}),M=v.useCallback(U=>{!U||U===1/0||(window.clearTimeout(P.current),S.current=new Date().getTime(),P.current=window.setTimeout($,U))},[$]);v.useEffect(()=>{const U=m.viewport;if(U){const oe=()=>{M(C.current),c==null||c()},q=()=>{const re=new Date().getTime()-S.current;C.current=C.current-re,window.clearTimeout(P.current),l==null||l()};return U.addEventListener(Pp,q),U.addEventListener(kp,oe),()=>{U.removeEventListener(Pp,q),U.removeEventListener(kp,oe)}}},[m.viewport,E,l,c,M]),v.useEffect(()=>{s&&!m.isClosePausedRef.current&&M(E)},[s,E,m.isClosePausedRef,M]),v.useEffect(()=>(I(),()=>j()),[I,j]);const W=v.useMemo(()=>b?TS(b):null,[b]);return m.viewport?f.jsxs(f.Fragment,{children:[W&&f.jsx(iL,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),f.jsx(nL,{scope:r,onClose:$,children:kr.createPortal(f.jsx(vg.ItemSlot,{scope:r,children:f.jsx($I,{asChild:!0,onEscapeKeyDown:H(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||$(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:f.jsx(de.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:H(e.onKeyDown,U=>{U.key==="Escape"&&(a==null||a(U.nativeEvent),U.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:H(e.onPointerDown,U=>{U.button===0&&(_.current={x:U.clientX,y:U.clientY})}),onPointerMove:H(e.onPointerMove,U=>{if(!_.current)return;const oe=U.clientX-_.current.x,q=U.clientY-_.current.y,re=!!x.current,R=["left","right"].includes(m.swipeDirection),k=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,B=R?k(0,oe):0,te=R?0:k(0,q),J=U.pointerType==="touch"?10:2,le={x:B,y:te},ie={originalEvent:U,delta:le};re?(x.current=le,Cc(eL,d,ie,{discrete:!1})):iw(le,m.swipeDirection,J)?(x.current=le,Cc(ZI,u,ie,{discrete:!1}),U.target.setPointerCapture(U.pointerId)):(Math.abs(oe)>J||Math.abs(q)>J)&&(_.current=null)}),onPointerUp:H(e.onPointerUp,U=>{const oe=x.current,q=U.target;if(q.hasPointerCapture(U.pointerId)&&q.releasePointerCapture(U.pointerId),x.current=null,_.current=null,oe){const re=U.currentTarget,R={originalEvent:U,delta:oe};iw(oe,m.swipeDirection,m.swipeThreshold)?Cc(rL,h,R,{discrete:!0}):Cc(tL,p,R,{discrete:!0}),re.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),iL=e=>{const{__scopeToast:t,children:r,...n}=e,o=kd(Dl,t),[s,i]=v.useState(!1),[a,l]=v.useState(!1);return cL(()=>i(!0)),v.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:f.jsx(Ll,{asChild:!0,children:f.jsx(Pd,{...n,children:s&&f.jsxs(f.Fragment,{children:[o.label," ",r]})})})},aL="ToastTitle",wS=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return f.jsx(de.div,{...n,ref:t})});wS.displayName=aL;var lL="ToastDescription",bS=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return f.jsx(de.div,{...n,ref:t})});bS.displayName=lL;var _S="ToastAction",xS=v.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?f.jsx(SS,{altText:r,asChild:!0,children:f.jsx(yg,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${_S}\`. Expected non-empty \`string\`.`),null)});xS.displayName=_S;var ES="ToastClose",yg=v.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,o=oL(ES,r);return f.jsx(SS,{asChild:!0,children:f.jsx(de.button,{type:"button",...n,ref:t,onClick:H(e.onClick,o.onClose)})})});yg.displayName=ES;var SS=v.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return f.jsx(de.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function TS(e){const t=[];
101return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),uL(n)){const o=n.ariaHidden||n.hidden||n.style.display==="none",s=n.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...TS(n))}}),t}function Cc(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?mg(o,s):o.dispatchEvent(s)}var iw=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),s=n>o;return t==="left"||t==="right"?s&&n>r:!s&&o>r};function cL(e=()=>{}){const t=Bt(e);dt(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function uL(e){return e.nodeType===e.ELEMENT_NODE}function dL(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Bf(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var fL=pS,CS=gS,PS=yS,kS=wS,OS=bS,RS=xS,jS=yg;const aw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,lw=JE,Od=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return lw(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=r==null?void 0:r[c],d=s==null?void 0:s[c];if(u===null)return null;const p=aw(u)||aw(d);return o[c][p]}),a=r&&Object.entries(r).reduce((c,u)=>{let[d,p]=u;return p===void 0||(c[d]=p),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:p,...h}=u;return Object.entries(h).every(g=>{let[m,b]=g;return Array.isArray(b)?b.includes({...s,...a}[m]):{...s,...a}[m]===b})?[...c,d,p]:c},[]);return lw(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
102 * @license lucide-react v0.462.0 - ISC
103 *
104 * This source code is licensed under the ISC license.
105 * See the LICENSE file in the root directory of this source tree.
106 */const hL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),AS=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
107 * @license lucide-react v0.462.0 - ISC
108 *
109 * This source code is licensed under the ISC license.
110 * See the LICENSE file in the root directory of this source tree.
111 */var pL={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
112 * @license lucide-react v0.462.0 - ISC
113 *
114 * This source code is licensed under the ISC license.
115 * See the LICENSE file in the root directory of this source tree.
116 */const mL=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:s,iconNode:i,...a},l)=>v.createElement("svg",{ref:l,...pL,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:AS("lucide",o),...a},[...i.map(([c,u])=>v.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
117 * @license lucide-react v0.462.0 - ISC
118 *
119 * This source code is licensed under the ISC license.
120 * See the LICENSE file in the root directory of this source tree.
121 */const ot=(e,t)=>{const r=v.forwardRef(({className:n,...o},s)=>v.createElement(mL,{ref:s,iconNode:t,className:AS(`lucide-${hL(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
122 * @license lucide-react v0.462.0 - ISC
123 *
124 * This source code is licensed under the ISC license.
125 * See the LICENSE file in the root directory of this source tree.
126 */const gL=ot("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
127 * @license lucide-react v0.462.0 - ISC
128 *
129 * This source code is licensed under the ISC license.
130 * See the LICENSE file in the root directory of this source tree.
131 */const NS=ot("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
132 * @license lucide-react v0.462.0 - ISC
133 *
134 * This source code is licensed under the ISC license.
135 * See the LICENSE file in the root directory of this source tree.
136 */const IS=ot("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
137 * @license lucide-react v0.462.0 - ISC
138 *
139 * This source code is licensed under the ISC license.
140 * See the LICENSE file in the root directory of this source tree.
141 */const vL=ot("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
142 * @license lucide-react v0.462.0 - ISC
143 *
144 * This source code is licensed under the ISC license.
145 * See the LICENSE file in the root directory of this source tree.
146 */const yL=ot("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
147 * @license lucide-react v0.462.0 - ISC
148 *
149 * This source code is licensed under the ISC license.
150 * See the LICENSE file in the root directory of this source tree.
151 */const wL=ot("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
152 * @license lucide-react v0.462.0 - ISC
153 *
154 * This source code is licensed under the ISC license.
155 * See the LICENSE file in the root directory of this source tree.
156 */const bL=ot("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
157 * @license lucide-react v0.462.0 - ISC
158 *
159 * This source code is licensed under the ISC license.
160 * See the LICENSE file in the root directory of this source tree.
161 */const _L=ot("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
162 * @license lucide-react v0.462.0 - ISC
163 *
164 * This source code is licensed under the ISC license.
165 * See the LICENSE file in the root directory of this source tree.
166 */const xL=ot("CloudRain",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M16 14v6",key:"1j4efv"}],["path",{d:"M8 14v6",key:"17c4r9"}],["path",{d:"M12 16v6",key:"c8a4gj"}]]);/**
167 * @license lucide-react v0.462.0 - ISC
168 *
169 * This source code is licensed under the ISC license.
170 * See the LICENSE file in the root directory of this source tree.
171 */const cw=ot("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
172 * @license lucide-react v0.462.0 - ISC
173 *
174 * This source code is licensed under the ISC license.
175 * See the LICENSE file in the root directory of this source tree.
176 */const fn=ot("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
177 * @license lucide-react v0.462.0 - ISC
178 *
179 * This source code is licensed under the ISC license.
180 * See the LICENSE file in the root directory of this source tree.
181 */const Fu=ot("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
182 * @license lucide-react v0.462.0 - ISC
183 *
184 * This source code is licensed under the ISC license.
185 * See the LICENSE file in the root directory of this source tree.
186 */const LS=ot("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
187 * @license lucide-react v0.462.0 - ISC
188 *
189 * This source code is licensed under the ISC license.
190 * See the LICENSE file in the root directory of this source tree.
191 */const EL=ot("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/**
192 * @license lucide-react v0.462.0 - ISC
193 *
194 * This source code is licensed under the ISC license.
195 * See the LICENSE file in the root directory of this source tree.
196 */const SL=ot("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
197 * @license lucide-react v0.462.0 - ISC
198 *
199 * This source code is licensed under the ISC license.
200 * See the LICENSE file in the root directory of this source tree.
201 */const Ra=ot("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
202 * @license lucide-react v0.462.0 - ISC
203 *
204 * This source code is licensed under the ISC license.
205 * See the LICENSE file in the root directory of this source tree.
206 */const TL=ot("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/**
207 * @license lucide-react v0.462.0 - ISC
208 *
209 * This source code is licensed under the ISC license.
210 * See the LICENSE file in the root directory of this source tree.
211 */const Rd=ot("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),CL=fL,DS=v.forwardRef(({className:e,...t},r)=>f.jsx(CS,{ref:r,className:pe("fixed top-0 z-[1300] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));DS.displayName=CS.displayName;const PL=Od("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),MS=v.forwardRef(({className:e,variant:t,...r},n)=>f.jsx(PS,{ref:n,className:pe(PL({variant:t}),e),...r}));MS.displayName=PS.displayName;
211const kL=v.forwardRef(({className:e,...t},r)=>f.jsx(RS,{ref:r,className:pe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));kL.displayName=RS.displayName;const $S=v.forwardRef(({className:e,...t},r)=>f.jsx(jS,{ref:r,className:pe("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:f.jsx(Rd,{className:"h-4 w-4"})}));$S.displayName=jS.displayName;const FS=v.forwardRef(({className:e,...t},r)=>f.jsx(kS,{ref:r,className:pe("text-sm font-semibold",e),...t}));FS.displayName=kS.displayName;const US=v.forwardRef(({className:e,...t},r)=>f.jsx(OS,{ref:r,className:pe("text-sm opacity-90",e),...t}));US.displayName=OS.displayName;function OL(){const{toasts:e}=aS();return f.jsxs(CL,{children:[e.map(function({id:t,title:r,description:n,action:o,...s}){return f.jsxs(MS,{...s,children:[f.jsxs("div",{className:"grid gap-1",children:[r&&f.jsx(FS,{children:r}),n&&f.jsx(US,{children:n})]}),o,f.jsx($S,{})]},t)}),f.jsx(DS,{})]})}var uw=["light","dark"],RL="(prefers-color-scheme: dark)",jL=v.createContext(void 0),AL={setTheme:e=>{},themes:[]},NL=()=>{var e;return(e=v.useContext(jL))!=null?e:AL};v.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:o,defaultTheme:s,value:i,attrs:a,nonce:l})=>{let c=s==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=o?uw.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(g,m=!1,b=!0)=>{let w=i?i[g]:g,y=m?g+"|| ''":`'${w}'`,_="";return o&&b&&!m&&uw.includes(g)&&(_+=`d.style.colorScheme = '${g}';`),r==="class"?m||w?_+=`c.add(${y})`:_+="null":w&&(_+=`d[s](n,${y})`),_},h=e?`!function(){${u}${p(e)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${RL}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${c?"":"else{"+p(s,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(s,!1,!1)};}${d}}catch(t){}}();`;return v.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var IL=e=>{switch(e){case"success":return ML;case"info":return FL;case"warning":return $L;case"error":return UL;default:return null}},LL=Array(12).fill(0),DL=({visible:e,className:t})=>A.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},A.createElement("div",{className:"sonner-spinner"},LL.map((r,n)=>A.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),ML=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),$L=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),FL=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),UL=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},A.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),BL=A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},A.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),A.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),zL=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Rp=1,VL=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
211{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Rp++,s=this.toasts.find(a=>a.id===o),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:r}),{...a,...e,id:o,dismissible:i,title:r}):a):this.addToast({title:r,...n,dismissible:i,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
211this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),o=r!==void 0,s,i=n.then(async l=>{if(s=["resolve",l],A.isValidElement(l))o=!1,this.create({id:r,type:"default",message:l});else if(HL(l)&&!l.ok){o=!1;let c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,u=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:c,description:u})}else if(t.success!==void 0){o=!1;let c=typeof t.success=="function"?await t.success(l):t.success,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error=="function"?await t.error(l):t.error,u=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var l;o&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,c)=>i.then(()=>s[0]==="reject"?c(s[1]):l(s[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Rp++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Nt=new VL,WL=(e,t)=>{let r=(t==null?void 0:t.id)||Rp++;return Nt.addToast({title:e,...t,id:r}),r},HL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",qL=WL,GL=()=>Nt.toasts,KL=()=>Nt.getActiveToasts(),sn=Object.assign(qL,{success:Nt.success,info:Nt.info,warning:Nt.warning,error:Nt.error,custom:Nt.custom,message:Nt.message,promise:Nt.promise,dismiss:Nt.dismiss,loading:Nt.loading},{getHistory:GL,getToasts:KL});function QL(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}QL(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
211left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
211:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
211--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
212`);function Pc(e){return e.label!==void 0}var YL=3,JL="32px",XL="16px",dw=4e3,ZL=356,eD=14,tD=20,rD=200;function mr(...e){return e.filter(Boolean).join(" ")}function nD(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var oD=e=>{var t,r,n,o,s,i,a,l,c,u,d;let{invert:p,toast:h,unstyled:g,interacting:m,setHeights:b,visibleToasts:w,heights:y,index:_,toasts:x,expanded:E,removeToast:S,defaultRichColors:C,closeButton:P,style:I,cancelButtonStyle:j,actionButtonStyle:$,className:M="",descriptionClassName:W="",duration:U,position:oe,gap:q,loadingIcon:re,expandByDefault:R,classNames:k,icons:B,closeButtonAriaLabel:te="Close toast",pauseWhenPageIsHidden:J}=e,[le,ie]=A.useState(null),[je,Ae]=A.useState(null),[V,Se]=A.useState(!1),[Te,we]=A.useState(!1),[be,Ce]=A.useState(!1),[ft,Xt]=A.useState(!1),[Po,kn]=A.useState(!1),[ko,oa]=A.useState(0),[Ts,sv]=A.useState(0),sa=A.useRef(h.duration||U||dw),iv=A.useRef(null),Oo=A.useRef(null),qP=_===0,GP=_+1<=w,Zt=h.type,Cs=h.dism
212issible!==!1,KP=h.className||"",QP=h.descriptionClassName||"",Ql=A.useMemo(()=>y.findIndex(ce=>ce.toastId===h.id)||0,[y,h.id]),YP=A.useMemo(()=>{var ce;return(ce=h.closeButton)!=null?ce:P},[h.closeButton,P]),av=A.useMemo(()=>h.duration||U||dw,[h.duration,U]),ef=A.useRef(0),Ps=A.useRef(0),lv=A.useRef(0),ks=A.useRef(null),[JP,XP]=oe.split("-"),cv=A.useMemo(()=>y.reduce((ce,Ne,Fe)=>Fe>=Ql?ce:ce+Ne.height,0),[y,Ql]),uv=zL(),ZP=h.invert||p,tf=Zt==="loading";Ps.current=A.useMemo(()=>Ql*q+cv,[Ql,cv]),A.useEffect(()=>{sa.current=av},[av]),A.useEffect(()=>{Se(!0)},[]),A.useEffect(()=>{let ce=Oo.current;if(ce){let Ne=ce.getBoundingClientRect().height;return sv(Ne),b(Fe=>[{toastId:h.id,height:Ne,position:h.position},...Fe]),()=>b(Fe=>Fe.filter(dr=>dr.toastId!==h.id))}},[b,h.id]),A.useLayoutEffect(()=>{if(!V)return;let ce=Oo.current,Ne=ce.style.height;ce.style.height="auto";let Fe=ce.getBoundingClientRect().height;ce.style.height=Ne,sv(Fe),b(dr=>dr.find(fr=>fr.toastId===h.id)?dr.map(fr=>fr.toastId===h.id?{...fr,height:Fe}:fr):[{toastId:h.id,height:Fe,position:h.position},...dr])},[V,h.title,h.description,b,h.id]);let On=A.useCallback(()=>{we(!0),oa(Ps.current),b(ce=>ce.filter(Ne=>Ne.toastId!==h.id)),setTimeout(()=>{S(h)},rD)},[h,S,b,Ps]);A.useEffect(()=>{if(h.promise&&Zt==="loading"||h.duration===1/0||h.type==="loading")return;let ce;return E||m||J&&uv?(()=>{if(lv.current<ef.current){let Ne=new Date().getTime()-ef.current;sa.current=sa.current-Ne}lv.current=new Date().getTime()})():sa.current!==1/0&&(ef.current=new Date().getTime(),ce=setTimeout(()=>{var Ne;(Ne=h.onAutoClose)==null||Ne.call(h,h),On()},sa.current)),()=>clearTimeout(ce)},[E,m,h,Zt,J,uv,On]),A.useEffect(()=>{h.delete&&On()},[On,h.delete]);function ek(){var ce,Ne,Fe;return B!=null&&B.loading?A.createElement("div",{className:mr(k==null?void 0:k.loader,(ce=h==null?void 0:h.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":Zt==="loading"},B.loading):re?A.createElement("div",{className:mr(k==null?void 0:k.loader,(Ne=h==null?void 0:h.classNames)==null?void 0:Ne.loader,"sonner-loader"),"data-visible":Zt==="loading"},re):A.createElement(DL,{className:mr(k==null?void 0:k.loader,(Fe=h==null?void 0:h.classNames)==null?void 0:Fe.loader),visible:Zt==="loading"})}return A.createElement("li",{tabIndex:0,ref:Oo,className:mr(M,KP,k==null?void 0:k.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[Zt],(r=h==null?void 0:h.classNames)==null?void 0:r[Zt]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:C,"data-styled":!(h.jsx||h.unstyled||g),"data-mounted":V,"data-promise":!!h.promise,"data-swiped":Po,"data-removed":Te,"data-visible":GP,"data-y-position":JP,"data-x-position":XP,"data-index":_,"data-front":qP,"data-swiping":be,"data-dismissible":Cs,"data-type":Zt,"data-invert":ZP,"data-swipe-out":ft,"data-swipe-direction":je,"data-expanded":!!(E||R&&V),style:{"--index":_,"--toasts-before":_,"--z-index":x.length-_,"--offset":`${Te?ko:Ps.current}px`,"--initial-height":R?"auto":`${Ts}px`,...I,...h.style},onDragEnd:()=>{Ce(!1),ie(null),ks.current=null},onPointerDown:ce=>{tf||!Cs||(iv.current=new Date,oa(Ps.current),ce.target.setPointerCapture(ce.pointerId),ce.target.tagName!=="BUTTON"&&(Ce(!0),ks.current={x:ce.clientX,y:ce.clientY}))},onPointerUp:()=>{var ce,Ne,Fe,dr;if(ft||!Cs)return;ks.current=null;let fr=Number(((ce=Oo.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Rn=Number(((Ne=Oo.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ro=new Date().getTime()-((Fe=iv.current)==null?void 0:Fe.getTime()),hr=le==="x"?fr:Rn,jn=Math.abs(hr)/Ro;if(Math.abs(hr)>=tD||jn>.11){oa(Ps.current),(dr=h.onDismiss)==null||dr.call(h,h),Ae(le==="x"?fr>0?"right":"left":Rn>0?"down":"up"),On(),Xt(!0),kn(!1);return}Ce(!1),ie(null)},onPointerMove:ce=>{var Ne,Fe,dr,fr;if(!ks.current||!Cs||((Ne=window.getSelection())==null?void 0:Ne.toString().length)>0)return;let Rn=ce.clientY-ks.current.y,Ro=ce.clientX-ks.current.x,hr=(Fe=e.swipeDirections)!=null?Fe:nD(oe);!le&&(Math.abs(Ro)>1||Math.abs(Rn)>1)&&ie(Math.abs(Ro)>Math.abs(Rn)?"x":"y");let jn={x:0,y:0};le==="y"?(hr.includes("top")||hr.includes("bottom"))&&(hr.includes("top")&&Rn<0||hr.includes("bottom")&&Rn>0)&&(jn.y=Rn):le==="x"&&(hr.includes("left")||hr.includes("right"))&&(hr.includes("left")&&Ro<0||hr.includes("right")&&Ro>0)&&(jn.x=Ro),(Math.abs(jn.x)>0||Math.abs(jn.y)>0)&&kn(!0),(dr=Oo.current)==null||dr.style.setProperty("--swipe-amount-x",`${jn.x}px`),(fr=Oo.current)==null||fr.style.setProperty("--swipe-amount-y",`${jn.y}px`)}},YP&&!h.jsx?A.createElement("button",{"aria-label":te,"data-disabled":tf,"data-close-button":!0,onClick:tf||!Cs?()=>{}:()=>{var ce;On(),(ce=h.onDismiss)==null||ce.call(h,h)},className:mr(k==null?void 0:k.closeButton,(o=h==null?void 0:h.classNames)==null?void 0:o.closeButton)},(s=B==null?void 0:B.close)!=null?s:BL):null,h.jsx||v.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:A.createElement(A.Fragment,null,Zt||h.icon||h.promise?A.createElement("div",{"data-icon":"",className:mr(k==null?void 0:k.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||ek():null,h.type!=="loading"?h.icon||(B==null?void 0:B[Zt])||IL(Zt):null):null,A.createElement("div",{"data-content":"",className:mr(k==null?void 0:k.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},A.createElement("div",{"data-title":"",className:mr(k==null?void 0:k.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?A.createElement("div",{"data-description":"",className:mr(W,QP,k==null?void 0:k.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),v.isValidElement(h.cancel)?h.cancel:h.cancel&&Pc(h.c
212ancel)?A.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||j,onClick:ce=>{var Ne,Fe;Pc(h.cancel)&&Cs&&((Fe=(Ne=h.cancel).onClick)==null||Fe.call(Ne,ce),On())},className:mr(k==null?void 0:k.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,v.isValidElement(h.action)?h.action:h.action&&Pc(h.action)?A.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||$,onClick:ce=>{var Ne,Fe;Pc(h.action)&&((Fe=(Ne=h.action).onClick)==null||Fe.call(Ne,ce),!ce.defaultPrevented&&On())},className:mr(k==null?void 0:k.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function fw(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function sD(e,t){let r={};return[e,t].forEach((n,o)=>{let s=o===1,i=s?"--mobile-offset":"--offset",a=s?XL:JL;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${i}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${i}-${c}`]=a:r[`${i}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var iD=v.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:i,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:p,style:h,visibleToasts:g=YL,toastOptions:m,dir:b=fw(),gap:w=eD,loadingIcon:y,icons:_,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:E}=e,[S,C]=A.useState([]),P=A.useMemo(()=>Array.from(new Set([n].concat(S.filter(J=>J.position).map(J=>J.position)))),[S,n]),[I,j]=A.useState([]),[$,M]=A.useState(!1),[W,U]=A.useState(!1),[oe,q]=A.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),re=A.useRef(null),R=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=A.useRef(null),B=A.useRef(!1),te=A.useCallback(J=>{C(le=>{var ie;return(ie=le.find(je=>je.id===J.id))!=null&&ie.delete||Nt.dismiss(J.id),le.filter(({id:je})=>je!==J.id)})},[]);return A.useEffect(()=>Nt.subscribe(J=>{if(J.dismiss){C(le=>le.map(ie=>ie.id===J.id?{...ie,delete:!0}:ie));return}setTimeout(()=>{oi.flushSync(()=>{C(le=>{let ie=le.findIndex(je=>je.id===J.id);return ie!==-1?[...le.slice(0,ie),{...le[ie],...J},...le.slice(ie+1)]:[J,...le]})})})}),[]),A.useEffect(()=>{if(u!=="system"){q(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:le})=>{q(le?"dark":"light")})}catch{J.addListener(({matches:ie})=>{try{q(ie?"dark":"light")}catch(je){console.error(je)}})}},[u]),A.useEffect(()=>{S.length<=1&&M(!1)},[S]),A.useEffect(()=>{let J=le=>{var ie,je;o.every(Ae=>le[Ae]||le.code===Ae)&&(M(!0),(ie=re.current)==null||ie.focus()),le.code==="Escape"&&(document.activeElement===re.current||(je=re.current)!=null&&je.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[o]),A.useEffect(()=>{if(re.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,B.current=!1)}},[re.current]),A.createElement("section",{ref:t,"aria-label":`${x} ${R}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((J,le)=>{var ie;let[je,Ae]=J.split("-");return S.length?A.createElement("ol",{key:J,dir:b==="auto"?fw():b,tabIndex:-1,ref:re,className:a,"data-sonner-toaster":!0,"data-theme":oe,"data-y-position":je,"data-lifted":$&&S.length>1&&!s,"data-x-position":Ae,style:{"--front-toast-height":`${((ie=I[0])==null?void 0:ie.height)||0}px`,"--width":`${ZL}px`,"--gap":`${w}px`,...h,...sD(l,c)},onBlur:V=>{B.current&&!V.currentTarget.contains(V.relatedTarget)&&(B.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||B.current||(B.current=!0,k.current=V.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{W||M(!1)},onDragEnd:()=>M(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},S.filter(V=>!V.position&&le===0||V.position===J).map((V,Se)=>{var Te,we;return A.createElement(oD,{key:V.id,icons:_,index:Se,toast:V,defaultRichColors:d,duration:(Te=m==null?void 0:m.duration)!=null?Te:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:g,closeButton:(we=m==null?void 0:m.closeButton)!=null?we:i,interacting:W,position:J,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:te,toasts:S.filter(be=>be.position==V.position),heights:I.filter(be=>be.position==V.position),setHeights:j,expandByDefault:s,gap:w,loadingIcon:y,expanded:$,pauseWhenPageIsHidden:E,swipeDirections:e.swipeDirections})})):null}))});const aD=({...e})=>{const{theme:t="system"}=NL();return f.jsx(iD,{theme:t,className:"toaster group",position:"top-center",offset:88,mobileOffset:88,toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-l-4 group-[.toaster]:border-primary group-[.toaster]:shadow-xl group-[.toaster]:rounded-md",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var lD=lm[" useId ".trim().toString()]||(()=>{}),cD=0;function Qr(e){const[t,r]=v.useState(lD());return dt(()=>{r(n=>n??String(cD++))},[e]),t?`radix-${t}`:""}const uD=["top","right","bottom","left"],go=Math.min,Vt=Math.max,Uu=Math.round,kc=Math.floor,Yr=e=>({x:e,y:e}
vendor: 9,584 bytes, line 212
212),dD={left:"right",right:"left",bottom:"top",top:"bottom"},fD={start:"end",end:"start"};function jp(e,t,r){return Vt(e,go(t,r))}function _n(e,t){return typeof e=="function"?e(t):e}function xn(e){return e.split("-")[0]}function Ki(e){return e.split("-")[1]}function wg(e){return e==="x"?"y":"x"}function bg(e){return e==="y"?"height":"width"}const hD=new Set(["top","bottom"]);function Wr(e){return hD.has(xn(e))?"y":"x"}function _g(e){return wg(Wr(e))}function pD(e,t,r){r===void 0&&(r=!1);const n=Ki(e),o=_g(e),s=bg(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Bu(i)),[i,Bu(i)]}function mD(e){const t=Bu(e);return[Ap(e),t,Ap(t)]}function Ap(e){return e.replace(/start|end/g,t=>fD[t])}const hw=["left","right"],pw=["right","left"],gD=["top","bottom"],vD=["bottom","top"];function yD(e,t,r){switch(e){case"top":case"bottom":return r?t?pw:hw:t?hw:pw;case"left":case"right":return t?gD:vD;default:return[]}}function wD(e,t,r,n){const o=Ki(e);let s=yD(xn(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ap)))),s}function Bu(e){return e.replace(/left|right|bottom|top/g,t=>dD[t])}function bD(e){return{top:0,right:0,bottom:0,left:0,...e}}function BS(e){return typeof e!="number"?bD(e):{top:e,right:e,bottom:e,left:e}}function zu(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function mw(e,t,r){let{reference:n,floating:o}=e;const s=Wr(t),i=_g(t),a=bg(i),l=xn(t),c=s==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:n.y-o.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-o.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Ki(t)){case"start":h[i]-=p*(r&&c?-1:1);break;case"end":h[i]+=p*(r&&c?-1:1);break}return h}const _D=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=mw(c,n,l),p=n,h={},g=0;for(let m=0;m<a.length;m++){const{name:b,fn:w}=a[m],{x:y,y:_,data:x,reset:E}=await w({x:u,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=_??d,h={...h,[b]:{...h[b],...x}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=mw(c,p,l)),m=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}};async function fl(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=_n(t,e),g=BS(h),b=a[p?d==="floating"?"reference":"floating":d],w=zu(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(b)))==null||r?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),x=await(s.isElement==null?void 0:s.isElement(_))?await(s.getScale==null?void 0:s.getScale(_))||{x:1,y:1}:{x:1,y:1},E=zu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:_,strategy:l}):y);return{top:(w.top-E.top+g.top)/x.y,bottom:(E.bottom-w.bottom+g.bottom)/x.y,left:(w.left-E.left+g.left)/x.x,right:(E.right-w.right+g.right)/x.x}}const xD=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=_n(e,t)||{};if(c==null)return{};const d=BS(u),p={x:r,y:n},h=_g(o),g=bg(h),m=await i.getDimensions(c),b=h==="y",w=b?"top":"left",y=b?"bottom":"right",_=b?"clientHeight":"clientWidth",x=s.reference[g]+s.reference[h]-p[h]-s.floating[g],E=p[h]-s.reference[h],S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=S?S[_]:0;(!C||!await(i.isElement==null?void 0:i.isElement(S)))&&(C=a.floating[_]||s.floating[g]);const P=x/2-E/2,I=C/2-m[g]/2-1,j=go(d[w],I),$=go(d[y],I),M=j,W=C-m[g]-$,U=C/2-m[g]/2+P,oe=jp(M,U,W),q=!l.arrow&&Ki(o)!=null&&U!==oe&&s.reference[g]/2-(U<M?j:$)-m[g]/2<0,re=q?U<M?U-M:U-W:0;return{[h]:p[h]+re,data:{[h]:oe,centerOffset:U-oe-re,...q&&{alignmentOffset:re}},reset:q}}}),ED=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=_n(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=xn(o),y=Wr(a),_=xn(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=p||(_||!m?[Bu(a)]:mD(a)),S=g!=="none";!p&&S&&E.push(...wD(a,m,g,x));const C=[a,...E],P=await fl(t,b),I=[];let j=((n=s.flip)==null?void 0:n.overflows)||[];if(u&&I.push(P[w]),d){const U=pD(o,i,x);I.push(P[U[0]],P[U[1]])}if(j=[...j,{placement:o,overflows:I}],!I.every(U=>U<=0)){var $,M;const U=((($=s.flip)==null?void 0:$.index)||0)+1,oe=C[U];if(oe&&(!(d==="alignment"?y!==Wr(oe):!1)||j.every(R=>R.overflows[0]>0&&Wr(R.placement)===y)))return{data:{index:U,overflows:j},reset:{placement:oe}};let q=(M=j.filter(re=>re.overflows[0]<=0).sort((re,R)=>re.overflows[1]-R.overflows[1])[0])==null?void 0:M.placement;if(!q)switch(h){case"bestFit":{var W;const re=(W=j.filter(R=>{if(S){const k=Wr(R.placement);return k===y||k==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(k=>k>0).reduce((k,B)=>k+B,0)]).sort((R,k)=>R[1]-k[1])[0])==null?void 0:W[0];re&&(q=re);break}case"initialPlacement":q=a;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function gw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vw(e){return uD.some(t=>e[t]>=0)}const SD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=_n(e,t);switch(n){case"referenceHidden":{const s=await fl(t,{...o,elementContext:"reference"}),i=gw(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:vw(i)}}}case"escaped":{const s=await fl(t,{...o,altBoundary:!0}),i=gw(s,r.floating);return{data:{escapedOffsets:i,escaped:vw(i)}}}default:return{}}}}},zS=new Set(["left","top"]);async function TD(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=xn(r),a=Ki(r),l=Wr(r)==="y",c=zS.has(i)?-1:1,u=s&&l?-1:1,d=_n(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}const CD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await TD(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},PD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:b=>{let{x:w,y}=b;return{x:w,y}}},...l}=_n(e,t),c={x:r,y:n},u=await fl(t,l),d=Wr(xn(o)),p=wg(d);let h=c[p],g=c[d];if(s){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",y=h+u[b],_=h-u[w];h=jp(y,h,_)}if(i){const b=d==="y"?"top":"left",w=d==="y"?"bottom":"right",y=g+u[b],_=g-u[w];g=jp(y,g,_)}const m=a.fn({...t,[p]:h,[d]:g});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:s,[d]:i}}}}}},kD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=_n(e,t),u={x:r,y:n},d=Wr(o),p=wg(d);let h=u[p],g=u[d];const m=_n(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const _=p==="y"?"height":"width",x=s.reference[p]-s.floating[_]+b.mainAxis,E=s.reference[p]+s.reference[_]-b.mainAxis;h<x?h=x:h>E&&(h=E)}if(c){var w,y;const _=p==="y"?"width":"height",x=zS.has(xn(o)),E=s.reference[d]-s.floating[_]+(x&&((w=i.offset)==null?void 0:w[d])||0)+(x?0:b.crossAxis),S=s.reference[d]+s.reference[_]+(x?0:((y=i.offset)==null?void 0:y[d])||0)-(x?b.crossAxis:0);g<E?g=E:g>S&&(g=S)}return{[p]:h,[d]:g}}}},OD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=_n(e,t),u=await fl(t,c),d=xn(o),p=Ki(o),h=Wr(o)==="y",{width:g,height:m}=s.floating;let b,w;d==="top"||d==="bottom"?(b=d,w=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(w=d,b=p==="end"?"top":"bottom");const y=m-u.top-u.bottom,_=g-u.left-u.right,x=go(m-u[b],y),E=go(g-u[w],_),S=!t.middlewareData.shift;let C=x,P=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=y),S&&!p){const j=Vt(u.left,0),$=Vt(u.right,0),M=Vt(u.top,0),W=Vt(u.bottom,0);h?P=g-2*(j!==0||$!==0?j+$:Vt(u.left,u.right)):C=m-2*(M!==0||W!==0?M+W:Vt(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:C});const I=await i.getDimensions(a.floating);return g!==I.width||m!==I.height?{reset:{rects:!0}}:{}}}};
vendor: 4,239 bytes, line 212
212function jd(){return typeof window<"u"}function Qi(e){return VS(e)?(e.nodeName||"").toLowerCase():"#document"}function Kt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(VS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function VS(e){return jd()?e instanceof Node||e instanceof Kt(e).Node:!1}function Rr(e){return jd()?e instanceof Element||e instanceof Kt(e).Element:!1}function Jr(e){return jd()?e instanceof HTMLElement||e instanceof Kt(e).HTMLElement:!1}function yw(e){return!jd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kt(e).ShadowRoot}const RD=new Set(["inline","contents"]);function Ml(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=jr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!RD.has(o)}const jD=new Set(["table","td","th"]);function AD(e){return jD.has(Qi(e))}const ND=[":popover-open",":modal"];function Ad(e){return ND.some(t=>{try{return e.matches(t)}catch{return!1}})}const ID=["transform","translate","scale","rotate","perspective"],LD=["transform","translate","scale","rotate","perspective","filter"],DD=["paint","layout","strict","content"];function xg(e){const t=Eg(),r=Rr(e)?jr(e):e;return ID.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||LD.some(n=>(r.willChange||"").includes(n))||DD.some(n=>(r.contain||"").includes(n))}function MD(e){let t=vo(e);for(;Jr(t)&&!Ai(t);){if(xg(t))return t;if(Ad(t))return null;t=vo(t)}return null}function Eg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const $D=new Set(["html","body","#document"]);function Ai(e){return $D.has(Qi(e))}function jr(e){return Kt(e).getComputedStyle(e)}function Nd(e){return Rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function vo(e){if(Qi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||yw(e)&&e.host||Zr(e);return yw(t)?t.host:t}function WS(e){const t=vo(e);return Ai(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jr(t)&&Ml(t)?t:WS(t)}function hl(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=WS(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=Kt(o);if(s){const a=Np(i);return t.concat(i,i.visualViewport||[],Ml(o)?o:[],a&&r?hl(a):[])}return t.concat(o,hl(o,[],r))}function Np(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HS(e){const t=jr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Jr(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=Uu(r)!==s||Uu(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Sg(e){return Rr(e)?e:e.contextElement}function li(e){const t=Sg(e);if(!Jr(t))return Yr(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=HS(t);let i=(s?Uu(r.width):r.width)/n,a=(s?Uu(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const FD=Yr(0);function qS(e){const t=Kt(e);return!Eg()||!t.visualViewport?FD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function UD(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Kt(e)?!1:t}function hs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Sg(e);let i=Yr(1);t&&(n?Rr(n)&&(i=li(n)):i=li(e));const a=UD(s,r,n)?qS(s):Yr(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const p=Kt(s),h=n&&Rr(n)?Kt(n):n;let g=p,m=Np(g);for(;m&&n&&h!==g;){const b=li(m),w=m.getBoundingClientRect(),y=jr(m),_=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,x=w.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=_,c+=x,g=Kt(m),m=Np(g)}}return zu({width:u,height:d,x:l,y:c})}function Tg(e,t){const r=Nd(e).scrollLeft;return t?t.left+r:hs(Zr(e)).left+r}function GS(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Tg(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function BD(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Zr(n),a=t?Ad(t.floating):!1;if(n===i||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Yr(1);const u=Yr(0),d=Jr(n);
vendor: 5,509 bytes, line 212
212if((d||!d&&!s)&&((Qi(n)!=="body"||Ml(i))&&(l=Nd(n)),Jr(n))){const h=hs(n);c=li(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const p=i&&!d&&!s?GS(i,l,!0):Yr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function zD(e){return Array.from(e.getClientRects())}function VD(e){const t=Zr(e),r=Nd(e),n=e.ownerDocument.body,o=Vt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=Vt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Tg(e);const a=-r.scrollTop;return jr(n).direction==="rtl"&&(i+=Vt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}function WD(e,t){const r=Kt(e),n=Zr(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Eg();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}const HD=new Set(["absolute","fixed"]);function qD(e,t){const r=hs(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=Jr(e)?li(e):Yr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:i,height:a,x:l,y:c}}function ww(e,t,r){let n;if(t==="viewport")n=WD(e,r);else if(t==="document")n=VD(Zr(e));else if(Rr(t))n=qD(t,r);else{const o=qS(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return zu(n)}function KS(e,t){const r=vo(e);return r===t||!Rr(r)||Ai(r)?!1:jr(r).position==="fixed"||KS(r,t)}function GD(e,t){const r=t.get(e);if(r)return r;let n=hl(e,[],!1).filter(a=>Rr(a)&&Qi(a)!=="body"),o=null;const s=jr(e).position==="fixed";let i=s?vo(e):e;for(;Rr(i)&&!Ai(i);){const a=jr(i),l=xg(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&HD.has(o.position)||Ml(i)&&!l&&KS(e,i))?n=n.filter(u=>u!==i):o=a,i=vo(i)}return t.set(e,n),n}function KD(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?Ad(t)?[]:GD(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((c,u)=>{const d=ww(t,u,o);return c.top=Vt(d.top,c.top),c.right=go(d.right,c.right),c.bottom=go(d.bottom,c.bottom),c.left=Vt(d.left,c.left),c},ww(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function QD(e){const{width:t,height:r}=HS(e);return{width:t,height:r}}function YD(e,t,r){const n=Jr(t),o=Zr(t),s=r==="fixed",i=hs(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Yr(0);function c(){l.x=Tg(o)}if(n||!n&&!s)if((Qi(t)!=="body"||Ml(o))&&(a=Nd(t)),n){const h=hs(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();s&&!n&&o&&c();const u=o&&!n&&!s?GS(o,a):Yr(0),d=i.left+a.scrollLeft-l.x-u.x,p=i.top+a.scrollTop-l.y-u.y;return{x:d,y:p,width:i.width,height:i.height}}function zf(e){return jr(e).position==="static"}function bw(e,t){if(!Jr(e)||jr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Zr(e)===r&&(r=r.ownerDocument.body),r}function QS(e,t){const r=Kt(e);if(Ad(e))return r;if(!Jr(e)){let o=vo(e);for(;o&&!Ai(o);){if(Rr(o)&&!zf(o))return o;o=vo(o)}return r}let n=bw(e,t);for(;n&&AD(n)&&zf(n);)n=bw(n,t);return n&&Ai(n)&&zf(n)&&!xg(n)?r:n||MD(e)||r}const JD=async function(e){const t=this.getOffsetParent||QS,r=this.getDimensions,n=await r(e.floating);return{reference:YD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function XD(e){return jr(e).direction==="rtl"}const ZD={convertOffsetParentRelativeRectToViewportRelativeRect:BD,getDocumentElement:Zr,getClippingRect:KD,getOffsetParent:QS,getElementRects:JD,getClientRects:zD,getDimensions:QD,getScale:li,isElement:Rr,isRTL:XD};function YS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eM(e,t){let r=null,n;const o=Zr(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(a||t(),!p||!h)return;const g=kc(d),m=kc(o.clientWidth-(u+p)),b=kc(o.clientHeight-(d+h)),w=kc(u),_={rootMargin:-g+"px "+-m+"px "+-b+"px "+-w+"px",threshold:Vt(0,go(1,l))||1};let x=!0;function E(S){const C=S[0].intersectionRatio;if(C!==l){if(!x)return i();C?i(!1,C):n=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!YS(c,e.getBoundingClientRect())&&i(),x=!1}try{r=new IntersectionObserver(E,{..._,root:o.ownerDocument})}catch{r=new IntersectionObserver(E,_)}r.observe(e)}return i(!0),s}function tM(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Sg(e),u=o||s?[...c?hl(c):[],...hl(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const d=c&&a?eM(c,r):null;let p=-1,h=null;i&&(h=new ResizeObserver(w=>{let[y]=w;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(t)})),r()}),c&&!l&&h.observe(c),h.observe(t));let g,m=l?hs(e):null;l&&b();function b(){const w=hs(e);m&&!YS(m,w)&&r(),m=w,g=requestAnimationFrame(b)}return r(),()=>{var w;u.forEach(y=>{o&&y.removeEventListener("scroll",r),s&&y.removeEventListener("resize",r)}),d==null||d(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const rM=CD,nM=PD,oM=ED,sM=OD,iM=SD,_w=xD,aM=kD,lM=(e,t,r)=>{const n=new Map,o={platform:ZD,...r},s={...o.platform,_c:n};return _D(e,t,{...o,platform:s})};var cM=typeof document<"u",uM=function(){},eu=cM?v.useLayoutEffect:uM;function Vu(e,t){if(e===t)return!0;
vendor: 4,149 bytes, line 212
212if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Vu(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!Vu(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function JS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xw(e,t){const r=JS(e);return Math.round(t*r)/r}function Vf(e){const t=v.useRef(e);return eu(()=>{t.current=e}),t}function dM(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=v.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=v.useState(n);Vu(p,n)||h(n);const[g,m]=v.useState(null),[b,w]=v.useState(null),y=v.useCallback(R=>{R!==S.current&&(S.current=R,m(R))},[]),_=v.useCallback(R=>{R!==C.current&&(C.current=R,w(R))},[]),x=s||g,E=i||b,S=v.useRef(null),C=v.useRef(null),P=v.useRef(u),I=l!=null,j=Vf(l),$=Vf(o),M=Vf(c),W=v.useCallback(()=>{if(!S.current||!C.current)return;const R={placement:t,strategy:r,middleware:p};$.current&&(R.platform=$.current),lM(S.current,C.current,R).then(k=>{const B={...k,isPositioned:M.current!==!1};U.current&&!Vu(P.current,B)&&(P.current=B,kr.flushSync(()=>{d(B)}))})},[p,t,r,$,M]);eu(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[c]);const U=v.useRef(!1);eu(()=>(U.current=!0,()=>{U.current=!1}),[]),eu(()=>{if(x&&(S.current=x),E&&(C.current=E),x&&E){if(j.current)return j.current(x,E,W);W()}},[x,E,W,j,I]);const oe=v.useMemo(()=>({reference:S,floating:C,setReference:y,setFloating:_}),[y,_]),q=v.useMemo(()=>({reference:x,floating:E}),[x,E]),re=v.useMemo(()=>{const R={position:r,left:0,top:0};if(!q.floating)return R;const k=xw(q.floating,u.x),B=xw(q.floating,u.y);return a?{...R,transform:"translate("+k+"px, "+B+"px)",...JS(q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:B}},[r,a,q.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:W,refs:oe,elements:q,floatingStyles:re}),[u,W,oe,q,re])}const fM=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?_w({element:n.current,padding:o}).fn(r):{}:n?_w({element:n,padding:o}).fn(r):{}}}},hM=(e,t)=>({...rM(e),options:[e,t]}),pM=(e,t)=>({...nM(e),options:[e,t]}),mM=(e,t)=>({...aM(e),options:[e,t]}),gM=(e,t)=>({...oM(e),options:[e,t]}),vM=(e,t)=>({...sM(e),options:[e,t]}),yM=(e,t)=>({...iM(e),options:[e,t]}),wM=(e,t)=>({...fM(e),options:[e,t]});var bM="Arrow",XS=v.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return f.jsx(de.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});XS.displayName=bM;var _M=XS;function xM(e){const[t,r]=v.useState(void 0);return dt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Cg="Popper",[ZS,Yi]=Cn(Cg),[EM,e1]=ZS(Cg),t1=e=>{const{__scopePopper:t,children:r}=e,[n,o]=v.useState(null);return f.jsx(EM,{scope:t,anchor:n,onAnchorChange:o,children:r})};t1.displayName=Cg;var r1="PopperAnchor",n1=v.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=e1(r1,r),i=v.useRef(null),a=ke(t,i);return v.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:f.jsx(de.div,{...o,ref:a})});n1.displayName=r1;var Pg="PopperContent",[SM,TM]=ZS(Pg),o1=v.forwardRef((e,t)=>
212{var V,Se,Te,we,be,Ce;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=e,b=e1(Pg,r),[w,y]=v.useState(null),_=ke(t,ft=>y(ft)),[x,E]=v.useState(null),S=xM(x),C=(S==null?void 0:S.width)??0,P=(S==null?void 0:S.height)??0,I=n+(s!=="center"?"-"+s:""),j=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},$=Array.isArray(c)?c:[c],M=$.length>0,W={padding:j,boundary:$.filter(PM),altBoundary:M},{refs:U,floatingStyles:oe,placement:q,isPositioned:re,middlewareData:R}=dM({strategy:"fixed",placement:I,whileElementsMounted:(...ft)=>tM(...ft,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[hM({mainAxis:o+P,alignmentAxis:i}),l&&pM({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?mM():void 0,...W}),l&&gM({...W}),vM({...W,apply:({elements:ft,rects:Xt,availableWidth:Po,availableHeight:kn})=>{const{width:ko,height:oa}=Xt.reference,Ts=ft.floating.style;Ts.setProperty("--radix-popper-available-width",`${Po}px`),Ts.setProperty("--radix-popper-available-height",`${kn}px`),Ts.setProperty("--radix-popper-anchor-width",`${ko}px`),Ts.setProperty("--radix-popper-anchor-height",`${oa}px`)}}),x&&wM({element:x,padding:a}),kM({arrowWidth:C,arrowHeight:P}),p&&yM({strategy:"referenceHidden",...W})]}),[k,B]=a1(q),te=Bt(g);dt(()=>{re&&(te==null||te())},[re,te]);const J=(V=R.arrow)==null?void 0:V.x,le=(Se=R.arrow)==null?void 0:Se.y,ie=((Te=R.arrow)==null?void 0:Te.centerOffset)!==0,[je,Ae]=v.useState();return dt(()=>{w&&Ae(window.getComputedStyle(w).zIndex)},[w]),f.jsx("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:re?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:je,"--radix-popper-transform-origin":[(we=R.transformOrigin)==null?void 0:we.x,(be=R.transformOrigin)==null?void 0:be.y].join(" "),...((Ce=R.hide)==null?void 0:Ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(SM,{scope:r,placedSide:k,onArrowChange:E,arrowX:J,arrowY:le,shouldHideArrow:ie,children:f.jsx(de.div,{"data-side":k,"data-align":B,...m,ref:_,style:{...m.style,animation:re?void 0:"none"}})})})});o1.displayName=Pg;var s1="PopperArrow",CM={top:"bottom",right:"left",bottom:"top",left:"right"},i1=v.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=TM(s1,n),i=CM[s.placedSide];return f.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsx(_M,{...o,ref:r,style:{...o.style,display:"block"}})})});i1.displayName=s1;function PM(e){return e!==null}var kM=e=>({name:"transformOrigin",options:e,fn(t){var b,w,y;const{placement:r,rects:n,middlewareData:o}=t,i=((b=o.arrow)==null?void 0:b.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=a1(r),d={start:"0%",center:"50%",end:"100%"}[u],p=(((w=o.arrow)==null?void 0:w.x)??0)+a/2,h=(((y=o.arrow)==null?void 0:y.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=i?d:`${p}px`,m=`${-l}px`):c==="top"?(g=i?d:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=i?d:`${h}px`):c==="left"&&(g=`${n.floating.width+l}px`,m=i?d:`${h}px`),{data:{x:g,y:m}}}});function a1(e){const[t,r="center"]=e.split("-");return[t,r]}var kg=t1,Og=n1,Rg=o1,jg=i1,[Id,h6]=Cn("Tooltip",[Yi]),Ld=Yi(),l1="TooltipProvider",OM=700,Ip="tooltip.open",[RM,Ag]=Id(l1),c1=e=>{const{__scopeTooltip:t,delayDuration:r=OM,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:s}=e,i=v.useRef(!0),a=v.useRef(!1),l=v.useRef(0);return v.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),f.jsx(RM,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:v.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:s})};c1.displayName=l1;var pl="Tooltip",[jM,Dd]=Id(pl),u1=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Ag(pl,e.__scopeTooltip),c=Ld(t),[u,d]=v.useState(null),p=Qr(),h=v.useRef(0),g=i??l.disableHoverableContent,m=a??l.delayDuration,b=v.useRef(!1),[w,y]=fs({prop:n,defaultProp:o??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ip))):l.onClose(),s==null||s(C)}
vendor: 6,957 bytes, lines 212-221
212,caller:pl}),_=v.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),x=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,y(!0)},[y]),E=v.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),S=v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,y(!0),h.current=0},m)},[m,y]);return v.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),f.jsx(kg,{...c,children:f.jsx(jM,{scope:t,contentId:p,open:w,stateAttribute:_,trigger:u,onTriggerChange:d,onTriggerEnter:v.useCallback(()=>{l.isOpenDelayedRef.current?S():x()},[l.isOpenDelayedRef,S,x]),onTriggerLeave:v.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:x,onClose:E,disableHoverableContent:g,children:r})})};u1.displayName=pl;var Lp="TooltipTrigger",d1=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Dd(Lp,r),s=Ag(Lp,r),i=Ld(r),a=v.useRef(null),l=ke(t,a,o.onTriggerChange),c=v.useRef(!1),u=v.useRef(!1),d=v.useCallback(()=>c.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),f.jsx(Og,{asChild:!0,...i,children:f.jsx(de.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:H(e.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:H(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:H(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:H(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:H(e.onBlur,o.onClose),onClick:H(e.onClick,o.onClose)})})});d1.displayName=Lp;var AM="TooltipPortal",[p6,NM]=Id(AM,{forceMount:void 0}),Ni="TooltipContent",f1=v.forwardRef((e,t)=>{const r=NM(Ni,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...s}=e,i=Dd(Ni,e.__scopeTooltip);return f.jsx(Xr,{present:n||i.open,children:i.disableHoverableContent?f.jsx(h1,{side:o,...s,ref:t}):f.jsx(IM,{side:o,...s,ref:t})})}),IM=v.forwardRef((e,t)=>{const r=Dd(Ni,e.__scopeTooltip),n=Ag(Ni,e.__scopeTooltip),o=v.useRef(null),s=ke(t,o),[i,a]=v.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,p=v.useCallback(()=>{a(null),d(!1)},[d]),h=v.useCallback((g,m)=>{const b=g.currentTarget,w={x:g.clientX,y:g.clientY},y=FM(w,b.getBoundingClientRect()),_=UM(w,y),x=BM(m.getBoundingClientRect()),E=VM([..._,...x]);a(E),d(!0)},[d]);return v.useEffect(()=>()=>p(),[p]),v.useEffect(()=>{if(l&&u){const g=b=>h(b,u),m=b=>h(b,l);return l.addEventListener("pointerleave",g),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),u.removeEventListener("pointerleave",m)}}},[l,u,h,p]),v.useEffect(()=>{if(i){const g=m=>{const b=m.target,w={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(b))||(u==null?void 0:u.contains(b)),_=!zM(w,i);y?p():_&&(p(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,u,i,c,p]),f.jsx(h1,{...e,ref:s})}),[LM,DM]=Id(pl,{isInside:!1}),MM=CI("TooltipContent"),h1=v.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=Dd(Ni,r),c=Ld(r),{onClose:u}=l;return v.useEffect(()=>(document.addEventListener(Ip,u),()=>document.removeEventListener(Ip,u)),[u]),v.useEffect(()=>{if(l.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),f.jsx(Gi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:f.jsxs(Rg,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(MM,{children:n}),f.jsx(LM,{scope:r,isInside:!0,children:f.jsx(KI,{id:l.contentId,role:"tooltip",children:o||n})})]})})});f1.displayName=Ni;var p1="TooltipArrow",$M=v.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ld(r);return DM(p1,r).isInside?null:f.jsx(jg,{...o,...n,ref:t})});$M.displayName=p1;function FM(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,n,o,s)){case s:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function UM(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function BM(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function zM(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,u=a.y,d=l.x,p=l.y;u>n!=p>n&&r<(d-c)*(n-u)/(p-u)+c&&(o=!o)}return o}function VM(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),WM(t)}function WM(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var HM=c1,qM=u1,GM=d1,m1=f1;const KM=HM,m6=qM,g6=GM,QM=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>f.jsx(m1,{ref:n,sideOffset:t,className:pe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));QM.displayName=m1.displayName;/**
213 * @remix-run/router v1.23.0
214 *
215 * Copyright (c) Remix Software Inc.
216 *
217 * This source code is licensed under the MIT license found in the
218 * LICENSE.md file in the root directory of this source tree.
219 *
220 * @license MIT
221 */function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 5,028 bytes, line 221
221for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ml.apply(this,arguments)}var ro;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ro||(ro={}));const Ew="popstate";function YM(e){e===void 0&&(e={});function t(n,o){let{pathname:s,search:i,hash:a}=n.location;return Dp("",{pathname:s,search:i,hash:a},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:Wu(o)}return XM(t,r,null,e)}function He(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function g1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JM(){return Math.random().toString(36).substr(2,8)}function Sw(e,t){return{usr:e.state,key:e.key,idx:t}}function Dp(e,t,r,n){return r===void 0&&(r=null),ml({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ji(t):t,{state:r,key:t&&t.key||n||JM()})}function Wu(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ji(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function XM(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:s=!1}=n,i=o.history,a=ro.Pop,l=null,c=u();c==null&&(c=0,i.replaceState(ml({},i.state,{idx:c}),""));function u(){return(i.state||{idx:null}).idx}function d(){a=ro.Pop;let b=u(),w=b==null?null:b-c;c=b,l&&l({action:a,location:m.location,delta:w})}function p(b,w){a=ro.Push;let y=Dp(m.location,b,w);c=u()+1;let _=Sw(y,c),x=m.createHref(y);try{i.pushState(_,"",x)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;o.location.assign(x)}s&&l&&l({action:a,location:m.location,delta:1})}function h(b,w){a=ro.Replace;let y=Dp(m.location,b,w);c=u();let _=Sw(y,c),x=m.createHref(y);i.replaceState(_,"",x),s&&l&&l({action:a,location:m.location,delta:0})}function g(b){let w=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof b=="string"?b:Wu(b);return y=y.replace(/ $/,"%20"),He(w,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,w)}let m={get action(){return a},get location(){return e(o,i)},listen(b){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Ew,d),l=b,()=>{o.removeEventListener(Ew,d),l=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let w=g(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:h,go(b){return i.go(b)}};return m}var Tw;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Tw||(Tw={}));function ZM(e,t,r){return r===void 0&&(r="/"),e2(e,t,r,!1)}function e2(e,t,r,n){let o=typeof t=="string"?Ji(t):t,s=Ii(o.pathname||"/",r);if(s==null)return null;let i=v1(e);t2(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=f2(s);a=u2(i[l],c,n)}return a}function v1(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let o=(s,i,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};l.relativePath.startsWith("/")&&(He(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=ho([n,l.relativePath]),u=r.concat(l);s.children&&s.children.length>0&&(He(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),v1(s.children,t,u,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:l2(c,s.index),routesMeta:u})};return e.forEach((s,i)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))o(s,i);else for(let l of y1(s.path))o(s,i,l)}),t}function y1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return o?[s,""]:[s];let i=y1(n.join("/")),a=[];return a.push(...i.map(l=>l===""?s:[s,l].join("/"))),o&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function t2(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:c2(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const r2=/^:[\w-]+$/,n2=3,o2=2,s2=1,i2=10,a2=-2,Cw=e=>e==="*";function l2(e,t){let r=e.split("/"),n=r.length;return r.some(Cw)&&(n+=a2),t&&(n+=o2),r.filter(o=>!Cw(o)).reduce((o,s)=>o+(r2.test(s)?n2:s===""?s2:i2),n)}function c2(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function u2(e,t,r){let{routesMeta:n}=e,o={},s="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,u=s==="/"?t:t.slice(s.length)||"/",d=Hu({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=Hu({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 9,390 bytes, lines 221-230
221Object.assign(o,d.params),i.push({params:o,pathname:ho([s,d.pathname]),pathnameBase:g2(ho([s,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(s=ho([s,d.pathnameBase]))}return i}function Hu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=d2(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let s=o[0],i=s.replace(/(.)\/+$/,"$1"),a=o.slice(1);return{params:n.reduce((c,u,d)=>{let{paramName:p,isOptional:h}=u;if(p==="*"){let m=a[d]||"";i=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const g=a[d];return h&&!g?c[p]=void 0:c[p]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}function d2(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),g1(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function f2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return g1(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ii(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function h2(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Ji(e):e;return{pathname:r?r.startsWith("/")?r:p2(r,t):t,search:v2(n),hash:y2(o)}}function p2(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Wf(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function m2(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ng(e,t){let r=m2(e);return t?r.map((n,o)=>o===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ig(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=Ji(e):(o=ml({},e),He(!o.pathname||!o.pathname.includes("?"),Wf("?","pathname","search",o)),He(!o.pathname||!o.pathname.includes("#"),Wf("#","pathname","hash",o)),He(!o.search||!o.search.includes("#"),Wf("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,a;if(i==null)a=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),d-=1;o.pathname=p.join("/")}a=d>=0?t[d]:"/"}let l=h2(o,a),c=i&&i!=="/"&&i.endsWith("/"),u=(s||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const ho=e=>e.join("/").replace(/\/\/+/g,"/"),g2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),v2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,y2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function w2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const w1=["post","put","patch","delete"];new Set(w1);const b2=["get",...w1];new Set(b2);/**
222 * React Router v6.30.1
223 *
224 * Copyright (c) Remix Software Inc.
225 *
226 * This source code is licensed under the MIT license found in the
227 * LICENSE.md file in the root directory of this source tree.
228 *
229 * @license MIT
230 */function gl(){return gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gl.apply(this,arguments)}const Md=v.createContext(null),b1=v.createContext(null),Pn=v.createContext(null),$d=v.createContext(null),en=v.createContext({outlet:null,matches:[],isDataRoute:!1}),_1=v.createContext(null);function _2(e,t){let{relative:r}=t===void 0?{}:t;Xi()||He(!1);let{basename:n,navigator:o}=v.useContext(Pn),{hash:s,pathname:i,search:a}=Fd(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:ho([n,i])),o.createHref({pathname:l,search:a,hash:s})}function Xi(){return v.useContext($d)!=null}function kt(){return Xi()||He(!1),v.useContext($d).location}function x1(e){v.useContext(Pn).static||v.useLayoutEffect(e)}function Zi(){let{isDataRoute:e}=v.useContext(en);return e?D2():x2()}function x2(){Xi()||He(!1);let e=v.useContext(Md),{basename:t,future:r,navigator:n}=v.useContext(Pn),{matches:o}=v.useContext(en),{pathname:s}=kt(),i=JSON.stringify(Ng(o,r.v7_relativeSplatPath)),a=v.useRef(!1);return x1(()=>{a.current=!0}),v.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let d=Ig(c,JSON.parse(i),s,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:ho([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,i,s,e])}const E2=v.createContext(null);function S2(e){let t=v.useContext(en).outlet;return t&&v.createElement(E2.Provider,{value:e},t)}function $l(){let{matches:e}=v.useContext(en),t=e[e.length-1];return t?t.params:{}}function Fd(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=v.useContext(Pn),{matches:o}=v.useContext(en),{pathname:s}=kt(),i=JSON.stringify(Ng(o,n.v7_relativeSplatPath));return v.useMemo(()=>Ig(e,JSON.parse(i),s,r==="path"),[e,i,s,r])}function T2(e,t){return C2(e,t)}function C2(e,t,r,n){Xi()||He(!1);let{navigator:o}=v.useContext(Pn),{matches:s}=v.useContext(en),i=s[s.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=kt(),u;if(t){var d;let b=typeof t=="string"?Ji(t):t;l==="/"||(d=b.pathname)!=null&&d.startsWith(l)||He(!1),u=b}else u=c;let p=u.pathname||"/",h=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=ZM(e,{pathname:h}),m=j2(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:ho([l,o.encodeLocation?o.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:ho([l,o.encodeLocation?o.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,r,n);return t&&m?v.createElement($d.Provider,{value:{location:gl({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:ro.Pop}},m):m}function P2(){let e=L2(),t=w2(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:o},r):null,null)}const k2=v.createElement(P2,null);class O2 extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?v.createElement(en.Provider,{value:this.props.routeContext},v.createElement(_1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function R2(e){let{routeContext:t,match:r,children:n}=e,o=v.useContext(Md);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(en.Provider,{value:t},n)}function j2(e,t,r,n){var o;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=(o=r)==null?void 0:o.errors;if(a!=null){let u=i.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||He(!1),i=i.slice(0,Math.min(i.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<i.length;u++){let d=i[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:p,errors:h}=r,g=d.route.loader&&p[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||g){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((u,d,p)=>{let h,g=!1,m=null,b=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||k2,l&&(c<0&&p===0?(g=!0,b=null):c===p&&(g=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(i.slice(0,p+1)),y=()=>{let _;return h?_=m:g?_=b:d.route.Component?_=v.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=u,v.createElement(R2,{match:d,routeC
230ontext:{outlet:u,matches:w,isDataRoute:r!=null},children:_})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?v.createElement(O2,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:y(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):y()},null)}var E1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(E1||{}),qu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(qu||{});function A2(e){let t=v.useContext(Md);return t||He(!1),t}function N2(e){let t=v.useContext(b1);return t||He(!1),t}function I2(e){let t=v.useContext(en);return t||He(!1),t}function S1(e){let t=I2(),r=t.matches[t.matches.length-1];return r.route.id||He(!1),r.route.id}function L2(){var e;let t=v.useContext(_1),r=N2(qu.UseRouteError),n=S1(qu.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function D2(){let{router:e}=A2(E1.UseNavigateStable),t=S1(qu.UseNavigateStable),r=v.useRef(!1);return x1(()=>{r.current=!0}),v.useCallback(function(o,s){s===void 0&&(s={}),r.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,gl({fromRouteId:t},s)))},[e,t])}function M2(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Wa(e){let{to:t,replace:r,state:n,relative:o}=e;Xi()||He(!1);let{future:s,static:i}=v.useContext(Pn),{matches:a}=v.useContext(en),{pathname:l}=kt(),c=Zi(),u=Ig(t,Ng(a,s.v7_relativeSplatPath),l,o==="path"),d=JSON.stringify(u);return v.useEffect(()=>c(JSON.parse(d),{replace:r,state:n,relative:o}),[c,d,o,r,n]),null}function v6(e){return S2(e.context)}function O(e){He(!1)}function $2(e){let{basename:t="/",children:r=null,location:n,navigationType:o=ro.Pop,navigator:s,static:i=!1,future:a}=e;Xi()&&He(!1);let l=t.replace(/^\/*/,"/"),c=v.useMemo(()=>({basename:l,navigator:s,static:i,future:gl({v7_relativeSplatPath:!1},a)}),[l,a,s,i]);typeof n=="string"&&(n=Ji(n));let{pathname:u="/",search:d="",hash:p="",state:h=null,key:g="default"}=n,m=v.useMemo(()=>{let b=Ii(u,l);return b==null?null:{location:{pathname:b,search:d,hash:p,state:h,key:g},navigationType:o}},[l,u,d,p,h,g,o]);return m==null?null:v.createElement(Pn.Provider,{value:c},v.createElement($d.Provider,{children:r,value:m}))}function F2(e){let{children:t,location:r}=e;return T2(Mp(t),r)}new Promise(()=>{});function Mp(e,t){t===void 0&&(t=[]);let r=[];return v.Children.forEach(e,(n,o)=>{if(!v.isValidElement(n))return;let s=[...t,o];if(n.type===v.Fragment){r.push.apply(r,Mp(n.props.children,s));return}n.type!==O&&He(!1),!n.props.index||!n.props.children||He(!1);let i={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Mp(n.props.children,s)),r.push(i)}),r}/**
231 * React Router DOM v6.30.1
232 *
233 * Copyright (c) Remix Software Inc.
234 *
235 * This source code is licensed under the MIT license found in the
236 * LICENSE.md file in the root directory of this source tree.
237 *
238 * @license MIT
239 */function Gu(){return Gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gu.apply(this,arguments)}function T1(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,s;for(s=0;s<n.length;s++)o=n[s],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function U2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function B2(e,t){return e.button===0&&(!t||t==="_self")&&!U2(e)}function $p(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(o=>[r,o]):[[r,n]])},[]))}function z2(e,t){let r=$p(e);return t&&t.forEach((n,o)=>
239{r.has(o)||t.getAll(o).forEach(s=>{r.append(o,s)})}),r}const V2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],W2=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],H2="6";try{window.__reactRouterVersion=H2}catch{}const q2=v.createContext({isTransitioning:!1}),G2="startTransition",Pw=lm[G2];function K2(e){let{basename:t,children:r,future:n,window:o}=e,s=v.useRef();s.current==null&&(s.current=YM({window:o,v5Compat:!0}));let i=s.current,[a,l]=v.useState({action:i.action,location:i.location}),{v7_startTransition:c}=n||{},u=v.useCallback(d=>{c&&Pw?Pw(()=>l(d)):l(d)},[l,c]);return v.useLayoutEffect(()=>i.listen(u),[i,u]),v.useEffect(()=>M2(n),[n]),v.createElement($2,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}const Q2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Y2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ge=v.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:s,replace:i,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}
239=t,p=T1(t,V2),{basename:h}=v.useContext(Pn),g,m=!1;if(typeof c=="string"&&Y2.test(c)&&(g=c,Q2))try{let _=new URL(window.location.href),x=c.startsWith("//")?new URL(_.protocol+c):new URL(c),E=Ii(x.pathname,h);x.origin===_.origin&&E!=null?c=E+x.search+x.hash:m=!0}catch{}let b=_2(c,{relative:o}),w=X2(c,{replace:i,state:a,target:l,preventScrollReset:u,relative:o,viewTransition:d});function y(_){n&&n(_),_.defaultPrevented||w(_)}return v.createElement("a",Gu({},p,{href:g||b,onClick:m||s?n:y,ref:r,target:l}))}),y6=v.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:o=!1,className:s="",end:i=!1,style:a,to:l,viewTransition:c,children:u}=t,d=T1(t,W2),p=Fd(l,{relative:d.relative}),h=kt(),g=v.useContext(b1),{navigator:m,basename:b}=v.useContext(Pn),w=g!=null&&Z2(p)&&c===!0,y=m.encodeLocation?m.encodeLocation(p).pathname:p.pathname,_=h.pathname,x=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;o||(_=_.toLowerCase(),x=x?x.toLowerCase():null,y=y.toLowerCase()),x&&b&&(x=Ii(x,b)||x);const E=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=_===y||!i&&_.startsWith(y)&&_.charAt(E)==="/",C=x!=null&&(x===y||!i&&x.startsWith(y)&&x.charAt(y.length)==="/"),P={isActive:S,isPending:C,isTransitioning:w},I=S?n:void 0,j;typeof s=="function"?j=s(P):j=[s,S?"active":null,C?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let $=typeof a=="function"?a(P):a;return v.createElement(ge,Gu({},d,{"aria-current":I,className:j,ref:r,style:$,to:l,viewTransition:c}),typeof u=="function"?u(P):u)});var Fp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Fp||(Fp={}));var kw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(kw||(kw={}));function J2(e){let t=v.useContext(Md);return t||He(!1),t}function X2(e,t){let{target:r,replace:n,state:o,preventScrollReset:s,relative:i,viewTransition:a}=t===void 0?{}:t,l=Zi(),c=kt(),u=Fd(e,{relative:i});return v.useCallback(d=>{if(B2(d,r)){d.preventDefault();let p=n!==void 0?n:Wu(c)===Wu(u);l(e,{replace:p,state:o,preventScrollReset:s,relative:i,viewTransition:a})}},[c,l,u,n,o,r,e,s,i,a])}function w6(e){let t=v.useRef($p(e)),r=v.useRef(!1),n=kt(),o=v.useMemo(()=>z2(n.search,r.current?null:t.current),[n.search]),s=Zi(),i=v.useCallback((a,l)=>{const c=$p(typeof a=="function"?a(o):a);r.current=!0,s("?"+c,l)},[s,o]);return[o,i]}function Z2(e,t){t===void 0&&(t={});let r=v.useContext(q2);r==null&&He(!1);let{basename:n}=J2(Fp.useViewTransitionState),o=Fd(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=Ii(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Ii(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Hu(o.pathname,i)!=null||Hu(o.pathname,s)!=null}const Hf="guide-flash",e$=2600;function t$(e,t=20){if(!e)return;const r=e.replace(/"/g,"");let n=0;const o=()=>{const s=document.querySelector(`[data-guide="${r}"]`);if(!s){n++<t&&window.setTimeout(o,150);return}try{s.scrollIntoView({behavior:"smooth",block:"center"})}catch{s.scrollIntoView()}s.classList.remove(Hf),s.offsetWidth,s.classList.add(Hf),window.setTimeout(()=>s.classList.remove(Hf),e$)};o()}function r$(){const e=kt(),t=v.useRef("");v.useEffect(()=>{const r=new URLSearchParams(e.search),n=r.get("labTab"),o=r.get("highlight");if(!n&&!o)return;const s=`${e.pathname}|${n??""}|${o??""}`;if(t.current===s)return;if(t.current=s,n){const a=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("timing-lab:goto-tab",{detail:{tab:n,highlight:o}}))},120);return()=>window.clearTimeout(a)}const i=window.setTimeout(()=>t$(o),300);return()=>window.clearTimeout(i)},[e.pathname,e.search])}const n$=Od("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium font-[inherit] ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),lt=v.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?SI:"button";return f.jsx(i,{className:pe(n$({variant:t,size:r,className:e})),ref:s,...o})});lt.displayName="Button";var o$=v.createContext(void 0);function Lg(e){const t=v.useContext(o$);return e||t||"ltr"}var qf=0;function Dg(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ow()),document.body.insertAdjacentElement("beforeend",e[1]??Ow()),qf++,()=>{qf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qf--}},[])}function Ow(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 4,724 bytes, line 239
239style.position="fixed",e.style.pointerEvents="none",e}var Gf="focusScope.autoFocusOnMount",Kf="focusScope.autoFocusOnUnmount",Rw={bubbles:!1,cancelable:!0},s$="FocusScope",Ud=v.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=v.useState(null),c=Bt(o),u=Bt(s),d=v.useRef(null),p=ke(t,m=>l(m)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(n){let m=function(_){if(h.paused||!a)return;const x=_.target;a.contains(x)?d.current=x:Dn(d.current,{select:!0})},b=function(_){if(h.paused||!a)return;const x=_.relatedTarget;x!==null&&(a.contains(x)||Dn(d.current,{select:!0}))},w=function(_){if(document.activeElement===document.body)for(const E of _)E.removedNodes.length>0&&Dn(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const y=new MutationObserver(w);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),y.disconnect()}}},[n,a,h.paused]),v.useEffect(()=>{if(a){Aw.add(h);const m=document.activeElement;if(!a.contains(m)){const w=new CustomEvent(Gf,Rw);a.addEventListener(Gf,c),a.dispatchEvent(w),w.defaultPrevented||(i$(d$(C1(a)),{select:!0}),document.activeElement===m&&Dn(a))}return()=>{a.removeEventListener(Gf,c),setTimeout(()=>{const w=new CustomEvent(Kf,Rw);a.addEventListener(Kf,u),a.dispatchEvent(w),w.defaultPrevented||Dn(m??document.body,{select:!0}),a.removeEventListener(Kf,u),Aw.remove(h)},0)}}},[a,c,u,h]);const g=v.useCallback(m=>{if(!r&&!n||h.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,w=document.activeElement;if(b&&w){const y=m.currentTarget,[_,x]=a$(y);_&&x?!m.shiftKey&&w===x?(m.preventDefault(),r&&Dn(_,{select:!0})):m.shiftKey&&w===_&&(m.preventDefault(),r&&Dn(x,{select:!0})):w===y&&m.preventDefault()}},[r,n,h.paused]);return f.jsx(de.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});Ud.displayName=s$;function i$(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Dn(n,{select:t}),document.activeElement!==r)return}function a$(e){const t=C1(e),r=jw(t,e),n=jw(t.reverse(),e);return[r,n]}function C1(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function jw(e,t){for(const r of e)if(!l$(r,{upTo:t}))return r}function l$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function c$(e){return e instanceof HTMLInputElement&&"select"in e}function Dn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&c$(e)&&t&&e.select()}}var Aw=u$();function u$(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Nw(e,t),e.unshift(t)},remove(t){var r;e=Nw(e,t),(r=e[0])==null||r.resume()}}}function Nw(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function d$(e){return e.filter(t=>t.tagName!=="A")}var Qf="rovingFocusGroup.onEntryFocus",f$={bubbles:!1,cancelable:!0},Fl="RovingFocusGroup",[Up,P1,h$]=Cd(Fl),[p$,k1]=Cn(Fl,[h$]),[m$,g$]=p$(Fl),O1=v.forwardRef((e,t)=>f.jsx(Up.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Up.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(v$,{...e,ref:t})})}));O1.displayName=Fl;var v$=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,p=v.useRef(null),h=ke(t,p),g=Lg(s),[m,b]=fs({prop:i,defaultProp:a??null,onChange:l,caller:Fl}),[w,y]=v.useState(!1),_=Bt(c),x=P1(r),E=v.useRef(!1),[S,C]=v.useState(0);return v.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(Qf,_),()=>P.removeEventListener(Qf,_)},[_]),f.jsx(m$,{scope:r,orientation:n,dir:g,loop:o,currentTabStopId:m,onItemFocus:v.useCallback(P=>b(P),[b]),onItemShiftTab:v.useCallback(()=>y(!0),[]),onFocusableItemAdd:v.useCallback(()=>C(P=>P+1),[]),onFocusableItemRemove:v.useCallback(()=>C(P=>P-1),[]),children:f.jsx(de.div,{tabIndex:w||S===0?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:H(e.onMouseDown,()=>{E.current=!0}),onFocus:H(e.onFocus,P=>{const I=!E.current;if(P.target===P.currentTarget&&I&&!w){const j=new CustomEvent(Qf,f$);if(P.currentTarget.dispatchEvent(j),!j.defaultPrevented){const $=x().filter(q=>q.focusable),M=$.find(q=>q.active),W=$.find(q=>
vendor: 4,517 bytes, line 239
239q.id===m),oe=[M,W,...$].filter(Boolean).map(q=>q.ref.current);A1(oe,u)}}E.current=!1}),onBlur:H(e.onBlur,()=>y(!1))})})}),R1="RovingFocusGroupItem",j1=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=Qr(),c=s||l,u=g$(R1,r),d=u.currentTabStopId===c,p=P1(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:m}=u;return v.useEffect(()=>{if(n)return h(),()=>g()},[n,h,g]),f.jsx(Up.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:f.jsx(de.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:H(e.onMouseDown,b=>{n?u.onItemFocus(c):b.preventDefault()}),onFocus:H(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:H(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const w=b$(b,u.orientation,u.dir);if(w!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let _=p().filter(x=>x.focusable).map(x=>x.ref.current);if(w==="last")_.reverse();else if(w==="prev"||w==="next"){w==="prev"&&_.reverse();const x=_.indexOf(b.currentTarget);_=u.loop?_$(_,x+1):_.slice(x+1)}setTimeout(()=>A1(_))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});j1.displayName=R1;var y$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function w$(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function b$(e,t,r){const n=w$(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return y$[n]}function A1(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function _$(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var x$=O1,E$=j1,S$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Is=new WeakMap,Oc=new WeakMap,Rc={},Yf=0,N1=function(e){return e&&(e.host||N1(e.parentNode))},T$=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=N1(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},C$=function(e,t,r,n){var o=T$(t,Array.isArray(e)?e:[e]);Rc[r]||(Rc[r]=new WeakMap);var s=Rc[r],i=[],a=new Set,l=new Set(o),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(a.has(p))u(p);else try{var h=p.getAttribute(n),g=h!==null&&h!=="false",m=(Is.get(p)||0)+1,b=(s.get(p)||0)+1;Is.set(p,m),s.set(p,b),i.push(p),m===1&&g&&Oc.set(p,!0),b===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return u(t),a.clear(),Yf++,function(){i.forEach(function(d){var p=Is.get(d)-1,h=s.get(d)-1;Is.set(d,p),s.set(d,h),p||(Oc.has(d)||d.removeAttribute(n),Oc.delete(d)),h||d.removeAttribute(r)}),Yf--,Yf||(Is=new WeakMap,Is=new WeakMap,Oc=new WeakMap,Rc={})}},Mg=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=S$(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),C$(n,o,r,"aria-hidden")):function(){return null}},tu="right-scroll-bar-position",ru="width-before-scroll-bar",P$="with-scroll-bars-hidden",k$="--removed-body-scroll-bar-size";function Jf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function O$(e,t){var r=v.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var R$=typeof window<"u"?v.useLayoutEffect:v.useEffect,Iw=new WeakMap;function j$(e,t){var r=O$(null,function(n){return e.forEach(function(o){return Jf(o,n)})});return R$(function(){var n=Iw.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(a){s.has(a)||Jf(a,null)}),s.forEach(function(a){o.has(a)||Jf(a,i)})}Iw.set(r,e)},[e]),r}function A$(e){return e}function N$(e,t){t===void 0&&(t=A$);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;
vendor: 10,490 bytes, lines 239-279
239r=[],i.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(s),i=r}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),r}}}};return o}function I$(e){e===void 0&&(e={});var t=N$(null);return t.options=or({async:!0,ssr:!1},e),t}var I1=function(e){var t=e.sideCar,r=Eo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return v.createElement(n,or({},r))};I1.isSideCarExport=!0;function L$(e,t){return e.useMedium(t),I1}var L1=I$(),Xf=function(){},Bd=v.forwardRef(function(e,t){var r=v.useRef(null),n=v.useState({onScrollCapture:Xf,onWheelCapture:Xf,onTouchMoveCapture:Xf}),o=n[0],s=n[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,h=e.noRelative,g=e.noIsolation,m=e.inert,b=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,_=e.gapMode,x=Eo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,S=j$([r,t]),C=or(or({},x),o);return v.createElement(v.Fragment,null,u&&v.createElement(E,{sideCar:L1,removeScrollBar:c,shards:d,noRelative:h,noIsolation:g,inert:m,setCallbacks:s,allowPinchZoom:!!b,lockRef:r,gapMode:_}),i?v.cloneElement(v.Children.only(a),or(or({},C),{ref:S})):v.createElement(y,or({},C,{className:l,ref:S}),a))});Bd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bd.classNames={fullWidth:ru,zeroRight:tu};var D$=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function M$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=D$();return t&&e.setAttribute("nonce",t),e}function $$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function F$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var U$=function(){var e=0,t=null;return{add:function(r){e==0&&(t=M$())&&($$(t,r),F$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},B$=function(){var e=U$();return function(t,r){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},D1=function(){var e=B$(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},z$={left:0,top:0,right:0,gap:0},Zf=function(e){return parseInt(e||"",10)||0},V$=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Zf(r),Zf(n),Zf(o)]},W$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return z$;var t=V$(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},H$=D1(),ci="data-scroll-locked",q$=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
240  .`.concat(P$,` {
241   overflow: hidden `).concat(n,`;
242   padding-right: `).concat(a,"px ").concat(n,`;
243  }
244  body[`).concat(ci,`] {
245    overflow: hidden `).concat(n,`;
246    overscroll-behavior: contain;
247    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
248    padding-left: `.concat(o,`px;
249    padding-top: `).concat(s,`px;
250    padding-right: `).concat(i,`px;
251    margin-left:0;
252    margin-top:0;
253    margin-right: `).concat(a,"px ").concat(n,`;
254    `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
255  }
256  
257  .`).concat(tu,` {
258    right: `).concat(a,"px ").concat(n,`;
259  }
260  
261  .`).concat(ru,` {
262    margin-right: `).concat(a,"px ").concat(n,`;
263  }
264  
265  .`).concat(tu," .").concat(tu,` {
266    right: 0 `).concat(n,`;
267  }
268  
269  .`).concat(ru," .").concat(ru,` {
270    margin-right: 0 `).concat(n,`;
271  }
272  
273  body[`).concat(ci,`] {
274    `).concat(k$,": ").concat(a,`px;
275  }
276`)},Lw=function(){var e=parseInt(document.body.getAttribute(ci)||"0",10);return isFinite(e)?e:0},G$=function(){v.useEffect(function(){return document.body.setAttribute(ci,(Lw()+1).toString()),function(){var e=Lw()-1;e<=0?document.body.removeAttribute(ci):document.body.setAttribute(ci,e.toString())}},[])},K$=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;G$();var s=v.useMemo(function(){return W$(o)},[o]);return v.createElement(H$,{styles:q$(s,!t,o,r?"":"!important")})},Bp=!1;if(typeof window<"u")try{var jc=Object.defineProperty({},"passive",{get:function(){return Bp=!0,!0}});window.addEventListener("test",jc,jc),window.removeEventListener("test",jc,jc)}catch{Bp=!1}var Ls=Bp?{passive:!1}:!1,Q$=function(e){return e.tagName==="TEXTAREA"},M1=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Q$(e)&&r[t]==="visible")},Y$=function(e){return M1(e,"overflowY")},J$=function(e){return M1(e,"overflowX")},Dw=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=$1(e,n);if(o){var s=F1(e,n),i=s[1],a=s[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},X$=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Z$=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},$1=function(e,t){return e==="v"?Y$(t):J$(t)},F1=function(e,t){return e==="v"?X$(t):Z$(t)},eF=function(e,t){return e==="h"&&t==="rtl"?-1:1},tF=function(e,t,r,n,o){var s=eF(e,window.getComputedStyle(t).direction),i=s*n,a=r.target,l=t.contains(a),c=!1,u=i>0,d=0,p=0;do{if(!a)break;var h=F1(e,a),g=h[0],m=h[1],b=h[2],w=m-b-s*g;(g||w)&&$1(e,a)&&(d+=w,p+=g);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(d)<1||!o)||!u&&(Math.abs(p)<1||!o))&&(c=!0),c},Ac=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mw=function(e){return[e.deltaX,e.deltaY]},$w=function(e){return e&&"current"in e?e.current:e},rF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},nF=function(e){return`
277  .block-interactivity-`.concat(e,` {pointer-events: none;}
278  .allow-interactivity-`).concat(e,` {pointer-events: all;}
279`)},oF=0,Ds=[];function sF(e){var t=v.useRef([]),r=v.useRef([0,0]),n=v.useRef(),o=v.useState(oF++)[0],s=v.useState(D1)[0],i=v.useRef(e);v.useEffect(function(){i.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=sg([e.lockRef.current],(e.shards||[]).map($w),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=v.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var w=Ac(m),y=r.current,_="deltaX"in m?m.deltaX:y[0]-w[0],x="deltaY"in m?m.deltaY:y[1]-w[1],E,S=m.target,C=Math.abs(_)>Math.abs(x)?"h":"v";if("touches"in m&&C==="h"&&S.type==="range")return!1;var P=Dw(C,S);if(!P)return!0;if(P?E=C:(E=C==="v"?"h":"v",P=Dw(C,S)),!P)return!1;if(!n.current&&"changedTouches"in m&&(_||x)&&(n.current=E),!E)return!0;var I=n.current||E;return tF(I,b,m,I==="h"?_:x,!0)},[]),l=v.useCallback(function(m){var b=m;if(!(!Ds.length||Ds[Ds.length-1]!==s)){var w="deltaY"in b?Mw(b):Ac(b),y=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&rF(E.delta,w)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var _=(i.current.shards||[]).map($w).filter(Boolean).filter(function(E){return E.contains(b.target)}),x=_.length>0?a(b,_[0]):!i.current.noIsolation;x&&b.cancelable&&b.preventDefault()}}},[]),c=v.useCallback(function(m,b,w,y){var _={name:m,delta:b,target:w,should:y,shadowParent:iF(w)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(x){return x!==_})},1)},[]),u=v.useCallback(function(m){r.current=Ac(m),n.current=void 0},[]),d=v.useCallback(function(m){c(m.type,Mw(m),m.target,a(m,e.lockRef.current))},[]),p=v.useCallback(function(m){c(m.type,Ac(m),m.target,a(m,e.lockRef.current))},[]);v.useEffect(function(){return Ds.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Ls),document.addEventListener("touchmove",l,Ls),document.addEventListener("touchstart",u,Ls),function(){Ds=Ds.filter(function(m){return m!==s}),document.removeEventListener("wheel",l,Ls),document.removeEventListener("touchmove",l,Ls),document.removeEventListener("touchstart",u,Ls)}},[]);var h=e.removeScrollBar,g=e.inert;return v.createElement(v.Fragment,null,g?v.createElement(s,{styles:nF(o)}):null,h?v.createElement(K$,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function iF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const aF=L$(L1,sF);var zd=v.forwardRef(function(e,t){return v.createElement(Bd,or({},e,{ref:t,sideCar:aF}))});zd.classNames=Bd.classNames;var zp=["Enter"," "],lF=["ArrowDown","PageUp","Home"],U1=["ArrowUp","PageDown","End"],cF=[...lF,...U1],uF={ltr:[...zp,"ArrowRight"],rtl:[...zp,"ArrowLeft"]},dF={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ul="Menu",[vl,fF,hF]=Cd(Ul),[_s,B1]=Cn(Ul,[hF,Yi,k1]),Vd=Yi(),z1=k1(),[pF,xs]=_s(Ul),[mF,Bl]=_s(Ul),V1=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:s,modal:i=!0}=e,a=Vd(t),[l,c]=v.useState(null),u=v.useRef(!1),d=Bt(s),p=Lg(o);return v.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),f.jsx(kg,{...a,children:f.jsx(pF,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:f.jsx(mF,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:p,modal:i,children:n})})})};V1.displayName=Ul;
vendor: 12,760 bytes, line 279
279var gF="MenuAnchor",$g=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Vd(r);return f.jsx(Og,{...o,...n,ref:t})});$g.displayName=gF;var Fg="MenuPortal",[vF,W1]=_s(Fg,{forceMount:void 0}),H1=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,s=xs(Fg,t);return f.jsx(vF,{scope:t,forceMount:r,children:f.jsx(Xr,{present:r||s.open,children:f.jsx(Ll,{asChild:!0,container:o,children:n})})})};H1.displayName=Fg;var lr="MenuContent",[yF,Ug]=_s(lr),q1=v.forwardRef((e,t)=>{const r=W1(lr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=xs(lr,e.__scopeMenu),i=Bl(lr,e.__scopeMenu);return f.jsx(vl.Provider,{scope:e.__scopeMenu,children:f.jsx(Xr,{present:n||s.open,children:f.jsx(vl.Slot,{scope:e.__scopeMenu,children:i.modal?f.jsx(wF,{...o,ref:t}):f.jsx(bF,{...o,ref:t})})})})}),wF=v.forwardRef((e,t)=>{const r=xs(lr,e.__scopeMenu),n=v.useRef(null),o=ke(t,n);return v.useEffect(()=>{const s=n.current;if(s)return Mg(s)},[]),f.jsx(Bg,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:H(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),bF=v.forwardRef((e,t)=>{const r=xs(lr,e.__scopeMenu);return f.jsx(Bg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),_F=ds("MenuContent.ScrollLock"),Bg=v.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:g,...m}=e,b=xs(lr,r),w=Bl(lr,r),y=Vd(r),_=z1(r),x=fF(r),[E,S]=v.useState(null),C=v.useRef(null),P=ke(t,C,b.onContentChange),I=v.useRef(0),j=v.useRef(""),$=v.useRef(0),M=v.useRef(null),W=v.useRef("right"),U=v.useRef(0),oe=g?zd:v.Fragment,q=g?{as:_F,allowPinchZoom:!0}:void 0,re=k=>{var V,Se;const B=j.current+k,te=x().filter(Te=>!Te.disabled),J=document.activeElement,le=(V=te.find(Te=>Te.ref.current===J))==null?void 0:V.textValue,ie=te.map(Te=>Te.textValue),je=NF(ie,B,le),Ae=(Se=te.find(Te=>Te.textValue===je))==null?void 0:Se.ref.current;(function Te(we){j.current=we,window.clearTimeout(I.current),we!==""&&(I.current=window.setTimeout(()=>Te(""),1e3))})(B),Ae&&setTimeout(()=>Ae.focus())};v.useEffect(()=>()=>window.clearTimeout(I.current),[]),Dg();const R=v.useCallback(k=>{var te,J;return W.current===((te=M.current)==null?void 0:te.side)&&LF(k,(J=M.current)==null?void 0:J.area)},[]);return f.jsx(yF,{scope:r,searchRef:j,onItemEnter:v.useCallback(k=>{R(k)&&k.preventDefault()},[R]),onItemLeave:v.useCallback(k=>{var B;R(k)||((B=C.current)==null||B.focus(),S(null))},[R]),onTriggerLeave:v.useCallback(k=>{R(k)&&k.preventDefault()},[R]),pointerGraceTimerRef:$,onPointerGraceIntentChange:v.useCallback(k=>{M.current=k},[]),children:f.jsx(oe,{...q,children:f.jsx(Ud,{asChild:!0,trapped:o,onMountAutoFocus:H(s,k=>{var B;k.preventDefault(),(B=C.current)==null||B.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:f.jsx(Gi,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:p,onDismiss:h,children:f.jsx(x$,{asChild:!0,..._,dir:w.dir,orientation:"vertical",loop:n,currentTabStopId:E,onCurrentTabStopIdChange:S,onEntryFocus:H(l,k=>{w.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(Rg,{role:"menu","aria-orientation":"vertical","data-state":lT(b.open),"data-radix-menu-content":"",dir:w.dir,...y,...m,ref:P,style:{outline:"none",...m.style},onKeyDown:H(m.onKeyDown,k=>{const te=k.target.closest("[data-radix-menu-content]")===k.currentTarget,J=k.ctrlKey||k.altKey||k.metaKey,le=k.key.length===1;te&&(k.key==="Tab"&&k.preventDefault(),!J&&le&&re(k.key));const ie=C.current;if(k.target!==ie||!cF.includes(k.key))return;k.preventDefault();const Ae=x().filter(V=>!V.disabled).map(V=>V.ref.current);U1.includes(k.key)&&Ae.reverse(),jF(Ae)}),onBlur:H(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(I.current),j.current="")}),onPointerMove:H(e.onPointerMove,yl(k=>{const B=k.target,te=U.current!==k.clientX;if(k.currentTarget.contains(B)&&te){const J=k.clientX>U.current?"right":"left";W.current=J,U.current=k.clientX}}))})})})})})})});q1.displayName=lr;var xF="MenuGroup",zg=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return f.jsx(de.div,{role:"group",...n,ref:t})});zg.displayName=xF;var EF="MenuLabel",G1=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return f.jsx(de.div,{...n,ref:t})});G1.displayName=EF;var Ku="MenuItem",Fw="menu.itemSelect",Wd=v.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,s=v.useRef(null),i=Bl(Ku,e.__scopeMenu),a=Ug(Ku,e.__scopeMenu),l=ke(t,s),c=v.useRef(!1),u=()=>{const d=s.current;if(!r&&d){const p=new CustomEvent(Fw,{bubbles:!0,cancelable:!0});d.addEventListener(Fw,h=>n==null?void 0:n(h),{once:!0}),mg(d,p),p.defaultPrevented?c.current=!1:i.onClose()}};return f.jsx(K1,{...o,ref:l,disabled:r,onClick:H(e.onClick,u),onPointerDown:d=>{var p;(p=e.onPointerDown)==null||p.call(e,d),c.current=!0},onPointerUp:H(e.onPointerUp,d=>{var p;c.current||(p=d.currentTarget)==null||p.click()}),onKeyDown:H(e.onKeyDown,d=>{const p=a.searchRef.current!=="";r||p&&d.key===" "||zp.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Wd.displayName=Ku;var K1=v.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...s}=e,i=Ug(Ku,r),a=z1(r),l=v.useRef(null),c=ke(t,l),[u,d]=v.useState(!1),[p,h]=v.useState("");return v.useEffect(()=>{const g=l.current;g&&h((g.textContent??"").trim())},[s.children]),f.jsx(vl.ItemSlot,{scope:r,disabled:n,textValue:o??p,children:f.jsx(E$,{asChild:!0,...a,focusable:!n,children:f.jsx(de.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...s,ref:c,onPointerMove:H(e.onPointerMove,yl(g=>{n?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:H(e.onPointerLeave,yl(g=>i.onItemLeave(g))),onFocus:H(e.onFocus,()=>d(!0)),onBlur:H(e.onBlur,()=>d(!1))})})})}),SF="MenuCheckboxItem",Q1=v.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return f.jsx(eT,{scope:e.__scopeMenu,checked:r,children:f.jsx(Wd,{role:"menuitemcheckbox","aria-checked":Qu(r)?"mixed":r,...o,ref:t,"data-state":Wg(r),onSelect:H(o.onSelect,()=>n==null?void 0:n(Qu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Q1.displayName=SF;var Y1="MenuRadioGroup",[TF,CF]=_s(Y1,{value:void 0,onValueChange:()=>{}}),J1=v.forwardRef((e,t)=>{const{value:r,onValueChange:n,...o}=e,s=Bt(n);return f.jsx(TF,{scope:e.__scopeMenu,value:r,onValueChange:s,children:f.jsx(zg,{...o,ref:t})})});J1.displayName=Y1;var X1="MenuRadioItem",Z1=v.forwardRef((e,t)=>{const{value:r,...n}=e,o=CF(X1,e.__scopeMenu),s=r===o.value;return f.jsx(eT,{scope:e.__scopeMenu,checked:s,children:f.jsx(Wd,{role:"menuitemradio","aria-checked":s,...n,ref:t,"data-state":Wg(s),onSelect:H(n.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,r)},{checkForDefaultPrevented:!1})})})});Z1.displayName=X1;var Vg="MenuItemIndicator",[eT,PF]=_s(Vg,{checked:!1}),tT=v.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,s=PF(Vg,r);return f.jsx(Xr,{present:n||Qu(s.checked)||s.checked===!0,children:f.jsx(de.span,{...o,ref:t,"data-state":Wg(s.checked)})})});tT.displayName=Vg;var kF="MenuSeparator",rT=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return f.jsx(de.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});rT.displayName=kF;var OF="MenuArrow",nT=v.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Vd(r);return f.jsx(jg,{...o,...n,ref:t})});nT.displayName=OF;var RF="MenuSub",[b6,oT]=_s(RF),ja="MenuSubTrigger",sT=v.forwardRef((e,t)=>{const r=xs(ja,e.__scopeMenu),n=Bl(ja,e.__scopeMenu),o=oT(ja,e.__scopeMenu),s=Ug(ja,e.__scopeMenu),i=v.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:e.__scopeMenu},u=v.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return v.useEffect(()=>u,[u]),v.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),f.jsx($g,{asChild:!0,...c,children:f.jsx(K1,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":lT(r.open),...e,ref:Td(t,o.onTriggerChange),onClick:d=>{var p;(p=e.onClick)==null||p.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:H(e.onPointerMove,yl(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:H(e.onPointerLeave,yl(d=>{var h,g;u();const p=(h=r.content)==null?void 0:h.getBoundingClientRect();if(p){const m=(g=r.content)==null?void 0:g.dataset.side,b=m==="right",w=b?-5:5,y=p[b?"left":"right"],_=p[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+w,y:d.clientY},{x:y,y:p.top},{x:_,y:p.top},{x:_,y:p.bottom},{x:y,y:p.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:H(e.onKeyDown,d=>{var h;const p=s.searchRef.current!=="";e.disabled||p&&d.key===" "||uF[n.dir].includes(d.key)&&(r.onOpenChange(!0),(h=r.content)==null||h.focus(),d.preventDefault())})})})});sT.displayName=ja;var iT="MenuSubContent",aT=v.forwardRef((e,t)=>{const r=W1(lr,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,s=xs(lr,e.__scopeMenu),i=Bl(lr,e.__scopeMenu),a=oT(iT,e.__scopeMenu),l=v.useRef(null),c=ke(t,l);return f.jsx(vl.Provider,{scope:e.__scopeMenu,children:f.jsx(Xr,{present:n||s.open,children:f.jsx(vl.Slot,{scope:e.__scopeMenu,children:f.jsx(Bg,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var d;i.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:H(e.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:H(e.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:H(e.onKeyDown,u=>{var h;const d=u.currentTarget.contains(u.target),p=dF[i.dir].includes(u.key);d&&p&&(s.onOpenChange(!1),(h=a.trigger)==null||h.focus(),u.preventDefault())})})})})})});aT.displayName=iT;function lT(e){return e?"open":"closed"}function Qu(e){return e==="indeterminate"}function Wg(e){return Qu(e)?"indeterminate":e?"checked":"unchecked"}function jF(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function AF(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function NF(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=AF(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function IF(e,t){const{x:r,y:n}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,u=a.y,d=l.x,p=l.y;u>n!=p>n&&r<(d-c)*(n-u)/(p-u)+c&&(o=!o)}return o}function LF(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return IF(r,t)}function yl(e){return t=>t.pointerType==="mouse"?e(t):void 0}var DF=V1,MF=$g,$F=H1,FF=q1,UF=zg,BF=G1,zF=Wd,VF=Q1,WF=J1,HF=Z1,qF=tT,GF=rT,KF=nT,QF=sT,YF=aT,Hd="DropdownMenu",[JF,_6]=Cn(Hd,[B1]),Ot=B1(),[XF,cT]=JF(Hd),uT=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=Ot(t),c=v.useRef(null),[u,d]=fs({prop:o,defaultProp:s??!1,onChange:i,caller:Hd});return f.jsx(XF,{scope:t,triggerId:Qr(),triggerRef:c,contentId:Qr(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(p=>!p),[d]),modal:a,children:f.jsx(DF,{...l,open:u,onOpenChange:d,dir:n,modal:a,children:r})})};uT.displayName=Hd;var dT="DropdownMenuTrigger",fT=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,s=cT(dT,r),i=Ot(r);return f.jsx(MF,{asChild:!0,...i,children:f.jsx(de.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:Td(t,s.triggerRef),onPointerDown:H(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:H(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});fT.displayName=dT;
279var ZF="DropdownMenuPortal",hT=e=>{const{__scopeDropdownMenu:t,...r}=e,n=Ot(t);return f.jsx($F,{...n,...r})};hT.displayName=ZF;var pT="DropdownMenuContent",mT=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=cT(pT,r),s=Ot(r),i=v.useRef(!1);return f.jsx(FF,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...n,ref:t,onCloseAutoFocus:H(e.onCloseAutoFocus,a=>{var l;i.current||(l=o.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:H(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mT.displayName=pT;var eU="DropdownMenuGroup",tU=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(UF,{...o,...n,ref:t})});tU.displayName=eU;var rU="DropdownMenuLabel",gT=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(BF,{...o,...n,ref:t})});gT.displayName=rU;var nU="DropdownMenuItem",vT=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(zF,{...o,...n,ref:t})});vT.displayName=nU;var oU="DropdownMenuCheckboxItem",yT=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(VF,{...o,...n,ref:t})});yT.displayName=oU;var sU="DropdownMenuRadioGroup",iU=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(WF,{...o,...n,ref:t})});iU.displayName=sU;var aU="DropdownMenuRadioItem",wT=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(HF,{...o,...n,ref:t})});wT.displayName=aU;var lU="DropdownMenuItemIndicator",bT=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(qF,{...o,...n,ref:t})});bT.displayName=lU;var cU="DropdownMenuSeparator",_T=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(GF,{...o,...n,ref:t})});_T.displayName=cU;var uU="DropdownMenuArrow",dU=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(KF,{...o,...n,ref:t})});dU.displayName=uU;var fU="DropdownMenuSubTrigger",xT=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(QF,{...o,...n,ref:t})});xT.displayName=fU;var hU="DropdownMenuSubContent",ET=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=Ot(r);return f.jsx(YF,{...o,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ET.displayName=hU;var pU=uT,mU=fT,gU=hT,ST=mT,TT=gT,CT=vT,PT=yT,kT=wT,OT=bT,RT=_T,jT=xT,AT=ET;const NT=pU,IT=mU,vU=v.forwardRef(({className:e,inset:t,children:r,...n},o)=>f.jsxs(jT,{ref:o,className:pe("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...n,children:[r,f.jsx(vL,{className:"ml-auto h-4 w-4"})]}));vU.displayName=jT.displayName;const yU=v.forwardRef(({className:e,...t},r)=>f.jsx(AT,{ref:r,className:pe("z-[1200] min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));yU.displayName=AT.displayName;const Hg=v.forwardRef(({className:e,sideOffset:t=4,...r},n)=>f.jsx(gU,{children:f.jsx(ST,{ref:n,sideOffset:t,className:pe("z-[1200] min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
279de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Hg.displayName=ST.displayName;const ui=v.forwardRef(({className:e,inset:t,...r},n)=>f.jsx(CT,{ref:n,className:pe("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...r}));ui.displayName=CT.displayName;const wU=v.forwardRef(({className:e,children:t,checked:r,...n},o)=>f.jsxs(PT,{ref:o,className:pe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:r,...n,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(OT,{children:f.jsx(NS,{className:"h-4 w-4"})})}),t]}));wU.displayName=PT.displayName;const bU=v.forwardRef(({className:e,children:t,...r},n)=>f.jsxs(kT,{ref:n,className:pe("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(OT,{children:f.jsx(bL,{className:"h-2 w-2 fill-current"})})}),t]}));bU.displayName=kT.displayName;const _U=v.forwardRef(({className:e,inset:t,...r},n)=>f.jsx(TT,{ref:n,className:pe("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));_U.displayName=TT.displayName;const xU=v.forwardRef(({className:e,...t},r)=>f.jsx(RT,{ref:r,className:pe("-mx-1 my-1 h-px bg-muted",e),...t}));xU.displayName=RT.displayName;const qd="/assets/beyond-pro-logo-BRBdAD6i.jpg";function EU(){const{user:e,isAdmin:t,signOut:r}=Tn(),{currentOrganization:n}=bs(),o=Zi(),[s,i]=v.useState(!1),a=async()=>{try{await r(),window.location.href="/"}catch(p){console.error("Sign out error:",p)}},l=t&&(n!=null&&n.favicon_url)?n.favicon_url:qd,c=t&&(n!=null&&n.name)?n.name:null,u=t&&(n!=null&&n.slug)?`/org/${n.slug}/timing`:null,d=(n==null?void 0:n.timing_link_text)||"Live Timing";return f.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-lg border-b border-border",children:f.jsxs("div",{className:"container mx-auto px-4",children:[f.jsxs("div",{className:"flex items-center justify-between h-16 md:h-20",children:[f.jsxs(ge,{to:"/",className:"flex items-center gap-3",children:[f.jsx("img",{src:l,alt:c?`${c} Logo`:"Beyond Pro Logo",className:"w-10 h-10 rounded-lg object-contain"}),f.jsx("span",{className:"font-display text-xl text-foreground hidden sm:block",children:c||f.jsxs(f.Fragment,{children:["BEYOND ",f.jsx("span",{className:"text-primary",children:"PRO"})]})})]}),f.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[f.jsx(ge,{to:"/",className:"text-muted-foreground hover:text-foreground transition-colors font-medium",children:"Home"}),!t&&f.jsx(ge,{to:"/organizations",className:"text-muted-foreground hover:text-foreground transition-colors font-medium",children:"Organizations"}),u&&f.jsx(ge,{to:u,className:"text-muted-foreground hover:text-foreground transition-colors font-medium",children:d}),t&&f.jsx(ge,{to:"/admin",className:"text-primary hover:text-primary/80 transition-colors font-medium",children:"Admin Dashboard"})]}),f.jsx("div",{className:"hidden md:flex items-center gap-4",children:e?f.jsxs(NT,{children:[f.jsx(IT,{asChild:!0,children:f.jsxs(lt,{variant:"outline",size:"sm",className:"gap-2",children:[f.jsx(Ra,{className:"h-4 w-4"}),f.jsx("span",{className:"max-w-[120px] truncate",children:e.email})]})}),f.jsxs(Hg,{align:"end",children:[t?f.jsx(ui,{onSelect:()=>o("/admin"),children:"Admin Dashboard"}):f.jsx(ui,{onSelect:()=>o("/my-registrations"),children:"My Registrations"}),f.jsxs(ui,{onClick:p=>{p.preventDefault(),a()},children:[f.jsx(Fu,{className:"h-4 w-4 mr-2"}),"Sign Out"]})]})]}):f.jsx(lt,{asChild:!0,variant:"ghost",size:"sm",className:"text-muted-foreground",children:f.jsx(ge,{to:"/auth",children:"Sign In"})})}),f.jsx("div",{className:"md:hidden flex items-center gap-2",children:f.jsx("button",{className:"p-2",onClick:()=>i(!s),children:s?f.jsx(Rd,{className:"h-6 w-6 text-foreground"}):f.jsx(LS,{className:"h-6 w-6 text-foreground"})})})]}),s&&f.jsx("div",{className:"md:hidden py-4 border-t border-border animate-fade-in max-h-[calc(100dvh-5rem)] overflow-y-auto overscroll-contain pb-8",children:f.jsxs("nav",{className:"flex flex-col gap-4",children:[f.jsx(ge,{to:"/",className:"text-muted-foreground hover:text-foreground transition-colors font-medium py-2",onClick:()=>i(!1),children:"Home"}),!t&&f.jsx(ge,{to:"/organizations",className:"text-muted-foreground hover:text-foreground transition-colors font-medium py-2",onClick:()=>i(!1),children:"Organizations"}),u&&f.jsx(ge,{to:u,className:"text-muted-foreground hover:text-foreground transition-colors font-medium py-2",onClick:()=>i(!1),children:d}),t&&f.jsx(ge,{to:"/admin",className:"text-primary hover:text-primary/80 transition-colors font-medium py-2",onClick:()=>i(!1),children:"Admin Dashboard"}),e?f.jsxs(f.Fragment,{children:[!t&&f.jsx(ge,{to:"/my-registrations",className:"text-muted-foreground hover:text-foreground transition-colors font-medium py-2",onClick:()=>i(!1),children:"My Registrations"}),f.jsxs(lt,{variant:"outline",onClick:()=>{a(),i(!1)},className:"w-full",children:[f.jsx(Fu,{className:"h-4 w-4 mr-2"}),"Sign Out"]})]}):f.jsx(ge,{to:"/auth",className:"text-muted-foreground hover:text-foreground transition-colors font-medium py-2",onClick:()=>i(!1),children:"Sign In"})]})})]})})}function SU(){return f.jsx("footer",{className:"bg-card border-t border-border py-12",children:f.jsxs("div",{className:"container mx-auto px-4",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[f.jsxs("div",{className:"col-span-1 md:col-span-2",children:[f.jsxs(ge,{to:"/",className:"flex items-center gap-3 mb-4",children:[f.jsx("img",{src:qd,alt:"Bey
279ond Pro Logo",className:"w-10 h-10 rounded-lg object-cover"}),f.jsxs("span",{className:"font-display text-2xl text-foreground",children:["BEYOND ",f.jsx("span",{className:"text-primary",children:"PRO"})]})]}),f.jsx("p",{className:"text-muted-foreground max-w-md",children:"Professional race registration made simple. Fast, secure, and built for riders who demand the best."})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-display text-lg text-foreground mb-4",children:"QUICK LINKS"}),f.jsxs("nav",{className:"flex flex-col gap-2",children:[f.jsx(ge,{to:"/",className:"text-muted-foreground hover:text-primary transition-colors",children:"Home"}),f.jsx(ge,{to:"/events",className:"text-muted-foreground hover:text-primary transition-colors",children:"Events"}),f.jsx(ge,{to:"/rider-login",className:"text-muted-foreground hover:text-primary transition-colors",children:"Rider Login"}),f.jsx(ge,{to:"/auth",className:"text-muted-foreground hover:text-primary transition-colors",children:"Admin"}),f.jsx(ge,{to:"/privacy",className:"text-muted-foreground hover:text-primary transition-colors",children:"Privacy"}),f.jsx(ge,{to:"/terms",className:"text-muted-foreground hover:text-primary transition-colors",children:"Terms"})]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-display text-lg text-foreground mb-4",children:"CONTACT"}),f.jsxs("div",{className:"flex flex-col gap-2 text-muted-foreground",children:[f.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary transition-colors",children:"[email protected]"}),f.jsx("a",{href:"tel:801-618-9937",className:"hover:text-primary transition-colors",children:"(801) 618-9937"})]})]})]}),f.jsx("div",{className:"border-t border-border mt-8 pt-8 text-center text-muted-foreground",children:f.jsxs("p",{children:["© ",new Date().getFullYear()," Beyond Pro LLC. All rights reserved."]})})]})})}function Uw({children:e,showFooter:t=!0}){return f.jsxs("div",{className:"min-h-screen flex flex-col",children:[f.jsx(EU,{}),f.jsx("main",{className:"flex-1 pt-16 md:pt-20",children:e}),t&&f.jsx(SU,{})]})}function ae({children:e,requireAdmin:t=!1,requireSuperAdmin:r=!1}){const{user:n,isAdmin:o,isSuperAdmin:s,loading:i,isAdminLoading:a}=Tn(),{organizations:l,currentOrganization:c,isLoading:u}=bs();if(i||a||t&&n&&u)return f.jsx(Uw,{showFooter:!1,children:f.jsx("div",{className:"min-h-screen flex items-center justify-center",children:f.jsx(fn,{className:"h-8 w-8 animate-spin text-primary"})})});if(!n)return f.jsx(Wa,{to:"/auth",replace:!0});if(r&&!s)return f.jsx(Wa,{to:"/admin",replace:!0});const d=l.some(p=>["owner","admin","super_admin"].includes(p.role));return t&&!o&&!s&&!d?f.jsx(Wa,{to:"/auth",replace:!0}):t&&!s&&(c!=null&&c.admin_access_disabled)?f.jsx(Uw,{showFooter:!1,children:f.jsx("div",{className:"min-h-screen flex items-center justify-center px-4",children:f.jsxs("div",{className:"max-w-md text-center space-y-3",children:[f.jsx("h1",{className:"text-2xl font-bold",children:"Admin access disabled"}),f.jsxs("p",{className:"text-muted-foreground",children:["Admin access for ",c.name," has been turned off. Please contact Beyond Pro support to restore it."]})]})})}):f.jsx(f.Fragment,{children:e})}function TU({children:e}){const{isSuperAdmin:t,isAdmin:r,loading:n}=Tn(),{currentOrganization:o,isLoading:s}=bs(),{hasAccess:i,isLoading:a}=QE("timing_lab");if(n||s||a)return f.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:f.jsx(fn,{className:"h-6 w-6 animate-spin text-muted-foreground"})});if(t)return f.jsx(f.Fragment,{children:e});const l=o==null?void 0:o.role;return(r||(l==="admin"||l==="owner"||l==="super_admin"))&&o&&i?f.jsx(f.Fragment,{children:e}):f.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] p-8 text-center",children:[f.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Timing Lab is not enabled"}),f.jsx("p",{className:"text-muted-foreground max-w-md",children:"Timing Lab isn't turned on for this organization yet. Contact your platform admin to request access."})]})}const LT=v.createContext(void 0);function CU({children:e}){const[t,r]=v.useState(!1);return f.jsx(LT.Provider,{value:{isVisible:t,setVisible:r},children:e})}function PU(){const e=v.useContext(LT);if(!e)throw new Error("useTimingIframe must be used within TimingIframeProvider");return e}const Bw=["beyondproreg.com","beyondproregistration.com","lovable.app","localhost"];function kU(){const[e,t]=v.useState(null),[r,n]=v.useState(!0),[o,s]=v.useState(!1);v.useEffect(()=>{i()},[]);const i=async()=>{const u=window.location.hostname;if(!Bw.some(h=>u===h||u.endsWith(`.${h}`))){await c(u);return}const p=a(u);if(p&&p!=="www"&&p!=="id-preview"){await l(p);return}n(!1)},a=u=>{for(const d of Bw)if(u.endsWith(`.${d}`))return u.replace(`.${d}`,"").split(".")[0];return null},l=async u=>{try{const{data:d,error:p}=await xe.from("organizations_public").select("*");if(p){console.error("Error fetching organizations:",p),n(!1);return}const h=d==null?void 0:d.find(g=>g.subdomain===u||g.slug===u);h&&(t(h),s(!0))}catch(d){console.error("Error fetching organization by subdomain:",d)}finally{n(!1)}},c=async u=>{try{const{data:d,error:p}=await xe.from("organizations_public").select("*");if(p){console.error("Error fetching organizations:",p),n(!1);return}const h=d==null?void 0:d.find(g=>g.custom_domain===u);h&&(t(h),s(!0))}catch(d){console.error("Error fetching organization by custom domain:",d)}finally{n(!1)}};return{organization:e,loading:r,isCustomDomain:o}}const DT=v.createContext(void 0);function MT(e){if(!e||!e.startsWith("#"))return .5;const t=e.replace("#",""),r=parseInt(t.substring(0,2),16)/255,n=parseInt(t.substring(2,4),16)/255,o=parseInt(t.substring(4,6),16)/255,s=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4),i=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4),a=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return .2126*s+.7152*i+.0722*a}function zw(e){return MT(e)>.5?{fg:"#1a1a1a",muted:"#666666",cardBg:"rgba(255, 255, 255, 0.95)",cardFg:"#1a1a1a"}:{fg:"#fafafa",muted:"#a3a3a3",cardBg:"rgba(255, 255, 255, 0.95)",cardFg:"#1a1a1a"}}function OU({children:e}){const{organization:t,loading:r,isCustomDomain:n}=kU(),[o,s]=v.useState(null),[i,a]=v.useState(!0),[l,c]=v.useState(null);v.useEffect(()=>{r||(t&&s(t),a(!1))},[t,r]),v.useEffect(()=>{if(o!=null&&o.secondary_color){const g=zw(o.secondary_color);c({background:o.secondary_color,foreground:g.fg,muted:g.muted,cardBg:g.cardBg,cardFg:g.cardFg})}else c(null)},[o==null?void 0:o.secondary_color]),v.useEffect(()=>{const g=document.documentElement;if(o){if(document.title=o.name?`${o.name}`:"Beyond Pro Registration",o.font_heading&&g.style.setProperty("--org-font-heading",`"${o.font_heading}"`),o.font_body&&g.style.setProperty("--org-font-body",`"${o.font_body}"`),o.primary_color){g.style.setProperty("--org-primary",o.primary_color);const m=MT(o.primary_color);g.style.setProperty("--org-cta-fg",m>.5?"#1a1a1a":"#ffffff")}if(o.secondary_color){g.style.setProperty("--org-secondary",o.secondary_color),g.style.setProperty("--org-content-bg",o.secondary_color);const m=zw(o.secondary_color);g.style.setProperty("--org-content-fg",m.fg),g.style.setProperty("--org-content-muted",m.muted),g.style.setProperty("--org-card-bg",m.cardBg),g.style.setProperty("--org-card-fg",m.cardFg)}if(o.accent_color&&g.style.setProperty("--org-accent",o.accent_color),o.favicon_url){const m=d
279ocument.querySelector("link[rel*='icon']")||document.createElement("link");m.type="image/x-icon",m.rel="shortcut icon",m.href=o.favicon_url,document.getElementsByTagName("head")[0].appendChild(m)}}else{document.title="Beyond Pro Registration",g.style.removeProperty("--org-primary"),g.style.removeProperty("--org-cta-fg"),g.style.removeProperty("--org-secondary"),g.style.removeProperty("--org-accent"),g.style.removeProperty("--org-content-bg"),g.style.removeProperty("--org-content-fg"),g.style.removeProperty("--org-content-muted"),g.style.removeProperty("--org-card-bg"),g.style.removeProperty("--org-card-fg"),g.style.removeProperty("--org-font-heading"),g.style.removeProperty("--org-font-body");const m=document.querySelector("link[rel*='icon']");m&&(m.href="/favicon.ico")}},[o]);const u=v.useCallback(async g=>{if(g){a(!0);try{const{data:m,error:b}=await xe.from("events").select("organization_id").or(`id.eq.${g},slug.eq.${g}`).single();if(b||!(m!=null&&m.organization_id)){console.log("No organization found for event:",g),a(!1);return}const{data:w,error:y}=await xe.from("organizations_public").select("id, name, slug, logo_url, favicon_url, primary_color, secondary_color, accent_color, font_heading, font_body, timing_website_url, timing_link_text, landing_page_enabled, contact_email, contact_phone, event_type").eq("id",m.organization_id).single();if(y){console.error("Error fetching organization:",y),a(!1);return}w&&s(w)}catch(m){console.error("Error in setOrganizationFromEvent:",m)}finally{a(!1)}}},[]),d=v.useCallback(async g=>{if(g){a(!0);try{const{data:m,error:b}=await xe.from("registrations").select(`
280          events:event_id (
281            organization_id
282          )
283        `).eq("email",g).order("created_at",{ascending:!1}).limit(1).single();if(b||!(m!=null&&m.events)){console.log("No registrations found for user:",g),a(!1);return}const w=m.events.organization_id;if(!w){a(!1);return}const{data:y,error:_}=await xe.from("organizations_public").select("id, name, slug, logo_url, favicon_url, primary_color, secondary_color, accent_color, font_heading, font_body, timing_website_url, timing_link_text, landing_page_enabled, contact_email, contact_phone, event_type").eq("id",w).single();if(_){console.error("Error fetching organization:",_),a(!1);return}y&&s(y)}catch(m){console.error("Error in setOrganizationFromRegistrations:",m)}finally{a(!1)}}},[]),p=v.useCallback(async g=>{if(g){a(!0);try{const{data:m,error:b}=await xe.from("organizations_public").select("id, name, slug, logo_url, favicon_url, primary_color, secondary_color, accent_color, font_heading, font_body, timing_website_url, timing_link_text, landing_page_enabled, contact_email, contact_phone, event_type").eq("slug",g).eq("is_active",!0).single();if(b){console.error("Error fetching organization by slug:",b),a(!1);return}m&&s(m)}catch(m){console.error("Error in setOrganizationFromSlug:",m)}finally{a(!1)}}},[]),h=v.useCallback(()=>{s(null),c(null)},[]);return f.jsx(DT.Provider,{value:{branding:o,loading:i||r,isCustomDomain:n,setOrganizationFromEvent:u,setOrganizationFromRegistrations:d,setOrganizationFromSlug:p,clearBranding:h,contentColors:l},children:e})}function Es(){const e=v.useContext(DT);if(e===void 0)throw new Error("usePublicBranding must be used within a PublicBrandingProvider");return e}function RU(){const{isAdmin:e,isAdminLoading:t}=Tn(),{isVisible:r}=PU(),{currentOrganization:n}=bs();if(t||!e)return null;const o=(n==null?void 0:n.timing_admin_url)||"https://edgemxtiming.com/admin.html";return o?f.jsx("div",{className:`fixed left-0 right-0 bottom-0 z-0 bg-background transition-opacity ${r?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}`,style:{top:"260px",display:r?"block":"none"},children:f.jsx("div",{className:"container mx-auto px-4 h-full",children:f.jsx("div",{className:"w-full h-full rounded-lg border bg-card overflow-hidden",children:f.jsx("iframe",{src:o,className:"w-full h-full border-0",title:"Timing Admin",allow:"fullscreen"})})})}):null}function $T(e){return t=>typeof t===e}var jU=$T("function"),AU=e=>e===null,Vw=e=>Object.prototype.toString.call(e).slice(8,-1)==="RegExp",Ww=e=>!NU(e)&&!AU(e)&&(jU(e)||typeof e=="object"),NU=$T("undefined");function IU(e,t){const{length:r}=e;if(r!==t.length)return!1;for(let n=r;n--!==0;)if(!St(e[n],t[n]))return!1;return!0}function LU(e,t){if(e.byteLength!==t.byteLength)return!1;const r=new DataView(e.buffer),n=new DataView(t.buffer);let o=e.byteLength;for(;o--;)if(r.getUint8(o)!==n.getUint8(o))return!1;return!0}function DU(e,t){if(e.size!==t.size)return!1;
283for(const r of e.entries())if(!t.has(r[0]))return!1;for(const r of e.entries())if(!St(r[1],t.get(r[0])))return!1;return!0}function MU(e,t){if(e.size!==t.size)return!1;for(const r of e.entries())if(!t.has(r[0]))return!1;return!0}function St(e,t){if(e===t)return!0;if(e&&Ww(e)&&t&&Ww(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return IU(e,t);if(e instanceof Map&&t instanceof Map)return DU(e,t);if(e instanceof Set&&t instanceof Set)return MU(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return LU(e,t);if(Vw(e)&&Vw(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let o=r.length;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(let o=r.length;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!St(e[s],t[s]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}var $U=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],FU=["bigint","boolean","null","number","string","symbol","undefined"];function Gd(e){const t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(UU(t))return t}function Ar(e){return t=>Gd(t)===e}function UU(e){return $U.includes(e)}function ea(e){return t=>typeof t===e}function BU(e){return FU.includes(e)}var zU=["innerHTML","ownerDocument","style","attributes","nodeValue"];function K(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(K.array(e))return"Array";if(K.plainFunction(e))return"Function";const t=Gd(e);return t||"Object"}K.array=Array.isArray;K.arrayOf=(e,t)=>!K.array(e)&&!K.function(t)?!1:e.every(r=>t(r));K.asyncGeneratorFunction=e=>Gd(e)==="AsyncGeneratorFunction";K.asyncFunction=Ar("AsyncFunction");K.bigint=ea("bigint");K.boolean=e=>e===!0||e===!1;K.date=Ar("Date");K.defined=e=>!K.undefined(e);K.domElement=e=>K.object(e)&&!K.plainObject(e)&&e.nodeType===1&&K.string(e.nodeName)&&zU.every(t=>t in e);K.empty=e=>K.string(e)&&e.length===0||K.array(e)&&e.length===0||K.object(e)&&!K.map(e)&&!K.set(e)&&Object.keys(e).length===0||K.set(e)&&e.size===0||K.map(e)&&e.size===0;K.error=Ar("Error");K.function=ea("function");K.generator=e=>K.iterable(e)&&K.function(e.next)&&K.function(e.throw);K.generatorFunction=Ar("GeneratorFunction");K.instanceOf=(e,t)=>!e||!t?!1:Object.getPrototypeOf(e)===t.prototype;K.iterable=e=>!K.nullOrUndefined(e)&&K.function(e[Symbol.iterator]);K.map=Ar("Map");K.nan=e=>Number.isNaN(e);K.null=e=>e===null;K.nullOrUndefined=e=>K.null(e)||K.undefined(e);K.number=e=>ea("number")(e)&&!K.nan(e);K.numericString=e=>K.string(e)&&e.length>0&&!Number.isNaN(Number(e));K.object=e=>!K.nullOrUndefined(e)&&(K.function(e)||typeof e=="object");K.oneOf=(e,t)=>K.array(e)?e.indexOf(t)>-1:!1;K.plainFunction=Ar("Function");K.plainObject=e=>{if(Gd(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};K.primitive=e=>K.null(e)||BU(typeof e);K.promise=Ar("Promise");K.propertyOf=(e,t,r)=>{if(!K.object(e)||!t)return!1;const n=e[t];return K.function(r)?r(n):K.defined(n)};K.regexp=Ar("RegExp");K.set=Ar("Set");K.string=ea("string");K.symbol=ea("symbol");K.undefined=ea("undefined");K.weakMap=Ar("WeakMap");K.weakSet=Ar("WeakSet");var X=K;function VU(...e){return e.every(t=>X.string(t)||X.array(t)||X.plainObject(t))}function WU(e,t,r){return FT(e,t)?[e,t].every(X.array)?!e.some(Qw(r))&&t.some(Qw(r)):[e,t].every(X.plainObject)?!Object.entries(e).some(Kw(r))&&Object.entries(t).some(Kw(r)):t===r:!1}function Hw(e,t,r){const{actual:n,key:o,previous:s,type:i}=r,a=Hr(e,o),l=Hr(t,o);let c=[a,l].every(X.number)&&(i==="increased"?a<l:a>l);return X.undefined(n)||(c=c&&l===n),X.undefined(s)||(c=c&&a===s),c}function qw(e,t,r){const{key:n,type:o,value:s}=r,i=Hr(e,n),a=Hr(t,n),l=o==="added"?i:a,c=o==="added"?a:i;if(!X.nullOrUndefined(s)){if(X.defined(l)){if(X.array(l)||X.plainObject(l))return WU(l,c,s)}else return St(c,s);return!1}return[i,a].every(X.array)?!c.every(qg(l)):[i,a].every(X.plainObject)?HU(Object.keys(l),Object.keys(c)):![i,a].every(u=>X.primitive(u)&&X.defined(u))&&(o==="added"?!X.defined(i)&&X.defined(a):X.defined(i)&&!X.defined(a))}function Gw(e,t,{key:r}={}){let n=Hr(e,r),o=Hr(t,r);
283if(!FT(n,o))throw new TypeError("Inputs have different types");if(!VU(n,o))throw new TypeError("Inputs don't have length");return[n,o].every(X.plainObject)&&(n=Object.keys(n),o=Object.keys(o)),[n,o]}function Kw(e){return([t,r])=>X.array(e)?St(e,r)||e.some(n=>St(n,r)||X.array(r)&&qg(r)(n)):X.plainObject(e)&&e[t]?!!e[t]&&St(e[t],r):St(e,r)}function HU(e,t){return t.some(r=>!e.includes(r))}function Qw(e){return t=>X.array(e)?e.some(r=>St(r,t)||X.array(t)&&qg(t)(r)):St(e,t)}function ga(e,t){return X.array(e)?e.some(r=>St(r,t)):St(e,t)}function qg(e){return t=>e.some(r=>St(r,t))}function FT(...e){return e.every(X.array)||e.every(X.number)||e.every(X.plainObject)||e.every(X.string)}function Hr(e,t){return X.plainObject(e)||X.array(e)?X.string(t)?t.split(".").reduce((n,o)=>n&&n[o],e):X.number(t)?e[t]:e:e}function Yu(e,t){if([e,t].some(X.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(u=>X.plainObject(u)||X.array(u)))throw new Error("Expected plain objects or array");return{added:(u,d)=>{try{return qw(e,t,{key:u,type:"added",value:d})}catch{return!1}},changed:(u,d,p)=>{try{const h=Hr(e,u),g=Hr(t,u),m=X.defined(d),b=X.defined(p);if(m||b){const w=b?ga(p,h):!ga(d,h),y=ga(d,g);return w&&y}return[h,g].every(X.array)||[h,g].every(X.plainObject)?!St(h,g):h!==g}catch{return!1}},changedFrom:(u,d,p)=>{if(!X.defined(u))return!1;try{const h=Hr(e,u),g=Hr(t,u),m=X.defined(p);return ga(d,h)&&(m?ga(p,g):!m)}catch{return!1}},decreased:(u,d,p)=>{if(!X.defined(u))return!1;try{return Hw(e,t,{key:u,actual:d,previous:p,type:"decreased"})}catch{return!1}},emptied:u=>{try{const[d,p]=Gw(e,t,{key:u});return!!d.length&&!p.length}catch{return!1}},filled:u=>{try{const[d,p]=Gw(e,t,{key:u});return!d.length&&!!p.length}catch{return!1}},increased:(u,d,p)=>{if(!X.defined(u))return!1;try{return Hw(e,t,{key:u,actual:d,previous:p,type:"increased"})}catch{return!1}},removed:(u,d)=>{try{return qw(e,t,{key:u,type:"removed",value:d})}catch{return!1}}}}var qU=new Error("Element already at target scroll position"),GU=new Error("Scroll cancelled"),KU=Math.min,Yw=Date.now,QU={left:Jw("scrollLeft"),top:Jw("scrollTop")};function Jw(e){return function(r,n,o,s){o=o||{},typeof o=="function"&&(s=o,o={}),typeof s!="function"&&(s=JU);var i=Yw(),a=r[e],l=o.ease||YU,c=isNaN(o.duration)?350:+o.duration,u=!1;return a===n?s(qU,r[e]):requestAnimationFrame(p),d;function d(){u=!0}function p(h){if(u)return s(GU,r[e]);var g=Yw(),m=KU(1,(g-i)/c),b=l(m);r[e]=b*(n-a)+a,m<1?requestAnimationFrame(p):requestAnimationFrame(function(){s(null,r[e])})}}}function YU(e){return .5*(1-Math.cos(Math.PI*e))}function JU(){}const XU=wo(QU);var UT={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.Scrollparent=r()})(No,function(){function t(n){var o=getComputedStyle(n,null).getPropertyValue("overflow");return o.indexOf("scroll")>-1||o.indexOf("auto")>-1}function r(n){if(n instanceof HTMLElement||n instanceof SVGElement){for(var o=n.parentNode;o.parentNode;){if(t(o))return o;o=o.parentNode}return document.scrollingElement||document.documentElement}}return r})})(UT);var ZU=UT.exports;const BT=wo(ZU);var eB=function(e){return Object.prototype.hasOwnProperty.call(e,"props")},tB=function(e,t){return e+wl(t)},wl=function(e){return e===null||typeof e=="boolean"||typeof e>"u"?"":typeof e=="number"?e.toString():typeof e=="string"?e:Array.isArray(e)?e.reduce(tB,""):eB(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?wl(e.props.children):""};wl.default=wl;var rB=wl;const Xw=wo(rB);var nB=function(t){return oB(t)&&!sB(t)};function oB(e){return!!e&&typeof e=="object"}function sB(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||lB(e)}var iB=typeof Symbol=="function"&&Symbol.for,aB=iB?Symbol.for("react.element"):60103;function lB(e){return e.$$typeof===aB}function cB(e){return Array.isArray(e)?[]:{}}function bl(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Li(cB(e),e,t):e}function uB(e,t,r){return e.concat(t).map(function(n){return bl(n,r)})}function dB(e,t){if(!t.customMerge)return Li;var r=t.customMerge(e);return typeof r=="function"?r:Li}function fB(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Zw(e){return Object.keys(e).concat(fB(e))}function zT(e,t){try{return t in e}catch{return!1}}function hB(e,t){return zT(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function pB(e,t,r){var n={};return r.isMergeableObject(e)&&Zw(e).forEach(function(o){n[o]=bl(e[o],r)}),Zw(t).forEach(function(o){hB(e,o)||(zT(e,o)&&r.isMergeableObject(t[o])?n[o]=dB(o,r)(e[o],t[o],r):n[o]=bl(t[o],r))}),n}function Li(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||uB,r.isMergeableObject=r.isMergeableObject||nB,r.cloneUnlessOtherwiseSpecified=bl;var n=Array.isArray(t),o=Array.isArray(e),s=n===o;return s?n?r.arrayMerge(e,t,r):pB(e,t,r):bl(t,r)}Li.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,o){return Li(n,o,r)},{})};var mB=Li,gB=mB;const Tr=wo(gB);var VT={exports:{}},vB="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",yB=vB,wB=yB;function WT(){}function HT(){}HT.resetWarningCache=WT;var bB=function(){function e(n,o,s,i,a,l){if(l!==wB){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol
vendor: 5,063 bytes, lines 283-306
283:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:HT,resetWarningCache:WT};return r.PropTypes=r,r};VT.exports=bB();var _B=VT.exports;const z=wo(_B);/**!
284 * @fileOverview Kickass library to create and place poppers near their reference elements.
285 * @version 1.16.1
286 * @license
287 * Copyright (c) 2016 Federico Zivolo and contributors
288 *
289 * Permission is hereby granted, free of charge, to any person obtaining a copy
290 * of this software and associated documentation files (the "Software"), to deal
291 * in the Software without restriction, including without limitation the rights
292 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
293 * copies of the Software, and to permit persons to whom the Software is
294 * furnished to do so, subject to the following conditions:
295 *
296 * The above copyright notice and this permission notice shall be included in all
297 * copies or substantial portions of the Software.
298 *
299 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
300 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
301 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
302 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
303 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
304 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
305 * SOFTWARE.
306 */var zl=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",xB=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(zl&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();function EB(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function SB(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},xB))}}var TB=zl&&window.Promise,CB=TB?EB:SB;function qT(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Ss(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function Gg(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function Vl(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Ss(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(r+o+n)?e:Vl(Gg(e))}function GT(e){return e&&e.referenceNode?e.referenceNode:e}var e0=zl&&!!(window.MSInputMethodContext&&document.documentMode),t0=zl&&/MSIE 10/.test(navigator.userAgent);function ta(e){return e===11?e0:e===10?t0:e0||t0}function Di(e){if(!e)return document.documentElement;for(var t=ta(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&Ss(r,"position")==="static"?Di(r):r}function PB(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Di(e.firstElementChild)===e}function Vp(e){return e.parentNode!==null?Vp(e.parentNode):e}function Ju(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,o=r?t:e,s=document.createRange();s.setStart(n,0),s.setEnd(o,0);var i=s.commonAncestorContainer;if(e!==i&&t!==i||n.contains(o))return PB(i)?i:Di(i);var a=Vp(e);return a.host?Ju(a.host,t):Ju(e,Vp(t).host)}function Mi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var o=e.ownerDocument.documentElement,s=e.ownerDocument.scrollingElement||o;return s[r]}return e[r]}function kB(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Mi(t,"top"),o=Mi(t,"left"),s=r?-1:1;return e.top+=n*s,e.bottom+=n*s,e.left+=o*s,e.right+=o*s,e}function r0(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function n0(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],ta(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function KT(e){var t=e.body,r=e.documentElement,n=ta(10)&&getComputedStyle(r);return{height:n0("Height",t,r,n),width:n0("Width",t,r,n)}}var OB=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},RB=function(){function e(t,r){for(var n=0;n<r.length;n++){var o=r[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),$i=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},ir=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 13,865 bytes, line 306
306for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function yo(e){return ir({},e,{right:e.left+e.width,bottom:e.top+e.height})}function Wp(e){var t={};try{if(ta(10)){t=e.getBoundingClientRect();var r=Mi(e,"top"),n=Mi(e,"left");t.top+=r,t.left+=n,t.bottom+=r,t.right+=n}else t=e.getBoundingClientRect()}catch{}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},s=e.nodeName==="HTML"?KT(e.ownerDocument):{},i=s.width||e.clientWidth||o.width,a=s.height||e.clientHeight||o.height,l=e.offsetWidth-i,c=e.offsetHeight-a;if(l||c){var u=Ss(e);l-=r0(u,"x"),c-=r0(u,"y"),o.width-=l,o.height-=c}return yo(o)}function Kg(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=ta(10),o=t.nodeName==="HTML",s=Wp(e),i=Wp(t),a=Vl(e),l=Ss(t),c=parseFloat(l.borderTopWidth),u=parseFloat(l.borderLeftWidth);r&&o&&(i.top=Math.max(i.top,0),i.left=Math.max(i.left,0));var d=yo({top:s.top-i.top-c,left:s.left-i.left-u,width:s.width,height:s.height});if(d.marginTop=0,d.marginLeft=0,!n&&o){var p=parseFloat(l.marginTop),h=parseFloat(l.marginLeft);d.top-=c-p,d.bottom-=c-p,d.left-=u-h,d.right-=u-h,d.marginTop=p,d.marginLeft=h}return(n&&!r?t.contains(a):t===a&&a.nodeName!=="BODY")&&(d=kB(d,t)),d}function jB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=Kg(e,r),o=Math.max(r.clientWidth,window.innerWidth||0),s=Math.max(r.clientHeight,window.innerHeight||0),i=t?0:Mi(r),a=t?0:Mi(r,"left"),l={top:i-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:o,height:s};return yo(l)}function QT(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Ss(e,"position")==="fixed")return!0;var r=Gg(e);return r?QT(r):!1}function YT(e){if(!e||!e.parentElement||ta())return document.documentElement;for(var t=e.parentElement;t&&Ss(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function Qg(e,t,r,n){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s={top:0,left:0},i=o?YT(e):Ju(e,GT(t));if(n==="viewport")s=jB(i,o);else{var a=void 0;n==="scrollParent"?(a=Vl(Gg(t)),a.nodeName==="BODY"&&(a=e.ownerDocument.documentElement)):n==="window"?a=e.ownerDocument.documentElement:a=n;var l=Kg(a,i,o);if(a.nodeName==="HTML"&&!QT(i)){var c=KT(e.ownerDocument),u=c.height,d=c.width;s.top+=l.top-l.marginTop,s.bottom=u+l.top,s.left+=l.left-l.marginLeft,s.right=d+l.left}else s=l}r=r||0;var p=typeof r=="number";return s.left+=p?r:r.left||0,s.top+=p?r:r.top||0,s.right-=p?r:r.right||0,s.bottom-=p?r:r.bottom||0,s}function AB(e){var t=e.width,r=e.height;return t*r}function JT(e,t,r,n,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var i=Qg(r,n,s,o),a={top:{width:i.width,height:t.top-i.top},right:{width:i.right-t.right,height:i.height},bottom:{width:i.width,height:i.bottom-t.bottom},left:{width:t.left-i.left,height:i.height}},l=Object.keys(a).map(function(p){return ir({key:p},a[p],{area:AB(a[p])})}).sort(function(p,h){return h.area-p.area}),c=l.filter(function(p){var h=p.width,g=p.height;return h>=r.clientWidth&&g>=r.clientHeight}),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function XT(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=n?YT(t):Ju(t,GT(r));return Kg(r,o,n)}function ZT(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),o=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),s={width:e.offsetWidth+o,height:e.offsetHeight+n};return s}function Xu(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function eC(e,t,r){r=r.split("-")[0];var n=ZT(e),o={width:n.width,height:n.height},s=["right","left"].indexOf(r)!==-1,i=s?"top":"left",a=s?"left":"top",l=s?"height":"width",c=s?"width":"height";return o[i]=t[i]+t[l]/2-n[l]/2,r===a?o[a]=t[a]-n[c]:o[a]=t[Xu(a)],o}function Wl(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function NB(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(o){return o[t]===r});var n=Wl(e,function(o){return o[t]===r});return e.indexOf(n)}function tC(e,t,r){var n=r===void 0?e:e.slice(0,NB(e,"name",r));return n.forEach(function(o){o.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var s=o.function||o.fn;o.enabled&&qT(s)&&(t.offsets.popper=yo(t.offsets.popper),t.offsets.reference=yo(t.offsets.reference),t=s(t,o))}),t}function IB(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=XT(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=JT(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=eC(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=tC(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function rC(e,t){return e.some(function(r){var n=r.name,o=r.enabled;return o&&n===t})}function Yg(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var o=t[n],s=o?""+o+r:e;if(typeof document.body.style[s]<"u")return s}return null}function LB(){return this.state.isDestroyed=!0,rC(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[Yg("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function nC(e){var t=e.ownerDocument;return t?t.defaultView:window}function oC(e,t,r,n){var o=e.nodeName==="BODY",s=o?e.ownerDocument.defaultView:e;s.addEventListener(t,r,{passive:!0}),o||oC(Vl(s.parentNode),t,r,n),n.push(s)}function DB(e,t,r,n){r.updateBound=n,nC(e).addEventListener("resize",r.updateBound,{passive:!0});var o=Vl(e);return oC(o,"scroll",r.updateBound,r.scrollParents),r.scrollElement=o,r.eventsEnabled=!0,r}function MB(){this.state.eventsEnabled||(this.state=DB(this.reference,this.options,this.state,this.scheduleUpdate))}function $B(e,t){return nC(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(r){r.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function FB(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=$B(this.reference,this.state))}function Jg(e){return e!==""&&!isNaN(parseFloat(e))&&isFinite(e)}function Hp(e,t){Object.keys(t).forEach(function(r){var n="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&Jg(t[r])&&(n="px"),e.style[r]=t[r]+n})}function UB(e,t){Object.keys(t).forEach(function(r){var n=t[r];n!==!1?e.setAttribute(r,t[r]):e.removeAttribute(r)})}function BB(e){return Hp(e.instance.popper,e.styles),UB(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&Hp(e.arrowElement,e.arrowStyles),e}function zB(e,t,r,n,o){var s=XT(o,t,e,r.positionFixed),i=JT(r.placement,s,t,e,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return t.setAttribute("x-placement",i),Hp(t,{position:r.positionFixed?"fixed":"absolute"}),r}function VB(e,t){var r=e.offsets,n=r.popper,o=r.reference,s=Math.round,i=Math.floor,a=function(w){return w},l=s(o.width),c=s(n.width),u=["left","right"].indexOf(e.placement)!==-1,d=e.placement.indexOf("-")!==-1,p=l%2===c%2,h=l%2===1&&c%2===1,g=t?u||d||p?s:i:a,m=t?s:a;return{left:g(h&&!d&&t?n.left-1:n.left),top:m(n.top),bottom:m(n.bottom),right:g(n.right)}}var WB=zl&&/Firefox/i.test(navigator.userAgent);function HB(e,t){var r=t.x,n=t.y,o=e.offsets.popper,s=Wl(e.instance.modifiers,function(_){return _.name==="applyStyle"}).gpuAcceleration;s!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var i=s!==void 0?s:t.gpuAcceleration,a=Di(e.instance.popper),l=Wp(a),c={position:o.position},u=VB(e,window.devicePixelRatio<2||!WB),d=r==="bottom"?"top":"bottom",p=n==="right"?"left":"right",h=Yg("transform"),g=void 0,m=void 0;if(d==="bottom"?a.nodeName==="HTML"?m=-a.clientHeight+u.bottom:m=-l.height+u.bottom:m=u.top,p==="right"?a.nodeName==="HTML"?g=-a.clientWidth+u.right:g=-l.width+u.right:g=u.left,i&&h)c[h]="translate3d("+g+"px, "+m+"px, 0)",c[d]=0,c[p]=0,c.willChange="transform";else{var b=d==="bottom"?-1:1,w=p==="right"?-1:1;c[d]=m*b,c[p]=g*w,c.willChange=d+", "+p}var y={"x-placement":e.placement};return e.attributes=ir({},y,e.attributes),e.styles=ir({},c,e.styles),e.arrowStyles=ir({},e.offsets.arrow,e.arrowStyles),e}function sC(e,t,r){var n=Wl(e,function(a){var l=a.name;return l===t}),o=!!n&&e.some(function(a){return a.name===r&&a.enabled&&a.order<n.order});if(!o){var s="`"+t+"`",i="`"+r+"`";console.warn(i+" modifier is required by "+s+" modifier in order to work, be sure to include it before "+s+"!")}return o}function qB(e,t){var r;if(!sC(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if(typeof n=="string"){if(n=e.instance.popper.querySelector(n),!n)return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],s=e.offsets,i=s.popper,a=s.reference,l=["left","right"].indexOf(o)!==-1,c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),p=l?"left":"top",h=l?"bottom":"right",g=ZT(n)[c];a[h]-g<i[d]&&(e.offsets.popper[d]-=i[d]-(a[h]-g)),a[d]+g>i[h]&&(e.offsets.popper[d]+=a[d]+g-i[h]),e.offsets.popper=yo(e.offsets.popper);var m=a[d]+a[c]/2-g/2,b=Ss(e.instance.popper),w=parseFloat(b["margin"+u]),y=parseFloat(b["border"+u+"Width"]),_=m-e.offsets.popper[d]-w-y;return _=Math.max(Math.min(i[c]-g,_),0),e.arrowElement=n,e.offsets.arrow=(r={},$i(r,d,Math.round(_)),$i(r,p,""),r),e}function GB(e){return e==="end"?"start":e==="start"?"end":e}var iC=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],eh=iC.slice(3);function o0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=eh.indexOf(e),n=eh.slice(r+1).concat(eh.slice(0,r));return t?n.reverse():n}var th={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function KB(e,t){if(rC(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=Qg(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],o=Xu(n),s=e.placement.split("-")[1]||"",i=[];switch(t.behavior){case th.FLIP:i=[n,o];break;case th.CLOCKWISE:i=o0(n);break;case th.COUNTERCLOCKWISE:i=o0(n,!0);break;default:i=t.behavior}return i.forEach(function(a,l){if(n!==a||i.length===l+1)return e;n=e.placement.split("-")[0],o=Xu(n);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p=n==="left"&&d(c.right)>d(u.left)||n==="right"&&d(c.left)<d(u.right)||n==="top"&&d(c.bottom)>d(u.top)||n==="bottom"&&d(c.top)<d(u.bottom),h=d(c.left)<d(r.left),g=d(c.right)>d(r.right),m=d(c.top)<d(r.top),b=d(c.bottom)>d(r.bottom),w=n==="left"&&h||n==="right"&&g||n==="top"&&m||n==="bottom"&&b,y=["top","bottom"].indexOf(n)!==-1,_=!!t.flipVariations&&(y&&s==="start"&&h||y&&s==="end"&&g||!y&&s==="start"&&m||!y&&s==="end"&&b),x=!!t.flipVariationsByContent&&(y&&s==="start"&&g||y&&s==="end"&&h||!y&&s==="start"&&b||!y&&s==="end"&&m),E=_||x;(p||w||E)&&(e.flipped=!0,(p||w)&&(n=i[l+1]),E&&(s=GB(s)),e.placement=n+(s?"-"+s:""),e.offsets.popper=ir({},e.offsets.popper,eC(e.instance.popper,e.offsets.reference,e.placement)),e=tC(e.instance.modifiers,e,"flip"))}),e}function QB(e){var t=e.offsets,r=t.popper,n=t.reference,o=e.placement.split("-")[0],s=Math.floor,i=["top","bottom"].indexOf(o)!==-1,a=i?"right":"bottom",l=i?"left":"top",c=i?"width":"height";return r[a]<s(n[l])&&(e.offsets.popper[l]=s(n[l])-r[c]),r[l]>s(n[a])&&(e.offsets.popper[l]=s(n[a])),e}function YB(e,t,r,n){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),s=+o[1],i=o[2];if(!s)return e;if(i.indexOf("%")===0){var a=void 0;switch(i){case"%p":a=r;break;case"%":case"%r":default:a=n}var l=yo(a);return l[t]/100*s}else if(i==="vh"||i==="vw"){var c=void 0;return i==="vh"?c=Math.max(document.documentElement.clientHeight,window.innerHeight||0):c=Math.max(document.documentElement.clientWidth,window.innerWidth||0),c/100*s}else return s}function JB(e,t,r,n){var o=[0,0],s=["right","left"].indexOf(n)!==-1,i=e.split(/(\+|\-)/).map(function(u){return u.trim()}),a=i.indexOf(Wl(i,function(u){return u.search(/,|\s/)!==-1}));i[a]&&i[a].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=a!==-1?[i.slice(0,a).concat([i[a].split(l)[0]]),[i[a].split(l)[1]].concat(i.slice(a+1))]:[i];return c=c.map(function(u,d){var p=(d===1?!s:s)?"height":"width",h=!1;return u.reduce(function(g,m){return g[g.length-1]===""&&["+","-"].indexOf(m)!==-1?(g[g.length-1]=m,h=!0,g):h?(g[g.length-1]+=m,h=!1,g):g.concat(m)},[]).map(function(g){return YB(g,p,t,r)})}),c.forEach(function(u,d){u.forEach(function(p,h){Jg(p)&&(o[d]+=p*(u[h-1]==="-"?-1:1))})}),o}function XB(e,t){var r=t.offset,n=e.placement,o=e.offsets,s=o.popper,i=o.reference,a=n.split("-")[0],l=void 0;return Jg(+r)?l=[+r,0]:l=JB(r,s,i,a),a==="left"?(s.top+=l[0],s.left-=l[1]):a==="right"?(s.top+=l[0],s.left+=l[1]):a==="top"?(s.left+=l[0],s.top-=l[1]):a==="bottom"&&(s.left+=l[0],s.top+=l[1]),e.popper=s,e}
vendor: 5,183 bytes, line 306
306function ZB(e,t){var r=t.boundariesElement||Di(e.instance.popper);e.instance.reference===r&&(r=Di(r));var n=Yg("transform"),o=e.instance.popper.style,s=o.top,i=o.left,a=o[n];o.top="",o.left="",o[n]="";var l=Qg(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);o.top=s,o.left=i,o[n]=a,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(h){var g=u[h];return u[h]<l[h]&&!t.escapeWithReference&&(g=Math.max(u[h],l[h])),$i({},h,g)},secondary:function(h){var g=h==="right"?"left":"top",m=u[g];return u[h]>l[h]&&!t.escapeWithReference&&(m=Math.min(u[g],l[h]-(h==="right"?u.width:u.height))),$i({},g,m)}};return c.forEach(function(p){var h=["left","top"].indexOf(p)!==-1?"primary":"secondary";u=ir({},u,d[h](p))}),e.offsets.popper=u,e}function e5(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var o=e.offsets,s=o.reference,i=o.popper,a=["bottom","top"].indexOf(r)!==-1,l=a?"left":"top",c=a?"width":"height",u={start:$i({},l,s[l]),end:$i({},l,s[l]+s[c]-i[c])};e.offsets.popper=ir({},i,u[n])}return e}function t5(e){if(!sC(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=Wl(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottom<r.top||t.left>r.right||t.top>r.bottom||t.right<r.left){if(e.hide===!0)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(e.hide===!1)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function r5(e){var t=e.placement,r=t.split("-")[0],n=e.offsets,o=n.popper,s=n.reference,i=["left","right"].indexOf(r)!==-1,a=["top","left"].indexOf(r)===-1;return o[i?"left":"top"]=s[r]-(a?o[i?"width":"height"]:0),e.placement=Xu(t),e.offsets.popper=yo(o),e}var n5={shift:{order:100,enabled:!0,fn:e5},offset:{order:200,enabled:!0,fn:XB,offset:0},preventOverflow:{order:300,enabled:!0,fn:ZB,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:QB},arrow:{order:500,enabled:!0,fn:qB,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:KB,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:r5},hide:{order:800,enabled:!0,fn:t5},computeStyle:{order:850,enabled:!0,fn:HB,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:BB,onLoad:zB,gpuAcceleration:void 0}},o5={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:n5},_l=function(){function e(t,r){var n=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};OB(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=CB(this.update.bind(this)),this.options=ir({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(ir({},e.Defaults.modifiers,o.modifiers)).forEach(function(i){n.options.modifiers[i]=ir({},e.Defaults.modifiers[i]||{},o.modifiers?o.modifiers[i]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(i){return ir({name:i},n.options.modifiers[i])}).sort(function(i,a){return i.order-a.order}),this.modifiers.forEach(function(i){i.enabled&&qT(i.onLoad)&&i.onLoad(n.reference,n.popper,n.options,i,n.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return RB(e,[{key:"update",value:function(){return IB.call(this)}},{key:"destroy",value:function(){return LB.call(this)}},{key:"enableEventListeners",value:function(){return MB.call(this)}},{key:"disableEventListeners",value:function(){return FB.call(this)}}]),e}();_l.Utils=(typeof window<"u"?window:global).PopperUtils;_l.placements=iC;_l.Defaults=o5;var s5=["innerHTML","ownerDocument","style","attributes","nodeValue"],i5=["Array","ArrayBuffer","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","Date","Error","Function","Generator","GeneratorFunction","HTMLElement","Map","Object","Promise","RegExp","Set","WeakMap","WeakSet"],a5=["bigint","boolean","null","number","string","symbol","undefined"];function Kd(e){var t=Object.prototype.toString.call(e).slice(8,-1);if(/HTML\w+Element/.test(t))return"HTMLElement";if(l5(t))return t}function Nr(e){return function(t){return Kd(t)===e}}function l5(e){return i5.includes(e)}function ra(e){return function(t){return typeof t===e}}function c5(e){return a5.includes(e)}function N(e){if(e===null)return"null";switch(typeof e){case"bigint":return"bigint";case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"symbol":return"symbol";case"undefined":return"undefined"}if(N.array(e))return"Array";if(N.plainFunction(e))return"Function";var t=Kd(e);return t||"Object"}N.array=Array.isArray;N.arrayOf=function(e,t){return!N.array(e)&&!N.function(t)?!1:e.every(function(r){return t(r)})};N.asyncGeneratorFunction=function(e){return Kd(e)==="AsyncGeneratorFunction"};N.asyncFunction=Nr("AsyncFunction");N.bigint=ra("bigint");N.boolean=function(e){return e===!0||e===!1};N.date=Nr("Date");N.defined=function(e){return!N.undefined(e)};
306N.domElement=function(e){return N.object(e)&&!N.plainObject(e)&&e.nodeType===1&&N.string(e.nodeName)&&s5.every(function(t){return t in e})};N.empty=function(e){return N.string(e)&&e.length===0||N.array(e)&&e.length===0||N.object(e)&&!N.map(e)&&!N.set(e)&&Object.keys(e).length===0||N.set(e)&&e.size===0||N.map(e)&&e.size===0};N.error=Nr("Error");N.function=ra("function");N.generator=function(e){return N.iterable(e)&&N.function(e.next)&&N.function(e.throw)};N.generatorFunction=Nr("GeneratorFunction");N.instanceOf=function(e,t){return!e||!t?!1:Object.getPrototypeOf(e)===t.prototype};N.iterable=function(e){return!N.nullOrUndefined(e)&&N.function(e[Symbol.iterator])};N.map=Nr("Map");N.nan=function(e){return Number.isNaN(e)};N.null=function(e){return e===null};N.nullOrUndefined=function(e){return N.null(e)||N.undefined(e)};N.number=function(e){return ra("number")(e)&&!N.nan(e)};N.numericString=function(e){return N.string(e)&&e.length>0&&!Number.isNaN(Number(e))};N.object=function(e){return!N.nullOrUndefined(e)&&(N.function(e)||typeof e=="object")};N.oneOf=function(e,t){return N.array(e)?e.indexOf(t)>-1:!1};N.plainFunction=Nr("Function");N.plainObject=function(e){if(Kd(e)!=="Object")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.getPrototypeOf({})};N.primitive=function(e){return N.null(e)||c5(typeof e)};N.promise=Nr("Promise");N.propertyOf=function(e,t,r){if(!N.object(e)||!t)return!1;var n=e[t];return N.function(r)?r(n):N.defined(n)};N.regexp=Nr("RegExp");N.set=Nr("Set");N.string=ra("string");N.symbol=ra("symbol");N.undefined=ra("undefined");N.weakMap=Nr("WeakMap");N.weakSet=Nr("WeakSet");function aC(e){return function(t){return typeof t===e}}var u5=aC("function"),d5=function(e){return e===null},s0=function(e){return Object.prototype.toString.call(e).slice(8,-1)==="RegExp"},i0=function(e){return!f5(e)&&!d5(e)&&(u5(e)||typeof e=="object")},f5=aC("undefined"),qp=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function h5(e,t){var r=e.length;if(r!==t.length)return!1;for(var n=r;n--!==0;)if(!Mt(e[n],t[n]))return!1;return!0}function p5(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=new DataView(e.buffer),n=new DataView(t.buffer),o=e.byteLength;o--;)if(r.getUint8(o)!==n.getUint8(o))return!1;return!0}function m5(e,t){var r,n,o,s;if(e.size!==t.size)return!1;try{for(var i=qp(e.entries()),a=i.next();!a.done;a=i.next()){var l=a.value;if(!t.has(l[0]))return!1}}catch(d){r={error:d}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}try{for(var c=qp(e.entries()),u=c.next();!u.done;u=c.next()){var l=u.value;if(!Mt(l[1],t.get(l[0])))return!1}}catch(d){o={error:d}}finally{try{u&&!u.done&&(s=c.return)&&s.call(c)}finally{if(o)throw o.error}}return!0}function g5(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var o=qp(e.entries()),s=o.next();!s.done;s=o.next()){var i=s.value;if(!t.has(i[0]))return!1}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0}function Mt(e,t){if(e===t)return!0;if(e&&i0(e)&&t&&i0(t)){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)&&Array.isArray(t))return h5(e,t);if(e instanceof Map&&t instanceof Map)return m5(e,t);if(e instanceof Set&&t instanceof Set)return g5(e,t);if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return p5(e,t);if(s0(e)&&s0(t))return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=r.length;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,r[o]))return!1;for(var o=r.length;o--!==0;){var s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Mt(e[s],t[s]))return!1}return!0}return Number.isNaN(e)&&Number.isNaN(t)?!0:e===t}function v5(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];
306return e.every(function(r){return N.string(r)||N.array(r)||N.plainObject(r)})}function y5(e,t,r){return lC(e,t)?[e,t].every(N.array)?!e.some(d0(r))&&t.some(d0(r)):[e,t].every(N.plainObject)?!Object.entries(e).some(u0(r))&&Object.entries(t).some(u0(r)):t===r:!1}function a0(e,t,r){var n=r.actual,o=r.key,s=r.previous,i=r.type,a=qr(e,o),l=qr(t,o),c=[a,l].every(N.number)&&(i==="increased"?a<l:a>l);return N.undefined(n)||(c=c&&l===n),N.undefined(s)||(c=c&&a===s),c}function l0(e,t,r){var n=r.key,o=r.type,s=r.value,i=qr(e,n),a=qr(t,n),l=o==="added"?i:a,c=o==="added"?a:i;if(!N.nullOrUndefined(s)){if(N.defined(l)){if(N.array(l)||N.plainObject(l))return y5(l,c,s)}else return Mt(c,s);return!1}return[i,a].every(N.array)?!c.every(Xg(l)):[i,a].every(N.plainObject)?w5(Object.keys(l),Object.keys(c)):![i,a].every(function(u){return N.primitive(u)&&N.defined(u)})&&(o==="added"?!N.defined(i)&&N.defined(a):N.defined(i)&&!N.defined(a))}function c0(e,t,r){var n=r===void 0?{}:r,o=n.key,s=qr(e,o),i=qr(t,o);if(!lC(s,i))throw new TypeError("Inputs have different types");if(!v5(s,i))throw new TypeError("Inputs don't have length");return[s,i].every(N.plainObject)&&(s=Object.keys(s),i=Object.keys(i)),[s,i]}function u0(e){return function(t){var r=t[0],n=t[1];return N.array(e)?Mt(e,n)||e.some(function(o){return Mt(o,n)||N.array(n)&&Xg(n)(o)}):N.plainObject(e)&&e[r]?!!e[r]&&Mt(e[r],n):Mt(e,n)}}function w5(e,t){return t.some(function(r){return!e.includes(r)})}function d0(e){return function(t){return N.array(e)?e.some(function(r){return Mt(r,t)||N.array(t)&&Xg(t)(r)}):Mt(e,t)}}function va(e,t){return N.array(e)?e.some(function(r){return Mt(r,t)}):Mt(e,t)}function Xg(e){return function(t){return e.some(function(r){return Mt(r,t)})}}function lC(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.every(N.array)||e.every(N.number)||e.every(N.plainObject)||e.every(N.string)}function qr(e,t){if(N.plainObject(e)||N.array(e)){if(N.string(t)){var r=t.split(".");return r.reduce(function(n,o){return n&&n[o]},e)}return N.number(t)?e[t]:e}return e}function b5(e,t){if([e,t].some(N.nullOrUndefined))throw new Error("Missing required parameters");if(![e,t].every(function(d){return N.plainObject(d)||N.array(d)}))throw new Error("Expected plain objects or array");var r=function(d,p){try{return l0(e,t,{key:d,type:"added",value:p})}catch{return!1}},n=function(d,p,h){try{var g=qr(e,d),m=qr(t,d),b=N.defined(p),w=N.defined(h);if(b||w){var y=w?va(h,g):!va(p,g),_=va(p,m);return y&&_}return[g,m].every(N.array)||[g,m].every(N.plainObject)?!Mt(g,m):g!==m}catch{return!1}},o=function(d,p,h){if(!N.defined(d))return!1;try{var g=qr(e,d),m=qr(t,d),b=N.defined(h);return va(p,g)&&(b?va(h,m):!b)}catch{return!1}},s=function(d,p){return N.defined(d)?n(d,p):!1},i=function(d,p,h){if(!N.defined(d))return!1;try{return a0(e,t,{key:d,actual:p,previous:h,type:"decreased"})}catch{return!1}},a=function(d){try{var p=c0(e,t,{key:d}),h=p[0],g=p[1];return!!h.length&&!g.length}catch{return!1}},l=function(d){try{var p=c0(e,t,{key:d}),h=p[0],g=p[1];return!h.length&&!!g.length}catch{return!1}},c=function(d,p,h){if(!N.defined(d))return!1;try{return a0(e,t,{key:d,actual:p,previous:h,type:"increased"})}catch{return!1}},u=function(d,p){try{return l0(e,t,{key:d,type:"removed",value:p})}catch{return!1}};return{added:r,changed:n,changedFrom:o,changedTo:s,decreased:i,emptied:a,filled:l,increased:c,removed:u}}function f0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f0(Object(r),!0).forEach(function(n){gt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _5(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,uC(n.key),n)}}function ql(e,t,r){return t&&_5(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gt(e,t,r){return t=uC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Gp(e,t)}function Zu(e){return Zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zu(e)}
vendor: 4,753 bytes, line 306
306function Gp(e,t){return Gp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Gp(e,t)}function x5(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function E5(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,s;for(s=0;s<n.length;s++)o=n[s],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function cC(e,t){if(e==null)return{};var r=E5(e,t),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S5(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nn(e)}function Kl(e){var t=x5();return function(){var n=Zu(e),o;if(t){var s=Zu(this).constructor;o=Reflect.construct(n,arguments,s)}else o=n.apply(this,arguments);return S5(this,o)}}function T5(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uC(e){var t=T5(e,"string");return typeof t=="symbol"?t:String(t)}var C5={flip:{padding:20},preventOverflow:{padding:10}},P5="The typeValidator argument must be a function with the signature function(props, propName, componentName).",k5="The error message is optional, but must be a string if provided.";function O5(e,t,r,n){return typeof e=="boolean"?e:typeof e=="function"?e(t,r,n):e?!!e:!1}function R5(e,t){return Object.hasOwnProperty.call(e,t)}function j5(e,t,r,n){return new Error("Required ".concat(e[t]," `").concat(t,"` was not specified in `").concat(r,"`."))}function A5(e,t){if(typeof e!="function")throw new TypeError(P5);if(t&&typeof t!="string")throw new TypeError(k5)}function h0(e,t,r){return A5(e,r),function(n,o,s){for(var i=arguments.length,a=new Array(i>3?i-3:0),l=3;l<i;l++)a[l-3]=arguments[l];return O5(t,n,o,s)?R5(n,o)?e.apply(void 0,[n,o,s].concat(a)):j5(n,o,s):e.apply(void 0,[n,o,s].concat(a))}}var _e={INIT:"init",IDLE:"idle",OPENING:"opening",OPEN:"open",CLOSING:"closing",ERROR:"error"},ya=oi.createPortal!==void 0;function Br(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function rh(){return"ontouchstart"in window&&/Mobi/.test(navigator.userAgent)}function Nc(e){var t=e.title,r=e.data,n=e.warn,o=n===void 0?!1:n,s=e.debug,i=s===void 0?!1:s,a=o?console.warn||console.error:console.log;i&&t&&r&&(console.groupCollapsed("%creact-floater: ".concat(t),"color: #9b00ff; font-weight: bold; font-size: 12px;"),Array.isArray(r)?r.forEach(function(l){N.plainObject(l)&&l.key?a.apply(console,[l.key,l.value]):a.apply(console,[l])}):a.apply(console,[r]),console.groupEnd())}function N5(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.addEventListener(t,r,n)}function I5(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;e.removeEventListener(t,r,n)}function L5(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o;o=function(i){r(i),I5(e,t,o)},N5(e,t,o,n)}function p0(){}var dC=function(e){Gl(r,e);var t=Kl(r);function r(){return Hl(this,r),t.apply(this,arguments)}return ql(r,[{key:"componentDidMount",value:function(){Br()&&(this.node||this.appendNode(),ya||this.renderPortal())}},{key:"componentDidUpdate",value:function(){Br()&&(ya||this.renderPortal())}},{key:"componentWillUnmount",value:function(){!Br()||!this.node||(ya||oi.unmountComponentAtNode(this.node),this.node&&this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=void 0))}},{key:"appendNode",value:function(){var o=this.props,s=o.id,i=o.zIndex;this.node||(this.node=document.createElement("div"),s&&(this.node.id=s),i&&(this.node.style.zIndex=i),document.body.appendChild(this.node))}},{key:"renderPortal",value:function(){if(!Br())return null;var o=this.props,s=o.children,i=o.setRef;if(this.node||this.appendNode(),ya)return oi.createPortal(s,this.node);var a=oi.unstable_renderSubtreeIntoContainer(this,s.length>1?A.createElement("div",null,s):s[0],this.node);return i(a),null}},{key:"renderReact16",value:function(){var o=this.props,s=o.hasChildren,i=o.placement,a=o.target;return s?this.renderPortal():a||i==="center"?this.renderPortal():null}},{key:"render",value:function(){return ya?this.renderReact16():null}}]),r}(A.Component);
306gt(dC,"propTypes",{children:z.oneOfType([z.element,z.array]),hasChildren:z.bool,id:z.oneOfType([z.string,z.number]),placement:z.string,setRef:z.func.isRequired,target:z.oneOfType([z.object,z.string]),zIndex:z.number});var fC=function(e){Gl(r,e);var t=Kl(r);function r(){return Hl(this,r),t.apply(this,arguments)}return ql(r,[{key:"parentStyle",get:function(){var o=this.props,s=o.placement,i=o.styles,a=i.arrow.length,l={pointerEvents:"none",position:"absolute",width:"100%"};return s.startsWith("top")?(l.bottom=0,l.left=0,l.right=0,l.height=a):s.startsWith("bottom")?(l.left=0,l.right=0,l.top=0,l.height=a):s.startsWith("left")?(l.right=0,l.top=0,l.bottom=0):s.startsWith("right")&&(l.left=0,l.top=0),l}},{key:"render",value:function(){var o=this.props,s=o.placement,i=o.setArrowRef,a=o.styles,l=a.arrow,c=l.color,u=l.display,d=l.length,p=l.margin,h=l.position,g=l.spread,m={display:u,position:h},b,w=g,y=d;return s.startsWith("top")?(b="0,0 ".concat(w/2,",").concat(y," ").concat(w,",0"),m.bottom=0,m.marginLeft=p,m.marginRight=p):s.startsWith("bottom")?(b="".concat(w,",").concat(y," ").concat(w/2,",0 0,").concat(y),m.top=0,m.marginLeft=p,m.marginRight=p):s.startsWith("left")?(y=g,w=d,b="0,0 ".concat(w,",").concat(y/2," 0,").concat(y),m.right=0,m.marginTop=p,m.marginBottom=p):s.startsWith("right")&&(y=g,w=d,b="".concat(w,",").concat(y," ").concat(w,",0 0,").concat(y/2),m.left=0,m.marginTop=p,m.marginBottom=p),A.createElement("div",{className:"__floater__arrow",style:this.parentStyle},A.createElement("span",{ref:i,style:m},A.createElement("svg",{width:w,height:y,version:"1.1",xmlns:"http://www.w3.org/2000/svg"},A.createElement("polygon",{points:b,fill:c}))))}}]),r}(A.Component);gt(fC,"propTypes",{placement:z.string.isRequired,setArrowRef:z.func.isRequired,styles:z.object.isRequired});var D5=["color","height","width"];function hC(e){var t=e.handleClick,r=e.styles,n=r.color,o=r.height,s=r.width,i=cC(r,D5);return A.createElement("button",{"aria-label":"close",onClick:t,style:i,type:"button"},A.createElement("svg",{width:"".concat(s,"px"),height:"".concat(o,"px"),viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"},A.createElement("g",null,A.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:n}))))}hC.propTypes={handleClick:z.func.isRequired,styles:z.object.isRequired};function pC(e){var t=e.content,r=e.footer,n=e.handleClick,o=e.open,s=e.positionWrapper,i=e.showCloseButton,a=e.title,l=e.styles,c={content:A.isValidElement(t)?t:A.createElement("div",{className:"__floater__content",style:l.content},t)};return a&&(c.title=A.isValidElement(a)?a:A.createElement("div",{className:"__floater__title",style:l.title},a)),r&&(c.footer=A.isValidElement(r)?r:A.createElement("div",{className:"__floater__footer",style:l.footer},r)),(i||s)&&!N.boolean(o)&&(c.close=A.createElement(hC,{styles:l.close,handleClick:n})),A.createElement("div",{className:"__floater__container",style:l.container},c.close,c.title,c.content,c.footer)}pC.propTypes={content:z.node.isRequired,footer:z.node,handleClick:z.func.isRequired,open:z.bool,positionWrapper:z.bool.isRequired,showCloseButton:z.bool.isRequired,styles:z.object.isRequired,title:z.node};var mC=function(e){Gl(r,e);var t=Kl(r);function r(){return Hl(this,r),t.apply(this,arguments)}return ql(r,[{key:"style",get:function(){var o=this.props,s=o.disableAnimation,i=o.component,a=o.placement,l=o.hideArrow,c=o.status,u=o.styles,d=u.arrow.length,p=u.floater,h=u.floaterCentered,g=u.floaterClosing,m=u.floaterOpening,b=u.floaterWithAnimation,w=u.floaterWithComponent,y={};return l||(a.startsWith("top")?y.padding="0 0 ".concat(d,"px"):a.startsWith("bottom")?y.padding="".concat(d,"px 0 0"):a.startsWith("left")?y.padding="0 ".concat(d,"px 0 0"):a.startsWith("right")&&(y.padding="0 0 0 ".concat(d,"px"))),[_e.OPENING,_e.OPEN].indexOf(c)!==-1&&(y=Be(Be({},y),m)),c===_e.CLOSING&&(y=Be(Be({},y),g)),c===_e.OPEN&&!s&&(y=Be(Be({},y),b)),a==="center"&&(y=Be(Be({},y),h)),i&&(y=Be(Be({},y),w)),Be(Be({},p),y)}},{key:"render",value:function(){var o=this.props,s=o.component,i=o.handleClick,a=o.hideArrow,l=o.setFloaterRef,c=o.status,u={},d=["__floater"];return s?A.isValidElement(s)?u.content=A.cloneElement(s,{closeFn:i}):u.content=s({closeFn:i}):u.content=A.createElement(pC,this.props),c===_e.OPEN&&d.push("__floater__open"),a||(u.arrow=A.createElement(fC,this.props)),A.createElement("div",{ref:l,className:d.join(" "),style:this.style},A.createElement("div",{className:"__floater__body"},u.content,u.arrow))}}]),r}(A.Component);gt(mC,"propTypes",{component:z.oneOfType([z.func,z.element]),content:z.node,disableAnimation:z.bool.isRequired,footer:z.node,handleClick:z.func.isRequired,hideArrow:z.bool.isRequired,open:z.bool,placement:z.string.isRequired,positionWrapper:z.bool.isRequired,setArrowRef:z.func.isRequired,setFloaterRef:z.func.isRequired,showCloseButton:z.bool,status:z.string.isRequired,styles:z.object.isRequired,title:z.node});var gC=function(e){Gl(r,e);var t=Kl(r);function r(){return Hl(this,r),t.apply(this,arguments)}return ql(r,[{key:"render",value:function(){var o=this.props,s=o.children,i=o.handleClick,a=o.handleMouseEnter,l=o.handleMouseLeave,c=o.setChildRef,u=o.setWrapperRef,d=o.style,p=o.styles,h;if(s)if(A.Children.count(s)===1)if(!A.isValidElement(s))h=A.createElement("span",null,s);else{var g=N.function(s.type)?"innerRef":"ref";h=A.cloneElement(A.Children.only(s),gt({},g,c))}else h=s;return h?A.createElement("span",{ref:u,style:Be(Be({},p),d),onClick:i,onMouseEnter:a,onMouseLeave:l},h):null}}]),r}(A.Component);gt(gC,"propTypes",{children:z.node,handleClick:z.func.isRequired,handleMouseEnter:z.func.isRequired,handleMouseLeave:z.func.isRequired,setChildRef:z.func.isRequired,setWrapperRef:z.func.isRequired,style:z.object,styles:z.object.isRequired});var M5={zIndex:100};function $5(e){var t=Tr(M5,e.options||{});return{wrapper:{cursor:"help",display:"inline-flex",flexDirection:"column",zIndex:t.zIndex},wrapperPosition:{left:-1e3,position:"absolute",top:-1e3,visibility:"hidden"},floater:{display:"inline-block",filter:"drop-shadow(0 0 3px rgba(0, 0, 0, 0.3))",maxWidth:300,opacity:0,position:"relative",transition:"opacity 0.3s",visibility:"hidden",zIndex:t.zIndex}
vendor: 5,012 bytes, line 306
306,floaterOpening:{opacity:1,visibility:"visible"},floaterWithAnimation:{opacity:1,transition:"opacity 0.3s, transform 0.2s",visibility:"visible"},floaterWithComponent:{maxWidth:"100%"},floaterClosing:{opacity:0,visibility:"visible"},floaterCentered:{left:"50%",position:"fixed",top:"50%",transform:"translate(-50%, -50%)"},container:{backgroundColor:"#fff",color:"#666",minHeight:60,minWidth:200,padding:20,position:"relative",zIndex:10},title:{borderBottom:"1px solid #555",color:"#555",fontSize:18,marginBottom:5,paddingBottom:6,paddingRight:18},content:{fontSize:15},close:{backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",fontSize:0,height:15,outline:"none",padding:10,position:"absolute",right:0,top:0,width:15,WebkitAppearance:"none"},footer:{borderTop:"1px solid #ccc",fontSize:13,marginTop:10,paddingTop:5},arrow:{color:"#fff",display:"inline-flex",length:16,margin:8,position:"absolute",spread:32},options:t}}var F5=["arrow","flip","offset"],U5=["position","top","right","bottom","left"],Zg=function(e){Gl(r,e);var t=Kl(r);function r(n){var o;return Hl(this,r),o=t.call(this,n),gt(nn(o),"setArrowRef",function(s){o.arrowRef=s}),gt(nn(o),"setChildRef",function(s){o.childRef=s}),gt(nn(o),"setFloaterRef",function(s){o.floaterRef=s}),gt(nn(o),"setWrapperRef",function(s){o.wrapperRef=s}),gt(nn(o),"handleTransitionEnd",function(){var s=o.state.status,i=o.props.callback;o.wrapperPopper&&o.wrapperPopper.instance.update(),o.setState({status:s===_e.OPENING?_e.OPEN:_e.IDLE},function(){var a=o.state.status;i(a===_e.OPEN?"open":"close",o.props)})}),gt(nn(o),"handleClick",function(){var s=o.props,i=s.event,a=s.open;if(!N.boolean(a)){var l=o.state,c=l.positionWrapper,u=l.status;(o.event==="click"||o.event==="hover"&&c)&&(Nc({title:"click",data:[{event:i,status:u===_e.OPEN?"closing":"opening"}],debug:o.debug}),o.toggle())}}),gt(nn(o),"handleMouseEnter",function(){var s=o.props,i=s.event,a=s.open;if(!(N.boolean(a)||rh())){var l=o.state.status;o.event==="hover"&&l===_e.IDLE&&(Nc({title:"mouseEnter",data:[{key:"originalEvent",value:i}],debug:o.debug}),clearTimeout(o.eventDelayTimeout),o.toggle())}}),gt(nn(o),"handleMouseLeave",function(){var s=o.props,i=s.event,a=s.eventDelay,l=s.open;if(!(N.boolean(l)||rh())){var c=o.state,u=c.status,d=c.positionWrapper;o.event==="hover"&&(Nc({title:"mouseLeave",data:[{key:"originalEvent",value:i}],debug:o.debug}),a?[_e.OPENING,_e.OPEN].indexOf(u)!==-1&&!d&&!o.eventDelayTimeout&&(o.eventDelayTimeout=setTimeout(function(){delete o.eventDelayTimeout,o.toggle()},a*1e3)):o.toggle(_e.IDLE))}}),o.state={currentPlacement:n.placement,needsUpdate:!1,positionWrapper:n.wrapperOptions.position&&!!n.target,status:_e.INIT,statusWrapper:_e.INIT},o._isMounted=!1,o.hasMounted=!1,Br()&&window.addEventListener("load",function(){o.popper&&o.popper.instance.update(),o.wrapperPopper&&o.wrapperPopper.instance.update()}),o}return ql(r,[{key:"componentDidMount",value:function(){if(Br()){var o=this.state.positionWrapper,s=this.props,i=s.children,a=s.open,l=s.target;this._isMounted=!0,Nc({title:"init",data:{hasChildren:!!i,hasTarget:!!l,isControlled:N.boolean(a),positionWrapper:o,target:this.target,floater:this.floaterRef},debug:this.debug}),this.hasMounted||(this.initPopper(),this.hasMounted=!0),!i&&l&&N.boolean(a)}}},{key:"componentDidUpdate",value:function(o,s){if(Br()){var i=this.props,a=i.autoOpen,l=i.open,c=i.target,u=i.wrapperOptions,d=b5(s,this.state),p=d.changedFrom,h=d.changed;if(o.open!==l){var g;N.boolean(l)&&(g=l?_e.OPENING:_e.CLOSING),this.toggle(g)}(o.wrapperOptions.position!==u.position||o.target!==c)&&this.changeWrapperPosition(this.props),h("status",_e.IDLE)&&l?this.toggle(_e.OPEN):p("status",_e.INIT,_e.IDLE)&&a&&this.toggle(_e.OPEN),this.popper&&h("status",_e.OPENING)&&this.popper.instance.update(),this.floaterRef&&(h("status",_e.OPENING)||h("status",_e.CLOSING))&&L5(this.floaterRef,"transitionend",this.handleTransitionEnd),h("needsUpdate",!0)&&this.rebuildPopper()}}},{key:"componentWillUnmount",value:function(){Br()&&(this._isMounted=!1,this.popper&&this.popper.instance.destroy(),this.wrapperPopper&&this.wrapperPopper.instance.destroy())}},{key:"initPopper",value:function(){var o=this,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.target,i=this.state.positionWrapper,a=this.props,l=a.disableFlip,c=a.getPopper,u=a.hideArrow,d=a.offset,p=a.placement,h=a.wrapperOptions,g=p==="top"||p==="bottom"?"flip":["right","bottom-end","top-end","left","top-start","bottom-start"];if(p==="center")this.setState({status:_e.IDLE});else if(s&&this.floaterRef){var m=this.options,b=m.arrow,w=m.flip,y=m.offset,_=cC(m,F5);new _l(s,this.floaterRef,{placement:p,modifiers:Be({arrow:Be({enabled:!u,element:this.arrowRef},b),flip:Be({enabled:!l,behavior:g},w),offset:Be({offset:"0, ".concat(d,"px")},y)},_),onCreate:function(S){var C;if(o.popper=S,!((C=o.floaterRef)!==null&&C!==void 0&&C.isConnected)){o.setState({needsUpdate:!0});return}c(S,"floater"),o._isMounted&&o.setState({currentPlacement:S.placement,status:_e.IDLE}
306),p!==S.placement&&setTimeout(function(){S.instance.update()},1)},onUpdate:function(S){o.popper=S;var C=o.state.currentPlacement;o._isMounted&&S.placement!==C&&o.setState({currentPlacement:S.placement})}})}if(i){var x=N.undefined(h.offset)?0:h.offset;new _l(this.target,this.wrapperRef,{placement:h.placement||p,modifiers:{arrow:{enabled:!1},offset:{offset:"0, ".concat(x,"px")},flip:{enabled:!1}},onCreate:function(S){o.wrapperPopper=S,o._isMounted&&o.setState({statusWrapper:_e.IDLE}),c(S,"wrapper"),p!==S.placement&&setTimeout(function(){S.instance.update()},1)}})}}},{key:"rebuildPopper",value:function(){var o=this;this.floaterRefInterval=setInterval(function(){var s;(s=o.floaterRef)!==null&&s!==void 0&&s.isConnected&&(clearInterval(o.floaterRefInterval),o.setState({needsUpdate:!1}),o.initPopper())},50)}},{key:"changeWrapperPosition",value:function(o){var s=o.target,i=o.wrapperOptions;this.setState({positionWrapper:i.position&&!!s})}},{key:"toggle",value:function(o){var s=this.state.status,i=s===_e.OPEN?_e.CLOSING:_e.OPENING;N.undefined(o)||(i=o),this.setState({status:i})}},{key:"debug",get:function(){var o=this.props.debug;return o||Br()&&"ReactFloaterDebug"in window&&!!window.ReactFloaterDebug}},{key:"event",get:function(){var o=this.props,s=o.disableHoverToClick,i=o.event;return i==="hover"&&rh()&&!s?"click":i}},{key:"options",get:function(){var o=this.props.options;return Tr(C5,o||{})}},{key:"styles",get:function(){var o=this,s=this.state,i=s.status,a=s.positionWrapper,l=s.statusWrapper,c=this.props.styles,u=Tr($5(c),c);if(a){var d;[_e.IDLE].indexOf(i)===-1||[_e.IDLE].indexOf(l)===-1?d=u.wrapperPosition:d=this.wrapperPopper.styles,u.wrapper=Be(Be({},u.wrapper),d)}if(this.target){var p=window.getComputedStyle(this.target);this.wrapperStyles?u.wrapper=Be(Be({},u.wrapper),this.wrapperStyles):["relative","static"].indexOf(p.position)===-1&&(this.wrapperStyles={},a||(U5.forEach(function(h){o.wrapperStyles[h]=p[h]}),u.wrapper=Be(Be({},u.wrapper),this.wrapperStyles),this.target.style.position="relative",this.target.style.top="auto",this.target.style.right="auto",this.target.style.bottom="auto",this.target.style.left="auto"))}return u}},{key:"target",get:function(){if(!Br())return null;var o=this.props.target;return o?N.domElement(o)?o:document.querySelector(o):this.childRef||this.wrapperRef}},{key:"render",value:function(){var o=this.state,s=o.currentPlacement,i=o.positionWrapper,a=o.status,l=this.props,c=l.children,u=l.component,d=l.content,p=l.disableAnimation,h=l.footer,g=l.hideArrow,m=l.id,b=l.open,w=l.showCloseButton,y=l.style,_=l.target,x=l.title,E=A.createElement(gC,{handleClick:this.handleClick,handleMouseEnter:this.handleMouseEnter,handleMouseLeave:this.handleMouseLeave,setChildRef:this.setChildRef,setWrapperRef:this.setWrapperRef,style:y,styles:this.styles.wrapper},c),S={};return i?S.wrapperInPortal=E:S.wrapperAsChildren=E,A.createElement("span",null,A.createElement(dC,{hasChildren:!!c,id:m,placement:s,setRef:this.setFloaterRef,target:_,zIndex:this.styles.options.zIndex},A.createElement(mC,{component:u,content:d,disableAnimation:p,footer:h,handleClick:this.handleClick,hideArrow:g||s==="center",open:b,placement:s,positionWrapper:i,setArrowRef:this.setArrowRef,setFloaterRef:this.setFloaterRef,showCloseButton:w,status:a,styles:this.styles,title:x}),S.wrapperInPortal),S.wrapperAsChildren)}}]),r}(A.Component);gt(Zg,"propTypes",{autoOpen:z.bool,callback:z.func,children:z.node,component:h0(z.oneOfType([z.func,z.element]),function(e){return!e.content}),content:h0(z.node,function(e){return!e.component}),debug:z.bool,disableAnimation:z.bool,disableFlip:z.bool,disableHoverToClick:z.bool,event:z.oneOf(["hover","click"]),eventDelay:z.number,footer:z.node,getPopper:z.func,hideArrow:z.bool,id:z.oneOfType([z.string,z.number]),offset:z.number,open:z.bool,options:z.object,placement:z.oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto","center"]),showCloseButton:z.bool,style:z.object,styles:z.object,target:z.oneOfType([z.object,z.string]),title:z.node,wrapperOptions:z.shape({offset:z.number,placement:z.oneOf(["top","top-start","to
306p-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end","auto"]),position:z.bool})});gt(Zg,"defaultProps",{autoOpen:!1,callback:p0,debug:!1,disableAnimation:!1,disableFlip:!1,disableHoverToClick:!1,event:"click",eventDelay:.4,getPopper:p0,hideArrow:!1,offset:15,placement:"bottom",showCloseButton:!1,styles:{},target:null,wrapperOptions:{position:!1}});var B5=Object.defineProperty,z5=(e,t,r)=>t in e?B5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Z=(e,t,r)=>z5(e,typeof t!="symbol"?t+"":t,r),Pe={INIT:"init",START:"start",STOP:"stop",RESET:"reset",PREV:"prev",NEXT:"next",GO:"go",CLOSE:"close",SKIP:"skip",UPDATE:"update"},Wt={TOUR_START:"tour:start",STEP_BEFORE:"step:before",BEACON:"beacon",TOOLTIP:"tooltip",STEP_AFTER:"step:after",TOUR_END:"tour:end",TOUR_STATUS:"tour:status",TARGET_NOT_FOUND:"error:target_not_found",ERROR:"error"},ue={INIT:"init",READY:"ready",BEACON:"beacon",TOOLTIP:"tooltip",COMPLETE:"complete",ERROR:"error"},me={IDLE:"idle",READY:"ready",WAITING:"waiting",RUNNING:"running",PAUSED:"paused",SKIPPED:"skipped",FINISHED:"finished",ERROR:"error"};function Vn(){var e;return!!(typeof window<"u"&&((e=window.document)!=null&&e.createElement))}function vC(e){return e?e.getBoundingClientRect():null}function V5(e=!1){const{body:t,documentElement:r}=document;if(!t||!r)return 0;if(e){const n=[t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight].sort((s,i)=>s-i),o=Math.floor(n.length/2);return n.length%2===0?(n[o-1]+n[o])/2:n[o]}return Math.max(t.scrollHeight,t.offsetHeight,r.clientHeight,r.scrollHeight,r.offsetHeight)}function hn(e){if(typeof e=="string")try{return document.querySelector(e)}catch{return null}return e}function W5(e){return!e||e.nodeType!==1?null:getComputedStyle(e)}function xl(e,t,r){if(!e)return qo();const n=BT(e);if(n){if(n.isSameNode(qo()))return r?document:qo();if(!(n.scrollHeight>n.offsetHeight)&&!t)return n.style.overflow="initial",qo()}return n}function Qd(e,t){if(!e)return!1;const r=xl(e,t);return r?!r.isSameNode(qo()):!1}function H5(e){return e.offsetParent!==document.body}function Fi(e,t="fixed"){if(!e||!(e instanceof HTMLElement))return!1;const{nodeName:r}=e,n=W5(e);return r==="BODY"||r==="HTML"?!1:n&&n.position===t?!0:e.parentNode?Fi(e.parentNode,t):!1}function q5(e){var t;if(!e)return!1;let r=e;for(;r&&r!==document.body;){if(r instanceof HTMLElement){const{display:n,visibility:o}=getComputedStyle(r);if(n==="none"||o==="hidden")return!1}r=(t=r.parentElement)!=null?t:null}return!0}function G5(e,t,r){var n,o,s;const i=vC(e),a=xl(e,r),l=Qd(e,r),c=Fi(e);let u=0,d=(n=i==null?void 0:i.top)!=null?n:0;if(l&&c){const p=(o=e==null?void 0:e.offsetTop)!=null?o:0,h=(s=a==null?void 0:a.scrollTop)!=null?s:0;d=p-h}else a instanceof HTMLElement&&(u=a.scrollTop,!l&&!Fi(e)&&(d+=u),a.isSameNode(qo())||(d+=qo().scrollTop));return Math.floor(d-t)}function K5(e,t,r){var n;if(!e)return 0;const{offsetTop:o=0,scrollTop:s=0}=(n=BT(e))!=null?n:{};let i=e.getBoundingClientRect().top+s;o&&(Qd(e,r)||H5(e))&&(i-=o);const a=Math.floor(i-t);return a<0?0:a}function qo(){var e;return(e=document.scrollingElement)!=null?e:document.documentElement}function Q5(e,t){const{duration:r,element:n}=t;return new Promise((o,s)=>{const{scrollTop:i}=n,a=e>i?e-i:i-e;XU.top(n,e,{duration:a<100?50:r},l=>l&&l.message!=="Element already at target scroll position"?s(l):o())})}var wa=kr.createPortal!==void 0;function yC(e=navigator.userAgent){let t=e;return typeof window>"u"?t="node":document.documentMode?t="ie":/Edge/.test(e)?t="edge":window.opera||e.includes(" OPR/")?t="opera":typeof window.InstallTrigger<"u"?t="firefox":window.chrome?t="chrome":/(Version\/([\d._]+).*Safari|CriOS|FxiOS| Mobile\/)/.test(e)&&(t="safari"),t}function nu(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function zr(e,t={}){const{defaultValue:r,step:n,steps:o}=t;let s=Xw(e);if(s)(s.includes("{step}")||s.includes("{steps}"))&&n&&o&&(s=s.replace("{step}",n.toString()).replace("{steps}",o.toString()));else if(v.isValidElement(e)&&!Object.values(e.props).length&&nu(e.type)==="function"){const i=e.type({});s=zr(i,t)}else s=Xw(r);return s}function Y5(e,t){return!X.plainObject(e)||!X.array(t)?!1:Object.keys(e).every(r=>t.includes(r))}function J5(e){const t=/^#?([\da-f])([\da-f])([\da-f])$/i,r=e.replace(t,(o,s,i,a)=>s+s+i+i+a+a),n=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(r);return n?[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]:[]}function m0(e){return e.disableBeacon||e.placement==="center"}function g0(){return!["chrome","safari","firefox","opera"].includes(yC())}function ps({data:e,debug:t=!1,title:r,warn:n=!1}){const o=n?console.warn||console.error:console.log;t&&(r&&e?(console.groupCollapsed(`%creact-joyride: ${r}`,"color: #ff0044; font-weight: bold; font-size: 12px;"),Array.isArray(e)?e.forEach(s=>{X.plainObject(s)&&s.key?o.apply(console,[s.key,s.value]):o.apply(console,[s])}):o.apply(console,[e]),console.groupEnd()):console.error("Missing title or data props"))}function X5(e){return Object.keys(e)}function wC(e,...t){if(!X.plainObject(e))throw new TypeError("Expected an object");const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&(t.includes(n)||(r[n]=e[n]));return r}function Z5(e,...t){if(!X.plainObject(e))throw new TypeError("Expected an object");
306if(!t.length)return e;const r={};for(const n in e)({}).hasOwnProperty.call(e,n)&&t.includes(n)&&(r[n]=e[n]);return r}function Kp(e,t,r){const n=s=>s.replace("{step}",String(t)).replace("{steps}",String(r));if(nu(e)==="string")return n(e);if(!v.isValidElement(e))return e;const{children:o}=e.props;if(nu(o)==="string"&&o.includes("{step}"))return v.cloneElement(e,{children:n(o)});if(Array.isArray(o))return v.cloneElement(e,{children:o.map(s=>typeof s=="string"?n(s):Kp(s,t,r))});if(nu(e.type)==="function"&&!Object.values(e.props).length){const s=e.type({});return Kp(s,t,r)}return e}function e4(e){const{isFirstStep:t,lifecycle:r,previousLifecycle:n,scrollToFirstStep:o,step:s,target:i}=e;return!s.disableScrolling&&(!t||o||r===ue.TOOLTIP)&&s.placement!=="center"&&(!s.isFixed||!Fi(i))&&n!==r&&[ue.BEACON,ue.TOOLTIP].includes(r)}var t4={options:{preventOverflow:{boundariesElement:"scrollParent"}},wrapperOptions:{offset:-18,position:!0}},bC={back:"Back",close:"Close",last:"Last",next:"Next",nextLabelWithProgress:"Next (Step {step} of {steps})",open:"Open the dialog",skip:"Skip"},r4={event:"click",placement:"bottom",offset:10,disableBeacon:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrollParentFix:!1,disableScrolling:!1,hideBackButton:!1,hideCloseButton:!1,hideFooter:!1,isFixed:!1,locale:bC,showProgress:!1,showSkipButton:!1,spotlightClicks:!1,spotlightPadding:10},n4={continuous:!1,debug:!1,disableCloseOnEsc:!1,disableOverlay:!1,disableOverlayClose:!1,disableScrolling:!1,disableScrollParentFix:!1,getHelpers:void 0,hideBackButton:!1,run:!0,scrollOffset:20,scrollDuration:300,scrollToFirstStep:!1,showSkipButton:!1,showProgress:!1,spotlightClicks:!1,spotlightPadding:10,steps:[]},o4={arrowColor:"#fff",backgroundColor:"#fff",beaconSize:36,overlayColor:"rgba(0, 0, 0, 0.5)",primaryColor:"#f04",spotlightShadow:"0 0 15px rgba(0, 0, 0, 0.5)",textColor:"#333",width:380,zIndex:100},ba={backgroundColor:"transparent",border:0,borderRadius:0,color:"#555",cursor:"pointer",fontSize:16,lineHeight:1,padding:8,WebkitAppearance:"none"},v0={borderRadius:4,position:"absolute"};function s4(e,t){var r,n,o,s,i;const{floaterProps:a,styles:l}=e,c=Tr((r=t.floaterProps)!=null?r:{},a??{}),u=Tr(l??{},(n=t.styles)!=null?n:{}),d=Tr(o4,u.options||{}),p=t.placement==="center"||t.disableBeacon;let{width:h}=d;window.innerWidth>480&&(h=380),"width"in d&&(h=typeof d.width=="number"&&window.innerWidth<d.width?window.innerWidth-30:d.width);const g={bottom:0,left:0,overflow:"hidden",position:"absolute",right:0,top:0,zIndex:d.zIndex},m={beacon:{...ba,display:p?"none":"inline-block",height:d.beaconSize,position:"relative",width:d.beaconSize,zIndex:d.zIndex},beaconInner:{animation:"joyride-beacon-inner 1.2s infinite ease-in-out",backgroundColor:d.primaryColor,borderRadius:"50%",display:"block",height:"50%",left:"50%",opacity:.7,position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:"50%"},beaconOuter:{animation:"joyride-beacon-outer 1.2s infinite ease-in-out",backgroundColor:`rgba(${J5(d.primaryColor).join(",")}, 0.2)`,border:`2px solid ${d.primaryColor}`,borderRadius:"50%",boxSizing:"border-box",display:"block",height:"100%",left:0,opacity:.9,position:"absolute",top:0,transformOrigin:"center",width:"100%"},tooltip:{backgroundColor:d.backgroundColor,borderRadius:5,boxSizing:"border-box",color:d.textColor,fontSize:16,maxWidth:"100%",padding:15,position:"relative",width:h},tooltipContainer:{lineHeight:1.4,textAlign:"center"},tooltipTitle:{fontSize:18,margin:0},tooltipContent:{padding:"20px 10px"},tooltipFooter:{alignItems:"center",display:"flex",justifyContent:"flex-end",marginTop:15},tooltipFooterSpacer:{flex:1},buttonNext:{...ba,backgroundColor:d.primaryColor,borderRadius:4,color:"#fff"},buttonBack:{...ba,color:d.primaryColor,marginLeft:"auto",marginRight:5},buttonClose:{...ba,color:d.textColor,height:14,padding:15,position:"absolute",right:0,top:0,width:14},buttonSkip:{...ba,color:d.textColor,fontSize:14},overlay:{...g,backgroundColor:d.overlayColor,mixBlendMode:"hard-light"},overlayLegacy:{...g},overlayLegacyCenter:{...g,backgroundColor:d.overlayColor},spotlight:{...v0,backgroundColor:"gray"}
306,spotlightLegacy:{...v0,boxShadow:`0 0 0 9999px ${d.overlayColor}, ${d.spotlightShadow}`},floaterStyles:{arrow:{color:(i=(s=(o=c==null?void 0:c.styles)==null?void 0:o.arrow)==null?void 0:s.color)!=null?i:d.arrowColor},options:{zIndex:d.zIndex+100}},options:d};return Tr(m,u)}function i4(e){return Z5(e,"beaconComponent","disableCloseOnEsc","disableOverlay","disableOverlayClose","disableScrolling","disableScrollParentFix","floaterProps","hideBackButton","hideCloseButton","locale","showProgress","showSkipButton","spotlightClicks","spotlightPadding","styles","tooltipComponent")}function Ms(e,t){var r,n,o,s,i,a;const l=t??{},c=Tr.all([r4,i4(e),l],{isMergeableObject:X.plainObject}),u=s4(e,c),d=Qd(hn(c.target),c.disableScrollParentFix),p=Tr.all([t4,(r=e.floaterProps)!=null?r:{},(n=c.floaterProps)!=null?n:{}]);return p.offset=c.offset,p.styles=Tr((o=p.styles)!=null?o:{},u.floaterStyles),p.offset+=(i=(s=e.spotlightPadding)!=null?s:c.spotlightPadding)!=null?i:0,c.placementBeacon&&p.wrapperOptions&&(p.wrapperOptions.placement=c.placementBeacon),d&&p.options.preventOverflow&&(p.options.preventOverflow.boundariesElement="window"),{...c,locale:Tr.all([bC,(a=e.locale)!=null?a:{},c.locale||{}]),floaterProps:p,styles:wC(u,"floaterStyles")}}function _C(e,t=!1){return X.plainObject(e)?e.target?!0:(ps({title:"validateStep",data:"target is missing from the step",warn:!0,debug:t}),!1):(ps({title:"validateStep",data:"step must be an object",warn:!0,debug:t}),!1)}function y0(e,t=!1){return X.array(e)?e.every(r=>_C(r,t)):(ps({title:"validateSteps",data:"steps must be an array",warn:!0,debug:t}),!1)}var xC={action:"init",controlled:!1,index:0,lifecycle:ue.INIT,origin:null,size:0,status:me.IDLE},w0=X5(wC(xC,"controlled","size")),a4=class{constructor(e){Z(this,"beaconPopper"),Z(this,"tooltipPopper"),Z(this,"data",new Map),Z(this,"listener"),Z(this,"store",new Map),Z(this,"addListener",o=>{this.listener=o}),Z(this,"setSteps",o=>{const{size:s,status:i}=this.getState(),a={size:o.length,status:i};this.data.set("steps",o),i===me.WAITING&&!s&&o.length&&(a.status=me.RUNNING),this.setState(a)}),Z(this,"getPopper",o=>o==="beacon"?this.beaconPopper:this.tooltipPopper),Z(this,"setPopper",(o,s)=>{o==="beacon"?this.beaconPopper=s:this.tooltipPopper=s}),Z(this,"cleanupPoppers",()=>{this.beaconPopper=null,this.tooltipPopper=null}),Z(this,"close",(o=null)=>{const{index:s,status:i}=this.getState();i===me.RUNNING&&this.setState({...this.getNextState({action:Pe.CLOSE,index:s+1,origin:o})})}),Z(this,"go",o=>{const{controlled:s,status:i}=this.getState();if(s||i!==me.RUNNING)return;const a=this.getSteps()[o];this.setState({...this.getNextState({action:Pe.GO,index:o}),status:a?i:me.FINISHED})}),Z(this,"info",()=>this.getState()),Z(this,"next",()=>{const{index:o,status:s}=this.getState();s===me.RUNNING&&this.setState(this.getNextState({action:Pe.NEXT,index:o+1}))}),Z(this,"open",()=>{const{status:o}=this.getState();o===me.RUNNING&&this.setState({...this.getNextState({action:Pe.UPDATE,lifecycle:ue.TOOLTIP})})}),Z(this,"prev",()=>{const{index:o,status:s}=this.getState();s===me.RUNNING&&this.setState({...this.getNextState({action:Pe.PREV,index:o-1})})}),Z(this,"reset",(o=!1)=>{const{controlled:s}=this.getState();s||this.setState({...this.getNextState({action:Pe.RESET,index:0}),status:o?me.RUNNING:me.READY})}),Z(this,"skip",()=>{const{status:o}=this.getState();o===me.RUNNING&&this.setState({action:Pe.SKIP,lifecycle:ue.INIT,status:me.SKIPPED})}),Z(this,"start",o=>{const{index:s,size:i}=this.getState();this.setState({...this.getNextState({action:Pe.START,index:X.number(o)?o:s},!0),status:i?me.RUNNING:me.WAITING})}),Z(this,"stop",(o=!1)=>{const{index:s,status:i}=this.getState();[me.FINISHED,me.SKIPPED].includes(i)||this.setState({...this.getNextState({action:Pe.STOP,index:s+(o?1:0)}),status:me.PAUSED})}),Z(this,"update",o=>{var s,i;if(!Y5(o,w0))throw new Error(`State is not valid. Valid keys: ${w0.join(", ")}`);this.setState({...this.getNextState({...this.getState(),...o,action:(s=o.action)!=null?s:Pe.UPDATE,origin:(i=o.origin)!=null?i:null},!0)})});const{continuous:t=!1,stepIndex:r,steps:n=[]}=e??{};this.setState({action:Pe.INIT,controlled:X.number(r),continuous:t,index:X.number(r)?r:0,lifecycle:ue.INIT,origin:null,status:n.length?me.READY:me.IDLE},!0),this.beaconPopper=null,this.tooltipPopper=null,this.listener=null,this.setSteps(n)}getState(){return this.store.size?{action:this.store.get("action")||"",controlled:this.store.get("controlled")||!1,index:parseInt(this.store.get("index"),10),lifecycle:this.store.get("lifecycle")||"",origin:this.store.get("origin")||null,size:this.store.get("size")||0,status:this.store.get("status")||""}:{...xC}}getNextState(e,t=!1){var r,n,o,s,i;const{action:a,controlled:l,index:c,size:u,status:d}=this.getState(),p=X.number(e.index)?e.index:c,h=l&&!t?c:Math.min(Math.max(p,0),u);return{action:(r=e.action)!=null?r:a,controlled:l,index:h,lifecycle:(n=e.lifecycle)!=null?n:ue.INIT,origin:(o=e.origin)!=null?o:null,size:(s=e.size)!=null?s:u,status:h===u?me.FINISHED:(i=e.status)!=null?i:d}}getSteps(){const e=this.data.get("steps");return Array.isArray(e)?e:[]}hasUpdatedState(e){const t=JSON.stringify(e),r=JSON.stringify(this.getState());return t!==r}setState(e,t=!1){const r=this.getState(),{action:n,index:o,lifecycle:s,origin:i=null,size:a,status:l}={...r,...e};this.store.set("action",n),this.store.set("index",o),this.store.set("lifecycle",s),this.store.set("origin",i),this.store.set("size",a),this.store.set("status",l),t&&(this.store.set("controlled",e.controlled),this.store.set("continuous",e.continuous)),this.listener&&this.hasUpdatedState(r)&&this.listener(this.getState())}getHelpers(){return{close:this.close,go:this.go,info:this.info,next:this.next,open:this.open,prev:this.prev,reset:this.reset,skip:this.skip}}};function l4(e){return new a4(e)}function c4({styles:e}){return v.createElement("div",{key:"JoyrideSpotlight",className:"react-joyride__spotlight","data-test-id":"spotlight",style:e})}var u4=c4,d4=class extends v.Component{constructor(){super(...arguments),Z(this,"isActive",!1),Z(this,"resizeTimeout"),Z(this,"scrollTimeout"),Z(this,"scrollParent"),Z(this,"state",{isScrolling:!1,mouseOverSpotlight:!1,showSpotlight:!0}),Z(this,"hideSpotlight",()=>{const{continuous:e,disableOverlay:t,lifecycle:r}=this.props,n=[ue.INIT,ue.BEACON,ue.COMPLETE,ue.ERROR];return t||(e?n.includes(r):r!==ue.TOOLTIP)}),Z(this,"handleMouseMove",e=>
306{const{mouseOverSpotlight:t}=this.state,{height:r,left:n,position:o,top:s,width:i}=this.spotlightStyles,a=o==="fixed"?e.clientY:e.pageY,l=o==="fixed"?e.clientX:e.pageX,c=a>=s&&a<=s+r,d=l>=n&&l<=n+i&&c;d!==t&&this.updateState({mouseOverSpotlight:d})}),Z(this,"handleScroll",()=>{const{target:e}=this.props,t=hn(e);if(this.scrollParent!==document){const{isScrolling:r}=this.state;r||this.updateState({isScrolling:!0,showSpotlight:!1}),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout(()=>{this.updateState({isScrolling:!1,showSpotlight:!0})},50)}else Fi(t,"sticky")&&this.updateState({})}),Z(this,"handleResize",()=>{clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(()=>{this.isActive&&this.forceUpdate()},100)})}componentDidMount(){const{debug:e,disableScrolling:t,disableScrollParentFix:r=!1,target:n}=this.props,o=hn(n);this.scrollParent=xl(o??document.body,r,!0),this.isActive=!0,window.addEventListener("resize",this.handleResize)}componentDidUpdate(e){var t;const{disableScrollParentFix:r,lifecycle:n,spotlightClicks:o,target:s}=this.props,{changed:i}=Yu(e,this.props);if(i("target")||i("disableScrollParentFix")){const a=hn(s);this.scrollParent=xl(a??document.body,r,!0)}i("lifecycle",ue.TOOLTIP)&&((t=this.scrollParent)==null||t.addEventListener("scroll",this.handleScroll,{passive:!0}),setTimeout(()=>{const{isScrolling:a}=this.state;a||this.updateState({showSpotlight:!0})},100)),(i("spotlightClicks")||i("disableOverlay")||i("lifecycle"))&&(o&&n===ue.TOOLTIP?window.addEventListener("mousemove",this.handleMouseMove,!1):n!==ue.TOOLTIP&&window.removeEventListener("mousemove",this.handleMouseMove))}componentWillUnmount(){var e;this.isActive=!1,window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimeout),clearTimeout(this.scrollTimeout),(e=this.scrollParent)==null||e.removeEventListener("scroll",this.handleScroll)}get overlayStyles(){const{mouseOverSpotlight:e}=this.state,{disableOverlayClose:t,placement:r,styles:n}=this.props;let o=n.overlay;return g0()&&(o=r==="center"?n.overlayLegacyCenter:n.overlayLegacy),{cursor:t?"default":"pointer",height:V5(),pointerEvents:e?"none":"auto",...o}}get spotlightStyles(){var e,t,r;const{showSpotlight:n}=this.state,{disableScrollParentFix:o=!1,spotlightClicks:s,spotlightPadding:i=0,styles:a,target:l}=this.props,c=hn(l),u=vC(c),d=Fi(c),p=G5(c,i,o);return{...g0()?a.spotlightLegacy:a.spotlight,height:Math.round(((e=u==null?void 0:u.height)!=null?e:0)+i*2),left:Math.round(((t=u==null?void 0:u.left)!=null?t:0)-i),opacity:n?1:0,pointerEvents:s?"none":"auto",position:d?"fixed":"absolute",top:p,transition:"opacity 0.2s",width:Math.round(((r=u==null?void 0:u.width)!=null?r:0)+i*2)}}updateState(e){this.isActive&&this.setState(t=>({...t,...e}))}render(){const{showSpotlight:e}=this.state,{onClickOverlay:t,placement:r}=this.props,{hideSpotlight:n,overlayStyles:o,spotlightStyles:s}=this;if(n())return null;let i=r!=="center"&&e&&v.createElement(u4,{styles:s});if(yC()==="safari"){const{mixBlendMode:a,zIndex:l,...c}=o;i=v.createElement("div",{style:{...c}},i),delete o.backgroundColor}return v.createElement("div",{className:"react-joyride__overlay","data-test-id":"overlay",onClick:t,role:"presentation",style:o},i)}},f4=class extends v.Component{constructor(){super(...arguments),Z(this,"node",null)}componentDidMount(){const{id:e}=this.props;Vn()&&(this.node=document.createElement("div"),this.node.id=e,document.body.appendChild(this.node),wa||this.renderReact15())}componentDidUpdate(){Vn()&&(wa||this.renderReact15())}componentWillUnmount(){!Vn()||!this.node||(wa||kr.unmountComponentAtNode(this.node),this.node.parentNode===document.body&&(document.body.removeChild(this.node),this.node=null))}renderReact15(){if(!Vn())return;const{children:e}=this.props;this.node&&kr.unstable_renderSubtreeIntoContainer(this,e,this.node)}renderReact16(){if(!Vn()||!wa)return null;const{children:e}=this.props;return this.node?kr.createPortal(e,this.node):null}render(){return wa?this.renderReact16():null}},h4=class{constructor(e,t){if(Z(this,"element"),Z(this,"options"),Z(this,"canBeTabbed",r=>{const{tabIndex:n}=r;return n===null||n<0?!1:this.canHaveFocus(r)}),Z(this,"canHaveFocus",r=>{const n=/input|select|textarea|button|object/,o=r.nodeName.toLowerCase();return(n.test(o)&&!r.getAttribute("disabled")||o==="a"&&!!r.getAttribute("href"))&&this.isVisible(r)}),Z(this,"findValidTabElements",()=>[].slice.call(this.element.querySelectorAll("*"),0).filter(this.canBeTabbed)),Z(this,"handleKeyDown",r=>{const{code:n="Tab"}=this.options;r.code===n&&this.interceptTab(r)}),Z(this,"interceptTab",r=>{r.preventDefault();const n=this.findValidTabElements(),{shiftKey:o}=r;if(!n.length)return;let s=document.activeElement?n.indexOf(document.activeElement):0;s===-1||!o&&s+1===n.length?s=0:o&&s===0?s=n.length-1:s+=o?-1:1,n[s].focus()}),Z(this,"isHidden",r=>{const n=r.offsetWidth<=0&&r.offsetHeight<=0,o=window.getComputedStyle(r);return n&&!r.innerHTML?!0:n&&o.getPropertyValue("overflow")!=="visible"||o.getPropertyValue("display")==="none"}),Z(this,"isVisible",r=>{let n=r;for(;n;)if(n instanceof HTMLElement){if(n===document.body)break;if(this.isHidden(n))return!1;n=n.parentNode}return!0}),Z(this,"removeScope",()=>{window.removeEventListener("keydown",this.handleKeyDown)}),Z(this,"checkFocus",r=>{document.activeElement!==r&&(r.focus(),window.requestAnimationFrame(()=>this.checkFocus(r)))}),Z(this,"setFocus",()=>{const{selector:r}=this.options;if(!r)return;const n=this.element.querySelector(r);n&&window.requestAnimationFrame(()=>this.checkFocus(n))}),!(e instanceof HTMLElement))throw new TypeError("Invalid parameter: element must be an HTMLElement");this.element=e,this.options=t,window.addEventListener("keydown",this.handleKeyDown,!1),this.setFocus()}},p4=class extends v.Component{constructor(e){if(super(e),Z(this,"beacon",null),Z(this,"setBeaconRef",o=>{this.beacon=o}),e.beaconComponent)return;const t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.id="joyride-beacon-animation",e.nonce&&r.setAttribute("nonce",e.nonce),r.appendChild(document.createTextNode(`
307        @keyframes joyride-beacon-inner {
308          20% {
309            opacity: 0.9;
310          }
311        
312          90% {
313            opacity: 0.7;
314          }
315        }
316        
317        @keyframes joyride-beacon-outer {
318          0% {
319            transform: scale(1);
320          }
321        
322          45% {
323            opacity: 0.7;
324            transform: scale(0.75);
325          }
326        
327          100% {
328            opacity: 0.9;
329            transform: scale(1);
330          }
331        }
332      `)),t.appendChild(r)}componentDidMount(){const{shouldFocus:e}=this.props;setTimeout(()=>{X.domElement(this.beacon)&&e&&this.beacon.focus()},0)}componentWillUnmount(){const e=document.getElementById("joyride-beacon-animation");e!=null&&e.parentNode&&e.parentNode.removeChild(e)}render(){const{beaconComponent:e,continuous:t,index:r,isLastStep:n,locale:o,onClickOrHover:s,size:i,step:a,styles:l}=this.props,c=zr(o.open),u={"aria-label":c,onClick:s,onMouseEnter:s,ref:this.setBeaconRef,title:c};let d;if(e){const p=e;d=v.createElement(p,{continuous:t,index:r,isLastStep:n,size:i,step:a,...u})}else d=v.createElement("button",{key:"JoyrideBeacon",className:"react-joyride__beacon","data-test-id":"button-beacon",style:l.beacon,type:"button",...u},v.createElement("span",{style:l.beaconInner}),v.createElement("span",{style:l.beaconOuter}));return d}};function m4({styles:e,...t}){const{color:r,height:n,width:o,...s}=e;return A.createElement("button",{style:s,type:"button",...t},A.createElement("svg",{height:typeof n=="number"?`${n}px`:n,preserveAspectRatio:"xMidYMid",version:"1.1",viewBox:"0 0 18 18",width:typeof o=="number"?`${o}px`:o,xmlns:"http://www.w3.org/2000/svg"},A.createElement("g",null,A.createElement("path",{d:"M8.13911129,9.00268191 L0.171521827,17.0258467 C-0.0498027049,17.248715 -0.0498027049,17.6098394 0.171521827,17.8327545 C0.28204354,17.9443526 0.427188206,17.9998706 0.572051765,17.9998706 C0.71714958,17.9998706 0.862013139,17.9443526 0.972581703,17.8327545 L9.0000937,9.74924618 L17.0276057,17.8327545 C17.1384085,17.9443526 17.2832721,17.9998706 17.4281356,17.9998706 C17.5729992,17.9998706 17.718097,17.9443526 17.8286656,17.8327545 C18.0499901,17.6098862 18.0499901,17.2487618 17.8286656,17.0258467 L9.86135722,9.00268191 L17.8340066,0.973848225 C18.0553311,0.750979934 18.0553311,0.389855532 17.8340066,0.16694039 C17.6126821,-0.0556467968 17.254037,-0.0556467968 17.0329467,0.16694039 L9.00042166,8.25611765 L0.967006424,0.167268345 C0.745681892,-0.0553188426 0.387317931,-0.0553188426 0.165993399,0.167268345 C-0.0553311331,0.390136635 -0.0553311331,0.751261038 0.165993399,0.974176179 L8.13920499,9.00268191 L8.13911129,9.00268191 Z",fill:r}))))}var g4=m4;function v4(e){const{backProps:t,closeProps:r,index:n,isLastStep:o,primaryProps:s,skipProps:i,step:a,tooltipProps:l}=e,{content:c,hideBackButton:u,hideCloseButton:d,hideFooter:p,showSkipButton:h,styles:g,title:m}=a,b={};return b.primary=v.createElement("button",{"data-test-id":"button-primary",style:g.buttonNext,type:"button",...s}
332),h&&!o&&(b.skip=v.createElement("button",{"aria-live":"off","data-test-id":"button-skip",style:g.buttonSkip,type:"button",...i})),!u&&n>0&&(b.back=v.createElement("button",{"data-test-id":"button-back",style:g.buttonBack,type:"button",...t})),b.close=!d&&v.createElement(g4,{"data-test-id":"button-close",styles:g.buttonClose,...r}),v.createElement("div",{key:"JoyrideTooltip","aria-label":zr(m??c),className:"react-joyride__tooltip",style:g.tooltip,...l},v.createElement("div",{style:g.tooltipContainer},m&&v.createElement("h1",{"aria-label":zr(m),style:g.tooltipTitle},m),v.createElement("div",{style:g.tooltipContent},c)),!p&&v.createElement("div",{style:g.tooltipFooter},v.createElement("div",{style:g.tooltipFooterSpacer},b.skip),b.back,b.primary),b.close)}var y4=v4,w4=class extends v.Component{constructor(){super(...arguments),Z(this,"handleClickBack",e=>{e.preventDefault();const{helpers:t}=this.props;t.prev()}),Z(this,"handleClickClose",e=>{e.preventDefault();const{helpers:t}=this.props;t.close("button_close")}),Z(this,"handleClickPrimary",e=>{e.preventDefault();const{continuous:t,helpers:r}=this.props;if(!t){r.close("button_primary");return}r.next()}),Z(this,"handleClickSkip",e=>{e.preventDefault();const{helpers:t}=this.props;t.skip()}),Z(this,"getElementsProps",()=>{const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:o,step:s}=this.props,{back:i,close:a,last:l,next:c,nextLabelWithProgress:u,skip:d}=s.locale,p=zr(i),h=zr(a),g=zr(l),m=zr(c),b=zr(d);let w=a,y=h;if(e){if(w=c,y=m,s.showProgress&&!r){const _=zr(u,{step:t+1,steps:o});w=Kp(u,t+1,o),y=_}r&&(w=l,y=g)}return{backProps:{"aria-label":p,children:i,"data-action":"back",onClick:this.handleClickBack,role:"button",title:p},closeProps:{"aria-label":h,children:a,"data-action":"close",onClick:this.handleClickClose,role:"button",title:h},primaryProps:{"aria-label":y,children:w,"data-action":"primary",onClick:this.handleClickPrimary,role:"button",title:y},skipProps:{"aria-label":b,children:d,"data-action":"skip",onClick:this.handleClickSkip,role:"button",title:b},tooltipProps:{"aria-modal":!0,ref:n,role:"alertdialog"}}})}render(){const{continuous:e,index:t,isLastStep:r,setTooltipRef:n,size:o,step:s}=this.props,{beaconComponent:i,tooltipComponent:a,...l}=s;let c;if(a){const u={...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:o,step:l,setTooltipRef:n},d=a;c=v.createElement(d,{...u})}else c=v.createElement(y4,{...this.getElementsProps(),continuous:e,index:t,isLastStep:r,size:o,step:s});return c}},b4=class extends v.Component{constructor(){super(...arguments),Z(this,"scope",null),Z(this,"tooltip",null),Z(this,"handleClickHoverBeacon",e=>{const{step:t,store:r}=this.props;e.type==="mouseenter"&&t.event!=="hover"||r.update({lifecycle:ue.TOOLTIP})}),Z(this,"setTooltipRef",e=>{this.tooltip=e}),Z(this,"setPopper",(e,t)=>{var r;const{action:n,lifecycle:o,step:s,store:i}=this.props;t==="wrapper"?i.setPopper("beacon",e):i.setPopper("tooltip",e),i.getPopper("beacon")&&(i.getPopper("tooltip")||s.placement==="center")&&o===ue.INIT&&i.update({action:n,lifecycle:ue.READY}),(r=s.floaterProps)!=null&&r.getPopper&&s.floaterProps.getPopper(e,t)}),Z(this,"renderTooltip",e=>{const{continuous:t,helpers:r,index:n,size:o,step:s}=this.props;return v.createElement(w4,{continuous:t,helpers:r,index:n,isLastStep:n+1===o,setTooltipRef:this.setTooltipRef,size:o,step:s,...e})})}componentDidMount(){const{debug:e,index:t}=this.props;ps({title:`step:${t}`,data:[{key:"props",value:this.props}],debug:e})}componentDidUpdate(e){var t;const{action:r,callback:n,continuous:o,controlled:s,debug:i,helpers:a,index:l,lifecycle:c,shouldScroll:u,status:d,step:p,store:h}=this.props,{changed:g,changedFrom:m}=Yu(e,this.props),b=a.info(),w=o&&r!==Pe.CLOSE&&(l>0||r===Pe.PREV),y=g("action")||g("index")||g("lifecycle")||g("status"),_=m("lifecycle",[ue.TOOLTIP,ue.INIT],ue.INIT),x=g("action",[Pe.NEXT,Pe.PREV,Pe.SKIP,Pe.CLOSE]),E=s&&l===e.index;if(x&&(_||E)&&n({...b,index:e.index,lifecycle:ue.COMPLETE,step:e.step,type:Wt.STEP_AFTER}),p.placement==="center"&&d===me.RUNNING&&g("index")&&r!==Pe.START&&c===ue.INIT&&h.update({lifecycle:ue.READY}),y){const S=hn(p.target),C=!!S;C&&q5(S)?(m("status",me.READY,me.RUNNING)||m("lifecycle",ue.INIT,ue.READY))&&n({...b,step:p,type:Wt.STEP_BEFORE}):(console.warn(C?"Target not visible":"Target not mounted",p),n({...b,type:Wt.TARGET_NOT_FOUND,step:p}),s||h.update({index:l+(r===Pe.PREV?-1:1)}))}m("lifecycle",ue.INIT,ue.READY)&&h.update({lifecycle:m0(p)||w?ue.TOOLTIP:ue.BEACON}),g("index")&&ps({title:`step:${c}`,data:[{key:"props",value:this.props}],debug:i}),g("lifecycle",ue.BEACON)&&n({...b,step:p,type:Wt.BEACON}),g("lifecycle",ue.TOOLTIP)&&(n({...b,step:p,type:Wt.TOOLTIP}),u&&this.tooltip&&(this.scope=new h4(this.tooltip,{selector:"[data-action=primary]"}),this.scope.setFocus())),m("lifecycle",[ue.TOOLTIP,ue.INIT],ue.INIT)&&((t=this.scope)==null||t.removeScope(),h.cleanupPoppers())}componentWillUnmount(){var e;(e=this.scope)==null||e.removeScope()}get open(){const{lifecycle:e,step:t}=this.props;return m0(t)||e===ue.TOOLTIP}render(){const{continuous:e,debug:t,index:r,nonce:n,shouldScroll:o,size:s,step:i}=this.props,a=hn(i.target);return!_C(i)||!X.domElement(a)?null:v.createElement("div",{key:`JoyrideStep-${r}`,className:"react-joyride__step"},v.createElement(Zg,{...i.floaterProps,component:this.renderTooltip,debug:t,getPopper:this.setPopper,id:`react-joyride-step-${r}`,open:this.open,placement:i.placement,target:i.target},v.createElement(p4,{beaconComponent:i.beaconComponent,continuous:e,index:r,isLastStep:r+1===s,locale:i.locale,nonce:n,onClickOrHover:this.handleClickHoverBeacon,shouldFocus:o,size:s,step:i,styles:i.styles})))}},EC=class extends v.Component{constructor(e){super(e),Z(this,"helpers"),Z(this,"store"),Z(this,"callback",i=>{const{callback:a}=this.props;X.function(a)&&a(i)}),Z(this,"handleKeyboard",i=>{const{index:a,lifecycle:l}=this.state,{steps:c}=this.props,u=c[a];l===ue.TOOLTIP&&i.code==="Escape"&&u&&!u.disableCloseOnEsc&&this.store.close("keyboard")}),Z(this,"handleClickOverlay",()=>{const{index:i}=this.state,{steps:a}=this.props;Ms(this.props,a[i]).disableOverlayClose||this.helpers.close("overlay")}),Z(this,"syncState",i=>{this.setState(i)});const{debug:t,getHelpers:r,run:n=!0,stepIndex:o}=e;this.store=l4({...e,controlled:n&&X.number(o)}),this.helpers=this.store.getHelpers();const{addListener:s}=this.store;ps({title:"init",data:[{key:"props",value:this.props},{key:"state",value:this.state}],debug:t}),s(this.syncState),r&&r(this.helpers),this.state=this.store.getState()}componentDidMount(){if(!Vn())return;const{debug:e,disableCloseOnEsc:t,run:r,steps:n}=this.props,{start:o}=this.store;y0(n,e)&&r&&o(),t||document.body.addEventListener("keydown",this.handleKeyboard,{passive:!0})}componentDidUpdate(e,t){if(!Vn())return;const{action:r,controlled:n,index:o,status:s}=this.state,{debug:i,run:a,stepIndex:l,steps:c}=this.props,{stepIndex:u,steps:d}=e,{reset:p,setSteps:h,start:g,stop:m,update:b}=this.store,{changed:w}=Yu(e,this.props),{changed:y,changedFrom:_}=Yu(t,this.state),x=Ms(this.props,c[o]),E=!St(d,c),S=X.number(l)&&w("stepIndex"),C=hn(x.target);if(E&&(y0(c,i)?h(c):console.warn("Steps are not valid",c)),w("run")&&(a?g(l):m()),S){let j=X.number(u)&&u<l?Pe.NEXT:Pe.PREV;r===Pe.STOP&&(j=Pe.START),[me.FINISHED,me.SKIPPED].includes(s)||b({action:r===Pe.CLOSE?Pe.CLOSE:j,index:l,lifecycle:ue.INIT})}!n&&s===me.RUNNING&&o===0&&!C&&(this.store.update({index:o+1}),this.callback({...this.state,type:Wt.TARGET_NOT_FOUND,step:x}));const P={...this.state,index:o,step:x};if(y("action",[Pe.NEXT,Pe.PREV,Pe.SKIP,Pe.CLOSE])&&y("status",me.PAUSED)){const j=Ms(this.props,c[t.index]);this.callback({...P,index:t.index,lifecycle:ue.COMPLETE,step:j,type:Wt.STEP_AFTER})}if(y("status",[me.FINISHED,me.SKIPPED])){const j=Ms(this.props,c[t.index]);n||this.callback({...P,index:t.index,lifecycle:ue.COMPLETE,step:j,type:Wt.STEP_AFTER}),this.callback({...P,type:Wt.TOUR_END,step:j,index:t.index}),p()}else _("status",[me.IDLE,me.READY],me.RUNNING)?this.callback({...P,type:Wt.TOUR_START}):(y("status")||y("action",Pe.RESET))&&this.callback({...P,type:Wt.TOUR_STATUS});this.scrollToStep(t)}componentWillUnmount(){const{disableCloseOnEsc:e}=this.props;e||document.body.removeEventListener("keydown",this.handleKeyboard)}scrollToStep(e){const{index:t,lifecycle:r,status:n}=this.state,{debug:o,disableScrollParentFix:s=!1,scrollDuration:i,scrollOffset:a=20,scrollToFirstStep:l=!1,steps:c}=this.props,u=Ms(this.props,c[t]),d=hn(u.target),p=e4({isFirstStep:t===0,lifecycle:r,previousLifecycle:e.lifecycle,scrollToFirstStep:l,step:u,target:d});if(n===me.RUNNING&&p){const h=Qd(d,s),g=xl(d,s);let m=Math.floor(K5(d,a,s))||0;ps({title:"scrollToStep",data:[{key:"index",value:t},{key:"lifecycle",value:r},{key:"status",value:n}],debug:o});const b=this.store.getPopper("beacon"),w=this.store.getPopper("tooltip");if(r===ue.BEACON&&b){const{offsets:y,placement:_}=b;!["bottom"].includes(_)&&!h&&(m=Math.floor(y.popper.top-a))}else if(r===ue.TOOLTIP&&w){const{flipped:y,offsets:_,placement:x}=w;["top","right","left"].includes(x)&&!y&&!h?m=Math.floor(_.popper.top-a):m-=u.spotlightPadding}m=m>=0?m:0,n===me.RUNNING&&Q5(m,{element:g,duration:i}).then(()=>{setTimeout(()=>{var y;
332(y=this.store.getPopper("tooltip"))==null||y.instance.update()},10)})}}render(){if(!Vn())return null;const{index:e,lifecycle:t,status:r}=this.state,{continuous:n=!1,debug:o=!1,nonce:s,scrollToFirstStep:i=!1,steps:a}=this.props,l=r===me.RUNNING,c={};if(l&&a[e]){const u=Ms(this.props,a[e]);c.step=v.createElement(b4,{...this.state,callback:this.callback,continuous:n,debug:o,helpers:this.helpers,nonce:s,shouldScroll:!u.disableScrolling&&(e!==0||i),step:u,store:this.store}),c.overlay=v.createElement(f4,{id:"react-joyride-portal"},v.createElement(d4,{...u,continuous:n,debug:o,lifecycle:t,onClickOverlay:this.handleClickOverlay}))}return v.createElement("div",{className:"react-joyride"},c.step,c.overlay)}};Z(EC,"defaultProps",n4);var _4=EC;const x4={welcome:{id:"welcome",routes:[{route:"/admin",steps:[{target:'[data-tour="dashboard-title"]',content:"Welcome to your Admin Dashboard! This is your central hub — everything you need to manage your organization lives here. From this single page you can create events, manage registrations, configure your website, handle race-day timing, and monitor your organization's performance. Think of it as your mission control center.",placement:"bottom",disableBeacon:!0},{target:'[data-tour="org-badge"]',content:"This badge displays the name of the organization you're currently working in. All data on this dashboard — events, registrations, branding, and settings — belongs to this organization. If something looks wrong or missing, double-check that you're viewing the correct organization here.",placement:"bottom"},{target:'[data-tour="org-switcher"]',content:"If you manage multiple organizations (e.g., different race series or event brands), use this dropdown to switch between them instantly. Each organization has its own completely separate set of events, registrations, branding, fees, and website pages. Switching here changes everything on the dashboard to that organization's data.",placement:"bottom"},{target:'[data-tour="action-buttons"]',content:`These quick-action buttons are your shortcuts to the most important setup pages:
333
334• **Branding** — Upload your logo, set colors and fonts for your public pages
335• **Fee Settings** — Configure service fees, credit card processing fees, and class change fees
336• **Getting Started** — This tutorial guide you're using right now
337• **View Contract** — Review your signed service agreement
338• **Sign Out** — Log out of your admin account
339
340You'll use Branding and Fee Settings most during initial setup.`,placement:"bottom"},{target:'[data-tour="nav-tabs"]',content:`These tabs organize the dashboard into three main sections:
341
342• **Registration Admin** — Your primary workspace. Create events, build registration forms, manage classes, coupons, and view incoming registrations.
343• **Timing Admin** — Only appears if your organization uses our timing/scoring system. Manage riders, race order, SMS alerts, and race-day operations.
344• **Page Builder** — Design your organization's public website. Build a landing page, create custom pages (rules, schedule, FAQ), and manage navigation.
345
346Most of your time will be spent in Registration Admin.`,placement:"bottom"},{target:'[data-tour="shareable-links"]',content:`This expandable card contains all the public URLs for your organization. Click it to reveal:
347
348• **Main Page** — Your organization's homepage/landing page
349• **Events Page** — Lists all your published events where people can register
350• **Rider Login** — Where returning registrants can log in to view or edit their registrations
351
352Use the copy button next to each link to grab the URL, then share it on social media, in emails, or embed it on your existing website. These links are live as soon as you publish your pages.`,placement:"bottom"}]}]},branding:{id:"branding",routes:[{route:"/admin/branding",steps:[{target:'[data-tour="branding-logo"]',content:`Upload your organization's logo here — this is the first thing people see on your public pages. It appears in the top-left header of your website, on registration forms, and in email templates.
353
354**Best practices:**
355• Use PNG with a transparent background for the cleanest look
356• Recommended width: at least 200px
357• Horizontal/landscape logos work best in the header
358• Click the upload area or drag and drop your file`,placement:"bottom",disableBeacon:!0},{target:'[data-tour="branding-favicon"]',content:`The favicon is the tiny icon that appears in browser tabs, bookmarks, and mobile home screens 
358when someone visits your site. It helps people identify your site at a glance.
359
360**Tips:**
361• Use a square image — 32×32px or 64×64px works best
362• Keep it simple: your logo icon, initials, or a recognizable symbol
363• PNG or ICO format recommended
364• If you skip this, a default icon will be used`,placement:"bottom"},{target:'[data-tour="branding-colors"]',content:`These color settings control the look and feel of every public-facing page:
365
366• **Primary Color** — The most important one. Used for buttons, links, active navigation tabs, and interactive elements. Pick your main brand color here.
367• **Page Background** — The background color of your content area. White or light colors work best for readability.
368• **Accent Color** — Used for badges, highlights, hover effects, and decorative touches. Choose something that complements your primary color.
369
370Use the color picker or type a hex code directly (e.g., #FF5500). Changes are previewed in real time below.`,placement:"top"},{target:'[data-tour="branding-fonts"]',content:`Typography sets the tone for your brand. You can customize two font categories:
371
372• **Heading Font** — Applied to page titles, section headers, event names, and other prominent text. Bold or display-style fonts make a strong impression.
373• **Body Font** — Used for paragraphs, form labels, descriptions, and general content. Choose something clean and easy to read at small sizes.
374
375The dropdown lists popular Google Fonts. Your selections automatically apply across your entire public site — Main Page, Events page, registration forms, and custom pages.`,placement:"top"},{target:'[data-tour="branding-links"]',content:`Add an external link that appears in your public website's header navigation bar. This is perfect for:
376
377• A link to your live timing/results page
378• Your organization's main website (if separate)
379• A social media page or community forum
380
381Enter the display text (what visitors see) and the full URL (where it goes). The link opens in a new tab so visitors don't leave your registration site.`,placement:"top"},{target:'[data-tour="branding-preview"]',content:`This live preview shows exactly how your branding looks on a real page — including your logo, colors, fonts, and navigation. Scroll through it to check the overall feel.
382
383**Important:** When you're satisfied with your changes, click the **Save** button at the top of the page. Changes are NOT auto-saved — if you leave without saving, your updates will be lost.`,placement:"top"}]}]},fees:{id:"fees",routes:[{route:"/admin/fee-settings",steps:[{target:'[data-tour="service-fees"]',content:`Service fees are what you charge registrants (or absorb yourself) on every registration. You can set two types:
384
385• **Flat Fee** — A fixed dollar amount added to every registration regardless of price (e.g., $5.00). Great for covering a baseline processing cost.
386• **Percentage Fee** — A percentage of the registration total (e.g., 3%). This scales with the event price — a $100 event generates a $3 fee, while a $50 event generates $1.50.
387
388You can use both together (e.g., $2 flat + 2% percentage) or just one. Set either to $0 or 0% to disable it.`,placement:"bottom",disableBeacon:!0},{target:'[data-tour="cc-fees"]',content:`Credit card processing fees are the real costs charged by the payment processor (Stripe) every time someone pays — typically around 2.9% + $0.30 per transaction. You have two options:
389
390• **Pass to Registrant** — The processing fee is added on top of the registration price. The registrant pays slightly more, but your organization receives the full event price. This is the most common choice.
391• **Absorb** — The processing fee is deducted from the registration revenue. The registrant pays the listed price, but your organization receives slightly less.
392
393Example: On a $50 registration, CC fees are about $1.75. Passing them means the registrant pays ~$51.75. Absorbing means you receive ~$48.25.`,placement:"bottom"},{target:'[data-tour="class-change-fees"]',content:`After someone registers, they may want to switch to a different class or category (e.g., moving from "Beginner" to "Intermediate"). This setting controls whether you charge for that:
394
395• **Toggle ON** to enable class change fees
396• **Set the amount** — A flat fee per change (e.g., $10 or $15)
397
398When enabled, registrants who request a class change through their registration portal will be prompted to pay this fee via credit card before the change is processed.
399
400**Why charge?** It discourages last-minute changes that create administrative work, especially for events with class capacity limits.`,placement:"bottom"},{target:'[data-tour="platform-fees"]',content:`Platform fees are separate from your service fees — they're the fees charged by this platform for providing the registration infrastructure. This section shows your organization's fee schedule:
401
402• **Fee tiers** — Different rates may apply based on the registration price
403• **Pass to Registrant** toggle — Just like service fees, you can choose to pass platform fees to registrants or absorb them from your revenue
404
405These fees are set by the platform administrators and cannot be changed here, but you DO control whether registrants or your organization pays them.`,placement:"top"},{target:'[data-tour="fee-preview"]',content:`This calculator shows a real example of how your current fee settings add up. It takes a sample $100 registration and breaks down:
406
407• The base registration price
408• Your flat service fee amount
409• Your percentage service fee amount
410• Credit card processing fees
411• Platform fees
412• **The total the registrant pays**
413• **The net amount your organization receives**
414
415Use this to verify your fee setup makes sense before you start taking real registrations. Adjust the settings above and watch this preview update in real time.`,placement:"top"}]}]},"create-event":{id:"create-event",routes:[{route:"/admin",steps:[{target:'[data-tour="create-event-btn"]',content:`Click this button to launch the **Event Creation Wizard** — a step-by-step process that guides you through setting up a new event:
416
4171. **Choose a Template** — Pick a sport/activity type (Motocross, Running, Triathlon, etc.) to pre-populate your registration form with relevant fields
4182. **Event Details** — Enter the name, date, location, and description
4193. **Pricing** — Set regular, early-bird, and late registration prices
4204. **Banner Image** — Upload an eye-catching image for your event page
421
422Don't worry about getting everything perfect — you can edit all details, add classes, customize the form, and adjust settings after creation.`,placement:"bottom",disableBeacon:!0},{target:'[data-tour="events-list"]',content:`All your created events appear here as cards. Each card shows the event name, date, and location, plus quick-action buttons:
423
424• **Form Builder** (pencil icon) — Open the drag-and-drop form editor to customize what registrants fill out
425• **Settings** (gear icon) — Manage classes, coupons, bike makes, and event-specific fee overrides
426• **Analytics** (chart icon) — View registration stats, revenue, and trends
427• **Registrations** (list icon) — See all registrations, search, edit, refund, or export data
428• **Publish/Unpublish** — Control whether the event is visible to the public
429
430Events are sorted by date. Click any action to jump directly to that feature for the event.`,placement:"top"}]}]},sharing:{id:"sharing",routes:[{route:"/admin",steps:[{target:'[data-tour="shareable-links"]',content:`This is where you find all the public URLs for your organization. Click to expand the card and you'll see:
431
432• **Main Page** — Your organization's homepage. Share this as your primary link on social media, email signatures, and promotional materials.
433• **Events Page** — A dedicated page listing all your published events. Registrants can browse and click through to register. Great for organizations with multiple events.
434• **Rider Login** — Where returning registrants can sign in to view their past registrations, edit details (if allowed), or check confirmation info.
435
436**How to use:** Click the copy button (clipboard icon) next to any link to copy it to your clipboard. Then paste it wherever you need it — Facebook posts, email newsletters, your existing website, flyers, etc.
437
438**Note:** These links only work after your pages are published. If you haven't built your landing page yet, the Main Page link will show a default page.`,placement:"bottom",disableBeacon:!0}]}]},"service-agreement":{id:"service-agreement",routes:[{route:"/admin",steps:[{target:'[data-tour="action-buttons"]',content:`The Service Agreement is a one-time legal document you must sign before your organization can go fully live. Until it's signed, you're in **Trial Mode**, which lets you explore and set everything up but limits you to 10 emails, 10 SMS messages, and prevents publishing events or pages.
439
440Once you're ready, you'll see the agreement when you first visit the dashboard (or it may have already been signed). It covers:
441• **Terms of Service** — How the platform works and your responsibilities
442• **Fee Structure** — Platform fees that apply to registrations
443• **IP Guidelines** — Intellectual property and content ownership
444
445You must scroll through the entire agreement, check all three agreement boxes, fill in your name/title/email, draw your signature, and click "Sign & Submit." After signing, your organization has full access.`,placement:"bottom",disableBeacon:!0},{target:'[data-tour="view-contract-btn"]',content:"After signing, you can review your signed agreement anytime by clicking this **View Contract** button. It shows the full agreement text, your signature, and the date you signed. This is useful for your records or if you need to verify the terms.",placement:"bottom"}]}]},"form-builder":{id:"form-builder",routes:[{route:"/admin",steps:[{target:'[data-tour="events-list"]',content:"To access the Form Builder, first find the event you want to edit in this events list. Click the **pencil icon** (Form Builder button) on any event card. This opens the visual drag-and-drop editor where you design exactly what registrants fill out when they sign up for your event.",placement:"top",disableBeacon:!0}]}]},"event-settings":{id:"event-settings",routes:[{route:"/admin",steps:[{target:'[data-tour="events-list"]',content:`To configure event settings, find your event in this list and click the **gear icon** (Settings button). The Event Settings page has multiple tabs:
446
447• **General** — Edit event name, date, location, venue, pricing (regular, early bird, late), max participants, registration deadlines, banner image, and publish status
448• **Fee Overrides** — Override your organization's default fees for this specific event (useful if one event needs different pricing)
449• **Coupons** — Create promotional discount codes with percentage or flat discounts, usage limits, and expiration dates
450• **Racing Classes** — Define registration categories (e.g., "250cc Beginner", "5K Run") with capacity limits, age restrictions, additional fees, and class groups
451• **Bike Makes** — Manage manufacturer options for motorsport events (Honda, Yamaha, KTM, etc.)`,placement:"top",disableBeacon:!0}]}]},registrations:{id:"registrations",routes:[{route:"/admin",steps:[{target:'[data-tour="events-list"]',content:`To manage registrations, find your event and click the **list icon** (Registrations button). The Registrations page lets you:
452
453• **Search & filter** — Find registrations by name, email, or confirmation number. Filter by status (confirmed, pe
453nding, cancelled, refunded)
454• **View details** — Click "View" to see the full registration including all form responses, add-ons purchased, payment info, and check-in status
455• **Edit** — Click "Edit" to modify a registrant's information (name, class, bike details, etc.)
456• **Check in/out** — Mark registrants as checked in on race day with one click
457• **Refund** — Process full or partial refunds (by percentage or dollar amount) directly through the platform
458• **Export** — Download registration data as a CSV file. You can create export presets to save which fields you want to include, making repeat exports quick and consistent`,placement:"top",disableBeacon:!0}]}]},"page-builder":{id:"page-builder",routes:[{route:"/admin/landing-page",steps:[{target:'[data-tour="page-builder-page-tabs"]',content:`The Page Builder organizes your website into tabs. The **Main Page** tab is your organization's homepage — the first thing visitors see. The remaining tabs are **Custom Page** slots where you can create additional pages like Rules, Schedule, FAQ, Sponsors, etc.
459
460Click any tab to switch between pages. Empty slots show "Page X (Empty)" — click them to create a new page with a title and URL slug.`,placement:"bottom",disableBeacon:!0},{target:'[data-tour="page-builder-title"]',content:"This shows which page you're currently editing. The Main Page Builder is where you design your organization's landing page — the homepage visitors see when they visit your main URL.",placement:"bottom"},{target:'[data-tour="page-builder-toggle"]',content:`This toggle controls whether your Main Page is **live and publicly accessible**. When disabled, visitors to your main URL will see a default page. When enabled, they'll see the page you've designed here.
461
462**Important:** You must sign the service agreement before you can enable this. The toggle won't work in Trial Mode.`,placement:"bottom"},{target:'[data-tour="page-builder-add-element"]',content:`Click **Add Element** to open the element picker and add content blocks to your page. Available elements include:
463
464• **Hero Section** — Large banner with title, subtitle, and call-to-action button
465• **Testimonials** — Customer/participant quotes
466• **Stats Counter** — Animated numbers (e.g., "500+ Participants")
467• **CTA Banner** — Call-to-action with button
468• **Image Gallery** — Multiple images in a grid
469• **Video** — Embed YouTube or other videos
470• **Schedule, Location, Speakers** — Event-specific sections
471• **Headings, Paragraphs, Buttons, Dividers** — Basic content building blocks
472
473Elements are added to the bottom of the page. You can drag them to reorder.`,placement:"right"},{target:'[data-tour="page-builder-preview"]',content:`This is the live preview area showing how your page looks with your organization's branding (colors, fonts). Each element shows edit, delete, and duplicate buttons on hover.
474
475• **Click an element** to edit its content, styling, and settings
476• **Drag elements** to reorder them
477• **Use the "+" button** between elements to insert new content at specific positions
478• Click **Preview** (top right) to open your actual public page in a new tab and see exactly what visitors will see`,placement:"left"}]}]},"timing-admin":{id:"timing-admin",routes:[{route:"/admin?tab=timing",steps:[{target:'[data-tour="timing-admin-container"]',content:`The **Timing Admin** is your race-day operations center. It only appears when your organization has a timing database configured (MySQL connection set up by a super admin).
479
480This section connects your registration system to your timing/scoring software, enabling live data sync, rider management, and race-day communications.`,placement:"bottom",disableBeacon:!0},{target:'[data-tour="timing-section-tabs"]',content:`The Timing Admin is organized into three main sections:
481
482• **Communications** — Send SMS messages and emails to riders. View incoming text messages. Configure SMS settings like race alerts and podium notifications.
483• **Race Management** — Organize races, manage rider data, set race order and start times. Search and edit rider information synced from the timing database.
484• **Promotions** — Create and manage point-of-sale coupons, discount offers, and coupon templates. Track redemptions and manage POS users who can verify coupons at the event.
485
486Some sections may be locked if the corresponding feature isn't enabled for your organization.`,placement:"bottom"}]}]},kiosk:{id:"kiosk",routes:[{route:"/admin/kiosk",steps:[{target:'[data-tour="kiosk-event-selector"]',content:"Start by selecting a race using the cascading selectors: **Year → Series → Race**. This locks the entire kiosk session to a specific event. All searches, check-ins, and walk-up registrations will be scoped to this event.",placement:"bottom",disableBeacon:!0},{target:'[data-tour="kiosk-search"]',content:"Use this search bar to find riders by name, number, or other identifiers. It searches across both platform registrations and the timing database simultaneously. Click any result to open the rider detail panel.",placement:"bottom"},{target:'[data-tour="kiosk-walkup"]',content:"Click here to register a walk-up rider who arrives without a pre-registration. This opens a quick registration form for on-the-spot sign-ups.",placement:"top"},{target:'[data-tour="kiosk-activity-log"]',content:"The Activity L
486og records every action taken in this kiosk session — check-ins, edits, walk-up registrations. Expand it to review recent activity or troubleshoot.",placement:"top"}]}]},usage:{id:"usage",routes:[{route:"/admin?tab=usage",steps:[{target:'[data-tour="usage-date-range"]',content:"Set the date range to filter usage data. By default it shows the current month. Adjust these to analyze costs for specific events, billing periods, or custom ranges.",placement:"bottom",disableBeacon:!0},{target:'[data-tour="usage-summary"]',content:"These cards show your key usage metrics at a glance: emails sent, SMS segments, registrations processed, timing riders, and the total cost for the selected period.",placement:"bottom"},{target:'[data-tour="usage-table"]',content:"This table breaks down costs by category — email, SMS, platform fees, and live timing. Each row shows the count, billable units, unit cost, and total for that category.",placement:"top"},{target:'[data-tour="digest-settings"]',content:"Configure automated digest emails to stay informed about your organization's registration activity without checking the dashboard. Set the frequency to daily or weekly.",placement:"top"}]}]},analytics:{id:"analytics",routes:[{route:"/admin?tab=analytics",steps:[{target:'[data-tour="analytics-container"]',content:"This is your Organization Analytics dashboard. It aggregates registration data across all your events, showing revenue, registrant counts, class distributions, and coupon performance in one place.",placement:"bottom",disableBeacon:!0}]}]},"website-analytics":{id:"website-analytics",routes:[{route:"/admin?tab=website",steps:[{target:'[data-tour="website-analytics-container"]',content:"Website Analytics tracks how visitors interact with your organization's public pages. You can see visitor counts, pageviews, traffic sources, top pages, and device breakdowns.",placement:"bottom",disableBeacon:!0},{target:'[data-tour="website-date-range"]',content:"Use these buttons to change the time period — 7 days, 14 days, or 30 days. This affects all the data displayed below.",placement:"bottom"}]}]},lookup:{id:"lookup",routes:[{route:"/admin?tab=lookup",steps:[{target:'[data-tour="lookup-search"]',content:"Type a confirmation number, rider name, or email and press Search. This searches across ALL your organization's events, making it the fastest way to find any registration when a rider calls or emails you.",placement:"bottom",disableBeacon:!0}]}]},"ai-assistant":{id:"ai-assistant",routes:[{route:"/admin",steps:[{target:'[data-tour="ai-assistant-button"]',content:`This floating button opens the **AI Assistant** — your on-demand helper that can answer questions about the platform, suggest best practices, and help you troubleshoot issues.
487
488Click it to open a chat panel on the right side of the screen. You can:
489• Ask how to set up specific features
490• Get help understanding fee calculations
491• Ask for advice on form design or event setup
492• Troubleshoot issues you're encountering
493
494The assistant is context-aware — it knows which page you're on and can provide relevant guidance. Close the panel anytime by clicking the X or clicking this button again.`,placement:"left",disableBeacon:!0}]}]}},SC=v.createContext(null);function E4(){const e=v.useContext(SC);if(!e)throw new Error("useTour must be used within TourProvider");return e}function S4({children:e}){const t=Zi(),r=kt(),[n,o]=v.useState({isRunning:!1,tourId:null,stepIndex:0,steps:[]}),s=v.useRef(0),i=v.useRef(null),a=v.useCallback(u=>{const d=x4[u];if(!d||d.routes.length===0)return;i.current=d,s.current=0;const p=d.routes[0];r.pathname!==p.route&&t(p.route),setTimeout(()=>{o({isRunning:!0,tourId:u,stepIndex:0,steps:p.steps})},600)},[t,r.pathname]),l=v.useCallback(()=>{i.current=null,s.current=0,o({isRunning:!1,tourId:null,stepIndex:0,steps:[]})},[]),c=v.useCallback(u=>{const{action:d,index:p,status:h,type:g}=u;if(h===me.FINISHED||h===me.SKIPPED){const m=i.current,b=s.current+1;if(m&&b<m.routes.length){s.current=b;const w=m.routes[b];t(w.route),setTimeout(()=>{o(y=>({...y,stepIndex:0,steps:w.steps}))},600)}else l();return}if(g===Wt.STEP_AFTER||g===Wt.TARGET_NOT_FOUND){const m=p+(d===Pe.PREV?-1:1);o(b=>({...b,stepIndex:m}))}},[t,l]);
494return f.jsx(SC.Provider,{value:{tourState:n,startTour:a,stopTour:l,handleJoyrideCallback:c},children:e})}function T4(){const{tourState:e,handleJoyrideCallback:t}=E4();return e.isRunning?f.jsx(_4,{steps:e.steps,stepIndex:e.stepIndex,run:e.isRunning,continuous:!0,showSkipButton:!0,showProgress:!0,scrollToFirstStep:!0,disableOverlayClose:!0,callback:t,locale:{back:"Back",close:"Close",last:"Done",next:"Next",skip:"Skip Tour"},styles:{options:{zIndex:1e4,primaryColor:"hsl(var(--primary))",textColor:"hsl(var(--foreground))",backgroundColor:"hsl(var(--card))",arrowColor:"hsl(var(--card))"},tooltip:{borderRadius:"0.75rem",padding:"1.25rem",fontSize:"0.9rem"},tooltipTitle:{fontSize:"1rem",fontWeight:600},buttonNext:{borderRadius:"0.5rem",padding:"0.5rem 1.25rem",fontSize:"0.875rem",fontWeight:500},buttonBack:{borderRadius:"0.5rem",padding:"0.5rem 1rem",fontSize:"0.875rem",color:"hsl(var(--muted-foreground))"},buttonSkip:{fontSize:"0.8rem",color:"hsl(var(--muted-foreground))"},spotlight:{borderRadius:"0.5rem"},overlay:{backgroundColor:"rgba(0, 0, 0, 0.5)"}}}):null}function TC(e){var t;try{const r=sessionStorage.getItem("kiosk_session");if(!r)return null;const n=JSON.parse(r);return e&&((t=n.organization)==null?void 0:t.slug)!==e?null:n}catch{return null}}function C4(e){var t;return((t=TC(e))==null?void 0:t.staff_token)??null}function x6(e){const t=C4(e);return t?{"x-kiosk-staff-token":t}:{}}const CC={racer:"Rider",racers:"Riders",myRacers:"My Riders",bikeNumber:"Bike #",bikeMake:"Bike Make",class:"Class",classes:"Classes",race:"Moto",races:"Motos",gatePick:"Gate Pick",transponder:"Transponder",competeVerb:"Race",eventTypeLabel:"Motorsports",eventCalendar:"Race Calendar",feedLabel:"Race Feed",footerTagline:"Professional race registration powered by {org}.",feedDescription:"Live updates, schedule changes, and weather",bib:"#",wave:"Group",pace:"Pace",gunTime:"Total",chipTime:"Chip",split:"Split",lap:"Lap",laps:"Laps",best:"Best",last:"Last",gap:"Gap",position:"Pos"},P4={racer:"Runner",racers:"Runners",myRacers:"My Runners",bikeNumber:"Bib #",bikeMake:"",class:"Distance",classes:"Distances",race:"Race",races:"Races",gatePick:"Corral",transponder:"Chip",competeVerb:"Run",eventTypeLabel:"Running",eventCalendar:"Race Calendar",feedLabel:"Event Feed",footerTagline:"Race registration powered by {org}.",feedDescription:"Live updates, schedule changes, and weather",bib:"Bib",wave:"Wave",pace:"Pace",gunTime:"Gun",chipTime:"Chip",split:"Split",lap:"Split",laps:"Splits",best:"Best",last:"Last",gap:"Gap",position:"Pos"},k4={racer:"Cyclist",racers:"Cyclists",myRacers:"My Cyclists",bikeNumber:"Bib #",bikeMake:"Bike Brand",class:"Category",classes:"Categories",race:"Race",races:"Races",gatePick:"Start Position",transponder:"Chip",competeVerb:"Ride",eventTypeLabel:"Cycling",eventCalendar:"Race Calendar",feedLabel:"Race Feed",footerTagline:"Professional race registration powered by {org}.",feedDescription:"Live updates, schedule changes, and weather",bib:"Bib",wave:"Wave",pace:"Pace",gunTime:"Total",chipTime:"Chip",split:"Split",lap:"Lap",laps:"Laps",best:"Best",last:"Last",gap:"Gap",position:"Pos"},b0={motorsports:CC,running:P4,cycling:k4},E6=[{value:"motorsports",label:"Motorsports",description:"Dirt bike, motocross, ATV, and similar racing."},{value:"running",label:"Running",description:"5K, 10K, half marathons, trail runs."},{value:"cycling",label:"Cycling",description:"Road, mountain bike, and gravel races."}];function O4(e){return e&&e in b0?b0[e]:CC}const PC={bikeMake:!0,bikeMakeColumn:!0,gatePick:!0,transponders:!0,practiceOrder:!0,motoScoring:!0,pace:!1,waves:!1,distances:!1,multiLap:!0,splitTimes:!1,gunVsChipTime:!1,laneWaveColumn:!1,seriesRegistration:!0,usesMysqlTiming:!0,motoScheduling:!0,gatePickAdmin:!0,wavesAdmin:!1},R4={bikeMake:!1,bikeMakeColumn:!1,gatePick:!1,transponders:!0,practiceOrder:!1,motoScoring:!1,pace:!0,waves:!0,distances:!0,multiLap:!1,splitTimes:!0,gunVsChipTime:!0,laneWaveColumn:!0,seriesRegistration:!1,usesMysqlTiming:!1,motoScheduling:!1,gatePickAdmin:!1,wavesAdmin:!0},j4={bikeMake:!0,bikeMakeColumn:!1,gatePick:!1,transponders:!0,practiceOrder:!1,motoScoring:!1,pace:!0,waves:!0,distances:!0,multiLap:!0,splitTimes:!1,gunVsChipTime:!1,laneWaveColumn:!1,seriesRegistration:!0,usesMysqlTiming:!1,motoScheduling:!1,gatePickAdmin:!0,wavesAdmin:!1},_0={motorsports:PC,running:R4,cycling:j4};function A4(e){return e&&e in _0?_0[e]:PC}function x0(e){try{return e()}catch{return null}}function ev(e){const t=x0(()=>Es()),r=x0(()=>bs());return e?{eventType:e.eventType??null}:t!=null&&t.branding?{eventType:t.branding.event_type??null}
494:r!=null&&r.currentOrganization?{eventType:r.currentOrganization.event_type??null}:{eventType:null}}function kC(e){return O4(ev(e).eventType)}function S6(e){return A4(ev(e).eventType)}function T6(e){return ev(e).eventType??"motorsports"}function C6(e){return!0}function P6(e){const t=yd(),{data:r=[],isLoading:n,refetch:o}=bn({queryKey:["custom-pages",e],queryFn:async()=>{if(!e)return[];const{data:c,error:u}=await xe.from("custom_pages").select("*").eq("organization_id",e).order("nav_order",{ascending:!0});if(u)throw u;return c},enabled:!!e}),s=Ca({mutationFn:async c=>{const u=r.length>0?Math.max(...r.map(h=>h.nav_order))+1:0,{data:d,error:p}=await xe.from("custom_pages").insert({organization_id:c.organization_id,title:c.title,slug:c.slug,nav_order:u}).select().single();if(p)throw p;return d},onSuccess:()=>{t.invalidateQueries({queryKey:["custom-pages",e]}),sn.success("Page created")},onError:c=>{sn.error("Failed to create page: "+c.message)}}),i=Ca({mutationFn:async({id:c,updates:u})=>{const{data:d,error:p}=await xe.from("custom_pages").update(u).eq("id",c).select().single();if(p)throw p;return d},onSuccess:()=>{t.invalidateQueries({queryKey:["custom-pages",e]}),sn.success("Page updated")},onError:c=>{sn.error("Failed to update page: "+c.message)}}),a=Ca({mutationFn:async c=>{const{error:u}=await xe.from("custom_pages").delete().eq("id",c);if(u)throw u},onSuccess:()=>{t.invalidateQueries({queryKey:["custom-pages",e]}),sn.success("Page deleted")},onError:c=>{sn.error("Failed to delete page: "+c.message)}}),l=Ca({mutationFn:async c=>{const u=c.map(({id:d,nav_order:p})=>xe.from("custom_pages").update({nav_order:p}).eq("id",d));await Promise.all(u)},onSuccess:()=>{t.invalidateQueries({queryKey:["custom-pages",e]})},onError:c=>{sn.error("Failed to reorder pages: "+c.message)}});return{pages:r,isLoading:n,refetch:o,createPage:s,updatePage:i,deletePage:a,reorderPages:l}}function N4(e){return bn({queryKey:["published-custom-pages",e],queryFn:async()=>{if(!e)return[];const{data:t,error:r}=await xe.from("custom_pages").select("id, title, slug, nav_order").eq("organization_id",e).eq("is_published",!0).order("nav_order",{ascending:!0});if(r)throw r;return t},enabled:!!e})}let Bo=null;const Qp=new Set;function Yp(){Qp.forEach(e=>e())}typeof window<"u"&&(window.addEventListener("beforeinstallprompt",e=>{e.preventDefault(),Bo=e,Yp()}),window.addEventListener("appinstalled",()=>{Bo=null,Yp()}));function I4(){const[,e]=v.useState(0);v.useEffect(()=>{const s=()=>e(i=>i+1);return Qp.add(s),()=>{Qp.delete(s)}},[]);const t=typeof navigator<"u"?navigator.userAgent:"",r=/iPad|iPhone|iPod/.test(t)&&!window.MSStream,n=typeof window<"u"&&(window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone===!0),o=v.useCallback(async()=>{if(!Bo)return"unavailable";await Bo.prompt();const s=await Bo.userChoice;return s.outcome==="accepted"&&(Bo=null,Yp()),s.outcome},[]);return{canInstall:!!Bo,promptInstall:o,isIOS:r,isStandalone:n}}function L4(){const{orgSlug:e}=$l(),{pathname:t}=kt(),r=/\/org\/[^/]+\/kiosk/.test(t),{data:n}=bn({queryKey:["branded-pwa-org",e],queryFn:async()=>{if(!e)return null;const{data:o}=await xe.from("organizations_public").select("id, slug, name, favicon_url, logo_url, primary_color").eq("slug",e).eq("is_active",!0).maybeSingle();return o||null},enabled:!!e&&!r,staleTime:5*60*1e3});return v.useEffect(()=>{if(e&&!r)try{localStorage.setItem("branded_pwa_org",e)}catch{}},[e,r]),v.useEffect(()=>{if(!e||r||!n)return;const o="https://hhkjvpdlkhxblpqzugic.supabase.co",s=window.location.origin,i=n.favicon_url||n.logo_url||"",a=`${o}/functions/v1/pwa-manifest/?org=${encodeURIComponent(e)}&origin=${encodeURIComponent(s)}&scope=site&v=${encodeURIComponent(i)}`,c=Array.from(document.querySelectorAll('link[rel="manifest"]')).map(_=>_.href);(()=>{const _=Array.from(document.querySelectorAll('link[rel="manifest"]'));if(_.length===0){const x=document.createElement("link");x.rel="manifest",x.type="application/manifest+json",x.crossOrigin="anonymous",x.href=a,document.head.appendChild(x)}else _.forEach((x,E)=>{x.type="application/manifest+json",x.crossOrigin="anonymous",x.href=a,E>0&&x.remove()})})();const d=n.favicon_url||n.logo_url||null,p=[];if(d){const _=x=>{let E=document.querySelector(`link[rel="${x}"]`);const S=(E==null?void 0:E.href)||null;E?p.push(()=>{E&&S&&(E.href=S)}):(E=document.createElement("link"),E.rel=x,document.head.appendChild(E),p.push(()=>E&&E.remove())),E.href=d};_("icon"),_("shortcut icon"),_("apple-touch-icon")}const h=document.title;document.title=n.name;let g=document.querySelector('meta[name="theme-color"]');const m=(g==null?void 0:g.content)||null;g||(g=document.createElement("meta"),g.name="theme-color",document.head.appendChild(g)),n.primary_color&&(g.content=n.primary_color);let b=document.querySelector('meta[name="apple-mobile-web-app-capable"]');b||(b=document.createElement("meta"),b.name="apple-mobile-web-app-capable",b.content="yes",document.head.appendChild(b));let w=document.querySelector('meta[name="apple-mobile-web-app-title"]');const y=(w==null?void 0:w.content)||null;return w||(w=document.createElement("meta"),w.name="apple-mobile-web-app-title",document.head.appendChild(w)),w.content=n.name,()=>{Array.from(document.querySelectorAll('link[rel="manifest"]')).forEac
494h((x,E)=>{c[E]&&(x.href=c[E])}),p.forEach(x=>x()),m&&g&&(g.content=m),y&&w&&(w.content=y),document.title=h}},[e,r,n]),null}function D4(){const{user:e,isAdmin:t,signOut:r}=Tn(),{branding:n}=Es(),o=kC(),s=Zi(),i=kt(),[a,l]=v.useState(!1),{canInstall:c,promptInstall:u,isIOS:d,isStandalone:p}=I4(),h=i.pathname.match(/^\/org\/([^/]+)/),g=h?h[1]:(n==null?void 0:n.slug)||null,m=g?`/org/${g}`:"/",b=g?`/org/${g}/main`:null,w=g?`/org/${g}/events`:"/events",y=g?`/org/${g}/login`:"/rider-login",_=g?`/org/${g}/account`:null,x=!!h&&!p&&(c||d),E=async()=>{c?await u():g&&s(`/org/${g}/install`)},S=n==null?void 0:n.landing_page_enabled,{data:C=[]}=N4(n==null?void 0:n.id),P=async()=>{try{await r(),window.location.href=m}catch(W){console.error("Sign out error:",W)}},I=(n==null?void 0:n.logo_url)||(n==null?void 0:n.favicon_url)||qd,j=(n==null?void 0:n.name)||"Beyond Pro",$=(n==null?void 0:n.primary_color)||null,M=W=>$?{className:`${W} transition-colors font-medium`,style:{color:void 0},onMouseEnter:U=>{U.currentTarget.style.color=$},onMouseLeave:U=>{U.currentTarget.style.color=""}}:{className:`${W} hover:text-foreground transition-colors font-medium`};return f.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 pointer-events-auto bg-background border-b border-border select-none cursor-default",children:f.jsxs("div",{className:"container mx-auto px-4",children:[f.jsxs("div",{className:"flex items-center justify-between min-h-16 md:min-
494h-20 py-2 gap-4",children:[f.jsxs(ge,{to:m,className:"flex items-center gap-3 cursor-pointer",children:[f.jsx("img",{src:I,alt:`${j} Logo`,className:"h-10 max-w-[200px] object-contain bg-transparent"}),f.jsx("span",{className:"font-display text-xl text-foreground hidden sm:block",style:{fontFamily:n!=null&&n.font_heading?`"${n.font_heading}", sans-serif`:void 0},children:n?j:f.jsxs(f.Fragment,{children:["BEYOND ",f.jsx("span",{className:"text-primary",children:"PRO"})]})})]}),f.jsxs("nav",{className:"hidden md:flex flex-1 flex-wrap items-center justify-center gap-x-6 gap-y-2 px-4",children:[f.jsx(lt,{size:"sm",onClick:()=>s(w),className:"font-semibold text-white hover:opacity-90",style:$?{backgroundColor:$}:void 0,children:"Register Now"}),S&&b&&f.jsx(ge,{to:b,...M("text-muted-foreground"),children:"Home"}),f.jsx(ge,{to:m,...M("text-muted-foreground"),children:S?"Login":"Home"}),g&&f.jsx(ge,{to:`/org/${g}/feed`,...M("text-muted-foreground"),children:o.feedLabel}),g&&C.map(W=>f.jsx(ge,{to:`/org/${g}/page/${W.slug}`,...M("text-muted-foreground"),children:W.title},W.id)),g&&f.jsx(ge,{to:`/org/${g}/timing`,...M("text-muted-foreground"),children:(n==null?void 0:n.timing_link_text)||"Live Timing"})]}),f.jsxs("div",{className:"hidden md:flex items-center gap-4",children:[x&&f.jsxs(lt,{variant:"outline",size:"sm",onClick:E,style:$?{borderColor:$,color:$}:{},children:[f.jsx(cw,{className:"h-4 w-4 mr-2"}),"Install App"]}),e?f.jsxs(NT,{children:[f.jsx(IT,{asChild:!0,children:f.jsxs(lt,{variant:"outline",size:"sm",className:"gap-2",style:$?{borderColor:$,color:$}:{},children:[f.jsx(Ra,{className:"h-4 w-4"}),f.jsx("span",{className:"max-w-[120px] truncate",children:e.email})]})}),f.jsxs(Hg,{align:"end",children:[_&&f.jsxs(ui,{onSelect:()=>s(_),children:[f.jsx(Ra,{className:"h-4 w-4 mr-2"}),"Account"]}),f.jsxs(ui,{onClick:W=>{W.preventDefault(),P()},children:[f.jsx(Fu,{className:"h-4 w-4 mr-2"}),"Sign Out"]})]})]}):f.jsxs(lt,{variant:"outline",size:"sm",onClick:()=>s(y),style:$?{borderColor:$,color:$}:{},children:[f.jsx(Ra,{className:"h-4 w-4 mr-2"}),o.racer," Login"]})]}),f.jsxs("div",{className:"md:hidden flex items-center gap-2",children:[x&&f.jsx("button",{"aria-label":"Install app",className:"p-2",onClick:E,style:$?{color:$}:{},children:f.jsx(cw,{className:"h-6 w-6"})}),f.jsx("button",{className:"p-2",onClick:()=>l(!a),children:a?f.jsx(Rd,{className:"h-6 w-6 text-foreground"}):f.jsx(LS,{className:"h-6 w-6 text-foreground"})})]})]}),a&&f.jsx("div",{className:"md:hidden py-4 border-t border-border animate-fade-in max-h-[calc(100dvh-5rem)] overflow-y-auto overscroll-contain pb-8",children:f.jsxs("nav",{className:"flex flex-col gap-4",children:[f.jsx(lt,{onClick:()=>{s(w),l(!1)},className:"w-full font-semibold text-white hover:opacity-90",style:$?{backgroundColor:$}:void 0,children:"Register Now"}),S&&b&&f.jsx(ge,{to:b,...M("text-muted-foreground py-2"),onClick:()=>l(!1),children:"Home"}),f.jsx(ge,{to:m,...M("text-muted-foreground py-2"),onClick:()=>l(!1),children:S?"Login":"Home"}),g&&f.jsx(ge,{to:`/org/${g}/feed`,...M("text-muted-foreground py-2"),onClick:()=>l(!1),children:o.feedLabel}),g&&C.map(W=>f.jsx(ge,{to:`/org/${g}/page/${W.slug}`,...M("text-muted-foreground py-2"),onClick:()=>l(!1),children:W.title},W.id)),g&&f.jsx(ge,{to:`/org/${g}/timing`,...M("text-muted-foreground py-2"),onClick:()=>l(!1),children:(n==null?void 0:n.timing_link_text)||"Live Timing"}),e?f.jsxs(f.Fragment,{children:[!t&&_&&f.jsx(ge,{to:_,...M("text-muted-foreground py-2"),onClick:()=>l(!1),children:"Account"}),f.jsxs(lt,{variant:"outline",onClick:()=>{P(),l(!1)},className:"w-full",style:$?{borderColor:$,color:$}:{},children:[f.jsx(Fu,{className:"h-4 w-4 mr-2"}),"Sign Out"]})]}):f.jsxs(lt,{variant:"outline",onClick:()=>{s(y),l(!1)},className:"w-full",style:$?{borderColor:$,color:$}:{},children:[f.jsx(Ra,{className:"h-4 w-4 mr-2"}),o.racer," Login"]})]})})]})})}function M4(){const{branding:e}=Es(),t=kC(),n=kt().pathname.match(/^\/org\/([^/]+)/),o=n?n[1]:null,s=o?`/org/${o}`:"/",i=o?`/org/${o}/events`:"/events",a=o?`/org/${o}/login`:"/rider-login",l=(e==null?void 0:e.logo_url)||(e==null?void 0:e.favicon_url)||qd,c=(e==null?void 0:e.name)||"Beyond Pro";return f.jsx("footer",{className:"bg-white border-t border-border py-12",children:f.jsxs("div",{className:"container mx-auto px-4",children:[f.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[f.jsxs("div",{className:"col-span-1 md:col-span-2",children:[f.jsxs(ge,{to:s,className:"flex items-center gap-3 mb-4",children:[f.jsx("img",{src:l,alt:`${c} Logo`,className:"h-10 max-w-[200px] object-contain"}),f.jsx("span",{className:"font-display text-2xl text-foreground",style:{fontFamily:e!=null&&e.font_heading?`"${e.font_heading}", sans-serif`:void 0},children:e?c:f.jsxs(f.Fragment,{children:["BEYOND ",f.jsx("span",{className:"text-primary",children:"PRO"})]})})]}),f.jsx("p",{className:"text-muted-foreground max-w-md",style:{fontFamily:e!=null&&e.font_body?`"${e.font_body}", sans-serif`:void 0},children:e?t.footerTagline.replace("{org}",c):"Professional race registration made simple. Fast, secure, and built for riders who demand the best."})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-display text-lg text-foreground mb-4",children:"QUICK LINKS"}),f.jsxs("nav",{className:"flex flex-col gap-2",children:[f.jsx(ge,{to:s,className:"text-muted-foreground hover:text-primary transition-colors",children:"Home"}),f.jsx(ge,{to:i,className:"text-muted-foreground hover:text-primary transition-colors",children:"Events"}),f.jsxs(ge,{to:a,className:"text-muted-foreground hover:text-primary transition-colors",children:[t.racer," Login"]}),f.jsx(ge,{to:o?`/org/${o}/privacy`:"/privacy",className:"text-muted-foreground hover:text-primary transition-colors",children:"Privacy"}),f.jsx(ge,{to:o?`/org/${o}/terms`:"/terms",className:"text-muted-foreground hover:text-primary transition-colors",children:"Terms"})]})]}),f.jsxs("div",{children:[f.jsx("h4",{className:"font-display text-lg text-foreground mb-4",children:"CONTACT"}),f.jsxs("div",{className:"flex flex-col gap-2 text-muted-foreground",children:[f.jsx("a",{href:`mailto:${(e==null?void 0:e.contact_email)||"[email protected]"}`,className:"hover:text-primary transition-colors",children:(e==null?void 0:e.contact_email)||"[email protected]"}),f.jsx("a",{href:`tel:${(e==null?void 0:e.contact_phone)||"801-618-9937"}`,className:"hover:text-primary transition-colors",children:(e==null?void 0:e.contact_phone)||"(801) 618-9937"})]})]})]}),f.jsxs("div",{className:"border-t border-border mt-8 pt-8 text-center text-muted-foreground",children:[f.jsxs("p",{children:["© ",new Date().getFullYear()," ",e?c:"Beyond Pro LLC",". All rights reserved."]}),e&&f.jsx("p",{className:"text-xs mt-2 opacity-60",children:"Powered by Beyond Pro Registration"})]})]})})}function $4(){let e=sessionStorage.getItem("pv_session_id");return e||(e=crypto.randomUUID(),sessionStorage.setItem("pv_session_id",e)),e}
494function F4(){const e=navigator.userAgent;return/tablet|ipad|playbook|silk/i.test(e)?"tablet":/mobile|iphone|ipod|android|blackberry|opera mini|iemobile/i.test(e)?"mobile":"desktop"}function U4(){const e=document.referrer;if(!e)return"Direct";try{const t=new URL(e).hostname;return t===window.location.hostname?"Direct":t}catch{return"Direct"}}function B4(){const{branding:e}=Es(),t=v.useRef("");return v.useEffect(()=>{const r=e==null?void 0:e.id;if(!r)return;const n=window.location.pathname,o=`${r}:${n}`;if(t.current===o)return;t.current=o;try{const i=`pv_seen:${o}`;if(sessionStorage.getItem(i))return;sessionStorage.setItem(i,"1")}catch{}const s={organization_id:r,page_path:n,referrer_source:U4(),device_type:F4(),session_id:$4()};xe.from("page_views").insert(s).then(({error:i})=>{i&&console.warn("PageViewTracker insert error:",i.message)})},[e==null?void 0:e.id,window.location.pathname]),null}const OC={capitol5:"1025441663303589"};function RC(e){if(!(typeof window>"u")){if(window.fbq){try{window.fbq("init",e)}catch{}return}if(function(t,r,n,o){if(t.fbq)return;const s=t.fbq=function(){s.callMethod?s.callMethod.apply(s,arguments):s.queue.push(arguments)};t._fbq||(t._fbq=s),s.push=s,s.loaded=!0,s.version="2.0",s.queue=[];const i=r.createElement(n);i.async=!0,i.src=o;const a=r.getElementsByTagName(n)[0];a.parentNode.insertBefore(i,a)}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js"),window.fbq("init",e),!document.getElementById(`fb-pixel-noscript-${e}`)){const t=document.createElement("noscript");t.id=`fb-pixel-noscript-${e}`,t.innerHTML=`<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=${e}&ev=PageView&noscript=1" />`,document.body.appendChild(t)}}}function k6(e){var i;if(typeof window>"u")return;const{orgSlug:t,value:r,currency:n="USD",dedupeKey:o}=e,s=t?OC[t]:void 0;if(s){if(o){const a=`fb_purchase_${s}_${o}`;try{if(sessionStorage.getItem(a))return;sessionStorage.setItem(a,"1")}catch{}}RC(s);try{(i=window.fbq)==null||i.call(window,"track","Purchase",{value:Number(r??0),currency:n})}catch{}}}function z4(){var r,n;const{orgSlug:e}=$l();let t;try{t=(n=(r=Es())==null?void 0:r.branding)==null?void 0:n.slug}catch{}return e||t}function V4(){const e=kt(),t=z4(),r=t?OC[t]:void 0;return v.useEffect(()=>{r&&RC(r)},[r]),v.useEffect(()=>{if(r&&!(typeof window>"u"||!window.fbq))try{window.fbq("track","PageView")}catch{}},[r,e.pathname]),null}function W4({children:e,showHeader:t=!0,showFooter:r=!0,eventId:n,userEmail:o}){const{setOrganizationFromEvent:s,setOrganizationFromRegistrations:i,branding:a,contentColors:l}=Es();v.useEffect(()=>{n?s(n):o&&i(o)},[n,o,s,i]);const c=a!=null&&a.font_body?{fontFamily:`"${a.font_body}", sans-serif`}:void 0,u=l?{backgroundColor:l.background,color:l.foreground,"--org-content-fg":l.foreground,"--org-content-muted":l.muted,"--org-card-bg":l.cardBg,"--org-card-fg":l.cardFg}:{};return f.jsxs("div",{className:"min-h-screen flex flex-col",style:c,children:[f.jsx(B4,{}),f.jsx(V4,{}),f.jsx(L4,{}),t&&f.jsx(D4,{}),t&&f.jsx("div",{className:"pt-16 md:pt-20"}),f.jsx("main",{className:`flex-1 ${a?"org-branded-content":""}`,style:u,children:e}),r&&f.jsx(M4,{})]})}const jC=v.forwardRef(({className:e,type:t,lightFormColor:r,...n},o)=>f.jsx("input",{type:t,className:pe("flex h-10 w-full rounded-md border px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","border-border border-[1.5px] bg-input text-foreground placeholder:text-muted-foreground file:text-foreground",e),ref:o,...n}));jC.displayName="Input";var H4="Label",AC=v.forwardRef((e,t)=>f.jsx(de.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));AC.displayName=H4;var NC=AC;const q4=Od("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Jp=v.forwardRef(({className:e,...t},r)=>f.jsx(NC,{ref:r,className:pe(q4(),e),...t}));Jp.displayName=NC.displayName;function E0(e,[t,r]){return Math.min(r,Math.max(t,e))}function G4(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var K4=[" ","Enter","ArrowUp","ArrowDown"],Q4=[" ","Enter"],ms="Select",[Yd,Jd,Y4]=Cd(ms),[na,O6]=Cn(ms,[Y4,Yi]),Xd=Yi(),[J4,To]=na(ms),[X4,Z4]=na(ms),IC=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:p,required:h,form:g}=e,m=Xd(t),[b,w]=v.useState(null),[y,_]=v.useState(null),[x,E]=v.useState(!1),S=Lg(c),[C,P]=fs({prop:n,defaultProp:o??!1,onChange:s,caller:ms}),[I,j]=fs({prop:i,defaultProp:a,onChange:l,caller:ms}),$=v.useRef(null),M=b?g||!!b.closest("form"):!0,[W,U]=v.useState(new Set),oe=Array.from(W).map(q=>q.props.value).join(";");return f.jsx(kg,{...m,children:f.jsxs(J4,{required:h,scope:t,trigger:b,onTriggerChange:w,valueNode:y,onValueNodeChange:_,valueNodeHasChildren:x,onValueNodeHasChildrenChange:E,contentId:Qr(),value:I,onValueChange:j,open:C,onOpenChange:P,dir:S,triggerPointerDownPosRef:$,disabled:p,children:[f.jsx(Yd.Provider,{scope:t,children:f.jsx(X4,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(q=>{U(re=>new Set(re).add(q))},[]),onNativeOptionRemove:v.useCallback(q=>{U(re=>{const R=new Set(re);return R.delete(q),R})},[]),children:r})}),M?f.jsxs(sP,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:d,value:I,onChange:q=>j(q.target.value),disabled:p,form:g,children:[I===void 0?f.jsx("option",{value:""}):null,Array.from(W)]},oe):null]})})};IC.displayName=ms;var LC="SelectTrigger",DC=v.forwardRef((e,t)=>
vendor: 16,828 bytes, line 494
494{const{__scopeSelect:r,disabled:n=!1,...o}=e,s=Xd(r),i=To(LC,r),a=i.disabled||n,l=ke(t,i.onTriggerChange),c=Jd(r),u=v.useRef("touch"),[d,p,h]=aP(m=>{const b=c().filter(_=>!_.disabled),w=b.find(_=>_.value===i.value),y=lP(b,m,w);y!==void 0&&i.onValueChange(y.value)}),g=m=>{a||(i.onOpenChange(!0),h()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return f.jsx(Og,{asChild:!0,...s,children:f.jsx(de.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":iP(i.value)?"":void 0,...o,ref:l,onClick:H(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&g(m)}),onPointerDown:H(o.onPointerDown,m=>{u.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:H(o.onKeyDown,m=>{const b=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&p(m.key),!(b&&m.key===" ")&&K4.includes(m.key)&&(g(),m.preventDefault())})})})});DC.displayName=LC;var MC="SelectValue",$C=v.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:s,placeholder:i="",...a}=e,l=To(MC,r),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,d=ke(t,l.onValueNodeChange);return dt(()=>{c(u)},[c,u]),f.jsx(de.span,{...a,ref:d,style:{pointerEvents:"none"},children:iP(l.value)?f.jsx(f.Fragment,{children:i}):s})});$C.displayName=MC;var e3="SelectIcon",FC=v.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return f.jsx(de.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});FC.displayName=e3;var t3="SelectPortal",UC=e=>f.jsx(Ll,{asChild:!0,...e});UC.displayName=t3;var gs="SelectContent",BC=v.forwardRef((e,t)=>{const r=To(gs,e.__scopeSelect),[n,o]=v.useState();if(dt(()=>{o(new DocumentFragment)},[]),!r.open){const s=n;return s?kr.createPortal(f.jsx(zC,{scope:e.__scopeSelect,children:f.jsx(Yd.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),s):null}return f.jsx(VC,{...e,ref:t})});BC.displayName=gs;var vr=10,[zC,Co]=na(gs),r3="SelectContentImpl",n3=ds("SelectContent.RemoveScroll"),VC=v.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:b,...w}=e,y=To(gs,r),[_,x]=v.useState(null),[E,S]=v.useState(null),C=ke(t,V=>x(V)),[P,I]=v.useState(null),[j,$]=v.useState(null),M=Jd(r),[W,U]=v.useState(!1),oe=v.useRef(!1);v.useEffect(()=>{if(_)return Mg(_)},[_]),Dg();const q=v.useCallback(V=>{const[Se,...Te]=M().map(Ce=>Ce.ref.current),[we]=Te.slice(-1),be=document.activeElement;for(const Ce of V)if(Ce===be||(Ce==null||Ce.scrollIntoView({block:"nearest"}),Ce===Se&&E&&(E.scrollTop=0),Ce===we&&E&&(E.scrollTop=E.scrollHeight),Ce==null||Ce.focus(),document.activeElement!==be))return},[M,E]),re=v.useCallback(()=>q([P,_]),[q,P,_]);v.useEffect(()=>{W&&re()},[W,re]);const{onOpenChange:R,triggerPointerDownPosRef:k}=y;v.useEffect(()=>{if(_){let V={x:0,y:0};const Se=we=>{var be,Ce;V={x:Math.abs(Math.round(we.pageX)-(((be=k.current)==null?void 0:be.x)??0)),y:Math.abs(Math.round(we.pageY)-(((Ce=k.current)==null?void 0:Ce.y)??0))}},Te=we=>{V.x<=10&&V.y<=10?we.preventDefault():_.contains(we.target)||R(!1),document.removeEventListener("pointermove",Se),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",Te,{capture:!0})}}},[_,R,k]),v.useEffect(()=>{const V=()=>R(!1);return window.addEventListener("blur",V),window.addEventListener("resize",V),()=>{window.removeEventListener("blur",V),window.removeEventListener("resize",V)}},[R]);const[B,te]=aP(V=>{const Se=M().filter(be=>!be.disabled),Te=Se.find(be=>be.ref.current===document.activeElement),we=lP(Se,V,Te);we&&setTimeout(()=>we.ref.current.focus())}),J=v.useCallback((V,Se,Te)=>{const we=!oe.current&&!Te;(y.value!==void 0&&y.value===Se||we)&&(I(V),we&&(oe.current=!0))},[y.value]),le=v.useCallback(()=>_==null?void 0:_.focus(),[_]),ie=v.useCallback((V,Se,Te)=>{const we=!oe.current&&!Te;(y.value!==void 0&&y.value===Se||we)&&$(V)},[y.value]),je=n==="popper"?Xp:WC,Ae=je===Xp?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:b}:{};return f.jsx(zC,{scope:r,content:_,viewport:E,onViewportChange:S,itemRefCallback:J,selectedItem:P,onItemLeave:le,itemTextRefCallback:ie,focusSelectedItem:re,selectedItemText:j,position:n,isPositioned:W,searchRef:B,children:f.jsx(zd,{as:n3,allowPinchZoom:!0,children:f.jsx(Ud,{asChild:!0,trapped:y.open,onMountAutoFocus:V=>{V.preventDefault()},onUnmountAutoFocus:H(o,V=>{var Se;(Se=y.trigger)==null||Se.focus({preventScroll:!0}),V.preventDefault()}),children:f.jsx(Gi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:V=>V.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:f.jsx(je,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:V=>V.preventDefault(),...w,...Ae,onPlaced:()=>U(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:H(w.onKeyDown,V=>{const Se=V.ctrlKey||V.altKey||V.metaKey;if(V.key==="Tab"&&V.preventDefault(),!Se&&V.key.length===1&&te(V.key),["ArrowUp","ArrowDown","Home","End"].includes(V.key)){let we=M().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(V.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(V.key)){const be=V.target,Ce=we.indexOf(be);we=we.slice(Ce+1)}setTimeout(()=>q(we)),V.preventDefault()}})})})})})})});VC.displayName=r3;var o3="SelectItemAlignedPosition",WC=v.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,s=To(gs,r),i=Co(gs,r),[a,l]=v.useState(null),[c,u]=v.useState(null),d=ke(t,C=>u(C)),p=Jd(r),h=v.useRef(!1),g=v.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:w,focusSelectedItem:y}=i,_=v.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&m&&b&&w){const C=s.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),j=w.getBoundingClientRect();if(s.dir!=="rtl"){const be=j.left-P.left,Ce=I.left-be,ft=C.left-Ce,Xt=C.width+ft,Po=Math.max(Xt,P.width),kn=window.innerWidth-vr,ko=E0(Ce,[vr,Math.max(vr,kn-Po)]);a.style.minWidth=Xt+"px",a.style.left=ko+"px"}else{const be=P.right-j.right,Ce=window.innerWidth-I.right-be,ft=window.innerWidth-C.right-Ce,Xt=C.width+ft,Po=Math.max(Xt,P.width),kn=window.innerWidth-vr,ko=E0(Ce,[vr,Math.max(vr,kn-Po)]);a.style.minWidth=Xt+"px",a.style.right=ko+"px"}const $=p(),M=window.innerHeight-vr*2,W=m.scrollHeight,U=window.getComputedStyle(c),oe=parseInt(U.borderTopWidth,10),q=parseInt(U.paddingTop,10),re=parseInt(U.borderBottomWidth,10),R=parseInt(U.paddingBottom,10),k=oe+q+W+R+re,B=Math.min(b.offsetHeight*5,k),te=window.getComputedStyle(m),J=parseInt(te.paddingTop,10),le=parseInt(te.paddingBottom,10),ie=C.top+C.height/2-vr,je=M-ie,Ae=b.offsetHeight/2,V=b.offsetTop+Ae,Se=oe+q+V,Te=k-Se;if(Se<=ie){const be=$.length>0&&b===$[$.length-1].ref.current;a.style.bottom="0px";const Ce=c.clientHeight-m.offsetTop-m.offsetHeight,ft=Math.max(je,Ae+(be?le:0)+Ce+re),Xt=Se+ft;a.style.height=Xt+"px"}else{const be=$.length>0&&b===$[0].ref.current;a.style.top="0px";const ft=Math.max(ie,oe+m.offsetTop+(be?J:0)+Ae)+Te;a.style.height=ft+"px",m.scrollTop=Se-ie+m.offsetTop}a.style.margin=`${vr}px 0`,a.style.minHeight=B+"px",a.style.maxHeight=M+"px",n==null||n(),requestAnimationFrame(()=>h.current=!0)}},[p,s.trigger,s.valueNode,a,c,m,b,w,s.dir,n]);dt(()=>_(),[_]);const[x,E]=v.useState();dt(()=>{c&&E(window.getComputedStyle(c).zIndex)},[c]);const S=v.useCallback(C=>{C&&g.current===!0&&(_(),y==null||y(),g.current=!1)},[_,y]);return f.jsx(i3,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:S,children:f.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:f.jsx(de.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});WC.displayName=o3;var s3="SelectPopperPosition",Xp=v.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=vr,...s}=e,i=Xd(r);return f.jsx(Rg,{...i,...s,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Xp.displayName=s3;var[i3,tv]=na(gs,{}),Zp="SelectViewport",HC=v.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,s=Co(Zp,r),i=tv(Zp,r),a=ke(t,s.onViewportChange),l=v.useRef(0);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),f.jsx(Yd.Slot,{scope:r,children:f.jsx(de.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:H(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&d){const h=Math.abs(l.current-u.scrollTop);if(h>0){const g=window.innerHeight-vr*2,m=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),w=Math.max(m,b);if(w<g){const y=w+h,_=Math.min(g,y),x=y-_;d.style.height=_+"px",d.style.bottom==="0px"&&(u.scrollTop=x>0?x:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});HC.displayName=Zp;var qC="SelectGroup",[a3,l3]=na(qC),GC=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Qr();return f.jsx(a3,{scope:r,id:o,children:f.jsx(de.div,{role:"group","aria-labelledby":o,...n,ref:t})})});GC.displayName=qC;var KC="SelectLabel",QC=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=l3(KC,r);return f.jsx(de.div,{id:o.id,...n,ref:t})});QC.displayName=KC;var ed="SelectItem",[c3,YC]=na(ed),JC=v.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:s,...i}=e,a=To(ed,r),l=Co(ed,r),c=a.value===n,[u,d]=v.useState(s??""),[p,h]=v.useState(!1),g=ke(t,y=>{var _;return(_=l.itemRefCallback)==null?void 0:_.call(l,y,n,o)}),m=Qr(),b=v.useRef("touch"),w=()=>{o||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsx(c3,{scope:r,value:n,disabled:o,textId:m,isSelected:c,onItemTextChange:v.useCallback(y=>{d(_=>_||((y==null?void 0:y.textContent)??"").trim())},[]),children:f.jsx(Yd.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:f.jsx(de.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:g,onFocus:H(i.onFocus,()=>h(!0)),onBlur:H(i.onBlur,()=>h(!1)),onClick:H(i.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:H(i.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:H(i.onPointerDown,y=>{b.current=y.pointerType}),onPointerMove:H(i.onPointerMove,y=>{var _;b.current=y.pointerType,o?(_=l.onItemLeave)==null||_.call(l):b.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:H(i.onPointerLeave,y=>{var _;y.currentTarget===document.activeElement&&((_=l.onItemLeave)==null||_.call(l))}),onKeyDown:H(i.onKeyDown,y=>{var x;((x=l.searchRef)==null?void 0:x.current)!==""&&y.key===" "||(Q4.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});JC.displayName=ed;var Aa="SelectItemText",XC=v.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...s}=e,i=To(Aa,r),a=Co(Aa,r),l=YC(Aa,r),c=Z4(Aa,r),[u,d]=v.useState(null),p=ke(t,w=>d(w),l.onItemTextChange,w=>{var y;return(y=a.itemTextRefCallback)==null?void 0:y.call(a,w,l.value,l.disabled)}),h=u==null?void 0:u.textContent,g=v.useMemo(()=>f.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=c;return dt(()=>(m(g),()=>b(g)),[m,b,g]),f.jsxs(f.Fragment,{children:[f.jsx(de.span,{id:l.textId,...s,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?kr.createPortal(s.children,i.valueNode):null]})});XC.displayName=Aa;var ZC="SelectItemIndicator",eP=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return YC(ZC,r).isSelected?f.jsx(de.span,{"aria-hidden":!0,...n,ref:t}):null});eP.displayName=ZC;var em="SelectScrollUpButton",tP=v.forwardRef((e,t)=>{const r=Co(em,e.__scopeSelect),n=tv(em,e.__scopeSelect),[o,s]=v.useState(!1),i=ke(t,n.onScrollButtonChange);return dt(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?f.jsx(nP,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});tP.displayName=em;var tm="SelectScrollDownButton",rP=v.forwardRef((e,t)=>{const r=Co(tm,e.__scopeSelect),n=tv(tm,e.__scopeSelect),[o,s]=v.useState(!1),i=ke(t,n.onScrollButtonChange);return dt(()=>{if(r.viewport&&r.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?f.jsx(nP,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});rP.displayName=tm;var nP=v.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,s=Co("SelectScrollButton",r),i=v.useRef(null),a=Jd(r),l=v.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return v.useEffect(()=>()=>l(),[l]),dt(()=>{var u;const c=a().find(d=>d.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),f.jsx(de.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:H(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:H(o.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:H(o.onPointerLeave,()=>{l()})})}),u3="SelectSeparator",oP=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return f.jsx(de.div,{"aria-hidden":!0,...n,ref:t})});oP.displayName=u3;var rm="SelectArrow",d3=v.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Xd(r),s=To(rm,r),i=Co(rm,r);return s.open&&i.position==="popper"?f.jsx(jg,{...o,...n,ref:t}):null});d3.displayName=rm;var f3="SelectBubbleInput",sP=v.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=v.useRef(null),s=ke(n,o),i=G4(t);return v.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),f.jsx(de.select,{...r,style:{...fS,...r.style},ref:s,defaultValue:t})});sP.displayName=f3;function iP(e){return e===""||e===void 0}function aP(e){const t=Bt(e),r=v.useRef(""),n=v.useRef(0),o=v.useCallback(i=>{const a=r.current+i;t(a),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=v.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,s]}function lP(e,t,r){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=r?e.indexOf(r):-1;let i=h3(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function h3(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var p3=IC,cP=DC,m3=$C,g3=FC,v3=UC,uP=BC,y3=HC,w3=GC,dP=QC,fP=JC,b3=XC,_3=eP,hP=tP,pP=rP,mP=oP;const x3=p3,R6=w3,E3=m3,gP=v.forwardRef(({className:e,children:t,lightFormColor:r,...n},o)=>f.jsxs(cP,{ref:o,className:pe("flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm r
494ing-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","border-border bg-input text-foreground",e),...n,children:[t,f.jsx(g3,{asChild:!0,children:f.jsx(IS,{className:"h-4 w-4 opacity-50"})})]}));gP.displayName=cP.displayName;const vP=v.forwardRef(({className:e,...t},r)=>f.jsx(hP,{ref:r,className:pe("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(yL,{className:"h-4 w-4"})}));vP.displayName=hP.displayName;const yP=v.forwardRef(({className:e,...t},r)=>f.jsx(pP,{ref:r,className:pe("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsx(IS,{className:"h-4 w-4"})}));yP.displayName=pP.displayName;const wP=v.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>f.jsx(v3,{children:f.jsxs(uP,{ref:o,className:pe("relative z-[1200] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[f.jsx(vP,{}),f.jsx(y3,{className:pe("p-1",r==="popper"&&"max-h-[60vh] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),f.jsx(yP,{})]})}));wP.displayName=uP.displayName;const S3=v.forwardRef(({className:e,...t},r)=>f.jsx(dP,{ref:r,className:pe("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));S3.displayName=dP.displayName;const bP=v.forwardRef(({className:e,children:t,...r},n)=>f.jsxs(fP,{ref:n,className:pe("relative flex w-full cursor-default select-none items-center rounded-sm py-2.5 sm:py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...r,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(_3,{children:f.jsx(NS,{className:"h-4 w-4"})})}),f.jsx(b3,{children:t})]}));bP.displayName=fP.displayName;const T3=v.forwardRef(({className:e,...t},r)=>f.jsx(mP,{ref:r,className:pe("-mx-1 my-1 h-px bg-muted",e),...t}));T3.displayName=mP.displayName;function C3({onSuccess:e}){const{orgSlug:t}=$l(),[r,n]=v.useState(""),[o,s]=v.useState(""),[i,a]=v.useState(!1),{setOrganizationFromSlug:l}=Es();v.useEffect(()=>{t&&l(t)},[t,l]);const{data:c}=bn({queryKey:["staging-org-public",t],queryFn:async()=>{const{data:g}=await xe.from("organizations_public").select("id, slug, name, favicon_url, logo_url, primary_color").eq("slug",t).eq("is_active",!0).maybeSingle();return g||null},enabled:!!t}),{data:u,isLoading:d}=bn({queryKey:["staging-pos-users",t],queryFn:async()=>{if(!(c!=null&&c.id))return[];const{data:g,error:m}=await xe.from("kiosk_pos_users").select("id, display_name").eq("organization_id",c.id);if(m)throw m;return g||[]},enabled:!!(c!=null&&c.id)}),p=async()=>{if(!r||!o){Va({title:"Enter your name and PIN",variant:"destructive"});return}a(!0);try{const{data:g,error:m}=await xe.functions.invoke("kiosk-auth",{body:{org_slug:t,display_name:r,pin:o}});if(m||!(g!=null&&g.success)){Va({title:"Login Failed",description:(g==null?void 0:g.error)||"Invalid PIN. Please try again.",variant:"destructive"}),s("");return}sessionStorage.setItem("kiosk_session",JSON.stringify({kiosk_user:g.kiosk_user,organization:g.organization,staff_token:g.staff_token??null})),e()}catch{Va({title:"Login error",description:"Please try again.",variant:"destructive"})}finally{a(!1)}},h=(c==null?void 0:c.favicon_url)||(c==null?void 0:c.logo_url);return f.jsx(W4,{showFooter:!1,children:f.jsx("div",{className:"min-h-screen flex items-center justify-center p-4",children:f.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[f.jsxs("div",{className:"text-center space-y-3",children:[h?f.jsx("img",{src:h,alt:(c==null?void 0:c.name)||"Organization",className:"h-20 w-20 mx-auto rounded-xl object-contain bg-background shadow-md border border-border p-1"}):f.jsx(_L,{className:"h-12 w-12 mx-auto text-primary"}),f.jsx("h1",{className:"font-display text-3xl tracking-wider",children:"STAGING LOGIN"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign in with your staff name and PIN"})]}),f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx(Jp,{children:"Staff Name"}),f.jsxs(x3,{value:r,onValueChange:n,children:[f.jsx(gP,{className:"h-12 text-base",children:f.jsx(E3,{placeholder:d?"Loading...":"Select your name"})}),f.jsx(wP,{children:(u||[]).map(g=>f.jsx(bP,{value:g.display_name,children:g.display_name},g.id))})]})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Jp,{children:"PIN"}),f.jsx(jC,{type:"password",inputMode:"numeric",pattern:"[0-9]*",placeholder:"Enter your PIN",value:o,onChange:g=>s(g.target.value),onKeyDown:g=>g.key==="Enter"&&p(),className:"h-12 text-center text-2xl tracking-[0.5em]",maxLength:8})]}),f.jsxs(lt,{onClick:p,disabled:i||!r||!o,className:"w-full h-12 text-base",children:[i?f.jsx(fn,{className:"h-5 w-5 animate-spin mr-2"}):null,"Sign In to Staging"]})]})]})})})}function P3({children:e}){const{orgSlug:t}=$l(),{user:r,isAdmin:n,isSuperAdmin:o,loading:s,isAdminLoading:i}=Tn(),[,a]=v.useState(0),l=TC(t);return l!=null&&l.staff_token?f.jsx(f.Fragment,{children:e}):s||i?f.jsx("div",{className:"min-h-screen flex items-center justify-center",children:f.jsx(fn,{className:"h-8 w-8 animate-spin text-primary"})}):r&&(n||o)?f.jsx(f.Fragment,{children:e}):f.jsx(C3,{onSuccess:()=>a(c=>c+1)})}var Zd="Dialog",[_P,j6]=Cn(Zd),[k3,Ir]=_P(Zd),xP=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=v.useRef(null),l=v.useRef(null),[c,u]=fs({prop:n,defaultProp:o??!1,onChange:s,caller:Zd});return f.jsx(k3,{scope:t,triggerRef:a,contentRef:l,contentId:Qr(),titleId:Qr(),descriptionId:Qr(
vendor: 4,649 bytes, lines 494-498
494),open:c,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(d=>!d),[u]),modal:i,children:r})};xP.displayName=Zd;var EP="DialogTrigger",SP=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ir(EP,r),s=ke(t,o.triggerRef);return f.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ov(o.open),...n,ref:s,onClick:H(e.onClick,o.onOpenToggle)})});SP.displayName=EP;var rv="DialogPortal",[O3,TP]=_P(rv,{forceMount:void 0}),CP=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,s=Ir(rv,t);return f.jsx(O3,{scope:t,forceMount:r,children:v.Children.map(n,i=>f.jsx(Xr,{present:r||s.open,children:f.jsx(Ll,{asChild:!0,container:o,children:i})}))})};CP.displayName=rv;var td="DialogOverlay",PP=v.forwardRef((e,t)=>{const r=TP(td,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=Ir(td,e.__scopeDialog);return s.modal?f.jsx(Xr,{present:n||s.open,children:f.jsx(j3,{...o,ref:t})}):null});PP.displayName=td;var R3=ds("DialogOverlay.RemoveScroll"),j3=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ir(td,r);return f.jsx(zd,{as:R3,allowPinchZoom:!0,shards:[o.contentRef],children:f.jsx(de.div,{"data-state":ov(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),vs="DialogContent",kP=v.forwardRef((e,t)=>{const r=TP(vs,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,s=Ir(vs,e.__scopeDialog);return f.jsx(Xr,{present:n||s.open,children:s.modal?f.jsx(A3,{...o,ref:t}):f.jsx(N3,{...o,ref:t})})});kP.displayName=vs;var A3=v.forwardRef((e,t)=>{const r=Ir(vs,e.__scopeDialog),n=v.useRef(null),o=ke(t,r.contentRef,n);return v.useEffect(()=>{const s=n.current;if(s)return Mg(s)},[]),f.jsx(OP,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:H(e.onFocusOutside,s=>s.preventDefault())})}),N3=v.forwardRef((e,t)=>{const r=Ir(vs,e.__scopeDialog),n=v.useRef(!1),o=v.useRef(!1);return f.jsx(OP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=r.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),OP=v.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=Ir(vs,r),l=v.useRef(null),c=ke(t,l);return Dg(),f.jsxs(f.Fragment,{children:[f.jsx(Ud,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:f.jsx(Gi,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ov(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(I3,{titleId:a.titleId}),f.jsx(D3,{contentRef:l,descriptionId:a.descriptionId})]})]})}),nv="DialogTitle",RP=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ir(nv,r);return f.jsx(de.h2,{id:o.titleId,...n,ref:t})});RP.displayName=nv;var jP="DialogDescription",AP=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ir(jP,r);return f.jsx(de.p,{id:o.descriptionId,...n,ref:t})});AP.displayName=jP;var NP="DialogClose",IP=v.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ir(NP,r);return f.jsx(de.button,{type:"button",...n,ref:t,onClick:H(e.onClick,()=>o.onOpenChange(!1))})});IP.displayName=NP;function ov(e){return e?"open":"closed"}var LP="DialogTitleWarning",[A6,DP]=xI(LP,{contentName:vs,titleName:nv,docsSlug:"dialog"}),I3=({titleId:e})=>{const t=DP(LP),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
495
496If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
497
498For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},L3="DialogDescriptionWarning",D3=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${DP(L3).contentName}}.`;return v.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");
498t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},M3=xP,$3=SP,F3=CP,MP=PP,$P=kP,FP=RP,UP=AP,U3=IP;const B3=M3,N6=$3,z3=F3,BP=v.forwardRef(({className:e,...t},r)=>f.jsx(MP,{ref:r,className:pe("fixed inset-0 z-[1100] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));BP.displayName=MP.displayName;const zP=v.forwardRef(({className:e,children:t,...r},n)=>f.jsxs(z3,{children:[f.jsx(BP,{}),f.jsxs($P,{ref:n,className:pe("fixed left-[50%] top-[50%] z-[1100] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,f.jsxs(U3,{className:"absolute right-4 top-4 roun
498ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[f.jsx(Rd,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));zP.displayName=$P.displayName;const VP=({className:e,...t})=>f.jsx("div",{className:pe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});VP.displayName="DialogHeader";const V3=({className:e,...t})=>f.jsx("div",{className:pe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});V3.displayName="DialogFooter";const WP=v.forwardRef(({className:e,...t},r)=>f.jsx(FP,{ref:r,className:pe("text-lg font-semibold leading-none tracking-tight",e),...t}));WP.displayName=FP.displayName;const HP=v.forwardRef(({className:e,...t},r)=>f.jsx(UP,{ref:r,className:pe("text-sm text-muted-foreground",e),...t}));HP.displayName=UP.displayName;const W3=Od("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function H3({className:e,variant:t,...r}){return f.jsx("div",{className:pe(W3({variant:t}),e),...r})}function q3(e){if(!e)return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(e).trim());if(t)return new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));const r=new Date(e);return isNaN(r.getTime())?null:r}const nm="bp_cancellation_snooze";function G3(e,t){try{const r=sessionStorage.getItem(nm);return r?JSON.parse(r).includes(`${t}:${e}`):!1}catch{return!1}}function K3(e,t){try{const r=sessionStorage.getItem(nm),n=r?JSON.parse(r):[],o=`${t}:${e}`;n.includes(o)||n.push(o),sessionStorage.setItem(nm,JSON.stringify(n))}catch{}}const Ha=e=>`$${Number(e||0).toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`;function S0(e){return e.coupon_mode==="offer"?e.coupon_discount_type==="percent"?`${e.coupon_discount_value??0}% off`:e.coupon_discount_type==="free_item"?e.coupon_offer_description||"Free item":e.coupon_discount_value?`${Ha(Number(e.coupon_discount_value))} off`:e.coupon_offer_description||e.coupon_offer_key||"Coupon":`${Ha(e.coupon_amount??e.amount)} off a future registration`}function Q3({organizationId:e}){const{user:t}=Tn(),r=yd(),[n,o]=v.useState(!0),[s,i]=v.useState(null),[a,l]=v.useState({}),{data:c=[]}=bn({queryKey:["my-cancellation-notices",t==null?void 0:t.id,e??"all"],enabled:!!t,staleTime:6e4,refetchOnMount:"always",refetchOnWindowFocus:!0,queryFn:async()=>{const{data:w,error:y}=await xe.rpc("get_my_cancellation_notices");if(y)throw y;const _=w??[];return e?_.filter(x=>x.organization_id===e):_}}),u=v.useMemo(()=>t?c.filter(y=>!G3(y.notice_id,t.id))[0]??null:null,[c,t]),d=v.useMemo(()=>u?c.filter(w=>w.notice_id===u.notice_id):[],[c,u]),p=Ca({mutationFn:async({registration_id:w,choice:y})=>{var E,S;const{data:_,error:x}=await xe.functions.invoke("cancellation-notice-choose",{body:{registration_id:w,choice:y}});if(x){let C=x.message;try{const P=await((S=(E=x.context)==null?void 0:E.json)==null?void 0:S.call(E));P!=null&&P.error&&(C=typeof P.error=="string"?P.error:C)}catch{}throw new Error(C)}if(_!=null&&_.error)throw new Error(String(_.error));return _}});if(!t||!u||d.length===0)return null;const h=u.transfer_event_date?q3(u.transfer_event_date):null,g=d.every(w=>a[w.registration_id]),m=async(w,y)=>{i(`${w.registration_id}:${y}`);try{const _=await p.mutateAsync({registration_id:w.registration_id,choice:y}),x=_==null?void 0:_.coupon_code,E=y==="coupon"?`Coupon ${x??""} (${S0(w)}) is in your coupon wallet`.replace("  "," "):y==="transfer"?`Moved to ${u.transfer_event_name??"the next race"}`:y==="credit"?`${Ha(w.amount)} added to your account credit`:"Refund started — it can take a few days to land on your card";l(S=>({...S,[w.registration_id]:{choice:y,message:E}})),sn.success(E),r.invalidateQueries({queryKey:["my-cancellation-notices"]}),r.invalidateQueries({queryKey:["rider-wallet-balance"]}),r.invalidateQueries({queryKey:["rider-schedule"]})}catch(_){sn.error((_==null?void 0:_.message)||"Something went wrong — please try again.")}finally{i(null)}},b=()=>{!g&&t&&K3(u.notice_id,t.id),o(!1)};return f.jsx(B3,{open:n,onOpenChange:w=>w?o(!0):b(),children:f.jsxs(zP,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[f.jsxs(VP,{children:[f.jsxs(WP,{className:"flex items-center gap-2 text-xl",children:[f.jsx(xL,{className:"h-5 w-5 text-primary"}),u.headline||`${u.event_name} was cancelled`]}),u.body&&f.jsx(HP,{className:"whitespace-pre-wrap text-base text-foreground
498/80",children:u.body})]}),f.jsx("div",{className:"space-y-4",children:d.map(w=>{const y=a[w.registration_id],_=w.allow_transfer&&!!w.transfer_event_id&&!w.is_season_pass;return f.jsxs("div",{className:"rounded-lg border border-border p-4 space-y-3",children:[f.jsxs("div",{className:"flex items-center justify-between gap-3",children:[f.jsxs("div",{children:[f.jsx("p",{className:"font-semibold text-foreground",children:w.rider_name||"Rider"}),f.jsxs("p",{className:"text-xs text-muted-foreground",children:[w.event_name,w.is_season_pass&&" · Season pass"]})]}),f.jsx(H3,{variant:"outline",children:Ha(w.amount)})]}),y?f.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-primary/10 p-3 text-sm text-foreground",children:[f.jsx(wL,{className:"h-4 w-4 text-primary shrink-0"}),y.message]}):f.jsxs("div",{className:"grid gap-2 sm:grid-cols-3",children:[_&&f.jsxs(lt,{className:"h-auto py-3 flex-col items-start gap-1 text-left sm:col-span-3",disabled:!!s,onClick:()=>m(w,"transfer"),children:[s===`${w.registration_id}:transfer`?f.jsx(fn,{className:"h-4 w-4 animate-spin"}):f.jsxs("span",{className:"flex items-center gap-2 font-semibold",children:[f.jsx(gL,{className:"h-4 w-4"}),"Move me to ",w.transfer_event_name??"the next race"]}),f.jsxs("span",{className:"text-xs font-normal opacity-90",children:["Same classes, nothing more to pay",h?` · ${h.toLocaleDateString()}`:""]})]}),w.allow_credit&&f.jsxs(lt,{variant:"outline",className:"h-auto py-3 flex-col items-start gap-1 text-left",disabled:!!s,onClick:()=>m(w,"credit"),children:[s===`${w.registration_id}:credit`?f.jsx(fn,{className:"h-4 w-4 animate-spin"}):f.jsxs("span",{className:"flex items-center gap-2 font-semibold",children:[f.jsx(TL,{className:"h-4 w-4"}),"Credit my account"]}),f.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:[Ha(w.amount)," to use on a future race"]})]}),w.allow_coupon&&f.jsxs(lt,{variant:"outline",className:"h-auto py-3 flex-col items-start gap-1 text-left",disabled:!!s,onClick:()=>m(w,"coupon"),children:[s===`${w.registration_id}:coupon`?f.jsx(fn,{className:"h-4 w-4 animate-spin"}):f.jsxs("span",{className:"flex items-center gap-2 font-semibold",children:[f.jsx(EL,{className:"h-4 w-4"}),"Send me a coupon"]}),f.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:[S0(w),w.coupon_mode==="offer"&&w.coupon_fine_print?` · ${w.coupon_fine_print}`:""]})]}),w.allow_refund&&f.jsxs(lt,{variant:"outline",className:"h-auto py-3 flex-col items-start gap-1 text-left",disabled:!!s,onClick:()=>m(w,"refund"),children:[s===`${w.registration_id}:refund`?f.jsx(fn,{className:"h-4 w-4 animate-spin"}):f.jsxs("span",{className:"flex items-center gap-2 font-semibold",children:[f.jsx(SL,{className:"h-4 w-4"}),"Refund my entry"]}),f.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"Back to your card, less processing fees"})]}),w.transfer_only&&_&&f.jsx("p",{className:"text-xs text-muted-foreground sm:col-span-3",children:"This entry was comped or paid with a coupon, so it can only be moved to another race — no refund or account credit."}),!_&&!w.allow_credit&&!w.allow_refund&&!w.allow_coupon&&f.jsx("p",{className:"text-sm text-muted-foreground sm:col-span-3",children:w.transfer_only?"This entry was comped or paid with a coupon. Contact the organizer to move it to another race.":"The organizer hasn't published options for this entry yet."})]})]},w.registration_id)})}),f.jsx("div",{className:"flex justify-end pt-2",children:f.jsx(lt,{variant:"ghost",onClick:b,children:g?"Done":"Remind me later"})})]})})}const Y3=["/admin","/super-admin","/timing","/kiosk","/staging","/overlay","/volunteers","/auth","/login","/reset-password","/forgot-password"];function J3(){const{pathname:e}=kt(),t=e.toLowerCase();return t.startsWith("/admin")||t.startsWith("/super-admin")||Y3.some(r=>t.includes(r))||t.endsWith("/account")||t.endsWith("/my-registrations")?null:f.jsx(Q3,{})}function X3(){const{orgSlug:e}=$l(),{pathname:t,search:r,hash:n}=kt(),o=t.replace(/^\/timing\/[^/]+/,"");return f.jsx(Wa,{to:`/org/${e}/timing${o}${r}${n}`,replace:!0})}const Z3=D(()=>L(()=>import("./Landing-Nb59b7pH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))),ez=D(()=>L(()=>import("./ShortLinkRedirect-DhSMq_T_.js"),[])),tz=D(()=>L(()=>import("./ClassChangeConfirmation-DsgSriUE.js"),__vite__mapDeps([20,21,22,23,24,25,26]))),rz=D(()=>L(()=>import("./Organizations-3O5uodF2.js"),__vite__mapDeps([27,14,15,16,17,3,18]))),nz=D(()=>L(()=>import("./Tracks-CO_1Th6p.js"),__vite__mapDeps([28,29,19,30,31,3,32,33,34,35,36,37,25,38,39]))),oz=D(()=>L(()=>import("./TrackDetail-BsXsF6hp.js"),__vite__mapDeps([40,41,29,19,30,31,3,32,33,34,35,36,37,38,42,25,39,11,43,44]))),sz=D(()=>L(()=>import("./Auth-BDD1OEYg.js"),__vite__mapDeps([45,46,47,48,49,50,51,26,52,53,54]))),iz=D(()=>L(()=>import("./Privacy-CGoDA1gv.js"),__vite__mapDeps([55,56,57]))),az=D(()=>L(()=>import("./Terms-Cf2phBSp.js"),__vite__mapDeps([58,56,59]))),lz=D(()=>L(()=>import("./ForgotPassword-BLOX7Grm.js"),__vite__mapDeps([60,26,50,61,54]))),cz=D(()=>L(()=>import("./ResetPassword-CWEALgUb.js"),__vite__mapDeps([62,51,50,54]))),uz=D(()=>L(()=>import("./Dashboard-BQQ_kwmv.js"),__vite__mapDeps([63,19,64,17,65,66,67,68,69,8,26,10,70,71,72,73,38,74,75,76,3,29,30,31,32,33,34,35,36,25,77,78,79,80,81,82,83,84,7,85,86,87,88,89,52,42,90,91,92,93,41,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,22,109,110,111,112,21,113,53,114,115,116,117,118,119,120,121,122,61,123,39,124,125,6,126,127,2,4,13,128,129,130,131,132,133,134,135,47,48,23,24,136,137,138,139,140,141,5,142,143,144,145,146,147,148,149,150,151,16,152,153,154,155,156,157,44,158,159,160,161,162,163,164,165,166,167,168,169,170,171,50,172,173,174,11,175,176,177,178,179,180,181,182,183,184,185,186,187,188,1,9,51,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221]))),dz=D(()=>L(()=>import("./SuperAdminDashboard-CzYfvLfh.js"),__vite__mapDeps([222,15,16,73,64,121,223,19,38,34,124,137,23,24,6,42,154,116,189,224,217,69,52,225,87,176,226,18,180,67,22,227,228,229,17,194,91,230,90,51,231,164,165,35,94,232,119,233,4,32,127,234,93,70,106,99,68,43,21,177,178,203,26,8,172,196,195,129,182,183,133,214,89,215,48,7,13,9,114,85,10,30,118,169,170,74,151,152,153,156,157,125,179,57,59,192,88,235,236,39,237,1,238,239,240,138,139,174,109,110,3,100,241,53]))),fz=D(()=>L(()=>import("./RegressionTestsPage-Di7HHu0j.js"),__vite__mapDeps([242,243,244,245,165,224,217,23,24,246,61,87,189,34,7,247,248,249,4,12,250,251,114,93,5,130,104,176,48,96,108,33,227,95,100,13]))),hz=D(()=>L(()=>import("./RegistrationFamilyLinkBackfillPage-DWrivYZd.js"),__vite__mapDeps([252,64,106,52]))),pz=D(()=>L(()=>import("./RiderDedupePage-2fO5VJ2x.js"),__vite__mapDeps([253,73,189,67,52,61,93,23,24]))),mz=D(()=>L(()=>import("./RaceReadinessPage-C5wljCRd.js"),__vite__mapDeps([254,229,218,198,139,176,67,52,94,172]))),gz=D(()=>L(()=>import("./RiderMatchReviewPage-iHibRkTV.js"),__vite__mapDeps([255,73,172,3]))),vz=D(()=>L(()=>import("./PlatformCouponsPage-FJX5RzCd.js"),__vite__mapDeps([256,64,38,68,34]))),yz=D(()=>L(()=>import("./SuperAdminToolsPage-CxLXVgOJ.js"),__vite__mapDeps([257,52,185,176,93,226,106,67]))),wz=D(()=>L(()=>import("./ResultsAuditPage-DO5vphj7.js"),__vite__mapDeps([258,121,23,24]))),bz=D(()=>L(()=>import("./IdentitySyncPage-7voHyOmf.js"),__vite__mapDeps([259,121,67]))),_z=D(()=>L(()=>import("./OrgReconciliationPage-Dop_AJ_J.js"),__vite__mapDeps([260,201,110,216,138,139,52,23,24,217,121,3,6]))),xz=D(()=>L(()=>import("./PlatformFinancePage-n4WX9VHF.js"),__vite__mapDeps([261,73,67,38,34,52]))),T0=D(()=>L(()=>import("./BridgeReleasesPage-7VxxNjQv.js"),__vite__mapDeps([262,64,142,263,136,264,12,67,38,140,34,35,129]))),Ez=D(()=>L(()=>import("./KnowledgeBasePage-CiKl4CvG.js"),__vite__mapDeps([265,19,64,34,88,67,99,239,122,38,3,120]))),C0=D(()=>L(()=>import("./BridgeMonitorPage-eedwYrWS.js"),__vite__mapDeps([266,64,267,143,67,250,52,87,86,226,1,6]))),Sz=D(()=>L(()=>import("./StreamBoxLicensesPage-FlA-qm2I.js"),__vite__mapDeps([268,264,269,70,67,38,68,51,180,34]))),Tz=D(()=>L(()=>import("./StagingCheckIn-9635MsGU.js"),__vite__mapDeps([270,271,272,273,169,170,168,3,274,275,93,7,276,39,277,189,52,42,278]))),Cz=D(()=>L(()=>import("./BridgeDownloadPage-DwNIBdPB.js"),__vite__mapDeps([279,52,176,53,51,228]))),Pz=D(()=>L(()=>
498import("./TagProgrammerPage-Bd9aAvUP.js"),__vite__mapDeps([280,64,31,73,281,52,282,7,172,130]))),kz=D(()=>L(()=>import("./StreamBoxPage-iK8i52pJ.js"),__vite__mapDeps([283,70,21,269,64,31,284,48,47,34,38,83,19,84,68,69,82,67,86,87]))),Oz=D(()=>L(()=>import("./GuideLayout-BzZXem3X.js"),__vite__mapDeps([285,122,100,106,87,277,286]))),Rz=D(()=>L(()=>import("./GuidesHubPage-D9fQgw6n.js"),__vite__mapDeps([287,100,106,87,277,286]))),jz=D(()=>L(()=>import("./HardwareGuidePage-CLd59ATR.js"),__vite__mapDeps([288,73,289,290,249,52,291,137]))),Az=D(()=>L(()=>import("./BridgeInstallGuidePage-4E4fLZAj.js"),__vite__mapDeps([292,289,290,249,52,291,293,69]))),Nz=D(()=>L(()=>import("./BridgeInstallMacGuidePage-9nfCWg3W.js"),__vite__mapDeps([294,289,290,249,52,291,293,69]))),Iz=D(()=>L(()=>import("./ConnectReaderGuidePage-ElzFzxox.js"),__vite__mapDeps([295,289,290,249,52,291,138,139,296,7,248,94]))),Lz=D(()=>L(()=>import("./RunRaceGuidePage-Dkk6rOPz.js"),__vite__mapDeps([297,289,290,249,52,291,296,248,209]))),Dz=D(()=>L(()=>import("./TroubleshootingGuidePage-OLdAgy5v.js"),__vite__mapDeps([298,198,139]))),Mz=D(()=>L(()=>import("./HandheldR7GuidePage-BFXzMF3r.js"),__vite__mapDeps([299,289,290,249,52,291,300,129,137]))),$z=D(()=>L(()=>import("./FormBuilderPage-BuTg--tf.js"),__vite__mapDeps([301,96,302,303,102,119,97,9,304,305,147,148,30,112,306,151,16,152,156,157,125,179,307,92,275,168,170,93,308,124,154,38,107,68,34,35,43,309,310,82,19,64,198,139,31,311,73,89,76,312,86,237,113,99,47,48,104,103,313,74,290,314,66,213,88,130,315,61,69,26,44,22,116,25,128,316,87,94,126,317,84,318,85,3,114,247,319,186,13,33,2,131,78,320,160,6,215,117,204,321,155,4,163,322,194,53,11,115,323,162,248,10,149,135,209,111,52,70,235,236,39,196,1,238,239,240,123,110,324]))),Fz=D(()=>L(()=>import("./EventSettingsPage-CDyclNV5.js"),__vite__mapDeps([325,75,76,3,29,19,30,31,32,33,34,35,36,25,38,77,78,71,79,17,80,64,70,81,68,82,83,84,69,67,7,85,86,87,88,89,52,42,90,91,92,93,41,94,95,96,97,98,99,100,72,73,74,101,102,103,104,105,106,107,108,22,109,326,150,112,118,117,186,319,234,127,154,26,8,23,24,164,165,121,158,51,171,187,136,188,119,311,312,237,113,47,48,313,290,314,156,66,213,9,130,315,235,236,39,196,1,238,239,240,327,18,232,123,110,328,13,176,129,61,324,114]))),Uz=D(()=>L(()=>import("./EventAnalyticsPage-BOxgnM_q.js"),__vite__mapDeps([329,197,198,139,199,200,178,201,110,93,127,195,30,89,129,152,186,116,202,67,235,236,39,196,34,237,1,99,238,239,154,240,327,18,61]))),Bz=D(()=>L(()=>import("./EventRegistrationsPage-C89a-BH2.js"),__vite__mapDeps([330,73,178,199,200,203,89,119,30,76,181,23,24,182,183,184,39,138,139,98,34,88,22,331,332,246,68,127,69,67,3,26,44,2,204,163,205,48,206,172,154,189,121,112,158,78,50,193,90,52,116,159,146,123,110,19,147,148,64,149,77,71,17,150,118,25,117,151,16,152,153,93,109,107,155,156,157,125,66,8,171,319,235,236,196,237,1,99,238,239,240,327,18,61,130]))),zz=D(()=>L(()=>import("./FeeSettingsPage-ByELQf6m.js"),__vite__mapDeps([333,327,18,64,232,203,235,89,236,39,196,34,237,1,99,238,239,154,240,334,121,223,144,5,124,108,69,23,24,233,4,127,114,67,322,130,234,88]))),Vz=D(()=>L(()=>import("./PayoutsPage-BFC2qlAa.js"),__vite__mapDeps([335,121,327,18,334,223,144,5,124,108,69,23,24,141,52,94,30,19,119]))),Wz=D(()=>L(()=>import("./PayoutDetailPage-5vTsF3Fd.js"),__vite__mapDeps([336,224,217,23,24,73,121,61,241,137,69]))),Hz=D(()=>L(()=>import("./TransactionsPage-pc5kKR1M.js"),__vite__mapDeps([337,338,121,69,23,24]))),qz=D(()=>L(()=>import("./ImportRidersPage-C6Ht1iVR.js"),__vite__mapDeps([339,190,121,93,35,52]))),Gz=D(()=>L(()=>import("./EditRegistrationPage--jnhMtMc.js"),__vite__mapDeps([340,118,302,341,164,165,147,148,30,112,21,181,23,24,182,183,184,39,76,89,212,213,275,168,170,101,342,119,124,11,126,236,343,135,68,307,92,306,151,16,152,156,157,125,179,93,243,305,66,237,38,35,22,61,69,26,44,116,25,113,128,316,87,94,317,84,318,85,3,107,43,114,247,319,186,13,33,2,344,345,6,205,67,172,346,198,139,19,207,338,121,171,163,347,348,194,5,88,127,154]))),Kz=D(()=>L(()=>import("./BrandingPage-D7qCIEmO.js"),__vite__mapDeps([349,231,164,165,35,94,69,17,235,89,236,39,196,34,237,1,99,238,239,154,240,327,18,123,110,9,312,44,48,64,21,191,66,313,19,192,324,74]))
498),Qz=D(()=>L(()=>import("./LandingPageBuilderPage-DWaKVQiV.js"),__vite__mapDeps([350,97,132,133,64,351,304,305,147,148,30,112,306,151,16,152,156,157,125,179,307,92,275,168,170,93,308,124,154,38,107,68,34,35,43,309,310,82,19,198,139,31,311,73,119,89,76,312,86,237,113,99,47,48,104,103,313,74,290,314,66,213,88,9,130,315,61,69,26,44,22,116,25,128,316,87,94,126,317,84,318,85,3,114,247,319,186,13,33,2,131,78,320,160,6,215,117,204,321,155,4,163,322,194,53,11,115,323,162,248,10,149,135,209,352,353,17,327,18,123,110,39,220,324]))),Yz=D(()=>L(()=>import("./CustomPageBuilderPage-tNXi7HrR.js"),__vite__mapDeps([354,352,97,64,353,304,305,147,148,30,112,306,151,16,152,156,157,125,179,307,92,275,168,170,93,308,124,154,38,107,68,34,35,43,309,310,82,19,198,139,31,311,73,119,89,76,312,86,237,113,99,47,48,104,103,313,74,290,314,66,213,88,9,130,315,61,69,26,44,22,116,25,128,316,87,94,126,317,84,318,85,3,114,247,319,186,13,33,2,131,78,320,160,6,215,117,204,321,155,4,163,322,194,53,11,115,323,162,248,10,149,135,209,17,327,18]))),Jz=D(()=>L(()=>import("./GettingStartedPage-BhoF1n5q.js"),__vite__mapDeps([355,198,139,327,18,30,228,291,69,215,9,127,356,85,93,43,135,4,196,248,195,10,48,3,219,110,221]))),Xz=D(()=>L(()=>import("./KioskPage-D1J5zWD0.js"),__vite__mapDeps([357,138,139,358,89,158,78,71,173,174,246,359,245,244,3,189,172,116,30,73,21,166,167,79,77,168,169,170,19,112,69,52,114,5,119,130,22,34,38,124,93,88,171,50,90,76,198,302,341,164,165,147,148,181,23,24,182,183,184,39,212,213,275,101,342,11,126,236,343,135,68,307,92,306,151,16,152,156,157,125,179,243,305,66,237,35,61,26,44,25,113,128,316,87,94,317,84,318,85,107,43,247,319,186,13,33,2,346,207,344,345,6,205,67,338,121,163,347,348,194,360,281,361,7,206,106,127,362,363,364,251,51,365,110,204,248,193]))),P0=D(()=>L(()=>import("./TimingPage-D1XuvpzL.js"),__vite__mapDeps([366,4]))),Zz=D(()=>L(()=>import("./TvResultsPage-BKlU04-s.js"),__vite__mapDeps([367,30,273,81,87,225,39,368,314]))),eV=D(()=>L(()=>import("./RaceFeedPage-BzaxdKsV.js"),__vite__mapDeps([369,161,102,19,64,370,39,147,148,371,315,154,119,372,373,205,34,88,238,239,331,24,184,183,332,70,149,68]))),tV=D(()=>L(()=>import("./CombinedRacesPage-BVUbnNpw.js"),__vite__mapDeps([374,229,118,38,124,225,87,154,34,106]))),k0=D(()=>L(()=>import("./AdminShellLayout-RCt59QQM.js"),__vite__mapDeps([375,342,21,372,17,30,138,139,78,134,52,8,26,133,142,7,5,149,106,248,4,277,81,137,84,43,9,3,185,13,115,221,122,85,109,35,215,220,104,313,32,373,371,194,10,176,195,18,93,127,2,250,284,25,53,75,76,29,19,31,33,34,36,38,77,71,79,80,64,70,68,82,83,69,67,86,87,88,89,42,90,91,92,41,94,95,96,97,98,99,100,15,16,327,230,214,22,23,24,73,328,271,108,47,48,119,198,267,263,136,264,12,140,154,1,226,129,143,275,168,170,175,237,376,276,281,300,225,320,186,159,169,360,173,174,113,361,124,377,193,282,39,160,61,130,162,157,323,235,236,196,238,239,240])).then(e=>({default:e.AdminShellLayout}))),rV=D(()=>L(()=>import("./OrgRaceFeed-BDk-0NCn.js"),__vite__mapDeps([378,272,379,380,370,39,147,148,238,239,19,15,16,154,205,34,48,47,331,24,184,183,332,371,309,68,135,149]))),nV=D(()=>L(()=>import("./OrgFeedPost-PuqCFvCB.js"),__vite__mapDeps([381,272,370,39,147,148,380,238,239,19,15,16,154,205,34,48,47,331,24,184,183,332,61,68]))),oV=D(()=>L(()=>import("./EmbedRaceFeed-CYx7z56N.js"),__vite__mapDeps([382,272,379,380,370,39,147,148,238,239,19,15,16,154,205,34,48,47,331,24,184,183,332,371,309,68,135,46,73,383,70,61,54,69,149]))),sV=D(()=>L(()=>import("./EmbedAuth-BEVFInI-.js"),__vite__mapDeps([384,272,46,47,48,73,54]))),iV=D(()=>L(()=>import("./PosVerifier-Bv-veIx2.js"),__vite__mapDeps([385,173,174,189,323,32,3]))),O0=D(()=>L(()=>import("./CouponView-D4fVmpHK.js"),__vite__mapDeps([386,70,187,136,188,23,24,68,69]))),aV=D(()=>L(()=>import("./SponsorCouponView-CuUOhy7E.js"),__vite__mapDeps([387,188,68,69,23,24]))),lV=D(()=>L(()=>import("./Redirect-DMfygvEI.js"),[])),cV=D(()=>L(()=>import("./NotFound-Sli5wXcg.js"),[])),R0=D(()=>L(()=>import("./TimingLayout-N_JkLBVP.js"),__vite__mapDeps([388,389,272,273,211,7,33,22,93,390,391,392,210,244,393,192]))),j0=D(()=>L(()=>import("./TimingHome-BPGqQHpR.js"),__vite__mapDeps([394,395,272,273,389,17,22,25,33]))),uV=D(()=>L(()=>import("./TimingSchedulePage-BJd5mNYk.js"),__vite__mapDeps([396,272,273,389,390,108,397,372,395,17,22,25,391,392,210,244,93,393]))),A0=D(()=>L(()=>import("./CombinedScheduleTab-C_IgyIMX.js"),__vite__mapDeps([398,211,396,272,273,389,390,108,397,372,395,17,22,25,391,392,210,244,93,393,399,400,100,33,7]))),dV=D(()=>L(()=>import("./TimingRaceDayPage-DyT31N-N.js"),__vite__mapDeps([401,393,397,389,273,272,372,395,17,22,25,391,392,210,244,93,7,84,160,149,390]))),N0=D(()=>L(()=>import("./LiveTimingTab-DUGc1m7-.js"),__vite__mapDeps([402,389,273,272,403,377,376,211,275,168,170,52,400,7]))),fV=D(()=>L(()=>import("./CamerasTab-iOOZcl1r.js"),__vite__mapDeps([404,389,80,84,69]))),hV=D(()=>L(()=>import("./GatePickTab-BNtlypES.js"),__vite__mapDeps([405,389,273,272,211,64,76,275,168,170,391,392,210,244,3,240,160]
498))),pV=D(()=>L(()=>import("./FeedTab-DFHF1Ywr.js"),__vite__mapDeps([406,272,379,380,370,39,147,148,238,239,19,15,16,154,205,34,48,47,331,24,184,183,332,371,309,68,135,149,69]))),mV=D(()=>L(()=>import("./TimingResultsPage-C_1Qg9rA.js"),__vite__mapDeps([407,393,397,389,273,272,372,395,17,22,25,391,392,210,244,93,33,13,4,115,390]))),gV=D(()=>L(()=>import("./TimingLegalPage-vikPscWX.js"),__vite__mapDeps([408,192,176,61]))),I0=D(()=>L(()=>import("./RaceResultsTab-DTSTW7ZU.js"),__vite__mapDeps([409,399,389,273,272,275,168,170,391,392,210,244,410,411,25,33,13,4,193,3]))),vV=D(()=>L(()=>import("./PodiumTab-CbmpDvjy.js"),__vite__mapDeps([412,399,389,273,272,275,168,170,410,411,25,33,13,4,193,115]))),yV=D(()=>L(()=>import("./LapTimesTab-CS7-MqPn.js"),__vite__mapDeps([413,399,389,273,272,275,168,170,391,392,210,244,377,4]))),wV=D(()=>L(()=>import("./SeriesPointsTab-Cqpo5aQa.js"),__vite__mapDeps([414,399,389,273,272,275,168,170,391,392,210,244,410,411,25,33,13,4,193,3,115]))),bV=D(()=>L(()=>import("./TimingClassesPage-ma66-DEI.js"),__vite__mapDeps([415,399,389,273,272,275,168,170,397,372,395,17,22,25,391,392,210,244,93,276,3,105]))),Ic=D(()=>L(()=>import("./TimingSectionGate-efqMrRgh.js"),__vite__mapDeps([416,389,390,395,272,273,17,22,25,7,33,93])).then(e=>({default:e.TimingSectionGate}))),L0=D(()=>L(()=>import("./OverlaySidebarPage-CVrMS6Fj.js"),__vite__mapDeps([417,403,377,376,168,170]))),D0=D(()=>L(()=>import("./OverlayStagePage-Bm_ZuMQE.js"),__vite__mapDeps([418,269,403,377,376,274]))),_V=D(()=>L(()=>import("./OrgHome-ByGP-Lff.js"),__vite__mapDeps([419,272,273,7,22,149,3]))),xV=D(()=>L(()=>import("./OrgLandingPage-BFg1-rA6.js"),__vite__mapDeps([420,272,351,421,305,147,148,243,306,151,16,152,156,157,125,179,22,39,93,25,69,116,309,43,310,82]))),EV=D(()=>L(()=>import("./OrgCustomPage-OiOraqM-.js"),__vite__mapDeps([422,272,353,421,305,147,148,243,306,151,16,152,156,157,125,179,22,39,93,25,69,116,309,43,310,82]))),SV=D(()=>L(()=>import("./OrgEvents-JAWV5me6.js"),__vite__mapDeps([423,89,364,138,139,116,251,51,23,24,76,65,135,68,70,22,25,127,332,272]))),TV=D(()=>L(()=>import("./OrgRegister-C2FU1qJ1.js"),__vite__mapDeps([424,102,272,362,363,308,92,93,124,154,38,302,341,164,165,147,148,30,112,21,181,23,24,182,183,184,39,76,89,212,213,275,168,170,101,342,119,11,126,236,343,135,68,307,306,151,16,152,156,157,125,179,243,305,66,237,35,22,61,69,26,44,116,25,113,128,316,87,94,317,84,318,85,3,107,43,114,247,319,186,13,33,2,232,203,326,425,392,210,244,426,90,1,209,176,172,110,118,52,323,88,364,138,139,251,51,235,196,34,99,238,239,240]))),CV=D(()=>L(()=>import("./OrgLogin-BjfViBN4.js"),__vite__mapDeps([427,272,46,47,48,73,383,49,50,51,26,54]))),M0=D(()=>L(()=>import("./OrgEditRegistration-BcW4Q5nl.js"),__vite__mapDeps([428,272,118,21,345,302,341,164,165,147,148,30,112,181,23,24,182,183,184,39,76,89,212,213,275,168,170,101,342,119,124,11,126,236,343,135,68,307,92,306,151,16,152,156,157,125,179,93,243,305,66,237,38,35,22,61,69,26,44,116,25,113,128,316,87,94,317,84,318,85,3,107,43,114,247,319,186,13,33,2,348,347,205,104,127,88]))),PV=D(()=>L(()=>import("./OrgForgotPassword-C3gArGU5.js"),__vite__mapDeps([429,272,26,50,61,54]))),kV=D(()=>L(()=>import("./OrgConfirmation-LKG8xyeh.js"),__vite__mapDeps([430,362,248,365,110,50,318,114,204,92,93,69,68,303,343,135,305,147,148,61,26,44,22,116,25,113,128,316,87,94,126,317,66,84,85,3,38,237,107,125,43,247,319,186,13,33,2,21,348,200,359,426,90,1,209,176
498]))),OV=D(()=>L(()=>import("./OrgRegistrationLookup-D7d48jti.js"),__vite__mapDeps([431,272,61,3,189,22,25,114,171,116,23,24]))),$0=D(()=>L(()=>import("./OrgAccount-Cp5U3LfW.js"),__vite__mapDeps([432,164,165,19,46,47,48,73,372,208,209,52,38,44,34,26,136,70,23,24,138,139,188,210,69,39,110,64,128,68,42,11,116,25,166,119,425,227,15,16,93,273,7,33,140,1,411,13,4,92,105,356,115,392,244,21,344,345,124,6,114,205,67,172,158,78,31,175,360,173,174,71,281,113,278,22,319,61,160,88,53,171,118,106,30,318,85,202,104]))),F0=D(()=>L(()=>import("./OrgTeamPage-BnC8xXmK.js"),__vite__mapDeps([433,21,92,359,145,93,22,105,68,154,67,91]))),RV=D(()=>L(()=>import("./OrgKiosk-2QE66kG7.js"),__vite__mapDeps([434,248]))),jV=D(()=>L(()=>import("./OrgKioskWorkspace-DgpZvGqi.js"),__vite__mapDeps([435,138,139,358,89,158,78,71,173,174,246,359,245,244,3,189,172,116,30,73,21,166,167,79,77,168,169,170,19,112,69,52,114,5,119,130,22,34,38,124,93,88,171,50,90,76,198,302,341,164,165,147,148,181,23,24,182,183,184,39,212,213,275,101,342,11,126,236,343,135,68,307,92,306,151,16,152,156,157,125,179,243,305,66,237,35,61,26,44,25,113,128,316,87,94,317,84,318,85,107,43,247,319,186,13,33,2,346,207,344,345,6,205,67,338,121,163,347,348,194,360,281,361,7,206,106,127,362,363,364,251,51,365,110,204,248,368,314,193]))),AV=D(()=>L(()=>import("./OrgFundraiserPage-CAz37trh.js"),__vite__mapDeps([436,19,110,128,50,127]))),NV=D(()=>L(()=>import("./TicketPurchasePage-b5QjfQ1v.js"),__vite__mapDeps([437,93,237,38,176,12,140,33,25,94,22]))),IV=D(()=>L(()=>import("./TicketPassPage-Ih4Dgst0.js"),__vite__mapDeps([438,136,22,25,68,135,140,67]))),LV=D(()=>L(()=>import("./EventTicketsPage-CfQRhR3C.js"),__vite__mapDeps([439,64,73,136,1,68,69,137,61,174,5,8,114,319,140,67,154,38,34]))),DV=D(()=>L(()=>import("./OrgPrivacy-BYqAWxrp.js"),__vite__mapDeps([440,56,57,272]))),MV=D(()=>L(()=>import("./OrgTerms-HlTAaiu6.js"),__vite__mapDeps([441,56,59,272]))),$V=D(()=>L(()=>import("./OrgInstall-Da4QSTQI.js"),__vite__mapDeps([442,12,52,316,321]))),U0=D(()=>L(()=>import("./OrgGatePos-Ca70l2_g.js"),__vite__mapDeps([443,73,439,64,136,1,68,69,137,61,174,5,8,114,319,140,67,154,38,34,277,247]))),FV=D(()=>L(()=>import("./OrgVolunteerKiosk-B2WF_-QZ.js"),__vite__mapDeps([444,164,165,61,3,90,116]))),UV=D(()=>L(()=>import("./AdminVolunteers-CoNCBSkO.js"),__vite__mapDeps([445,164,165,73,121,70,35,140,69,38,116,42,34]))),BV=()=>f.jsx("div",{className:"min-h-screen flex items-center justify-center",children:f.jsx(fn,{className:"h-8 w-8 animate-spin text-primary"})}),zV=e=>fx(e);class VV extends v.Component{constructor(){super(...arguments);fv(this,"state",{hasError:!1,message:"",isModuleError:!1})}static getDerivedStateFromError(r){const n=r instanceof Error?r.message:String(r);return{hasError:!0,message:n,isModuleError:zV(n)}}componentDidCatch(){}render(){return this.state.hasError?this.state.isModuleError?f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-6",children:f.jsxs("div",{className:"max-w-sm text-center space-y-4",children:[f.jsx("h1",{className:"font-display text-3xl tracking-wider",children:"UPDATE AVAILABLE"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"A newer version of the app is ready. Click below to reload with the latest version."}),f.jsx("button",{type:"button",className:"inline-flex h-11 items-center justify-center rounded-md bg-primary px-6 text-sm font-semibold text-primary-foreground shadow-sm",onClick:async()=>{try{if("caches"in window){const n=await caches.keys();await Promise.all(n.map(o=>caches.delete(o)))}if("serviceWorker"in navigator){const n=await navigator.serviceWorker.getRegistrations();await Promise.all(n.map(o=>o.unregister()))}}catch{}const r=new URL(window.location.href);r.searchParams.set("v",Date.now().toString()),window.location.replace(r.toString())},children:"Reload"})]})}):f.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-6",children:f.jsxs("div",{className:"max-w-sm text-center space-y-4",children:[f.jsx("h1",{className:"font-display text-3xl tracking-wider",children:"SOMETHING WENT WRONG"}),f.jsx("p",{className:"text-sm text-muted-foreground",children:"This screen failed to load. Please refresh once."}),f.jsx("button",{type:"button",className:"inline-flex h-11 items-center justify-center rounded-md bg-primary px-6 text-sm font-semibold text-primary-foreground shadow-sm",onClick:()=>window.location.reload(),children:"Refresh"})]})}):this.props.children}}const WV=new JR({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1}}}),HV=()=>(r$(),null),qV=()=>f.jsx(rj,{client:WV,children:f.jsx(KM,{children:f.jsx(CU,{children:f.jsxs(OU,{children:[f.jsx(OL,{}),f.jsx(aD,{}),f.jsxs(K2,{children:[f.jsx(HV,{}),f.jsx(J3,{}),f.jsx(LN,{children:f.jsxs(S4,{children:[f.jsx(T4,{}),f.jsx(RU,{}),f.jsx(VV,{children:f.jsx(v.Suspense,{fallback:f.jsx(BV,{}),children:f.jsxs(F2,{children:[f.jsx(O,{path:"/",element:f.jsx(Z3,{})}),f.jsx(O,{path:"/index",element:f.jsx(Wa,{to:"/",replace:!0})}),f.jsx(O,{path:"/s/:code",element:f.jsx(ez,{})}),f.jsx(O,{path:"/tickets/:eventId",element:f.jsx(NV,{})}),f.jsx(O,{path:"/t/:token",element:f.jsx(IV,{})}),f.jsx(O,{path:"/organizations",element:f.jsx(rz,{})}),f.jsx(O,{path:"/tracks",element:f.jsx(nz,{})}),f.jsx(O,{path:"/tracks/:trackId",element:f.jsx(oz,{})}),f.jsx(O,{path:"/org/:orgSlug",element:f.jsx(_V,{})}),f.jsx(O,{path:"/org/:orgSlug/main",element:f.jsx(xV,{})}),f.jsx(O,{path:"/org/:orgSlug/page/:pageSlug",element:f.jsx(EV,{})}),f.jsx(O,{path:"/org/:orgSlug/lookup",element:f.jsx(OV,{})}),f.jsx(O,{path:"/org/:orgSlug/events",element:f.jsx(SV,{})}),f.jsx(O,{path:"/org/:orgSlug/events/:eventId",element:f.jsx(TV,{})}),f.jsx(O,{path:"/org/:orgSlug/login",element:f.jsx(CV,{})}),f.jsx(O,{path:"/org/:orgSlug/edit-registration",element:f.jsx(M0,{})}),f.jsx(O,{path:"/org/:orgSlug/edit-registration/:registrationId",element:f.jsx(M0,{})}),f.jsx(O,{path:"/org/:orgSlug/forgot-password",element:f.jsx(PV,{})}),f.jsx(O,{path:"/org/:orgSlug/my-registrations",element:f.jsx($0,{})}),f.jsx(O,{path:"/org/:orgSlug/confirmation/:confirmationNumber",element:f.jsx(kV,{})}),f.jsx(O,{path:"/org/:orgSlug/team/:joinCode",element:f.jsx(F0,{})}),f.jsx(O,{path:"/team/:joinCode",element:f.jsx(F0,{})}),f.jsx(O,{path:"/org/:orgSlug/kiosk",element:f.jsx(RV,{})}),f.jsx(O,{path:"/org/:orgSlug/kiosk/workspace",element:f.jsx(jV,{})}),f.jsx(O,{path:"/org/:orgSlug/fundraise/:fundraiserSlug",element:f.jsx(AV,{})}),f.jsx(O,{path:"/org/:orgSlug/install",element:f.jsx($V,{})}),f.jsx(O,{path:"/org/:orgSlug/gate",element:f.jsx(U0,{})}),f.jsx(O,{path:"/org/:orgSlug/gate/:eventSlug",element:f.jsx(U0,{})}),f.jsx(O,{path:"/org/:orgSlug/privacy",element:f.jsx(DV,{})}),f.jsx(O,{path:"/org/:orgSlug/terms",element:f.jsx(MV,{})}),f.jsx(O,{path:"/org/:orgSlug/volunteers",element:f.jsx(FV,{})}),f.jsx(O,{path:"/org/:orgSlug/account",element:f.jsx($0,{})}),f.jsx(O,{path:"/org/:orgSlug/staging",element:f.jsx(P3,{children:f.jsx(Tz,{})})}),f.jsxs(O,{path:"/org/:orgSlug/timing",element:f.jsx(R0,{}),children:[f.jsx(O,{index:!0,element:f.jsx(j0,{})}),f.jsx(O,{path:"schedule",element:f.jsx(Ic,{section:"schedule",title:"Schedule",hint:"Practice and race schedule for the selected event."})}),f.jsx(O,{path:"race-day",element:f.jsx(Ic,{section:"race-day",defaultSub:"live-timing",title:"Race Day",hint:"Live timing, on-site cameras, and gate picks for the current race."})}),f.jsx(O,{path:"results",element:f.jsx(Ic,{section:"results",defaultSub:"race-results",title:"Results",hint:"Race results, podium, lap times, and series points."})}),f.jsx(O,{path:"legal",element:f.jsx(gV,{})}),f.jsx(O,{path:"classes",element:f.jsx(Ic,{section:"classes",title:"Classes",hint:"Browse class entries and rider numbers."})})]}),f.jsxs(O,{path:"/org/:orgSlug/timing/:eventId",element:f.jsx(R0,{}),children:[f.jsx(O,{index:!0,element:f.jsx(j0,{})}),f.jsxs(O,{path:"schedule",element:f.jsx(uV,{}),children:[f.jsx(O,{index:!0,element:f.jsx(A0,{})}),f.jsx(O,{path:"*",element:f.jsx(A0,{})})]}),f.jsxs(O,{path:"race-day",element:f.jsx(dV,{}),children:[f.jsx(O,{index:!0,element:f.jsx(N0,{})}),f.jsx(O,{path:"live-timing",element:f.jsx(N0,{})}),f.jsx(O,{path:"cameras",element:f.jsx(fV,{})}),f.jsx(O,{path:"gate-pick",element:f.jsx(hV,{})}),f.jsx(O,{path:"feed",element:f.jsx(pV,{})})]}),f.jsxs(O,{path:"results",element:f.jsx(mV,{}),children:[f.jsx(O,{index:!0,element:f.jsx(I0,{})}),f.jsx(O,{path:"race-results",element:f.jsx(I0,{})}),f.jsx(O,{path:"podium",element:f.jsx(vV,{})}),f.jsx(O,{path:"lap-times",element:f.jsx(yV,{})}),f.jsx(O,{path:"series-points",element:f.jsx(wV,{})})]}),f.jsx(O,{path:"classes",element:f.jsx(bV,{})})]}),f.jsx(O,{path:"/org/:orgSlug/overlay/sidebar",element:f.jsx(L0,{})}),f.jsx(O,{path:"/timing/:orgSlug/overlay/sidebar",element:f.jsx(L0,{})}),f.jsx(O,{path:"/org/:orgSlug/overlay/stage",element:f.jsx(D0,{})}),f.jsx(O,{path:"/timing/:orgSlug/overlay/stage",element:f.jsx(D0,{})}),f.jsx(O,{path:"/timing/:orgSlug/*",element:f.jsx(X3,{})}),f.jsx(O,{path:"/class-change-confirmation",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(tz,{})})}),f.jsx(O,{path:"/auth",element:f.jsx(sz,{})}),f.jsx(O,{path:"/forgot-password",element:f.jsx(lz,{})}),f.jsx(O,{path:"/reset-password",element:f.jsx(cz,{})}),f.jsx(O,{path:"/privacy",element:f.jsx(iz,{})}),f.jsx(O,{path:"/terms",element:f.jsx(az,{})}),f.jsxs(O,{element:f.jsx(k0,{}),children:[f.jsx(O,{path:"/admin",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(uz,{})})}),f.jsx(O,{path:"/admin/timing-lab",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(TU,{children:f.jsx("div",{})})})}),f.jsx(O,{path:"/admin/events/:eventId/form-builder",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx($z,{})})}),f.jsx(O,{path:"/admin/events/:eventId/settings",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Fz,{})})}),f.jsx(O,{path:"/admin/events/:eventId/tickets",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(LV,{})})}),f.jsx(O,{path:"/admin/events/:eventId/analytics",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Uz,{})})}),f.jsx(O,{path:"/admin/events/:eventId/registrations",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Bz,{})})}),f.jsx(O,{path:"/admin/fee-settings",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(zz,{})})}),f.jsx(O,{path:"/admin/payouts",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Vz,{})})}),f.jsx(O,{path:"/admin/payouts/:payoutId",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Wz,{})})}),f.jsx(O,{path:"/admin/registrations/:registrationId/edit",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Gz,{})})}),f.jsx(O,{path:"/admin/transactions",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Hz,{})})}),f.jsx(O,{path:"/admin/import-riders",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(qz,{})})}),f.jsx(O,{path:"/admin/branding",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Kz,{})})}),f.jsx(O,{path:"/admin/landing-page",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Qz,{})})}),f.jsx(O,{path:"/admin/custom-pages/:pageId",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Yz,{})})}),f.jsx(O,{path:"/admin/kiosk",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx($f,{feature:"kiosk_mode",label:"Kiosk Mode",children:f.jsx(Xz,{})})})}),f.jsx(O,{path:"/admin/tv-results",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx($f,{feature:"tv_results_display",label:"TV Results Display",children:f.jsx(Zz,{})})})}),f.jsx(O,{path:"/admin/volunteers",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(UV,{})})}),f.jsx(O,{path:"/admin/timing",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(P0,{})})}),f.jsx(O,{path:"/admin/manual-timing",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(P0,{})})}),f.jsx(O,{path:"/admin/getting-started",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Jz,{})})}),f.jsx(O,{path:"/admin/race-feed",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(eV,{})})}),f.jsx(O,{path:"/admin/combined-races",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(tV,{})})})]}),f.jsxs(O,{element:f.jsx(k0,{}),children:[f.jsx(O,{path:"/super-admin",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(dz,{})})}),f.jsx(O,{path:"/super-admin/regression-tests",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(fz,{})})}),f.jsx(O,{path:"/super-admin/backfill-family-links",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(hz,{})})}),f.jsx(O,{path:"/super-admin/rider-dedupe",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(pz,{})})}),f.jsx(O,{path:"/super-admin/race-readiness",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(mz,{})})}),f.jsx(O,{path:"/super-admin/rider-match-review",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(gz,{})})}),f.jsx(O,{path:"/super-admin/platform-coupons",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(vz,{})})}),f.jsx(O,{path:"/super-admin/identity-sync",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(bz,{})})}),f.jsx(O,{path:"/super-admin/results-audit",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(wz,{})})}),f.jsx(O,{path:"/super-admin/reconciliation",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(_z,{})})}),f.jsx(O,{path:"/super-admin/finance",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(xz,{})})}),f.jsx(O,{path:"/super-admin/tools",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(yz,{})})}),f.jsx(O,{path:"/super-admin/bridge-releases",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(T0,{})})}),f.jsx(O,{path:"/super-admin/rfid-bridges",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(T0,{})})}),f.jsx(O,{path:"/super-admin/bridge-monitor",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(C0,{})})}),f.jsx(O,{path:"/super-admin/stream-box-licenses",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(Sz,{})})}),f.jsx(O,{path:"/super-admin/knowledge-base",element:f.jsx(ae,{requireSuperAdmin:!0,children:f.jsx(Ez,{})})}),f.jsx(O,{path:"/admin/bridge-monitor",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(C0,{})})}),f.jsx(O,{path:"/admin/bridge-download",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Cz,{})})}),f.jsx(O,{path:"/admin/tag-programmer",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx($f,{feature:"tag_programmer",label:"Tag Programmer",children:f.jsx(Pz,{})})})}),f.jsx(O,{path:"/admin/stream-box",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(kz,{})})}),f.jsxs(O,{path:"/admin/guides",element:f.jsx(ae,{requireAdmin:!0,children:f.jsx(Oz,{})}),children:[f.jsx(O,{index:!0,element:f.jsx(Rz,{})}),f.jsx(O,{path:"hardware",element:f.jsx(jz,{})}),f.jsx(O,{path:"bridge-install",element:f.jsx(Az,{})}),f.jsx(O,{path:"bridge-install-mac",element:f.jsx(Nz,{})}),f.jsx(O,{path:"connect-reader",element:f.jsx(Iz,{})}),f.jsx(O,{path:"run-race",element:f.jsx(Lz,{})}),f.jsx(O,{path:"handheld-r7",element:f.jsx(Mz,{})}),f.jsx(O,{path:"troubleshooting",element:f.jsx(Dz,{})})]})]}),f.jsx(O,{path:"/org/:orgSlug/pos",element:f.jsx(iV,{})}),f.jsx(O,{path:"/org/:orgSlug/coupon",element:f.jsx(O0,{})}),f.jsx(O,{path:"/coupon/:orgSlug",element:f.jsx(O0,{})}),f.jsx(O,{path:"/org/:orgSlug/sponsor-coupon",element:f.jsx(aV,{})}),f.jsx(O,{path:"/org/:orgSlug/feed",element:f.jsx(rV,{})}),f.jsx(O,{path:"/org/:orgSlug/post/:postId",element:f.jsx(nV,{})}),f.jsx(O,{path:"/embed/feed/:orgSlug",element:f.jsx(oV,{})}),f.jsx(O,{path:"/embed/auth",element:f.jsx(sV,{})}),f.jsx(O,{path:"/redirect",element:f.jsx(lV,{})}),f.jsx(O,{path:"*",element:f.jsx(cV,{})})]})})})]})})]})]})})})});(async()=>{try{if("caches"in window){const e=await caches.keys();await Promise.all(e.map(t=>caches.delete(t)))}}catch{}})();window.addEventListener("vite:preloadError",e=>{e.preventDefault()});(()=>{try{return window.self!==window.top}catch{return!0}})();window.location.hostname.includes("id-preview--")||window.location.hostname.includes("lovableproject.com");
498"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(t=>t.unregister())}).catch(()=>{});const GV=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone===!0;if(GV){const e=localStorage.getItem("kiosk_pwa_org"),t=localStorage.getItem("branded_pwa_org"),r=window.location.pathname.match(/^\/org\/[^/]+\/kiosk/),n=window.location.pathname.match(/^\/org\/[^/]+/),o=window.location.pathname==="/"||window.location.pathname==="";if(e&&!r?window.location.replace(`/org/${e}/kiosk`):!e&&t&&o&&!n&&window.location.replace(`/org/${t}`),e){const s=()=>{const a=document.documentElement,l=a.requestFullscreen||a.webkitRequestFullscreen||a.msRequestFullscreen;l&&l.call(a).catch(()=>{})},i=()=>{s(),document.removeEventListener("click",i),document.removeEventListener("touchstart",i)};document.addEventListener("click",i,{once:!0}),document.addEventListener("touchstart",i,{once:!0})}}ux(document.getElementById("root")).render(f.jsx(qV,{}));export{Va as $,gL as A,lt as B,_L as C,vL as D,B3 as E,zP as F,VP as G,WP as H,jC as I,V3 as J,$l as K,ge as L,yL as M,Wa as N,IS as O,aS as P,Fu as Q,HP as R,x3 as S,EL as T,Ra as U,NS as V,TL as W,pe as X,bs as Y,yd as Z,sS as _,wL as a,_U as a$,Rd as a0,KM as a1,m6 as a2,g6 as a3,QM as a4,T6 as a5,Ca as a6,L as a7,C6 as a8,u6 as a9,ke as aA,H as aB,Xr as aC,G4 as aD,xM as aE,fs as aF,Cd as aG,Lg as aH,E0 as aI,k1 as aJ,Qr as aK,x$ as aL,E$ as aM,JE as aN,z as aO,Yi as aP,Og as aQ,Mg as aR,zd as aS,Dg as aT,Ud as aU,Gi as aV,Rg as aW,jg as aX,kg as aY,Ll as aZ,ds as a_,cw as aa,N6 as ab,NT as ac,IT as ad,Hg as ae,ui as af,SL as ag,xU as ah,E6 as ai,A as aj,MP as ak,$P as al,$3 as am,U3 as an,FP as ao,UP as ap,M3 as aq,F3 as ar,x6 as as,C4 as at,Cn as au,de as av,Bt as aw,dt as ax,No as ay,wo as az,Jp as b,QE as b0,Td as b1,S6 as b2,R6 as b3,S3 as b4,j6 as b5,A6 as b6,CI as b7,n$ as b8,bL as b9,Od as ba,oi as bb,kr as bc,t$ as bd,y6 as be,v6 as bf,xL as bg,P6 as bh,E4 as bi,SI as bj,kt as bk,LS as bl,yI as bm,T3 as bn,Es as bo,IN as bp,W4 as bq,D4 as br,qd as bs,QV as bt,k6 as bu,Q3 as bv,I4 as bw,C3 as bx,c6 as by,d6 as bz,ot as c,fn as d,Tn as e,Uw as f,O4 as g,w6 as h,Zi as i,f as j,kC as k,bn as l,nS as m,oS as n,pI as o,mI as p,gI as q,v as r,xe as s,q3 as t,sn as u,H3 as v,gP as w,E3 as x,wP as y,bP as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.