@preply/ds-docs 9.1.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{00.LayoutFlex.stories-BYXnY64p.js → 00.LayoutFlex.stories-DB9Y25qw.js} +1 -1
- package/dist/assets/{00.applications-BsH2V3W_.js → 00.applications-C7qyvM1y.js} +1 -1
- package/dist/assets/{00.favicons.guide-eBYOUVUH.js → 00.favicons.guide-BmYhSQZH.js} +1 -1
- package/dist/assets/{00.token-explorer-B2ulyaA-.js → 00.token-explorer-zaz4V88E.js} +1 -1
- package/dist/assets/{00.using-responsive-props-CTjUYXUc.js → 00.using-responsive-props-DKW-uWVH.js} +1 -1
- package/dist/assets/01-2pw2iC19.css +1 -0
- package/dist/assets/01.semantic-tokens-Qf9qY_Sk.js +11 -0
- package/dist/assets/{01.using-shorthand-props-CwDUu5-3.js → 01.using-shorthand-props-BedWZyE3.js} +1 -1
- package/dist/assets/{10.Combinations.stories-DyRUlGlL.js → 10.Combinations.stories-DL8TmNJ4.js} +1 -1
- package/dist/assets/{10.fonts.guide-DeXmgJeZ.js → 10.fonts.guide-DWCtIfPx.js} +1 -1
- package/dist/assets/{10.ssr-Cc4-BW5H.js → 10.ssr-FDyVDtdm.js} +1 -1
- package/dist/assets/11.fonts.explorer-Bh_GOQIH.js +2 -0
- package/dist/assets/{11.ssr.app-router-D1SE_zWj.js → 11.ssr.app-router-C5TwsO2T.js} +1 -1
- package/dist/assets/{20.libraries-DfhUsp74.js → 20.libraries-Cnl2_NKK.js} +1 -1
- package/dist/assets/{2025-q4-ds-cleanup-DGnTtnn3.js → 2025-q4-ds-cleanup-Bpa9AZ8j.js} +1 -1
- package/dist/assets/{30.icons.explorer-D0CP2r0K.js → 30.icons.explorer-BBtz-vBk.js} +3 -3
- package/dist/assets/{30.storybook-fiICi3pf.js → 30.storybook-C9GpdY6w.js} +1 -1
- package/dist/assets/{40.illustrations.explorer-BAusB8PF.js → 40.illustrations.explorer-BRtj5sFB.js} +1 -1
- package/dist/assets/{90.advanced-DcSeiSZJ.js → 90.advanced-hNSc64rO.js} +1 -1
- package/dist/assets/{Accordion-BEPo4ld1.js → Accordion-CedlUpYk.js} +1 -1
- package/dist/assets/{Accordion.stories-BQqvv6_w.js → Accordion.stories-K6mzrdt8.js} +1 -1
- package/dist/assets/{Accordion.tests.stories-CbPTut9X.js → Accordion.tests.stories-B6lTbT6X.js} +1 -1
- package/dist/assets/AlertBanner.primitives.stories-CX03Ob-5.js +14 -0
- package/dist/assets/{AlertBanner.stories-CMG9DJ2x.js → AlertBanner.stories-Cla7i7qF.js} +2 -2
- package/dist/assets/{AlertBannerText-CmhnTe_E.js → AlertBannerAction-CW-WBC-Q.js} +39 -39
- package/dist/assets/{AlertDialog.stories-DizQy7gK.js → AlertDialog.stories-BKmaZZoo.js} +1 -1
- package/dist/assets/{Avatar-DooDODLU.js → Avatar-Dlo9b83e.js} +1 -1
- package/dist/assets/{Avatar.stories-D7qshDw_.js → Avatar.stories-B27rtxK8.js} +1 -1
- package/dist/assets/{AvatarWithStatus.stories-Dj6jZHHV.js → AvatarWithStatus.stories-DBeEaQQL.js} +1 -1
- package/dist/assets/{Badge-e3LEfrfi.css → Badge-BVnE8GHY.css} +1 -1
- package/dist/assets/Badge-CEZW6Ww4.js +10 -0
- package/dist/assets/Badge.stories-ioY8q4d7.js +90 -0
- package/dist/assets/{Box.stories-CHbntlOv.js → Box.stories-udfSjNu1.js} +1 -1
- package/dist/assets/{BubbleCounter.stories-DTv3QqdJ.js → BubbleCounter.stories-D2G7jKKI.js} +1 -1
- package/dist/assets/{Button-KCBOR544.js → Button-DS2bg8PO.js} +3 -3
- package/dist/assets/{Button.stories-pEk6dWrs.js → Button.stories-VD5Bx8BA.js} +1 -1
- package/dist/assets/{Button-6DthIrMV.css → ButtonBase-Bv11I0L0.css} +1 -1
- package/dist/assets/ButtonBase-CPJxprWJ.js +1 -0
- package/dist/assets/{ButtonBase-D1x6yeKi.js → ButtonBase-sV1YoG7h.js} +2 -2
- package/dist/assets/{CalloutBanner.stories-C-mTLhQp.js → CalloutBanner.stories-Cda3BZCl.js} +23 -23
- package/dist/assets/{Checkbox-BpQ-rwun.js → Checkbox-Cmmcg7FL.js} +2 -2
- package/dist/assets/{Checkbox.stories-DsN55u_O.js → Checkbox.stories-B0kQw-sr.js} +1 -1
- package/dist/assets/{Checkbox.tests.stories-Bep_STbH.js → Checkbox.tests.stories-DDyVlpZg.js} +1 -1
- package/dist/assets/{Chips.stories-Da8J7RES.js → Chips.stories-DcxW_jqF.js} +1 -1
- package/dist/assets/{Color-ASIRERSW-DWyFOMGN.js → Color-ASIRERSW-9q9Af87o.js} +1 -1
- package/dist/assets/{ComposingPopovers.stories-qqCHKKj8.js → ComposingPopovers.stories-Co69SyGH.js} +1 -1
- package/dist/assets/{CountryFlag-CSGb4nau.js → CountryFlag-BKEpYyWK.js} +18 -18
- package/dist/assets/{CountryFlag.stories-DQpEMYMX.js → CountryFlag.stories-o-8kmOZA.js} +1 -1
- package/dist/assets/{CountryFlag.test.stories-CzcCUxia.js → CountryFlag.test.stories-CKkoBStk.js} +1 -1
- package/dist/assets/Dialog-DaLOtRn0.js +13 -0
- package/dist/assets/{Dialog.primitives.stories-CSDdsj-9.js → Dialog.primitives.stories-CDU4GhAO.js} +1 -1
- package/dist/assets/Dialog.stories-N8LTxdNu.js +324 -0
- package/dist/assets/{Dialog.test.stories-DngMxsX4.js → Dialog.test.stories-tViVBTuF.js} +6 -6
- package/dist/assets/{DialogActions-DTUDyqFX.js → DialogActions-_9FMsJ9P.js} +34 -34
- package/dist/assets/{DialogTitle-DJPc1ITB.js → DialogCloseButton-CDDeMFIL.js} +63 -63
- package/dist/assets/DialogCloseButton-DXcPNZE4.css +1 -0
- package/dist/assets/DismissibleChips-X4A9KOxs.js +1 -0
- package/dist/assets/{DismissibleChips.stories-Bi-ob_1G.js → DismissibleChips.stories-DbnvLIw0.js} +1 -1
- package/dist/assets/{Divider-CPpmQZmq.js → Divider-WS0wDfQZ.js} +1 -1
- package/dist/assets/{Divider.stories-CfHb5qbc.js → Divider.stories-BO1cg142.js} +1 -1
- package/dist/assets/{DocsRenderer-GHJI37HO-DtP4EKUP.js → DocsRenderer-GHJI37HO-CzsXSkAO.js} +2 -2
- package/dist/assets/{DropdownMenu-N9_otewg.js → DropdownMenu-CB6xg9YD.js} +410 -410
- package/dist/assets/{DropdownMenu.stories-CEAGHTed.js → DropdownMenu.stories-E-6mIs-U.js} +2 -2
- package/dist/assets/{FieldButton-CCXniKhy.js → FieldButton-CYcQXg37.js} +1 -1
- package/dist/assets/{FieldButton.stories-CJM_6H-S.js → FieldButton.stories-UNjMUuGT.js} +1 -1
- package/dist/assets/{FormControl-CygcWV_h.js → FormControl-DgD7Nr_L.js} +1 -1
- package/dist/assets/{FormControl.stories-C5u8y2E-.js → FormControl.stories-DlqjswdS.js} +1 -1
- package/dist/assets/{Heading-Bie8QWaf.js → Heading-BPJGe0Bg.js} +1 -1
- package/dist/assets/{Heading.stories-D0fztdY8.js → Heading.stories-B9_Jr0z3.js} +1 -1
- package/dist/assets/{Icon-RSC-D3qlB5DK.js → Icon-RSC-BcGoz5Ez.js} +1 -1
- package/dist/assets/{Icon-BX3I9JNh.js → Icon-kphbe0CE.js} +2 -2
- package/dist/assets/{Icon.stories-By891-S7.js → Icon.stories-CKAjKBCa.js} +1 -1
- package/dist/assets/IconButton-D4lbFOKH.js +8 -0
- package/dist/assets/{IconTile.stories-Dns_iBHK.js → IconTile.stories-BlATLdyV.js} +1 -1
- package/dist/assets/{Input-DwA6-keB.js → Input-Cp2OkxN8.js} +19 -19
- package/dist/assets/{InputContainer-BM2ePliH.js → InputContainer-BlXlJbfJ.js} +1 -1
- package/dist/assets/{IntegrationWithReactHookForm.stories-mIoeMj7y.js → IntegrationWithReactHookForm.stories-BstJWvGF.js} +1 -1
- package/dist/assets/{IntlFormattedCurrency.stories-7qKke3dW.js → IntlFormattedCurrency.stories-CXBsKa8I.js} +9 -9
- package/dist/assets/{IntlFormattedDateTime.stories-C2pI0ems.js → IntlFormattedDateTime.stories-m5rFuyxv.js} +7 -7
- package/dist/assets/{LayoutFlex-0WdUDfah.js → LayoutFlex-Drgj-jqd.js} +1 -1
- package/dist/assets/{LayoutFlex-BnIoY5YK.js → LayoutFlex-p_p7LCCd.js} +1 -1
- package/dist/assets/{LayoutFlexItem-9sCC-db-.js → LayoutFlexItem-DrxhQlf5.js} +1 -1
- package/dist/assets/{LayoutGrid-DfyCnoOo.js → LayoutGrid-DZv08iKe.js} +1 -1
- package/dist/assets/{LayoutGrid-DqPWofJQ.js → LayoutGrid-eROIp1sZ.js} +1 -1
- package/dist/assets/{LayoutGrid.stories-CPzyKie2.js → LayoutGrid.stories-DAnbCvD6.js} +1 -1
- package/dist/assets/{LayoutGridItem-BhNbXpRk.js → LayoutGridItem-DiU_IdjQ.js} +1 -1
- package/dist/assets/{Link-C686zlPi.js → Link-BHV5DCu-.js} +2 -2
- package/dist/assets/{Link.stories-NTXG_YAN.js → Link.stories-CFRsbzfM.js} +1 -1
- package/dist/assets/{Loader.stories-CobXaiZW.js → Loader.stories-bvaq9oGD.js} +1 -1
- package/dist/assets/MultiSelectChips-CVg9kaKd.js +2 -0
- package/dist/assets/{MultiSelectChips.stories-D8qk9Xh6.js → MultiSelectChips.stories-DOiIDnhX.js} +1 -1
- package/dist/assets/{NativeSelectField.stories-BDO41u_T.js → NativeSelectField.stories-DojmcjvT.js} +23 -23
- package/dist/assets/NumberField-FWK2ErPL.js +6 -0
- package/dist/assets/{NumberField.stories-Dcw2SaBe.js → NumberField.stories-BEVJXeBn.js} +1 -1
- package/dist/assets/{ObserveIntersection-Be6WqdPA.js → ObserveIntersection-MtxhRIzU.js} +2 -2
- package/dist/assets/{ObserveIntersection.stories-DZmhDs2t.js → ObserveIntersection.stories-0f-z6V25.js} +1 -1
- package/dist/assets/{OnboardingTooltip-CsTure6K.js → OnboardingTooltip-DdKwzkB-.js} +1 -1
- package/dist/assets/{OnboardingTooltip.stories-C_B-G4_v.js → OnboardingTooltip.stories-DV2yAiRE.js} +1 -1
- package/dist/assets/{OnboardingTooltip.tests.stories-CpZhGhGz.js → OnboardingTooltip.tests.stories-32a4fLzf.js} +1 -1
- package/dist/assets/{OnboardingTour-Dsl4caiq.js → OnboardingTour-m4V6QT-X.js} +1 -1
- package/dist/assets/{OnboardingTour.stories-DqC8M1Kd.js → OnboardingTour.stories-dLZBYgbr.js} +2 -2
- package/dist/assets/{OnboardingTour.tests.stories-DGFSuiWj.js → OnboardingTour.tests.stories-BnPXyzmi.js} +1 -1
- package/dist/assets/PasswordField-Bp2beBoD.js +6 -0
- package/dist/assets/{PasswordField.stories-CZeXEfzi.js → PasswordField.stories-BxnBBn2_.js} +1 -1
- package/dist/assets/{PreplyLogo.stories-shAJfg57.js → PreplyLogo.stories-BuK8vK1R.js} +2 -2
- package/dist/assets/{ProgressBar.stories-iYTaP7-a.js → ProgressBar.stories-CwpXa86g.js} +1 -1
- package/dist/assets/{ProgressSteps-Dq6mpMpu.js → ProgressSteps-DCVAFT7X.js} +1 -1
- package/dist/assets/{ProgressSteps.stories-DHMPLYQI.js → ProgressSteps.stories--reXlzAk.js} +1 -1
- package/dist/assets/{PromoDialog-D8vw3Grl.js → PromoDialog-BPWEGGGS.js} +1 -1
- package/dist/assets/{RangeSlider-Bhq0kPco.js → RangeSlider-BKIG-XfV.js} +1 -1
- package/dist/assets/{RangeSlider.stories-g3pQNpDu.js → RangeSlider.stories-Dr7UfAUm.js} +1 -1
- package/dist/assets/{Rating.stories-CjioX0Al.js → Rating.stories-Cmpcr64W.js} +1 -1
- package/dist/assets/{RatingInput.stories-D33p4lyo.js → RatingInput.stories-DWxrhIwu.js} +2 -2
- package/dist/assets/{SelectField-Dndb8yfM.js → SelectField-BRicVVj7.js} +9 -9
- package/dist/assets/{SelectField.stories-CvIWxsEK.js → SelectField.stories-D6sJHBcs.js} +1 -1
- package/dist/assets/{ShowOnIntersection.stories-dFG1F9xz.js → ShowOnIntersection.stories-DT94aTYJ.js} +1 -1
- package/dist/assets/SingleSelectChips-B1d9MkC-.js +2 -0
- package/dist/assets/{SingleSelectChips.stories-CUP8Bkco.js → SingleSelectChips.stories-QdsPQJO8.js} +1 -1
- package/dist/assets/{Slider-BECc3Wis.js → Slider-CVM0huNa.js} +1 -1
- package/dist/assets/{Slider.stories-DjmgzkjU.js → Slider.stories-UCLuhto1.js} +1 -1
- package/dist/assets/{Spinner-lj2QA4al.js → Spinner-BG27lVzS.js} +1 -1
- package/dist/assets/{Stars-jpVWvTeN.js → Stars-St7ZRTZK.js} +1 -1
- package/dist/assets/{Steps-GOg1wsKY.js → Steps-CBqiqb-6.js} +1 -1
- package/dist/assets/{Steps.stories-kIC1j0Ik.js → Steps.stories-DOWMlpTM.js} +1 -1
- package/dist/assets/{Switch-7aX4SIla.js → Switch-DJROHOKs.js} +1 -1
- package/dist/assets/{Switch.stories-DT7OULK4.js → Switch.stories-C9cCCv8l.js} +1 -1
- package/dist/assets/{Text-cq49jjad.js → Text-C8DrHLQF.js} +1 -1
- package/dist/assets/{Text-CmJvwKqR.js → Text-FXv4P3JX.js} +1 -1
- package/dist/assets/{Text.stories-CS1pqas4.js → Text.stories-Cmn2Kn0h.js} +1 -1
- package/dist/assets/TextField--Ctd_eHi.js +6 -0
- package/dist/assets/{TextField.stories-CzFG171A.js → TextField.stories-Bly_tLuN.js} +1 -1
- package/dist/assets/{TextHighlighted.stories-CLRQJAB8.js → TextHighlighted.stories-CdIzDMMS.js} +1 -1
- package/dist/assets/{TextInline.stories-DSzsl_kb.js → TextInline.stories-NWWAzVY1.js} +1 -1
- package/dist/assets/{TextareaField-DBMUxHiI.js → TextareaField-DDEIieQg.js} +23 -23
- package/dist/assets/{TextareaField.stories-CUD2MBoL.js → TextareaField.stories-CyuOlu4z.js} +1 -1
- package/dist/assets/{Toast.stories-DPD668gP.js → Toast.stories-BFWVkg8-.js} +1 -1
- package/dist/assets/{TokyoUIAttach-BtX3U917.js → TokyoUIAttach-Bj2xsZ5E.js} +1 -1
- package/dist/assets/{TokyoUIAvailability7LateNight-CjHQEFhh.js → TokyoUIAvailability7LateNight-CyPCBR0g.js} +1 -1
- package/dist/assets/{TokyoUICheck-DfGyg7qp.js → TokyoUICheck-Cg3ZJnmD.js} +1 -1
- package/dist/assets/{TokyoUICheckmark-CittwpP4.js → TokyoUICheckmark-CPDgq6wU.js} +1 -1
- package/dist/assets/{TokyoUIChevronDown-D9z1Bocr.js → TokyoUIChevronDown-CqAWFBEe.js} +1 -1
- package/dist/assets/{TokyoUIChevronRight-DQBrjC0F.js → TokyoUIChevronRight-UHMBQAxX.js} +1 -1
- package/dist/assets/{TokyoUIClose-C1pVTvLz.js → TokyoUIClose-DoJfpCh8.js} +1 -1
- package/dist/assets/{TokyoUIEmojiFrowning-D-sR3DAq.js → TokyoUIEmojiFrowning-Bztw_WuD.js} +1 -1
- package/dist/assets/{TokyoUIErrorWarning-CDZ53m2_.js → TokyoUIErrorWarning-CE6C7y8g.js} +1 -1
- package/dist/assets/{TokyoUIExerciseClosedGapsJumble-DYuDUGYW.js → TokyoUIExerciseClosedGapsJumble-OGZLJcQZ.js} +1 -1
- package/dist/assets/{TokyoUIEye-Bgb_ZF1l.js → TokyoUIEye-BRl8T4Ci.js} +1 -1
- package/dist/assets/{TokyoUIFav-B1z6F-nK.js → TokyoUIFav-w08HsdRu.js} +1 -1
- package/dist/assets/{TokyoUIInfo-CwPA0O_V.js → TokyoUIInfo-BoGHBgEW.js} +1 -1
- package/dist/assets/{TokyoUILanguage-Cnby-Siw.js → TokyoUILanguage-Bd98PINi.js} +1 -1
- package/dist/assets/{TokyoUILibraryExplore-D3Zqdc29.js → TokyoUILibraryExplore-C-3tnEbW.js} +1 -1
- package/dist/assets/{TokyoUILock-BVVVVd2O.js → TokyoUILock-d81cInRU.js} +1 -1
- package/dist/assets/{TokyoUIMessages-B0IlDk1q.js → TokyoUIMessages-0is9ybHR.js} +1 -1
- package/dist/assets/{TokyoUIMinus-Bev2a7lF.js → TokyoUIMinus-DPJ4shry.js} +1 -1
- package/dist/assets/{TokyoUINotebook-BCMFA3qu.js → TokyoUINotebook-DLrYm4si.js} +1 -1
- package/dist/assets/{TokyoUINotesWithPad-Bi4bu_3q.js → TokyoUINotesWithPad-D6VO7CbF.js} +1 -1
- package/dist/assets/{TokyoUIPhone-CX3CAtW4.js → TokyoUIPhone-bFlwEn-_.js} +1 -1
- package/dist/assets/{TokyoUISettings-BlCV0s5R.js → TokyoUISettings-DhHyIlWv.js} +1 -1
- package/dist/assets/{TokyoUISparkle-C5euAhof.js → TokyoUISparkle-B1jtDvOV.js} +1 -1
- package/dist/assets/{TokyoUIStarFilled-Dm7Rk3-6.js → TokyoUIStarFilled-Cj894376.js} +1 -1
- package/dist/assets/{TokyoUITag-CxUsuh1h.js → TokyoUITag-fMAL09F9.js} +1 -1
- package/dist/assets/{TokyoUIUpload-C50QSO0I.js → TokyoUIUpload-DM2TbvbX.js} +1 -1
- package/dist/assets/{TokyoUIUser-Cb3Rabu0.js → TokyoUIUser-Ba7_NA45.js} +1 -1
- package/dist/assets/{Tooltip-Zk6DNyQp.js → Tooltip-DDtzGgNm.js} +1 -1
- package/dist/assets/{Tooltip.stories-DvCDg7L5.js → Tooltip.stories-j1bsH2PP.js} +1 -1
- package/dist/assets/{Tooltip.tests.stories-DhLZuVsr.js → Tooltip.tests.stories-DFas0O9K.js} +1 -1
- package/dist/assets/{VisuallyHidden-lSSiGvdb.js → VisuallyHidden-GZBFKPVs.js} +1 -1
- package/dist/assets/{WithTooltip-IO6J4KBT-BXUfDxdY.js → WithTooltip-IO6J4KBT-2Wz16aqd.js} +1 -1
- package/dist/assets/{align-self-kXdO3hx1.js → align-self-D0ug8REo.js} +1 -1
- package/dist/assets/{axe-D9-qZHEg.js → axe-BcoLkzU-.js} +1 -1
- package/dist/assets/{breakpoints-QW-40zGS.js → breakpoints-BBwYud6y.js} +1 -1
- package/dist/assets/{breakpoints-C7qnntd1.js → breakpoints-BDFtAvFy.js} +1 -1
- package/dist/assets/{breakpoints-Cmpvj56z.js → breakpoints-CIy8w3Dv.js} +1 -1
- package/dist/assets/{changelog-BWMxpTM2.js → changelog-DIkUnuOo.js} +23 -1
- package/dist/assets/{client-DvDoBCIp.js → client-oIdhQPH3.js} +1 -1
- package/dist/assets/{constants-6ClT3n6m.js → constants-Cwb-3GQ_.js} +47 -47
- package/dist/assets/{createRequiredContext-63KJmEaI.js → createRequiredContext-5BPDYgIa.js} +87 -87
- package/dist/assets/fonts-explorer-B5KcfnOG.css +1 -0
- package/dist/assets/fonts-explorer.stories-Bp_9af2z.js +130 -0
- package/dist/assets/{formatter-QJ4M4OGQ-kybJ6bB6.js → formatter-QJ4M4OGQ-D2xZe9AO.js} +1 -1
- package/dist/assets/{getTokenVar-CszfVUbW.js → getTokenVar-B7BEyIpS.js} +1 -1
- package/dist/assets/getTokenVar-B8jDl0Ui.js +1 -0
- package/dist/assets/{gradientBorders-DRFre4M2.js → gradientBorders-B12ps1Or.js} +1 -1
- package/dist/assets/{hover-DLl5EEx6.js → hover-5BxL9d9v.js} +1 -1
- package/dist/assets/{hover-DVoxXiPd.js → hover-CG8OgvC5.js} +1 -1
- package/dist/assets/{hover-D3OYWSUH.js → hover-gsGL4vVH.js} +1 -1
- package/dist/assets/{iframe-CpMEswOF.js → iframe-DjYTJz7A.js} +8 -8
- package/dist/assets/{index-B_7ihsZD.js → index-BII7aPfQ.js} +1 -1
- package/dist/assets/{index-DT-MbRPK.js → index-CUvrBGJo.js} +1 -1
- package/dist/assets/{index-jLr7d-Kb.js → index-C_O4jEc0.js} +1 -1
- package/dist/assets/{index-IVtS1ZoW.js → index-DHDwwoCu.js} +1 -1
- package/dist/assets/{index-dUCHvwfu.js → index-DOwxXd3L.js} +1 -1
- package/dist/assets/{index-Cc28ZUNU.js → index-cpi3YaXo.js} +1 -1
- package/dist/assets/{intro-1RVcci_B.js → intro-BXKxOrdm.js} +1 -1
- package/dist/assets/{layout-relative-Bq7IHzTJ.js → layout-relative-DQF7VcUK.js} +1 -1
- package/dist/assets/{layout-relative.module-1z75aSwo-B4ha7m6U.js → layout-relative.module-1z75aSwo-CsvB7_pT.js} +1 -1
- package/dist/assets/{layout-relative.module-Bhi7U482.js → layout-relative.module-BM7yIsEb.js} +1 -1
- package/dist/assets/{mcp-D4dEnAH6.js → mcp-X-VhpP6n.js} +1 -1
- package/dist/assets/{message-CTdBLxyt.js → message-DiUVdAQd.js} +1 -1
- package/dist/assets/{migrating-from-less-DyPFNe_D.js → migrating-from-less-8Nm2XYdW.js} +1 -1
- package/dist/assets/{playground.stories-Cd-KauE2.js → playground.stories-B4hfD_Uq.js} +1 -1
- package/dist/assets/{react-18-B6ZQhKaW.js → react-18-B4n119qZ.js} +1 -1
- package/dist/assets/{render-icon-c7okze1K.js → render-icon-DZ6hllTG.js} +1 -1
- package/dist/assets/{render-icon-CiYBms-s.js → render-icon-DlE4AZJV.js} +1 -1
- package/dist/assets/{shared-strings-BChji30Y.js → shared-strings-ZccoNgto.js} +1 -1
- package/dist/assets/{styled-components.browser.esm-Cm3dhVk9.js → styled-components.browser.esm-3T8u8x7l.js} +1 -1
- package/dist/assets/{styled-components.browser.esm-DsMoKq9m.js → styled-components.browser.esm-DegKtid9.js} +1 -1
- package/dist/assets/{syntaxhighlighter-IQDEPFLK-ckmVX3NN.js → syntaxhighlighter-IQDEPFLK-B-ddKj4v.js} +1 -1
- package/dist/assets/{text-accent-DZ_ihUdH.js → text-accent-C5-m5mrW.js} +1 -1
- package/dist/assets/{text-centered-B26ac1NU.js → text-centered-CqZrbSb_.js} +1 -1
- package/dist/assets/{text-centered-DiwR-QSx.js → text-centered-D70wah8Y.js} +1 -1
- package/dist/assets/{tokens-DO-XJjoF.js → tokens-BXEYWkXR.js} +1 -1
- package/dist/assets/{tokens-B_sXFQpU.js → tokens-CBFYFIpi.js} +1 -1
- package/dist/assets/{tokens-5M__FcH-.js → tokens-ChCvx9cz.js} +1 -1
- package/dist/assets/{tokens-DTCyqZ0W.js → tokens-Cp4gIGSO.js} +1 -1
- package/dist/assets/{useControllableState-ouxkeS_b.js → useControllableState-DQg81cp5.js} +1 -1
- package/dist/assets/useHostname-By9vNKnQ.js +1 -0
- package/dist/assets/{useMergeRefs-DkQLsYW4.js → useMergeRefs-CL5DIjXV.js} +1 -1
- package/dist/assets/{useMergeRefs-BVh7Ch_S.js → useMergeRefs-jFGYKOXz.js} +1 -1
- package/dist/assets/{useOpenInteractionType-BBP_TXgz.js → useOpenInteractionType-B976GY1b.js} +1 -1
- package/dist/assets/{usePortalElement-Cm2Hqn3J.js → usePortalElement-B3bWjUcx.js} +1 -1
- package/dist/assets/{useStableCallback-DHq1eG2Q.js → useStableCallback-662ysKf2.js} +1 -1
- package/dist/assets/{useToken-CX1vf7pV.js → useToken-CJ7hsZh9.js} +1 -1
- package/dist/assets/{welcome-CNokV_38.js → welcome-bR5y4uLm.js} +1 -1
- package/dist/assets/{zeroheight-8zVSToXs.js → zeroheight-D-Xst36e.js} +1 -1
- package/dist/iframe.html +1 -1
- package/dist/index.json +1 -1
- package/dist/preview-stats.json +9392 -9440
- package/dist/project.json +1 -1
- package/package.json +5 -5
- package/dist/assets/01-BEFb1grO.css +0 -1
- package/dist/assets/01.semantic-tokens-DaqL26gu.js +0 -11
- package/dist/assets/11.fonts.explorer-ZD_-8450.js +0 -2
- package/dist/assets/AlertBanner.primitives.stories-B8wM25gx.js +0 -14
- package/dist/assets/Badge-BOSHGFZw.js +0 -10
- package/dist/assets/Badge.stories-D2WAGDpD.js +0 -72
- package/dist/assets/Button-C8B7W2Qo.js +0 -1
- package/dist/assets/Dialog-Bmg2gpCM.js +0 -3
- package/dist/assets/Dialog.stories-BfS-yGJK.js +0 -248
- package/dist/assets/DialogTitle-8iZEMHpI.css +0 -1
- package/dist/assets/DismissibleChips-CRFGhm8B.js +0 -1
- package/dist/assets/IconButton-DVKNd7ZK.js +0 -8
- package/dist/assets/MultiSelectChips-DJ1p23QD.js +0 -2
- package/dist/assets/NumberField-DmosE2JM.js +0 -6
- package/dist/assets/PasswordField-DQuar8x2.js +0 -6
- package/dist/assets/SingleSelectChips-BqEBu1qF.js +0 -2
- package/dist/assets/TextField-BkMawuql.js +0 -6
- package/dist/assets/fonts-explorer-BKje7Hq_.css +0 -1
- package/dist/assets/fonts-explorer.stories-DP7h1C3f.js +0 -130
- package/dist/assets/getTokenVar-DntuTYid.js +0 -1
- package/dist/assets/index-9rU-ZrVj.js +0 -75
- package/dist/assets/useHostname-BVhrcDgi.js +0 -1
- /package/dist/assets/{AlertBannerText-Dgo9FikS.css → AlertBannerAction-Dgo9FikS.css} +0 -0
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import{r as a,g as $e,j as f,z as jc,D as _c,aT as Ss,q as Ht,I as Ms,R as Is,K as ks}from"./iframe-CpMEswOF.js";import{d as Ac,u as Ps}from"./index-DT-MbRPK.js";import{w as we}from"./componentNames-hc9KR2nX.js";import{M as un}from"./message-CTdBLxyt.js";import{d as Ve,f as Dc}from"./styled-components.browser.esm-Cm3dhVk9.js";import{f as st}from"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import{I as lt,F as Nc,a as Lc,b as Fc,c as Bc,d as $c,e as Vc,f as Uc}from"./TokyoUIExerciseClosedGapsJumble-DYuDUGYW.js";import{a as Wc,B as Os,H as Wn}from"./Button-C8B7W2Qo.js";import{T as Ze}from"./Text-CmJvwKqR.js";import{g as pe}from"./getTokenVar-DntuTYid.js";import{c as It,r as Ts,s as Oe,m as zc}from"./tokens-DTCyqZ0W.js";import{F as Hc}from"./TokyoUIChevronRight-DQBrjC0F.js";import{F as Gc}from"./TokyoUICheck-DfGyg7qp.js";import{B as Kc}from"./breakpoints-BfMlrtxE.js";import{r as qc}from"./render-icon-CiYBms-s.js";const Yc="badge__Aj95L",Xc="label__F86ML",Or={badge:Yc,label:Xc},Zc=e=>{switch(e){case"xs":return"small";case"s":return"medium";case"m":return"large";default:return e}},Kn=a.forwardRef(function({type:t="neutral",size:n="medium",leadingSvgIcon:o,dataset:r,children:s,accent:i,inverted:c,hideLabel:l,...u},p){const d=Zc(n),g={...r,size:d};i===void 0&&c===void 0?g.type=t:(g.accent=i||"unset",g.inverted=!!c);const m={...st(u),ref:p,className:Or.badge,...$e(g,{preplyDsComponent:we.Badge})},b=t==="neutral"||t==="ai"?"primary":t;return f.jsxs("span",{...m,children:[!!o&&f.jsx(lt,{accent:b,size:n==="large"?"24":"16",svg:o}),f.jsx("span",{className:Or.label,"data-hidden":l,children:s})]})});Kn.__docgenInfo={description:"",methods:[],displayName:"Badge",props:{type:{defaultValue:{value:'"neutral"',computed:!1},required:!1},size:{defaultValue:{value:'"medium"',computed:!1},required:!1}}};const Qc="cutout__1sEQk",Jc={cutout:Qc},ea="IconButton__FZTVy",ta={IconButton:ea},Qo=a.forwardRef(function({variant:t=_c,size:n=jc,url:o,a11yLabel:r,svg:s,...i},c){const l=[ta.IconButton,Jc.cutout].join(" ");return f.jsx(Wc,{...i,ref:c,className:l,isIconButton:!0,variant:t,size:n,url:o,a11yLabel:r,preplyDsComponent:we.IconButton,children:qc(s,{"aria-hidden":"true",focusable:"false"})})});Qo.__docgenInfo={description:"",methods:[],displayName:"IconButton",props:{variant:{defaultValue:{value:"'primary'",computed:!1},required:!1},size:{defaultValue:{value:"'small'",computed:!1},required:!1}}};const na=Ac({remove:{id:"preply-ds.genericAriaLabels.remove",defaultMessage:[{type:0,value:"Remove"}]},close:{id:"preply-ds.genericAriaLabels.close",defaultMessage:[{type:0,value:"Close"}]},confirm:{id:"preply-ds.genericAriaLabels.confirm",defaultMessage:[{type:0,value:"Confirm"}]},cancel:{id:"preply-ds.genericAriaLabels.cancel",defaultMessage:[{type:0,value:"Cancel"}]}});function oa(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e},[e]),a.useCallback(((...o)=>{var r;return(r=t.current)==null?void 0:r.call(t,...o)}),[])}function ra({value:e,defaultValue:t,onValueChange:n}){const o=e!==void 0,[r,s]=a.useState(o?e:t);a.useEffect(()=>{o&&e!==r&&s(e)},[o,e,r]);const i=oa(n),c=a.useCallback(u=>{o||s(u),i(u)},[o,i]);return[o?e:r,c]}const sa="visuallyHidden__u7xQ9",ia={visuallyHidden:sa};function ca({as:e="span",children:t}){const n=e??"span";return f.jsx(n,{className:ia.visuallyHidden,children:t})}const aa="ProgressSteps__FoPeH",la="step__iXjRm",Tr={ProgressSteps:aa,step:la},ua=({totalSteps:e,currentStep:t,"aria-label":n,dataset:o})=>{const{formatMessage:r}=Ps(),s=$e(o,{preplyDsComponent:we.ProgressSteps});return f.jsx("div",{...s,className:Tr.ProgressSteps,role:"progressbar","aria-label":n,"aria-valuemin":1,"aria-valuemax":e,"aria-valuenow":t,"aria-valuetext":r({id:"preply-ds.steps.progress",defaultMessage:[{type:0,value:"Step "},{type:1,value:"currentStep"},{type:0,value:" of "},{type:1,value:"totalSteps"}]},{currentStep:t,totalSteps:e}),children:Array.from({length:e}).map((i,c)=>f.jsx("div",{className:Tr.step,"data-active":c<=t-1,"aria-current":c===t-1?"step":void 0},c))})},da="steps__BxrkC",fa="header__HFxfM",Fo={steps:da,header:fa},js=a.createContext(void 0),Jo=()=>{const e=a.useContext(js);if(e===void 0)throw new Error("Steps navigation components must be used within a Steps component");return e||{}},pa=a.forwardRef(function({onClick:t,disabled:n,variant:o="ghost",...r},s){const{goToPreviousStep:i,currentStep:c,isNavigating:l,contentId:u}=Jo();return f.jsx(Os,{...r,ref:s,size:"medium",variant:o,onClick:p=>{t==null||t(p),!p.defaultPrevented&&i()},disabled:c===1||l||n,"aria-controls":u,children:r.children||f.jsx(un,{id:"preply-ds.steps.previous",defaultMessage:[{type:0,value:"Previous"}]})})}),ma=a.forwardRef(function({onClick:t,disabled:n,variant:o="primary",...r},s){const{goToNextStep:i,currentStep:c,totalSteps:l,isNavigating:u,contentId:p}=Jo();return f.jsx(Os,{...r,ref:s,size:"medium",variant:o,onClick:d=>{t==null||t(d),!d.defaultPrevented&&i()},disabled:c===l||u||n,"aria-controls":p,children:r.children||f.jsx(un,{id:"preply-ds.steps.next",defaultMessage:[{type:0,value:"Next"}]})})}),ga=({children:e,"aria-label":t,initialStep:n=1,onStepChange:o,dataset:r})=>{const s=a.useId(),[i,c]=a.useState(n),[l,u]=a.useState(!1),p=[],d=[];e==null||e.forEach(R=>{a.isValidElement(R)&&R.type===_s?p.push(R):d.push(R)});const g=p.length,m=$e(r,{preplyDsComponent:we.Steps}),b=async R=>{const w=Math.min(Math.max(R,1),g);if(!o){c(w);return}u(!0);try{const E=await o(i,w);c(E??w)}finally{u(!1)}},y={goToPreviousStep:()=>b(i-1),goToNextStep:()=>b(i+1),goToStep:R=>b(R),currentStep:i,totalSteps:g,isNavigating:l,contentId:s};return f.jsxs("div",{...m,className:Fo.steps,id:s,"aria-live":"polite","aria-busy":l,children:[f.jsx(ua,{currentStep:i,totalSteps:g,"aria-label":t}),f.jsx("div",{className:Fo.content,children:f.jsxs(js.Provider,{value:y,children:[p[i-1],d]})})]})},_s=({title:e,description:t,children:n,hideHeader:o})=>f.jsxs(f.Fragment,{children:[f.jsxs("hgroup",{className:Fo.header,hidden:o,children:[f.jsx(Wn,{tag:"h3",variant:{_:"medium","medium-l":"large"},children:e}),t&&f.jsx(Ze,{variant:"default-regular",accent:"secondary",children:t})]}),n]}),io=Object.assign(ga,{Step:_s,Previous:pa,Next:ma}),ha="dialog__80F7X",va="footer__xkM-4",ba="overlay__otkvG",xa="close__-TGOq",ya="title__tGVp1",wa="description__84a0F",Ra="header__ADm9A",Ca="scrollEndDetector__Zrfqq",Ea="buttonStack__KhEjj",Sa="stepControls__FoOIr",Ma="previous__q2IlS",Ia="next__h6v4X",qe={dialog:ha,footer:va,overlay:ba,close:xa,title:ya,description:wa,header:Ra,scrollEndDetector:Ca,buttonStack:Ea,stepControls:Sa,previous:Ma,next:Ia},er=({children:e,className:t,dataset:n,...o})=>{const r=a.useRef(null),s=a.useRef(null),i=[qe.footer,t].filter(Boolean).join(" "),c=$e(n,{preplyDsComponent:we.DialogFooter});return a.useLayoutEffect(()=>{if(!s.current||!r.current)return;const l=new IntersectionObserver(([u])=>{var p;(p=s.current)==null||p.toggleAttribute("data-sticky",!u.isIntersecting)},{root:s.current.closest("[role=dialog]"),rootMargin:`0px 0px -${s.current.offsetHeight}px 0px`});return l.observe(r.current),()=>l.disconnect()},[]),f.jsxs(f.Fragment,{children:[f.jsx("div",{className:qe.scrollEndDetector,ref:r}),f.jsx("footer",{className:i,ref:s,...c,...o,children:e})]})},ka=io,Pa=io.Step,As=io.Next,Ds=io.Previous;function Oa({primaryButton:e,nextButton:t=f.jsx(As,{}),previousButton:n=f.jsx(Ds,{})}){const{currentStep:o,totalSteps:r}=Jo(),s=o===1,i=o===r;return f.jsx(er,{children:f.jsxs("div",{className:qe.stepControls,"data-preply-ds-component":we.DialogSteps,children:[!s&&f.jsx("div",{className:qe.previous,"data-preply-ds-component":we.DialogStepsPreviousContainer,children:n}),f.jsx("div",{className:qe.next,"data-preply-ds-component":we.DialogStepsNextContainer,children:i?e:t})]})})}const tr=a.forwardRef(function({children:t,className:n,dataset:o,...r},s){const i=[qe.buttonStack,n].filter(Boolean).join(" "),c=$e(o);return f.jsx("div",{ref:s,className:i,"data-preply-ds-component":we.DialogButtonStack,...c,...r,children:t})});tr.__docgenInfo={description:"",methods:[],displayName:"DialogButtonStack"};const jr={};function ut(e,t){const n=a.useRef(jr);return n.current===jr&&(n.current=e(t)),n}function Ns(){}const _r=Object.freeze([]),_e=Object.freeze({});function ot(e,t,n,o){const r=ut(Ls).current;return ja(r,e,t,n,o)&&Fs(r,[e,t,n,o]),r.callback}function Ta(e){const t=ut(Ls).current;return _a(t,e)&&Fs(t,e),t.callback}function Ls(){return{callback:null,cleanup:null,refs:[]}}function ja(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function _a(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function Fs(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(o[r]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const i=o[r];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const Aa=parseInt(a.version,10);function Bs(e){return Aa>=e}function $s(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Da(e,t){const n={};for(const o in e){const r=e[o];if(t!=null&&t.hasOwnProperty(o)){const s=t[o](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function Na(e,t){return typeof e=="function"?e(t):e}const rn={};function Gt(e,t,n,o,r){let s={...Bo(e,rn)};return t&&(s=zn(s,t)),n&&(s=zn(s,n)),o&&(s=zn(s,o)),s}function La(e){if(e.length===0)return rn;if(e.length===1)return Bo(e[0],rn);let t={...Bo(e[0],rn)};for(let n=1;n<e.length;n+=1)t=zn(t,e[n]);return t}function zn(e,t){return Vs(t)?t(e):Fa(e,t)}function Fa(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":{e[n]=$s(e.style,o);break}case"className":{e[n]=Us(e.className,o);break}default:Ba(n,o)?e[n]=$a(e[n],o):e[n]=o}}return e}function Ba(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Vs(e){return typeof e=="function"}function Bo(e,t){return Vs(e)?e(t):e??rn}function $a(e,t){return t?e?n=>{if(Va(n)){const r=n;$o(r);const s=t(r);return r.baseUIHandlerPrevented||e==null||e(r),s}const o=t(n);return e==null||e(n),o}:t:e}function $o(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Us(e,t){return t?e?t+" "+e:t:e}function Va(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ve(e,t,n={}){var o;const r=t.render,s=Ua(t,n);if(n.enabled===!1)return null;const i=(o=n.state)!=null?o:_e;return Wa(e,r,s,i)}function Ua(e,t={}){var n;const{className:o,render:r}=e,{state:s=_e,ref:i,props:c,stateAttributesMapping:l,enabled:u=!0}=t,p=u?Na(o,s):void 0,d=u?Da(s,l):_e,g=u&&(n=$s(d,Array.isArray(c)?La(c):c))!=null?n:_e;return typeof document<"u"&&(u?Array.isArray(i)?g.ref=Ta([g.ref,Ar(r),...i]):g.ref=ot(g.ref,Ar(r),i):ot(null,null)),u?(p!==void 0&&(g.className=Us(g.className,p)),g):_e}function Wa(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);const r=Gt(n,t.props);return r.ref=n.ref,a.cloneElement(t,r)}if(e&&typeof e=="string")return za(e,n);throw new Error("Base UI: Render element or function are not defined.")}function za(e,t){return e==="button"?f.jsx("button",{type:"button",...t}):e==="img"?f.jsx("img",{alt:"",...t}):a.createElement(e,t)}function Ar(e){return e&&typeof e!="function"?Bs(19)?e.props.ref:e.ref:null}ve.__docgenInfo={description:"",methods:[],displayName:"useRenderElement"};const yo=Ss[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Ha=yo&&yo!==a.useLayoutEffect?yo:e=>e();function J(e){const t=ut(Ga).current;return t.next=e,Ha(t.effect),t.trampoline}function Ga(){const e={next:void 0,callback:Ka,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Ka(){}const qa=()=>{},oe=typeof document<"u"?a.useLayoutEffect:qa;function ue(e,t,n){let o=!1,r=!1;const s=_e;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){r=!0},get isCanceled(){return o},get isPropagationAllowed(){return r},...s}}function co(){return typeof window<"u"}function xt(e){return nr(e)?(e.nodeName||"").toLowerCase():"#document"}function Ee(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function it(e){var t;return(t=(nr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nr(e){return co()?e instanceof Node||e instanceof Ee(e).Node:!1}function de(e){return co()?e instanceof Element||e instanceof Ee(e).Element:!1}function he(e){return co()?e instanceof HTMLElement||e instanceof Ee(e).HTMLElement:!1}function Vo(e){return!co()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ee(e).ShadowRoot}const Ya=new Set(["inline","contents"]);function pn(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Ya.has(r)}const Xa=new Set(["table","td","th"]);function Za(e){return Xa.has(xt(e))}const Qa=[":popover-open",":modal"];function ao(e){return Qa.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ja=["transform","translate","scale","rotate","perspective"],el=["transform","translate","scale","rotate","perspective","filter"],tl=["paint","layout","strict","content"];function or(e){const t=lo(),n=de(e)?Ye(e):e;return Ja.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||el.some(o=>(n.willChange||"").includes(o))||tl.some(o=>(n.contain||"").includes(o))}function nl(e){let t=rt(e);for(;he(t)&&!tt(t);){if(or(t))return t;if(ao(t))return null;t=rt(t)}return null}function lo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ol=new Set(["html","body","#document"]);function tt(e){return ol.has(xt(e))}function Ye(e){return Ee(e).getComputedStyle(e)}function uo(e){return de(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rt(e){if(xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vo(e)&&e.host||it(e);return Vo(t)?t.host:t}function Ws(e){const t=rt(e);return tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:he(t)&&pn(t)?t:Ws(t)}function ht(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ws(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=Ee(r);if(s){const c=Uo(i);return t.concat(i,i.visualViewport||[],pn(r)?r:[],c&&n?ht(c):[])}return t.concat(r,ht(r,[],n))}function Uo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const rl=a.createContext(void 0);function zs(e=!1){const t=a.useContext(rl);if(t===void 0&&!e)throw new Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return t}function sl(e){const{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:r=0,isNativeButton:s}=e,i=o&&t!==!1,c=o&&t===!1;return{props:a.useMemo(()=>{const u={onKeyDown(p){n&&t&&p.key!=="Tab"&&p.preventDefault()}};return o||(u.tabIndex=r,!s&&n&&(u.tabIndex=t?r:-1)),(s&&(t||i)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||c)&&(u.disabled=n),u},[o,n,t,i,c,s,r])}}function rr(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:r=!0}=e,s=a.useRef(null),i=zs(!0)!==void 0,c=J(()=>{const g=s.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:l}=sl({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:o,isNativeButton:r}),u=a.useCallback(()=>{const g=s.current;il(g)&&i&&t&&l.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,l.disabled,i]);oe(u,[u]);const p=a.useCallback((g={})=>{const{onClick:m,onMouseDown:b,onKeyUp:x,onKeyDown:h,onPointerDown:v,...y}=g;return Gt({type:r?"button":void 0,onClick(w){if(t){w.preventDefault();return}m==null||m(w)},onMouseDown(w){t||b==null||b(w)},onKeyDown(w){if(t||($o(w),h==null||h(w)),w.baseUIHandlerPrevented)return;const E=w.target===w.currentTarget&&!r&&!c()&&!t,S=w.key==="Enter",k=w.key===" ";E&&((k||S)&&w.preventDefault(),S&&(m==null||m(w)))},onKeyUp(w){t||($o(w),x==null||x(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!r&&!t&&w.key===" "&&(m==null||m(w))},onPointerDown(w){if(t){w.preventDefault();return}v==null||v(w)}},r?void 0:{role:"button"},l,y)},[t,l,r,c]),d=J(g=>{s.current=g,u()});return{getButtonProps:p,buttonRef:d}}function il(e){return he(e)&&e.tagName==="BUTTON"}const Hs=a.createContext(void 0);function Tt(e){const t=a.useContext(Hs);if(e===!1&&t===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return t}function cl(e){const{open:t,setOpen:n,disabled:o,nativeButton:r}=e,s=J(u=>{t&&n(!1,ue("close-press",u.nativeEvent))}),{getButtonProps:i,buttonRef:c}=rr({disabled:o,native:r});return{getRootProps:u=>Gt({onClick:s},u,i),ref:c}}const al=a.forwardRef(function(t,n){const{render:o,className:r,disabled:s=!1,nativeButton:i=!0,...c}=t,{store:l}=Tt(),u=l.useState("open"),{getRootProps:p,ref:d}=cl({disabled:s,open:u,setOpen:l.setOpen,nativeButton:i}),g=a.useMemo(()=>({disabled:s}),[s]);return ve("button",t,{state:g,ref:[n,d],props:[c,p]})}),ll=({title:e,titleId:t,...n},o)=>a.createElement("svg",{"data-preply-ds-component":"SvgTokyoUIIcon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M7.044 5.63 5.63 7.044l4.95 4.95-4.95 4.95 1.414 1.414 4.95-4.95 4.95 4.95 1.414-1.414-4.95-4.95 4.95-4.95-1.414-1.414-4.95 4.95-4.95-4.95Z",clipRule:"evenodd"})),ul=a.forwardRef(ll),sr=a.forwardRef(function({children:t,className:n},o){const r=[qe.close,n].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:f.jsx(al,{ref:o,render:t??f.jsx(Gs,{})})})}),Gs=a.forwardRef(function(t,n){const{formatMessage:o}=Ps();return f.jsx(Qo,{ref:n,size:"small",variant:"ghost",assistiveText:o(na.close),svg:ul,...t})});sr.__docgenInfo={description:"",methods:[],displayName:"DialogCloseButton"};Gs.__docgenInfo={description:"",methods:[],displayName:"DialogDefaultCloseButton"};const dl={...Ss};let Dr=0;function fl(e,t="mui"){const[n,o]=a.useState(e),r=e||n;return a.useEffect(()=>{n==null&&(Dr+=1,o(`${t}-${Dr}`))},[n,t]),r}const Nr=dl.useId;function Kt(e,t){if(Nr!==void 0){const n=Nr();return e??(t?`${t}-${n}`:n)}return fl(e,t)}function jt(e){return Kt(e,"base-ui")}const pl=a.forwardRef(function(t,n){const{render:o,className:r,id:s,...i}=t,{store:c}=Tt(),l=jt(s);return c.useSyncedValueWithCleanup("descriptionElementId",l),ve("p",t,{ref:n,props:[{id:l},i]})}),ir=a.forwardRef(function({children:t,className:n,dataset:o,...r},s){if(!t)return null;const i=[qe.description,n].filter(Boolean).join(" "),c=$e(o);return f.jsx(pl,{ref:s,className:i,...c,...r,children:t})});ir.__docgenInfo={description:"",methods:[],displayName:"DialogDescription2"};var ml=Object.defineProperty,gl=(e,t,n)=>t in e?ml(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ce=(e,t,n)=>gl(e,typeof t!="symbol"?t+"":t,n);const hl=500,vl=500,bl={style:{transition:"none"}},xl="data-base-ui-click-trigger",yl={fallbackAxisSide:"none"},wl=[];function Ks(e){a.useEffect(e,wl)}const _n=null;class Rl{constructor(){Ce(this,"callbacks",[]),Ce(this,"callbacksCount",0),Ce(this,"nextId",1),Ce(this,"startId",1),Ce(this,"isScheduled",!1),Ce(this,"tick",t=>{var n;this.isScheduled=!1;const o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<o.length;s+=1)(n=o[s])==null||n.call(o,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const An=new Rl;class Je{constructor(){Ce(this,"currentId",_n),Ce(this,"cancel",()=>{this.currentId!==_n&&(An.cancel(this.currentId),this.currentId=_n)}),Ce(this,"disposeEffect",()=>this.cancel)}static create(){return new Je}static request(t){return An.request(t)}static cancel(t){return An.cancel(t)}request(t){this.cancel(),this.currentId=An.request(()=>{this.currentId=_n,t()})}}function cr(){const e=ut(Je.create).current;return Ks(e.disposeEffect),e}function Cl(e,t=!1){const n=cr();return J((o,r=null)=>{if(n.cancel(),e==null)return;let s;if("current"in e){if(e.current==null)return;s=e.current}else s=e;typeof s.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():n.request(()=>{function i(){s&&Promise.allSettled(s.getAnimations().map(c=>c.finished)).then(()=>{r!=null&&r.aborted||Ht.flushSync(o)})}t?n.request(i):i()})})}function fo(e,t=!1,n=!1){const[o,r]=a.useState(e&&t?"idle":void 0),[s,i]=a.useState(e);return e&&!s&&(i(!0),r("starting")),!e&&s&&o!=="ending"&&!n&&r("ending"),!e&&!s&&o==="ending"&&r(void 0),oe(()=>{if(!e&&s&&o!=="ending"&&n){const c=Je.request(()=>{r("ending")});return()=>{Je.cancel(c)}}},[e,s,o,n]),oe(()=>{if(!e||t)return;const c=Je.request(()=>{Ht.flushSync(()=>{r(void 0)})});return()=>{Je.cancel(c)}},[t,e]),oe(()=>{if(!e||!t)return;e&&s&&o!=="idle"&&r("starting");const c=Je.request(()=>{r("idle")});return()=>{Je.cancel(c)}},[t,e,s,r,o]),a.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:o}),[s,o])}let qn=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const El={[qn.startingStyle]:""},Sl={[qn.endingStyle]:""},mn={transitionStatus(e){return e==="starting"?El:e==="ending"?Sl:null}},qt=typeof navigator<"u",wo=kl(),qs=Ol(),Ys=Pl(),Xs=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Ml=wo.platform==="MacIntel"&&wo.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(wo.platform),Zs=qt&&/apple/i.test(navigator.vendor),Wo=qt&&/android/i.test(qs)||/android/i.test(Ys),Il=qt&&qs.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Qs=Ys.includes("jsdom/");function kl(){var e,t;if(!qt)return{platform:"",maxTouchPoints:-1};const n=navigator.userAgentData;return n!=null&&n.platform?{platform:n.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:(e=navigator.platform)!=null?e:"",maxTouchPoints:(t=navigator.maxTouchPoints)!=null?t:-1}}function Pl(){if(!qt)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Ol(){var e;if(!qt)return"";const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:(e=navigator.platform)!=null?e:""}const zo="data-base-ui-focusable",Js="active",ei="selected",Tl="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",vt="ArrowLeft",bt="ArrowRight",ar="ArrowUp",gn="ArrowDown";function et(e){var t;let n=e.activeElement;for(;((t=n==null?void 0:n.shadowRoot)==null?void 0:t.activeElement)!=null;)n=n.shadowRoot.activeElement;return n}function ge(e,t){var n;if(!e||!t)return!1;const o=(n=t.getRootNode)==null?void 0:n.call(t);if(e.contains(t))return!0;if(o&&Vo(o)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ge(e){return"composedPath"in e?e.composedPath()[0]:e.target}function at(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function jl(e){return e.matches("html,body")}function xe(e){return(e==null?void 0:e.ownerDocument)||document}function lr(e){return he(e)&&e.matches(Tl)}function Ho(e){return e?e.getAttribute("role")==="combobox"&&lr(e):!1}function _l(e){if(!e||Qs)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Yn(e){return e?e.hasAttribute(zo)?e:e.querySelector(`[${zo}]`)||e:null}function kt(e,t,n=!0){return e.filter(r=>{var s;return r.parentId===t&&(!n||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...kt(e,r.id,n)])}function Lr(e,t){var n;let o=[],r=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;r;){const s=e.find(i=>i.id===r);r=s==null?void 0:s.parentId,s&&(o=o.concat(s))}return o}function Ie(e){e.preventDefault(),e.stopPropagation()}function Al(e){return"nativeEvent"in e}function ti(e){return e.mozInputSource===0&&e.isTrusted?!0:Wo&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ni(e){return Qs?!1:!Wo&&e.width===0&&e.height===0||Wo&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function dn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}/*!
|
|
2
|
-
* tabbable 6.2.0
|
|
3
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
-
*/var Dl=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Xn=Dl.join(","),oi=typeof Element>"u",Ut=oi?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zn=!oi&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Qn=function e(t,n){var o;n===void 0&&(n=!0);var r=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),s=r===""||r==="true",i=s||n&&t&&e(t.parentNode);return i},Nl=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},ri=function(t,n,o){if(Qn(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Xn));return n&&Ut.call(t,Xn)&&r.unshift(t),r=r.filter(o),r},si=function e(t,n,o){for(var r=[],s=Array.from(t);s.length;){var i=s.shift();if(!Qn(i,!1))if(i.tagName==="SLOT"){var c=i.assignedElements(),l=c.length?c:i.children,u=e(l,!0,o);o.flatten?r.push.apply(r,u):r.push({scopeParent:i,candidates:u})}else{var p=Ut.call(i,Xn);p&&o.filter(i)&&(n||!t.includes(i))&&r.push(i);var d=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!Qn(d,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(d&&g){var m=e(d===!0?i.children:d.children,!0,o);o.flatten?r.push.apply(r,m):r.push({scopeParent:i,candidates:m})}else s.unshift.apply(s,i.children)}}return r},ii=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},ci=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Nl(t))&&!ii(t)?0:t.tabIndex},Ll=function(t,n){var o=ci(t);return o<0&&n&&!ii(t)?0:o},Fl=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},ai=function(t){return t.tagName==="INPUT"},Bl=function(t){return ai(t)&&t.type==="hidden"},$l=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},Vl=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},Ul=function(t){if(!t.name)return!0;var n=t.form||Zn(t),o=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(t.name));else try{r=o(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Vl(r,t.form);return!s||s===t},Wl=function(t){return ai(t)&&t.type==="radio"},zl=function(t){return Wl(t)&&!Ul(t)},Hl=function(t){var n,o=t&&Zn(t),r=(n=o)===null||n===void 0?void 0:n.host,s=!1;if(o&&o!==t){var i,c,l;for(s=!!((i=r)!==null&&i!==void 0&&(c=i.ownerDocument)!==null&&c!==void 0&&c.contains(r)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&r;){var u,p,d;o=Zn(r),r=(u=o)===null||u===void 0?void 0:u.host,s=!!((p=r)!==null&&p!==void 0&&(d=p.ownerDocument)!==null&&d!==void 0&&d.contains(r))}}return s},Fr=function(t){var n=t.getBoundingClientRect(),o=n.width,r=n.height;return o===0&&r===0},Gl=function(t,n){var o=n.displayCheck,r=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ut.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Ut.call(i,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="legacy-full"){if(typeof r=="function"){for(var c=t;t;){var l=t.parentElement,u=Zn(t);if(l&&!l.shadowRoot&&r(l)===!0)return Fr(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=c}if(Hl(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return Fr(t);return!1},Kl=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var r=n.children.item(o);if(r.tagName==="LEGEND")return Ut.call(n,"fieldset[disabled] *")?!0:!r.contains(t)}return!0}n=n.parentElement}return!1},Go=function(t,n){return!(n.disabled||Qn(n)||Bl(n)||Gl(n,t)||$l(n)||Kl(n))},Ko=function(t,n){return!(zl(n)||ci(n)<0||!Go(t,n))},ql=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Yl=function e(t){var n=[],o=[];return t.forEach(function(r,s){var i=!!r.scopeParent,c=i?r.scopeParent:r,l=Ll(c,i),u=i?e(r.candidates):c;l===0?i?n.push.apply(n,u):n.push(c):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:u})}),o.sort(Fl).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(n)},po=function(t,n){n=n||{};var o;return n.getShadowRoot?o=si([t],n.includeContainer,{filter:Ko.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ql}):o=ri(t,n.includeContainer,Ko.bind(null,n)),Yl(o)},Xl=function(t,n){n=n||{};var o;return n.getShadowRoot?o=si([t],n.includeContainer,{filter:Go.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):o=ri(t,n.includeContainer,Go.bind(null,n)),o},li=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ut.call(t,Xn)===!1?!1:Ko(n,t)};const hn=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ui(e,t){const n=po(e,hn()),o=n.length;if(o===0)return;const r=et(xe(e)),s=n.indexOf(r),i=s===-1?t===1?0:o-1:s+t;return n[i]}function di(e){return ui(xe(e).body,1)||e}function fi(e){return ui(xe(e).body,-1)||e}function sn(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!ge(n,o)}function Zl(e){po(e,hn()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Br(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}const pi="ArrowUp",mi="ArrowDown",gi="ArrowLeft",hi="ArrowRight",vi="Home",bi="End",Ql=new Set([gi,hi]),Jl=new Set([pi,mi]),eu=new Set([...Ql,...Jl]);[...eu];const xi=new Set([pi,mi,gi,hi,vi,bi]);function ye(e){const t=ut(tu,e).current;return t.next=e,oe(t.effect),t}function tu(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Yt(e){const{enabled:t=!0,open:n,ref:o,onComplete:r}=e,s=ye(n),i=J(r),c=Cl(o,n);a.useEffect(()=>{t&&c(()=>{n===s.current&&i()})},[t,n,i,c,s])}let Mt=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=qn.startingStyle]="startingStyle",e[e.endingStyle=qn.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),qo=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const nu={[qo.popupOpen]:""},ou={[qo.popupOpen]:"",[qo.pressed]:""},ru={[Mt.open]:""},su={[Mt.closed]:""},iu={[Mt.anchorHidden]:""},cu={open(e){return e?nu:null}},$r={open(e){return e?ou:null}},vn={open(e){return e?ru:su},anchorHidden(e){return e?iu:null}};function yi(e){return Bs(19)?e:e?"true":void 0}const tn=0;class Pt{constructor(){Ce(this,"currentId",tn),Ce(this,"clear",()=>{this.currentId!==tn&&(clearTimeout(this.currentId),this.currentId=tn)}),Ce(this,"disposeEffect",()=>this.clear)}static create(){return new Pt}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=tn,n()},t)}isStarted(){return this.currentId!==tn}}function Fe(){const e=ut(Pt.create).current;return Ks(e.disposeEffect),e}function wi(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const Ri=a.createContext(null),Ci=a.createContext(null),yt=()=>{var e;return((e=a.useContext(Ri))==null?void 0:e.id)||null},Ue=()=>a.useContext(Ci);function au(e){const t=Kt(),n=Ue(),r=yt();return oe(()=>{if(!t)return;const s={id:t,parentId:r};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,r]),t}function lu(e){const{children:t,id:n}=e,o=yt();return f.jsx(Ri.Provider,{value:a.useMemo(()=>({id:n,parentId:o}),[n,o]),children:t})}function uu(e){const{children:t}=e,n=a.useRef([]),o=a.useCallback(i=>{n.current=[...n.current,i]},[]),r=a.useCallback(i=>{n.current=n.current.filter(c=>c!==i)},[]),[s]=a.useState(()=>wi());return f.jsx(Ci.Provider,{value:a.useMemo(()=>({nodesRef:n,addNode:o,removeNode:r,events:s}),[o,r,s]),children:t})}function Wt(e){return`data-base-ui-${e}`}const ur={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function dt(e){return(e==null?void 0:e.ownerDocument)||document}const Jn=a.forwardRef(function(t,n){const[o,r]=a.useState();oe(()=>{Zs&&r("button")},[]);const s={tabIndex:0,role:o};return f.jsx("span",{...t,ref:n,style:ur,"aria-hidden":o?void 0:!0,...s,"data-base-ui-focus-guard":""})});let Vr=0;function Hn(e,t={}){const{preventScroll:n=!1,cancelPrevious:o=!0,sync:r=!1}=t;o&&cancelAnimationFrame(Vr);const s=()=>e==null?void 0:e.focus({preventScroll:n});r?s():Vr=requestAnimationFrame(s)}const $t={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Ur(e){return e==="inert"?$t.inert:e==="aria-hidden"?$t["aria-hidden"]:$t.none}let Dn=new WeakSet,Nn={},Ro=0;const Ei=e=>e&&(e.host||Ei(e.parentNode)),du=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=Ei(n);return e.contains(o)?o:null}).filter(n=>n!=null);function fu(e,t,n,o){const r="data-base-ui-inert",s=o?"inert":n?"aria-hidden":null,i=du(t,e),c=new Set,l=new Set(i),u=[];Nn[r]||(Nn[r]=new WeakMap);const p=Nn[r];i.forEach(d),g(t),c.clear();function d(m){!m||c.has(m)||(c.add(m),m.parentNode&&d(m.parentNode))}function g(m){!m||l.has(m)||[].forEach.call(m.children,b=>{if(xt(b)!=="script")if(c.has(b))g(b);else{const x=s?b.getAttribute(s):null,h=x!==null&&x!=="false",v=Ur(s),y=(v.get(b)||0)+1,R=(p.get(b)||0)+1;v.set(b,y),p.set(b,R),u.push(b),y===1&&h&&Dn.add(b),R===1&&b.setAttribute(r,""),!h&&s&&b.setAttribute(s,s==="inert"?"":"true")}})}return Ro+=1,()=>{u.forEach(m=>{const b=Ur(s),h=(b.get(m)||0)-1,v=(p.get(m)||0)-1;b.set(m,h),p.set(m,v),h||(!Dn.has(m)&&s&&m.removeAttribute(s),Dn.delete(m)),v||m.removeAttribute(r)}),Ro-=1,Ro||($t.inert=new WeakMap,$t["aria-hidden"]=new WeakMap,$t.none=new WeakMap,Dn=new WeakSet,Nn={})}}function pu(e,t=!1,n=!1){const o=xe(e[0]).body;return fu(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}const Si=a.createContext(null),Mi=()=>a.useContext(Si),Wr=Wt("portal");function mu(e={}){const{id:t,root:n}=e,o=Kt(),r=Mi(),[s,i]=a.useState(null),c=a.useRef(null);return oe(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{c.current=null})},[s]),oe(()=>{if(!o||c.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=o,u.setAttribute(Wr,""),l.appendChild(u),c.current=u,i(u)},[t,o]),oe(()=>{if(n===null||!o||c.current)return;let l=n||(r==null?void 0:r.portalNode);l&&!nr(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const p=document.createElement("div");p.id=o,p.setAttribute(Wr,""),l=u||l,l.appendChild(p),c.current=p,i(p)},[t,n,o,r]),s}function Ii(e){const{children:t,id:n,root:o,preserveTabOrder:r=!0}=e,s=mu({id:n,root:o}),[i,c]=a.useState(null),l=a.useRef(null),u=a.useRef(null),p=a.useRef(null),d=a.useRef(null),g=i==null?void 0:i.modal,m=i==null?void 0:i.open,b=!!i&&!i.modal&&i.open&&r&&!!(o||s);return a.useEffect(()=>{if(!s||!r||g)return;function x(h){s&&sn(h)&&(h.type==="focusin"?Br:Zl)(s)}return s.addEventListener("focusin",x,!0),s.addEventListener("focusout",x,!0),()=>{s.removeEventListener("focusin",x,!0),s.removeEventListener("focusout",x,!0)}},[s,r,g]),a.useEffect(()=>{s&&(m||Br(s))},[m,s]),f.jsxs(Si.Provider,{value:a.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:p,afterInsideRef:d,portalNode:s,setFocusManagerState:c}),[r,s]),children:[b&&s&&f.jsx(Jn,{"data-type":"outside",ref:l,onFocus:x=>{var h;if(sn(x,s))(h=p.current)==null||h.focus();else{const v=i?i.domReference:null,y=fi(v);y==null||y.focus()}}}),b&&s&&f.jsx("span",{"aria-owns":s.id,style:ur}),s&&Ht.createPortal(t,s),b&&s&&f.jsx(Jn,{"data-type":"outside",ref:u,onFocus:x=>{var h;if(sn(x,s))(h=d.current)==null||h.focus();else{const v=i?i.domReference:null,y=di(v);y==null||y.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,ue("focus-out",x.nativeEvent)))}}})]})}function gu(e,t){const n=Ee(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const zr=20;let gt=[];function dr(){gt=gt.filter(e=>e.isConnected)}function hu(e){dr(),e&&xt(e)!=="body"&&(gt.push(e),gt.length>zr&&(gt=gt.slice(-zr)))}function Co(){return dr(),gt[gt.length-1]}function vu(e){if(!e)return null;const t=hn();return li(e,t)?e:po(e,t)[0]||e}function Hr(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const o=hn(),s=Xl(e,o).filter(c=>{const l=c.getAttribute("data-tabindex")||"";return li(c,o)||c.hasAttribute("data-tabindex")&&!l.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function ki(e){const{context:t,children:n,disabled:o=!1,order:r=["content"],initialFocus:s=!0,returnFocus:i=!0,restoreFocus:c=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:p="",getInsideElements:d=()=>[]}=e,{open:g,onOpenChange:m,events:b,dataRef:x,elements:{domReference:h,floating:v}}=t,y=J(()=>{var H;return(H=x.current.floatingContext)==null?void 0:H.nodeId}),R=J(d),w=s===!1,E=Ho(h)&&w,S=ye(r),k=ye(s),D=ye(i),U=ye(p),P=Ue(),_=Mi(),N=a.useRef(null),I=a.useRef(null),W=a.useRef(!1),$=a.useRef(!1),T=a.useRef(-1),A=a.useRef(""),j=a.useRef(""),M=Fe(),q=Fe(),ce=cr(),X=_!=null,L=Yn(v),re=J((H=L)=>H?po(H,hn()):[]),se=J(H=>{const Y=re(H);return S.current.map(()=>Y).filter(Boolean).flat()});a.useEffect(()=>{if(o||!l)return;function H(z){z.key==="Tab"&&ge(L,et(xe(L)))&&re().length===0&&!E&&Ie(z)}const Y=xe(L);return Y.addEventListener("keydown",H),()=>{Y.removeEventListener("keydown",H)}},[o,h,L,l,S,E,re,se]),a.useEffect(()=>{if(o||!v)return;function H(Y){const z=Ge(Y),ne=re().indexOf(z);ne!==-1&&(T.current=ne)}return v.addEventListener("focusin",H),()=>{v.removeEventListener("focusin",H)}},[o,v,re]),a.useEffect(()=>{if(o||!g)return;const H=xe(L);function Y(te){j.current=te.pointerType||"keyboard"}function z(){j.current="keyboard"}return H.addEventListener("pointerdown",Y,!0),H.addEventListener("keydown",z,!0),()=>{H.removeEventListener("pointerdown",Y,!0),H.removeEventListener("keydown",z,!0)}},[o,v,h,L,g]),a.useEffect(()=>{if(o||!u)return;function H(){$.current=!0,q.start(0,()=>{$.current=!1})}function Y(te){const ne=te.relatedTarget,ee=te.currentTarget,O=Ge(te);queueMicrotask(()=>{const G=y(),F=!(ge(h,ne)||ge(v,ne)||ge(ne,v)||ge(_==null?void 0:_.portalNode,ne)||ne!=null&&ne.hasAttribute(Wt("focus-guard"))||P&&(kt(P.nodesRef.current,G).find(Q=>{var ae,ie;return ge((ae=Q.context)==null?void 0:ae.elements.floating,ne)||ge((ie=Q.context)==null?void 0:ie.elements.domReference,ne)})||Lr(P.nodesRef.current,G).find(Q=>{var ae,ie,me;return[(ae=Q.context)==null?void 0:ae.elements.floating,Yn((ie=Q.context)==null?void 0:ie.elements.floating)].includes(ne)||((me=Q.context)==null?void 0:me.elements.domReference)===ne})));if(ee===h&&L&&Hr(L,S),c&&ee!==h&&!(O!=null&&O.isConnected)&&et(xe(L))===xe(L).body){if(he(L)&&(L.focus(),c==="popup")){ce.request(()=>{L.focus()});return}const Q=T.current,ae=re(),ie=ae[Q]||ae[ae.length-1]||L;he(ie)&&ie.focus()}if(x.current.insideReactTree){x.current.insideReactTree=!1;return}(E||!l)&&ne&&F&&(E||ne!==Co())&&(W.current=!0,m(!1,ue("focus-out",te)))})}function z(){x.current.insideReactTree=!0,M.start(0,()=>{x.current.insideReactTree=!1})}if(v&&he(h))return h.addEventListener("focusout",Y),h.addEventListener("pointerdown",H),v.addEventListener("focusout",Y),_&&v.addEventListener("focusout",z,!0),()=>{h.removeEventListener("focusout",Y),h.removeEventListener("pointerdown",H),v.removeEventListener("focusout",Y),_&&v.removeEventListener("focusout",z,!0)}},[o,h,v,L,l,P,_,m,u,c,re,E,y,S,x,M,q,ce]);const C=a.useRef(null),B=a.useRef(null),Z=ot(C,_==null?void 0:_.beforeInsideRef),K=ot(B,_==null?void 0:_.afterInsideRef);a.useEffect(()=>{var H,Y,z;if(o||!v||!g)return;const te=Array.from(((H=_==null?void 0:_.portalNode)==null?void 0:H.querySelectorAll(`[${Wt("portal")}]`))||[]),ee=(z=(Y=(P?Lr(P.nodesRef.current,y()):[]).find(F=>{var Q;return Ho(((Q=F.context)==null?void 0:Q.elements.domReference)||null)}))==null?void 0:Y.context)==null?void 0:z.elements.domReference,O=[v,ee,...te,...R(),N.current,I.current,C.current,B.current,_==null?void 0:_.beforeOutsideRef.current,_==null?void 0:_.afterOutsideRef.current,E?h:null].filter(F=>F!=null),G=pu(O,l||E);return()=>{G()}},[g,o,h,v,l,S,_,E,P,y,R]),oe(()=>{if(o||!he(L))return;const H=xe(L),Y=et(H);queueMicrotask(()=>{const z=se(L),te=k.current,ne=typeof te=="function"?te(U.current||""):te;if(ne===void 0||ne===!1)return;let ee;ne===!0||ne===null?ee=z[0]||L:"current"in ne?ee=ne.current:ee=ne,ee=ee||z[0]||L,!ge(L,Y)&&g&&Hn(ee,{preventScroll:ee===L})})},[o,g,L,w,se,k,U]),oe(()=>{if(o||!L)return;const H=xe(L),Y=et(H);hu(Y);function z(ee){if(ee.open||(A.current=gu(ee.nativeEvent,j.current)),ee.reason==="trigger-hover"&&ee.nativeEvent.type==="mouseleave"&&(W.current=!0),ee.reason==="outside-press")if(ee.nested)W.current=!1;else if(ti(ee.nativeEvent)||ni(ee.nativeEvent))W.current=!1;else{let O=!1;document.createElement("div").focus({get preventScroll(){return O=!0,!1}}),O?W.current=!1:W.current=!0}}b.on("openchange",z);const te=H.createElement("span");te.setAttribute("tabindex","-1"),te.setAttribute("aria-hidden","true"),Object.assign(te.style,ur),X&&h&&h.insertAdjacentElement("afterend",te);function ne(){const ee=D.current;let O=typeof ee=="function"?ee(A.current):ee;if(O===void 0||O===!1)return null;if(O===null&&(O=!0),typeof O=="boolean"){const F=h||Co();return F&&F.isConnected?F:te}const G=h||Co()||te;return"current"in O?O.current||G:O||G}return()=>{b.off("openchange",z);const ee=et(H),O=ge(v,ee)||P&&kt(P.nodesRef.current,y(),!1).some(F=>{var Q;return ge((Q=F.context)==null?void 0:Q.elements.floating,ee)}),G=ne();queueMicrotask(()=>{const F=vu(G),Q=typeof D.current!="boolean";D.current&&!W.current&&he(F)&&(!(!Q&&F!==ee&&ee!==H.body)||O)&&F.focus({preventScroll:!0}),te.remove()})}},[o,v,L,D,x,b,P,X,h,y]),a.useEffect(()=>{queueMicrotask(()=>{W.current=!1})},[o]),a.useEffect(()=>{if(o||!g)return;function H(z){const te=Ge(z);te!=null&&te.closest(`[${xl}]`)&&($.current=!0)}const Y=xe(L);return Y.addEventListener("pointerdown",H,!0),()=>{Y.removeEventListener("pointerdown",H,!0)}},[o,g,L]),oe(()=>{if(!o&&_)return _.setFocusManagerState({modal:l,closeOnFocusOut:u,open:g,onOpenChange:m,domReference:h}),()=>{_.setFocusManagerState(null)}},[o,_,l,g,m,u,h]),oe(()=>{if(!(o||!L))return Hr(L,S),()=>{queueMicrotask(dr)}},[o,L,S]);const V=!o&&(l?!E:!0)&&(X||l);return f.jsxs(a.Fragment,{children:[V&&f.jsx(Jn,{"data-type":"inside",ref:Z,onFocus:H=>{var Y;if(l){const z=se();Hn(z[z.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(W.current=!1,sn(H,_.portalNode)){const z=di(h);z==null||z.focus()}else(Y=_.beforeOutsideRef.current)==null||Y.focus()}}),n,V&&f.jsx(Jn,{"data-type":"inside",ref:K,onFocus:H=>{var Y;if(l)Hn(se()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(u&&(W.current=!0),sn(H,_.portalNode)){const z=fi(h);z==null||z.focus()}else(Y=_.afterOutsideRef.current)==null||Y.focus()}})]})}function Pi(e,t={}){const{open:n,onOpenChange:o,dataRef:r}=e,{enabled:s=!0,event:i="click",toggle:c=!0,ignoreMouse:l=!1,stickIfOpen:u=!0,touchOpenDelay:p=0}=t,d=a.useRef(void 0),g=cr(),m=Fe(),b=a.useMemo(()=>({onPointerDown(x){d.current=x.pointerType},onMouseDown(x){const h=d.current,v=x.nativeEvent;if(x.button!==0||i==="click"||dn(h,!0)&&l)return;const y=r.current.openEvent,R=y==null?void 0:y.type,w=!(n&&c&&(!(y&&u)||R==="click"||R==="mousedown"));if(lr(v.target)){const E=ue("trigger-press",v);w&&h==="touch"&&p>0?m.start(p,()=>{o(!0,E)}):o(w,E);return}g.request(()=>{const E=ue("trigger-press",v);w&&h==="touch"&&p>0?m.start(p,()=>{o(!0,E)}):o(w,E)})},onClick(x){if(i==="mousedown-only")return;const h=d.current;if(i==="mousedown"&&h){d.current=void 0;return}if(dn(h,!0)&&l)return;const v=r.current.openEvent,y=v==null?void 0:v.type,R=!(n&&c&&(!(v&&u)||y==="click"||y==="mousedown"||y==="keydown"||y==="keyup")),w=ue("trigger-press",x.nativeEvent);R&&h==="touch"&&p>0?m.start(p,()=>{o(!0,w)}):o(R,w)},onKeyDown(){d.current=void 0}}),[r,i,l,o,n,u,c,g,m,p]);return a.useMemo(()=>s?{reference:b}:_e,[s,b])}const bu={intentional:"onClick",sloppy:"onPointerDown"};function Gr(e){var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}}function Oi(e,t={}){const{open:n,onOpenChange:o,elements:r,dataRef:s}=e,{enabled:i=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u="sloppy",referencePress:p=!1,referencePressEvent:d="sloppy",ancestorScroll:g=!1,bubbles:m,capture:b}=t,x=Ue(),h=J(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=a.useRef(!1),{escapeKey:R,outsidePress:w}=Gr(m),{escapeKey:E,outsidePress:S}=Gr(b),k=a.useRef(null),D=Fe(),U=Fe(),P=a.useRef(!1),_=a.useRef(""),N=J(C=>{_.current=C.pointerType}),I=J(()=>{const C=_.current,B=C==="pen"||!C?"mouse":C,Z=typeof u=="function"?u():u;return typeof Z=="string"?Z:Z[B]}),W=J(C=>{var B;if(!n||!i||!c||C.key!=="Escape"||P.current)return;const Z=(B=s.current.floatingContext)==null?void 0:B.nodeId,K=x?kt(x.nodesRef.current,Z):[];if(!R&&K.length>0){let Y=!0;if(K.forEach(z=>{var te;(te=z.context)!=null&&te.open&&!z.context.dataRef.current.__escapeKeyBubbles&&(Y=!1)}),!Y)return}const V=Al(C)?C.nativeEvent:C,H=ue("escape-key",V);o(!1,H),!R&&!H.isPropagationAllowed&&C.stopPropagation()}),$=J(C=>{const B=I();return B==="intentional"&&C.type!=="click"||B==="sloppy"&&C.type==="click"}),T=J(C=>{var B;const Z=()=>{var K;W(C),(K=Ge(C))==null||K.removeEventListener("keydown",Z)};(B=Ge(C))==null||B.addEventListener("keydown",Z)}),A=J((C,B=!1)=>{var Z;if($(C))return;const K=s.current.insideReactTree;if(s.current.insideReactTree=!1,I()==="intentional"&&B||K||typeof v=="function"&&!v(C))return;const V=Ge(C),H=`[${Wt("inert")}]`,Y=xe(r.floating).querySelectorAll(H);let z=de(V)?V:null;for(;z&&!tt(z);){const O=rt(z);if(tt(O)||!de(O))break;z=O}if(Y.length&&de(V)&&!jl(V)&&!ge(V,r.floating)&&Array.from(Y).every(O=>!ge(z,O)))return;if(he(V)){const O=tt(V),G=Ye(V),F=/auto|scroll/,Q=O||F.test(G.overflowX),ae=O||F.test(G.overflowY),ie=Q&&V.clientWidth>0&&V.scrollWidth>V.clientWidth,me=ae&&V.clientHeight>0&&V.scrollHeight>V.clientHeight,De=G.direction==="rtl",We=me&&(De?C.offsetX<=V.offsetWidth-V.clientWidth:C.offsetX>V.clientWidth),Re=ie&&C.offsetY>V.clientHeight;if(We||Re)return}const te=(Z=s.current.floatingContext)==null?void 0:Z.nodeId,ne=x&&kt(x.nodesRef.current,te).some(O=>{var G;return at(C,(G=O.context)==null?void 0:G.elements.floating)});if(at(C,r.floating)||at(C,r.domReference)||ne)return;const ee=x?kt(x.nodesRef.current,te):[];if(ee.length>0){let O=!0;if(ee.forEach(G=>{var F;(F=G.context)!=null&&F.open&&!G.context.dataRef.current.__outsidePressBubbles&&(O=!1)}),!O)return}o(!1,ue("outside-press",C))}),j=J(C=>{if(!(I()!=="sloppy"||!n||!i||at(C,r.floating)||at(C,r.domReference))){if(C.pointerType==="touch"){k.current={startTime:Date.now(),startX:C.clientX,startY:C.clientY,dismissOnPointerUp:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{k.current&&(k.current.dismissOnPointerUp=!1,k.current.dismissOnMouseDown=!1)});return}A(C)}}),M=J(C=>{var B;const Z=y.current;if(y.current=!1,$(C)||(D.clear(),C.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown))return;const K=()=>{var V;C.type==="pointerdown"?j(C):A(C,Z),(V=Ge(C))==null||V.removeEventListener(C.type,K)};(B=Ge(C))==null||B.addEventListener(C.type,K)}),q=J(C=>{if(I()!=="sloppy"||C.pointerType!=="touch"||!k.current||at(C,r.floating)||at(C,r.domReference))return;const B=Math.abs(C.clientX-k.current.startX),Z=Math.abs(C.clientY-k.current.startY),K=Math.sqrt(B*B+Z*Z);K>5&&(k.current.dismissOnPointerUp=!0),K>10&&(A(C),D.clear(),k.current=null)}),ce=J(C=>{I()!=="sloppy"||C.pointerType!=="touch"||!k.current||at(C,r.floating)||at(C,r.domReference)||(k.current.dismissOnPointerUp&&A(C),D.clear(),k.current=null)});a.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=R,s.current.__outsidePressBubbles=w;const C=new Pt;function B(Y){o(!1,ue("none",Y))}function Z(){C.clear(),P.current=!0}function K(){C.start(lo()?5:0,()=>{P.current=!1})}const V=xe(r.floating);V.addEventListener("pointerdown",N,!0),c&&(V.addEventListener("keydown",E?T:W,E),V.addEventListener("compositionstart",Z),V.addEventListener("compositionend",K)),v&&(V.addEventListener("click",S?M:A,S),V.addEventListener("pointerdown",S?M:A,S),V.addEventListener("pointermove",q,S),V.addEventListener("pointerup",ce,S),V.addEventListener("mousedown",M,S));let H=[];return g&&(de(r.domReference)&&(H=ht(r.domReference)),de(r.floating)&&(H=H.concat(ht(r.floating))),!de(r.reference)&&r.reference&&r.reference.contextElement&&(H=H.concat(ht(r.reference.contextElement)))),H=H.filter(Y=>{var z;return Y!==((z=V.defaultView)==null?void 0:z.visualViewport)}),H.forEach(Y=>{Y.addEventListener("scroll",B,{passive:!0})}),()=>{V.removeEventListener("pointerdown",N,!0),c&&(V.removeEventListener("keydown",E?T:W,E),V.removeEventListener("compositionstart",Z),V.removeEventListener("compositionend",K)),v&&(V.removeEventListener("click",S?M:A,S),V.removeEventListener("pointerdown",S?M:A,S),V.removeEventListener("pointermove",q,S),V.removeEventListener("pointerup",ce,S),V.removeEventListener("mousedown",M,S)),H.forEach(Y=>{Y.removeEventListener("scroll",B)}),C.clear()}},[s,r,c,v,n,o,g,i,R,w,W,E,T,A,S,M,j,q,ce,N]),a.useEffect(()=>{s.current.insideReactTree=!1},[s,v]);const X=a.useMemo(()=>({onKeyDown:W,...p&&{[bu[d]]:C=>{o(!1,ue("trigger-press",C.nativeEvent))},...d!=="intentional"&&{onClick(C){o(!1,ue("trigger-press",C.nativeEvent))}}}}),[W,o,p,d]),L=J(C=>{const B=Ge(C.nativeEvent);!ge(r.floating,B)||C.button!==0||(y.current=!0)}),re=J(()=>{s.current.insideReactTree=!0,U.start(0,()=>{s.current.insideReactTree=!1})}),se=a.useMemo(()=>({onKeyDown:W,onMouseDown:L,onMouseUp:L,onPointerDownCapture:re,onMouseDownCapture:re,onClickCapture:re,onMouseUpCapture:re}),[W,L,re]);return a.useMemo(()=>i?{reference:X,floating:se}:{},[i,X,se])}function fr(e){const{open:t=!1,onOpenChange:n,elements:o}=e,r=Kt(),s=a.useRef({}),[i]=a.useState(()=>wi()),c=yt()!=null,[l,u]=a.useState(o.reference),p=J((m,b)=>{if(s.current.openEvent=m?b.event:void 0,!e.noEmit){const x={open:m,reason:b.reason,nativeEvent:b.event,nested:c};i.emit("openchange",x)}n==null||n(m,b)}),d=a.useMemo(()=>({setPositionReference:u}),[]),g=a.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return a.useMemo(()=>({dataRef:s,open:t,onOpenChange:p,elements:g,events:i,floatingId:r,refs:d}),[t,p,g,i,r,d])}function xu(){return{open:!1,onOpenChange:()=>{},dataRef:{current:{}},elements:{floating:null,reference:null,domReference:null},events:{on:()=>{},off:()=>{},emit:()=>{}},floatingId:"",refs:{setPositionReference:()=>{}}}}function Ti(e=[]){const t=e.map(c=>c==null?void 0:c.reference),n=e.map(c=>c==null?void 0:c.floating),o=e.map(c=>c==null?void 0:c.item),r=a.useCallback(c=>Eo(c,e,"reference"),t),s=a.useCallback(c=>Eo(c,e,"floating"),n),i=a.useCallback(c=>Eo(c,e,"item"),o);return a.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}function Eo(e,t,n){var o;const r=new Map,s=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[zo]="");for(const c in e)s&&e&&(c===Js||c===ei)||(i[c]=e[c]);for(let c=0;c<t.length;c+=1){let l;const u=(o=t[c])==null?void 0:o[n];typeof u=="function"?l=e?u(e):null:l=u,l&&Kr(i,l,s,r)}return Kr(i,e,s,r),i}function Kr(e,t,n,o){var r;for(const s in t){const i=t[s];n&&(s===Js||s===ei)||(s.startsWith("on")?(o.has(s)||o.set(s,[]),typeof i=="function"&&((r=o.get(s))==null||r.push(i),e[s]=(...c)=>{var l;return(l=o.get(s))==null?void 0:l.map(u=>u(...c)).find(u=>u!==void 0)})):e[s]=i)}}const yu=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ji(e,t={}){var n,o;const{open:r,elements:s,floatingId:i}=e,{enabled:c=!0,role:l="dialog"}=t,u=Kt(),p=((n=s.domReference)==null?void 0:n.id)||u,d=a.useMemo(()=>{var y;return((y=Yn(s.floating))==null?void 0:y.id)||i},[s.floating,i]),g=(o=yu.get(l))!=null?o:l,b=yt()!=null,x=a.useMemo(()=>g==="tooltip"||l==="label"?{[`aria-${l==="label"?"labelledby":"describedby"}`]:r?d:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?d:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:p},...g==="menu"&&b&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,d,b,r,p,l]),h=a.useMemo(()=>{const y={id:d,...g&&{role:g}};return g==="tooltip"||l==="label"?y:{...y,...g==="menu"&&{"aria-labelledby":p}}},[g,d,p,l]),v=a.useCallback(({active:y,selected:R})=>{const w={role:"option",...y&&{id:`${d}-fui-option`}};switch(l){case"select":case"combobox":return{...w,"aria-selected":R}}return{}},[d,l]);return a.useMemo(()=>c?{reference:x,floating:h,item:v}:{},[c,x,h,v])}const pr=a.forwardRef(function(t,n){const{cutout:o,...r}=t;let s;if(o){const i=o==null?void 0:o.getBoundingClientRect();s=`polygon(
|
|
5
|
-
0% 0%,
|
|
6
|
-
100% 0%,
|
|
7
|
-
100% 100%,
|
|
8
|
-
0% 100%,
|
|
9
|
-
0% 0%,
|
|
10
|
-
${i.left}px ${i.top}px,
|
|
11
|
-
${i.left}px ${i.bottom}px,
|
|
12
|
-
${i.right}px ${i.bottom}px,
|
|
13
|
-
${i.right}px ${i.top}px,
|
|
14
|
-
${i.left}px ${i.top}px
|
|
15
|
-
)`}return f.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});let qr={},Yr={},Xr="";function wu(e){if(typeof document>"u")return!1;const t=dt(e);return Ee(t).innerWidth-t.documentElement.clientWidth>0}function Ru(e){const n=dt(e).documentElement,o=n.style.overflow;return n.style.overflow="hidden",()=>{n.style.overflow=o}}function Cu(e){var t,n;const o=dt(e),r=o.documentElement,s=o.body,i=Ee(r);let c=0,l=0;const u=Je.create();if(Xs&&((n=(t=i.visualViewport)==null?void 0:t.scale)!=null?n:1)!==1)return()=>{};function p(){var m;const b=i.getComputedStyle(r),x=i.getComputedStyle(s);c=r.scrollTop,l=r.scrollLeft,qr={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},Xr=r.style.scrollBehavior,Yr={position:s.style.position,height:s.style.height,width:s.style.width,boxSizing:s.style.boxSizing,overflowY:s.style.overflowY,overflowX:s.style.overflowX,scrollBehavior:s.style.scrollBehavior};const h=typeof CSS<"u"&&((m=CSS.supports)==null?void 0:m.call(CSS,"scrollbar-gutter","stable")),v=r.scrollHeight>r.clientHeight,y=r.scrollWidth>r.clientWidth,R=b.overflowY==="scroll"||x.overflowY==="scroll",w=b.overflowX==="scroll"||x.overflowX==="scroll",E=Math.max(0,i.innerWidth-r.clientWidth),S=Math.max(0,i.innerHeight-r.clientHeight),k=parseFloat(x.marginTop)+parseFloat(x.marginBottom),D=parseFloat(x.marginLeft)+parseFloat(x.marginRight);Object.assign(r.style,{scrollbarGutter:"stable",overflowY:!h&&(v||R)?"scroll":"hidden",overflowX:!h&&(y||w)?"scroll":"hidden"}),Object.assign(s.style,{position:"relative",height:k||S?`calc(100dvh - ${k+S}px)`:"100dvh",width:D||E?`calc(100vw - ${D+E}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),s.scrollTop=c,s.scrollLeft=l,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function d(){Object.assign(r.style,qr),Object.assign(s.style,Yr),r.scrollTop=c,r.scrollLeft=l,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=Xr}function g(){d(),u.request(p)}return p(),i.addEventListener("resize",g),()=>{u.cancel(),d(),i.removeEventListener("resize",g)}}class Eu{constructor(){Ce(this,"lockCount",0),Ce(this,"restore",null),Ce(this,"timeoutLock",Pt.create()),Ce(this,"timeoutUnlock",Pt.create()),Ce(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)}),Ce(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const o=dt(t).documentElement,r=Ee(o).getComputedStyle(o).overflowY;if(r==="hidden"||r==="clip"){this.restore=Ns;return}const s=Ml||!wu(t);this.restore=s?Ru(t):Cu(t)}}const Su=new Eu;function _i(e){const{enabled:t=!0,mounted:n,open:o,referenceElement:r=null}=e;oe(()=>{if(t&&Xs&&n&&!o){const s=dt(r),i=s.body.style.userSelect,c=s.body.style.webkitUserSelect;return s.body.style.userSelect="none",s.body.style.webkitUserSelect="none",()=>{s.body.style.userSelect=i,s.body.style.webkitUserSelect=c}}},[t,n,o,r]),oe(()=>{if(t)return Su.acquire(r)},[t,r])}function Mu(e){const t=a.useRef(""),n=a.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:a.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r&&e(r,r.pointerType),e(r,t.current),t.current=""},[e]),onPointerDown:n}}function Ai(e){const[t,n]=a.useState(null),o=J((c,l)=>{e||n(l)}),r=J(()=>{n(null)}),{onClick:s,onPointerDown:i}=Mu(o);return a.useMemo(()=>({openMethod:t,reset:r,triggerProps:{onClick:s,onPointerDown:i}}),[t,r,s,i])}pr.__docgenInfo={description:"",methods:[],displayName:"InternalBackdrop"};var Iu=Object.defineProperty,ku=(e,t,n)=>t in e?Iu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eo=(e,t,n)=>ku(e,typeof t!="symbol"?t+"":t,n);function Pu(e){const{store:t,parentContext:n}=e,o=t.useState("open"),r=t.useState("dismissible"),s=t.useState("modal"),i=t.useState("triggerElement"),c=t.useState("popupElement"),{mounted:l,setMounted:u,transitionStatus:p}=fo(o),{openMethod:d,triggerProps:g,reset:m}=Ai(o),b=J(()=>{var U,P;u(!1),(P=(U=t.context).openChangeComplete)==null||P.call(U,!1),m()});Yt({enabled:!e.actionsRef,open:o,ref:t.context.popupRef,onComplete(){o||b()}}),a.useImperativeHandle(e.actionsRef,()=>({unmount:b}),[b]);const x=fr({elements:{reference:i,floating:c},open:o,onOpenChange:t.setOpen,noEmit:!0}),[h,v]=a.useState(0),y=h===0,R=ji(x),w=Pi(x),E=Oi(x,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(U){if(U.button!==0)return!1;const P=Ge(U);if(y&&r){const _=P;return s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===_||t.context.backdropRef.current===_:!0}return!1},escapeKey:y});_i({enabled:o&&s===!0,mounted:l,open:o,referenceElement:c});const{getReferenceProps:S,getFloatingProps:k}=Ti([R,w,E]);t.useContextCallback("nestedDialogOpen",U=>{v(U+1)}),t.useContextCallback("nestedDialogClose",()=>{v(0)}),a.useEffect(()=>(n!=null&&n.nestedDialogOpen&&o&&n.nestedDialogOpen(h),n!=null&&n.nestedDialogClose&&!o&&n.nestedDialogClose(),()=>{n!=null&&n.nestedDialogClose&&o&&n.nestedDialogClose()}),[o,n,h]);const D=a.useMemo(()=>S(g),[S,g]);t.useSyncedValues({openMethod:d,mounted:l,transitionStatus:p,triggerProps:D,popupProps:k(),floatingRootContext:x,nestedOpenDialogCount:h})}var to=Symbol("NOT_FOUND");function Ou(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Tu(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function ju(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${n}]`)}}var Zr=e=>Array.isArray(e)?e:[e];function _u(e){const t=Array.isArray(e[0])?e[0]:e;return ju(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Au(e,t){const n=[],{length:o}=e;for(let r=0;r<o;r++)n.push(e[r].apply(null,t));return n}function Du(e){let t;return{get(n){return t&&e(t.key,n)?t.value:to},put(n,o){t={key:n,value:o}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Nu(e,t){let n=[];function o(c){const l=n.findIndex(u=>t(c,u.key));if(l>-1){const u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return to}function r(c,l){o(c)===to&&(n.unshift({key:c,value:l}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:o,put:r,getEntries:s,clear:i}}var Lu=(e,t)=>e===t;function Fu(e){return function(n,o){if(n===null||o===null||n.length!==o.length)return!1;const{length:r}=n;for(let s=0;s<r;s++)if(!e(n[s],o[s]))return!1;return!0}}function Bu(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:o=Lu,maxSize:r=1,resultEqualityCheck:s}=n,i=Fu(o);let c=0;const l=r<=1?Du(i):Nu(r,i);function u(){let p=l.get(arguments);if(p===to){if(p=e.apply(null,arguments),c++,s){const g=l.getEntries().find(m=>s(m.value,p));g&&(p=g.value,c!==0&&c--)}l.put(arguments,p)}return p}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>c,u.resetResultsCount=()=>{c=0},u}var $u=class{constructor(e){this.value=e}deref(){return this.value}},Vu=typeof WeakRef<"u"?WeakRef:$u,Uu=0,Qr=1;function Ln(){return{s:Uu,v:void 0,o:null,p:null}}function Di(e,t={}){let n=Ln();const{resultEqualityCheck:o}=t;let r,s=0;function i(){var c,l;let u=n;const{length:p}=arguments;for(let m=0,b=p;m<b;m++){const x=arguments[m];if(typeof x=="function"||typeof x=="object"&&x!==null){let h=u.o;h===null&&(u.o=h=new WeakMap);const v=h.get(x);v===void 0?(u=Ln(),h.set(x,u)):u=v}else{let h=u.p;h===null&&(u.p=h=new Map);const v=h.get(x);v===void 0?(u=Ln(),h.set(x,u)):u=v}}const d=u;let g;if(u.s===Qr)g=u.v;else if(g=e.apply(null,arguments),s++,o){const m=(l=(c=r==null?void 0:r.deref)==null?void 0:c.call(r))!=null?l:r;m!=null&&o(m,g)&&(g=m,s!==0&&s--),r=typeof g=="object"&&g!==null||typeof g=="function"?new Vu(g):g}return d.s=Qr,d.v=g,g}return i.clearCache=()=>{n=Ln(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function Ni(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...r)=>{let s=0,i=0,c,l={},u=r.pop();typeof u=="object"&&(l=u,u=r.pop()),Ou(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const p={...n,...l},{memoize:d,memoizeOptions:g=[],argsMemoize:m=Di,argsMemoizeOptions:b=[]}=p,x=Zr(g),h=Zr(b),v=_u(r),y=d(function(){return s++,u.apply(null,arguments)},...x),R=m(function(){i++;const E=Au(v,arguments);return c=y.apply(null,E),c},...h);return Object.assign(R,{resultFunc:u,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Wu=Ni(Di),zu=Object.assign((e,t=Wu)=>{Tu(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),o=n.map(s=>e[s]);return t(o,(...s)=>s.reduce((i,c,l)=>(i[n[l]]=c,i),{}))},{withTypes:()=>zu});Ni({memoize:Bu,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Pe=(e,t,n,o,r,s,...i)=>{if(i.length>0)throw new Error("Unsupported number of selectors");let c;if(e)c=e;else throw new Error("Missing arguments");return c};var So={exports:{}},Mo={},Io={exports:{}},ko={};/**
|
|
16
|
-
* @license React
|
|
17
|
-
* use-sync-external-store-shim.production.js
|
|
18
|
-
*
|
|
19
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the MIT license found in the
|
|
22
|
-
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
*/var Jr;function Hu(){if(Jr)return ko;Jr=1;var e=Is;function t(d,g){return d===g&&(d!==0||1/d===1/g)||d!==d&&g!==g}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function c(d,g){var m=g(),b=o({inst:{value:m,getSnapshot:g}}),x=b[0].inst,h=b[1];return s(function(){x.value=m,x.getSnapshot=g,l(x)&&h({inst:x})},[d,m,g]),r(function(){return l(x)&&h({inst:x}),d(function(){l(x)&&h({inst:x})})},[d]),i(m),m}function l(d){var g=d.getSnapshot;d=d.value;try{var m=g();return!n(d,m)}catch{return!0}}function u(d,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:c;return ko.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,ko}var es;function Gu(){return es||(es=1,Io.exports=Hu()),Io.exports}/**
|
|
24
|
-
* @license React
|
|
25
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
26
|
-
*
|
|
27
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the MIT license found in the
|
|
30
|
-
* LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/var ts;function Ku(){if(ts)return Mo;ts=1;var e=Is,t=Gu();function n(u,p){return u===p&&(u!==0||1/u===1/p)||u!==u&&p!==p}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,c=e.useMemo,l=e.useDebugValue;return Mo.useSyncExternalStoreWithSelector=function(u,p,d,g,m){var b=s(null);if(b.current===null){var x={hasValue:!1,value:null};b.current=x}else x=b.current;b=c(function(){function v(S){if(!y){if(y=!0,R=S,S=g(S),m!==void 0&&x.hasValue){var k=x.value;if(m(k,S))return w=k}return w=S}if(k=w,o(R,S))return k;var D=g(S);return m!==void 0&&m(k,D)?(R=S,k):(R=S,w=D)}var y=!1,R,w,E=d===void 0?null:d;return[function(){return v(p())},E===null?void 0:function(){return v(E())}]},[p,d,g,m]);var h=r(u,b[0],b[1]);return i(function(){x.hasValue=!0,x.value=h},[h]),l(h),h},Mo}var ns;function qu(){return ns||(ns=1,So.exports=Ku()),So.exports}var Yu=qu();function Xu(e,t,n,o,r){const s=i=>t(i,n,o,r);return Yu.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s)}class Zu{constructor(t){eo(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)})),eo(this,"getSnapshot",()=>this.state),this.state=t,this.listeners=new Set}update(t){this.state!==t&&(this.state=t,this.listeners.forEach(n=>n(t)))}apply(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.update({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.update({...this.state,[t]:n})}}class Qu extends Zu{constructor(t,n={},o){super(t),eo(this,"controlledValues",new Map),this.context=n,this.selectors=o}useSyncedValue(t,n){oe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){oe(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){oe(()=>{this.apply(t)},[t])}useControlledProp(t,n,o){const r=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,r),!r&&!Object.is(this.state[t],o)&&super.update({...this.state,[t]:o})),oe(()=>{r&&!Object.is(this.state[t],n)&&super.update({...this.state,[t]:n})},[t,n,o,r])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}apply(t){const n={...t};for(const o in n)this.controlledValues.get(o)===!0&&delete n[o];super.apply(n)}update(t){const n={...t};for(const o in n)this.controlledValues.get(o)===!0&&delete n[o];super.update({...this.state,...n})}useState(t){if(!this.selectors)throw new Error("Base UI: selectors are required to call useState.");return Xu(this,this.selectors[t])}useContextCallback(t,n){const o=J(n??Ns);this.context[t]=o}getElementSetter(t){return a.useCallback(n=>{this.set(t,n)},[t])}}const Ju={open:Pe(e=>e.open),modal:Pe(e=>e.modal),nested:Pe(e=>e.nested),nestedOpenDialogCount:Pe(e=>e.nestedOpenDialogCount),dismissible:Pe(e=>e.dismissible),openMethod:Pe(e=>e.openMethod),descriptionElementId:Pe(e=>e.descriptionElementId),titleElementId:Pe(e=>e.titleElementId),mounted:Pe(e=>e.mounted),transitionStatus:Pe(e=>e.transitionStatus),triggerProps:Pe(e=>e.triggerProps),popupProps:Pe(e=>e.popupProps),floatingRootContext:Pe(e=>e.floatingRootContext),popupElement:Pe(e=>e.popupElement),triggerElement:Pe(e=>e.triggerElement)};class mr extends Qu{constructor(){super(...arguments),eo(this,"setOpen",(t,n)=>{var o,r,s;if((r=(o=this.context).openChange)==null||r.call(o,t,n),n.isCanceled)return;const i={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};(s=this.state.floatingRootContext.events)==null||s.emit("openchange",i),this.set("open",t)})}static create(t){const n={popupRef:a.createRef(),backdropRef:a.createRef(),internalBackdropRef:a.createRef()};return new mr(t,n,Ju)}}const ed={...vn,...mn},td=a.forwardRef(function(t,n){const{render:o,className:r,forceRender:s=!1,...i}=t,{store:c}=Tt(),l=c.useState("open"),u=c.useState("nested"),p=c.useState("mounted"),d=c.useState("transitionStatus"),g=a.useMemo(()=>({open:l,transitionStatus:d}),[l,d]);return ve("div",t,{state:g,ref:[c.context.backdropRef,n],stateAttributesMapping:ed,props:[{role:"presentation",hidden:!p,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:s||!u})});let nd=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),od=(function(e){return e[e.open=Mt.open]="open",e[e.closed=Mt.closed]="closed",e[e.startingStyle=Mt.startingStyle]="startingStyle",e[e.endingStyle=Mt.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Li=a.createContext(void 0);function rd(){const e=a.useContext(Li);if(e===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return e}const sd={...vn,...mn,nestedDialogOpen(e){return e?{[od.nestedDialogOpen]:""}:null}},id=a.forwardRef(function(t,n){const{className:o,finalFocus:r,initialFocus:s,render:i,...c}=t,{store:l}=Tt(),u=l.useState("descriptionElementId"),p=l.useState("dismissible"),d=l.useState("floatingRootContext"),g=l.useState("popupProps"),m=l.useState("modal"),b=l.useState("mounted"),x=l.useState("nested"),h=l.useState("nestedOpenDialogCount"),v=l.useState("open"),y=l.useState("openMethod"),R=l.useState("titleElementId"),w=l.useState("transitionStatus");rd(),Yt({open:v,ref:l.context.popupRef,onComplete(){var P,_;v&&((_=(P=l.context).openChangeComplete)==null||_.call(P,!0))}});const E=J(P=>P==="touch"?l.context.popupRef.current:!0),S=s===void 0?E:s,k=h>0,D=a.useMemo(()=>({open:v,nested:x,transitionStatus:w,nestedDialogOpen:k}),[v,x,w,k]),U=ve("div",t,{state:D,props:[g,{"aria-labelledby":R??void 0,"aria-describedby":u??void 0,role:"dialog",tabIndex:-1,hidden:!b,onKeyDown(P){xi.has(P.key)&&P.stopPropagation()},style:{[nd.nestedDialogs]:h}},c],ref:[n,l.context.popupRef,l.getElementSetter("popupElement")],stateAttributesMapping:sd});return f.jsxs(a.Fragment,{children:[b&&m===!0&&f.jsx(pr,{ref:l.context.internalBackdropRef,inert:yi(!v)}),f.jsx(ki,{context:d,openInteractionType:y,disabled:!b,closeOnFocusOut:p,initialFocus:S,returnFocus:r,modal:m!==!1,restoreFocus:"popup",children:U})]})});function cd(e){const{children:t,keepMounted:n=!1,container:o}=e,{store:r}=Tt();return r.useState("mounted")||n?f.jsx(Li.Provider,{value:n,children:f.jsx(Ii,{root:o,children:t})}):null}const ad={open:!1,dismissible:!0,nested:!1,popupElement:null,triggerElement:null,modal:!0,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,mounted:!1,transitionStatus:"idle",nestedOpenDialogCount:0,triggerProps:_e,popupProps:_e,floatingRootContext:xu()},ld=function(t){const{children:n,open:o,defaultOpen:r=!1,onOpenChange:s,onOpenChangeComplete:i,dismissible:c=!0,modal:l=!0,actionsRef:u}=t,p=Tt(!0),d=!!p,g=ut(mr.create,ad).current;g.useControlledProp("open",o,r),g.useSyncedValues({dismissible:c,nested:d,modal:l}),g.useContextCallback("openChange",s),g.useContextCallback("openChangeComplete",i),Pu({store:g,actionsRef:u,parentContext:p==null?void 0:p.store.context});const m=a.useMemo(()=>({store:g}),[g]);return f.jsx(Hs.Provider,{value:m,children:n})},Fi=({children:e,open:t,onOpen:n,onClose:o,overlay:r=!0,size:s="md",mobileFullHeight:i=!1,className:c,dataset:l,...u})=>{const p=Ms(),d=ud(t),g=a.useCallback(x=>{x?n==null||n():o==null||o()},[o,n]),m=[qe.dialog,c].filter(Boolean).join(" "),b=$e(l,{preplyDsComponent:we.DialogRoot});return f.jsx(ld,{open:t,onOpenChange:g,children:f.jsxs(cd,{container:p,children:[r&&f.jsx(td,{className:qe.overlay,forceRender:!0,"data-testid":"dialog-overlay","data-preply-ds-component":we.DialogOverlay}),f.jsx(id,{ref:d,className:m,...dd(s),"data-mobile-full-height":i?"":void 0,...b,...u,children:e})]})})};function ud(e){const[t,n]=a.useState(null),o=a.useCallback(r=>n(r),[]);return a.useEffect(()=>{if(!e||!t)return;const r=async()=>{const i=t.getAnimations().map(l=>l.finished);await Promise.allSettled(i);const{y:c}=t.getBoundingClientRect();t.toggleAttribute("data-no-border-radius",c===0)};r(),window.addEventListener("resize",r);const s=new ResizeObserver(r);return s.observe(t),()=>{window.removeEventListener("resize",r),s.disconnect()}},[e,t]),o}function dd(e){if(typeof e=="string")return{"data-size":e};const t={};return typeof e._=="string"&&(t["data-size"]=e._),typeof e["narrow-l"]=="string"&&(t["data-size-narrow-l"]=e["narrow-l"]),typeof e["medium-s"]=="string"&&(t["data-size-medium-s"]=e["medium-s"]),typeof e["medium-l"]=="string"&&(t["data-size-medium-l"]=e["medium-l"]),typeof e["wide-s"]=="string"&&(t["data-size-wide-s"]=e["wide-s"]),typeof e["wide-l"]=="string"&&(t["data-size-wide-l"]=e["wide-l"]),t}const fd=a.forwardRef(function(t,n){const{render:o,className:r,id:s,...i}=t,{store:c}=Tt(),l=jt(s);return c.useSyncedValueWithCleanup("titleElementId",l),ve("h2",t,{ref:n,props:[{id:l},i]})}),gr=a.forwardRef(function({children:t,className:n,dataset:o,...r},s){const i=[qe.title,n].filter(Boolean).join(" "),c=$e(o);return f.jsx(fd,{ref:s,className:i,...c,...r,children:t})});gr.__docgenInfo={description:"",methods:[],displayName:"DialogTitle2"};const pd=({open:e,title:t,description:n,leadingElement:o,children:r,size:s="md",hideHeader:i,onClose:c,mobileFullHeight:l,dataset:u})=>f.jsxs(Fi,{open:e,onClose:c,size:s,mobileFullHeight:l,dataset:u,"data-preply-ds-component":we.Dialog,children:[f.jsx(sr,{}),f.jsxs("header",{className:qe.header,"data-preply-ds-component":we.DialogHeader,children:[o,!i&&f.jsxs("hgroup",{children:[f.jsx(gr,{children:t}),f.jsx(ir,{children:n})]})]}),r]}),md=({primaryButton:e,secondaryButton:t})=>{const n=a.useCallback(o=>{var r;(r=o.currentTarget.closest("[role=dialog]"))==null||r.toggleAttribute("data-slides-up",!0)},[]);return f.jsx(er,{children:f.jsxs(tr,{children:[t,f.jsx("div",{style:{display:"contents"},onClick:n,children:e})]})})},gd=Object.assign(pd,{Actions:md,Steps:ka,Step:Pa,StepsActions:Oa,StepsNext:As,StepsPrevious:Ds,Root:Fi,CloseButton:sr,Footer:er,Title:gr,Description:ir,ButtonStack:tr});var Fn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Po,os;function hd(){if(os)return Po;os=1;var e="Expected a function",t=NaN,n="[object Symbol]",o=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,i=/^0o[0-7]+$/i,c=parseInt,l=typeof Fn=="object"&&Fn&&Fn.Object===Object&&Fn,u=typeof self=="object"&&self&&self.Object===Object&&self,p=l||u||Function("return this")(),d=Object.prototype,g=d.toString,m=Math.max,b=Math.min,x=function(){return p.Date.now()};function h(E,S,k){var D,U,P,_,N,I,W=0,$=!1,T=!1,A=!0;if(typeof E!="function")throw new TypeError(e);S=w(S)||0,v(k)&&($=!!k.leading,T="maxWait"in k,P=T?m(w(k.maxWait)||0,S):P,A="trailing"in k?!!k.trailing:A);function j(B){var Z=D,K=U;return D=U=void 0,W=B,_=E.apply(K,Z),_}function M(B){return W=B,N=setTimeout(X,S),$?j(B):_}function q(B){var Z=B-I,K=B-W,V=S-Z;return T?b(V,P-K):V}function ce(B){var Z=B-I,K=B-W;return I===void 0||Z>=S||Z<0||T&&K>=P}function X(){var B=x();if(ce(B))return L(B);N=setTimeout(X,q(B))}function L(B){return N=void 0,A&&D?j(B):(D=U=void 0,_)}function re(){N!==void 0&&clearTimeout(N),W=0,D=I=U=N=void 0}function se(){return N===void 0?_:L(x())}function C(){var B=x(),Z=ce(B);if(D=arguments,U=this,I=B,Z){if(N===void 0)return M(I);if(T)return N=setTimeout(X,S),j(I)}return N===void 0&&(N=setTimeout(X,S)),_}return C.cancel=re,C.flush=se,C}function v(E){var S=typeof E;return!!E&&(S=="object"||S=="function")}function y(E){return!!E&&typeof E=="object"}function R(E){return typeof E=="symbol"||y(E)&&g.call(E)==n}function w(E){if(typeof E=="number")return E;if(R(E))return t;if(v(E)){var S=typeof E.valueOf=="function"?E.valueOf():E;E=v(S)?S+"":S}if(typeof E!="string")return E===0?E:+E;E=E.replace(o,"");var k=s.test(E);return k||i.test(E)?c(E.slice(2),k?2:8):r.test(E)?t:+E}return Po=h,Po}hd();var vd=typeof window<"u"?a.useLayoutEffect:a.useEffect,bd=typeof window>"u";function xd(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const o=c=>bd?t:window.matchMedia(c).matches,[r,s]=a.useState(()=>n?o(e):t);function i(){s(o(e))}return vd(()=>{const c=window.matchMedia(e);return i(),c.addListener?c.addListener(i):c.addEventListener("change",i),()=>{c.removeListener?c.removeListener(i):c.removeEventListener("change",i)}},[e]),r}function Bi(e){const t=Kc[e];return xd(`(min-width: ${t}px)`)}function hr({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=a.useRef(e!==void 0),[s,i]=a.useState(t),c=r?e:s,l=a.useCallback(u=>{r||i(u)},[]);return[c,l]}const $i=a.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function yd(){return a.useContext($i)}function wd(e){const{children:t,elementsRef:n,labelsRef:o,onMapChange:r}=e,s=a.useRef(0),i=ut(Cd).current,c=ut(Rd).current,[l,u]=a.useState(_e),p=a.useRef(l),d=J((h,v)=>{c.set(h,v??null),p.current={},u(p.current)}),g=J(h=>{c.delete(h),p.current={},u(p.current)}),m=a.useMemo(()=>{const h=new Map;return Array.from(c.keys()).sort(Ed).forEach((y,R)=>{var w;const E=(w=c.get(y))!=null?w:{};h.set(y,{...E,index:R})}),h},[c,l]);oe(()=>{if(typeof MutationObserver!="function"||m.size===0)return;const h=new MutationObserver(v=>{const y=new Set,R=w=>y.has(w)?y.delete(w):y.add(w);v.forEach(w=>{w.removedNodes.forEach(R),w.addedNodes.forEach(R)}),y.size===0&&(p.current={},u(p.current))});return m.forEach((v,y)=>{y.parentElement&&h.observe(y.parentElement,{childList:!0})}),()=>{h.disconnect()}},[m]),oe(()=>{p.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),o&&o.current.length!==m.size&&(o.current.length=m.size),s.current=m.size),r==null||r(m)},[r,m,n,o,l]);const b=J(h=>(i.add(h),()=>{i.delete(h)}));oe(()=>{i.forEach(h=>h(m))},[i,m]);const x=a.useMemo(()=>({register:d,unregister:g,subscribeMapChange:b,elementsRef:n,labelsRef:o,nextIndexRef:s}),[d,g,b,n,o,s]);return f.jsx($i.Provider,{value:x,children:t})}function Rd(){return new Map}function Cd(){return new Set}function Ed(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Sd=a.createContext(void 0);function Vi(e=!0){var t;const n=a.useContext(Sd);if(n===void 0&&!e)throw new Error("Base UI: DirectionContext is missing.");return(t=n==null?void 0:n.direction)!=null?t:"ltr"}let Md=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function bn(e={}){const{label:t,metadata:n,textRef:o,indexGuessBehavior:r,index:s}=e,{register:i,unregister:c,subscribeMapChange:l,elementsRef:u,labelsRef:p,nextIndexRef:d}=yd(),g=a.useRef(-1),[m,b]=a.useState(s??(r===Md.GuessFromOrder?()=>{if(g.current===-1){const v=d.current;d.current+=1,g.current=v}return g.current}:-1)),x=a.useRef(null),h=a.useCallback(v=>{var y,R;if(x.current=v,m!==-1&&v!==null&&(u.current[m]=v,p)){const w=t!==void 0;p.current[m]=w?t:(R=(y=o==null?void 0:o.current)==null?void 0:y.textContent)!=null?R:v.textContent}},[m,u,p,t,o]);return oe(()=>{if(s!=null)return;const v=x.current;if(v)return i(v,n),()=>{c(v)}},[s,i,c,n]),oe(()=>{if(s==null)return l(v=>{var y;const R=x.current?(y=v.get(x.current))==null?void 0:y.index:null;R!=null&&b(R)})},[s,l,b]),a.useMemo(()=>({ref:h,index:m}),[m,h])}const Id=["top","right","bottom","left"],zt=Math.min,Le=Math.max,no=Math.round,Bt=Math.floor,nt=e=>({x:e,y:e}),kd={left:"right",right:"left",bottom:"top",top:"bottom"},Pd={start:"end",end:"start"};function Yo(e,t,n){return Le(e,zt(t,n))}function ft(e,t){return typeof e=="function"?e(t):e}function Be(e){return e.split("-")[0]}function wt(e){return e.split("-")[1]}function vr(e){return e==="x"?"y":"x"}function br(e){return e==="y"?"height":"width"}const Od=new Set(["top","bottom"]);function Ke(e){return Od.has(Be(e))?"y":"x"}function xr(e){return vr(Ke(e))}function Td(e,t,n){n===void 0&&(n=!1);const o=wt(e),r=xr(e),s=br(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=oo(i)),[i,oo(i)]}function jd(e){const t=oo(e);return[Xo(e),t,Xo(t)]}function Xo(e){return e.replace(/start|end/g,t=>Pd[t])}const rs=["left","right"],ss=["right","left"],_d=["top","bottom"],Ad=["bottom","top"];function Dd(e,t,n){switch(e){case"top":case"bottom":return n?t?ss:rs:t?rs:ss;case"left":case"right":return t?_d:Ad;default:return[]}}function Nd(e,t,n,o){const r=wt(e);let s=Dd(Be(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(Xo)))),s}function oo(e){return e.replace(/left|right|bottom|top/g,t=>kd[t])}function Ld(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ui(e){return typeof e!="number"?Ld(e):{top:e,right:e,bottom:e,left:e}}function ro(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Bn(e,t,n){return Math.floor(e/t)!==n}function cn(e,t){return t<0||t>=e.current.length}function Oo(e,t){return Me(e,{disabledIndices:t})}function is(e,t){return Me(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Me(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:o,amount:r=1}={}){let s=t;do s+=n?-r:r;while(s>=0&&s<=e.current.length-1&&an(e,s,o));return s}function Fd(e,{event:t,orientation:n,loop:o,rtl:r,cols:s,disabledIndices:i,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:p=!1}){let d=u;const g=[],m={};let b=!1;{let v=null,y=-1;e.current.forEach((R,w)=>{if(R==null)return;const E=R.closest('[role="row"]');E&&(b=!0),(E!==v||y===-1)&&(v=E,y+=1,g[y]=[]),g[y].push(w),m[w]=y})}const x=b&&g.length>0&&g.some(v=>v.length!==s);function h(v){if(!x||u===-1)return;const y=m[u];if(y==null)return;const R=g[y].indexOf(u);let w=v==="up"?y-1:y+1;o&&(w<0?w=g.length-1:w>=g.length&&(w=0));const E=new Set;for(;w>=0&&w<g.length&&!E.has(w);){E.add(w);const S=g[w];if(S.length===0){w=v==="up"?w-1:w+1;continue}const k=Math.min(R,S.length-1);for(let D=k;D>=0;D-=1){const U=S[D];if(!an(e,U,i))return U}w=v==="up"?w-1:w+1,o&&(w<0?w=g.length-1:w>=g.length&&(w=0))}}if(t.key===ar){const v=h("up");if(v!==void 0)p&&Ie(t),d=v;else{if(p&&Ie(t),u===-1)d=l;else if(d=Me(e,{startingIndex:d,amount:s,decrement:!0,disabledIndices:i}),o&&(u-s<c||d<0)){const y=u%s,R=l%s,w=l-(R-y);R===y?d=l:d=R>y?w:w-s}cn(e,d)&&(d=u)}}if(t.key===gn){const v=h("down");v!==void 0?(p&&Ie(t),d=v):(p&&Ie(t),u===-1?d=c:(d=Me(e,{startingIndex:u,amount:s,disabledIndices:i}),o&&u+s>l&&(d=Me(e,{startingIndex:u%s-s,amount:s,disabledIndices:i}))),cn(e,d)&&(d=u))}if(n==="both"){const v=Bt(u/s);t.key===(r?vt:bt)&&(p&&Ie(t),u%s!==s-1?(d=Me(e,{startingIndex:u,disabledIndices:i}),o&&Bn(d,s,v)&&(d=Me(e,{startingIndex:u-u%s-1,disabledIndices:i}))):o&&(d=Me(e,{startingIndex:u-u%s-1,disabledIndices:i})),Bn(d,s,v)&&(d=u)),t.key===(r?bt:vt)&&(p&&Ie(t),u%s!==0?(d=Me(e,{startingIndex:u,decrement:!0,disabledIndices:i}),o&&Bn(d,s,v)&&(d=Me(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:i}))):o&&(d=Me(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:i})),Bn(d,s,v)&&(d=u));const y=Bt(l/s)===v;cn(e,d)&&(o&&y?d=t.key===(r?bt:vt)?l:Me(e,{startingIndex:u-u%s-1,disabledIndices:i}):d=u)}return d}function Bd(e,t,n){const o=[];let r=0;return e.forEach(({width:s,height:i},c)=>{let l=!1;for(n&&(r=0);!l;){const u=[];for(let p=0;p<s;p+=1)for(let d=0;d<i;d+=1)u.push(r+p+d*t);r%t+s<=t&&u.every(p=>o[p]==null)?(u.forEach(p=>{o[p]=c}),l=!0):r+=1}}),[...o]}function $d(e,t,n,o,r){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(r){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*o:s;case"br":return n.lastIndexOf(e);default:return-1}}function Vd(e,t){return t.flatMap((n,o)=>e.includes(n)?[o]:[])}function an(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const o=e.current[t];return o==null||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"}const cs=Wt("safe-polygon");function To(e,t,n){if(n&&!dn(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const o=e();return typeof o=="number"?o:o==null?void 0:o[t]}return e==null?void 0:e[t]}function jo(e){return typeof e=="function"?e():e}function Ud(e,t={}){const{open:n,onOpenChange:o,dataRef:r,events:s,elements:i}=e,{enabled:c=!0,delay:l=0,handleClose:u=null,mouseOnly:p=!1,restMs:d=0,move:g=!0}=t,m=Ue(),b=yt(),x=ye(u),h=ye(l),v=ye(n),y=ye(d),R=a.useRef(void 0),w=Fe(),E=a.useRef(void 0),S=Fe(),k=a.useRef(!0),D=a.useRef(!1),U=a.useRef(()=>{}),P=a.useRef(!1),_=J(()=>{var A;const j=(A=r.current.openEvent)==null?void 0:A.type;return(j==null?void 0:j.includes("mouse"))&&j!=="mousedown"});a.useEffect(()=>{if(!c)return;function A(j){j.open||(w.clear(),S.clear(),k.current=!0,P.current=!1)}return s.on("openchange",A),()=>{s.off("openchange",A)}},[c,s,w,S]),a.useEffect(()=>{if(!c||!x.current||!n)return;function A(M){_()&&o(!1,ue("trigger-hover",M))}const j=xe(i.floating).documentElement;return j.addEventListener("mouseleave",A),()=>{j.removeEventListener("mouseleave",A)}},[i.floating,n,o,c,x,_]);const N=a.useCallback((A,j=!0)=>{const M=To(h.current,"close",R.current);M&&!E.current?w.start(M,()=>o(!1,ue("trigger-hover",A))):j&&(w.clear(),o(!1,ue("trigger-hover",A)))},[h,o,w]),I=J(()=>{U.current(),E.current=void 0}),W=J(()=>{if(D.current){const A=xe(i.floating).body;A.style.pointerEvents="",A.removeAttribute(cs),D.current=!1}}),$=J(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);a.useEffect(()=>{if(!c)return;function A(X){if(w.clear(),k.current=!1,p&&!dn(R.current)||jo(y.current)>0&&!To(h.current,"open"))return;const L=To(h.current,"open",R.current);L?w.start(L,()=>{v.current||o(!0,ue("trigger-hover",X))}):n||o(!0,ue("trigger-hover",X))}function j(X){if($()){W();return}U.current();const L=xe(i.floating);if(S.clear(),P.current=!1,x.current&&r.current.floatingContext){n||w.clear(),E.current=x.current({...r.current.floatingContext,tree:m,x:X.clientX,y:X.clientY,onClose(){W(),I(),$()||N(X,!0)}});const se=E.current;L.addEventListener("mousemove",se),U.current=()=>{L.removeEventListener("mousemove",se)};return}(R.current==="touch"?!ge(i.floating,X.relatedTarget):!0)&&N(X)}function M(X){var L;$()||r.current.floatingContext&&((L=x.current)==null||L.call(x,{...r.current.floatingContext,tree:m,x:X.clientX,y:X.clientY,onClose(){W(),I(),$()||N(X)}})(X))}function q(){w.clear()}function ce(X){$()||N(X,!1)}if(de(i.domReference)){const X=i.domReference,L=i.floating;return n&&X.addEventListener("mouseleave",M),g&&X.addEventListener("mousemove",A,{once:!0}),X.addEventListener("mouseenter",A),X.addEventListener("mouseleave",j),L&&(L.addEventListener("mouseleave",M),L.addEventListener("mouseenter",q),L.addEventListener("mouseleave",ce)),()=>{n&&X.removeEventListener("mouseleave",M),g&&X.removeEventListener("mousemove",A),X.removeEventListener("mouseenter",A),X.removeEventListener("mouseleave",j),L&&(L.removeEventListener("mouseleave",M),L.removeEventListener("mouseenter",q),L.removeEventListener("mouseleave",ce))}}},[i,c,e,p,g,N,I,W,o,n,v,m,h,x,r,$,y,w,S]),oe(()=>{var A,j,M,q;if(c&&n&&(j=(A=x.current)==null?void 0:A.__options)!=null&&j.blockPointerEvents&&_()){D.current=!0;const ce=i.floating;if(de(i.domReference)&&ce){const X=xe(i.floating).body;X.setAttribute(cs,"");const L=i.domReference,re=(q=(M=m==null?void 0:m.nodesRef.current.find(se=>se.id===b))==null?void 0:M.context)==null?void 0:q.elements.floating;return re&&(re.style.pointerEvents=""),X.style.pointerEvents="none",L.style.pointerEvents="auto",ce.style.pointerEvents="auto",()=>{X.style.pointerEvents="",L.style.pointerEvents="",ce.style.pointerEvents=""}}}},[c,n,b,i,m,x,_]),oe(()=>{n||(R.current=void 0,P.current=!1,I(),W())},[n,I,W]),a.useEffect(()=>()=>{I(),w.clear(),S.clear()},[c,i.domReference,I,w,S]),a.useEffect(()=>W,[W]);const T=a.useMemo(()=>{function A(j){R.current=j.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(j){const{nativeEvent:M}=j;function q(){!k.current&&!v.current&&o(!0,ue("trigger-hover",M))}p&&!dn(R.current)||n||jo(y.current)===0||P.current&&j.movementX**2+j.movementY**2<2||(S.clear(),R.current==="touch"?q():(P.current=!0,S.start(jo(y.current),q)))}}},[p,o,n,v,y,S]);return a.useMemo(()=>c?{reference:T}:{},[c,T])}function as(e,t,n){let{reference:o,floating:r}=e;const s=Ke(t),i=xr(t),c=br(i),l=Be(t),u=s==="y",p=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,g=o[c]/2-r[c]/2;let m;switch(l){case"top":m={x:p,y:o.y-r.height};break;case"bottom":m={x:p,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:d};break;case"left":m={x:o.x-r.width,y:d};break;default:m={x:o.x,y:o.y}}switch(wt(t)){case"start":m[i]-=g*(n&&u?-1:1);break;case"end":m[i]+=g*(n&&u?-1:1);break}return m}const Wd=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:p,y:d}=as(u,o,l),g=o,m={},b=0;for(let x=0;x<c.length;x++){const{name:h,fn:v}=c[x],{x:y,y:R,data:w,reset:E}=await v({x:p,y:d,initialPlacement:o,placement:g,strategy:r,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});p=y??p,d=R??d,m={...m,[h]:{...m[h],...w}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:p,y:d}=as(u,g,l)),x=-1)}return{x:p,y:d,placement:g,strategy:r,middlewareData:m}};async function fn(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:g=!1,padding:m=0}=ft(t,e),b=Ui(m),h=c[g?d==="floating"?"reference":"floating":d],v=ro(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:p,strategy:l})),y=d==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),w=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},E=ro(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:R,strategy:l}):y);return{top:(v.top-E.top+b.top)/w.y,bottom:(E.bottom-v.bottom+b.bottom)/w.y,left:(v.left-E.left+b.left)/w.x,right:(E.right-v.right+b.right)/w.x}}const zd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:p=!0,crossAxis:d=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,...h}=ft(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Be(r),y=Ke(c),R=Be(c)===c,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=g||(R||!x?[oo(c)]:jd(c)),S=b!=="none";!g&&S&&E.push(...Nd(c,x,b,w));const k=[c,...E],D=await fn(t,h),U=[];let P=((o=s.flip)==null?void 0:o.overflows)||[];if(p&&U.push(D[v]),d){const W=Td(r,i,w);U.push(D[W[0]],D[W[1]])}if(P=[...P,{placement:r,overflows:U}],!U.every(W=>W<=0)){var _,N;const W=(((_=s.flip)==null?void 0:_.index)||0)+1,$=k[W];if($&&(!(d==="alignment"?y!==Ke($):!1)||P.every(j=>Ke(j.placement)===y?j.overflows[0]>0:!0)))return{data:{index:W,overflows:P},reset:{placement:$}};let T=(N=P.filter(A=>A.overflows[0]<=0).sort((A,j)=>A.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!T)switch(m){case"bestFit":{var I;const A=(I=P.filter(j=>{if(S){const M=Ke(j.placement);return M===y||M==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(M=>M>0).reduce((M,q)=>M+q,0)]).sort((j,M)=>j[1]-M[1])[0])==null?void 0:I[0];A&&(T=A);break}case"initialPlacement":T=c;break}if(r!==T)return{reset:{placement:T}}}return{}}}};function ls(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function us(e){return Id.some(t=>e[t]>=0)}const Hd=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=ft(e,t);switch(o){case"referenceHidden":{const s=await fn(t,{...r,elementContext:"reference"}),i=ls(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:us(i)}}}case"escaped":{const s=await fn(t,{...r,altBoundary:!0}),i=ls(s,n.floating);return{data:{escapedOffsets:i,escaped:us(i)}}}default:return{}}}}},Wi=new Set(["left","top"]);async function Gd(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Be(n),c=wt(n),l=Ke(n)==="y",u=Wi.has(i)?-1:1,p=s&&l?-1:1,d=ft(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof b=="number"&&(m=c==="end"?b*-1:b),l?{x:m*p,y:g*u}:{x:g*u,y:m*p}}const Kd=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,l=await Gd(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},qd=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=ft(e,t),u={x:n,y:o},p=await fn(t,l),d=Ke(Be(r)),g=vr(d);let m=u[g],b=u[d];if(s){const h=g==="y"?"top":"left",v=g==="y"?"bottom":"right",y=m+p[h],R=m-p[v];m=Yo(y,m,R)}if(i){const h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=b+p[h],R=b-p[v];b=Yo(y,b,R)}const x=c.fn({...t,[g]:m,[d]:b});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[g]:s,[d]:i}}}}}},Yd=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=ft(e,t),p={x:n,y:o},d=Ke(r),g=vr(d);let m=p[g],b=p[d];const x=ft(c,t),h=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(l){const R=g==="y"?"height":"width",w=s.reference[g]-s.floating[R]+h.mainAxis,E=s.reference[g]+s.reference[R]-h.mainAxis;m<w?m=w:m>E&&(m=E)}if(u){var v,y;const R=g==="y"?"width":"height",w=Wi.has(Be(r)),E=s.reference[d]-s.floating[R]+(w&&((v=i.offset)==null?void 0:v[d])||0)+(w?0:h.crossAxis),S=s.reference[d]+s.reference[R]+(w?0:((y=i.offset)==null?void 0:y[d])||0)-(w?h.crossAxis:0);b<E?b=E:b>S&&(b=S)}return{[g]:m,[d]:b}}}},Xd=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:c}=t,{apply:l=()=>{},...u}=ft(e,t),p=await fn(t,u),d=Be(r),g=wt(r),m=Ke(r)==="y",{width:b,height:x}=s.floating;let h,v;d==="top"||d==="bottom"?(h=d,v=g===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(v=d,h=g==="end"?"top":"bottom");const y=x-p.top-p.bottom,R=b-p.left-p.right,w=zt(x-p[h],y),E=zt(b-p[v],R),S=!t.middlewareData.shift;let k=w,D=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=R),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(k=y),S&&!g){const P=Le(p.left,0),_=Le(p.right,0),N=Le(p.top,0),I=Le(p.bottom,0);m?D=b-2*(P!==0||_!==0?P+_:Le(p.left,p.right)):k=x-2*(N!==0||I!==0?N+I:Le(p.top,p.bottom))}await l({...t,availableWidth:D,availableHeight:k});const U=await i.getDimensions(c.floating);return b!==U.width||x!==U.height?{reset:{rects:!0}}:{}}}};function zi(e){const t=Ye(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=he(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=no(n)!==s||no(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function yr(e){return de(e)?e:e.contextElement}function Vt(e){const t=yr(e);if(!he(t))return nt(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=zi(t);let i=(s?no(n.width):n.width)/o,c=(s?no(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Zd=nt(0);function Hi(e){const t=Ee(e);return!lo()||!t.visualViewport?Zd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ee(e)?!1:t}function Ot(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=yr(e);let i=nt(1);t&&(o?de(o)&&(i=Vt(o)):i=Vt(e));const c=Qd(s,n,o)?Hi(s):nt(0);let l=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,p=r.width/i.x,d=r.height/i.y;if(s){const g=Ee(s),m=o&&de(o)?Ee(o):o;let b=g,x=Uo(b);for(;x&&o&&m!==b;){const h=Vt(x),v=x.getBoundingClientRect(),y=Ye(x),R=v.left+(x.clientLeft+parseFloat(y.paddingLeft))*h.x,w=v.top+(x.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,u*=h.y,p*=h.x,d*=h.y,l+=R,u+=w,b=Ee(x),x=Uo(b)}}return ro({width:p,height:d,x:l,y:u})}function mo(e,t){const n=uo(e).scrollLeft;return t?t.left+n:Ot(it(e)).left+n}function Gi(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-mo(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Jd(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=it(o),c=t?ao(t.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=nt(1);const p=nt(0),d=he(o);if((d||!d&&!s)&&((xt(o)!=="body"||pn(i))&&(l=uo(o)),he(o))){const m=Ot(o);u=Vt(o),p.x=m.x+o.clientLeft,p.y=m.y+o.clientTop}const g=i&&!d&&!s?Gi(i,l):nt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+g.x,y:n.y*u.y-l.scrollTop*u.y+p.y+g.y}}function ef(e){return Array.from(e.getClientRects())}function tf(e){const t=it(e),n=uo(e),o=e.ownerDocument.body,r=Le(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Le(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+mo(e);const c=-n.scrollTop;return Ye(o).direction==="rtl"&&(i+=Le(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:c}}const ds=25;function nf(e,t){const n=Ee(e),o=it(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,l=0;if(r){s=r.width,i=r.height;const p=lo();(!p||p&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const u=mo(o);if(u<=0){const p=o.ownerDocument,d=p.body,g=getComputedStyle(d),m=p.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(o.clientWidth-d.clientWidth-m);b<=ds&&(s-=b)}else u<=ds&&(s+=u);return{width:s,height:i,x:c,y:l}}const of=new Set(["absolute","fixed"]);function rf(e,t){const n=Ot(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=he(e)?Vt(e):nt(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:i,height:c,x:l,y:u}}function fs(e,t,n){let o;if(t==="viewport")o=nf(e,n);else if(t==="document")o=tf(it(e));else if(de(t))o=rf(t,n);else{const r=Hi(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ro(o)}function Ki(e,t){const n=rt(e);return n===t||!de(n)||tt(n)?!1:Ye(n).position==="fixed"||Ki(n,t)}function sf(e,t){const n=t.get(e);if(n)return n;let o=ht(e,[],!1).filter(c=>de(c)&&xt(c)!=="body"),r=null;const s=Ye(e).position==="fixed";let i=s?rt(e):e;for(;de(i)&&!tt(i);){const c=Ye(i),l=or(i);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&of.has(r.position)||pn(i)&&!l&&Ki(e,i))?o=o.filter(p=>p!==i):r=c,i=rt(i)}return t.set(e,o),o}function cf(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?ao(t)?[]:sf(t,this._c):[].concat(n),o],c=i[0],l=i.reduce((u,p)=>{const d=fs(t,p,r);return u.top=Le(d.top,u.top),u.right=zt(d.right,u.right),u.bottom=zt(d.bottom,u.bottom),u.left=Le(d.left,u.left),u},fs(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function af(e){const{width:t,height:n}=zi(e);return{width:t,height:n}}function lf(e,t,n){const o=he(t),r=it(t),s=n==="fixed",i=Ot(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=nt(0);function u(){l.x=mo(r)}if(o||!o&&!s)if((xt(t)!=="body"||pn(r))&&(c=uo(t)),o){const m=Ot(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&u();s&&!o&&r&&u();const p=r&&!o&&!s?Gi(r,c):nt(0),d=i.left+c.scrollLeft-l.x-p.x,g=i.top+c.scrollTop-l.y-p.y;return{x:d,y:g,width:i.width,height:i.height}}function _o(e){return Ye(e).position==="static"}function ps(e,t){if(!he(e)||Ye(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return it(e)===n&&(n=n.ownerDocument.body),n}function qi(e,t){const n=Ee(e);if(ao(e))return n;if(!he(e)){let r=rt(e);for(;r&&!tt(r);){if(de(r)&&!_o(r))return r;r=rt(r)}return n}let o=ps(e,t);for(;o&&Za(o)&&_o(o);)o=ps(o,t);return o&&tt(o)&&_o(o)&&!or(o)?n:o||nl(e)||n}const uf=async function(e){const t=this.getOffsetParent||qi,n=this.getDimensions,o=await n(e.floating);return{reference:lf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function df(e){return Ye(e).direction==="rtl"}const ff={convertOffsetParentRelativeRectToViewportRelativeRect:Jd,getDocumentElement:it,getClippingRect:cf,getOffsetParent:qi,getElementRects:uf,getClientRects:ef,getDimensions:af,getScale:Vt,isElement:de,isRTL:df};function Yi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pf(e,t){let n=null,o;const r=it(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:p,top:d,width:g,height:m}=u;if(c||t(),!g||!m)return;const b=Bt(d),x=Bt(r.clientWidth-(p+g)),h=Bt(r.clientHeight-(d+m)),v=Bt(p),R={rootMargin:-b+"px "+-x+"px "+-h+"px "+-v+"px",threshold:Le(0,zt(1,l))||1};let w=!0;function E(S){const k=S[0].intersectionRatio;if(k!==l){if(!w)return i();k?i(!1,k):o=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!Yi(u,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(E,{...R,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,R)}n.observe(e)}return i(!0),s}function ms(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=yr(e),p=r||s?[...u?ht(u):[],...ht(t)]:[];p.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const d=u&&c?pf(u,n):null;let g=-1,m=null;i&&(m=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var R;(R=m)==null||R.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let b,x=l?Ot(e):null;l&&h();function h(){const v=Ot(e);x&&!Yi(x,v)&&n(),x=v,b=requestAnimationFrame(h)}return n(),()=>{var v;p.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),d==null||d(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(b)}}const mf=Kd,gf=qd,hf=zd,vf=Xd,bf=Hd,xf=Yd,yf=(e,t,n)=>{const o=new Map,r={platform:ff,...n},s={...r.platform,_c:o};return Wd(e,t,{...r,platform:s})};var wf=typeof document<"u",Rf=function(){},Gn=wf?a.useLayoutEffect:Rf;function so(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!so(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!so(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Xi(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gs(e,t){const n=Xi(e);return Math.round(t*n)/n}function Ao(e){const t=a.useRef(e);return Gn(()=>{t.current=e}),t}function Cf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[p,d]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=a.useState(o);so(g,o)||m(o);const[b,x]=a.useState(null),[h,v]=a.useState(null),y=a.useCallback(j=>{j!==S.current&&(S.current=j,x(j))},[]),R=a.useCallback(j=>{j!==k.current&&(k.current=j,v(j))},[]),w=s||b,E=i||h,S=a.useRef(null),k=a.useRef(null),D=a.useRef(p),U=l!=null,P=Ao(l),_=Ao(r),N=Ao(u),I=a.useCallback(()=>{if(!S.current||!k.current)return;const j={placement:t,strategy:n,middleware:g};_.current&&(j.platform=_.current),yf(S.current,k.current,j).then(M=>{const q={...M,isPositioned:N.current!==!1};W.current&&!so(D.current,q)&&(D.current=q,Ht.flushSync(()=>{d(q)}))})},[g,t,n,_,N]);Gn(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[u]);const W=a.useRef(!1);Gn(()=>(W.current=!0,()=>{W.current=!1}),[]),Gn(()=>{if(w&&(S.current=w),E&&(k.current=E),w&&E){if(P.current)return P.current(w,E,I);I()}},[w,E,I,P,U]);const $=a.useMemo(()=>({reference:S,floating:k,setReference:y,setFloating:R}),[y,R]),T=a.useMemo(()=>({reference:w,floating:E}),[w,E]),A=a.useMemo(()=>{const j={position:n,left:0,top:0};if(!T.floating)return j;const M=gs(T.floating,p.x),q=gs(T.floating,p.y);return c?{...j,transform:"translate("+M+"px, "+q+"px)",...Xi(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:q}},[n,c,T.floating,p.x,p.y]);return a.useMemo(()=>({...p,update:I,refs:$,elements:T,floatingStyles:A}),[p,I,$,T,A])}const Ef=(e,t)=>({...mf(e),options:[e,t]}),Sf=(e,t)=>({...gf(e),options:[e,t]}),Mf=(e,t)=>({...xf(e),options:[e,t]}),If=(e,t)=>({...hf(e),options:[e,t]}),kf=(e,t)=>({...vf(e),options:[e,t]}),Pf=(e,t)=>({...bf(e),options:[e,t]});function Of(e={}){const{nodeId:t}=e,n=fr({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,r=o.elements,[s,i]=a.useState(null),[c,l]=a.useState(null),p=(r==null?void 0:r.domReference)||s,d=a.useRef(null),g=Ue();oe(()=>{p&&(d.current=p)},[p]);const m=Cf({...e,elements:{...r,...c&&{reference:c}}}),b=a.useCallback(R=>{const w=de(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;l(w),m.refs.setReference(w)},[m.refs]),x=a.useCallback(R=>{(de(R)||R===null)&&(d.current=R,i(R)),(de(m.refs.reference.current)||m.refs.reference.current===null||R!==null&&!de(R))&&m.refs.setReference(R)},[m.refs]),h=a.useMemo(()=>({...m.refs,setReference:x,setPositionReference:b,domReference:d}),[m.refs,x,b]),v=a.useMemo(()=>({...m.elements,domReference:p}),[m.elements,p]),y=a.useMemo(()=>({...m,...o,refs:h,elements:v,nodeId:t}),[m,h,v,t,o]);return oe(()=>{o.dataRef.current.floatingContext=y;const R=g==null?void 0:g.nodesRef.current.find(w=>w.id===t);R&&(R.context=y)}),a.useMemo(()=>({...m,context:y,refs:h,elements:v}),[m,h,v,y])}const Do=Il&&Zs;function Tf(e,t={}){const{open:n,onOpenChange:o,events:r,dataRef:s,elements:i}=e,{enabled:c=!0,visibleOnly:l=!0}=t,u=a.useRef(!1),p=Fe(),d=a.useRef(!0);a.useEffect(()=>{if(!c)return;const m=Ee(i.domReference);function b(){!n&&he(i.domReference)&&i.domReference===et(xe(i.domReference))&&(u.current=!0)}function x(){d.current=!0}function h(){d.current=!1}return m.addEventListener("blur",b),Do&&(m.addEventListener("keydown",x,!0),m.addEventListener("pointerdown",h,!0)),()=>{m.removeEventListener("blur",b),Do&&(m.removeEventListener("keydown",x,!0),m.removeEventListener("pointerdown",h,!0))}},[i.domReference,n,c]),a.useEffect(()=>{if(!c)return;function m(b){(b.reason==="trigger-press"||b.reason==="escape-key")&&(u.current=!0)}return r.on("openchange",m),()=>{r.off("openchange",m)}},[r,c]);const g=a.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(m){if(u.current)return;const b=Ge(m.nativeEvent);if(l&&de(b)){if(Do&&!m.relatedTarget){if(!d.current&&!lr(b))return}else if(!_l(b))return}o(!0,ue("trigger-focus",m.nativeEvent))},onBlur(m){u.current=!1;const b=m.relatedTarget,x=m.nativeEvent,h=de(b)&&b.hasAttribute(Wt("focus-guard"))&&b.getAttribute("data-type")==="outside";p.start(0,()=>{var v;const y=et(i.domReference?i.domReference.ownerDocument:document);!b&&y===i.domReference||ge((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,y)||ge(i.domReference,y)||h||o(!1,ue("trigger-focus",x))})}}),[s,i.domReference,o,l,p]);return a.useMemo(()=>c?{reference:g}:{},[c,g])}const jf="Escape";function go(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function $n(e,t){return go(t,e===ar||e===gn,e===vt||e===bt)}function No(e,t,n){return go(t,e===gn,n?e===vt:e===bt)||e==="Enter"||e===" "||e===""}function _f(e,t,n){return go(t,n?e===vt:e===bt,e===gn)}function Af(e,t,n,o){const r=n?e===bt:e===vt,s=e===ar;return t==="both"||t==="horizontal"&&o&&o>1?e===jf:go(t,r,s)}function Df(e,t){const{open:n,onOpenChange:o,elements:r}=e,{listRef:s,activeIndex:i,onNavigate:c=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:p=!1,loop:d=!1,nested:g=!1,rtl:m=!1,virtual:b=!1,focusItemOnOpen:x="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:R="vertical",parentOrientation:w,cols:E=1,scrollItemIntoView:S=!0,itemSizes:k,dense:D=!1,id:U}=t,P=Yn(r.floating),_=ye(P),N=yt(),I=Ue();oe(()=>{e.dataRef.current.orientation=R},[e,R]);const W=Ho(r.domReference),$=a.useRef(x),T=a.useRef(u??-1),A=a.useRef(null),j=a.useRef(!0),M=J(O=>{c(T.current===-1?null:T.current,O)}),q=a.useRef(M),ce=a.useRef(!!r.floating),X=a.useRef(n),L=a.useRef(!1),re=a.useRef(!1),se=ye(y),C=ye(n),B=ye(S),Z=ye(u),K=J(()=>{function O(ae){b?I==null||I.events.emit("virtualfocus",ae):Hn(ae,{sync:L.current,preventScroll:!0})}const G=s.current[T.current],F=re.current;G&&O(G),(L.current?ae=>ae():requestAnimationFrame)(()=>{var ae;const ie=s.current[T.current]||G;if(!ie)return;G||O(ie);const me=B.current;me&&H&&(F||!j.current)&&((ae=ie.scrollIntoView)==null||ae.call(ie,typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});oe(()=>{l&&(n&&r.floating?$.current&&u!=null&&(re.current=!0,T.current=u,M()):ce.current&&(T.current=-1,q.current()))},[l,n,r.floating,u,M]),oe(()=>{if(l){if(!n){L.current=!1;return}if(r.floating)if(i==null){if(L.current=!1,Z.current!=null)return;if(ce.current&&(T.current=-1,K()),(!X.current||!ce.current)&&$.current&&(A.current!=null||$.current===!0&&A.current==null)){let O=0;const G=()=>{s.current[0]==null?(O<2&&(O?requestAnimationFrame:queueMicrotask)(G),O+=1):(T.current=A.current==null||No(A.current,R,m)||g?Oo(s,se.current):is(s,se.current),A.current=null,M())};G()}}else cn(s,i)||(T.current=i,K(),re.current=!1)}},[l,n,r.floating,i,Z,g,s,R,m,M,K,se]),oe(()=>{var O,G;if(!l||r.floating||!I||b||!ce.current)return;const F=I.nodesRef.current,Q=(G=(O=F.find(me=>me.id===N))==null?void 0:O.context)==null?void 0:G.elements.floating,ae=et(xe(r.floating)),ie=F.some(me=>me.context&&ge(me.context.elements.floating,ae));Q&&!ie&&j.current&&Q.focus({preventScroll:!0})},[l,r.floating,I,N,b]),oe(()=>{q.current=M,X.current=n,ce.current=!!r.floating}),oe(()=>{n||(A.current=null,$.current=x)},[n,x]);const V=i!=null,H=a.useMemo(()=>{function O(F){if(!C.current)return;const Q=s.current.indexOf(F.currentTarget);Q!==-1&&T.current!==Q&&(T.current=Q,M(F))}return{onFocus(F){L.current=!0,O(F)},onClick:({currentTarget:F})=>F.focus({preventScroll:!0}),onMouseMove(F){L.current=!0,re.current=!1,h&&O(F)},onPointerLeave(F){var Q;if(!j.current||F.pointerType==="touch")return;L.current=!0;const ae=F.relatedTarget;!h||s.current.includes(ae)||(T.current=-1,M(F),b||(Q=_.current)==null||Q.focus({preventScroll:!0}))}}},[C,_,h,s,M,b]),Y=a.useCallback(()=>{var O,G,F;return w??((F=(G=(O=I==null?void 0:I.nodesRef.current.find(Q=>Q.id===N))==null?void 0:O.context)==null?void 0:G.dataRef)==null?void 0:F.current.orientation)},[N,I,w]),z=J(O=>{if(j.current=!1,L.current=!0,O.which===229||!C.current&&O.currentTarget===_.current)return;if(g&&Af(O.key,R,m,E)){$n(O.key,Y())||Ie(O),o(!1,ue("list-navigation",O.nativeEvent)),he(r.domReference)&&(b?I==null||I.events.emit("virtualfocus",r.domReference):r.domReference.focus());return}const G=T.current,F=Oo(s,y),Q=is(s,y);if(W||(O.key==="Home"&&(Ie(O),T.current=F,M(O)),O.key==="End"&&(Ie(O),T.current=Q,M(O))),E>1){const ae=k||Array.from({length:s.current.length},()=>({width:1,height:1})),ie=Bd(ae,E,D),me=ie.findIndex(Re=>Re!=null&&!an(s,Re,y)),De=ie.reduce((Re,Te,Qe)=>Te!=null&&!an(s,Te,y)?Qe:Re,-1),We=ie[Fd({current:ie.map(Re=>Re!=null?s.current[Re]:null)},{event:O,orientation:R,loop:d,rtl:m,cols:E,disabledIndices:Vd([...(typeof y!="function"?y:null)||s.current.map((Re,Te)=>an(s,Te,y)?Te:void 0),void 0],ie),minIndex:me,maxIndex:De,prevIndex:$d(T.current>Q?F:T.current,ae,ie,E,O.key===gn?"bl":O.key===(m?vt:bt)?"tr":"tl"),stopEvent:!0})];if(We!=null&&(T.current=We,M(O)),R==="both")return}if($n(O.key,R)){if(Ie(O),n&&!b&&et(O.currentTarget.ownerDocument)===O.currentTarget){T.current=No(O.key,R,m)?F:Q,M(O);return}No(O.key,R,m)?d?G>=Q?p&&G!==s.current.length?T.current=-1:(L.current=!1,T.current=F):T.current=Me(s,{startingIndex:G,disabledIndices:y}):T.current=Math.min(Q,Me(s,{startingIndex:G,disabledIndices:y})):d?G<=F?p&&G!==-1?T.current=s.current.length:(L.current=!1,T.current=Q):T.current=Me(s,{startingIndex:G,decrement:!0,disabledIndices:y}):T.current=Math.max(F,Me(s,{startingIndex:G,decrement:!0,disabledIndices:y})),cn(s,T.current)&&(T.current=-1),M(O)}}),te=a.useMemo(()=>b&&n&&V&&{"aria-activedescendant":`${U}-${i}`},[b,n,V,U,i]),ne=a.useMemo(()=>({"aria-orientation":R==="both"?void 0:R,...W?{}:te,onKeyDown(O){if(O.key==="Tab"&&O.shiftKey&&n&&!b){Ie(O),o(!1,ue("list-navigation",O.nativeEvent)),he(r.domReference)&&r.domReference.focus();return}z(O)},onPointerMove(){j.current=!0}}),[te,z,R,W,o,n,b,r.domReference]),ee=a.useMemo(()=>{function O(F){x==="auto"&&ti(F.nativeEvent)&&($.current=!b)}function G(F){$.current=x,x==="auto"&&ni(F.nativeEvent)&&($.current=!0)}return{...te,onKeyDown(F){j.current=!1;const Q=F.key.startsWith("Arrow"),ae=_f(F.key,Y(),m),ie=$n(F.key,R),me=(g?ae:ie)||F.key==="Enter"||F.key.trim()==="";if(b&&n)return z(F);if(!(!n&&!v&&Q)){if(me){const De=$n(F.key,Y());A.current=g&&De?null:F.key}if(g){ae&&(Ie(F),n?(T.current=Oo(s,se.current),M(F)):o(!0,ue("list-navigation",F.nativeEvent)));return}ie&&(u!=null&&(T.current=u),Ie(F),!n&&v?o(!0,ue("list-navigation",F.nativeEvent)):z(F),n&&M(F))}},onFocus(F){n&&!b&&(T.current=-1,M(F))},onPointerDown:G,onPointerEnter:G,onMouseDown:O,onClick:O}},[te,z,se,x,s,g,M,o,n,v,R,Y,m,u,b]);return a.useMemo(()=>l?{reference:ee,floating:ne,item:H}:{},[l,ee,ne,H])}function Nf(e,t){var n;const{open:o,dataRef:r}=e,{listRef:s,activeIndex:i,onMatch:c,onTypingChange:l,enabled:u=!0,findMatch:p=null,resetMs:d=750,ignoreKeys:g=[],selectedIndex:m=null}=t,b=Fe(),x=a.useRef(""),h=a.useRef((n=m??i)!=null?n:-1),v=a.useRef(null),y=J(c),R=J(l),w=ye(p),E=ye(g);oe(()=>{o&&(b.clear(),v.current=null,x.current="")},[o,b]),oe(()=>{var P;o&&x.current===""&&(h.current=(P=m??i)!=null?P:-1)},[o,m,i]);const S=J(P=>{P?r.current.typing||(r.current.typing=P,R(P)):r.current.typing&&(r.current.typing=P,R(P))}),k=J(P=>{function _(T,A,j){const M=w.current?w.current(A,j):A.find(q=>(q==null?void 0:q.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return M?T.indexOf(M):-1}const N=s.current;if(x.current.length>0&&x.current[0]!==" "&&(_(N,N,x.current)===-1?S(!1):P.key===" "&&Ie(P)),N==null||E.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;o&&P.key!==" "&&(Ie(P),S(!0)),N.every(T=>{var A,j;return T?((A=T[0])==null?void 0:A.toLocaleLowerCase())!==((j=T[1])==null?void 0:j.toLocaleLowerCase()):!0})&&x.current===P.key&&(x.current="",h.current=v.current),x.current+=P.key,b.start(d,()=>{x.current="",h.current=v.current,S(!1)});const W=h.current,$=_(N,[...N.slice((W||0)+1),...N.slice(0,(W||0)+1)],x.current);$!==-1?(y($),v.current=$):P.key!==" "&&(x.current="",S(!1))}),D=a.useMemo(()=>({onKeyDown:k}),[k]),U=a.useMemo(()=>({onKeyDown:k,onKeyUp(P){P.key===" "&&S(!1)}}),[k,S]);return a.useMemo(()=>u?{reference:D,floating:U}:{},[u,D,U])}function hs(e,t){const[n,o]=e;let r=!1;const s=t.length;for(let i=0,c=s-1;i<s;c=i++){const[l,u]=t[i]||[0,0],[p,d]=t[c]||[0,0];u>=o!=d>=o&&n<=(p-l)*(o-u)/(d-u)+l&&(r=!r)}return r}function Lf(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Ff(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:o=!0}=e,r=new Pt;let s=!1,i=null,c=null,l=typeof performance<"u"?performance.now():0;function u(d,g){const m=performance.now(),b=m-l;if(i===null||c===null||b===0)return i=d,c=g,l=m,null;const x=d-i,h=g-c,y=Math.sqrt(x*x+h*h)/b;return i=d,c=g,l=m,y}const p=({x:d,y:g,placement:m,elements:b,onClose:x,nodeId:h,tree:v})=>function(R){function w(){r.clear(),x()}if(r.clear(),!b.domReference||!b.floating||m==null||d==null||g==null)return;const{clientX:E,clientY:S}=R,k=[E,S],D=Ge(R),U=R.type==="mouseleave",P=ge(b.floating,D),_=ge(b.domReference,D),N=b.domReference.getBoundingClientRect(),I=b.floating.getBoundingClientRect(),W=m.split("-")[0],$=d>I.right-I.width/2,T=g>I.bottom-I.height/2,A=Lf(k,N),j=I.width>N.width,M=I.height>N.height,q=(j?N:I).left,ce=(j?N:I).right,X=(M?N:I).top,L=(M?N:I).bottom;if(P&&(s=!0,!U))return;if(_&&(s=!1),_&&!U){s=!0;return}if(U&&de(R.relatedTarget)&&ge(b.floating,R.relatedTarget)||v&&kt(v.nodesRef.current,h).some(({context:C})=>C==null?void 0:C.open))return;if(W==="top"&&g>=N.bottom-1||W==="bottom"&&g<=N.top+1||W==="left"&&d>=N.right-1||W==="right"&&d<=N.left+1)return w();let re=[];switch(W){case"top":re=[[q,N.top+1],[q,I.bottom-1],[ce,I.bottom-1],[ce,N.top+1]];break;case"bottom":re=[[q,I.top+1],[q,N.bottom-1],[ce,N.bottom-1],[ce,I.top+1]];break;case"left":re=[[I.right-1,L],[I.right-1,X],[N.left+1,X],[N.left+1,L]];break;case"right":re=[[N.right-1,L],[N.right-1,X],[I.left+1,X],[I.left+1,L]];break}function se([C,B]){switch(W){case"top":{const Z=[j?C+t/2:$?C+t*4:C-t*4,B+t+1],K=[j?C-t/2:$?C+t*4:C-t*4,B+t+1],V=[[I.left,$||j?I.bottom-t:I.top],[I.right,$?j?I.bottom-t:I.top:I.bottom-t]];return[Z,K,...V]}case"bottom":{const Z=[j?C+t/2:$?C+t*4:C-t*4,B-t],K=[j?C-t/2:$?C+t*4:C-t*4,B-t],V=[[I.left,$||j?I.top+t:I.bottom],[I.right,$?j?I.top+t:I.bottom:I.top+t]];return[Z,K,...V]}case"left":{const Z=[C+t+1,M?B+t/2:T?B+t*4:B-t*4],K=[C+t+1,M?B-t/2:T?B+t*4:B-t*4];return[...[[T||M?I.right-t:I.left,I.top],[T?M?I.right-t:I.left:I.right-t,I.bottom]],Z,K]}case"right":{const Z=[C-t,M?B+t/2:T?B+t*4:B-t*4],K=[C-t,M?B-t/2:T?B+t*4:B-t*4],V=[[T||M?I.left+t:I.right,I.top],[T?M?I.left+t:I.right:I.left+t,I.bottom]];return[Z,K,...V]}default:return[]}}if(!hs([E,S],re)){if(s&&!A)return w();if(!U&&o){const C=u(R.clientX,R.clientY);if(C!==null&&C<.1)return w()}hs([E,S],se([d,g]))?!s&&o&&r.start(40,w):w()}};return p.__options={blockPointerEvents:n},p}const Bf=e=>({name:"arrow",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,rects:c,platform:l,elements:u,middlewareData:p}=t,{element:d,padding:g=0,offsetParent:m="real"}=ft(e,t)||{};if(d==null)return{};const b=Ui(g),x={x:r,y:s},h=xr(i),v=br(h),y=await l.getDimensions(d),R=h==="y",w=R?"top":"left",E=R?"bottom":"right",S=R?"clientHeight":"clientWidth",k=c.reference[v]+c.reference[h]-x[h]-c.floating[v],D=x[h]-c.reference[h],U=m==="real"?await((n=l.getOffsetParent)==null?void 0:n.call(l,d)):u.floating;let P=u.floating[S]||c.floating[v];(!P||!await((o=l.isElement)==null?void 0:o.call(l,U)))&&(P=u.floating[S]||c.floating[v]);const _=k/2-D/2,N=P/2-y[v]/2-1,I=Math.min(b[w],N),W=Math.min(b[E],N),$=I,T=P-y[v]-W,A=P/2-y[v]/2+_,j=Yo($,A,T),M=!p.arrow&&wt(i)!=null&&A!==j&&c.reference[v]/2-(A<$?I:W)-y[v]/2<0,q=M?A<$?A-$:A-T:0;return{[h]:x[h]+q,data:{[h]:j,centerOffset:A-j-q,...M&&{alignmentOffset:q}},reset:M}}}),$f=(e,t)=>({...Bf(e),options:[e,t]});function Zi(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function vs(e,t,n){const{rects:o,placement:r}=e;return{side:Zi(t,Be(r),n),align:wt(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function Vf(e){var t,n;const{anchor:o,positionMethod:r="absolute",side:s="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,collisionBoundary:u,collisionPadding:p=5,sticky:d=!1,arrowPadding:g=5,trackAnchor:m=!0,keepMounted:b=!1,floatingRootContext:x,mounted:h,collisionAvoidance:v,shiftCrossAxis:y=!1,nodeId:R,adaptiveOrigin:w,lazyFlip:E=!1}=e,[S,k]=a.useState(null);!h&&S!==null&&k(null);const D=v.side||"flip",U=v.align||"flip",P=v.fallbackAxisSide||"end",_=typeof o=="function"?o:void 0,N=J(_),I=_?N:o,W=ye(o),T=Vi()==="rtl",A=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":T?"left":"right","inline-start":T?"right":"left"}[s],j=c==="center"?A:`${A}-${c}`;let M=p;const q=1,ce=s==="bottom"?q:0,X=s==="top"?q:0,L=s==="right"?q:0,re=s==="left"?q:0;typeof M=="number"?M={top:M+ce,right:M+re,bottom:M+X,left:M+L}:M&&(M={top:(M.top||0)+ce,right:(M.right||0)+re,bottom:(M.bottom||0)+X,left:(M.left||0)+L});const se={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:M},C=a.useRef(null),B=ye(i),Z=ye(l),H=[Ef(fe=>{const be=vs(fe,s,T),ze=typeof B.current=="function"?B.current(be):B.current,Se=typeof Z.current=="function"?Z.current(be):Z.current;return{mainAxis:ze,crossAxis:Se,alignmentAxis:Se}},[typeof i!="function"?i:0,typeof l!="function"?l:0,T,s])],Y=U==="none"&&D!=="shift",z=!Y&&(d||y||D==="shift"),te=D==="none"?null:If({...se,padding:{top:M.top+q,right:M.right+q,bottom:M.bottom+q,left:M.left+q},mainAxis:!y&&D==="flip",crossAxis:U==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),ne=Y?null:Sf(fe=>{const be=dt(fe.elements.floating).documentElement;return{...se,rootBoundary:y?{x:0,y:0,width:be.clientWidth,height:be.clientHeight}:void 0,mainAxis:U!=="none",crossAxis:z,limiter:d||y?void 0:Mf(ze=>{if(!C.current)return{};const{width:Se,height:pt}=C.current.getBoundingClientRect(),Xe=Ke(Be(ze.placement)),Dt=Xe==="y"?Se:pt,Ct=Xe==="y"?M.left+M.right:M.top+M.bottom;return{offset:Dt/2+Ct/2}})}},[se,d,y,M,U]);D==="shift"||U==="shift"||c==="center"?H.push(ne,te):H.push(te,ne),H.push(kf({...se,apply({elements:{floating:fe},rects:{reference:be},availableWidth:ze,availableHeight:Se}){Object.entries({"--available-width":`${ze}px`,"--available-height":`${Se}px`,"--anchor-width":`${be.width}px`,"--anchor-height":`${be.height}px`}).forEach(([pt,Xe])=>{fe.style.setProperty(pt,Xe)})}}),$f(()=>({element:C.current||document.createElement("div"),padding:g,offsetParent:"floating"}),[g]),Pf(),{name:"transformOrigin",fn(fe){var be,ze,Se;const{elements:pt,middlewareData:Xe,placement:Dt,rects:Ct,y:kn}=fe,Pn=Be(Dt),On=Ke(Pn),le=C.current,He=((be=Xe.arrow)==null?void 0:be.x)||0,ke=((ze=Xe.arrow)==null?void 0:ze.y)||0,xo=(le==null?void 0:le.clientWidth)||0,mt=(le==null?void 0:le.clientHeight)||0,Nt=He+xo/2,Tn=ke+mt/2,jn=Math.abs(((Se=Xe.shift)==null?void 0:Se.y)||0),Et=Ct.reference.height/2,en=typeof i=="function"?i(vs(fe,s,T)):i,Pc=jn>en,Oc={top:`${Nt}px calc(100% + ${en}px)`,bottom:`${Nt}px ${-en}px`,left:`calc(100% + ${en}px) ${Tn}px`,right:`${-en}px ${Tn}px`}[Pn],Tc=`${Nt}px ${Ct.reference.y+Et-kn}px`;return pt.floating.style.setProperty("--transform-origin",z&&On==="y"&&Pc?Tc:Oc),{}}},w);let ee=x;!h&&x&&(ee={...x,elements:{reference:null,floating:null,domReference:null}});const O=a.useMemo(()=>({elementResize:m&&typeof ResizeObserver<"u",layoutShift:m&&typeof IntersectionObserver<"u"}),[m]),{refs:G,elements:F,x:Q,y:ae,middlewareData:ie,update:me,placement:De,context:We,isPositioned:Re,floatingStyles:Te}=Of({rootContext:ee,placement:j,middleware:H,strategy:r,whileElementsMounted:b?void 0:(...fe)=>ms(...fe,O),nodeId:R}),{sideX:Qe,sideY:Ne}=ie.adaptiveOrigin||{},Cn=a.useMemo(()=>w?{position:r,[Qe]:`${Q}px`,[Ne]:`${ae}px`}:Te,[w,Qe,Ne,r,Q,ae,Te]),At=a.useRef(null);oe(()=>{if(!h)return;const fe=W.current,be=typeof fe=="function"?fe():fe,Se=(bs(be)?be.current:be)||null||null;Se!==At.current&&(G.setPositionReference(Se),At.current=Se)},[h,G,I,W]),a.useEffect(()=>{if(!h)return;const fe=W.current;typeof fe!="function"&&bs(fe)&&fe.current!==At.current&&(G.setPositionReference(fe.current),At.current=fe.current)},[h,G,I,W]),a.useEffect(()=>{if(b&&h&&F.domReference&&F.floating)return ms(F.domReference,F.floating,me,O)},[b,h,F,me,O]);const Rt=Be(De),En=Zi(s,Rt,T),Sn=wt(De)||"center",Mn=!!((t=ie.hide)!=null&&t.referenceHidden);oe(()=>{E&&h&&Re&&k(Rt)},[E,h,Re,Rt]);const In=a.useMemo(()=>{var fe,be;return{position:"absolute",top:(fe=ie.arrow)==null?void 0:fe.y,left:(be=ie.arrow)==null?void 0:be.x}},[ie.arrow]),Jt=((n=ie.arrow)==null?void 0:n.centerOffset)!==0;return a.useMemo(()=>({positionerStyles:Cn,arrowStyles:In,arrowRef:C,arrowUncentered:Jt,side:En,align:Sn,physicalSide:Rt,anchorHidden:Mn,refs:G,context:We,isPositioned:Re,update:me}),[Cn,In,C,Jt,En,Sn,Rt,Mn,G,We,Re,me])}function bs(e){return e!=null&&"current"in e}const Uf=a.createContext(void 0);function ho(e=!0){const t=a.useContext(Uf);if(t===void 0&&!e)throw new Error("Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");return t}const Qi=a.createContext(void 0);function xn(e){const t=a.useContext(Qi);if(t===void 0&&!e)throw new Error("Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");return t}const Ji=a.createContext(void 0);function ct(e){const t=a.useContext(Ji);if(t===void 0&&!e)throw new Error("Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");return t}const Wf={...vn,...mn},zf=a.forwardRef(function(t,n){const{className:o,render:r,...s}=t,{open:i,mounted:c,transitionStatus:l,lastOpenChangeReason:u}=ct(),p=ho(),d=a.useMemo(()=>({open:i,transitionStatus:l}),[i,l]);return ve("div",t,{ref:p!=null&&p.backdropRef?[n,p.backdropRef]:n,state:d,stateAttributesMapping:Wf,props:[{role:"presentation",hidden:!c,style:{pointerEvents:u==="trigger-hover"?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},s]})}),ec=a.createContext(void 0);function Hf(){const e=a.useContext(ec);if(e===void 0)throw new Error("Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.");return e}const wr={type:"regular-item"};function vo(e){const{closeOnClick:t,disabled:n=!1,highlighted:o,id:r,menuEvents:s,allowMouseUpTriggerRef:i,typingRef:c,nativeButton:l,itemMetadata:u,nodeId:p}=e,d=a.useRef(null),m=ho(!0)!==void 0,{getButtonProps:b,buttonRef:x}=rr({disabled:n,focusableWhenDisabled:!0,native:l}),h=a.useCallback(y=>Gt({id:r,role:"menuitem",tabIndex:o?0:-1,onMouseMove(R){p&&s.emit("itemhover",{nodeId:p,target:R.currentTarget})},onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()},onKeyUp(R){R.key===" "&&c.current&&R.preventBaseUIHandler()},onClick(R){t&&s.emit("close",{domEvent:R,reason:"item-press"})},onMouseUp(R){d.current&&i.current&&(!m||R.button===2)&&u.type==="regular-item"&&d.current.click()}},y,b),[r,o,b,c,t,s,i,m,u,p]),v=ot(d,x);return a.useMemo(()=>({getItemProps:h,itemRef:v}),[h,v])}let xs=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e})({});const bo={checked(e){return e?{[xs.checked]:""}:{[xs.unchecked]:""}},...mn},Gf=a.memo(a.forwardRef(function(t,n){const{checked:o,defaultChecked:r,onCheckedChange:s,className:i,closeOnClick:c,disabled:l=!1,highlighted:u,id:p,menuEvents:d,itemProps:g,render:m,allowMouseUpTriggerRef:b,typingRef:x,nativeButton:h,nodeId:v,...y}=t,[R,w]=hr({controlled:o,default:r??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:E,itemRef:S}=vo({closeOnClick:c,disabled:l,highlighted:u,id:p,menuEvents:d,allowMouseUpTriggerRef:b,typingRef:x,nativeButton:h,nodeId:v,itemMetadata:wr}),k=a.useMemo(()=>({disabled:l,highlighted:u,checked:R}),[l,u,R]),D=ve("div",t,{state:k,stateAttributesMapping:bo,props:[g,{role:"menuitemcheckbox","aria-checked":R,onClick(U){const P=ue("item-press",U.nativeEvent);s==null||s(!R,P),!P.isCanceled&&w(_=>!_)}},y,E],ref:[S,n]});return f.jsx(ec.Provider,{value:k,children:D})})),Kf=a.forwardRef(function(t,n){const{id:o,label:r,closeOnClick:s=!1,nativeButton:i=!1,...c}=t,l=a.useRef(null),u=bn({label:r}),p=ot(n,u.ref,l),{itemProps:d,activeIndex:g,allowMouseUpTriggerRef:m,typingRef:b}=ct(),x=xn(!0),h=jt(o),v=u.index===g,{events:y}=Ue();return f.jsx(Gf,{...c,id:h,ref:p,highlighted:v,menuEvents:y,itemProps:d,allowMouseUpTriggerRef:m,typingRef:b,closeOnClick:s,nativeButton:i,nodeId:x==null?void 0:x.floatingContext.nodeId})}),qf=a.forwardRef(function(t,n){const{render:o,className:r,keepMounted:s=!1,...i}=t,c=Hf(),l=a.useRef(null),{transitionStatus:u,setMounted:p}=fo(c.checked);Yt({open:c.checked,ref:l,onComplete(){c.checked||p(!1)}});const d=a.useMemo(()=>({checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:u}),[c.checked,c.disabled,c.highlighted,u]);return ve("span",t,{state:d,ref:[n,l],stateAttributesMapping:bo,props:{"aria-hidden":!0,...i},enabled:s||c.checked})}),tc=a.createContext(void 0);function Yf(){const e=a.useContext(tc);if(e===void 0)throw new Error("Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.");return e}const Xf=a.forwardRef(function(t,n){const{render:o,className:r,...s}=t,[i,c]=a.useState(void 0),l=a.useMemo(()=>({setLabelId:c}),[c]),u=ve("div",t,{ref:n,props:{role:"group","aria-labelledby":i,...s}});return f.jsx(tc.Provider,{value:l,children:u})}),Zf=a.forwardRef(function(t,n){const{className:o,render:r,id:s,...i}=t,c=jt(s),{setLabelId:l}=Yf();return oe(()=>(l(c),()=>{l(void 0)}),[l,c]),ve("div",t,{ref:n,props:{id:c,role:"presentation",...i}})}),Qf=a.memo(a.forwardRef(function(t,n){const{className:o,closeOnClick:r=!0,disabled:s=!1,highlighted:i,id:c,menuEvents:l,itemProps:u,render:p,allowMouseUpTriggerRef:d,typingRef:g,nativeButton:m,nodeId:b,...x}=t,{getItemProps:h,itemRef:v}=vo({closeOnClick:r,disabled:s,highlighted:i,id:c,menuEvents:l,allowMouseUpTriggerRef:d,typingRef:g,nativeButton:m,nodeId:b,itemMetadata:wr}),y=a.useMemo(()=>({disabled:s,highlighted:i}),[s,i]);return ve("div",t,{state:y,ref:[v,n],props:[u,x,h]})})),Jf=a.forwardRef(function(t,n){const{id:o,label:r,nativeButton:s=!1,...i}=t,c=a.useRef(null),l=bn({label:r}),u=ot(n,l.ref,c),{itemProps:p,activeIndex:d,allowMouseUpTriggerRef:g,typingRef:m}=ct(),b=xn(!0),x=jt(o),h=l.index===d,{events:v}=Ue();return f.jsx(Qf,{...i,id:x,ref:u,highlighted:h,menuEvents:v,itemProps:p,allowMouseUpTriggerRef:g,typingRef:m,nativeButton:s,nodeId:b==null?void 0:b.floatingContext.nodeId})}),ep=a.createContext(void 0);function tp(e){return a.useContext(ep)}const np={...vn,...mn},op=a.forwardRef(function(t,n){const{render:o,className:r,finalFocus:s,...i}=t,{open:c,setOpen:l,popupRef:u,transitionStatus:p,popupProps:d,mounted:g,instantType:m,triggerElement:b,onOpenChangeComplete:x,parent:h,lastOpenChangeReason:v,rootId:y}=ct(),{side:R,align:w,floatingContext:E}=xn(),S=tp()!=null;Yt({open:c,ref:u,onComplete(){c&&(x==null||x(!0))}});const{events:k}=Ue();a.useEffect(()=>{function _(N){l(!1,ue(N.reason,N.domEvent))}return k.on("close",_),()=>{k.off("close",_)}},[k,l]);const D=a.useMemo(()=>({transitionStatus:p,side:R,align:w,open:c,nested:h.type==="menu",instant:m}),[p,R,w,c,h.type,m]),U=ve("div",t,{state:D,ref:[n,u],stateAttributesMapping:np,props:[d,{onKeyDown(_){S&&xi.has(_.key)&&_.stopPropagation()}},p==="starting"?bl:_e,i,{"data-rootownerid":y}]});let P=h.type===void 0||h.type==="context-menu";return(b||h.type==="menubar"&&v!=="outside-press")&&(P=!0),f.jsx(ki,{context:E,modal:!1,disabled:!g,returnFocus:s===void 0?P:s,initialFocus:h.type!=="menu",restoreFocus:!0,children:U})}),nc=a.createContext(void 0);function rp(){const e=a.useContext(nc);if(e===void 0)throw new Error("Base UI: <Menu.Portal> is missing.");return e}function sp(e){const{children:t,keepMounted:n=!1,container:o}=e,{mounted:r}=ct();return r||n?f.jsx(nc.Provider,{value:n,children:f.jsx(Ii,{root:o,children:t})}):null}const ip=a.forwardRef(function(t,n){var o,r,s,i;const{anchor:c,positionMethod:l="absolute",className:u,render:p,side:d,align:g,sideOffset:m=0,alignOffset:b=0,collisionBoundary:x="clipping-ancestors",collisionPadding:h=5,arrowPadding:v=5,sticky:y=!1,trackAnchor:R=!0,collisionAvoidance:w=yl,...E}=t,{open:S,setOpen:k,floatingRootContext:D,setPositionerElement:U,itemDomElements:P,itemLabels:_,mounted:N,modal:I,lastOpenChangeReason:W,parent:$,setHoverEnabled:T,triggerElement:A}=ct(),j=rp(),M=au(),q=yt(),ce=ho(!0);let X=c,L=m,re=b,se=g;$.type==="context-menu"&&(X=(r=(o=$.context)==null?void 0:o.anchor)!=null?r:c,se=se??"start",!d&&se!=="center"&&(re=(s=t.alignOffset)!=null?s:2,L=(i=t.sideOffset)!=null?i:-5));let C=d,B=se;$.type==="menu"?(C=C??"inline-end",B=B??"start"):$.type==="menubar"&&(C=C??"bottom",B=B??"start");const Z=$.type==="context-menu",K=Vf({anchor:X,floatingRootContext:D,positionMethod:ce?"fixed":l,mounted:N,side:C,sideOffset:L,align:B,alignOffset:re,arrowPadding:Z?0:v,collisionBoundary:x,collisionPadding:h,sticky:y,nodeId:M,keepMounted:j,trackAnchor:R,collisionAvoidance:w,shiftCrossAxis:Z}),{events:V}=Ue(),H=a.useMemo(()=>{const O={};return S||(O.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...K.positionerStyles,...O}}},[S,N,K.positionerStyles]);a.useEffect(()=>{function O(G){G.open?(G.parentNodeId===M&&T(!1),G.nodeId!==M&&G.parentNodeId===q&&k(!1,ue("sibling-open"))):G.parentNodeId===M&&G.reason!=="sibling-open"&&T(!0)}return V.on("menuopenchange",O),()=>{V.off("menuopenchange",O)}},[V,M,q,k,T]),a.useEffect(()=>{if(q==null)return;function O(G){var F;if(G.open||G.nodeId!==q)return;const Q=(F=G.reason)!=null?F:"sibling-open";k(!1,ue(Q))}return V.on("menuopenchange",O),()=>{V.off("menuopenchange",O)}},[V,q,k]),a.useEffect(()=>{function O(G){!S||G.nodeId!==q||A&&G.target&&A!==G.target&&k(!1,ue("sibling-open"))}return V.on("itemhover",O),()=>{V.off("itemhover",O)}},[V,q,A,S,k]),a.useEffect(()=>{const O={open:S,nodeId:M,parentNodeId:q,reason:W};V.emit("menuopenchange",O)},[V,S,M,q,W]);const Y=a.useMemo(()=>({open:S,side:K.side,align:K.align,anchorHidden:K.anchorHidden,nested:$.type==="menu"}),[S,K.side,K.align,K.anchorHidden,$.type]),z=a.useMemo(()=>({side:K.side,align:K.align,arrowRef:K.arrowRef,arrowUncentered:K.arrowUncentered,arrowStyles:K.arrowStyles,floatingContext:K.context}),[K.side,K.align,K.arrowRef,K.arrowUncentered,K.arrowStyles,K.context]),te=ve("div",t,{state:Y,stateAttributesMapping:vn,ref:[n,U],props:{...H,...E}}),ne=N&&$.type!=="menu"&&($.type!=="menubar"&&I&&W!=="trigger-hover"||$.type==="menubar"&&$.context.modal);let ee=null;return $.type==="menubar"?ee=$.context.contentElement:$.type===void 0&&(ee=A),f.jsxs(Qi.Provider,{value:z,children:[ne&&f.jsx(pr,{ref:$.type==="context-menu"||$.type==="nested-context-menu"?$.context.internalBackdropRef:null,inert:yi(!S),cutout:ee}),f.jsx(lu,{id:M,children:f.jsx(wd,{elementsRef:P,labelsRef:_,children:te})})]})}),oc=a.createContext(void 0);function cp(){const e=a.useContext(oc);if(e===void 0)throw new Error("Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.");return e}const ap=a.memo(a.forwardRef(function(t,n){const{render:o,className:r,value:s,defaultValue:i,onValueChange:c,disabled:l=!1,...u}=t,[p,d]=hr({controlled:s,default:i,name:"MenuRadioGroup"}),g=J(c),m=J((v,y)=>{g==null||g(v,y),!y.isCanceled&&d(v)}),b=a.useMemo(()=>({disabled:l}),[l]),x=ve("div",t,{state:b,ref:n,props:{role:"group","aria-disabled":l||void 0,...u}}),h=a.useMemo(()=>({value:p,setValue:m,disabled:l}),[p,m,l]);return f.jsx(oc.Provider,{value:h,children:x})})),rc=a.createContext(void 0);function lp(){const e=a.useContext(rc);if(e===void 0)throw new Error("Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.");return e}const up=a.memo(a.forwardRef(function(t,n){const{checked:o,setChecked:r,className:s,closeOnClick:i,disabled:c=!1,highlighted:l,id:u,menuEvents:p,itemProps:d,render:g,allowMouseUpTriggerRef:m,typingRef:b,nativeButton:x,nodeId:h,...v}=t,{getItemProps:y,itemRef:R}=vo({closeOnClick:i,disabled:c,highlighted:l,id:u,menuEvents:p,allowMouseUpTriggerRef:m,typingRef:b,nativeButton:x,itemMetadata:wr,nodeId:h}),w=a.useMemo(()=>({disabled:c,highlighted:l,checked:o}),[c,l,o]);return ve("div",t,{state:w,stateAttributesMapping:bo,ref:[R,n],props:[d,{role:"menuitemradio","aria-checked":o,onClick(E){r(ue("item-press",E.nativeEvent))}},v,y]})})),dp=a.forwardRef(function(t,n){const{id:o,value:r,label:s,disabled:i=!1,closeOnClick:c=!1,nativeButton:l=!1,...u}=t,p=a.useRef(null),d=bn({label:s}),g=ot(n,d.ref,p),{itemProps:m,activeIndex:b,allowMouseUpTriggerRef:x,typingRef:h}=ct(),v=xn(!0),y=jt(o),R=d.index===b,{events:w}=Ue(),{value:E,setValue:S,disabled:k}=cp(),D=k||i,U=E===r,P=a.useCallback(N=>{S(r,N)},[S,r]),_=a.useMemo(()=>({checked:U,highlighted:R,disabled:D}),[U,R,D]);return f.jsx(rc.Provider,{value:_,children:f.jsx(up,{...u,id:y,ref:g,disabled:D,highlighted:R,menuEvents:w,itemProps:m,allowMouseUpTriggerRef:x,checked:E===r,setChecked:P,typingRef:h,closeOnClick:c,nativeButton:l,nodeId:v==null?void 0:v.floatingContext.nodeId})})}),Rr=a.forwardRef(function(t,n){const{render:o,className:r,keepMounted:s=!1,...i}=t,c=lp(),l=a.useRef(null),{transitionStatus:u,setMounted:p}=fo(c.checked);Yt({open:c.checked,ref:l,onComplete(){c.checked||p(!1)}});const d=a.useMemo(()=>({checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:u}),[c.checked,c.disabled,c.highlighted,u]);return ve("span",t,{state:d,stateAttributesMapping:bo,ref:[n,l],props:{"aria-hidden":!0,...i},enabled:s||c.checked})}),fp=a.createContext(null);function pp(e){return a.useContext(fp)}const sc=a.createContext(!1);function mp(){return a.useContext(sc)}function gp(e){const{enabled:t=!0,mouseDownAction:n,open:o}=e,r=a.useRef(!1);return a.useMemo(()=>t?{onMouseDown:s=>{(n==="open"&&!o||n==="close"&&o)&&(r.current=!0,dt(s.currentTarget).addEventListener("click",()=>{r.current=!1},{once:!0}))},onClick:s=>{r.current&&(r.current=!1,s.preventBaseUIHandler())}}:_e,[t,n,o])}const hp=[],vp={current:!1},ic=function(t){const{children:n,open:o,onOpenChange:r,onOpenChangeComplete:s,defaultOpen:i=!1,disabled:c=!1,modal:l,loop:u=!0,orientation:p="vertical",actionsRef:d,openOnHover:g,delay:m=100,closeDelay:b=0,closeParentOnEsc:x=!0}=t,[h,v]=a.useState(null),[y,R]=a.useState(null),[w,E]=a.useState(),[S,k]=a.useState(!0),[D,U]=a.useState(null),[P,_]=a.useState(null),[N,I]=a.useState(!0),[W,$]=a.useState(!1),T=a.useRef(null),A=a.useRef(null),j=a.useRef(null),M=a.useRef([]),q=a.useRef([]),ce=Fe(),X=ho(!0),L=mp(),re=yt()!=null;let se,C;{const le=ct(!0),He=pp();L&&le?C={type:"menu",context:le}:He?C={type:"menubar",context:He}:X&&!le?C={type:"context-menu",context:X}:C={type:void 0}}let B=Kt();C.type!==void 0&&(B=C.context.rootId);const Z=(C.type===void 0||C.type==="context-menu")&&(l??!0),K=c||C.type==="menubar"&&C.context.disabled||!1,V=C.type==="menu"?C.context.allowMouseEnter:W,H=C.type==="menu"?C.context.setAllowMouseEnter:$,Y=g??(C.type==="menu"||C.type==="menubar"&&C.context.hasSubmenuOpen),[z,te]=hr({controlled:o,default:i,name:"MenuRoot",state:"open"}),ne=a.useRef(C.type!=="context-menu"),ee=Fe();a.useEffect(()=>{if(z||(T.current=null),C.type==="context-menu"){if(!z){ee.clear(),ne.current=!1;return}ee.start(500,()=>{ne.current=!0})}},[ee,z,C.type]);const O=a.useCallback(le=>{j.current=le,R(le)},[]),{mounted:G,setMounted:F,transitionStatus:Q}=fo(z),{openMethod:ae,triggerProps:ie,reset:me}=Ai(z);_i({enabled:z&&Z&&P!=="trigger-hover"&&ae!=="touch",mounted:G,open:z,referenceElement:y}),!z&&!S&&k(!0);const De=J(()=>{F(!1),I(!0),H(!1),s==null||s(!1),me()});Yt({enabled:!d,open:z,ref:A,onComplete(){z||De()}});const We=a.useRef(!0),Re=Fe(),Te=J((le,He)=>{const ke=He.reason;if(z===le||(r==null||r(le,He),He.isCanceled))return;const xo={open:le,nativeEvent:He.event,reason:He.reason,nested:re};se==null||se.emit("openchange",xo);const mt=He.event;if(le===!1&&(mt==null?void 0:mt.type)==="click"&&mt.pointerType==="touch"&&!We.current)return;if(!le&&D!==null){const Et=M.current[D];queueMicrotask(()=>{Et==null||Et.setAttribute("tabindex","-1")})}le&&ke==="trigger-focus"?(We.current=!1,Re.start(300,()=>{We.current=!0})):(We.current=!0,Re.clear());const Nt=(ke==="trigger-press"||ke==="item-press")&&mt.detail===0&&(mt==null?void 0:mt.isTrusted),Tn=!le&&(ke==="escape-key"||ke==null);function jn(){var Et;te(le),_(ke??null),T.current=(Et=He.event)!=null?Et:null}ke==="trigger-hover"?(I(!0),ce.start(vl,()=>{I(!1)}),Ht.flushSync(jn)):jn(),C.type==="menubar"&&(ke==="trigger-focus"||ke==="focus-out"||ke==="trigger-hover"||ke==="list-navigation"||ke==="sibling-open")?E("group"):E(Nt||Tn?Nt?"click":"dismiss":void 0)});a.useImperativeHandle(d,()=>({unmount:De}),[De]);let Qe;C.type==="context-menu"&&(Qe=C.context),a.useImperativeHandle(Qe==null?void 0:Qe.positionerRef,()=>y,[y]),a.useImperativeHandle(Qe==null?void 0:Qe.actionsRef,()=>({setOpen:Te}),[Te]),a.useEffect(()=>{z||ce.clear()},[ce,z]);const Ne=fr({elements:{reference:h,floating:y},open:z,onOpenChange:Te});se=Ne.events;const Cn=Ud(Ne,{enabled:S&&Y&&!K&&C.type!=="context-menu"&&(C.type!=="menubar"||C.context.hasSubmenuOpen&&!z),handleClose:Ff({blockPointerEvents:!0}),mouseOnly:!0,move:C.type==="menu",restMs:C.type===void 0||C.type==="menu"&&V?m:void 0,delay:C.type==="menu"?{open:V?m:10**10,close:b}:{close:b}}),At=Tf(Ne,{enabled:!K&&!z&&C.type==="menubar"&&C.context.hasSubmenuOpen&&!X}),Rt=Pi(Ne,{enabled:!K&&C.type!=="context-menu",event:z&&C.type==="menubar"?"click":"mousedown",toggle:!Y||C.type!=="menu",ignoreMouse:Y&&C.type==="menu",stickIfOpen:C.type===void 0?N:!1}),En=Oi(Ne,{enabled:!K,bubbles:x&&C.type==="menu",outsidePress(){var le;return C.type!=="context-menu"||((le=T.current)==null?void 0:le.type)==="contextmenu"?!0:ne.current}}),Sn=ji(Ne,{role:"menu"}),Mn=Vi(),In=Df(Ne,{enabled:!K,listRef:M,activeIndex:D,nested:C.type!==void 0,loop:u,orientation:p,parentOrientation:C.type==="menubar"?C.context.orientation:void 0,rtl:Mn==="rtl",disabledIndices:hp,onNavigate:U,openOnArrowKeyDown:C.type!=="context-menu"}),Jt=a.useRef(!1),fe=a.useCallback(le=>{Jt.current=le},[]),be=Nf(Ne,{listRef:q,activeIndex:D,resetMs:hl,onMatch:le=>{z&&le!==D&&U(le)},onTypingChange:fe}),{getReferenceProps:ze,getFloatingProps:Se,getItemProps:pt}=Ti([Cn,Rt,En,At,Sn,In,be]),Xe=gp({open:z,enabled:C.type==="menubar",mouseDownAction:"open"}),Dt=a.useMemo(()=>{const le=Gt(ze(),{onMouseEnter(){k(!0)},onMouseMove(){H(!0)}},ie,Xe);return delete le.role,le},[ze,Xe,H,ie]),Ct=a.useMemo(()=>Se({onMouseEnter(){(!Y||C.type==="menu")&&k(!1)},onMouseMove(){H(!0)},onClick(){Y&&k(!1)}}),[Se,Y,C.type,H]),kn=a.useMemo(()=>pt(),[pt]),Pn=a.useMemo(()=>({activeIndex:D,setActiveIndex:U,allowMouseUpTriggerRef:C.type?C.context.allowMouseUpTriggerRef:vp,floatingRootContext:Ne,itemProps:kn,popupProps:Ct,triggerProps:Dt,itemDomElements:M,itemLabels:q,mounted:G,open:z,popupRef:A,positionerRef:j,setOpen:Te,setPositionerElement:O,triggerElement:h,setTriggerElement:v,transitionStatus:Q,lastOpenChangeReason:P,instantType:w,onOpenChangeComplete:s,setHoverEnabled:k,typingRef:Jt,modal:Z,disabled:K,parent:C,rootId:B,allowMouseEnter:V,setAllowMouseEnter:H}),[D,Ne,kn,Ct,Dt,M,q,G,z,j,Te,Q,h,O,P,w,s,Z,K,C,B,V,H]),On=f.jsx(Ji.Provider,{value:Pn,children:n});return C.type===void 0||C.type==="context-menu"?f.jsx(uu,{children:On}):On};function bp(e){const{closeParentOnEsc:t=!1}=e;return f.jsx(sc.Provider,{value:!0,children:f.jsx(ic,{closeParentOnEsc:t,...e})})}function xp(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),o=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||o.content!=="none"))return t;const s=parseFloat(n.width)||0,i=parseFloat(n.height)||0,c=parseFloat(o.width)||0,l=parseFloat(o.height)||0,u=Math.max(t.width,s,c),p=Math.max(t.height,i,l),d=u-t.width,g=p-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-g/2,bottom:t.bottom+g/2}}function yp(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:o}=zs(),{ref:r,index:s}=bn(e),i=n===s,c=a.useRef(null),l=ot(r,c);return{compositeProps:a.useMemo(()=>({tabIndex:i?0:-1,onFocus(){o(s)},onMouseMove(){const p=c.current;if(!t||!p)return;const d=p.hasAttribute("disabled")||p.ariaDisabled==="true";!i&&!d&&p.focus()}}),[i,o,s,t]),compositeRef:l,index:s}}function wp(e){const{render:t,className:n,state:o=_e,props:r=_r,refs:s=_r,metadata:i,stateAttributesMapping:c,tag:l="div",...u}=e,{compositeProps:p,compositeRef:d}=yp({metadata:i});return ve(l,e,{state:o,ref:[...s,d],props:[p,...r,u],stateAttributesMapping:c})}function cc(e){var t;if(he(e)&&e.hasAttribute("data-rootownerid"))return(t=e.getAttribute("data-rootownerid"))!=null?t:void 0;if(!tt(e))return cc(rt(e))}const Vn=2,Rp=a.forwardRef(function(t,n){const{render:o,className:r,disabled:s=!1,nativeButton:i=!0,...c}=t,{triggerProps:l,disabled:u,setTriggerElement:p,open:d,allowMouseUpTriggerRef:g,positionerRef:m,parent:b,lastOpenChangeReason:x,rootId:h}=ct(),v=s||u,y=a.useRef(null),R=Fe(),{getButtonProps:w,buttonRef:E}=rr({disabled:v,native:i}),S=ot(E,p),{events:k}=Ue();a.useEffect(()=>{!d&&b.type===void 0&&(g.current=!1)},[g,d,b.type]);const D=J($=>{if(!y.current)return;R.clear(),g.current=!1;const T=$.target;if(ge(y.current,T)||ge(m.current,T)||T===y.current||T!=null&&cc(T)===h)return;const A=xp(y.current);$.clientX>=A.left-Vn&&$.clientX<=A.right+Vn&&$.clientY>=A.top-Vn&&$.clientY<=A.bottom+Vn||k.emit("close",{domEvent:$,reason:"cancel-open"})});a.useEffect(()=>{d&&x==="trigger-hover"&&dt(y.current).addEventListener("mouseup",D,{once:!0})},[d,D,x]);const U=b.type==="menubar",P=a.useCallback($=>Gt(U?{role:"menuitem"}:{},{"aria-haspopup":"menu",ref:S,onMouseDown:T=>{if(d)return;R.start(200,()=>{g.current=!0}),dt(T.currentTarget).addEventListener("mouseup",D,{once:!0})}},$,w),[w,S,d,g,R,D,U]),_=a.useMemo(()=>({disabled:v,open:d}),[v,d]),N=[y,n,E],I=[l,c,P],W=ve("button",t,{enabled:!U,stateAttributesMapping:$r,state:_,ref:N,props:I});return U?f.jsx(wp,{tag:"button",render:o,className:r,state:_,refs:N,props:I,stateAttributesMapping:$r}):W}),Cp=a.forwardRef(function(t,n){const{render:o,className:r,label:s,id:i,nativeButton:c=!1,...l}=t,u=jt(i),{triggerProps:p,parent:d,setTriggerElement:g,open:m,typingRef:b,disabled:x,allowMouseUpTriggerRef:h}=ct(),v=xn();if(d.type!=="menu")throw new Error("Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");const y=d.context,{activeIndex:R,itemProps:w,setActiveIndex:E}=y,S=bn(),k=R===S.index,{events:D}=Ue(),U=a.useMemo(()=>({type:"submenu-trigger",setActive:()=>E(S.index),allowMouseEnterEnabled:y.allowMouseEnter}),[E,S.index,y.allowMouseEnter]),{getItemProps:P,itemRef:_}=vo({closeOnClick:!1,disabled:x,highlighted:k,id:u,menuEvents:D,allowMouseUpTriggerRef:h,typingRef:b,nativeButton:c,itemMetadata:U,nodeId:v==null?void 0:v.floatingContext.nodeId}),N=a.useMemo(()=>({disabled:x,highlighted:k,open:m}),[x,k,m]);return ve("div",t,{state:N,ref:[n,S.ref,_,g],stateAttributesMapping:cu,props:[p,w,l,P,{tabIndex:m||k?0:-1,onBlur(){k&&E(null)}}]})});function Ep(e){var t;return ve((t=e.defaultTagName)!=null?t:"div",e,e)}const Sp="positioner__eWf4l",Mp="fixedPositioner__ASeFt",Ip="popup__UucRm",kp="backdrop__bBmVf",Pp="item__5a484",Op="itemLabel__z75Xr",Tp="itemDescription__oxy7a",jp="itemValue__VOv0R",_p="itemLeadingElements__5ARFl",Ap="itemTrailingElements__rx0FW",Dp="group__-plPv",Np="groupLabel__OisFc",Lp="radioGroup__cjmci",Fp="checkboxItemIndicator__6wmLt",Ae={positioner:Sp,fixedPositioner:Mp,popup:Ip,backdrop:kp,item:Pp,itemLabel:Op,itemDescription:Tp,itemValue:jp,itemLeadingElements:_p,itemTrailingElements:Ap,group:Dp,groupLabel:Np,radioGroup:Lp,checkboxItemIndicator:Fp},Bp=ic,ac=a.forwardRef(function({children:t,...n},o){return f.jsx(Rp,{render:t,ref:o,...n})});function Cr(e){const t=Ms();return f.jsx(sp,{container:t,...e})}const Er=a.createContext(!1);function Sr(e){const t=a.useContext(Er);return f.jsx(zf,{className:Ae.backdrop,"data-backdrop":t?"submenu":"root",...e})}const $p=a.forwardRef(function(t,n){return f.jsx("div",{ref:n,className:Ae.fixedPositioner,...t,style:void 0})});function Mr(e){const t=!Bi("medium-s"),n=a.useContext(Er);return f.jsx(ip,{render:t?f.jsx($p,{}):f.jsx("div",{className:Ae.positioner}),collisionAvoidance:{side:"shift",align:"shift"},collisionPadding:24,sideOffset:n?12:void 0,...e})}function Ir({dataset:e,preplyDsComponent:t,...n}){return f.jsx(op,{className:Ae.popup,tabIndex:0,...$e(e,{preplyDsComponent:t}),...n})}const lc=a.createContext(""),_t=a.forwardRef(function({dataset:t,render:n,...o},r){const s=a.useId(),i=Ep({render:n,ref:r,defaultTagName:"div",props:{className:Ae.item,"aria-describedby":s,...$e(t),...o}});return f.jsx(lc.Provider,{value:s,children:i})});function Vp({children:e,...t}){return f.jsx(Jf,{render:e,...t})}function Xt(e){return f.jsx("div",{className:Ae.itemLeadingElements,...e})}function yn(e){return f.jsx("div",{className:Ae.itemTrailingElements,...e})}function Zt(e){return f.jsx("span",{className:Ae.itemLabel,...e})}function Qt(e){const t=a.useContext(lc);return f.jsx("span",{className:Ae.itemDescription,id:t,"aria-hidden":!0,...e})}const uc=a.forwardRef(function(t,n){return f.jsx("span",{className:Ae.itemValue,...t,ref:n})});function dc(e){return f.jsx(lt,{svg:Hc,size:"16",accent:"tertiary",...e})}const fc=a.forwardRef(function({dataset:t,...n},o){return f.jsx(Xf,{className:Ae.group,...$e(t),ref:o,...n})});function Up(e){return f.jsx(Zf,{className:Ae.groupLabel,...e})}function pc(e){const t=!Bi("medium-s");return f.jsx(Er.Provider,{value:!0,children:f.jsx(bp,{openOnHover:!t,...e})})}function mc({children:e,...t}){return f.jsx(Cp,{render:e,...t})}const kr=a.forwardRef(function(t,n){return f.jsx(ap,{className:Ae.radioGroup,ref:n,...t})});function gc({children:e,...t}){return f.jsx(dp,{render:e,...t})}function hc(e){return f.jsx(Rr,{render:f.jsx(lt,{svg:Gc,size:"24"}),...e})}function Wp({children:e,...t}){return f.jsx(Kf,{render:e,...t})}function zp(e){return f.jsx(qf,{className:Ae.checkboxItemIndicator,keepMounted:!0,...e})}fc.__docgenInfo={description:"",methods:[],displayName:"Group"};_t.__docgenInfo={description:"",methods:[],displayName:"ItemContainer"};Rr.__docgenInfo={description:"",methods:[],displayName:"MenuRadioItemIndicator"};ac.__docgenInfo={description:"",methods:[],displayName:"Trigger"};uc.__docgenInfo={description:"",methods:[],displayName:"ItemValue"};kr.__docgenInfo={description:"",methods:[],displayName:"RadioGroup"};const vc=a.createContext(null),bc=a.createContext(()=>{}),xc=a.createContext(()=>{});function Hp({children:e,open:t,onOpenChange:n,defaultOpen:o,...r}){const[s,i]=a.useState(null),[c,l]=ra({value:t,onValueChange:n,defaultValue:o});return f.jsx(vc.Provider,{value:s,children:f.jsx(bc.Provider,{value:i,children:f.jsx(xc.Provider,{value:l,children:f.jsx(pc,{...r,open:!!c,onOpenChange:l,children:e})})})})}const Gp=mc;function Kp(e){const t=a.useContext(bc);return f.jsx(uc,{...e,ref:t})}const qp=kr;function Yp({value:e,children:t,onClick:n,...o}){const r=a.useContext(xc),s=i=>{n==null||n(i),r(!1)};return f.jsx(gc,{value:e,onClick:s,...o,children:t})}function Xp({children:e}){return f.jsxs(f.Fragment,{children:[e,f.jsx(Rr,{render:(t,{checked:n})=>f.jsxs(Zp,{active:n,children:[f.jsx(ca,{children:f.jsx(un,{id:"preply-ds.dropdown-menu.select-option-label-text",defaultMessage:[{type:0,value:"Selected:"}]})})," ",e]})})]})}function Zp({children:e,active:t}){const n=a.useContext(vc);return!t||!n?null:Ht.createPortal(e,n)}const yc=a.forwardRef(function({children:t,trigger:n,defaultOpen:o,dataset:r,keepMounted:s,open:i,onOpenChange:c,side:l,align:u,...p},d){return f.jsxs(Bp,{defaultOpen:o,open:i,onOpenChange:c,children:[f.jsx(ac,{...st(p),ref:d,children:n}),f.jsxs(Cr,{keepMounted:s,children:[f.jsx(Sr,{}),f.jsx(Mr,{sideOffset:4,side:l,align:u,children:f.jsx(Ir,{dataset:r,preplyDsComponent:we.DropdownMenu,children:t})})]})]})}),St=a.forwardRef(function({label:t,description:n,leadingElement:o,disabled:r,dataset:s,onClick:i,as:c,...l},u){return f.jsx(Vp,{disabled:r,onClick:i,children:f.jsxs(_t,{...st(l),dataset:s,ref:u,render:c,children:[f.jsx(Xt,{children:o}),f.jsx(Zt,{children:t}),f.jsx(Qt,{children:n})]})})}),Zo=a.forwardRef(function({children:t,label:n,description:o,leadingElement:r,dataset:s,triggerDataset:i,keepMounted:c,disabled:l,defaultOpen:u,open:p,onOpenChange:d,side:g,align:m,...b},x){return f.jsxs(pc,{disabled:l,defaultOpen:u,open:p,onOpenChange:d,children:[f.jsx(mc,{children:f.jsxs(_t,{...st(b),dataset:i,ref:x,children:[f.jsx(Xt,{children:r}),f.jsx(Zt,{children:n}),f.jsx(Qt,{children:o}),f.jsx(yn,{children:f.jsx(dc,{})})]})}),f.jsxs(Cr,{keepMounted:c,children:[f.jsx(Sr,{}),f.jsx(Mr,{side:g,align:m,children:f.jsx(Ir,{dataset:s,preplyDsComponent:we.DropdownMenu,children:t})})]})]})}),Qp=a.forwardRef(function({label:t,children:n,dataset:o,...r},s){return f.jsxs(fc,{...st(r),dataset:o,ref:s,children:[f.jsx(Up,{children:t}),n]})}),Jp=a.forwardRef(function({defaultValue:t,value:n,onValueChange:o,disabled:r,children:s,items:i,...c},l){const u=i?i.map(({value:p,...d})=>f.jsx(wc,{value:p,...d},p)):s;return f.jsx(kr,{defaultValue:t,value:n,onValueChange:p=>o==null?void 0:o(p),disabled:r,ref:l,...st(c),children:u})}),wc=a.forwardRef(function({value:t,disabled:n,onClick:o,dataset:r,leadingElement:s,label:i,description:c,...l},u){return f.jsx(gc,{value:t,disabled:n,onClick:o,children:f.jsxs(_t,{dataset:r,ref:u,...st(l),children:[f.jsx(Xt,{children:s}),f.jsx(Zt,{children:i}),f.jsx(Qt,{children:c}),f.jsx(yn,{children:f.jsx(hc,{})})]})})}),Rc=a.forwardRef(function({label:t,description:n,leadingElement:o,dataset:r,disabled:s,defaultChecked:i,checked:c,onCheckedChange:l,...u},p){return f.jsx(Wp,{defaultChecked:i,checked:c,onCheckedChange:l,disabled:s,children:f.jsxs(_t,{dataset:r,ref:p,...st(u),children:[f.jsx(Xt,{children:o}),f.jsx(Zt,{children:t}),f.jsx(Qt,{children:n}),f.jsx(yn,{children:f.jsx(zp,{})})]})})}),ln=a.forwardRef(function({label:t,description:n,leadingElement:o,dataset:r,disabled:s,value:i,onClick:c,...l},u){return f.jsx(Yp,{value:i,disabled:s,onClick:c,children:f.jsxs(_t,{dataset:r,ref:u,...st(l),children:[f.jsx(Xt,{children:o}),f.jsx(Zt,{children:f.jsx(Xp,{children:t})}),f.jsx(Qt,{children:n}),f.jsx(yn,{children:f.jsx(hc,{})})]})})}),Cc=a.forwardRef(function({label:t,description:n,leadingElement:o,dataset:r,triggerDataset:s,value:i,defaultValue:c,onValueChange:l,disabled:u,children:p,items:d,open:g,defaultOpen:m,onOpenChange:b,side:x,align:h,...v},y){const R=d?d.map(({value:w,...E})=>f.jsx(ln,{value:w,...E},w)):p;return f.jsxs(Hp,{disabled:u,open:g,defaultOpen:m,onOpenChange:b,children:[f.jsx(Gp,{children:f.jsxs(_t,{dataset:s,ref:y,...st(v),children:[f.jsx(Xt,{children:o}),f.jsx(Zt,{children:t}),f.jsx(Qt,{children:n}),f.jsxs(yn,{children:[f.jsx(Kp,{}),f.jsx(dc,{})]})]})}),f.jsxs(Cr,{keepMounted:!0,children:[f.jsx(Sr,{}),f.jsx(Mr,{sideOffset:12,side:x,align:h,children:f.jsx(Ir,{dataset:r,preplyDsComponent:we.DropdownMenu,children:f.jsx(qp,{value:i,defaultValue:c,onValueChange:l,disabled:u,children:R})})})]})]})});yc.__docgenInfo={description:"",methods:[],displayName:"DropdownMenu"};Rc.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuCheckboxItem"};Qp.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuGroup"};St.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuItem"};Jp.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuRadioGroup"};wc.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuRadioItem"};Cc.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuSelect"};ln.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuSelectOption"};Zo.__docgenInfo={description:"",methods:[],displayName:"DropdownSubmenu"};const em="container__dtKps",tm="label__S0tQE",nm="required__GVzWg",om="description__h6Gw1",rm="error__MGvA2",Lt={container:em,label:tm,required:nm,description:om,error:rm};function sm({id:e,error:t,description:n,hasError:o}){const r={};return o&&(r["aria-invalid"]=!0),t&&(r["aria-invalid"]=!0,r["aria-errormessage"]=`${e}-error`),n&&(r["aria-describedby"]=`${e}-description`),r}const im=({id:e,label:t,hideLabel:n,description:o,error:r,hasError:s,children:i,required:c,dataset:l,onClick:u,preplyDsComponent:p=we.FormControl,useLegacyRequiredLabel:d=!1})=>{const g=a.useId(),m=e||g,b=sm({id:m,error:r,description:o,hasError:s}),x=$e(l,{preplyDsComponent:p});return f.jsxs("div",{className:Lt.container,...x,onClick:u,children:[f.jsxs("label",{htmlFor:m,className:Lt.label,"data-hidden":n||!t,"data-testid":"label",children:[t,!!d&&c&&f.jsxs("span",{"aria-hidden":!0,className:Lt.required,children:[" • ",f.jsx(un,{id:"preply-ds.fieldLabel.required",defaultMessage:[{type:0,value:"Required"}]})]}),!d&&!c&&f.jsxs("span",{"aria-hidden":!0,className:Lt.required,children:[" • ",f.jsx(un,{id:"preply-ds.fieldLabel.optional",defaultMessage:[{type:0,value:"Optional"}]})]})]}),f.jsx(ks,{id:m,required:c,...b,children:i}),r?f.jsx("p",{className:Lt.error,role:"alert",id:`${m}-error`,"data-testid":"error",children:r}):o?f.jsx("p",{className:Lt.description,id:`${m}-description`,"data-testid":"description",children:o}):null]})},cm="container__B-gQ9",am="input__WZN7y",lm="icon__6Xfum",um="trailingIcon__Bgnv4",dm="button__auAU0",nn={container:cm,input:am,icon:lm,trailingIcon:um,button:dm};function fm({button:e,icon:t,trailingIcon:n,children:o}){return f.jsxs("div",{className:nn.container,children:[!!t&&f.jsx("span",{className:nn.icon,children:t}),o,!!n&&f.jsx("span",{className:nn.trailingIcon,children:n}),!!e&&f.jsx("span",{className:nn.button,children:e})]})}const Ec=a.forwardRef(function({button:t,icon:n,dataset:o,onChange:r,onValueChange:s,...i},c){const l=$e(o),u=p=>{r==null||r(p),s==null||s(p.target.value)};return f.jsx(fm,{button:t,icon:n,children:f.jsx("input",{...l,...i,ref:c,onChange:u,className:nn.input})})});Ec.__docgenInfo={description:"",methods:[],displayName:"Input"};const Sc=a.forwardRef(function({id:t,label:n,description:o,error:r,required:s,type:i="text",inputDataset:c,dataset:l,hideLabel:u,onClick:p,hasError:d,useLegacyRequiredLabel:g,className:m,style:b,...x},h){return f.jsx(im,{id:t,label:n,description:o,error:r,hasError:d,required:s,dataset:l,hideLabel:u,onClick:p,useLegacyRequiredLabel:g,preplyDsComponent:we.TextField,children:f.jsx(Ec,{...x,type:i,ref:h,dataset:c})})});Sc.__docgenInfo={description:"",methods:[],displayName:"TextField",props:{type:{defaultValue:{value:'"text"',computed:!1},required:!1}}};const pm="Divider__kU514",ys={Divider:pm,"size-small":"size-small__OdB2p","size-large":"size-large__4iJ0a"},ws=({size:e="small"})=>f.jsx("hr",{className:`${ys.Divider} ${ys[`size-${e}`]}`,"data-preply-ds-component":we.Divider}),wn=[{code:"en",name:"English",text:"The quick brown fox jumps over the lazy dog"},{code:"it",name:"Italian",text:"Cantami o Diva del pelide Achille l'ira funesta"},{code:"id",name:"Indonesian",text:"Muharjo seorang xenofobia universal yang takut pada warga jazirah, contohnya Qatar"},{code:"nl",name:"Dutch",text:"Pa's wijze lynx bezag vroom het fikse aquaduct"},{code:"es",name:"Spanish",text:"Benjamín pidió una bebida de kiwi y fresa. Noé, sin vergüenza, la más exquisita champaña del menú"},{name:"Français",code:"fr",text:"Les naïfs ægithales hâtifs pondant à Noël où il gèle sont sûrs d'être déçus en voyant leurs drôles d'œufs abîmés"},{code:"de",name:"German",text:"Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich"},{code:"pt",name:"Portuguese",text:"Vejo galã sexy pôr quinze kiwis à força em baú achatado"},{code:"pl",name:"Polish",text:"Stróż pchnął kość w quiz gędźb vel fax myjń"},{code:"tr",name:"Turkish",text:"Pijamalı hasta yağız şoföre çabucak güvendi"},{code:"ro",name:"Romanian",text:"Încă vând gem, whisky bej și tequila roz, preț fix"},{code:"sv",name:"Swedish",text:"Flygande bäckasiner söka hwila på mjuka tuvor"},{code:"cs",name:"Czech",text:"Příliš žluťoučký kůň úpěl ďábelské ódy"},{code:"uk",name:"Ukrainian",text:"Єхидна, ґава, їжак ще й шиплячі плазуни бігцем форсують Янцзи"},{code:"ru",name:"Russian",text:"Съешь же ещё этих мягких французских булок да выпей чаю"},{name:"Arabic",code:"ar",text:"نص حكيم له سر قاطع وذو شأن عظيم مكتوب على ثوب أخضر ومغلف بجلد أزرق"},{code:"th",name:"Thai",text:"นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ"},{code:"zh",name:"Chinese",text:"你好,世界!"},{code:"ja",name:"Japanese",text:"こんにちは、世界!"},{name:"Korean",code:"ko",text:"안녕하세요, 세계!"}],Mc=wn.find(e=>e.code==="en"),Pr={text:"",textTransform:"normal",visible:wn.map(e=>e.code),expanded:[]};function mm(e,t){const n=structuredClone(e);switch(t.type){case"set-text":return n.text=t.text,n;case"set-text-transform":return n.textTransform=t.textTransform,n;case"toggle-visibility":return n.visible.includes(t.lang)?n.visible=n.visible.filter(o=>o!==t.lang):n.visible.push(t.lang),n;case"toggle-expand":return n.expanded.includes(t.lang)?n.expanded=n.expanded.filter(o=>o!==t.lang):n.expanded.push(t.lang),n;case"expand-all":return n.expanded=wn.map(o=>o.code),n;case"collapse-all":return n.expanded=[],n;case"reset":return Pr;default:return e}}const Ic=a.createContext(Pr),kc=a.createContext(()=>{});function gm({children:e}){const[t,n]=a.useReducer(mm,Pr);return f.jsx(Ic.Provider,{value:t,children:f.jsx(kc.Provider,{value:n,children:e})})}function Rn(){const e=a.useContext(Ic),t=a.useContext(kc);return[e,t]}const hm=Ve.div`
|
|
32
|
-
border: 2px solid ${pe(It.border.tertiary)};
|
|
33
|
-
border-radius: ${pe(Ts[8])};
|
|
34
|
-
padding: ${pe(Oe[16])};
|
|
35
|
-
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
gap: ${pe(Oe[16])};
|
|
39
|
-
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
background-color: ${pe(It.background.primary)};
|
|
42
|
-
transition: background-color ${pe(zc.components.interaction)};
|
|
43
|
-
&:hover {
|
|
44
|
-
background-color: ${pe(It.background.secondary)};
|
|
45
|
-
}
|
|
46
|
-
`,vm=Ve.div`
|
|
47
|
-
display: flex;
|
|
48
|
-
gap: ${pe(Oe[4])};
|
|
49
|
-
`,bm=Ve.div`
|
|
50
|
-
display: grid;
|
|
51
|
-
grid-template-columns: auto 1fr;
|
|
52
|
-
gap: ${pe(Oe[8])};
|
|
53
|
-
align-items: center;
|
|
54
|
-
|
|
55
|
-
&[data-transform='uppercase'] *[data-value] {
|
|
56
|
-
text-transform: uppercase;
|
|
57
|
-
}
|
|
58
|
-
&[data-transform='lowercase'] *[data-value] {
|
|
59
|
-
text-transform: lowercase;
|
|
60
|
-
}
|
|
61
|
-
`;function Ft({variant:e,data:t,showWhenCollapsed:n=!1}){const[o]=Rn(),{code:r}=t,s=o.expanded.includes(r),i=o.text||t.text,c=r!=="en"&&!o.text;return!s&&!n?null:c&&s?f.jsxs(f.Fragment,{children:[f.jsx(Ze,{variant:"caption-regular",accent:"secondary",children:e}),f.jsx(Wn,{tag:"div",variant:e,dataset:{value:!0},children:i}),f.jsx(Ze,{variant:"caption-regular",accent:"secondary",children:e}),f.jsx(Wn,{tag:"div",variant:e,dataset:{value:!0},children:Mc.text})]}):f.jsxs(f.Fragment,{children:[f.jsx(Ze,{variant:"caption-regular",accent:"secondary",children:e}),f.jsx(Wn,{tag:"div",variant:e,dataset:{value:!0},children:i})]})}function je({variant:e,data:t,showWhenCollapsed:n=!1}){const[o]=Rn(),{code:r}=t,s=o.expanded.includes(r),i=o.text||t.text,c=r!=="en"&&!o.text;return!s&&!n?null:c&&s?f.jsxs(f.Fragment,{children:[f.jsx(Ze,{variant:"caption-regular",accent:"secondary",children:e}),f.jsx(Ze,{variant:e,dataset:{value:!0},children:i}),f.jsx(Ze,{variant:"caption-regular",accent:"secondary",children:e}),f.jsx(Ze,{variant:e,dataset:{value:!0},children:Mc.text})]}):f.jsxs(f.Fragment,{children:[f.jsx(Ze,{variant:"caption-regular",accent:"secondary",children:e}),f.jsx(Ze,{variant:e,dataset:{value:!0},children:i})]})}function xm({data:e}){const[t,n]=Rn(),{code:o,name:r}=e;return t.visible.includes(o)?f.jsxs(hm,{lang:o,onClick:()=>{var s;((s=window.getSelection())==null?void 0:s.type)!=="Range"&&n({type:"toggle-expand",lang:o})},children:[f.jsxs(vm,{children:[f.jsx(Kn,{size:"small",children:r}),f.jsx(Kn,{size:"small",children:o})]}),f.jsxs(bm,{"data-transform":t.textTransform,children:[f.jsx(Ft,{variant:"massive",data:e}),f.jsx(Ft,{variant:"huge",data:e}),f.jsx(Ft,{variant:"extraLarge",data:e}),f.jsx(Ft,{variant:"large",data:e,showWhenCollapsed:!0}),f.jsx(Ft,{variant:"medium",data:e}),f.jsx(Ft,{variant:"small",data:e}),f.jsx(je,{variant:"caption-regular",data:e}),f.jsx(je,{variant:"caption-semibold",data:e}),f.jsx(je,{variant:"small-regular",data:e}),f.jsx(je,{variant:"small-regular-italic",data:e}),f.jsx(je,{variant:"small-semibold",data:e}),f.jsx(je,{variant:"small-semibold-italic",data:e}),f.jsx(je,{variant:"default-regular",data:e,showWhenCollapsed:!0}),f.jsx(je,{variant:"default-regular-italic",data:e}),f.jsx(je,{variant:"default-semibold",data:e}),f.jsx(je,{variant:"default-semibold-italic",data:e}),f.jsx(je,{variant:"large-regular",data:e}),f.jsx(je,{variant:"large-regular-italic",data:e}),f.jsx(je,{variant:"large-semibold",data:e}),f.jsx(je,{variant:"large-semibold-italic",data:e})]})]}):null}const ym={Platform:"'Platform', 'Platform-fallback', 'Platform-fallback-android', 'Noto Sans', 'NotoSans-fallback', 'NotoSans-fallback-android', sans-serif",Figtree:"'Figtree', 'Figtree-fallback', 'Figtree-fallback-android', 'Noto Sans', 'NotoSans-fallback', 'NotoSans-fallback-android', sans-serif","Noto Sans":"'Noto Sans', 'NotoSans-fallback', 'NotoSans-fallback-android', sans-serif"},wm=[{name:"Basic Latin",start:32,end:127},{name:"Latin-1 Supplement",start:160,end:255},{name:"Latin Extended-A",start:256,end:383},{name:"Latin Extended-B",start:384,end:591},{name:"Spacing Modifier Letters",start:688,end:767},{name:"Cyrillic",start:1024,end:1279},{name:"Arabic",start:1536,end:1791},{name:"Thai",start:3584,end:3711},{name:"Latin Extended Additional",start:7680,end:7935},{name:"General Punctuation",start:8192,end:8303},{name:"Currency Symbols",start:8352,end:8399}];function Rm(e){const t=[];for(let n=e.start;n<=e.end;n++){const o=String.fromCodePoint(n);n<32||n>=127&&n<160||t.push({char:o,codePoint:n})}return t}function Un(e){return`U+${e.toString(16).toUpperCase().padStart(4,"0")}`}const Cm=wm.map(e=>({...e,characters:Rm(e)})),Em=Ve.div`
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
gap: ${pe(Oe[24])};
|
|
65
|
-
max-height: 60vh;
|
|
66
|
-
overflow-y: auto;
|
|
67
|
-
`,Sm=Ve.div`
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
gap: ${pe(Oe[8])};
|
|
71
|
-
`,Mm=Ve.div`
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
gap: ${pe(Oe[8])};
|
|
75
|
-
position: sticky;
|
|
76
|
-
top: 0;
|
|
77
|
-
background: ${pe(It.background.primary)};
|
|
78
|
-
padding: ${pe(Oe[8])} 0;
|
|
79
|
-
`,Im=Ve.div`
|
|
80
|
-
display: grid;
|
|
81
|
-
grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
|
|
82
|
-
gap: ${pe(Oe[4])};
|
|
83
|
-
`,km=Ve.div`
|
|
84
|
-
display: flex;
|
|
85
|
-
flex-direction: column;
|
|
86
|
-
align-items: center;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
gap: ${pe(Oe[4])};
|
|
89
|
-
padding: ${pe(Oe[8])};
|
|
90
|
-
border: 1px solid ${pe(It.border.tertiary)};
|
|
91
|
-
border-radius: ${pe(Ts[4])};
|
|
92
|
-
`,Pm=Ve.span`
|
|
93
|
-
font-family: ${e=>ym[e.$fontFamily]} !important;
|
|
94
|
-
font-size: 20px;
|
|
95
|
-
min-height: 24px;
|
|
96
|
-
`,Om=Ve.span`
|
|
97
|
-
font-size: 9px;
|
|
98
|
-
color: ${pe(It.text.tertiary)};
|
|
99
|
-
font-family: monospace;
|
|
100
|
-
`;function Lo({fontFamily:e,children:t}){const[n,o]=a.useState(!1);return f.jsxs(f.Fragment,{children:[f.jsx(ks,{onClick:()=>o(!0),children:t}),f.jsx(gd,{open:n,onClose:()=>o(!1),title:`Unicode Table - ${e}`,description:"",size:"lg",children:f.jsx(Em,{children:Cm.map(r=>f.jsxs(Sm,{children:[f.jsxs(Mm,{children:[f.jsx(Ze,{variant:"default-semibold",children:r.name}),f.jsxs(Kn,{size:"small",children:[Un(r.start)," – ",Un(r.end)]})]}),f.jsx(Im,{children:r.characters.map(({char:s,codePoint:i})=>f.jsxs(km,{$fontFamily:e,title:`${s} — ${Un(i)}`,children:[f.jsx(Pm,{$fontFamily:e,children:s}),f.jsx(Om,{children:Un(i)})]},i))})]},r.name))})})]})}function Tm(){const[e,t]=Rn();return f.jsxs(yc,{keepMounted:!0,trigger:f.jsx(Qo,{svg:Uc,assistiveText:"Filters",variant:"tertiary",size:"medium"}),children:[f.jsx(Zo,{label:"Languages",side:"left",leadingElement:f.jsx(lt,{svg:Nc,size:"24"}),children:wn.map(n=>f.jsx(Rc,{label:n.name,checked:e.visible.includes(n.code),onCheckedChange:()=>{a.startTransition(()=>t({type:"toggle-visibility",lang:n.code}))}},n.code))}),f.jsx(ws,{}),f.jsxs(Cc,{label:"Text transform",side:"left",leadingElement:f.jsx(lt,{svg:Lc,size:"24"}),defaultValue:e.textTransform,onValueChange:n=>{a.startTransition(()=>t({type:"set-text-transform",textTransform:n}))},children:[f.jsx(ln,{value:"normal",label:"Normal"}),f.jsx(ln,{value:"uppercase",label:"Uppercase"}),f.jsx(ln,{value:"lowercase",label:"Lowercase"})]}),f.jsx(ws,{}),f.jsxs(Zo,{label:"Unicode tables",side:"left",leadingElement:f.jsx(lt,{svg:Fc,size:"24"}),keepMounted:!0,children:[f.jsx(Lo,{fontFamily:"Platform",children:f.jsx(St,{label:"Platform"})}),f.jsx(Lo,{fontFamily:"Figtree",children:f.jsx(St,{label:"Figtree"})}),f.jsx(Lo,{fontFamily:"Noto Sans",children:f.jsx(St,{label:"Noto Sans"})})]}),f.jsx(St,{leadingElement:f.jsx(lt,{svg:Bc,size:"24"}),label:"Expand all",onClick:()=>{a.startTransition(()=>t({type:"expand-all"}))}}),f.jsx(St,{leadingElement:f.jsx(lt,{svg:$c,size:"24"}),label:"Collapse all",onClick:()=>{a.startTransition(()=>t({type:"collapse-all"}))}}),f.jsx(St,{leadingElement:f.jsx(lt,{svg:Vc,size:"24"}),label:"Reset",onClick:()=>{a.startTransition(()=>t({type:"reset"}))}})]})}const jm=Ve.div`
|
|
101
|
-
display: flex;
|
|
102
|
-
flex-direction: column;
|
|
103
|
-
gap: ${pe(Oe[24])};
|
|
104
|
-
|
|
105
|
-
p {
|
|
106
|
-
margin: 0;
|
|
107
|
-
}
|
|
108
|
-
`,_m=Ve.div`
|
|
109
|
-
position: sticky;
|
|
110
|
-
top: 0;
|
|
111
|
-
background-color: ${pe(It.background.primary)};
|
|
112
|
-
padding: ${pe(Oe[8])} 0;
|
|
113
|
-
display: flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
gap: ${pe(Oe[8])};
|
|
116
|
-
|
|
117
|
-
[data-preply-ds-component='TextField'] {
|
|
118
|
-
flex: 1;
|
|
119
|
-
}
|
|
120
|
-
`,Am=Ve.div`
|
|
121
|
-
display: flex;
|
|
122
|
-
flex-direction: column;
|
|
123
|
-
gap: ${pe(Oe[8])};
|
|
124
|
-
`,Dm=Dc`
|
|
125
|
-
.sbdocs.sbdocs-content {
|
|
126
|
-
max-width: 1280px;
|
|
127
|
-
}
|
|
128
|
-
`,Nm=()=>{const[e,t]=Rn();return f.jsxs(jm,{lang:"en","data-preply-ds-theme":"tokyo-ui",children:[f.jsx(Dm,{}),f.jsxs(_m,{children:[f.jsx(Sc,{label:"Display text",hideLabel:!0,placeholder:"Enter text to display here...",defaultValue:e.text,onChange:n=>t({type:"set-text",text:n.target.value})}),f.jsx(Tm,{})]}),f.jsx(Am,{children:wn.map(n=>f.jsx(xm,{data:n},n.code))})]})},Lm=()=>f.jsx(gm,{children:f.jsx(Nm,{})}),Fm={title:"Guides/Assets/Fonts Explorer",tags:["!autodocs","!dev"]},on=()=>f.jsx(Lm,{});var Rs,Cs,Es;on.parameters={...on.parameters,docs:{...(Rs=on.parameters)==null?void 0:Rs.docs,source:{originalSource:`() => {
|
|
129
|
-
return <FontsExplorer />;
|
|
130
|
-
}`,...(Es=(Cs=on.parameters)==null?void 0:Cs.docs)==null?void 0:Es.source}}};const Bm=["Default"],tg=Object.freeze(Object.defineProperty({__proto__:null,Default:on,__namedExportsOrder:Bm,default:Fm},Symbol.toStringTag,{value:"Module"}));export{on as D,tg as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as o}from"./iframe-CpMEswOF.js";function a(r){return`var(--${r[o]})`}export{a as g};
|