@beeq/core 1.3.1 → 1.3.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/beeq/beeq.esm.js +1 -1
- package/dist/beeq/beeq.esm.js.map +1 -1
- package/dist/beeq/{p-69d93e10.entry.js → p-0af526fc.entry.js} +2 -2
- package/dist/beeq/{p-c483c17e.entry.js → p-0b6e3137.entry.js} +2 -2
- package/dist/beeq/{p-a7c6f797.entry.js → p-1c789890.entry.js} +2 -2
- package/dist/beeq/{p-29717d60.entry.js → p-1f370b12.entry.js} +2 -2
- package/dist/beeq/{p-b7b80227.entry.js → p-250b8476.entry.js} +2 -2
- package/dist/beeq/{p-4ea77b47.entry.js → p-28a9a23d.entry.js} +2 -2
- package/dist/beeq/{p-1dcff407.entry.js → p-29f90224.entry.js} +2 -2
- package/dist/beeq/{p-cf565f6a.entry.js → p-2f7137e0.entry.js} +2 -2
- package/dist/beeq/{p-ff6101a7.entry.js → p-31472c1f.entry.js} +2 -2
- package/dist/beeq/{p-dc08e1c5.entry.js → p-32134085.entry.js} +2 -2
- package/dist/beeq/{p-a35b19f0.entry.js → p-354f52d1.entry.js} +2 -2
- package/dist/beeq/{p-b0a999d6.entry.js → p-36eb59f9.entry.js} +2 -2
- package/dist/beeq/{p-22a2bf4a.entry.js → p-3c37a62d.entry.js} +2 -2
- package/dist/beeq/{p-69c47479.entry.js → p-42c5530c.entry.js} +2 -2
- package/dist/beeq/{p-6b12a365.entry.js → p-47d89d61.entry.js} +2 -2
- package/dist/beeq/{p-15ef27e9.entry.js → p-51603d69.entry.js} +2 -2
- package/dist/beeq/{p-a15f79c5.entry.js → p-6c1ddc44.entry.js} +2 -2
- package/dist/beeq/{p-58fdd13f.entry.js → p-6d5d2460.entry.js} +2 -2
- package/dist/beeq/{p-94039fe7.entry.js → p-70d07837.entry.js} +2 -2
- package/dist/beeq/p-70d07837.entry.js.map +1 -0
- package/dist/beeq/{p-c9fb7a30.entry.js → p-7d3c9c9a.entry.js} +2 -2
- package/dist/beeq/{p-126c2d19.entry.js → p-81a34a07.entry.js} +2 -2
- package/dist/beeq/{p-30db348f.entry.js → p-852c54d8.entry.js} +2 -2
- package/dist/beeq/{p-adbd57e8.entry.js → p-8593ad98.entry.js} +2 -2
- package/dist/beeq/{p-aaa76f94.entry.js → p-8b57cd5e.entry.js} +2 -2
- package/dist/beeq/{p-8cc8ac11.entry.js → p-981797b1.entry.js} +2 -2
- package/dist/beeq/{p-c69c58b8.entry.js → p-a30ba2bd.entry.js} +2 -2
- package/dist/beeq/{p-10ed463d.entry.js → p-ab632829.entry.js} +2 -2
- package/dist/beeq/{p-3de3223c.entry.js → p-ada3ca0a.entry.js} +2 -2
- package/dist/beeq/{p-c3228970.entry.js → p-bb8f8b78.entry.js} +2 -2
- package/dist/beeq/{p-3fe9aa19.entry.js → p-c14e94e0.entry.js} +2 -2
- package/dist/beeq/p-c6dd73ea.js +6 -0
- package/dist/beeq/p-c6dd73ea.js.map +1 -0
- package/dist/beeq/{p-35dba65d.entry.js → p-c893951f.entry.js} +2 -2
- package/dist/beeq/{p-167c3774.entry.js → p-cbca544b.entry.js} +2 -2
- package/dist/beeq/{p-5666c9c1.entry.js → p-d11fafe0.entry.js} +2 -2
- package/dist/beeq/{p-a91e6eab.entry.js → p-d27ad8a0.entry.js} +2 -2
- package/dist/beeq/p-d27ad8a0.entry.js.map +1 -0
- package/dist/beeq/{p-56a53f77.entry.js → p-d58a7c27.entry.js} +2 -2
- package/dist/beeq/p-d5c5b299.entry.js +6 -0
- package/dist/beeq/p-d5c5b299.entry.js.map +1 -0
- package/dist/beeq/{p-0595abce.entry.js → p-de827971.entry.js} +2 -2
- package/dist/beeq/{p-2cc2ca42.entry.js → p-e2b64861.entry.js} +2 -2
- package/dist/beeq/p-fbd8dd21.js +7 -0
- package/dist/beeq/p-fbd8dd21.js.map +1 -0
- package/dist/cjs/beeq.cjs.js +28 -30
- package/dist/cjs/beeq.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bq-alert.cjs.entry.js +1 -1
- package/dist/cjs/bq-avatar.cjs.entry.js +1 -1
- package/dist/cjs/bq-badge.cjs.entry.js +1 -1
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bq-button.cjs.entry.js +2 -2
- package/dist/cjs/bq-button.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-card.cjs.entry.js +1 -1
- package/dist/cjs/bq-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/bq-dialog.cjs.entry.js +1 -1
- package/dist/cjs/bq-divider.cjs.entry.js +1 -1
- package/dist/cjs/bq-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bq-dropdown_3.cjs.entry.js +1 -1
- package/dist/cjs/bq-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/bq-icon.cjs.entry.js +5 -7
- package/dist/cjs/bq-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-input.cjs.entry.js +1 -1
- package/dist/cjs/bq-notification.cjs.entry.js +1 -1
- package/dist/cjs/bq-option-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-option.cjs.entry.js +1 -1
- package/dist/cjs/bq-panel.cjs.entry.js +2 -2
- package/dist/cjs/bq-progress.cjs.entry.js +1 -1
- package/dist/cjs/bq-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-radio.cjs.entry.js +1 -1
- package/dist/cjs/bq-select.cjs.entry.js +1 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/bq-side-menu.cjs.entry.js +1 -1
- package/dist/cjs/bq-slider.cjs.entry.js +7 -5
- package/dist/cjs/bq-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/bq-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bq-status.cjs.entry.js +1 -1
- package/dist/cjs/bq-step-item.cjs.entry.js +1 -1
- package/dist/cjs/bq-steps.cjs.entry.js +1 -1
- package/dist/cjs/bq-switch.cjs.entry.js +1 -1
- package/dist/cjs/bq-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/bq-tab.cjs.entry.js +1 -1
- package/dist/cjs/bq-textarea.cjs.entry.js +1 -1
- package/dist/cjs/bq-toast.cjs.entry.js +1 -1
- package/dist/cjs/bq-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{index-cf0d9d4d.js → index-32f757ed.js} +61 -23
- package/dist/cjs/index-32f757ed.js.map +1 -0
- package/dist/cjs/index-d55cdb65.js +1792 -0
- package/dist/cjs/index-d55cdb65.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/button/scss/bq-button.css +1 -1
- package/dist/collection/components/drawer/scss/bq-drawer.css +1 -1
- package/dist/collection/components/icon/__tests__/bq-icon.e2e.js +18 -12
- package/dist/collection/components/icon/__tests__/bq-icon.e2e.js.map +1 -1
- package/dist/collection/components/icon/bq-icon.js +4 -6
- package/dist/collection/components/icon/bq-icon.js.map +1 -1
- package/dist/collection/components/icon/helper/request.js +1 -2
- package/dist/collection/components/icon/helper/request.js.map +1 -1
- package/dist/collection/components/slider/bq-slider.js +7 -5
- package/dist/collection/components/slider/bq-slider.js.map +1 -1
- package/dist/collection/components/slider/bq-slider.types.js.map +1 -1
- package/dist/collection/components/slider/scss/bq-slider.css +1 -1
- package/dist/collection/tools/angular-value-accessor-config.js +2 -2
- package/dist/collection/tools/angular-value-accessor-config.js.map +1 -1
- package/dist/components/bq-button2.js +1 -1
- package/dist/components/bq-button2.js.map +1 -1
- package/dist/components/bq-drawer.js +1 -1
- package/dist/components/bq-icon2.js +5 -7
- package/dist/components/bq-icon2.js.map +1 -1
- package/dist/components/bq-slider.js +6 -4
- package/dist/components/bq-slider.js.map +1 -1
- package/dist/components/index2.js +60 -22
- package/dist/components/index2.js.map +1 -1
- package/dist/esm/beeq.js +29 -31
- package/dist/esm/beeq.js.map +1 -1
- package/dist/esm/bq-accordion-group.entry.js +1 -1
- package/dist/esm/bq-accordion.entry.js +1 -1
- package/dist/esm/bq-alert.entry.js +1 -1
- package/dist/esm/bq-avatar.entry.js +1 -1
- package/dist/esm/bq-badge.entry.js +1 -1
- package/dist/esm/bq-breadcrumb-item.entry.js +1 -1
- package/dist/esm/bq-breadcrumb.entry.js +1 -1
- package/dist/esm/bq-button.entry.js +2 -2
- package/dist/esm/bq-button.entry.js.map +1 -1
- package/dist/esm/bq-card.entry.js +1 -1
- package/dist/esm/bq-checkbox.entry.js +1 -1
- package/dist/esm/bq-dialog.entry.js +1 -1
- package/dist/esm/bq-divider.entry.js +1 -1
- package/dist/esm/bq-drawer.entry.js +2 -2
- package/dist/esm/bq-dropdown_3.entry.js +1 -1
- package/dist/esm/bq-empty-state.entry.js +1 -1
- package/dist/esm/bq-icon.entry.js +5 -7
- package/dist/esm/bq-icon.entry.js.map +1 -1
- package/dist/esm/bq-input.entry.js +1 -1
- package/dist/esm/bq-notification.entry.js +1 -1
- package/dist/esm/bq-option-group.entry.js +1 -1
- package/dist/esm/bq-option.entry.js +1 -1
- package/dist/esm/bq-panel.entry.js +2 -2
- package/dist/esm/bq-progress.entry.js +1 -1
- package/dist/esm/bq-radio-group.entry.js +1 -1
- package/dist/esm/bq-radio.entry.js +1 -1
- package/dist/esm/bq-select.entry.js +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +1 -1
- package/dist/esm/bq-side-menu.entry.js +1 -1
- package/dist/esm/bq-slider.entry.js +7 -5
- package/dist/esm/bq-slider.entry.js.map +1 -1
- package/dist/esm/bq-spinner.entry.js +1 -1
- package/dist/esm/bq-status.entry.js +1 -1
- package/dist/esm/bq-step-item.entry.js +1 -1
- package/dist/esm/bq-steps.entry.js +1 -1
- package/dist/esm/bq-switch.entry.js +1 -1
- package/dist/esm/bq-tab-group.entry.js +1 -1
- package/dist/esm/bq-tab.entry.js +1 -1
- package/dist/esm/bq-textarea.entry.js +1 -1
- package/dist/esm/bq-toast.entry.js +1 -1
- package/dist/esm/bq-tooltip.entry.js +2 -2
- package/dist/esm/{index-506c67d0.js → index-5aabdd11.js} +61 -23
- package/dist/esm/index-5aabdd11.js.map +1 -0
- package/dist/esm/index-d71ec085.js +1762 -0
- package/dist/esm/index-d71ec085.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/hydrate/index.d.ts +1 -1
- package/dist/hydrate/index.js +25041 -15795
- package/dist/loader/cdn.js +1 -2
- package/dist/loader/index.cjs.js +1 -2
- package/dist/loader/index.es2017.js +1 -2
- package/dist/loader/index.js +1 -2
- package/dist/stencil.config.js +0 -3
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/slider/bq-slider.types.d.ts +1 -1
- package/dist/types/shared/test-utils/setProperties.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/package.json +1 -1
- package/dist/beeq/p-4b1d6824.entry.js +0 -6
- package/dist/beeq/p-4b1d6824.entry.js.map +0 -1
- package/dist/beeq/p-704c7a0a.js +0 -7
- package/dist/beeq/p-704c7a0a.js.map +0 -1
- package/dist/beeq/p-94039fe7.entry.js.map +0 -1
- package/dist/beeq/p-a91e6eab.entry.js.map +0 -1
- package/dist/beeq/p-c5d2619c.js +0 -6
- package/dist/beeq/p-c5d2619c.js.map +0 -1
- package/dist/cjs/index-3e03656c.js +0 -2601
- package/dist/cjs/index-3e03656c.js.map +0 -1
- package/dist/cjs/index-cf0d9d4d.js.map +0 -1
- package/dist/esm/index-506c67d0.js.map +0 -1
- package/dist/esm/index-8e584dd6.js +0 -2570
- package/dist/esm/index-8e584dd6.js.map +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- /package/dist/beeq/{p-69d93e10.entry.js.map → p-0af526fc.entry.js.map} +0 -0
- /package/dist/beeq/{p-c483c17e.entry.js.map → p-0b6e3137.entry.js.map} +0 -0
- /package/dist/beeq/{p-a7c6f797.entry.js.map → p-1c789890.entry.js.map} +0 -0
- /package/dist/beeq/{p-29717d60.entry.js.map → p-1f370b12.entry.js.map} +0 -0
- /package/dist/beeq/{p-b7b80227.entry.js.map → p-250b8476.entry.js.map} +0 -0
- /package/dist/beeq/{p-4ea77b47.entry.js.map → p-28a9a23d.entry.js.map} +0 -0
- /package/dist/beeq/{p-1dcff407.entry.js.map → p-29f90224.entry.js.map} +0 -0
- /package/dist/beeq/{p-cf565f6a.entry.js.map → p-2f7137e0.entry.js.map} +0 -0
- /package/dist/beeq/{p-ff6101a7.entry.js.map → p-31472c1f.entry.js.map} +0 -0
- /package/dist/beeq/{p-dc08e1c5.entry.js.map → p-32134085.entry.js.map} +0 -0
- /package/dist/beeq/{p-a35b19f0.entry.js.map → p-354f52d1.entry.js.map} +0 -0
- /package/dist/beeq/{p-b0a999d6.entry.js.map → p-36eb59f9.entry.js.map} +0 -0
- /package/dist/beeq/{p-22a2bf4a.entry.js.map → p-3c37a62d.entry.js.map} +0 -0
- /package/dist/beeq/{p-69c47479.entry.js.map → p-42c5530c.entry.js.map} +0 -0
- /package/dist/beeq/{p-6b12a365.entry.js.map → p-47d89d61.entry.js.map} +0 -0
- /package/dist/beeq/{p-15ef27e9.entry.js.map → p-51603d69.entry.js.map} +0 -0
- /package/dist/beeq/{p-a15f79c5.entry.js.map → p-6c1ddc44.entry.js.map} +0 -0
- /package/dist/beeq/{p-58fdd13f.entry.js.map → p-6d5d2460.entry.js.map} +0 -0
- /package/dist/beeq/{p-c9fb7a30.entry.js.map → p-7d3c9c9a.entry.js.map} +0 -0
- /package/dist/beeq/{p-126c2d19.entry.js.map → p-81a34a07.entry.js.map} +0 -0
- /package/dist/beeq/{p-30db348f.entry.js.map → p-852c54d8.entry.js.map} +0 -0
- /package/dist/beeq/{p-adbd57e8.entry.js.map → p-8593ad98.entry.js.map} +0 -0
- /package/dist/beeq/{p-aaa76f94.entry.js.map → p-8b57cd5e.entry.js.map} +0 -0
- /package/dist/beeq/{p-8cc8ac11.entry.js.map → p-981797b1.entry.js.map} +0 -0
- /package/dist/beeq/{p-c69c58b8.entry.js.map → p-a30ba2bd.entry.js.map} +0 -0
- /package/dist/beeq/{p-10ed463d.entry.js.map → p-ab632829.entry.js.map} +0 -0
- /package/dist/beeq/{p-3de3223c.entry.js.map → p-ada3ca0a.entry.js.map} +0 -0
- /package/dist/beeq/{p-c3228970.entry.js.map → p-bb8f8b78.entry.js.map} +0 -0
- /package/dist/beeq/{p-3fe9aa19.entry.js.map → p-c14e94e0.entry.js.map} +0 -0
- /package/dist/beeq/{p-35dba65d.entry.js.map → p-c893951f.entry.js.map} +0 -0
- /package/dist/beeq/{p-167c3774.entry.js.map → p-cbca544b.entry.js.map} +0 -0
- /package/dist/beeq/{p-5666c9c1.entry.js.map → p-d11fafe0.entry.js.map} +0 -0
- /package/dist/beeq/{p-56a53f77.entry.js.map → p-d58a7c27.entry.js.map} +0 -0
- /package/dist/beeq/{p-0595abce.entry.js.map → p-de827971.entry.js.map} +0 -0
- /package/dist/beeq/{p-2cc2ca42.entry.js.map → p-e2b64861.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BUTTON_SIZE","BUTTON_TYPE","BUTTON_APPEARANCE","BUTTON_VARIANT","bqButtonCss","BqButtonStyle0","BqButton","this","handleBlur","bqBlur","emit","el","handleFocus","bqFocus","handleClick","ev","disabled","loading","preventDefault","stopPropagation","type","wrapperForm","closest","isNil","btn","document","createElement","hidden","append","click","remove","bqClick","handleSlotChange","hasPrefix","hasSlotContent","prefixElem","hasSuffix","suffixElem","checkPropValues","validatePropValue","componentWillLoad","render","isLink","isDefined","href","TagElem","style","border","h","Host","key","class","appearance","justifyContent","variant","size","block","download","undefined","part","rel","target","tabIndex","onBlur","onFocus","onClick","ref","spanElem","name","onSlotchange","role","title"],"sources":["../../packages/beeq/src/components/button/bq-button.types.ts","../../packages/beeq/src/components/button/scss/bq-button.scss?tag=bq-button&encapsulation=shadow","../../packages/beeq/src/components/button/bq-button.tsx"],"sourcesContent":["export const BUTTON_SIZE = ['small', 'medium', 'large'] as const;\nexport type TButtonSize = (typeof BUTTON_SIZE)[number];\n\nexport const BUTTON_TYPE = ['button', 'submit', 'reset'] as const;\nexport type TButtonType = (typeof BUTTON_TYPE)[number];\n\nexport const BUTTON_APPEARANCE = ['primary', 'secondary', 'link', 'text'] as const;\nexport type TButtonAppearance = (typeof BUTTON_APPEARANCE)[number];\n\nexport const BUTTON_VARIANT = ['standard', 'ghost', 'danger'] as const;\nexport type TButtonVariant = (typeof BUTTON_VARIANT)[number];\n\nexport const BUTTON_BORDER_RADIUS = ['none', 'xs2', 'xs', 's', 'm', 'l', 'full'] as const;\nexport type TButtonBorderRadius = (typeof BUTTON_BORDER_RADIUS)[number];\n","/* -------------------------------------------------------------------------- */\n/* Button styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-button.variables';\n\n@layer components {\n // Common button base style\n .bq-button {\n @apply box-border flex cursor-[inherit] items-center justify-center font-medium leading-regular;\n @apply rounded-[--bq-button--border-radius] border-[length:--bq-button--border-width] border-[color:--bq-button--border-color];\n @apply transition-[background-color,border-color,color] duration-300 ease-in-out;\n // `DISABLED` state\n @apply disabled:cursor-not-allowed disabled:opacity-60;\n // `FOCUS` state\n @apply focus-visible:focus;\n }\n}\n\n:host {\n @apply relative inline-block w-auto cursor-pointer;\n}\n\n:host([block]),\n.block {\n @apply w-full;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Appearance */\n/* -------------------------------------------------------------------------- */\n\n.bq-button--primary {\n @apply bg-ui-brand text-text-alt;\n // Primary `HOVER` state\n @apply hover:enabled:bg-hover-ui-brand;\n // Primary `ACTIVE` state\n @apply active:enabled:bg-active-ui-brand active:enabled:hover:bg-active-ui-brand;\n}\n\n.bq-button--primary.ghost {\n @apply border-2 border-solid border-stroke-brand bg-transparent text-text-brand;\n // Primary `HOVER` state\n @apply hover:enabled:bg-hover-ui-primary;\n // Primary `ACTIVE` state\n @apply active:enabled:bg-active-ui-primary active:enabled:hover:bg-active-ui-primary;\n}\n\n.bq-button--primary.danger {\n @apply bg-ui-danger text-text-alt;\n // Primary `HOVER` state\n @apply hover:enabled:bg-hover-ui-danger;\n // Primary `ACTIVE` state\n @apply active:enabled:bg-active-ui-danger active:enabled:hover:bg-active-ui-danger;\n}\n\n.bq-button--secondary {\n @apply bg-ui-secondary text-text-primary;\n // Primary `HOVER` state\n @apply hover:enabled:bg-hover-ui-secondary;\n // Primary `ACTIVE` state\n @apply active:enabled:bg-active-ui-secondary active:enabled:hover:bg-active-ui-secondary;\n}\n\n.bq-button--link {\n @apply bg-transparent text-text-brand no-underline;\n // Primary `HOVER` state\n @apply [&:not(.disabled)]:hover:bg-hover-ui-secondary;\n // Primary `ACTIVE` state\n @apply [&:not(.disabled)]:active:bg-active-ui-secondary [&:not(.disabled)]:active:hover:bg-active-ui-secondary;\n // HTML `<a>` elements does not have a `disabled` state so we need to handle it manually\n &.disabled {\n @apply cursor-not-allowed opacity-60;\n }\n}\n\n.bq-button--text {\n @apply bg-transparent text-text-primary;\n // Primary `HOVER` state\n @apply hover:enabled:bg-hover-ui-secondary;\n // Primary `ACTIVE` state\n @apply active:enabled:bg-active-ui-secondary active:enabled:hover:bg-active-ui-secondary;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Size */\n/* -------------------------------------------------------------------------- */\n\n.small {\n @apply h-[var(--bq-button--small-height)] px-[var(--bq-button--small-paddingX)] py-[var(--bq-button--small-paddingY)] text-[length:--bq-button--small-font-size];\n}\n\n.medium {\n @apply h-[var(--bq-button--medium-height)] px-[var(--bq-button--medium-paddingX)] py-[var(--bq-button--medium-paddingY)] text-[length:--bq-button--medium-font-size];\n}\n\n.large {\n @apply h-[var(--bq-button--large-height)] px-[var(--bq-button--large-paddingX)] py-[var(--bq-button--large-paddingY)] text-[length:--bq-button--large-font-size];\n}\n\n/* -------------------------------------------------------------------------- */\n/* Label */\n/* -------------------------------------------------------------------------- */\n\n.bq-button__label ::slotted(bq-icon) {\n @apply flex;\n}\n\n.content-left {\n @apply justify-start;\n}\n\n.content-right {\n @apply justify-end;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Prefix and Suffix slots */\n/* -------------------------------------------------------------------------- */\n\n.bq-button__prefix,\n.bq-button__suffix {\n @apply pointer-events-none flex shrink-0 grow-0 basis-auto items-center;\n}\n\n.bq-button.has-prefix .bq-button__label {\n @apply ps-xs2;\n}\n\n.bq-button.has-suffix .bq-button__label {\n @apply pe-xs2;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Loading */\n/* -------------------------------------------------------------------------- */\n\n.bq-button.loading {\n @apply relative cursor-wait;\n}\n\n.bq-button.loading .bq-button__prefix,\n.bq-button.loading .bq-button__label,\n.bq-button.loading .bq-button__suffix {\n @apply invisible;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Spinner icon */\n/* -------------------------------------------------------------------------- */\n\n.bq-button__loader {\n @include animation-spin;\n @apply absolute;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\n\nimport {\n BUTTON_APPEARANCE,\n BUTTON_SIZE,\n BUTTON_TYPE,\n BUTTON_VARIANT,\n TButtonAppearance,\n TButtonBorderRadius,\n TButtonSize,\n TButtonType,\n TButtonVariant,\n} from './bq-button.types';\nimport { hasSlotContent, isDefined, isNil, validatePropValue } from '../../shared/utils';\n\n/**\n * Buttons are designed for users to take action on a page or a screen.\n *\n * @part button - The `<a>` or `<button>` HTML element used under the hood.\n * @part prefix - The `<span>` tag element that acts as prefix container.\n * @part label - The `<span>` tag element that renders the text of the button.\n * @part suffix - The `<span>` tag element that acts as suffix container.\n */\n@Component({\n tag: 'bq-button',\n styleUrl: './scss/bq-button.scss',\n shadow: true,\n})\nexport class BqButton {\n // Own Properties\n // ====================\n\n private prefixElem: HTMLElement;\n private suffixElem: HTMLElement;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqButtonElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n @State() private hasPrefix = false;\n @State() private hasSuffix = false;\n\n // Public Property API\n // ========================\n\n /** The appearance style to apply to the button */\n @Prop({ reflect: true }) appearance: TButtonAppearance = 'primary';\n\n /** If `true`, it will make the button fit to its parent width. */\n @Prop({ reflect: true }) block: boolean = false;\n\n /** The corner radius of the button */\n @Prop({ reflect: true }) border: TButtonBorderRadius = 'm';\n\n /** If true, the button will be disabled (no interaction allowed) */\n @Prop() disabled = false;\n\n /**\n * Tells the browser to treat the linked URL as a download. Only used when `href` is set.\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-download\n */\n @Prop() download?: string;\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>` */\n @Prop({ reflect: true }) href: string;\n\n /** It determinate how the content should be aligned */\n @Prop({ reflect: true }) justifyContent: 'left' | 'center' | 'right' = 'center';\n\n /** If `true` it will display the button in a loading state */\n @Prop() loading = false;\n\n /** The size of the button */\n @Prop({ reflect: true }) size: TButtonSize = 'medium';\n\n /**\n * Where to display the linked URL, as the name for a browsing context (a `tab`, `window`, or `<iframe>`)\n * Details: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target\n */\n @Prop({ reflect: true }) target: '_blank' | '_parent' | '_self' | '_top';\n\n /** The default behavior of the button */\n @Prop({ reflect: true }) type: TButtonType = 'button';\n\n /** The variant of button to apply on top of the appearance (applicable only to `appearance=\"primary\"`) */\n @Prop({ reflect: true }) variant: TButtonVariant = 'standard';\n\n // Prop lifecycle events\n // =======================\n\n @Watch('appearance')\n @Watch('type')\n @Watch('size')\n @Watch('variant')\n checkPropValues() {\n validatePropValue(BUTTON_APPEARANCE, 'primary', this.el, 'appearance');\n validatePropValue(BUTTON_TYPE, 'button', this.el, 'type');\n validatePropValue(BUTTON_SIZE, 'medium', this.el, 'size');\n validatePropValue(BUTTON_VARIANT, 'standard', this.el, 'variant');\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when the button loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when the button is clicked */\n @Event() bqFocus: EventEmitter<HTMLBqButtonElement>;\n\n /** Handler to be called when button gets focus */\n @Event() bqClick: EventEmitter<HTMLBqButtonElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n componentWillLoad() {\n this.checkPropValues();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleClick = (ev: Event) => {\n if (this.disabled || this.loading) {\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n if (this.type === 'submit' || this.type === 'reset') {\n const wrapperForm = this.el.closest('form');\n if (!isNil(wrapperForm)) {\n const btn = document.createElement('button');\n btn.type = this.type;\n btn.hidden = true;\n wrapperForm.append(btn);\n\n btn.click();\n btn.remove();\n }\n }\n\n this.bqClick.emit(this.el);\n };\n\n private handleSlotChange = () => {\n this.hasPrefix = hasSlotContent(this.prefixElem, 'prefix');\n this.hasSuffix = hasSlotContent(this.suffixElem, 'suffix');\n };\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n const isLink = isDefined(this.href);\n const TagElem = isLink ? 'a' : 'button';\n const style = {\n ...(this.border && { '--bq-button--border-radius': `var(--bq-radius--${this.border})` }),\n };\n\n return (\n <Host style={style}>\n <TagElem\n class={{\n 'bq-button': true,\n [`bq-button--${this.appearance}`]: true,\n [`content-${this.justifyContent}`]: true,\n [`${this.variant}`]: true,\n [`${this.size}`]: true,\n block: this.block,\n disabled: this.disabled,\n 'has-prefix': this.hasPrefix,\n 'has-suffix': this.hasSuffix,\n loading: this.loading,\n }}\n aria-disabled={this.disabled ? 'true' : 'false'}\n disabled={this.disabled}\n download={isLink ? this.download : undefined}\n href={isLink ? this.href : undefined}\n part=\"button\"\n rel={isLink && this.target ? 'noreferrer noopener' : undefined}\n target={isLink ? this.target : undefined}\n type={this.type}\n tabIndex={this.disabled ? -1 : 0}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onClick={this.handleClick}\n >\n <span class=\"bq-button__prefix\" ref={(spanElem) => (this.prefixElem = spanElem)} part=\"prefix\">\n <slot name=\"prefix\" onSlotchange={this.handleSlotChange} />\n </span>\n <span class=\"bq-button__label\" part=\"label\">\n <slot />\n </span>\n <span class=\"bq-button__suffix\" ref={(spanElem) => (this.suffixElem = spanElem)} part=\"suffix\">\n <slot name=\"suffix\" onSlotchange={this.handleSlotChange} />\n </span>\n {this.loading && (\n <bq-icon\n class=\"bq-button__loader\"\n name=\"spinner-gap\"\n role=\"img\"\n title={`${this.appearance} button loader`}\n />\n )}\n </TagElem>\n </Host>\n );\n }\n}\n"],"mappings":";;;;2PAAO,MAAMA,EAAc,CAAC,QAAS,SAAU,SAGxC,MAAMC,EAAc,CAAC,SAAU,SAAU,SAGzC,MAAMC,EAAoB,CAAC,UAAW,YAAa,OAAQ,QAG3D,MAAMC,EAAiB,CAAC,WAAY,QAAS,UCTpD,MAAMC,EAAc,294BACpB,MAAAC,EAAeD,E,MC2BFE,EAAQ,M,0HAkHXC,KAAAC,WAAa,KACnBD,KAAKE,OAAOC,KAAKH,KAAKI,GAAG,EAGnBJ,KAAAK,YAAc,KACpBL,KAAKM,QAAQH,KAAKH,KAAKI,GAAG,EAGpBJ,KAAAO,YAAeC,IACrB,GAAIR,KAAKS,UAAYT,KAAKU,QAAS,CACjCF,EAAGG,iBACHH,EAAGI,kBACH,M,CAGF,GAAIZ,KAAKa,O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1B,KAAK6B,UACnBnB,QAASV,KAAKU,SACf,gBACcV,KAAKS,SAAW,OAAS,QACxCA,SAAUT,KAAKS,SACfyC,SAAUf,EAASnC,KAAKkD,SAAWC,UACnCd,KAAMF,EAASnC,KAAKqC,KAAOc,UAC3BC,KAAK,SACLC,IAAKlB,GAAUnC,KAAKsD,OAAS,sBAAwBH,UACrDG,OAAQnB,EAASnC,KAAKsD,OAASH,UAC/BtC,KAAMb,KAAKa,KACX0C,SAAUvD,KAAKS,UAAY,EAAI,EAC/B+C,OAAQxD,KAAKC,WACbwD,QAASzD,KAAKK,YACdqD,QAAS1D,KAAKO,aAEdkC,EAAA,QAAAE,IAAA,2CAAMC,MAAM,oBAAoBe,IAAMC,GAAc5D,KAAK4B,WAAagC,EAAWR,KAAK,UACpFX,EAAA,QAAAE,IAAA,2CAAMkB,KAAK,SAASC,aAAc9D,KAAKyB,oBAEzCgB,EAAA,QAAAE,IAAA,2CAAMC,MAAM,mBAAmBQ,KAAK,SAClCX,EAAA,QAAAE,IAAA,8CAEFF,EAAA,QAAAE,IAAA,2CAAMC,MAAM,oBAAoBe,IAAMC,GAAc5D,KAAK8B,WAAa8B,EAAWR,KAAK,UACpFX,EAAA,QAAAE,IAAA,2CAAMkB,KAAK,SAASC,aAAc9D,KAAKyB,oBAExCzB,KAAKU,SACJ+B,EAAA,WAAAE,IAAA,2CACEC,MAAM,oBACNiB,KAAK,cACLE,KAAK,MACLC,MAAO,GAAGhE,KAAK6C,8B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["bqSliderCss","BqSliderStyle0","BqSlider","this","runUpdates","updateProgressTrack","syncInputsValue","setThumbPosition","calculateMinValue","value","isMaxValue","_a","minValue","max","isGapExceeded","gap","calculateMaxValue","Math","setState","newValue","isRangeType","stringToObject","maxValue","enableTooltip","minThumbPosition","maxThumbPosition","thumbPosition","inputMinElem","setAttribute","toString","_b","inputMaxElem","isString","JSON","parse","handleInputChange","type","event","target","parseFloat","min","reflectedValue","emitBqChange","calculatePercent","totalRange","Number","progressElem","left","width","style","calculateThumbPosition","trackAreaWidth","trackElem","getBoundingClientRect","inputThumbSize","parseInt","getComputedStyle","el","getPropertyValue","totalWidth","undefined","debounceBqChange","cancel","debounce","bqChange","emit","debounceTime","handleBlur","bqBlur","handleFocus","bqFocus","handleMouseDown","handleTooltipVisibility","handleMouseUp","action","tooltipAlwaysVisible","tooltipElem","minTooltipElem","maxTooltipElem","classList","renderLabel","position","css","h","class","hidden","enableValueIndicator","part","toFixed","decimalCount","renderInput","refCallback","disabled","step","ref","onInput","ev","onBlur","onFocus","onMouseDown","onMouseUp","renderTooltip","isTooltipAlwaysVisible","exportparts","alwaysVisible","distance","fontVariant","slot","handleValuePropChange","handleStepPropChange","round","handleGapChange","isNil","connectedCallback","componentDidLoad","componentDidUpdate","split","replace","length","render","key","elem","input"],"sources":["../../packages/beeq/src/components/slider/scss/bq-slider.scss?tag=bq-slider&encapsulation=shadow","../../packages/beeq/src/components/slider/bq-slider.tsx"],"sourcesContent":["/* -------------------------------------------------------------------------- */\n/* Slider styles */\n/* -------------------------------------------------------------------------- */\n\n@import './bq-slider.variables';\n\n@layer components {\n .thumb {\n @apply pointer-events-auto box-content size-[--bq-slider--thumb-size] cursor-pointer appearance-none rounded-full border-2 border-solid border-stroke-brand bg-ui-primary;\n @apply transition-[background-color,border-color,box-shadow] duration-300;\n }\n\n .thumb-focus {\n @apply focus;\n }\n\n .thumb-hover {\n @apply border-hover-stroke-brand;\n }\n\n .thumb-active {\n @apply cursor-grabbing bg-active-ui-brand border-active-stroke-brand;\n }\n}\n\n:host {\n @apply block w-full;\n}\n\n/* ---------------------- Webkit (Chrome, Safari, Edge) --------------------- */\n\ninput[type='range']::-webkit-slider-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-webkit-slider-runnable-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-webkit-slider-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-webkit-slider-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-webkit-slider-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-webkit-slider-thumb {\n @apply cursor-not-allowed;\n}\n\n/* ---------------------------- Mozilla (Firefox) --------------------------- */\n\ninput[type='range']::-moz-range-thumb {\n @apply thumb;\n}\n\ninput[type='range']::-moz-range-track {\n @apply transition-all duration-300 ease-in;\n}\n\ninput[type='range']:focus-visible::-moz-range-thumb {\n @apply thumb-focus;\n}\n\ninput[type='range']:hover::-moz-range-thumb {\n @apply thumb-hover;\n}\n\ninput[type='range']:active::-moz-range-thumb {\n @apply thumb-active;\n}\n\ninput[type='range'][disabled]::-moz-range-thumb {\n @apply cursor-not-allowed;\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\n\nimport { TSliderType, TSliderValue } from './bq-slider.types';\nimport { debounce, isNil, isString, TDebounce } from '../../shared/utils';\n\n/**\n * @part base - The component's base wrapper.\n * @part container - The container of the slider.\n * @part track-area - The track area of the slider.\n * @part progress-area - The progress area of the slider.\n * @part input-min - The input element for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part input-max - The input element for the maximum value.\n * @part label-start - The label for the value when the slider type is `single` or the minimum value when the slider type is `range`.\n * @part label-end - The label for maximum value when the slider type is `range`.\n */\n@Component({\n tag: 'bq-slider',\n styleUrl: './scss/bq-slider.scss',\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class BqSlider {\n // Own Properties\n // ====================\n\n private inputMinElem: HTMLInputElement;\n private inputMaxElem: HTMLInputElement;\n private minTooltipElem: HTMLBqTooltipElement;\n private maxTooltipElem: HTMLBqTooltipElement;\n private progressElem: HTMLSpanElement;\n private trackElem: HTMLSpanElement;\n private debounceBqChange: TDebounce<void>;\n\n // Reference to host HTML element\n // ===================================\n\n @Element() el!: HTMLBqSliderElement;\n\n // State() variables\n // Inlined decorator, alphabetical order\n // =======================================\n\n /**\n * The `minValue` state is the only value when the slider type is `single`\n * and the minimum value when the slider type is `range`.\n */\n @State() minValue: number;\n /** The `maxValue` state is only used when the slider type is `range`. */\n @State() maxValue: number;\n /** It hold the left position of the Thumb for the value or the minimum value (if the slider type is `range`) */\n @State() minThumbPosition: number;\n /** It hold the left position of the Thumb for the maximum value (if the slider type is `range`) */\n @State() maxThumbPosition: number;\n\n // Public Property API\n // ========================\n\n /** The amount of time, in milliseconds, to wait to trigger the `bqChange` event after each value change. */\n @Prop({ reflect: true }) debounceTime = 0;\n\n /** If `true` the slider is disabled. */\n @Prop({ reflect: true }) disabled? = false;\n\n /** If `true` it will show the value label on a side of the slider track area */\n @Prop({ reflect: true }) enableValueIndicator? = false;\n\n /** A number representing the amount to remain between the minimum and maximum values (only for range type). */\n @Prop({ reflect: true, mutable: true }) gap = 0;\n\n /** A number representing the max value of the slider. */\n @Prop({ reflect: true }) max = 100;\n\n /** A number representing the min value of the slider. */\n @Prop({ reflect: true }) min = 0;\n\n /**\n * A number representing the step of the slider.\n * ⚠️ Please notice that the value (or list of values if the slider type is `range`) will be rounded to the nearest multiple of `step`.\n */\n @Prop({ reflect: true }) step = 1;\n\n /** It defines the type of slider to display */\n @Prop({ reflect: true }) type: TSliderType = 'single';\n\n /**\n * The value of the slider.\n * - If the slider type is `single`, the value is a number.\n * - If the slider type is `range`, the value is an array of two numbers (the first number represents the `min` value and the second number represents the `max` value).\n */\n @Prop({ reflect: true, mutable: true }) value: TSliderValue;\n\n /** If `true`, a tooltip will be shown displaying the progress value */\n @Prop({ reflect: true }) enableTooltip: boolean = false;\n\n /**\n * If `true`, a tooltip will always display the progress value.\n * It relies on enableTooltip and if enableTooltip is false, tooltipAlwaysVisible cannot be true.\n */\n @Prop({ reflect: true }) tooltipAlwaysVisible: boolean = false;\n\n // Prop lifecycle events\n // =======================\n\n @Watch('value')\n handleValuePropChange(newValue: TSliderValue) {\n this.setState(newValue);\n this.emitBqChange();\n }\n\n @Watch('step')\n handleStepPropChange() {\n this.minValue = Math.round(this.minValue / this.step) * this.step;\n this.maxValue = Math.round(this.maxValue / this.step) * this.step;\n }\n\n @Watch('gap')\n handleGapChange(newValue: number) {\n if (!this.isRangeType) return;\n // Use the this.value prop value when the component is initialized\n // Otherwise, use the current this.min and this.max state values\n const value = !isNil(this.min) && !isNil(this.max) ? [this.min, this.max] : this.stringToObject(this.value);\n // If the gap is less than the min or greater than the max, set it to 0\n this.gap = newValue < value[0] || newValue > value[1] ? 0 : newValue;\n }\n\n // Events section\n // Requires JSDocs for public API documentation\n // ==============================================\n\n /** Handler to be called when change the value on range inputs */\n @Event() bqChange: EventEmitter<{ value: Exclude<TSliderValue, string>; el: HTMLBqSliderElement }>;\n\n /** Handler to be called when the slider loses focus */\n @Event() bqBlur: EventEmitter<HTMLBqSliderElement>;\n\n /** Handler to be called when the slider gets focused */\n @Event() bqFocus: EventEmitter<HTMLBqSliderElement>;\n\n // Component lifecycle events\n // Ordered by their natural call order\n // =====================================\n\n connectedCallback() {\n this.handleGapChange(this.gap);\n this.setState(this.value);\n this.handleStepPropChange();\n }\n\n componentDidLoad() {\n this.runUpdates();\n }\n\n componentDidUpdate() {\n this.runUpdates();\n }\n\n // Listeners\n // ==============\n\n // Public methods API\n // These methods are exposed on the host element.\n // Always use two lines.\n // Public Methods must be async.\n // Requires JSDocs for public API documentation.\n // ===============================================\n\n // Local methods\n // Internal business logic.\n // These methods cannot be called from the host element.\n // =======================================================\n\n private runUpdates = () => {\n this.updateProgressTrack();\n this.syncInputsValue();\n this.setThumbPosition();\n };\n\n private calculateMinValue = (value: TSliderValue) => {\n const isMaxValue = (this.minValue ?? value[0]) === this.max;\n const isGapExceeded = value[0] + this.gap > this.max;\n // Make sure that the min value gets adjusted according to the gap value\n return isMaxValue || isGapExceeded ? this.max - this.gap : value[0];\n };\n\n private calculateMaxValue = (value: TSliderValue, minValue: number) => Math.max(value[1], minValue + this.gap);\n\n private setState = (newValue: TSliderValue) => {\n const isRangeType = this.isRangeType;\n const value = this.stringToObject(newValue);\n\n this.minValue = isRangeType ? this.calculateMinValue(value) : value;\n this.maxValue = isRangeType ? this.calculateMaxValue(value, this.minValue) : this.minValue;\n };\n\n private setThumbPosition = () => {\n if (!this.enableTooltip) return;\n\n // Destructure the returned object from this.thumbPosition() and assign the properties to this.minThumbPosition and this.maxThumbPosition\n ({ minThumbPosition: this.minThumbPosition, maxThumbPosition: this.maxThumbPosition } = this.thumbPosition());\n };\n\n private syncInputsValue = () => {\n this.inputMinElem?.setAttribute('value', this.minValue.toString());\n this.inputMaxElem?.setAttribute('value', this.maxValue.toString());\n };\n\n private stringToObject = (value: TSliderValue) => (isString(value) ? JSON.parse(value) : value);\n\n private handleInputChange = (type: 'min' | 'max', event: InputEvent) => {\n const target = event.target as HTMLInputElement;\n const value = parseFloat(target.value);\n\n if (type === 'min') {\n this.minValue = this.isRangeType ? Math.min(value, this.maxValue - this.gap) : value;\n } else if (type === 'max') {\n this.maxValue = this.isRangeType ? Math.max(value, this.minValue + this.gap) : value;\n }\n\n // Update the input value to reflect the clamped value\n const reflectedValue = (type === 'min' ? this.minValue : this.maxValue).toString();\n target.value = reflectedValue;\n target.setAttribute('value', reflectedValue);\n\n this.emitBqChange();\n };\n\n private calculatePercent = (value: number) => {\n const totalRange = Number(this.max) - Number(this.min);\n return (value / totalRange) * 100;\n };\n\n private updateProgressTrack = () => {\n if (!this.progressElem) return;\n\n // For range type, left starts from the `min` value and width is the difference between `max` and `min`.\n // For non-range type, left starts from 0 and width is the `min` value.\n const left = this.isRangeType ? this.calculatePercent(this.minValue) : 0;\n const width = this.isRangeType\n ? this.calculatePercent(Number(this.maxValue) - Number(this.minValue))\n : this.calculatePercent(this.minValue);\n\n this.progressElem.style.left = `${left}%`;\n this.progressElem.style.width = `${width}%`;\n };\n\n private calculateThumbPosition = (value: number): number => {\n if (!this.progressElem) return;\n\n // Get the width of the track area and the size of the input range thumb\n const trackAreaWidth = this.trackElem.getBoundingClientRect().width;\n // We need to also add 4px to the thumb size,\n // this is because the thumb is 2px border (`border-2`)\n const inputThumbSize = parseInt(getComputedStyle(this.el).getPropertyValue('--bq-slider--thumb-size'), 10) + 4;\n const totalWidth = trackAreaWidth - inputThumbSize;\n\n return ((value - this.min) / (this.max - this.min)) * totalWidth + inputThumbSize / 2;\n };\n\n private thumbPosition = (): { minThumbPosition: number; maxThumbPosition?: number } => {\n const minThumbPosition = this.calculateThumbPosition(this.minValue);\n const maxThumbPosition = this.isRangeType ? this.calculateThumbPosition(this.maxValue) : undefined;\n\n return { minThumbPosition, maxThumbPosition };\n };\n\n private emitBqChange = () => {\n this.debounceBqChange?.cancel();\n\n const value: Exclude<TSliderValue, string> = this.isRangeType ? [this.minValue, this.maxValue] : this.minValue;\n this.debounceBqChange = debounce(() => this.bqChange.emit({ value, el: this.el }), this.debounceTime);\n\n this.debounceBqChange();\n };\n\n private handleBlur = () => {\n this.bqBlur.emit(this.el);\n };\n\n private handleFocus = () => {\n this.bqFocus.emit(this.el);\n };\n\n private handleMouseDown = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'remove');\n };\n\n private handleMouseUp = (event: MouseEvent) => {\n this.handleTooltipVisibility(event, 'add');\n };\n\n private handleTooltipVisibility = (event: MouseEvent, action: 'add' | 'remove') => {\n if (!this.enableTooltip || this.tooltipAlwaysVisible) return;\n\n const target = event.target as HTMLElement;\n const tooltipElem = target === this.inputMinElem ? this.minTooltipElem : this.maxTooltipElem;\n tooltipElem.classList[action]('hidden');\n };\n\n private get decimalCount(): number {\n // Return the length of the decimal part of the step value.\n return (this.step % 1).toFixed(10).split('.')[1].replace(/0+$/, '').length;\n }\n\n private get isRangeType() {\n return this.type === 'range';\n }\n\n private get isTooltipAlwaysVisible(): boolean {\n return this.tooltipAlwaysVisible && this.enableTooltip;\n }\n\n private renderLabel = (value: number, position: 'start' | 'end', css?: string) => {\n return (\n <span\n class={{\n [`${css} box-content block w-fit min-w-8 text-s font-medium leading-regular text-text-primary [font-variant:tabular-nums]`]:\n true,\n hidden: position === 'start' ? !this.enableValueIndicator : !this.enableValueIndicator || !this.isRangeType,\n }}\n part={`label-${position}`}\n >\n {value.toFixed(this.decimalCount)}\n </span>\n );\n };\n\n private renderInput = (type: 'max' | 'min', value: number, refCallback: (input: HTMLInputElement) => void) => {\n return (\n <input\n type=\"range\"\n class={{\n 'absolute top-1/2 w-full -translate-y-1/2 cursor-pointer appearance-none bg-transparent outline-none disabled:cursor-not-allowed':\n true,\n 'pointer-events-none': this.isRangeType,\n }}\n disabled={this.disabled}\n min={this.min}\n max={this.max}\n step={this.step}\n ref={refCallback}\n onInput={(ev) => this.handleInputChange(type, ev)}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n onMouseDown={this.handleMouseDown}\n onMouseUp={this.handleMouseUp}\n value={value}\n part={`input-${type}`}\n />\n );\n };\n\n private renderTooltip = (\n value: number,\n thumbPosition: number,\n refCallback: (elem: HTMLBqTooltipElement) => void,\n ): HTMLBqTooltipElement => (\n <bq-tooltip\n class={{\n 'absolute [&::part(panel)]:absolute': true,\n hidden: !this.isTooltipAlwaysVisible,\n }}\n exportparts=\"base,trigger,panel\"\n alwaysVisible={true}\n distance={this.enableValueIndicator ? 6 : 16}\n style={{ left: `${thumbPosition}px`, fontVariant: 'tabular-nums' }}\n ref={refCallback}\n >\n <div class=\"absolute size-1\" slot=\"trigger\" />\n {value.toFixed(this.decimalCount)}\n </bq-tooltip>\n );\n\n // render() function\n // Always the last one in the class.\n // ===================================\n\n render() {\n return (\n <div\n aria-disabled={this.disabled ? 'true' : 'false'}\n class={{ 'flex w-full': true, 'cursor-not-allowed opacity-60': this.disabled }}\n part=\"base\"\n >\n {/* LABEL (start) */}\n {this.renderLabel(this.minValue, 'start', 'me-xs text-end')}\n {/* SLIDER */}\n <div class=\"relative w-full\" part=\"container\">\n {/* TRACK AREA */}\n <span\n class=\"absolute top-1/2 h-1 w-full -translate-y-1/2 rounded-xs bg-[--bq-slider--trackarea-color]\"\n ref={(elem) => (this.trackElem = elem)}\n part=\"track-area\"\n />\n {/* PROGRESS AREA */}\n <span\n class=\"absolute top-1/2 h-1 w-1/2 -translate-y-1/2 rounded-xs bg-[--bq-slider--progress-color]\"\n ref={(elem) => (this.progressElem = elem)}\n part=\"progress-area\"\n />\n {/* TOOLTIP on top of the value or min value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.renderTooltip(this.minValue, this.minThumbPosition, (elem) => (this.minTooltipElem = elem))}\n {/* INPUT (Min), used on single type */}\n {this.renderInput('min', this.minValue, (input) => (this.inputMinElem = input))}\n {/* TOOLTIP on top of the max value (if the slider type is `range`) */}\n {this.enableTooltip &&\n this.isRangeType &&\n this.renderTooltip(this.maxValue, this.maxThumbPosition, (elem) => (this.maxTooltipElem = elem))}\n {/* INPUT (Max) */}\n {this.isRangeType && this.renderInput('max', this.maxValue, (input) => (this.inputMaxElem = input))}\n </div>\n {/* LABEL (end) */}\n {this.renderLabel(this.maxValue, 'end', 'ms-xs text-start')}\n </div>\n );\n }\n}\n"],"mappings":";;;;mLAAA,MAAMA,EAAc,m+yBACpB,MAAAC,EAAeD,E,MCqBFE,EAAQ,M,4HAsJXC,KAAAC,WAAa,KACnBD,KAAKE,sBACLF,KAAKG,kBACLH,KAAKI,kBAAkB,EAGjBJ,KAAAK,kBAAqBC,I,MAC3B,MAAMC,IAAcC,EAAAR,KAAKS,YAAQ,MAAAD,SAAA,EAAAA,EAAIF,EAAM,MAAQN,KAAKU,IACxD,MAAMC,EAAgBL,EAAM,GAAKN,KAAKY,IAAMZ,KAAKU,IAEjD,OAAOH,GAAcI,EAAgBX,KAAKU,IAAMV,KAAKY,IAAMN,EAAM,EAAE,EAG7DN,KAAAa,kBAAoB,CAACP,EAAqBG,IAAqBK,KAAKJ,IAAIJ,EAAM,GAAIG,EAAWT,KAAKY,KAElGZ,KAAAe,SAAYC,IAClB,MAAMC,EAAcjB,KAAKiB,YACzB,MAAMX,EAAQN,KAAKkB,eAAeF,GAElChB,KAAKS,SAAWQ,EAAcjB,KAAKK,kBAAkBC,GAASA,EAC9DN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AqC,IAAA,2CAAKpC,MAAM,kBAAkBG,KAAK,aAEhCJ,EAAA,QAAAqC,IAAA,2CACEpC,MAAM,4FACNU,IAAM2B,GAAUtH,KAAKiD,UAAYqE,EACjClC,KAAK,eAGPJ,EAAA,QAAAqC,IAAA,2CACEpC,MAAM,0FACNU,IAAM2B,GAAUtH,KAAK2C,aAAe2E,EACpClC,KAAK,kBAGNpF,KAAKoB,eACJpB,KAAKkG,cAAclG,KAAKS,SAAUT,KAAKqB,kBAAmBiG,GAAUtH,KAAK0E,eAAiB4C,IAE3FtH,KAAKuF,YAAY,MAAOvF,KAAKS,UAAW8G,GAAWvH,KAAKwB,aAAe+F,IAEvEvH,KAAKoB,eACJpB,KAAKiB,aACLjB,KAAKkG,cAAclG,KAAKmB,SAAUnB,KAAKsB,kBAAmBgG,GAAUtH,KAAK2E,eAAiB2C,IAE3FtH,KAAKiB,aAAejB,KAAKuF,YAAY,MAAOvF,KAAKmB,UAAWoG,GAAWvH,KAAK4B,aAAe2F,KAG7FvH,KAAK6E,YAAY7E,KAAKmB,SAAU,MAAO,oB"}
|
package/dist/beeq/p-c5d2619c.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built by Endavans
|
|
3
|
-
* © https://beeq.design - Apache 2 License.
|
|
4
|
-
*/
|
|
5
|
-
const t=["top","right","bottom","left"];const n=["start","end"];const e=t.reduce(((t,e)=>t.concat(e,e+"-"+n[0],e+"-"+n[1])),[]);const o=Math.min;const s=Math.max;const i=Math.round;const c=Math.floor;const r=t=>({x:t,y:t});const l={left:"right",right:"left",bottom:"top",top:"bottom"};const a={start:"end",end:"start"};function f(t,n,e){return s(t,o(n,e))}function u(t,n){return typeof t==="function"?t(n):t}function d(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function h(t){return t==="x"?"y":"x"}function p(t){return t==="y"?"height":"width"}function y(t){return["top","bottom"].includes(d(t))?"y":"x"}function x(t){return h(y(t))}function g(t,n,e){if(e===void 0){e=false}const o=m(t);const s=x(t);const i=p(s);let c=s==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";if(n.reference[i]>n.floating[i]){c=O(c)}return[c,O(c)]}function w(t){const n=O(t);return[v(t),n,v(n)]}function v(t){return t.replace(/start|end/g,(t=>a[t]))}function b(t,n,e){const o=["left","right"];const s=["right","left"];const i=["top","bottom"];const c=["bottom","top"];switch(t){case"top":case"bottom":if(e)return n?s:o;return n?o:s;case"left":case"right":return n?i:c;default:return[]}}function A(t,n,e,o){const s=m(t);let i=b(d(t),e==="start",o);if(s){i=i.map((t=>t+"-"+s));if(n){i=i.concat(i.map(v))}}return i}function O(t){return t.replace(/left|right|bottom|top/g,(t=>l[t]))}function R(t){return{top:0,right:0,bottom:0,left:0,...t}}function k(t){return typeof t!=="number"?R(t):{top:t,right:t,bottom:t,left:t}}function S(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function D(t,n,e){let{reference:o,floating:s}=t;const i=y(n);const c=x(n);const r=p(c);const l=d(n);const a=i==="y";const f=o.x+o.width/2-s.width/2;const u=o.y+o.height/2-s.height/2;const h=o[r]/2-s[r]/2;let g;switch(l){case"top":g={x:f,y:o.y-s.height};break;case"bottom":g={x:f,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:u};break;case"left":g={x:o.x-s.width,y:u};break;default:g={x:o.x,y:o.y}}switch(m(n)){case"start":g[c]-=h*(e&&a?-1:1);break;case"end":g[c]+=h*(e&&a?-1:1);break}return g}const F=async(t,n,e)=>{const{placement:o="bottom",strategy:s="absolute",middleware:i=[],platform:c}=e;const r=i.filter(Boolean);const l=await(c.isRTL==null?void 0:c.isRTL(n));let a=await c.getElementRects({reference:t,floating:n,strategy:s});let{x:f,y:u}=D(a,o,l);let d=o;let m={};let h=0;for(let e=0;e<r.length;e++){const{name:i,fn:p}=r[e];const{x:y,y:x,data:g,reset:w}=await p({x:f,y:u,initialPlacement:o,placement:d,strategy:s,middlewareData:m,rects:a,platform:c,elements:{reference:t,floating:n}});f=y!=null?y:f;u=x!=null?x:u;m={...m,[i]:{...m[i],...g}};if(w&&h<=50){h++;if(typeof w==="object"){if(w.placement){d=w.placement}if(w.rects){a=w.rects===true?await c.getElementRects({reference:t,floating:n,strategy:s}):w.rects}({x:f,y:u}=D(a,d,l))}e=-1}}return{x:f,y:u,placement:d,strategy:s,middlewareData:m}};async function P(t,n){var e;if(n===void 0){n={}}const{x:o,y:s,platform:i,rects:c,elements:r,strategy:l}=t;const{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=false,padding:h=0}=u(n,t);const p=k(h);const y=d==="floating"?"reference":"floating";const x=r[m?y:d];const g=S(await i.getClippingRect({element:((e=await(i.isElement==null?void 0:i.isElement(x)))!=null?e:true)?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(r.floating)),boundary:a,rootBoundary:f,strategy:l}));const w=d==="floating"?{...c.floating,x:o,y:s}:c.reference;const v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(r.floating));const b=await(i.isElement==null?void 0:i.isElement(v))?await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1}:{x:1,y:1};const A=S(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:r,rect:w,offsetParent:v,strategy:l}):w);return{top:(g.top-A.top+p.top)/b.y,bottom:(A.bottom-g.bottom+p.bottom)/b.y,left:(g.left-A.left+p.left)/b.x,right:(A.right-g.right+p.right)/b.x}}const C=t=>({name:"arrow",options:t,async fn(n){const{x:e,y:s,placement:i,rects:c,platform:r,elements:l,middlewareData:a}=n;const{element:d,padding:h=0}=u(t,n)||{};if(d==null){return{}}const y=k(h);const g={x:e,y:s};const w=x(i);const v=p(w);const b=await r.getDimensions(d);const A=w==="y";const O=A?"top":"left";const R=A?"bottom":"right";const S=A?"clientHeight":"clientWidth";const D=c.reference[v]+c.reference[w]-g[w]-c.floating[v];const F=g[w]-c.reference[w];const P=await(r.getOffsetParent==null?void 0:r.getOffsetParent(d));let C=P?P[S]:0;if(!C||!await(r.isElement==null?void 0:r.isElement(P))){C=l.floating[S]||c.floating[v]}const T=D/2-F/2;const B=C/2-b[v]/2-1;const H=o(y[O],B);const M=o(y[R],B);const z=H;const $=C-b[v]-M;const j=C/2-b[v]/2+T;const L=f(z,j,$);const E=!a.arrow&&m(i)!=null&&j!==L&&c.reference[v]/2-(j<z?H:M)-b[v]/2<0;const I=E?j<z?j-z:j-$:0;return{[w]:g[w]+I,data:{[w]:L,centerOffset:j-L-I,...E&&{alignmentOffset:I}},reset:E}}});function T(t,n,e){const o=t?[...e.filter((n=>m(n)===t)),...e.filter((n=>m(n)!==t))]:e.filter((t=>d(t)===t));return o.filter((e=>{if(t){return m(e)===t||(n?v(e)!==e:false)}return true}))}const B=function(t){if(t===void 0){t={}}return{name:"autoPlacement",options:t,async fn(n){var o,s,i;const{rects:c,middlewareData:r,placement:l,platform:a,elements:f}=n;const{crossAxis:h=false,alignment:p,allowedPlacements:y=e,autoAlignment:x=true,...w}=u(t,n);const v=p!==undefined||y===e?T(p||null,x,y):y;const b=await P(n,w);const A=((o=r.autoPlacement)==null?void 0:o.index)||0;const O=v[A];if(O==null){return{}}const R=g(O,c,await(a.isRTL==null?void 0:a.isRTL(f.floating)));if(l!==O){return{reset:{placement:v[0]}}}const k=[b[d(O)],b[R[0]],b[R[1]]];const S=[...((s=r.autoPlacement)==null?void 0:s.overflows)||[],{placement:O,overflows:k}];const D=v[A+1];if(D){return{data:{index:A+1,overflows:S},reset:{placement:D}}}const F=S.map((t=>{const n=m(t.placement);return[t.placement,n&&h?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1]));const C=F.filter((t=>t[2].slice(0,m(t[0])?2:3).every((t=>t<=0))));const B=((i=C[0])==null?void 0:i[0])||F[0][0];if(B!==l){return{data:{index:A+1,overflows:S},reset:{placement:B}}}return{}}}};const H=function(t){if(t===void 0){t={}}return{name:"flip",options:t,async fn(n){var e,o;const{placement:s,middlewareData:i,rects:c,initialPlacement:r,platform:l,elements:a}=n;const{mainAxis:f=true,crossAxis:m=true,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:x=true,...v}=u(t,n);if((e=i.arrow)!=null&&e.alignmentOffset){return{}}const b=d(s);const R=d(r)===r;const k=await(l.isRTL==null?void 0:l.isRTL(a.floating));const S=h||(R||!x?[O(r)]:w(r));if(!h&&y!=="none"){S.push(...A(r,x,y,k))}const D=[r,...S];const F=await P(n,v);const C=[];let T=((o=i.flip)==null?void 0:o.overflows)||[];if(f){C.push(F[b])}if(m){const t=g(s,c,k);C.push(F[t[0]],F[t[1]])}T=[...T,{placement:s,overflows:C}];if(!C.every((t=>t<=0))){var B,H;const t=(((B=i.flip)==null?void 0:B.index)||0)+1;const n=D[t];if(n){return{data:{index:t,overflows:T},reset:{placement:n}}}let e=(H=T.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])==null?void 0:H.placement;if(!e){switch(p){case"bestFit":{var M;const t=(M=T.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])==null?void 0:M[0];if(t){e=t}break}case"initialPlacement":e=r;break}}if(s!==e){return{reset:{placement:e}}}}return{}}}};function M(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function z(n){return t.some((t=>n[t]>=0))}const $=function(t){if(t===void 0){t={}}return{name:"hide",options:t,async fn(n){const{rects:e}=n;const{strategy:o="referenceHidden",...s}=u(t,n);switch(o){case"referenceHidden":{const t=await P(n,{...s,elementContext:"reference"});const o=M(t,e.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:z(o)}}}case"escaped":{const t=await P(n,{...s,altBoundary:true});const o=M(t,e.floating);return{data:{escapedOffsets:o,escaped:z(o)}}}default:{return{}}}}}};function j(t){const n=o(...t.map((t=>t.left)));const e=o(...t.map((t=>t.top)));const i=s(...t.map((t=>t.right)));const c=s(...t.map((t=>t.bottom)));return{x:n,y:e,width:i-n,height:c-e}}function L(t){const n=t.slice().sort(((t,n)=>t.y-n.y));const e=[];let o=null;for(let t=0;t<n.length;t++){const s=n[t];if(!o||s.y-o.y>o.height/2){e.push([s])}else{e[e.length-1].push(s)}o=s}return e.map((t=>S(j(t))))}const E=function(t){if(t===void 0){t={}}return{name:"inline",options:t,async fn(n){const{placement:e,elements:i,rects:c,platform:r,strategy:l}=n;const{padding:a=2,x:f,y:m}=u(t,n);const h=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(i.reference))||[]);const p=L(h);const x=S(j(h));const g=k(a);function w(){if(p.length===2&&p[0].left>p[1].right&&f!=null&&m!=null){return p.find((t=>f>t.left-g.left&&f<t.right+g.right&&m>t.top-g.top&&m<t.bottom+g.bottom))||x}if(p.length>=2){if(y(e)==="y"){const t=p[0];const n=p[p.length-1];const o=d(e)==="top";const s=t.top;const i=n.bottom;const c=o?t.left:n.left;const r=o?t.right:n.right;const l=r-c;const a=i-s;return{top:s,bottom:i,left:c,right:r,width:l,height:a,x:c,y:s}}const t=d(e)==="left";const n=s(...p.map((t=>t.right)));const i=o(...p.map((t=>t.left)));const c=p.filter((e=>t?e.left===i:e.right===n));const r=c[0].top;const l=c[c.length-1].bottom;const a=i;const f=n;const u=f-a;const m=l-r;return{top:r,bottom:l,left:a,right:f,width:u,height:m,x:a,y:r}}return x}const v=await r.getElementRects({reference:{getBoundingClientRect:w},floating:i.floating,strategy:l});if(c.reference.x!==v.reference.x||c.reference.y!==v.reference.y||c.reference.width!==v.reference.width||c.reference.height!==v.reference.height){return{reset:{rects:v}}}return{}}}};async function I(t,n){const{placement:e,platform:o,elements:s}=t;const i=await(o.isRTL==null?void 0:o.isRTL(s.floating));const c=d(e);const r=m(e);const l=y(e)==="y";const a=["left","top"].includes(c)?-1:1;const f=i&&l?-1:1;const h=u(n,t);let{mainAxis:p,crossAxis:x,alignmentAxis:g}=typeof h==="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};if(r&&typeof g==="number"){x=r==="end"?g*-1:g}return l?{x:x*f,y:p*a}:{x:p*a,y:x*f}}const N=function(t){if(t===void 0){t=0}return{name:"offset",options:t,async fn(n){var e,o;const{x:s,y:i,placement:c,middlewareData:r}=n;const l=await I(n,t);if(c===((e=r.offset)==null?void 0:e.placement)&&(o=r.arrow)!=null&&o.alignmentOffset){return{}}return{x:s+l.x,y:i+l.y,data:{...l,placement:c}}}}};const W=function(t){if(t===void 0){t={}}return{name:"shift",options:t,async fn(n){const{x:e,y:o,placement:s}=n;const{mainAxis:i=true,crossAxis:c=false,limiter:r={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...l}=u(t,n);const a={x:e,y:o};const m=await P(n,l);const p=y(d(s));const x=h(p);let g=a[x];let w=a[p];if(i){const t=x==="y"?"top":"left";const n=x==="y"?"bottom":"right";const e=g+m[t];const o=g-m[n];g=f(e,g,o)}if(c){const t=p==="y"?"top":"left";const n=p==="y"?"bottom":"right";const e=w+m[t];const o=w-m[n];w=f(e,w,o)}const v=r.fn({...n,[x]:g,[p]:w});return{...v,data:{x:v.x-e,y:v.y-o}}}}};const q=function(t){if(t===void 0){t={}}return{options:t,fn(n){const{x:e,y:o,placement:s,rects:i,middlewareData:c}=n;const{offset:r=0,mainAxis:l=true,crossAxis:a=true}=u(t,n);const f={x:e,y:o};const m=y(s);const p=h(m);let x=f[p];let g=f[m];const w=u(r,n);const v=typeof w==="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const t=p==="y"?"height":"width";const n=i.reference[p]-i.floating[t]+v.mainAxis;const e=i.reference[p]+i.reference[t]-v.mainAxis;if(x<n){x=n}else if(x>e){x=e}}if(a){var b,A;const t=p==="y"?"width":"height";const n=["top","left"].includes(d(s));const e=i.reference[m]-i.floating[t]+(n?((b=c.offset)==null?void 0:b[m])||0:0)+(n?0:v.crossAxis);const o=i.reference[m]+i.reference[t]+(n?0:((A=c.offset)==null?void 0:A[m])||0)-(n?v.crossAxis:0);if(g<e){g=e}else if(g>o){g=o}}return{[p]:x,[m]:g}}}};const V=function(t){if(t===void 0){t={}}return{name:"size",options:t,async fn(n){const{placement:e,rects:i,platform:c,elements:r}=n;const{apply:l=(()=>{}),...a}=u(t,n);const f=await P(n,a);const h=d(e);const p=m(e);const x=y(e)==="y";const{width:g,height:w}=i.floating;let v;let b;if(h==="top"||h==="bottom"){v=h;b=p===(await(c.isRTL==null?void 0:c.isRTL(r.floating))?"start":"end")?"left":"right"}else{b=h;v=p==="end"?"top":"bottom"}const A=w-f[v];const O=g-f[b];const R=!n.middlewareData.shift;let k=A;let S=O;if(x){const t=g-f.left-f.right;S=p||R?o(O,t):t}else{const t=w-f.top-f.bottom;k=p||R?o(A,t):t}if(R&&!p){const t=s(f.left,0);const n=s(f.right,0);const e=s(f.top,0);const o=s(f.bottom,0);if(x){S=g-2*(t!==0||n!==0?t+n:s(f.left,f.right))}else{k=w-2*(e!==0||o!==0?e+o:s(f.top,f.bottom))}}await l({...n,availableWidth:S,availableHeight:k});const D=await c.getDimensions(r.floating);if(g!==D.width||w!==D.height){return{reset:{rects:true}}}return{}}}};function X(t){if(G(t)){return(t.nodeName||"").toLowerCase()}return"#document"}function Y(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function _(t){var n;return(n=(G(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function G(t){return t instanceof Node||t instanceof Y(t).Node}function J(t){return t instanceof Element||t instanceof Y(t).Element}function K(t){return t instanceof HTMLElement||t instanceof Y(t).HTMLElement}function Q(t){if(typeof ShadowRoot==="undefined"){return false}return t instanceof ShadowRoot||t instanceof Y(t).ShadowRoot}function U(t){const{overflow:n,overflowX:e,overflowY:o,display:s}=st(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(s)}function Z(t){return["table","td","th"].includes(X(t))}function tt(t){const n=et();const e=st(t);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":false)||!n&&(e.backdropFilter?e.backdropFilter!=="none":false)||!n&&(e.filter?e.filter!=="none":false)||["transform","perspective","filter"].some((t=>(e.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(e.contain||"").includes(t)))}function nt(t){let n=ct(t);while(K(n)&&!ot(n)){if(tt(n)){return n}else{n=ct(n)}}return null}function et(){if(typeof CSS==="undefined"||!CSS.supports)return false;return CSS.supports("-webkit-backdrop-filter","none")}function ot(t){return["html","body","#document"].includes(X(t))}function st(t){return Y(t).getComputedStyle(t)}function it(t){if(J(t)){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ct(t){if(X(t)==="html"){return t}const n=t.assignedSlot||t.parentNode||Q(t)&&t.host||_(t);return Q(n)?n.host:n}function rt(t){const n=ct(t);if(ot(n)){return t.ownerDocument?t.ownerDocument.body:t.body}if(K(n)&&U(n)){return n}return rt(n)}function lt(t,n,e){var o;if(n===void 0){n=[]}if(e===void 0){e=true}const s=rt(t);const i=s===((o=t.ownerDocument)==null?void 0:o.body);const c=Y(s);if(i){return n.concat(c,c.visualViewport||[],U(s)?s:[],c.frameElement&&e?lt(c.frameElement):[])}return n.concat(s,lt(s,[],e))}function at(t){const n=st(t);let e=parseFloat(n.width)||0;let o=parseFloat(n.height)||0;const s=K(t);const c=s?t.offsetWidth:e;const r=s?t.offsetHeight:o;const l=i(e)!==c||i(o)!==r;if(l){e=c;o=r}return{width:e,height:o,$:l}}function ft(t){return!J(t)?t.contextElement:t}function ut(t){const n=ft(t);if(!K(n)){return r(1)}const e=n.getBoundingClientRect();const{width:o,height:s,$:c}=at(n);let l=(c?i(e.width):e.width)/o;let a=(c?i(e.height):e.height)/s;if(!l||!Number.isFinite(l)){l=1}if(!a||!Number.isFinite(a)){a=1}return{x:l,y:a}}const dt=r(0);function mt(t){const n=Y(t);if(!et()||!n.visualViewport){return dt}return{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function ht(t,n,e){if(n===void 0){n=false}if(!e||n&&e!==Y(t)){return false}return n}function pt(t,n,e,o){if(n===void 0){n=false}if(e===void 0){e=false}const s=t.getBoundingClientRect();const i=ft(t);let c=r(1);if(n){if(o){if(J(o)){c=ut(o)}}else{c=ut(t)}}const l=ht(i,e,o)?mt(i):r(0);let a=(s.left+l.x)/c.x;let f=(s.top+l.y)/c.y;let u=s.width/c.x;let d=s.height/c.y;if(i){const t=Y(i);const n=o&&J(o)?Y(o):o;let e=t;let s=e.frameElement;while(s&&o&&n!==e){const t=ut(s);const n=s.getBoundingClientRect();const o=st(s);const i=n.left+(s.clientLeft+parseFloat(o.paddingLeft))*t.x;const c=n.top+(s.clientTop+parseFloat(o.paddingTop))*t.y;a*=t.x;f*=t.y;u*=t.x;d*=t.y;a+=i;f+=c;e=Y(s);s=e.frameElement}}return S({width:u,height:d,x:a,y:f})}const yt=[":popover-open",":modal"];function xt(t){return yt.some((n=>{try{return t.matches(n)}catch(t){return false}}))}function gt(t){let{elements:n,rect:e,offsetParent:o,strategy:s}=t;const i=s==="fixed";const c=_(o);const l=n?xt(n.floating):false;if(o===c||l&&i){return e}let a={scrollLeft:0,scrollTop:0};let f=r(1);const u=r(0);const d=K(o);if(d||!d&&!i){if(X(o)!=="body"||U(c)){a=it(o)}if(K(o)){const t=pt(o);f=ut(o);u.x=t.x+o.clientLeft;u.y=t.y+o.clientTop}}return{width:e.width*f.x,height:e.height*f.y,x:e.x*f.x-a.scrollLeft*f.x+u.x,y:e.y*f.y-a.scrollTop*f.y+u.y}}function wt(t){return Array.from(t.getClientRects())}function vt(t){return pt(_(t)).left+it(t).scrollLeft}function bt(t){const n=_(t);const e=it(t);const o=t.ownerDocument.body;const i=s(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth);const c=s(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let r=-e.scrollLeft+vt(t);const l=-e.scrollTop;if(st(o).direction==="rtl"){r+=s(n.clientWidth,o.clientWidth)-i}return{width:i,height:c,x:r,y:l}}function At(t,n){const e=Y(t);const o=_(t);const s=e.visualViewport;let i=o.clientWidth;let c=o.clientHeight;let r=0;let l=0;if(s){i=s.width;c=s.height;const t=et();if(!t||t&&n==="fixed"){r=s.offsetLeft;l=s.offsetTop}}return{width:i,height:c,x:r,y:l}}function Ot(t,n){const e=pt(t,true,n==="fixed");const o=e.top+t.clientTop;const s=e.left+t.clientLeft;const i=K(t)?ut(t):r(1);const c=t.clientWidth*i.x;const l=t.clientHeight*i.y;const a=s*i.x;const f=o*i.y;return{width:c,height:l,x:a,y:f}}function Rt(t,n,e){let o;if(n==="viewport"){o=At(t,e)}else if(n==="document"){o=bt(_(t))}else if(J(n)){o=Ot(n,e)}else{const e=mt(t);o={...n,x:n.x-e.x,y:n.y-e.y}}return S(o)}function kt(t,n){const e=ct(t);if(e===n||!J(e)||ot(e)){return false}return st(e).position==="fixed"||kt(e,n)}function St(t,n){const e=n.get(t);if(e){return e}let o=lt(t,[],false).filter((t=>J(t)&&X(t)!=="body"));let s=null;const i=st(t).position==="fixed";let c=i?ct(t):t;while(J(c)&&!ot(c)){const n=st(c);const e=tt(c);if(!e&&n.position==="fixed"){s=null}const r=i?!e&&!s:!e&&n.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||U(c)&&!e&&kt(t,c);if(r){o=o.filter((t=>t!==c))}else{s=n}c=ct(c)}n.set(t,o);return o}function Dt(t){let{element:n,boundary:e,rootBoundary:i,strategy:c}=t;const r=e==="clippingAncestors"?St(n,this._c):[].concat(e);const l=[...r,i];const a=l[0];const f=l.reduce(((t,e)=>{const i=Rt(n,e,c);t.top=s(i.top,t.top);t.right=o(i.right,t.right);t.bottom=o(i.bottom,t.bottom);t.left=s(i.left,t.left);return t}),Rt(n,a,c));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Ft(t){const{width:n,height:e}=at(t);return{width:n,height:e}}function Pt(t,n,e){const o=K(n);const s=_(n);const i=e==="fixed";const c=pt(t,true,i,n);let l={scrollLeft:0,scrollTop:0};const a=r(0);if(o||!o&&!i){if(X(n)!=="body"||U(s)){l=it(n)}if(o){const t=pt(n,true,i,n);a.x=t.x+n.clientLeft;a.y=t.y+n.clientTop}else if(s){a.x=vt(s)}}const f=c.left+l.scrollLeft-a.x;const u=c.top+l.scrollTop-a.y;return{x:f,y:u,width:c.width,height:c.height}}function Ct(t,n){if(!K(t)||st(t).position==="fixed"){return null}if(n){return n(t)}return t.offsetParent}function Tt(t,n){const e=Y(t);if(!K(t)||xt(t)){return e}let o=Ct(t,n);while(o&&Z(o)&&st(o).position==="static"){o=Ct(o,n)}if(o&&(X(o)==="html"||X(o)==="body"&&st(o).position==="static"&&!tt(o))){return e}return o||nt(t)||e}const Bt=async function(t){const n=this.getOffsetParent||Tt;const e=this.getDimensions;return{reference:Pt(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,...await e(t.floating)}}};function Ht(t){return st(t).direction==="rtl"}const Mt={convertOffsetParentRelativeRectToViewportRelativeRect:gt,getDocumentElement:_,getClippingRect:Dt,getOffsetParent:Tt,getElementRects:Bt,getClientRects:wt,getDimensions:Ft,getScale:ut,isElement:J,isRTL:Ht};function zt(t,n){let e=null;let i;const r=_(t);function l(){var t;clearTimeout(i);(t=e)==null||t.disconnect();e=null}function a(f,u){if(f===void 0){f=false}if(u===void 0){u=1}l();const{left:d,top:m,width:h,height:p}=t.getBoundingClientRect();if(!f){n()}if(!h||!p){return}const y=c(m);const x=c(r.clientWidth-(d+h));const g=c(r.clientHeight-(m+p));const w=c(d);const v=-y+"px "+-x+"px "+-g+"px "+-w+"px";const b={rootMargin:v,threshold:s(0,o(1,u))||1};let A=true;function O(t){const n=t[0].intersectionRatio;if(n!==u){if(!A){return a()}if(!n){i=setTimeout((()=>{a(false,1e-7)}),100)}else{a(false,n)}}A=false}try{e=new IntersectionObserver(O,{...b,root:r.ownerDocument})}catch(t){e=new IntersectionObserver(O,b)}e.observe(t)}a(true);return l}function $t(t,n,e,o){if(o===void 0){o={}}const{ancestorScroll:s=true,ancestorResize:i=true,elementResize:c=typeof ResizeObserver==="function",layoutShift:r=typeof IntersectionObserver==="function",animationFrame:l=false}=o;const a=ft(t);const f=s||i?[...a?lt(a):[],...lt(n)]:[];f.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:true});i&&t.addEventListener("resize",e)}));const u=a&&r?zt(a,e):null;let d=-1;let m=null;if(c){m=new ResizeObserver((t=>{let[o]=t;if(o&&o.target===a&&m){m.unobserve(n);cancelAnimationFrame(d);d=requestAnimationFrame((()=>{var t;(t=m)==null||t.observe(n)}))}e()}));if(a&&!l){m.observe(a)}m.observe(n)}let h;let p=l?pt(t):null;if(l){y()}function y(){const n=pt(t);if(p&&(n.x!==p.x||n.y!==p.y||n.width!==p.width||n.height!==p.height)){e()}p=n;h=requestAnimationFrame(y)}e();return()=>{var t;f.forEach((t=>{s&&t.removeEventListener("scroll",e);i&&t.removeEventListener("resize",e)}));u==null||u();(t=m)==null||t.disconnect();m=null;if(l){cancelAnimationFrame(h)}}}B;const jt=W;const Lt=H;const Et=V;const It=$;const Nt=C;E;q;const Wt=(t,n,e)=>{const o=new Map;const s={platform:Mt,...e};const i={...s.platform,_c:o};return F(t,n,{...s,platform:i})};class qt{constructor(t,n,e){this.trigger=t;this.panel=n;this.options={distance:20,placement:"bottom",strategy:"fixed",sameWidth:false,...e};this.init(e)}init(t){this.options=Object.assign(this.options,t);this.update()}update(){this.cleanUp=$t(this.trigger,this.panel,(()=>{(async()=>{const{x:t,y:n,placement:e,middlewareData:o}=await Wt(this.trigger,this.panel,{placement:this.options.placement,strategy:this.options.strategy,middleware:[N({mainAxis:this.options.distance,crossAxis:this.options.skidding}),Lt(),jt(),Et(this.options.sameWidth&&{apply({rects:t,elements:n}){Object.assign(n.floating.style,{width:`${t.reference.width}px`})}}),Nt({element:this.options.arrow||null}),this.positionChange(),It()]});Object.assign(this.panel.style,{top:"0",left:"0",transform:`translate(${this.roundByDPR(t)}px,${this.roundByDPR(n)}px)`});if(this.options.arrow){const{x:t,y:n}=o.arrow;const s={top:"bottom",right:"left",bottom:"top",left:"right"}[e.split("-")[0]];Object.assign(this.options.arrow.style,{left:t!=null?`${t}px`:"",top:n!=null?`${n}px`:"",right:"",bottom:"",[s]:"-4px"})}const{referenceHidden:s}=o.hide;Object.assign(this.panel.style,{visibility:s?"hidden":"visible"})})()}))}destroy(){if(!this.cleanUp)return;this.cleanUp()}positionChange(){return{name:"positionChange",fn:({placement:t})=>{if(typeof this.options.onPositionChange!=="function")return{};this.options.onPositionChange(t);return{}}}}roundByDPR(t){const n=window.devicePixelRatio||1;return Math.round(t*n)/n}}export{qt as F};
|
|
6
|
-
//# sourceMappingURL=p-c5d2619c.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["sides","alignments","placements","reduce","acc","side","concat","min","Math","max","round","floor","createCoords","v","x","y","oppositeSideMap","left","right","bottom","top","oppositeAlignmentMap","start","end","clamp","value","evaluate","param","getSide","placement","split","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","includes","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","reference","floating","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","replace","getSideList","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","direction","list","map","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","width","height","computeCoordsFromPlacement","_ref","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","async","config","strategy","middleware","platform","validMiddleware","filter","Boolean","isRTL","getElementRects","statefulPlacement","middlewareData","resetCount","i","name","fn","nextX","nextY","data","reset","initialPlacement","elements","detectOverflow","state","options","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","altContext","element","clippingClientRect","getClippingRect","isElement","contextElement","getDocumentElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","arrow","arrowDimensions","getDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","offset","shouldAddOffset","alignmentOffset","centerOffset","getPlacementList","autoAlignment","allowedPlacements","allowedPlacementsSortedByAlignment","autoPlacement","_middlewareData$autoP","_middlewareData$autoP2","_placementsThatFitOnE","crossAxis","detectOverflowOptions","placements$1","undefined","overflow","currentIndex","index","currentPlacement","alignmentSides","currentOverflows","allOverflows","overflows","nextPlacement","placementsSortedByMostSpace","d","slice","sort","a","b","placementsThatFitOnEachSide","every","resetPlacement","flip","_middlewareData$arrow","_middlewareData$flip","mainAxis","checkMainAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","isBasePlacement","push","overflowsData","_middlewareData$flip2","_overflowsData$filter","nextIndex","_overflowsData$map$so","getSideOffsets","isAnySideFullyClipped","some","hide","offsets","referenceHiddenOffsets","referenceHidden","escapedOffsets","escaped","getBoundingRect","minX","minY","maxX","maxY","getRectsByLine","sortedRects","groups","prevRect","inline","nativeClientRects","Array","from","getClientRects","clientRects","fallback","getBoundingClientRect","find","firstRect","lastRect","isTop","isLeftSide","maxRight","minLeft","measureRects","resetRects","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","_middlewareData$offse","diffCoords","shift","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","limitShift","rawOffset","computedOffset","len","limitMin","limitMax","_middlewareData$offse2","isOriginSide","size","apply","heightSide","widthSide","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","maximumClippingWidth","maximumClippingHeight","xMin","xMax","yMin","yMax","nextDimensions","getNodeName","node","isNode","nodeName","toLowerCase","getWindow","_node$ownerDocument","ownerDocument","defaultView","window","document","documentElement","Node","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","isOverflowElement","overflowX","overflowY","display","getComputedStyle","test","isTableElement","isContainingBlock","webkit","isWebKit","css","transform","perspective","containerType","backdropFilter","willChange","contain","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","CSS","supports","getNodeScroll","scrollLeft","scrollTop","pageXOffset","pageYOffset","result","assignedSlot","parentNode","host","getNearestOverflowAncestor","body","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","visualViewport","frameElement","getCssDimensions","parseFloat","hasOffset","offsetWidth","offsetHeight","shouldFallback","$","unwrapElement","domElement","Number","isFinite","noOffsets","getVisualOffsets","offsetLeft","offsetTop","shouldAddVisualOffsets","isFixed","floatingOffsetParent","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","topLayerSelectors","isTopLayer","selector","matches","e","topLayer","scroll","isOffsetParentAnElement","offsetRect","getWindowScrollBarX","getDocumentRect","html","scrollWidth","clientWidth","scrollHeight","clientHeight","getViewportRect","visualViewportBased","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","position","getClippingElementAncestors","cache","cachedResult","get","el","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","shouldDropCurrentNode","ancestor","set","elementClippingAncestors","this","_c","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getRectRelativeToOffsetParent","getTrueOffsetParent","polyfill","getOffsetParentFn","getDimensionsFn","observeMove","onMove","io","timeoutId","root","cleanup","_io","clearTimeout","disconnect","refresh","skip","threshold","insetTop","insetRight","insetBottom","insetLeft","rootMargin","isFirstUpdate","handleObserve","entries","ratio","intersectionRatio","setTimeout","IntersectionObserver","observe","autoUpdate","update","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","animationFrame","referenceEl","ancestors","forEach","addEventListener","passive","cleanupIo","reobserveFrame","resizeObserver","firstEntry","target","unobserve","cancelAnimationFrame","requestAnimationFrame","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","removeEventListener","autoPlacement$1","shift$1","flip$1","size$1","hide$1","arrow$1","inline$1","limitShift$1","Map","mergedOptions","platformWithCache","computePosition$1","FloatingUI","constructor","trigger","panel","distance","sameWidth","init","Object","assign","cleanUp","skidding","style","positionChange","roundByDPR","arrowX","arrowY","staticSide","visibility","destroy","onPositionChange","dpr","devicePixelRatio"],"sources":["../../node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js","../../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","../../node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js","../../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","../../packages/beeq/src/services/libraries/floating-ui/index.ts"],"sourcesContent":["/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n","import { rectToClientRect, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { detectOverflow, offset } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = currentWin.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = currentWin.frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(floating) {\n return topLayerSelectors.some(selector => {\n try {\n return floating.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element) || isTopLayer(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(data.floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, flip, hide, inline, limitShift, platform, shift, size };\n","import {\n arrow,\n autoUpdate,\n computePosition,\n flip,\n hide,\n offset,\n ReferenceElement,\n shift,\n size,\n} from '@floating-ui/dom';\n\nimport { FloatingUIOptions } from '../../interfaces';\n\nexport class FloatingUI {\n panel: HTMLElement;\n trigger: ReferenceElement;\n options: FloatingUIOptions;\n cleanUp: () => void;\n\n constructor(trigger: ReferenceElement, panel: HTMLElement, options?: FloatingUIOptions) {\n this.trigger = trigger;\n this.panel = panel;\n this.options = {\n distance: 20,\n placement: 'bottom',\n strategy: 'fixed',\n sameWidth: false,\n ...options,\n };\n this.init(options);\n }\n\n init(options: FloatingUIOptions) {\n this.options = Object.assign(this.options, options);\n this.update();\n }\n\n update() {\n this.cleanUp = autoUpdate(this.trigger, this.panel, () => {\n (async () => {\n const { x, y, placement, middlewareData } = await computePosition(this.trigger, this.panel, {\n placement: this.options.placement,\n strategy: this.options.strategy,\n middleware: [\n offset({ mainAxis: this.options.distance, crossAxis: this.options.skidding }),\n flip(),\n shift(),\n size(\n this.options.sameWidth && {\n apply({ rects, elements }) {\n Object.assign(elements.floating.style, {\n width: `${rects.reference.width}px`,\n });\n },\n },\n ),\n arrow({ element: this.options.arrow || null }),\n this.positionChange(),\n hide(),\n ],\n });\n\n Object.assign(this.panel.style, {\n top: '0',\n left: '0',\n transform: `translate(${this.roundByDPR(x)}px,${this.roundByDPR(y)}px)`,\n });\n\n if (this.options.arrow) {\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n const staticSide = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[placement.split('-')[0]];\n\n Object.assign(this.options.arrow.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n right: '',\n bottom: '',\n [staticSide]: '-4px',\n });\n }\n\n const { referenceHidden } = middlewareData.hide;\n Object.assign(this.panel.style, {\n visibility: referenceHidden ? 'hidden' : 'visible',\n });\n })();\n });\n }\n\n destroy() {\n if (!this.cleanUp) return;\n this.cleanUp();\n }\n\n positionChange() {\n return {\n name: 'positionChange',\n fn: ({ placement: position }) => {\n if (typeof this.options.onPositionChange !== 'function') return {};\n this.options.onPositionChange(position);\n return {};\n },\n };\n }\n\n private roundByDPR(value: number) {\n const dpr = window.devicePixelRatio || 1;\n return Math.round(value * dpr) / dpr;\n }\n}\n"],"mappings":";;;;AAKA,MAAMA,EAAQ,CAAC,MAAO,QAAS,SAAU,QACzC,MAAMC,EAAa,CAAC,QAAS,OAC7B,MAAMC,EAA0BF,EAAMG,QAAO,CAACC,EAAKC,IAASD,EAAIE,OAAOD,EAAMA,EAAO,IAAMJ,EAAW,GAAII,EAAO,IAAMJ,EAAW,KAAK,IACtI,MAAMM,EAAMC,KAAKD,IACjB,MAAME,EAAMD,KAAKC,IACjB,MAAMC,EAAQF,KAAKE,MACnB,MAAMC,EAAQH,KAAKG,MACnB,MAAMC,EAAeC,IAAC,CACpBC,EAAGD,EACHE,EAAGF,IAEL,MAAMG,EAAkB,CACtBC,KAAM,QACNC,MAAO,OACPC,OAAQ,MACRC,IAAK,UAEP,MAAMC,EAAuB,CAC3BC,MAAO,MACPC,IAAK,SAEP,SAASC,EAAMF,EAAOG,EAAOF,GAC3B,OAAOd,EAAIa,EAAOf,EAAIkB,EAAOF,GAC/B,CACA,SAASG,EAASD,EAAOE,GACvB,cAAcF,IAAU,WAAaA,EAAME,GAASF,CACtD,CACA,SAASG,EAAQC,GACf,OAAOA,EAAUC,MAAM,KAAK,EAC9B,CACA,SAASC,EAAaF,GACpB,OAAOA,EAAUC,MAAM,KAAK,EAC9B,CACA,SAASE,EAAgBC,GACvB,OAAOA,IAAS,IAAM,IAAM,GAC9B,CACA,SAASC,EAAcD,GACrB,OA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