@arcadeai/design-system 3.39.0 → 3.39.2
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/CompositeItem-CniPsjzP.js +30 -0
- package/dist/CompositeList-yq5K_yj6.js +81 -0
- package/dist/CompositeRoot-Dy-5A-Je.js +206 -0
- package/dist/DialogRoot-DDokfJcO.js +57 -0
- package/dist/DialogTrigger-CFUE8YsM.js +402 -0
- package/dist/DirectionContext-BSOheMwC.js +10 -0
- package/dist/FieldItemContext-CF2fRwBC.js +12 -0
- package/dist/FloatingPortalLite-BHsRx4XN.js +29 -0
- package/dist/InternalBackdrop-BVEfe6O1.js +610 -0
- package/dist/LabelableContext-Dzw1DWuj.js +171 -0
- package/dist/Separator-CswSYAXX.js +25 -0
- package/dist/ToolbarRootContext-D7EsmJ5f.js +10 -0
- package/dist/andromeeda-B-gfN00q.js +4 -0
- package/dist/angular-html-dA1qUKRV.js +32 -0
- package/dist/angular-ts-CXyBC0vY.js +21 -0
- package/dist/apl-CjNiDgad.js +3 -3
- package/dist/assets/icons/telegram.js +10 -0
- package/dist/assets/images/arcade-grid.d.ts.map +1 -1
- package/dist/assets/images/arcade-grid.js +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/variables.css +1 -1
- package/dist/astro--3ZkKqYU.js +18 -0
- package/dist/astro-CFFExE8Q.js +5 -5
- package/dist/aurora-x-B56eICma.js +4 -0
- package/dist/ayu-dark-DJSOaKig.js +4 -0
- package/dist/ayu-light-BPfFt4v-.js +4 -0
- package/dist/ayu-mirage-DmPLRBj7.js +4 -0
- package/dist/blade-BoRuQEEj.js +20 -0
- package/dist/blade-D0HyNvCw.js +4 -4
- package/dist/c-C4SM8H98.js +6 -0
- package/dist/cairo-DM6WF2e3.js +1 -1
- package/dist/{calendar-DreAgQKY.js → calendar-CLEnvrbp.js} +483 -482
- package/dist/catppuccin-frappe-CA5k7W3u.js +4 -0
- package/dist/catppuccin-latte-CYfkUW5v.js +4 -0
- package/dist/catppuccin-macchiato-BOj_4I3g.js +4 -0
- package/dist/catppuccin-mocha-BXpUXme4.js +4 -0
- package/dist/clamp-BxE4ZAuA.js +17 -0
- package/dist/cobol-HihOMwht.js +1 -1
- package/dist/coffee-D8Swy5yR.js +8 -0
- package/dist/components/index.js +665 -644
- package/dist/components/ui/atoms/accordion.d.ts +9 -7
- package/dist/components/ui/atoms/accordion.d.ts.map +1 -1
- package/dist/components/ui/atoms/accordion.js +454 -243
- package/dist/components/ui/atoms/alert-dialog.d.ts +13 -9
- package/dist/components/ui/atoms/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert-dialog.js +149 -183
- package/dist/components/ui/atoms/alert.d.ts +2 -1
- package/dist/components/ui/atoms/alert.d.ts.map +1 -1
- package/dist/components/ui/atoms/alert.js +36 -25
- package/dist/components/ui/atoms/avatar.d.ts +10 -5
- package/dist/components/ui/atoms/avatar.d.ts.map +1 -1
- package/dist/components/ui/atoms/avatar.js +198 -205
- package/dist/components/ui/atoms/badge.d.ts +4 -5
- package/dist/components/ui/atoms/badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/badge.js +31 -22
- package/dist/components/ui/atoms/breadcrumb.d.ts +4 -5
- package/dist/components/ui/atoms/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/atoms/breadcrumb.js +46 -29
- package/dist/components/ui/atoms/button.d.ts +4 -6
- package/dist/components/ui/atoms/button.d.ts.map +1 -1
- package/dist/components/ui/atoms/button.js +59 -28
- package/dist/components/ui/atoms/byoc-badge.d.ts +2 -2
- package/dist/components/ui/atoms/byoc-badge.d.ts.map +1 -1
- package/dist/components/ui/atoms/byoc-badge.js +14 -8
- package/dist/components/ui/atoms/calendar.d.ts +6 -16
- package/dist/components/ui/atoms/calendar.d.ts.map +1 -1
- package/dist/components/ui/atoms/calendar.js +1 -1
- package/dist/components/ui/atoms/card.d.ts +4 -2
- package/dist/components/ui/atoms/card.d.ts.map +1 -1
- package/dist/components/ui/atoms/card.js +46 -35
- package/dist/components/ui/atoms/chart.d.ts +24 -48
- package/dist/components/ui/atoms/chart.d.ts.map +1 -1
- package/dist/components/ui/atoms/chart.js +179 -148
- package/dist/components/ui/atoms/checkbox.d.ts +2 -3
- package/dist/components/ui/atoms/checkbox.d.ts.map +1 -1
- package/dist/components/ui/atoms/checkbox.js +269 -249
- package/dist/components/ui/atoms/code-block.js +1 -1
- package/dist/components/ui/atoms/collapsible.d.ts +5 -5
- package/dist/components/ui/atoms/collapsible.d.ts.map +1 -1
- package/dist/components/ui/atoms/collapsible.js +208 -23
- package/dist/components/ui/atoms/command.d.ts +4 -3
- package/dist/components/ui/atoms/command.d.ts.map +1 -1
- package/dist/components/ui/atoms/command.js +1655 -348
- package/dist/components/ui/atoms/dialog.d.ts +12 -10
- package/dist/components/ui/atoms/dialog.d.ts.map +1 -1
- package/dist/components/ui/atoms/dialog.js +91 -80
- package/dist/components/ui/atoms/dropdown-menu.d.ts +21 -17
- package/dist/components/ui/atoms/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/atoms/dropdown-menu.js +1507 -899
- package/dist/components/ui/atoms/form.d.ts +5 -3
- package/dist/components/ui/atoms/form.d.ts.map +1 -1
- package/dist/components/ui/atoms/form.js +36 -42
- package/dist/components/ui/atoms/hover-card.d.ts +5 -6
- package/dist/components/ui/atoms/hover-card.d.ts.map +1 -1
- package/dist/components/ui/atoms/hover-card.js +355 -193
- package/dist/components/ui/atoms/icons/index.d.ts +1 -0
- package/dist/components/ui/atoms/icons/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/icons/index.js +58 -56
- package/dist/components/ui/atoms/icons/telegram.d.ts +4 -0
- package/dist/components/ui/atoms/icons/telegram.d.ts.map +1 -0
- package/dist/components/ui/atoms/icons/telegram.js +37 -0
- package/dist/components/ui/atoms/index.d.ts +1 -0
- package/dist/components/ui/atoms/index.d.ts.map +1 -1
- package/dist/components/ui/atoms/index.js +566 -545
- package/dist/components/ui/atoms/input-group.d.ts +20 -0
- package/dist/components/ui/atoms/input-group.d.ts.map +1 -0
- package/dist/components/ui/atoms/input-group.js +136 -0
- package/dist/components/ui/atoms/input.d.ts.map +1 -1
- package/dist/components/ui/atoms/input.js +113 -13
- package/dist/components/ui/atoms/label.d.ts +1 -2
- package/dist/components/ui/atoms/label.d.ts.map +1 -1
- package/dist/components/ui/atoms/label.js +18 -31
- package/dist/components/ui/atoms/markdown.js +1 -1
- package/dist/components/ui/atoms/mobile-tooltip.js +4 -3
- package/dist/components/ui/atoms/popover.d.ts +8 -6
- package/dist/components/ui/atoms/popover.d.ts.map +1 -1
- package/dist/components/ui/atoms/popover.js +617 -245
- package/dist/components/ui/atoms/pro-badge.js +1 -1
- package/dist/components/ui/atoms/progress.d.ts +7 -4
- package/dist/components/ui/atoms/progress.d.ts.map +1 -1
- package/dist/components/ui/atoms/progress.js +236 -92
- package/dist/components/ui/atoms/radio-group.d.ts +4 -4
- package/dist/components/ui/atoms/radio-group.d.ts.map +1 -1
- package/dist/components/ui/atoms/radio-group.js +355 -251
- package/dist/components/ui/atoms/resizable.d.ts +3 -4
- package/dist/components/ui/atoms/resizable.d.ts.map +1 -1
- package/dist/components/ui/atoms/resizable.js +25 -27
- package/dist/components/ui/atoms/scroll-area.d.ts +5 -5
- package/dist/components/ui/atoms/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-area.js +611 -526
- package/dist/components/ui/atoms/scroll-button.d.ts.map +1 -1
- package/dist/components/ui/atoms/scroll-button.js +27 -22
- package/dist/components/ui/atoms/select.d.ts +11 -11
- package/dist/components/ui/atoms/select.d.ts.map +1 -1
- package/dist/components/ui/atoms/select.js +1525 -889
- package/dist/components/ui/atoms/separator.d.ts +2 -3
- package/dist/components/ui/atoms/separator.d.ts.map +1 -1
- package/dist/components/ui/atoms/separator.js +16 -35
- package/dist/components/ui/atoms/sheet.d.ts +9 -9
- package/dist/components/ui/atoms/sheet.d.ts.map +1 -1
- package/dist/components/ui/atoms/sheet.js +65 -64
- package/dist/components/ui/atoms/sidebar.d.ts +9 -15
- package/dist/components/ui/atoms/sidebar.d.ts.map +1 -1
- package/dist/components/ui/atoms/sidebar.js +288 -283
- package/dist/components/ui/atoms/skeleton.js +4 -4
- package/dist/components/ui/atoms/slider.d.ts +2 -3
- package/dist/components/ui/atoms/slider.d.ts.map +1 -1
- package/dist/components/ui/atoms/slider.js +886 -440
- package/dist/components/ui/atoms/switch.d.ts +4 -5
- package/dist/components/ui/atoms/switch.d.ts.map +1 -1
- package/dist/components/ui/atoms/switch.js +218 -151
- package/dist/components/ui/atoms/table.d.ts +2 -4
- package/dist/components/ui/atoms/table.d.ts.map +1 -1
- package/dist/components/ui/atoms/table.js +35 -36
- package/dist/components/ui/atoms/tabs.d.ts +11 -7
- package/dist/components/ui/atoms/tabs.d.ts.map +1 -1
- package/dist/components/ui/atoms/tabs.js +492 -186
- package/dist/components/ui/atoms/textarea.d.ts.map +1 -1
- package/dist/components/ui/atoms/textarea.js +7 -7
- package/dist/components/ui/atoms/toggle.d.ts +2 -3
- package/dist/components/ui/atoms/toggle.d.ts.map +1 -1
- package/dist/components/ui/atoms/toggle.js +92 -45
- package/dist/components/ui/atoms/tooltip.d.ts +6 -9
- package/dist/components/ui/atoms/tooltip.d.ts.map +1 -1
- package/dist/components/ui/atoms/tooltip.js +625 -343
- package/dist/components/ui/atoms/view-tools-control.js +16 -15
- package/dist/components/ui/atoms/virtualized-grid.d.ts +11 -4
- package/dist/components/ui/atoms/virtualized-grid.d.ts.map +1 -1
- package/dist/components/ui/atoms/virtualized-grid.js +365 -333
- package/dist/components/ui/index.js +665 -644
- package/dist/components/ui/molecules/chat-history-item.d.ts.map +1 -1
- package/dist/components/ui/molecules/chat-history-item.js +47 -40
- package/dist/components/ui/molecules/command-bar.js +1 -1
- package/dist/components/ui/molecules/confirm-popover.d.ts +2 -2
- package/dist/components/ui/molecules/confirm-popover.d.ts.map +1 -1
- package/dist/components/ui/molecules/confirm-popover.js +26 -24
- package/dist/components/ui/molecules/date-time-picker.d.ts.map +1 -1
- package/dist/components/ui/molecules/date-time-picker.js +17 -11
- package/dist/components/ui/molecules/index.js +1 -1
- package/dist/components/ui/molecules/message.d.ts +2 -3
- package/dist/components/ui/molecules/message.d.ts.map +1 -1
- package/dist/components/ui/molecules/message.js +10 -16
- package/dist/components/ui/molecules/prompt-input.d.ts +1 -1
- package/dist/components/ui/molecules/prompt-input.d.ts.map +1 -1
- package/dist/components/ui/molecules/prompt-input.js +21 -22
- package/dist/components/ui/molecules/requirement-badges.d.ts.map +1 -1
- package/dist/components/ui/molecules/requirement-badges.js +3 -3
- package/dist/components/ui/molecules/steps-progress.js +1 -0
- package/dist/components/ui/molecules/tool-call-accordion.js +1 -0
- package/dist/components/ui/molecules/tool-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/tool-card.js +60 -47
- package/dist/components/ui/molecules/toolkit-card.d.ts.map +1 -1
- package/dist/components/ui/molecules/toolkit-card.js +1 -1
- package/dist/components/ui/molecules/user-nav.d.ts.map +1 -1
- package/dist/components/ui/molecules/user-nav.js +62 -57
- package/dist/components/ui/templates/auth-template.js +5 -5
- package/dist/composite-BASdnlNo.js +220 -0
- package/dist/composite-BSpUD7nI.js +66 -0
- package/dist/cpp-CA4iM_wM.js +18 -0
- package/dist/createBaseUIEventDetails-CqidROtw.js +55 -0
- package/dist/crystal-CRJyc4G-.js +4 -4
- package/dist/css-M7EaDHN_.js +6 -0
- package/dist/csv-B7yqA61e.js +6 -0
- package/dist/dark-plus-B4vfALTw.js +4 -0
- package/dist/detectBrowser-Dn2N72k1.js +42 -0
- package/dist/dracula-Cb59ZzY3.js +4 -0
- package/dist/dracula-soft-aaEmszbU.js +4 -0
- package/dist/edge-BYQkOzbF.js +1 -1
- package/dist/element-DSo91iOi.js +88 -0
- package/dist/elm-BtNbw_Cd.js +1 -1
- package/dist/erlang-DNcDT8Hi.js +1 -1
- package/dist/event-BCa0Un_3.js +30 -0
- package/dist/everforest-dark-CLp_21RJ.js +4 -0
- package/dist/everforest-light-CZ0NCAAv.js +4 -0
- package/dist/floating-ui.utils-48URp89E.js +126 -0
- package/dist/floating-ui.utils.dom-jr2suqy2.js +135 -0
- package/dist/fsharp-CYOiIVNx.js +1 -1
- package/dist/getDisabledMountTransitionStyles-fmnaQYVj.js +1539 -0
- package/dist/getPseudoElementBounds-B4_miSEJ.js +364 -0
- package/dist/git-rebase-ZWUFO_T4.js +1 -1
- package/dist/github-dark-BD3lImVS.js +4 -0
- package/dist/github-dark-default-ID_nBUwl.js +4 -0
- package/dist/github-dark-dimmed-Cw4rFgde.js +4 -0
- package/dist/github-dark-high-contrast-DSby9de8.js +4 -0
- package/dist/github-light-W396yAFe.js +4 -0
- package/dist/github-light-default-DCAQ2px1.js +4 -0
- package/dist/github-light-high-contrast-ChWJGEvx.js +4 -0
- package/dist/glimmer-js-DkxNrfPT.js +2 -2
- package/dist/glimmer-ts-D6YZEmK_.js +2 -2
- package/dist/glsl-CgdqkyFp.js +8 -0
- package/dist/graphql-Bv26LTzG.js +14 -0
- package/dist/gruvbox-dark-hard-BC1GRqFa.js +4 -0
- package/dist/gruvbox-dark-medium-COLy2cDY.js +4 -0
- package/dist/gruvbox-dark-soft-B8MALL4f.js +4 -0
- package/dist/gruvbox-light-hard-Bzxr_AnB.js +4 -0
- package/dist/gruvbox-light-medium-D2fqu3Kj.js +4 -0
- package/dist/gruvbox-light-soft-atzRH3-n.js +4 -0
- package/dist/hack-ItRNKiEb.js +1 -1
- package/dist/haml-B1t5q1Sv.js +10 -0
- package/dist/haml-NZLVzu_R.js +1 -1
- package/dist/handlebars-B2fb61mr.js +14 -0
- package/dist/handlebars-mxStpSE7.js +2 -2
- package/dist/highlighted-body-OFNGDK62-Df6AJMbs.js +20 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/hooks/use-mobile.js +11 -12
- package/dist/horizon-PFtq58ZB.js +4 -0
- package/dist/horizon-bright-2WzHy-Vo.js +4 -0
- package/dist/houston-BEqUWhHr.js +4 -0
- package/dist/html-B50bmoVb.js +1 -1
- package/dist/html-CPZ3oZQ7.js +10 -0
- package/dist/html-derivative-B2qv7eyt.js +8 -0
- package/dist/http-BQ2t9cn1.js +14 -0
- package/dist/hurl-RyCMCa80.js +12 -0
- package/dist/imba-DpB-wtPB.js +6 -0
- package/dist/index-3rscXtm3.js +4708 -0
- package/dist/inertValue-kpZZDBEy.js +7 -0
- package/dist/integrations/rhf/index.js +6 -5
- package/dist/isElementDisabled-Cbd8W9kH.js +6 -0
- package/dist/java-CbphP4lz.js +6 -0
- package/dist/javascript-CgYd5l7W.js +6 -0
- package/dist/jinja-DFCUirAg.js +11 -0
- package/dist/jison-CTEI_s6O.js +8 -0
- package/dist/json-B5-prx4F.js +6 -0
- package/dist/json5-CZ8R1oUY.js +6 -0
- package/dist/jsonc-DMboCKBJ.js +6 -0
- package/dist/jsonl-YgIUi4Dg.js +6 -0
- package/dist/jsx-D4q4E1UD.js +6 -0
- package/dist/julia-2ubi2n9a.js +16 -0
- package/dist/just-CEK2SJ_k.js +4 -4
- package/dist/kanagawa-dragon-DuYaOBBk.js +4 -0
- package/dist/kanagawa-lotus-CyjAihYC.js +4 -0
- package/dist/kanagawa-wave-BVdXUMj5.js +4 -0
- package/dist/laserwave-B_2VVKNJ.js +4 -0
- package/dist/less-MoGo8xoS.js +6 -0
- package/dist/light-plus-IB4fPeJj.js +4 -0
- package/dist/liquid-CHzkx3jT.js +2 -2
- package/dist/lua-Bp3IRv7I.js +1 -1
- package/dist/main.js +691 -670
- package/dist/markdown-B-zRtm0x.js +6 -0
- package/dist/{markdown-D0xxRbwP.js → markdown-B71Eurda.js} +10329 -8108
- package/dist/marko-BlmC3dqW.js +14 -0
- package/dist/marko-CJBA24Ri.js +2 -2
- package/dist/material-theme-CjsSdYF2.js +4 -0
- package/dist/material-theme-darker-DEk0vgdS.js +4 -0
- package/dist/material-theme-lighter-DEVB_7K5.js +4 -0
- package/dist/material-theme-ocean-DK6jm24j.js +4 -0
- package/dist/material-theme-palenight-CNkXNpHv.js +4 -0
- package/dist/mdc-C9YSUwVC.js +2 -2
- package/dist/mdc-CLNk3q28.js +12 -0
- package/dist/mdx-CiUWpBB_.js +6 -0
- package/dist/mermaid-GHXKKRXX-BkplG-MI.js +5 -0
- package/dist/metadata/toolkit-icons.d.ts.map +1 -1
- package/dist/metadata/toolkit-icons.js +40 -38
- package/dist/metadata/toolkits.d.ts.map +1 -1
- package/dist/metadata/toolkits.js +13 -0
- package/dist/min-dark-CJcHUHwu.js +4 -0
- package/dist/min-light-BAN2UR75.js +4 -0
- package/dist/monokai-BbXwpjKl.js +4 -0
- package/dist/night-owl-csViJ7u4.js +4 -0
- package/dist/night-owl-light-BC-NuMC3.js +4 -0
- package/dist/nim-QAjRdh9w.js +5 -5
- package/dist/nord-B8Sq-VQ0.js +4 -0
- package/dist/one-dark-pro-DTdrcl-J.js +4 -0
- package/dist/one-light-kPHTChCU.js +4 -0
- package/dist/owner-rKN292Q9.js +6 -0
- package/dist/perl-DkVrgJBg.js +3 -3
- package/dist/php-BIzsF_5x.js +4 -4
- package/dist/php-Kn-vgdBD.js +18 -0
- package/dist/plastic-DDweBgVs.js +4 -0
- package/dist/poimandres-Dqvs16BQ.js +4 -0
- package/dist/popupStateMapping-BT9Y_jIq.js +1849 -0
- package/dist/postcss-CwL8bLZI.js +6 -0
- package/dist/pug-CTOOvSEH.js +12 -0
- package/dist/pug-XOw9Q1Ho.js +1 -1
- package/dist/python-jjYlTiSH.js +6 -0
- package/dist/qml-rTNXsquU.js +1 -1
- package/dist/r-C8zl4zMO.js +6 -0
- package/dist/react-resizable-panels-BqIpIFl2.js +2017 -0
- package/dist/red-DBDwQkX-.js +4 -0
- package/dist/regexp-Dpy_RgoJ.js +6 -0
- package/dist/resolveAriaLabelledBy-B5vw-szP.js +11 -0
- package/dist/rose-pine-DGHrTu7e.js +4 -0
- package/dist/rose-pine-dawn-DfRVdapG.js +4 -0
- package/dist/rose-pine-moon-DFpJm5Rd.js +4 -0
- package/dist/rst-DM32Wy3O.js +5 -5
- package/dist/ruby-BeqCs27h.js +8 -8
- package/dist/safePolygon-CJcmMc0u.js +389 -0
- package/dist/safeReact-DKq-628G.js +7 -0
- package/dist/sas-fpEvgATw.js +1 -1
- package/dist/sass-BmupNt-w.js +6 -0
- package/dist/scss-BZYVIVaN.js +8 -0
- package/dist/serializeValue-BebmSzW3.js +14 -0
- package/dist/shellscript-fMxXshxv.js +6 -0
- package/dist/shellsession-DiDJNQdy.js +1 -1
- package/dist/slack-dark-noeC6QPl.js +4 -0
- package/dist/slack-ochin-3_2idqLR.js +4 -0
- package/dist/snazzy-light-B9cV359v.js +4 -0
- package/dist/solarized-dark-B6X0ILWr.js +4 -0
- package/dist/solarized-light-LxOemn3c.js +4 -0
- package/dist/sql-D30Zid36.js +6 -0
- package/dist/stata-B8c5fTjX.js +1 -1
- package/dist/styles-DU5BO7fS.js +16 -0
- package/dist/stylus-BoBcEBjx.js +6 -0
- package/dist/surrealql-CQi7GQN7.js +1 -1
- package/dist/svelte-b9PAcyUe.js +14 -0
- package/dist/svelte-rYri41WT.js +3 -3
- package/dist/synthwave-84-DzQeMpV0.js +4 -0
- package/dist/templ-Crs9Ui8q.js +1 -1
- package/dist/tex-AHxmLTL0.js +1 -1
- package/dist/tokyo-night-CLM-V_Re.js +4 -0
- package/dist/{toolkit-card-CB1oiaei.js → toolkit-card-DhpOY80l.js} +56 -36
- package/dist/ts-tags-CP1b-4Z2.js +41 -0
- package/dist/ts-tags-ioVe2PKw.js +5 -5
- package/dist/tsx-QNpb2qLW.js +6 -0
- package/dist/twig-DwV2Fi4L.js +2 -2
- package/dist/typescript-AhniRyfZ.js +6 -0
- package/dist/useAnimationFrame-DIc6eFHa.js +69 -0
- package/dist/useAriaLabelledBy-VklrCmKp.js +34 -0
- package/dist/useBaseUiId-C8Dq0BQq.js +25 -0
- package/dist/useButton-JYPKQKj4.js +150 -0
- package/dist/useCollapsiblePanel-9pDlDh3R.js +257 -0
- package/dist/useCompositeItem-D00ALGkT.js +35 -0
- package/dist/useCompositeListItem-CYQrZg5-.js +74 -0
- package/dist/useControlled-Sx-_x7Sz.js +32 -0
- package/dist/useFocus-Aj9ShMQu.js +97 -0
- package/dist/useIsoLayoutEffect-DpJo20by.js +7 -0
- package/dist/useLabelableId-DF_d91GP.js +44 -0
- package/dist/useOnFirstRender-B4aruaIA.js +9 -0
- package/dist/useOnMount-JHtE6teb.js +9 -0
- package/dist/useOpenChangeComplete-DkeH9FGJ.js +130 -0
- package/dist/useRender-BNXBkp2o.js +7 -0
- package/dist/useRenderElement-DNB2vtF1.js +274 -0
- package/dist/useRole-N-RCRzo1.js +76 -0
- package/dist/useStableCallback-CudqoENs.js +33 -0
- package/dist/useSyncedFloatingRootContext-Bc90zSTy.js +185 -0
- package/dist/useTimeout-DAqPwigF.js +33 -0
- package/dist/useValueAsRef-LhoZc6As.js +20 -0
- package/dist/useValueChanged-Bissqjjn.js +15 -0
- package/dist/valueToPercent-BBgE4D3L.js +27 -0
- package/dist/vesper-BmV7KiQ0.js +4 -0
- package/dist/visuallyHidden-PuyyGHVF.js +22 -0
- package/dist/vitesse-black-CxZz3C4s.js +4 -0
- package/dist/vitesse-dark-DVUJ0sy2.js +4 -0
- package/dist/vitesse-light-BDJohtUr.js +4 -0
- package/dist/vue-CY6W2ID0.js +31 -0
- package/dist/vue-DXEmyXn9.js +3 -3
- package/dist/vue-html-DYXHAJ2G.js +8 -0
- package/dist/vue-vine-D41-N99t.js +4 -4
- package/dist/vue-vine-DiWTpMwZ.js +18 -0
- package/dist/wasm-3y0A1Y71.js +6 -0
- package/dist/wasm-Dm9SFfrx.js +7 -0
- package/dist/web-BbvN_Lei.js +2846 -0
- package/dist/wgsl-SXl3EZUN.js +6 -0
- package/dist/wit-Cw0CTVY0.js +6 -0
- package/dist/xml-CNXGTZ6Z.js +8 -0
- package/dist/xsl-BmSZphgC.js +1 -1
- package/dist/yaml-DZqZ2PBD.js +6 -0
- package/package.json +37 -34
- package/dist/highlighted-body-TPN3WLV5-D6UnKGod.js +0 -19
- package/dist/index-0ioNhtNM.js +0 -10
- package/dist/index-437EL2iq.js +0 -52
- package/dist/index-B695uy69.js +0 -9
- package/dist/index-BEZCAdXQ.js +0 -1568
- package/dist/index-BGQepRFJ.js +0 -27
- package/dist/index-BZPx6jYI.js +0 -8
- package/dist/index-BaLuVb4t.js +0 -70
- package/dist/index-Bw62B28F.js +0 -31
- package/dist/index-By-GFSsC.js +0 -245
- package/dist/index-ByaXH_ih.js +0 -10
- package/dist/index-CCKe-Mpx.js +0 -6
- package/dist/index-Cv867SGx.js +0 -13
- package/dist/index-CvA4FcaC.js +0 -677
- package/dist/index-D2LZVjSn.js +0 -82
- package/dist/index-DFZozV_h.js +0 -68
- package/dist/index-DJQkmo5O.js +0 -49
- package/dist/index-DLohNuco.js +0 -36
- package/dist/index-DrFfdHac.js +0 -144
- package/dist/index-DrlYGDRT.js +0 -119
- package/dist/index-Dz8CQngS.js +0 -181
- package/dist/index-cd1ceFJg.js +0 -6973
- package/dist/index-rKs9bXHr.js +0 -6
- package/dist/mermaid-O7DHMXV3-gUrB-Xs1.js +0 -4
- package/dist/react-resizable-panels.browser-DYl0LXfw.js +0 -1510
- package/dist/web-BwFNdl01.js +0 -697
|
@@ -0,0 +1,1539 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as O from "react";
|
|
3
|
+
import { useLayoutEffect as jt } from "react";
|
|
4
|
+
import { e as J, g as z, a as X, b as Ut, c as qt, d as Jt, h as Kt, i as ae, m as me, j as _, k as Ot, l as St, r as Ae, s as Gt, n as Et, o as Ie, p as Ct, q as U, f as Re, t as Oe } from "./floating-ui.utils-48URp89E.js";
|
|
5
|
+
import { o as Pt } from "./owner-rKN292Q9.js";
|
|
6
|
+
import { u as ce } from "./useIsoLayoutEffect-DpJo20by.js";
|
|
7
|
+
import { u as We } from "./useValueAsRef-LhoZc6As.js";
|
|
8
|
+
import { u as Qt } from "./useStableCallback-CudqoENs.js";
|
|
9
|
+
import { u as Zt } from "./DirectionContext-BSOheMwC.js";
|
|
10
|
+
import { f as _e, a as k, h as G, g as Q, j as mt, b as K, i as ne, k as Dt, l as ze, m as ge, n as Se, o as en, p as Mt, q as tn, e as Ne, d as Ye, r as Ce } from "./floating-ui.utils.dom-jr2suqy2.js";
|
|
11
|
+
import * as nn from "react-dom";
|
|
12
|
+
import { u as on, F as sn, P as rn, b as cn, D as ln } from "./popupStateMapping-BT9Y_jIq.js";
|
|
13
|
+
import { a as an } from "./useBaseUiId-C8Dq0BQq.js";
|
|
14
|
+
import { a as fn, E as un } from "./useRenderElement-DNB2vtF1.js";
|
|
15
|
+
function gt(e, t, o) {
|
|
16
|
+
let {
|
|
17
|
+
reference: n,
|
|
18
|
+
floating: i
|
|
19
|
+
} = e;
|
|
20
|
+
const s = X(t), r = Ot(t), c = Et(r), a = z(t), m = s === "y", l = n.x + n.width / 2 - i.width / 2, f = n.y + n.height / 2 - i.height / 2, g = n[c] / 2 - i[c] / 2;
|
|
21
|
+
let u;
|
|
22
|
+
switch (a) {
|
|
23
|
+
case "top":
|
|
24
|
+
u = {
|
|
25
|
+
x: l,
|
|
26
|
+
y: n.y - i.height
|
|
27
|
+
};
|
|
28
|
+
break;
|
|
29
|
+
case "bottom":
|
|
30
|
+
u = {
|
|
31
|
+
x: l,
|
|
32
|
+
y: n.y + n.height
|
|
33
|
+
};
|
|
34
|
+
break;
|
|
35
|
+
case "right":
|
|
36
|
+
u = {
|
|
37
|
+
x: n.x + n.width,
|
|
38
|
+
y: f
|
|
39
|
+
};
|
|
40
|
+
break;
|
|
41
|
+
case "left":
|
|
42
|
+
u = {
|
|
43
|
+
x: n.x - i.width,
|
|
44
|
+
y: f
|
|
45
|
+
};
|
|
46
|
+
break;
|
|
47
|
+
default:
|
|
48
|
+
u = {
|
|
49
|
+
x: n.x,
|
|
50
|
+
y: n.y
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
switch (ae(t)) {
|
|
54
|
+
case "start":
|
|
55
|
+
u[r] -= g * (o && m ? -1 : 1);
|
|
56
|
+
break;
|
|
57
|
+
case "end":
|
|
58
|
+
u[r] += g * (o && m ? -1 : 1);
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
return u;
|
|
62
|
+
}
|
|
63
|
+
async function dn(e, t) {
|
|
64
|
+
var o;
|
|
65
|
+
t === void 0 && (t = {});
|
|
66
|
+
const {
|
|
67
|
+
x: n,
|
|
68
|
+
y: i,
|
|
69
|
+
platform: s,
|
|
70
|
+
rects: r,
|
|
71
|
+
elements: c,
|
|
72
|
+
strategy: a
|
|
73
|
+
} = e, {
|
|
74
|
+
boundary: m = "clippingAncestors",
|
|
75
|
+
rootBoundary: l = "viewport",
|
|
76
|
+
elementContext: f = "floating",
|
|
77
|
+
altBoundary: g = !1,
|
|
78
|
+
padding: u = 0
|
|
79
|
+
} = J(t, e), d = St(u), x = c[g ? f === "floating" ? "reference" : "floating" : f], w = Ae(await s.getClippingRect({
|
|
80
|
+
element: (o = await (s.isElement == null ? void 0 : s.isElement(x))) == null || o ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
81
|
+
boundary: m,
|
|
82
|
+
rootBoundary: l,
|
|
83
|
+
strategy: a
|
|
84
|
+
})), y = f === "floating" ? {
|
|
85
|
+
x: n,
|
|
86
|
+
y: i,
|
|
87
|
+
width: r.floating.width,
|
|
88
|
+
height: r.floating.height
|
|
89
|
+
} : r.reference, b = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), R = await (s.isElement == null ? void 0 : s.isElement(b)) ? await (s.getScale == null ? void 0 : s.getScale(b)) || {
|
|
90
|
+
x: 1,
|
|
91
|
+
y: 1
|
|
92
|
+
} : {
|
|
93
|
+
x: 1,
|
|
94
|
+
y: 1
|
|
95
|
+
}, A = Ae(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
96
|
+
elements: c,
|
|
97
|
+
rect: y,
|
|
98
|
+
offsetParent: b,
|
|
99
|
+
strategy: a
|
|
100
|
+
}) : y);
|
|
101
|
+
return {
|
|
102
|
+
top: (w.top - A.top + d.top) / R.y,
|
|
103
|
+
bottom: (A.bottom - w.bottom + d.bottom) / R.y,
|
|
104
|
+
left: (w.left - A.left + d.left) / R.x,
|
|
105
|
+
right: (A.right - w.right + d.right) / R.x
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
const mn = 50, gn = async (e, t, o) => {
|
|
109
|
+
const {
|
|
110
|
+
placement: n = "bottom",
|
|
111
|
+
strategy: i = "absolute",
|
|
112
|
+
middleware: s = [],
|
|
113
|
+
platform: r
|
|
114
|
+
} = o, c = r.detectOverflow ? r : {
|
|
115
|
+
...r,
|
|
116
|
+
detectOverflow: dn
|
|
117
|
+
}, a = await (r.isRTL == null ? void 0 : r.isRTL(t));
|
|
118
|
+
let m = await r.getElementRects({
|
|
119
|
+
reference: e,
|
|
120
|
+
floating: t,
|
|
121
|
+
strategy: i
|
|
122
|
+
}), {
|
|
123
|
+
x: l,
|
|
124
|
+
y: f
|
|
125
|
+
} = gt(m, n, a), g = n, u = 0;
|
|
126
|
+
const d = {};
|
|
127
|
+
for (let h = 0; h < s.length; h++) {
|
|
128
|
+
const x = s[h];
|
|
129
|
+
if (!x)
|
|
130
|
+
continue;
|
|
131
|
+
const {
|
|
132
|
+
name: w,
|
|
133
|
+
fn: y
|
|
134
|
+
} = x, {
|
|
135
|
+
x: b,
|
|
136
|
+
y: R,
|
|
137
|
+
data: A,
|
|
138
|
+
reset: S
|
|
139
|
+
} = await y({
|
|
140
|
+
x: l,
|
|
141
|
+
y: f,
|
|
142
|
+
initialPlacement: n,
|
|
143
|
+
placement: g,
|
|
144
|
+
strategy: i,
|
|
145
|
+
middlewareData: d,
|
|
146
|
+
rects: m,
|
|
147
|
+
platform: c,
|
|
148
|
+
elements: {
|
|
149
|
+
reference: e,
|
|
150
|
+
floating: t
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
l = b ?? l, f = R ?? f, d[w] = {
|
|
154
|
+
...d[w],
|
|
155
|
+
...A
|
|
156
|
+
}, S && u < mn && (u++, typeof S == "object" && (S.placement && (g = S.placement), S.rects && (m = S.rects === !0 ? await r.getElementRects({
|
|
157
|
+
reference: e,
|
|
158
|
+
floating: t,
|
|
159
|
+
strategy: i
|
|
160
|
+
}) : S.rects), {
|
|
161
|
+
x: l,
|
|
162
|
+
y: f
|
|
163
|
+
} = gt(m, g, a)), h = -1);
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
x: l,
|
|
167
|
+
y: f,
|
|
168
|
+
placement: g,
|
|
169
|
+
strategy: i,
|
|
170
|
+
middlewareData: d
|
|
171
|
+
};
|
|
172
|
+
}, hn = function(e) {
|
|
173
|
+
return e === void 0 && (e = {}), {
|
|
174
|
+
name: "flip",
|
|
175
|
+
options: e,
|
|
176
|
+
async fn(t) {
|
|
177
|
+
var o, n;
|
|
178
|
+
const {
|
|
179
|
+
placement: i,
|
|
180
|
+
middlewareData: s,
|
|
181
|
+
rects: r,
|
|
182
|
+
initialPlacement: c,
|
|
183
|
+
platform: a,
|
|
184
|
+
elements: m
|
|
185
|
+
} = t, {
|
|
186
|
+
mainAxis: l = !0,
|
|
187
|
+
crossAxis: f = !0,
|
|
188
|
+
fallbackPlacements: g,
|
|
189
|
+
fallbackStrategy: u = "bestFit",
|
|
190
|
+
fallbackAxisSideDirection: d = "none",
|
|
191
|
+
flipAlignment: h = !0,
|
|
192
|
+
...x
|
|
193
|
+
} = J(e, t);
|
|
194
|
+
if ((o = s.arrow) != null && o.alignmentOffset)
|
|
195
|
+
return {};
|
|
196
|
+
const w = z(i), y = X(c), b = z(c) === c, R = await (a.isRTL == null ? void 0 : a.isRTL(m.floating)), A = g || (b || !h ? [Ut(c)] : qt(c)), S = d !== "none";
|
|
197
|
+
!g && S && A.push(...Jt(c, h, d, R));
|
|
198
|
+
const v = [c, ...A], E = await a.detectOverflow(t, x), B = [];
|
|
199
|
+
let L = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
200
|
+
if (l && B.push(E[w]), f) {
|
|
201
|
+
const $ = Kt(i, r, R);
|
|
202
|
+
B.push(E[$[0]], E[$[1]]);
|
|
203
|
+
}
|
|
204
|
+
if (L = [...L, {
|
|
205
|
+
placement: i,
|
|
206
|
+
overflows: B
|
|
207
|
+
}], !B.every(($) => $ <= 0)) {
|
|
208
|
+
var H, W;
|
|
209
|
+
const $ = (((H = s.flip) == null ? void 0 : H.index) || 0) + 1, M = v[$];
|
|
210
|
+
if (M && (!(f === "alignment" ? y !== X(M) : !1) || // We leave the current main axis only if every placement on that axis
|
|
211
|
+
// overflows the main axis.
|
|
212
|
+
L.every((p) => X(p.placement) === y ? p.overflows[0] > 0 : !0)))
|
|
213
|
+
return {
|
|
214
|
+
data: {
|
|
215
|
+
index: $,
|
|
216
|
+
overflows: L
|
|
217
|
+
},
|
|
218
|
+
reset: {
|
|
219
|
+
placement: M
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
let T = (W = L.filter((F) => F.overflows[0] <= 0).sort((F, p) => F.overflows[1] - p.overflows[1])[0]) == null ? void 0 : W.placement;
|
|
223
|
+
if (!T)
|
|
224
|
+
switch (u) {
|
|
225
|
+
case "bestFit": {
|
|
226
|
+
var D;
|
|
227
|
+
const F = (D = L.filter((p) => {
|
|
228
|
+
if (S) {
|
|
229
|
+
const P = X(p.placement);
|
|
230
|
+
return P === y || // Create a bias to the `y` side axis due to horizontal
|
|
231
|
+
// reading directions favoring greater width.
|
|
232
|
+
P === "y";
|
|
233
|
+
}
|
|
234
|
+
return !0;
|
|
235
|
+
}).map((p) => [p.placement, p.overflows.filter((P) => P > 0).reduce((P, N) => P + N, 0)]).sort((p, P) => p[1] - P[1])[0]) == null ? void 0 : D[0];
|
|
236
|
+
F && (T = F);
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
case "initialPlacement":
|
|
240
|
+
T = c;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
if (i !== T)
|
|
244
|
+
return {
|
|
245
|
+
reset: {
|
|
246
|
+
placement: T
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
return {};
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
function ht(e, t) {
|
|
255
|
+
return {
|
|
256
|
+
top: e.top - t.height,
|
|
257
|
+
right: e.right - t.width,
|
|
258
|
+
bottom: e.bottom - t.height,
|
|
259
|
+
left: e.left - t.width
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function pt(e) {
|
|
263
|
+
return Gt.some((t) => e[t] >= 0);
|
|
264
|
+
}
|
|
265
|
+
const pn = function(e) {
|
|
266
|
+
return e === void 0 && (e = {}), {
|
|
267
|
+
name: "hide",
|
|
268
|
+
options: e,
|
|
269
|
+
async fn(t) {
|
|
270
|
+
const {
|
|
271
|
+
rects: o,
|
|
272
|
+
platform: n
|
|
273
|
+
} = t, {
|
|
274
|
+
strategy: i = "referenceHidden",
|
|
275
|
+
...s
|
|
276
|
+
} = J(e, t);
|
|
277
|
+
switch (i) {
|
|
278
|
+
case "referenceHidden": {
|
|
279
|
+
const r = await n.detectOverflow(t, {
|
|
280
|
+
...s,
|
|
281
|
+
elementContext: "reference"
|
|
282
|
+
}), c = ht(r, o.reference);
|
|
283
|
+
return {
|
|
284
|
+
data: {
|
|
285
|
+
referenceHiddenOffsets: c,
|
|
286
|
+
referenceHidden: pt(c)
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
case "escaped": {
|
|
291
|
+
const r = await n.detectOverflow(t, {
|
|
292
|
+
...s,
|
|
293
|
+
altBoundary: !0
|
|
294
|
+
}), c = ht(r, o.floating);
|
|
295
|
+
return {
|
|
296
|
+
data: {
|
|
297
|
+
escapedOffsets: c,
|
|
298
|
+
escaped: pt(c)
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
default:
|
|
303
|
+
return {};
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
}, Tt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
308
|
+
async function xn(e, t) {
|
|
309
|
+
const {
|
|
310
|
+
placement: o,
|
|
311
|
+
platform: n,
|
|
312
|
+
elements: i
|
|
313
|
+
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), r = z(o), c = ae(o), a = X(o) === "y", m = Tt.has(r) ? -1 : 1, l = s && a ? -1 : 1, f = J(t, e);
|
|
314
|
+
let {
|
|
315
|
+
mainAxis: g,
|
|
316
|
+
crossAxis: u,
|
|
317
|
+
alignmentAxis: d
|
|
318
|
+
} = typeof f == "number" ? {
|
|
319
|
+
mainAxis: f,
|
|
320
|
+
crossAxis: 0,
|
|
321
|
+
alignmentAxis: null
|
|
322
|
+
} : {
|
|
323
|
+
mainAxis: f.mainAxis || 0,
|
|
324
|
+
crossAxis: f.crossAxis || 0,
|
|
325
|
+
alignmentAxis: f.alignmentAxis
|
|
326
|
+
};
|
|
327
|
+
return c && typeof d == "number" && (u = c === "end" ? d * -1 : d), a ? {
|
|
328
|
+
x: u * l,
|
|
329
|
+
y: g * m
|
|
330
|
+
} : {
|
|
331
|
+
x: g * m,
|
|
332
|
+
y: u * l
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
const wn = function(e) {
|
|
336
|
+
return e === void 0 && (e = 0), {
|
|
337
|
+
name: "offset",
|
|
338
|
+
options: e,
|
|
339
|
+
async fn(t) {
|
|
340
|
+
var o, n;
|
|
341
|
+
const {
|
|
342
|
+
x: i,
|
|
343
|
+
y: s,
|
|
344
|
+
placement: r,
|
|
345
|
+
middlewareData: c
|
|
346
|
+
} = t, a = await xn(t, e);
|
|
347
|
+
return r === ((o = c.offset) == null ? void 0 : o.placement) && (n = c.arrow) != null && n.alignmentOffset ? {} : {
|
|
348
|
+
x: i + a.x,
|
|
349
|
+
y: s + a.y,
|
|
350
|
+
data: {
|
|
351
|
+
...a,
|
|
352
|
+
placement: r
|
|
353
|
+
}
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
}, yn = function(e) {
|
|
358
|
+
return e === void 0 && (e = {}), {
|
|
359
|
+
name: "shift",
|
|
360
|
+
options: e,
|
|
361
|
+
async fn(t) {
|
|
362
|
+
const {
|
|
363
|
+
x: o,
|
|
364
|
+
y: n,
|
|
365
|
+
placement: i,
|
|
366
|
+
platform: s
|
|
367
|
+
} = t, {
|
|
368
|
+
mainAxis: r = !0,
|
|
369
|
+
crossAxis: c = !1,
|
|
370
|
+
limiter: a = {
|
|
371
|
+
fn: (w) => {
|
|
372
|
+
let {
|
|
373
|
+
x: y,
|
|
374
|
+
y: b
|
|
375
|
+
} = w;
|
|
376
|
+
return {
|
|
377
|
+
x: y,
|
|
378
|
+
y: b
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
...m
|
|
383
|
+
} = J(e, t), l = {
|
|
384
|
+
x: o,
|
|
385
|
+
y: n
|
|
386
|
+
}, f = await s.detectOverflow(t, m), g = X(z(i)), u = Ct(g);
|
|
387
|
+
let d = l[u], h = l[g];
|
|
388
|
+
if (r) {
|
|
389
|
+
const w = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", b = d + f[w], R = d - f[y];
|
|
390
|
+
d = Ie(b, d, R);
|
|
391
|
+
}
|
|
392
|
+
if (c) {
|
|
393
|
+
const w = g === "y" ? "top" : "left", y = g === "y" ? "bottom" : "right", b = h + f[w], R = h - f[y];
|
|
394
|
+
h = Ie(b, h, R);
|
|
395
|
+
}
|
|
396
|
+
const x = a.fn({
|
|
397
|
+
...t,
|
|
398
|
+
[u]: d,
|
|
399
|
+
[g]: h
|
|
400
|
+
});
|
|
401
|
+
return {
|
|
402
|
+
...x,
|
|
403
|
+
data: {
|
|
404
|
+
x: x.x - o,
|
|
405
|
+
y: x.y - n,
|
|
406
|
+
enabled: {
|
|
407
|
+
[u]: r,
|
|
408
|
+
[g]: c
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
}, Rn = function(e) {
|
|
415
|
+
return e === void 0 && (e = {}), {
|
|
416
|
+
options: e,
|
|
417
|
+
fn(t) {
|
|
418
|
+
const {
|
|
419
|
+
x: o,
|
|
420
|
+
y: n,
|
|
421
|
+
placement: i,
|
|
422
|
+
rects: s,
|
|
423
|
+
middlewareData: r
|
|
424
|
+
} = t, {
|
|
425
|
+
offset: c = 0,
|
|
426
|
+
mainAxis: a = !0,
|
|
427
|
+
crossAxis: m = !0
|
|
428
|
+
} = J(e, t), l = {
|
|
429
|
+
x: o,
|
|
430
|
+
y: n
|
|
431
|
+
}, f = X(i), g = Ct(f);
|
|
432
|
+
let u = l[g], d = l[f];
|
|
433
|
+
const h = J(c, t), x = typeof h == "number" ? {
|
|
434
|
+
mainAxis: h,
|
|
435
|
+
crossAxis: 0
|
|
436
|
+
} : {
|
|
437
|
+
mainAxis: 0,
|
|
438
|
+
crossAxis: 0,
|
|
439
|
+
...h
|
|
440
|
+
};
|
|
441
|
+
if (a) {
|
|
442
|
+
const b = g === "y" ? "height" : "width", R = s.reference[g] - s.floating[b] + x.mainAxis, A = s.reference[g] + s.reference[b] - x.mainAxis;
|
|
443
|
+
u < R ? u = R : u > A && (u = A);
|
|
444
|
+
}
|
|
445
|
+
if (m) {
|
|
446
|
+
var w, y;
|
|
447
|
+
const b = g === "y" ? "width" : "height", R = Tt.has(z(i)), A = s.reference[f] - s.floating[b] + (R && ((w = r.offset) == null ? void 0 : w[f]) || 0) + (R ? 0 : x.crossAxis), S = s.reference[f] + s.reference[b] + (R ? 0 : ((y = r.offset) == null ? void 0 : y[f]) || 0) - (R ? x.crossAxis : 0);
|
|
448
|
+
d < A ? d = A : d > S && (d = S);
|
|
449
|
+
}
|
|
450
|
+
return {
|
|
451
|
+
[g]: u,
|
|
452
|
+
[f]: d
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
};
|
|
456
|
+
}, vn = function(e) {
|
|
457
|
+
return e === void 0 && (e = {}), {
|
|
458
|
+
name: "size",
|
|
459
|
+
options: e,
|
|
460
|
+
async fn(t) {
|
|
461
|
+
var o, n;
|
|
462
|
+
const {
|
|
463
|
+
placement: i,
|
|
464
|
+
rects: s,
|
|
465
|
+
platform: r,
|
|
466
|
+
elements: c
|
|
467
|
+
} = t, {
|
|
468
|
+
apply: a = () => {
|
|
469
|
+
},
|
|
470
|
+
...m
|
|
471
|
+
} = J(e, t), l = await r.detectOverflow(t, m), f = z(i), g = ae(i), u = X(i) === "y", {
|
|
472
|
+
width: d,
|
|
473
|
+
height: h
|
|
474
|
+
} = s.floating;
|
|
475
|
+
let x, w;
|
|
476
|
+
f === "top" || f === "bottom" ? (x = f, w = g === (await (r.isRTL == null ? void 0 : r.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (w = f, x = g === "end" ? "top" : "bottom");
|
|
477
|
+
const y = h - l.top - l.bottom, b = d - l.left - l.right, R = me(h - l[x], y), A = me(d - l[w], b), S = !t.middlewareData.shift;
|
|
478
|
+
let v = R, E = A;
|
|
479
|
+
if ((o = t.middlewareData.shift) != null && o.enabled.x && (E = b), (n = t.middlewareData.shift) != null && n.enabled.y && (v = y), S && !g) {
|
|
480
|
+
const L = _(l.left, 0), H = _(l.right, 0), W = _(l.top, 0), D = _(l.bottom, 0);
|
|
481
|
+
u ? E = d - 2 * (L !== 0 || H !== 0 ? L + H : _(l.left, l.right)) : v = h - 2 * (W !== 0 || D !== 0 ? W + D : _(l.top, l.bottom));
|
|
482
|
+
}
|
|
483
|
+
await a({
|
|
484
|
+
...t,
|
|
485
|
+
availableWidth: E,
|
|
486
|
+
availableHeight: v
|
|
487
|
+
});
|
|
488
|
+
const B = await r.getDimensions(c.floating);
|
|
489
|
+
return d !== B.width || h !== B.height ? {
|
|
490
|
+
reset: {
|
|
491
|
+
rects: !0
|
|
492
|
+
}
|
|
493
|
+
} : {};
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
function Lt(e) {
|
|
498
|
+
const t = K(e);
|
|
499
|
+
let o = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
|
|
500
|
+
const i = ne(e), s = i ? e.offsetWidth : o, r = i ? e.offsetHeight : n, c = Oe(o) !== s || Oe(n) !== r;
|
|
501
|
+
return c && (o = s, n = r), {
|
|
502
|
+
width: o,
|
|
503
|
+
height: n,
|
|
504
|
+
$: c
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
function Xe(e) {
|
|
508
|
+
return k(e) ? e : e.contextElement;
|
|
509
|
+
}
|
|
510
|
+
function le(e) {
|
|
511
|
+
const t = Xe(e);
|
|
512
|
+
if (!ne(t))
|
|
513
|
+
return U(1);
|
|
514
|
+
const o = t.getBoundingClientRect(), {
|
|
515
|
+
width: n,
|
|
516
|
+
height: i,
|
|
517
|
+
$: s
|
|
518
|
+
} = Lt(t);
|
|
519
|
+
let r = (s ? Oe(o.width) : o.width) / n, c = (s ? Oe(o.height) : o.height) / i;
|
|
520
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
521
|
+
x: r,
|
|
522
|
+
y: c
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
const bn = /* @__PURE__ */ U(0);
|
|
526
|
+
function Ft(e) {
|
|
527
|
+
const t = Q(e);
|
|
528
|
+
return !Dt() || !t.visualViewport ? bn : {
|
|
529
|
+
x: t.visualViewport.offsetLeft,
|
|
530
|
+
y: t.visualViewport.offsetTop
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
function An(e, t, o) {
|
|
534
|
+
return t === void 0 && (t = !1), !o || t && o !== Q(e) ? !1 : t;
|
|
535
|
+
}
|
|
536
|
+
function te(e, t, o, n) {
|
|
537
|
+
t === void 0 && (t = !1), o === void 0 && (o = !1);
|
|
538
|
+
const i = e.getBoundingClientRect(), s = Xe(e);
|
|
539
|
+
let r = U(1);
|
|
540
|
+
t && (n ? k(n) && (r = le(n)) : r = le(e));
|
|
541
|
+
const c = An(s, o, n) ? Ft(s) : U(0);
|
|
542
|
+
let a = (i.left + c.x) / r.x, m = (i.top + c.y) / r.y, l = i.width / r.x, f = i.height / r.y;
|
|
543
|
+
if (s) {
|
|
544
|
+
const g = Q(s), u = n && k(n) ? Q(n) : n;
|
|
545
|
+
let d = g, h = mt(d);
|
|
546
|
+
for (; h && n && u !== d; ) {
|
|
547
|
+
const x = le(h), w = h.getBoundingClientRect(), y = K(h), b = w.left + (h.clientLeft + parseFloat(y.paddingLeft)) * x.x, R = w.top + (h.clientTop + parseFloat(y.paddingTop)) * x.y;
|
|
548
|
+
a *= x.x, m *= x.y, l *= x.x, f *= x.y, a += b, m += R, d = Q(h), h = mt(d);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
return Ae({
|
|
552
|
+
width: l,
|
|
553
|
+
height: f,
|
|
554
|
+
x: a,
|
|
555
|
+
y: m
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
function Pe(e, t) {
|
|
559
|
+
const o = Ce(e).scrollLeft;
|
|
560
|
+
return t ? t.left + o : te(G(e)).left + o;
|
|
561
|
+
}
|
|
562
|
+
function kt(e, t) {
|
|
563
|
+
const o = e.getBoundingClientRect(), n = o.left + t.scrollLeft - Pe(e, o), i = o.top + t.scrollTop;
|
|
564
|
+
return {
|
|
565
|
+
x: n,
|
|
566
|
+
y: i
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
function On(e) {
|
|
570
|
+
let {
|
|
571
|
+
elements: t,
|
|
572
|
+
rect: o,
|
|
573
|
+
offsetParent: n,
|
|
574
|
+
strategy: i
|
|
575
|
+
} = e;
|
|
576
|
+
const s = i === "fixed", r = G(n), c = t ? ze(t.floating) : !1;
|
|
577
|
+
if (n === r || c && s)
|
|
578
|
+
return o;
|
|
579
|
+
let a = {
|
|
580
|
+
scrollLeft: 0,
|
|
581
|
+
scrollTop: 0
|
|
582
|
+
}, m = U(1);
|
|
583
|
+
const l = U(0), f = ne(n);
|
|
584
|
+
if ((f || !f && !s) && ((Ne(n) !== "body" || Ye(r)) && (a = Ce(n)), f)) {
|
|
585
|
+
const u = te(n);
|
|
586
|
+
m = le(n), l.x = u.x + n.clientLeft, l.y = u.y + n.clientTop;
|
|
587
|
+
}
|
|
588
|
+
const g = r && !f && !s ? kt(r, a) : U(0);
|
|
589
|
+
return {
|
|
590
|
+
width: o.width * m.x,
|
|
591
|
+
height: o.height * m.y,
|
|
592
|
+
x: o.x * m.x - a.scrollLeft * m.x + l.x + g.x,
|
|
593
|
+
y: o.y * m.y - a.scrollTop * m.y + l.y + g.y
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
function Sn(e) {
|
|
597
|
+
return Array.from(e.getClientRects());
|
|
598
|
+
}
|
|
599
|
+
function En(e) {
|
|
600
|
+
const t = G(e), o = Ce(e), n = e.ownerDocument.body, i = _(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), s = _(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
|
|
601
|
+
let r = -o.scrollLeft + Pe(e);
|
|
602
|
+
const c = -o.scrollTop;
|
|
603
|
+
return K(n).direction === "rtl" && (r += _(t.clientWidth, n.clientWidth) - i), {
|
|
604
|
+
width: i,
|
|
605
|
+
height: s,
|
|
606
|
+
x: r,
|
|
607
|
+
y: c
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
const xt = 25;
|
|
611
|
+
function Cn(e, t) {
|
|
612
|
+
const o = Q(e), n = G(e), i = o.visualViewport;
|
|
613
|
+
let s = n.clientWidth, r = n.clientHeight, c = 0, a = 0;
|
|
614
|
+
if (i) {
|
|
615
|
+
s = i.width, r = i.height;
|
|
616
|
+
const l = Dt();
|
|
617
|
+
(!l || l && t === "fixed") && (c = i.offsetLeft, a = i.offsetTop);
|
|
618
|
+
}
|
|
619
|
+
const m = Pe(n);
|
|
620
|
+
if (m <= 0) {
|
|
621
|
+
const l = n.ownerDocument, f = l.body, g = getComputedStyle(f), u = l.compatMode === "CSS1Compat" && parseFloat(g.marginLeft) + parseFloat(g.marginRight) || 0, d = Math.abs(n.clientWidth - f.clientWidth - u);
|
|
622
|
+
d <= xt && (s -= d);
|
|
623
|
+
} else m <= xt && (s += m);
|
|
624
|
+
return {
|
|
625
|
+
width: s,
|
|
626
|
+
height: r,
|
|
627
|
+
x: c,
|
|
628
|
+
y: a
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
function Pn(e, t) {
|
|
632
|
+
const o = te(e, !0, t === "fixed"), n = o.top + e.clientTop, i = o.left + e.clientLeft, s = ne(e) ? le(e) : U(1), r = e.clientWidth * s.x, c = e.clientHeight * s.y, a = i * s.x, m = n * s.y;
|
|
633
|
+
return {
|
|
634
|
+
width: r,
|
|
635
|
+
height: c,
|
|
636
|
+
x: a,
|
|
637
|
+
y: m
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
function wt(e, t, o) {
|
|
641
|
+
let n;
|
|
642
|
+
if (t === "viewport")
|
|
643
|
+
n = Cn(e, o);
|
|
644
|
+
else if (t === "document")
|
|
645
|
+
n = En(G(e));
|
|
646
|
+
else if (k(t))
|
|
647
|
+
n = Pn(t, o);
|
|
648
|
+
else {
|
|
649
|
+
const i = Ft(e);
|
|
650
|
+
n = {
|
|
651
|
+
x: t.x - i.x,
|
|
652
|
+
y: t.y - i.y,
|
|
653
|
+
width: t.width,
|
|
654
|
+
height: t.height
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
return Ae(n);
|
|
658
|
+
}
|
|
659
|
+
function $t(e, t) {
|
|
660
|
+
const o = ge(e);
|
|
661
|
+
return o === t || !k(o) || Se(o) ? !1 : K(o).position === "fixed" || $t(o, t);
|
|
662
|
+
}
|
|
663
|
+
function Dn(e, t) {
|
|
664
|
+
const o = t.get(e);
|
|
665
|
+
if (o)
|
|
666
|
+
return o;
|
|
667
|
+
let n = _e(e, [], !1).filter((c) => k(c) && Ne(c) !== "body"), i = null;
|
|
668
|
+
const s = K(e).position === "fixed";
|
|
669
|
+
let r = s ? ge(e) : e;
|
|
670
|
+
for (; k(r) && !Se(r); ) {
|
|
671
|
+
const c = K(r), a = Mt(r);
|
|
672
|
+
!a && c.position === "fixed" && (i = null), (s ? !a && !i : !a && c.position === "static" && !!i && (i.position === "absolute" || i.position === "fixed") || Ye(r) && !a && $t(e, r)) ? n = n.filter((l) => l !== r) : i = c, r = ge(r);
|
|
673
|
+
}
|
|
674
|
+
return t.set(e, n), n;
|
|
675
|
+
}
|
|
676
|
+
function Mn(e) {
|
|
677
|
+
let {
|
|
678
|
+
element: t,
|
|
679
|
+
boundary: o,
|
|
680
|
+
rootBoundary: n,
|
|
681
|
+
strategy: i
|
|
682
|
+
} = e;
|
|
683
|
+
const r = [...o === "clippingAncestors" ? ze(t) ? [] : Dn(t, this._c) : [].concat(o), n], c = wt(t, r[0], i);
|
|
684
|
+
let a = c.top, m = c.right, l = c.bottom, f = c.left;
|
|
685
|
+
for (let g = 1; g < r.length; g++) {
|
|
686
|
+
const u = wt(t, r[g], i);
|
|
687
|
+
a = _(u.top, a), m = me(u.right, m), l = me(u.bottom, l), f = _(u.left, f);
|
|
688
|
+
}
|
|
689
|
+
return {
|
|
690
|
+
width: m - f,
|
|
691
|
+
height: l - a,
|
|
692
|
+
x: f,
|
|
693
|
+
y: a
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
function Tn(e) {
|
|
697
|
+
const {
|
|
698
|
+
width: t,
|
|
699
|
+
height: o
|
|
700
|
+
} = Lt(e);
|
|
701
|
+
return {
|
|
702
|
+
width: t,
|
|
703
|
+
height: o
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
function Ln(e, t, o) {
|
|
707
|
+
const n = ne(t), i = G(t), s = o === "fixed", r = te(e, !0, s, t);
|
|
708
|
+
let c = {
|
|
709
|
+
scrollLeft: 0,
|
|
710
|
+
scrollTop: 0
|
|
711
|
+
};
|
|
712
|
+
const a = U(0);
|
|
713
|
+
function m() {
|
|
714
|
+
a.x = Pe(i);
|
|
715
|
+
}
|
|
716
|
+
if (n || !n && !s)
|
|
717
|
+
if ((Ne(t) !== "body" || Ye(i)) && (c = Ce(t)), n) {
|
|
718
|
+
const u = te(t, !0, s, t);
|
|
719
|
+
a.x = u.x + t.clientLeft, a.y = u.y + t.clientTop;
|
|
720
|
+
} else i && m();
|
|
721
|
+
s && !n && i && m();
|
|
722
|
+
const l = i && !n && !s ? kt(i, c) : U(0), f = r.left + c.scrollLeft - a.x - l.x, g = r.top + c.scrollTop - a.y - l.y;
|
|
723
|
+
return {
|
|
724
|
+
x: f,
|
|
725
|
+
y: g,
|
|
726
|
+
width: r.width,
|
|
727
|
+
height: r.height
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
function Be(e) {
|
|
731
|
+
return K(e).position === "static";
|
|
732
|
+
}
|
|
733
|
+
function yt(e, t) {
|
|
734
|
+
if (!ne(e) || K(e).position === "fixed")
|
|
735
|
+
return null;
|
|
736
|
+
if (t)
|
|
737
|
+
return t(e);
|
|
738
|
+
let o = e.offsetParent;
|
|
739
|
+
return G(e) === o && (o = o.ownerDocument.body), o;
|
|
740
|
+
}
|
|
741
|
+
function Ht(e, t) {
|
|
742
|
+
const o = Q(e);
|
|
743
|
+
if (ze(e))
|
|
744
|
+
return o;
|
|
745
|
+
if (!ne(e)) {
|
|
746
|
+
let i = ge(e);
|
|
747
|
+
for (; i && !Se(i); ) {
|
|
748
|
+
if (k(i) && !Be(i))
|
|
749
|
+
return i;
|
|
750
|
+
i = ge(i);
|
|
751
|
+
}
|
|
752
|
+
return o;
|
|
753
|
+
}
|
|
754
|
+
let n = yt(e, t);
|
|
755
|
+
for (; n && en(n) && Be(n); )
|
|
756
|
+
n = yt(n, t);
|
|
757
|
+
return n && Se(n) && Be(n) && !Mt(n) ? o : n || tn(e) || o;
|
|
758
|
+
}
|
|
759
|
+
const Fn = async function(e) {
|
|
760
|
+
const t = this.getOffsetParent || Ht, o = this.getDimensions, n = await o(e.floating);
|
|
761
|
+
return {
|
|
762
|
+
reference: Ln(e.reference, await t(e.floating), e.strategy),
|
|
763
|
+
floating: {
|
|
764
|
+
x: 0,
|
|
765
|
+
y: 0,
|
|
766
|
+
width: n.width,
|
|
767
|
+
height: n.height
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
function kn(e) {
|
|
772
|
+
return K(e).direction === "rtl";
|
|
773
|
+
}
|
|
774
|
+
const $n = {
|
|
775
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: On,
|
|
776
|
+
getDocumentElement: G,
|
|
777
|
+
getClippingRect: Mn,
|
|
778
|
+
getOffsetParent: Ht,
|
|
779
|
+
getElementRects: Fn,
|
|
780
|
+
getClientRects: Sn,
|
|
781
|
+
getDimensions: Tn,
|
|
782
|
+
getScale: le,
|
|
783
|
+
isElement: k,
|
|
784
|
+
isRTL: kn
|
|
785
|
+
};
|
|
786
|
+
function Wt(e, t) {
|
|
787
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
788
|
+
}
|
|
789
|
+
function Hn(e, t) {
|
|
790
|
+
let o = null, n;
|
|
791
|
+
const i = G(e);
|
|
792
|
+
function s() {
|
|
793
|
+
var c;
|
|
794
|
+
clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
|
|
795
|
+
}
|
|
796
|
+
function r(c, a) {
|
|
797
|
+
c === void 0 && (c = !1), a === void 0 && (a = 1), s();
|
|
798
|
+
const m = e.getBoundingClientRect(), {
|
|
799
|
+
left: l,
|
|
800
|
+
top: f,
|
|
801
|
+
width: g,
|
|
802
|
+
height: u
|
|
803
|
+
} = m;
|
|
804
|
+
if (c || t(), !g || !u)
|
|
805
|
+
return;
|
|
806
|
+
const d = Re(f), h = Re(i.clientWidth - (l + g)), x = Re(i.clientHeight - (f + u)), w = Re(l), b = {
|
|
807
|
+
rootMargin: -d + "px " + -h + "px " + -x + "px " + -w + "px",
|
|
808
|
+
threshold: _(0, me(1, a)) || 1
|
|
809
|
+
};
|
|
810
|
+
let R = !0;
|
|
811
|
+
function A(S) {
|
|
812
|
+
const v = S[0].intersectionRatio;
|
|
813
|
+
if (v !== a) {
|
|
814
|
+
if (!R)
|
|
815
|
+
return r();
|
|
816
|
+
v ? r(!1, v) : n = setTimeout(() => {
|
|
817
|
+
r(!1, 1e-7);
|
|
818
|
+
}, 1e3);
|
|
819
|
+
}
|
|
820
|
+
v === 1 && !Wt(m, e.getBoundingClientRect()) && r(), R = !1;
|
|
821
|
+
}
|
|
822
|
+
try {
|
|
823
|
+
o = new IntersectionObserver(A, {
|
|
824
|
+
...b,
|
|
825
|
+
// Handle <iframe>s
|
|
826
|
+
root: i.ownerDocument
|
|
827
|
+
});
|
|
828
|
+
} catch {
|
|
829
|
+
o = new IntersectionObserver(A, b);
|
|
830
|
+
}
|
|
831
|
+
o.observe(e);
|
|
832
|
+
}
|
|
833
|
+
return r(!0), s;
|
|
834
|
+
}
|
|
835
|
+
function Rt(e, t, o, n) {
|
|
836
|
+
n === void 0 && (n = {});
|
|
837
|
+
const {
|
|
838
|
+
ancestorScroll: i = !0,
|
|
839
|
+
ancestorResize: s = !0,
|
|
840
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
841
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
842
|
+
animationFrame: a = !1
|
|
843
|
+
} = n, m = Xe(e), l = i || s ? [...m ? _e(m) : [], ...t ? _e(t) : []] : [];
|
|
844
|
+
l.forEach((w) => {
|
|
845
|
+
i && w.addEventListener("scroll", o, {
|
|
846
|
+
passive: !0
|
|
847
|
+
}), s && w.addEventListener("resize", o);
|
|
848
|
+
});
|
|
849
|
+
const f = m && c ? Hn(m, o) : null;
|
|
850
|
+
let g = -1, u = null;
|
|
851
|
+
r && (u = new ResizeObserver((w) => {
|
|
852
|
+
let [y] = w;
|
|
853
|
+
y && y.target === m && u && t && (u.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
854
|
+
var b;
|
|
855
|
+
(b = u) == null || b.observe(t);
|
|
856
|
+
})), o();
|
|
857
|
+
}), m && !a && u.observe(m), t && u.observe(t));
|
|
858
|
+
let d, h = a ? te(e) : null;
|
|
859
|
+
a && x();
|
|
860
|
+
function x() {
|
|
861
|
+
const w = te(e);
|
|
862
|
+
h && !Wt(h, w) && o(), h = w, d = requestAnimationFrame(x);
|
|
863
|
+
}
|
|
864
|
+
return o(), () => {
|
|
865
|
+
var w;
|
|
866
|
+
l.forEach((y) => {
|
|
867
|
+
i && y.removeEventListener("scroll", o), s && y.removeEventListener("resize", o);
|
|
868
|
+
}), f?.(), (w = u) == null || w.disconnect(), u = null, a && cancelAnimationFrame(d);
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
const Wn = wn, Bn = yn, Vn = hn, In = vn, _n = pn, zn = Rn, Nn = (e, t, o) => {
|
|
872
|
+
const n = /* @__PURE__ */ new Map(), i = {
|
|
873
|
+
platform: $n,
|
|
874
|
+
...o
|
|
875
|
+
}, s = {
|
|
876
|
+
...i.platform,
|
|
877
|
+
_c: n
|
|
878
|
+
};
|
|
879
|
+
return gn(e, t, {
|
|
880
|
+
...i,
|
|
881
|
+
platform: s
|
|
882
|
+
});
|
|
883
|
+
};
|
|
884
|
+
var Yn = typeof document < "u", Xn = function() {
|
|
885
|
+
}, ve = Yn ? jt : Xn;
|
|
886
|
+
function Ee(e, t) {
|
|
887
|
+
if (e === t)
|
|
888
|
+
return !0;
|
|
889
|
+
if (typeof e != typeof t)
|
|
890
|
+
return !1;
|
|
891
|
+
if (typeof e == "function" && e.toString() === t.toString())
|
|
892
|
+
return !0;
|
|
893
|
+
let o, n, i;
|
|
894
|
+
if (e && t && typeof e == "object") {
|
|
895
|
+
if (Array.isArray(e)) {
|
|
896
|
+
if (o = e.length, o !== t.length) return !1;
|
|
897
|
+
for (n = o; n-- !== 0; )
|
|
898
|
+
if (!Ee(e[n], t[n]))
|
|
899
|
+
return !1;
|
|
900
|
+
return !0;
|
|
901
|
+
}
|
|
902
|
+
if (i = Object.keys(e), o = i.length, o !== Object.keys(t).length)
|
|
903
|
+
return !1;
|
|
904
|
+
for (n = o; n-- !== 0; )
|
|
905
|
+
if (!{}.hasOwnProperty.call(t, i[n]))
|
|
906
|
+
return !1;
|
|
907
|
+
for (n = o; n-- !== 0; ) {
|
|
908
|
+
const s = i[n];
|
|
909
|
+
if (!(s === "_owner" && e.$$typeof) && !Ee(e[s], t[s]))
|
|
910
|
+
return !1;
|
|
911
|
+
}
|
|
912
|
+
return !0;
|
|
913
|
+
}
|
|
914
|
+
return e !== e && t !== t;
|
|
915
|
+
}
|
|
916
|
+
function Bt(e) {
|
|
917
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
918
|
+
}
|
|
919
|
+
function vt(e, t) {
|
|
920
|
+
const o = Bt(e);
|
|
921
|
+
return Math.round(t * o) / o;
|
|
922
|
+
}
|
|
923
|
+
function Ve(e) {
|
|
924
|
+
const t = O.useRef(e);
|
|
925
|
+
return ve(() => {
|
|
926
|
+
t.current = e;
|
|
927
|
+
}), t;
|
|
928
|
+
}
|
|
929
|
+
function jn(e) {
|
|
930
|
+
e === void 0 && (e = {});
|
|
931
|
+
const {
|
|
932
|
+
placement: t = "bottom",
|
|
933
|
+
strategy: o = "absolute",
|
|
934
|
+
middleware: n = [],
|
|
935
|
+
platform: i,
|
|
936
|
+
elements: {
|
|
937
|
+
reference: s,
|
|
938
|
+
floating: r
|
|
939
|
+
} = {},
|
|
940
|
+
transform: c = !0,
|
|
941
|
+
whileElementsMounted: a,
|
|
942
|
+
open: m
|
|
943
|
+
} = e, [l, f] = O.useState({
|
|
944
|
+
x: 0,
|
|
945
|
+
y: 0,
|
|
946
|
+
strategy: o,
|
|
947
|
+
placement: t,
|
|
948
|
+
middlewareData: {},
|
|
949
|
+
isPositioned: !1
|
|
950
|
+
}), [g, u] = O.useState(n);
|
|
951
|
+
Ee(g, n) || u(n);
|
|
952
|
+
const [d, h] = O.useState(null), [x, w] = O.useState(null), y = O.useCallback((p) => {
|
|
953
|
+
p !== S.current && (S.current = p, h(p));
|
|
954
|
+
}, []), b = O.useCallback((p) => {
|
|
955
|
+
p !== v.current && (v.current = p, w(p));
|
|
956
|
+
}, []), R = s || d, A = r || x, S = O.useRef(null), v = O.useRef(null), E = O.useRef(l), B = a != null, L = Ve(a), H = Ve(i), W = Ve(m), D = O.useCallback(() => {
|
|
957
|
+
if (!S.current || !v.current)
|
|
958
|
+
return;
|
|
959
|
+
const p = {
|
|
960
|
+
placement: t,
|
|
961
|
+
strategy: o,
|
|
962
|
+
middleware: g
|
|
963
|
+
};
|
|
964
|
+
H.current && (p.platform = H.current), Nn(S.current, v.current, p).then((P) => {
|
|
965
|
+
const N = {
|
|
966
|
+
...P,
|
|
967
|
+
// The floating element's position may be recomputed while it's closed
|
|
968
|
+
// but still mounted (such as when transitioning out). To ensure
|
|
969
|
+
// `isPositioned` will be `false` initially on the next open, avoid
|
|
970
|
+
// setting it to `true` when `open === false` (must be specified).
|
|
971
|
+
isPositioned: W.current !== !1
|
|
972
|
+
};
|
|
973
|
+
$.current && !Ee(E.current, N) && (E.current = N, nn.flushSync(() => {
|
|
974
|
+
f(N);
|
|
975
|
+
}));
|
|
976
|
+
});
|
|
977
|
+
}, [g, t, o, H, W]);
|
|
978
|
+
ve(() => {
|
|
979
|
+
m === !1 && E.current.isPositioned && (E.current.isPositioned = !1, f((p) => ({
|
|
980
|
+
...p,
|
|
981
|
+
isPositioned: !1
|
|
982
|
+
})));
|
|
983
|
+
}, [m]);
|
|
984
|
+
const $ = O.useRef(!1);
|
|
985
|
+
ve(() => ($.current = !0, () => {
|
|
986
|
+
$.current = !1;
|
|
987
|
+
}), []), ve(() => {
|
|
988
|
+
if (R && (S.current = R), A && (v.current = A), R && A) {
|
|
989
|
+
if (L.current)
|
|
990
|
+
return L.current(R, A, D);
|
|
991
|
+
D();
|
|
992
|
+
}
|
|
993
|
+
}, [R, A, D, L, B]);
|
|
994
|
+
const M = O.useMemo(() => ({
|
|
995
|
+
reference: S,
|
|
996
|
+
floating: v,
|
|
997
|
+
setReference: y,
|
|
998
|
+
setFloating: b
|
|
999
|
+
}), [y, b]), T = O.useMemo(() => ({
|
|
1000
|
+
reference: R,
|
|
1001
|
+
floating: A
|
|
1002
|
+
}), [R, A]), F = O.useMemo(() => {
|
|
1003
|
+
const p = {
|
|
1004
|
+
position: o,
|
|
1005
|
+
left: 0,
|
|
1006
|
+
top: 0
|
|
1007
|
+
};
|
|
1008
|
+
if (!T.floating)
|
|
1009
|
+
return p;
|
|
1010
|
+
const P = vt(T.floating, l.x), N = vt(T.floating, l.y);
|
|
1011
|
+
return c ? {
|
|
1012
|
+
...p,
|
|
1013
|
+
transform: "translate(" + P + "px, " + N + "px)",
|
|
1014
|
+
...Bt(T.floating) >= 1.5 && {
|
|
1015
|
+
willChange: "transform"
|
|
1016
|
+
}
|
|
1017
|
+
} : {
|
|
1018
|
+
position: o,
|
|
1019
|
+
left: P,
|
|
1020
|
+
top: N
|
|
1021
|
+
};
|
|
1022
|
+
}, [o, c, T.floating, l.x, l.y]);
|
|
1023
|
+
return O.useMemo(() => ({
|
|
1024
|
+
...l,
|
|
1025
|
+
update: D,
|
|
1026
|
+
refs: M,
|
|
1027
|
+
elements: T,
|
|
1028
|
+
floatingStyles: F
|
|
1029
|
+
}), [l, D, M, T, F]);
|
|
1030
|
+
}
|
|
1031
|
+
const Un = (e, t) => {
|
|
1032
|
+
const o = Wn(e);
|
|
1033
|
+
return {
|
|
1034
|
+
name: o.name,
|
|
1035
|
+
fn: o.fn,
|
|
1036
|
+
options: [e, t]
|
|
1037
|
+
};
|
|
1038
|
+
}, qn = (e, t) => {
|
|
1039
|
+
const o = Bn(e);
|
|
1040
|
+
return {
|
|
1041
|
+
name: o.name,
|
|
1042
|
+
fn: o.fn,
|
|
1043
|
+
options: [e, t]
|
|
1044
|
+
};
|
|
1045
|
+
}, Jn = (e, t) => ({
|
|
1046
|
+
fn: zn(e).fn,
|
|
1047
|
+
options: [e, t]
|
|
1048
|
+
}), Kn = (e, t) => {
|
|
1049
|
+
const o = Vn(e);
|
|
1050
|
+
return {
|
|
1051
|
+
name: o.name,
|
|
1052
|
+
fn: o.fn,
|
|
1053
|
+
options: [e, t]
|
|
1054
|
+
};
|
|
1055
|
+
}, Gn = (e, t) => {
|
|
1056
|
+
const o = In(e);
|
|
1057
|
+
return {
|
|
1058
|
+
name: o.name,
|
|
1059
|
+
fn: o.fn,
|
|
1060
|
+
options: [e, t]
|
|
1061
|
+
};
|
|
1062
|
+
}, Qn = (e, t) => {
|
|
1063
|
+
const o = _n(e);
|
|
1064
|
+
return {
|
|
1065
|
+
name: o.name,
|
|
1066
|
+
fn: o.fn,
|
|
1067
|
+
options: [e, t]
|
|
1068
|
+
};
|
|
1069
|
+
};
|
|
1070
|
+
function Zn(e) {
|
|
1071
|
+
const {
|
|
1072
|
+
open: t = !1,
|
|
1073
|
+
onOpenChange: o,
|
|
1074
|
+
elements: n = {}
|
|
1075
|
+
} = e, i = an(), s = on() != null;
|
|
1076
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1077
|
+
const c = n.reference;
|
|
1078
|
+
c && !k(c) && console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
|
|
1079
|
+
}
|
|
1080
|
+
const r = fn(() => new sn({
|
|
1081
|
+
open: t,
|
|
1082
|
+
onOpenChange: o,
|
|
1083
|
+
referenceElement: n.reference ?? null,
|
|
1084
|
+
floatingElement: n.floating ?? null,
|
|
1085
|
+
triggerElements: new rn(),
|
|
1086
|
+
floatingId: i,
|
|
1087
|
+
nested: s,
|
|
1088
|
+
noEmit: !1
|
|
1089
|
+
})).current;
|
|
1090
|
+
return ce(() => {
|
|
1091
|
+
const c = {
|
|
1092
|
+
open: t,
|
|
1093
|
+
floatingId: i
|
|
1094
|
+
};
|
|
1095
|
+
n.reference !== void 0 && (c.referenceElement = n.reference, c.domReferenceElement = k(n.reference) ? n.reference : null), n.floating !== void 0 && (c.floatingElement = n.floating), r.update(c);
|
|
1096
|
+
}, [t, i, n.reference, n.floating, r]), r.context.onOpenChange = o, r.context.nested = s, r.context.noEmit = !1, r;
|
|
1097
|
+
}
|
|
1098
|
+
function eo(e = {}) {
|
|
1099
|
+
const {
|
|
1100
|
+
nodeId: t,
|
|
1101
|
+
externalTree: o
|
|
1102
|
+
} = e, n = Zn(e), i = e.rootContext || n, s = {
|
|
1103
|
+
reference: i.useState("referenceElement"),
|
|
1104
|
+
floating: i.useState("floatingElement"),
|
|
1105
|
+
domReference: i.useState("domReferenceElement")
|
|
1106
|
+
}, [r, c] = O.useState(null), a = O.useRef(null), m = cn(o);
|
|
1107
|
+
ce(() => {
|
|
1108
|
+
s.domReference && (a.current = s.domReference);
|
|
1109
|
+
}, [s.domReference]);
|
|
1110
|
+
const l = jn({
|
|
1111
|
+
...e,
|
|
1112
|
+
elements: {
|
|
1113
|
+
...s,
|
|
1114
|
+
...r && {
|
|
1115
|
+
reference: r
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
}), f = O.useCallback((v) => {
|
|
1119
|
+
const E = k(v) ? {
|
|
1120
|
+
getBoundingClientRect: () => v.getBoundingClientRect(),
|
|
1121
|
+
getClientRects: () => v.getClientRects(),
|
|
1122
|
+
contextElement: v
|
|
1123
|
+
} : v;
|
|
1124
|
+
c(E), l.refs.setReference(E);
|
|
1125
|
+
}, [l.refs]), [g, u] = O.useState(null), [d, h] = O.useState(null);
|
|
1126
|
+
i.useSyncedValue("referenceElement", g), i.useSyncedValue("domReferenceElement", k(g) ? g : null), i.useSyncedValue("floatingElement", d);
|
|
1127
|
+
const x = O.useCallback((v) => {
|
|
1128
|
+
(k(v) || v === null) && (a.current = v, u(v)), (k(l.refs.reference.current) || l.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
|
|
1129
|
+
// `null` to support `positionReference` + an unstable `reference`
|
|
1130
|
+
// callback ref.
|
|
1131
|
+
v !== null && !k(v)) && l.refs.setReference(v);
|
|
1132
|
+
}, [l.refs, u]), w = O.useCallback((v) => {
|
|
1133
|
+
h(v), l.refs.setFloating(v);
|
|
1134
|
+
}, [l.refs]), y = O.useMemo(() => ({
|
|
1135
|
+
...l.refs,
|
|
1136
|
+
setReference: x,
|
|
1137
|
+
setFloating: w,
|
|
1138
|
+
setPositionReference: f,
|
|
1139
|
+
domReference: a
|
|
1140
|
+
}), [l.refs, x, w, f]), b = O.useMemo(() => ({
|
|
1141
|
+
...l.elements,
|
|
1142
|
+
domReference: s.domReference
|
|
1143
|
+
}), [l.elements, s.domReference]), R = i.useState("open"), A = i.useState("floatingId"), S = O.useMemo(() => ({
|
|
1144
|
+
...l,
|
|
1145
|
+
dataRef: i.context.dataRef,
|
|
1146
|
+
open: R,
|
|
1147
|
+
onOpenChange: i.setOpen,
|
|
1148
|
+
events: i.context.events,
|
|
1149
|
+
floatingId: A,
|
|
1150
|
+
refs: y,
|
|
1151
|
+
elements: b,
|
|
1152
|
+
nodeId: t,
|
|
1153
|
+
rootStore: i
|
|
1154
|
+
}), [l, y, b, t, i, R, A]);
|
|
1155
|
+
return ce(() => {
|
|
1156
|
+
i.context.dataRef.current.floatingContext = S;
|
|
1157
|
+
const v = m?.nodesRef.current.find((E) => E.id === t);
|
|
1158
|
+
v && (v.context = S);
|
|
1159
|
+
}), O.useMemo(() => ({
|
|
1160
|
+
...l,
|
|
1161
|
+
context: S,
|
|
1162
|
+
refs: y,
|
|
1163
|
+
elements: b,
|
|
1164
|
+
rootStore: i
|
|
1165
|
+
}), [l, y, b, S, i]);
|
|
1166
|
+
}
|
|
1167
|
+
const to = (e) => ({
|
|
1168
|
+
name: "arrow",
|
|
1169
|
+
options: e,
|
|
1170
|
+
async fn(t) {
|
|
1171
|
+
const {
|
|
1172
|
+
x: o,
|
|
1173
|
+
y: n,
|
|
1174
|
+
placement: i,
|
|
1175
|
+
rects: s,
|
|
1176
|
+
platform: r,
|
|
1177
|
+
elements: c,
|
|
1178
|
+
middlewareData: a
|
|
1179
|
+
} = t, {
|
|
1180
|
+
element: m,
|
|
1181
|
+
padding: l = 0,
|
|
1182
|
+
offsetParent: f = "real"
|
|
1183
|
+
} = J(e, t) || {};
|
|
1184
|
+
if (m == null)
|
|
1185
|
+
return {};
|
|
1186
|
+
const g = St(l), u = {
|
|
1187
|
+
x: o,
|
|
1188
|
+
y: n
|
|
1189
|
+
}, d = Ot(i), h = Et(d), x = await r.getDimensions(m), w = d === "y", y = w ? "top" : "left", b = w ? "bottom" : "right", R = w ? "clientHeight" : "clientWidth", A = s.reference[h] + s.reference[d] - u[d] - s.floating[h], S = u[d] - s.reference[d], v = f === "real" ? await r.getOffsetParent?.(m) : c.floating;
|
|
1190
|
+
let E = c.floating[R] || s.floating[h];
|
|
1191
|
+
(!E || !await r.isElement?.(v)) && (E = c.floating[R] || s.floating[h]);
|
|
1192
|
+
const B = A / 2 - S / 2, L = E / 2 - x[h] / 2 - 1, H = Math.min(g[y], L), W = Math.min(g[b], L), D = H, $ = E - x[h] - W, M = E / 2 - x[h] / 2 + B, T = Ie(D, M, $), F = !a.arrow && ae(i) != null && M !== T && s.reference[h] / 2 - (M < D ? H : W) - x[h] / 2 < 0, p = F ? M < D ? M - D : M - $ : 0;
|
|
1193
|
+
return {
|
|
1194
|
+
[d]: u[d] + p,
|
|
1195
|
+
data: {
|
|
1196
|
+
[d]: T,
|
|
1197
|
+
centerOffset: M - T - p,
|
|
1198
|
+
...F && {
|
|
1199
|
+
alignmentOffset: p
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
reset: F
|
|
1203
|
+
};
|
|
1204
|
+
}
|
|
1205
|
+
}), no = (e, t) => ({
|
|
1206
|
+
...to(e),
|
|
1207
|
+
options: [e, t]
|
|
1208
|
+
}), oo = {
|
|
1209
|
+
name: "hide",
|
|
1210
|
+
async fn(e) {
|
|
1211
|
+
const {
|
|
1212
|
+
width: t,
|
|
1213
|
+
height: o,
|
|
1214
|
+
x: n,
|
|
1215
|
+
y: i
|
|
1216
|
+
} = e.rects.reference, s = t === 0 && o === 0 && n === 0 && i === 0;
|
|
1217
|
+
return {
|
|
1218
|
+
data: {
|
|
1219
|
+
referenceHidden: (await Qn().fn(e)).data?.referenceHidden || s
|
|
1220
|
+
}
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
}, be = {
|
|
1224
|
+
sideX: "left",
|
|
1225
|
+
sideY: "top"
|
|
1226
|
+
}, wo = {
|
|
1227
|
+
name: "adaptiveOrigin",
|
|
1228
|
+
async fn(e) {
|
|
1229
|
+
const {
|
|
1230
|
+
x: t,
|
|
1231
|
+
y: o,
|
|
1232
|
+
rects: {
|
|
1233
|
+
floating: n
|
|
1234
|
+
},
|
|
1235
|
+
elements: {
|
|
1236
|
+
floating: i
|
|
1237
|
+
},
|
|
1238
|
+
platform: s,
|
|
1239
|
+
strategy: r,
|
|
1240
|
+
placement: c
|
|
1241
|
+
} = e, a = Q(i), m = a.getComputedStyle(i);
|
|
1242
|
+
if (!(m.transitionDuration !== "0s" && m.transitionDuration !== ""))
|
|
1243
|
+
return {
|
|
1244
|
+
x: t,
|
|
1245
|
+
y: o,
|
|
1246
|
+
data: be
|
|
1247
|
+
};
|
|
1248
|
+
const f = await s.getOffsetParent?.(i);
|
|
1249
|
+
let g = {
|
|
1250
|
+
width: 0,
|
|
1251
|
+
height: 0
|
|
1252
|
+
};
|
|
1253
|
+
if (r === "fixed" && a?.visualViewport)
|
|
1254
|
+
g = {
|
|
1255
|
+
width: a.visualViewport.width,
|
|
1256
|
+
height: a.visualViewport.height
|
|
1257
|
+
};
|
|
1258
|
+
else if (f === a) {
|
|
1259
|
+
const y = Pt(i);
|
|
1260
|
+
g = {
|
|
1261
|
+
width: y.documentElement.clientWidth,
|
|
1262
|
+
height: y.documentElement.clientHeight
|
|
1263
|
+
};
|
|
1264
|
+
} else await s.isElement?.(f) && (g = await s.getDimensions(f));
|
|
1265
|
+
const u = z(c);
|
|
1266
|
+
let d = t, h = o;
|
|
1267
|
+
u === "left" && (d = g.width - (t + n.width)), u === "top" && (h = g.height - (o + n.height));
|
|
1268
|
+
const x = u === "left" ? "right" : be.sideX, w = u === "top" ? "bottom" : be.sideY;
|
|
1269
|
+
return {
|
|
1270
|
+
x: d,
|
|
1271
|
+
y: h,
|
|
1272
|
+
data: {
|
|
1273
|
+
sideX: x,
|
|
1274
|
+
sideY: w
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1279
|
+
function Vt(e, t, o) {
|
|
1280
|
+
const n = e === "inline-start" || e === "inline-end";
|
|
1281
|
+
return {
|
|
1282
|
+
top: "top",
|
|
1283
|
+
right: n ? o ? "inline-start" : "inline-end" : "right",
|
|
1284
|
+
bottom: "bottom",
|
|
1285
|
+
left: n ? o ? "inline-end" : "inline-start" : "left"
|
|
1286
|
+
}[t];
|
|
1287
|
+
}
|
|
1288
|
+
function bt(e, t, o) {
|
|
1289
|
+
const {
|
|
1290
|
+
rects: n,
|
|
1291
|
+
placement: i
|
|
1292
|
+
} = e;
|
|
1293
|
+
return {
|
|
1294
|
+
side: Vt(t, z(i), o),
|
|
1295
|
+
align: ae(i) || "center",
|
|
1296
|
+
anchor: {
|
|
1297
|
+
width: n.reference.width,
|
|
1298
|
+
height: n.reference.height
|
|
1299
|
+
},
|
|
1300
|
+
positioner: {
|
|
1301
|
+
width: n.floating.width,
|
|
1302
|
+
height: n.floating.height
|
|
1303
|
+
}
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
function yo(e) {
|
|
1307
|
+
const {
|
|
1308
|
+
// Public parameters
|
|
1309
|
+
anchor: t,
|
|
1310
|
+
positionMethod: o = "absolute",
|
|
1311
|
+
side: n = "bottom",
|
|
1312
|
+
sideOffset: i = 0,
|
|
1313
|
+
align: s = "center",
|
|
1314
|
+
alignOffset: r = 0,
|
|
1315
|
+
collisionBoundary: c,
|
|
1316
|
+
collisionPadding: a = 5,
|
|
1317
|
+
sticky: m = !1,
|
|
1318
|
+
arrowPadding: l = 5,
|
|
1319
|
+
disableAnchorTracking: f = !1,
|
|
1320
|
+
// Private parameters
|
|
1321
|
+
keepMounted: g = !1,
|
|
1322
|
+
floatingRootContext: u,
|
|
1323
|
+
mounted: d,
|
|
1324
|
+
collisionAvoidance: h,
|
|
1325
|
+
shiftCrossAxis: x = !1,
|
|
1326
|
+
nodeId: w,
|
|
1327
|
+
adaptiveOrigin: y,
|
|
1328
|
+
lazyFlip: b = !1,
|
|
1329
|
+
externalTree: R
|
|
1330
|
+
} = e, [A, S] = O.useState(null);
|
|
1331
|
+
!d && A !== null && S(null);
|
|
1332
|
+
const v = h.side || "flip", E = h.align || "flip", B = h.fallbackAxisSide || "end", L = typeof t == "function" ? t : void 0, H = Qt(L), W = L ? H : t, D = We(t), M = Zt() === "rtl", T = A || {
|
|
1333
|
+
top: "top",
|
|
1334
|
+
right: "right",
|
|
1335
|
+
bottom: "bottom",
|
|
1336
|
+
left: "left",
|
|
1337
|
+
"inline-end": M ? "left" : "right",
|
|
1338
|
+
"inline-start": M ? "right" : "left"
|
|
1339
|
+
}[n], F = s === "center" ? T : `${T}-${s}`;
|
|
1340
|
+
let p = a;
|
|
1341
|
+
const P = 1, N = n === "bottom" ? P : 0, je = n === "top" ? P : 0, Ue = n === "right" ? P : 0, qe = n === "left" ? P : 0;
|
|
1342
|
+
typeof p == "number" ? p = {
|
|
1343
|
+
top: p + N,
|
|
1344
|
+
right: p + qe,
|
|
1345
|
+
bottom: p + je,
|
|
1346
|
+
left: p + Ue
|
|
1347
|
+
} : p && (p = {
|
|
1348
|
+
top: (p.top || 0) + N,
|
|
1349
|
+
right: (p.right || 0) + qe,
|
|
1350
|
+
bottom: (p.bottom || 0) + je,
|
|
1351
|
+
left: (p.left || 0) + Ue
|
|
1352
|
+
});
|
|
1353
|
+
const he = {
|
|
1354
|
+
boundary: c === "clipping-ancestors" ? "clippingAncestors" : c,
|
|
1355
|
+
padding: p
|
|
1356
|
+
}, oe = O.useRef(null), De = We(i), Me = We(r), pe = [Un((C) => {
|
|
1357
|
+
const V = bt(C, n, M), j = typeof De.current == "function" ? De.current(V) : De.current, I = typeof Me.current == "function" ? Me.current(V) : Me.current;
|
|
1358
|
+
return {
|
|
1359
|
+
mainAxis: j,
|
|
1360
|
+
crossAxis: I,
|
|
1361
|
+
alignmentAxis: I
|
|
1362
|
+
};
|
|
1363
|
+
}, [typeof i != "function" ? i : 0, typeof r != "function" ? r : 0, M, n])], Je = E === "none" && v !== "shift", Ke = !Je && (m || x || v === "shift"), Ge = v === "none" ? null : Kn({
|
|
1364
|
+
...he,
|
|
1365
|
+
// Ensure the popup flips if it's been limited by its --available-height and it resizes.
|
|
1366
|
+
// Since the size() padding is smaller than the flip() padding, flip() will take precedence.
|
|
1367
|
+
padding: {
|
|
1368
|
+
top: p.top + P,
|
|
1369
|
+
right: p.right + P,
|
|
1370
|
+
bottom: p.bottom + P,
|
|
1371
|
+
left: p.left + P
|
|
1372
|
+
},
|
|
1373
|
+
mainAxis: !x && v === "flip",
|
|
1374
|
+
crossAxis: E === "flip" ? "alignment" : !1,
|
|
1375
|
+
fallbackAxisSideDirection: B
|
|
1376
|
+
}), Qe = Je ? null : qn((C) => {
|
|
1377
|
+
const V = Pt(C.elements.floating).documentElement;
|
|
1378
|
+
return {
|
|
1379
|
+
...he,
|
|
1380
|
+
// Use the Layout Viewport to avoid shifting around when pinch-zooming
|
|
1381
|
+
// for context menus.
|
|
1382
|
+
rootBoundary: x ? {
|
|
1383
|
+
x: 0,
|
|
1384
|
+
y: 0,
|
|
1385
|
+
width: V.clientWidth,
|
|
1386
|
+
height: V.clientHeight
|
|
1387
|
+
} : void 0,
|
|
1388
|
+
mainAxis: E !== "none",
|
|
1389
|
+
crossAxis: Ke,
|
|
1390
|
+
limiter: m || x ? void 0 : Jn((j) => {
|
|
1391
|
+
if (!oe.current)
|
|
1392
|
+
return {};
|
|
1393
|
+
const {
|
|
1394
|
+
width: I,
|
|
1395
|
+
height: q
|
|
1396
|
+
} = oe.current.getBoundingClientRect(), Y = X(z(j.placement)), ee = Y === "y" ? I : q, re = Y === "y" ? p.left + p.right : p.top + p.bottom;
|
|
1397
|
+
return {
|
|
1398
|
+
offset: ee / 2 + re / 2
|
|
1399
|
+
};
|
|
1400
|
+
})
|
|
1401
|
+
};
|
|
1402
|
+
}, [he, m, x, p, E]);
|
|
1403
|
+
v === "shift" || E === "shift" || s === "center" ? pe.push(Qe, Ge) : pe.push(Ge, Qe), pe.push(Gn({
|
|
1404
|
+
...he,
|
|
1405
|
+
apply({
|
|
1406
|
+
elements: {
|
|
1407
|
+
floating: C
|
|
1408
|
+
},
|
|
1409
|
+
availableWidth: V,
|
|
1410
|
+
availableHeight: j,
|
|
1411
|
+
rects: I
|
|
1412
|
+
}) {
|
|
1413
|
+
const q = C.style;
|
|
1414
|
+
q.setProperty("--available-width", `${V}px`), q.setProperty("--available-height", `${j}px`);
|
|
1415
|
+
const Y = window.devicePixelRatio || 1, {
|
|
1416
|
+
x: ee,
|
|
1417
|
+
y: re,
|
|
1418
|
+
width: ye,
|
|
1419
|
+
height: Fe
|
|
1420
|
+
} = I.reference, ke = (Math.round((ee + ye) * Y) - Math.round(ee * Y)) / Y, $e = (Math.round((re + Fe) * Y) - Math.round(re * Y)) / Y;
|
|
1421
|
+
q.setProperty("--anchor-width", `${ke}px`), q.setProperty("--anchor-height", `${$e}px`);
|
|
1422
|
+
}
|
|
1423
|
+
}), no(() => ({
|
|
1424
|
+
// `transform-origin` calculations rely on an element existing. If the arrow hasn't been set,
|
|
1425
|
+
// we'll create a fake element.
|
|
1426
|
+
element: oe.current || document.createElement("div"),
|
|
1427
|
+
padding: l,
|
|
1428
|
+
offsetParent: "floating"
|
|
1429
|
+
}), [l]), {
|
|
1430
|
+
name: "transformOrigin",
|
|
1431
|
+
fn(C) {
|
|
1432
|
+
const {
|
|
1433
|
+
elements: V,
|
|
1434
|
+
middlewareData: j,
|
|
1435
|
+
placement: I,
|
|
1436
|
+
rects: q,
|
|
1437
|
+
y: Y
|
|
1438
|
+
} = C, ee = z(I), re = X(ee), ye = oe.current, Fe = j.arrow?.x || 0, ke = j.arrow?.y || 0, $e = ye?.clientWidth || 0, It = ye?.clientHeight || 0, He = Fe + $e / 2, dt = ke + It / 2, _t = Math.abs(j.shift?.y || 0), zt = q.reference.height / 2, de = typeof i == "function" ? i(bt(C, n, M)) : i, Nt = _t > de, Yt = {
|
|
1439
|
+
top: `${He}px calc(100% + ${de}px)`,
|
|
1440
|
+
bottom: `${He}px ${-de}px`,
|
|
1441
|
+
left: `calc(100% + ${de}px) ${dt}px`,
|
|
1442
|
+
right: `${-de}px ${dt}px`
|
|
1443
|
+
}[ee], Xt = `${He}px ${q.reference.y + zt - Y}px`;
|
|
1444
|
+
return V.floating.style.setProperty("--transform-origin", Ke && re === "y" && Nt ? Xt : Yt), {};
|
|
1445
|
+
}
|
|
1446
|
+
}, oo, y), ce(() => {
|
|
1447
|
+
!d && u && u.update({
|
|
1448
|
+
referenceElement: null,
|
|
1449
|
+
floatingElement: null,
|
|
1450
|
+
domReferenceElement: null
|
|
1451
|
+
});
|
|
1452
|
+
}, [d, u]);
|
|
1453
|
+
const Te = O.useMemo(() => ({
|
|
1454
|
+
elementResize: !f && typeof ResizeObserver < "u",
|
|
1455
|
+
layoutShift: !f && typeof IntersectionObserver < "u"
|
|
1456
|
+
}), [f]), {
|
|
1457
|
+
refs: ie,
|
|
1458
|
+
elements: fe,
|
|
1459
|
+
x: Ze,
|
|
1460
|
+
y: et,
|
|
1461
|
+
middlewareData: se,
|
|
1462
|
+
update: xe,
|
|
1463
|
+
placement: tt,
|
|
1464
|
+
context: nt,
|
|
1465
|
+
isPositioned: Z,
|
|
1466
|
+
floatingStyles: ot
|
|
1467
|
+
} = eo({
|
|
1468
|
+
rootContext: u,
|
|
1469
|
+
placement: F,
|
|
1470
|
+
middleware: pe,
|
|
1471
|
+
strategy: o,
|
|
1472
|
+
whileElementsMounted: g ? void 0 : (...C) => Rt(...C, Te),
|
|
1473
|
+
nodeId: w,
|
|
1474
|
+
externalTree: R
|
|
1475
|
+
}), {
|
|
1476
|
+
sideX: it,
|
|
1477
|
+
sideY: st
|
|
1478
|
+
} = se.adaptiveOrigin || be, Le = Z ? o : "fixed", rt = O.useMemo(() => {
|
|
1479
|
+
const C = y ? {
|
|
1480
|
+
position: Le,
|
|
1481
|
+
[it]: Ze,
|
|
1482
|
+
[st]: et
|
|
1483
|
+
} : {
|
|
1484
|
+
position: Le,
|
|
1485
|
+
...ot
|
|
1486
|
+
};
|
|
1487
|
+
return Z || (C.opacity = 0), C;
|
|
1488
|
+
}, [y, Le, it, Ze, st, et, ot, Z]), we = O.useRef(null);
|
|
1489
|
+
ce(() => {
|
|
1490
|
+
if (!d)
|
|
1491
|
+
return;
|
|
1492
|
+
const C = D.current, V = typeof C == "function" ? C() : C, I = (At(V) ? V.current : V) || null || null;
|
|
1493
|
+
I !== we.current && (ie.setPositionReference(I), we.current = I);
|
|
1494
|
+
}, [d, ie, W, D]), O.useEffect(() => {
|
|
1495
|
+
if (!d)
|
|
1496
|
+
return;
|
|
1497
|
+
const C = D.current;
|
|
1498
|
+
typeof C != "function" && At(C) && C.current !== we.current && (ie.setPositionReference(C.current), we.current = C.current);
|
|
1499
|
+
}, [d, ie, W, D]), O.useEffect(() => {
|
|
1500
|
+
if (g && d && fe.domReference && fe.floating)
|
|
1501
|
+
return Rt(fe.domReference, fe.floating, xe, Te);
|
|
1502
|
+
}, [g, d, fe, xe, Te]);
|
|
1503
|
+
const ue = z(tt), ct = Vt(n, ue, M), lt = ae(tt) || "center", at = !!se.hide?.referenceHidden;
|
|
1504
|
+
ce(() => {
|
|
1505
|
+
b && d && Z && S(ue);
|
|
1506
|
+
}, [b, d, Z, ue]);
|
|
1507
|
+
const ft = O.useMemo(() => ({
|
|
1508
|
+
position: "absolute",
|
|
1509
|
+
top: se.arrow?.y,
|
|
1510
|
+
left: se.arrow?.x
|
|
1511
|
+
}), [se.arrow]), ut = se.arrow?.centerOffset !== 0;
|
|
1512
|
+
return O.useMemo(() => ({
|
|
1513
|
+
positionerStyles: rt,
|
|
1514
|
+
arrowStyles: ft,
|
|
1515
|
+
arrowRef: oe,
|
|
1516
|
+
arrowUncentered: ut,
|
|
1517
|
+
side: ct,
|
|
1518
|
+
align: lt,
|
|
1519
|
+
physicalSide: ue,
|
|
1520
|
+
anchorHidden: at,
|
|
1521
|
+
refs: ie,
|
|
1522
|
+
context: nt,
|
|
1523
|
+
isPositioned: Z,
|
|
1524
|
+
update: xe
|
|
1525
|
+
}), [rt, ft, oe, ut, ct, lt, ue, at, ie, nt, Z, xe]);
|
|
1526
|
+
}
|
|
1527
|
+
function At(e) {
|
|
1528
|
+
return e != null && "current" in e;
|
|
1529
|
+
}
|
|
1530
|
+
function Ro(e) {
|
|
1531
|
+
return e === "starting" ? ln : un;
|
|
1532
|
+
}
|
|
1533
|
+
export {
|
|
1534
|
+
wo as a,
|
|
1535
|
+
Zn as b,
|
|
1536
|
+
Ro as g,
|
|
1537
|
+
$n as p,
|
|
1538
|
+
yo as u
|
|
1539
|
+
};
|