@adyen/bento-vue2 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +43 -0
- package/dist/@types/packages/vue2/src/components/action-bar/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/alert/alert.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/avatar-image/avatar-image.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/button.vue.d.ts +290 -281
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/checkbox/components/checkbox-group/checkbox-group.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/country/country.vue.d.ts +4 -3
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +53 -70
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +20 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +20 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +45 -27
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +24 -6
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +21 -3
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.types.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +22 -4
- package/dist/@types/packages/vue2/src/components/empty-state/empty-state.vue.d.ts +5 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +234 -12
- package/dist/@types/packages/vue2/src/components/filter-bar/components/boolean-filter/boolean-filter.vue.d.ts +12 -5
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +12 -2
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-field-tip/form-layout-field-tip.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/header/header.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/info-icon/info-icon.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/calendar-month.vue.d.ts +19 -0
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/fixed-scroller/fixed-scroller.vue.d.ts +22 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +94 -8
- package/dist/@types/packages/vue2/src/components/internal/teleport/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/teleport/teleport.vue.d.ts +50 -0
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/menu/menu.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/menu/menu.vue.d.ts +15 -11
- package/dist/@types/packages/vue2/src/components/pagination/components/pagination-context/pagination-context.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/payment-method/payment-method.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/radio-group/radio-group.vue.d.ts +10 -5
- package/dist/@types/packages/vue2/src/components/segmented-control/components/segmented-control-button/segmented-control-button.vue.d.ts +21 -0
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +21 -5
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +1 -2
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/components/tab.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tabs/tabs.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +5 -5
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +6 -3
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +9 -2
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/components/tutorial-indicator/tutorial-indicator.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/tutorial/components/tutorial-popover/tutorial-popover.vue.d.ts +226 -0
- package/dist/@types/packages/vue2/src/components/tutorial/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/tutorial/tutorial.vue.d.ts +16 -0
- package/dist/@types/packages/vue2/src/composables/index.d.ts +5 -2
- package/dist/@types/packages/vue2/src/composables/use-click-outside/use-click-outside.d.ts +3 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.d.ts +12 -0
- package/dist/@types/packages/vue2/src/composables/use-form-validate/use-form.types.d.ts +5 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.d.ts +15 -0
- package/dist/@types/packages/vue2/src/composables/use-virtual-list/use-virtual-list.types.d.ts +20 -0
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/types/listbox.d.ts +12 -0
- package/dist/accordion.js +41 -32
- package/dist/accordion.js.map +1 -1
- package/dist/action-bar.js +191 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/alert.js +3 -3
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions-with-menu.css +1 -0
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/checkmark.css +1 -0
- package/dist/assets/chevron-left.css +1 -0
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/fixed-scroller.css +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/assets/refresh.css +1 -0
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +21 -14
- package/dist/button.js.map +1 -1
- package/dist/card.js +54 -54
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.d1ba66cd.js → base-button.7886a7e6.js} +2 -2
- package/dist/chunks/{base-button.d1ba66cd.js.map → base-button.7886a7e6.js.map} +1 -1
- package/dist/chunks/{base-modal.ec74044e.js → base-modal.88e7b9d4.js} +4 -4
- package/dist/chunks/{base-modal.ec74044e.js.map → base-modal.88e7b9d4.js.map} +1 -1
- package/dist/chunks/button-actions-with-menu.a5413243.js +105 -0
- package/dist/chunks/button-actions-with-menu.a5413243.js.map +1 -0
- package/dist/chunks/button.e09d5980.js +125 -0
- package/dist/chunks/button.e09d5980.js.map +1 -0
- package/dist/chunks/{calendar.b74f8a0f.js → calendar.24d0ac04.js} +294 -272
- package/dist/chunks/calendar.24d0ac04.js.map +1 -0
- package/dist/chunks/{checkbox.96ee3f71.js → checkbox.5343e28e.js} +7 -7
- package/dist/chunks/{checkbox.96ee3f71.js.map → checkbox.5343e28e.js.map} +1 -1
- package/dist/chunks/checkmark.78f3ed9c.js +26 -0
- package/dist/chunks/checkmark.78f3ed9c.js.map +1 -0
- package/dist/chunks/{chevron-right.3b826337.js → chevron-left.c10778d3.js} +8 -8
- package/dist/chunks/chevron-left.c10778d3.js.map +1 -0
- package/dist/chunks/{controls-group.e9537e45.js → controls-group.2a21bd83.js} +2 -2
- package/dist/chunks/{controls-group.e9537e45.js.map → controls-group.2a21bd83.js.map} +1 -1
- package/dist/chunks/{copy.2ff56819.js → copy.346eadb1.js} +4 -4
- package/dist/chunks/{copy.2ff56819.js.map → copy.346eadb1.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.3df0bf23.js → dropdown-default-textbox.25134789.js} +4 -4
- package/dist/chunks/dropdown-default-textbox.25134789.js.map +1 -0
- package/dist/chunks/{dropdown.3f198167.js → dropdown.f1253a54.js} +111 -81
- package/dist/chunks/dropdown.f1253a54.js.map +1 -0
- package/dist/chunks/{error-message.f5454f19.js → error-message.8302a46c.js} +2 -2
- package/dist/chunks/{error-message.f5454f19.js.map → error-message.8302a46c.js.map} +1 -1
- package/dist/chunks/fixed-scroller.8994e30a.js +108 -0
- package/dist/chunks/fixed-scroller.8994e30a.js.map +1 -0
- package/dist/chunks/{footer-actions.00d20947.js → footer-actions.c9b2cb74.js} +3 -3
- package/dist/chunks/{footer-actions.00d20947.js.map → footer-actions.c9b2cb74.js.map} +1 -1
- package/dist/chunks/{index.c39c64c9.js → index.2625175a.js} +2 -2
- package/dist/chunks/{index.c39c64c9.js.map → index.2625175a.js.map} +1 -1
- package/dist/chunks/index.37283390.js +475 -0
- package/dist/chunks/index.37283390.js.map +1 -0
- package/dist/chunks/index.8ac70774.js +1328 -0
- package/dist/chunks/index.8ac70774.js.map +1 -0
- package/dist/chunks/{index.2fce7703.js → index.965ac1af.js} +2 -2
- package/dist/chunks/{index.2fce7703.js.map → index.965ac1af.js.map} +1 -1
- package/dist/chunks/{index.eb52e785.js → index.a201f750.js} +6 -5
- package/dist/chunks/{index.eb52e785.js.map → index.a201f750.js.map} +1 -1
- package/dist/chunks/{index.a709a6b0.js → index.b83f8b7e.js} +2 -2
- package/dist/chunks/{index.a709a6b0.js.map → index.b83f8b7e.js.map} +1 -1
- package/dist/chunks/{index.298f5eed.js → index.d6b5f5e1.js} +6 -6
- package/dist/chunks/{index.298f5eed.js.map → index.d6b5f5e1.js.map} +1 -1
- package/dist/chunks/{index.31949c1a.js → index.e566354f.js} +91 -74
- package/dist/chunks/index.e566354f.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.1362a2d7.js → listbox-option-tag.6a09e8e2.js} +8 -7
- package/dist/chunks/{listbox-option-tag.1362a2d7.js.map → listbox-option-tag.6a09e8e2.js.map} +1 -1
- package/dist/chunks/{listbox.e7bf46e4.js → listbox.73c38f38.js} +479 -385
- package/dist/chunks/listbox.73c38f38.js.map +1 -0
- package/dist/chunks/{loading-button.0ad06c99.js → loading-button.c65682d6.js} +2 -2
- package/dist/chunks/{loading-button.0ad06c99.js.map → loading-button.c65682d6.js.map} +1 -1
- package/dist/chunks/refresh.eb485c6f.js +26 -0
- package/dist/chunks/refresh.eb485c6f.js.map +1 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js +5 -0
- package/dist/chunks/summary-grid.keys.1d1028c2.js.map +1 -0
- package/dist/chunks/{tooltip.68e81e9c.js → tooltip.104e5fac.js} +39 -36
- package/dist/chunks/{tooltip.68e81e9c.js.map → tooltip.104e5fac.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +537 -528
- package/dist/country.js.map +1 -1
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +10 -10
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +99 -89
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +8 -7
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +500 -486
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +104 -183
- package/dist/header.js.map +1 -1
- package/dist/image.js +3 -3
- package/dist/index.js +171 -169
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +7 -7
- package/dist/internal.js +20 -106
- package/dist/internal.js.map +1 -1
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +3 -466
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +3 -3
- package/dist/pagination.js +40 -26
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +33 -26
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +4 -4
- package/dist/popper-container.js +6 -1270
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +97 -81
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +100 -70
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +53 -51
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +109 -119
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +81 -71
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +170 -162
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +3 -3
- package/dist/toggle.js +6 -6
- package/dist/tutorial.js +307 -0
- package/dist/tutorial.js.map +1 -0
- package/dist/typography.js +1 -1
- package/dist/web-types.json +828 -122
- package/package.json +7 -4
- package/dist/assets/chevron-right.css +0 -1
- package/dist/chunks/button.eb60d460.js +0 -117
- package/dist/chunks/button.eb60d460.js.map +0 -1
- package/dist/chunks/calendar.b74f8a0f.js.map +0 -1
- package/dist/chunks/chevron-right.3b826337.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.3df0bf23.js.map +0 -1
- package/dist/chunks/dropdown.3f198167.js.map +0 -1
- package/dist/chunks/index.31949c1a.js.map +0 -1
- package/dist/chunks/listbox.e7bf46e4.js.map +0 -1
|
@@ -0,0 +1,1328 @@
|
|
|
1
|
+
import { unref as G, computed as R, ref as I, shallowRef as Xt, watch as Z, getCurrentScope as Yt, onScopeDispose as qt, shallowReadonly as q, defineComponent as Gt, toRefs as Kt } from "vue";
|
|
2
|
+
import "./index.af05ced4.js";
|
|
3
|
+
import { B as Jt } from "./index.2625175a.js";
|
|
4
|
+
import { n as Qt } from "./_plugin-vue2_normalizer.71e2aa87.js";
|
|
5
|
+
import "../assets/index6.css";
|
|
6
|
+
const Lt = ["top", "right", "bottom", "left"], yt = ["start", "end"], xt = /* @__PURE__ */ Lt.reduce((t, e) => t.concat(e, e + "-" + yt[0], e + "-" + yt[1]), []), J = Math.min, U = Math.max, it = Math.round, ot = Math.floor, z = (t) => ({
|
|
7
|
+
x: t,
|
|
8
|
+
y: t
|
|
9
|
+
}), Zt = {
|
|
10
|
+
left: "right",
|
|
11
|
+
right: "left",
|
|
12
|
+
bottom: "top",
|
|
13
|
+
top: "bottom"
|
|
14
|
+
}, te = {
|
|
15
|
+
start: "end",
|
|
16
|
+
end: "start"
|
|
17
|
+
};
|
|
18
|
+
function ut(t, e, n) {
|
|
19
|
+
return U(t, J(e, n));
|
|
20
|
+
}
|
|
21
|
+
function Y(t, e) {
|
|
22
|
+
return typeof t == "function" ? t(e) : t;
|
|
23
|
+
}
|
|
24
|
+
function H(t) {
|
|
25
|
+
return t.split("-")[0];
|
|
26
|
+
}
|
|
27
|
+
function B(t) {
|
|
28
|
+
return t.split("-")[1];
|
|
29
|
+
}
|
|
30
|
+
function Dt(t) {
|
|
31
|
+
return t === "x" ? "y" : "x";
|
|
32
|
+
}
|
|
33
|
+
function mt(t) {
|
|
34
|
+
return t === "y" ? "height" : "width";
|
|
35
|
+
}
|
|
36
|
+
function ct(t) {
|
|
37
|
+
return ["top", "bottom"].includes(H(t)) ? "y" : "x";
|
|
38
|
+
}
|
|
39
|
+
function pt(t) {
|
|
40
|
+
return Dt(ct(t));
|
|
41
|
+
}
|
|
42
|
+
function Pt(t, e, n) {
|
|
43
|
+
n === void 0 && (n = !1);
|
|
44
|
+
const o = B(t), i = pt(t), s = mt(i);
|
|
45
|
+
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
46
|
+
return e.reference[s] > e.floating[s] && (r = st(r)), [r, st(r)];
|
|
47
|
+
}
|
|
48
|
+
function ee(t) {
|
|
49
|
+
const e = st(t);
|
|
50
|
+
return [rt(t), e, rt(e)];
|
|
51
|
+
}
|
|
52
|
+
function rt(t) {
|
|
53
|
+
return t.replace(/start|end/g, (e) => te[e]);
|
|
54
|
+
}
|
|
55
|
+
function ne(t, e, n) {
|
|
56
|
+
const o = ["left", "right"], i = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
57
|
+
switch (t) {
|
|
58
|
+
case "top":
|
|
59
|
+
case "bottom":
|
|
60
|
+
return n ? e ? i : o : e ? o : i;
|
|
61
|
+
case "left":
|
|
62
|
+
case "right":
|
|
63
|
+
return e ? s : r;
|
|
64
|
+
default:
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function oe(t, e, n, o) {
|
|
69
|
+
const i = B(t);
|
|
70
|
+
let s = ne(H(t), n === "start", o);
|
|
71
|
+
return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(rt)))), s;
|
|
72
|
+
}
|
|
73
|
+
function st(t) {
|
|
74
|
+
return t.replace(/left|right|bottom|top/g, (e) => Zt[e]);
|
|
75
|
+
}
|
|
76
|
+
function ie(t) {
|
|
77
|
+
return {
|
|
78
|
+
top: 0,
|
|
79
|
+
right: 0,
|
|
80
|
+
bottom: 0,
|
|
81
|
+
left: 0,
|
|
82
|
+
...t
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function Ft(t) {
|
|
86
|
+
return typeof t != "number" ? ie(t) : {
|
|
87
|
+
top: t,
|
|
88
|
+
right: t,
|
|
89
|
+
bottom: t,
|
|
90
|
+
left: t
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function lt(t) {
|
|
94
|
+
return {
|
|
95
|
+
...t,
|
|
96
|
+
top: t.y,
|
|
97
|
+
left: t.x,
|
|
98
|
+
right: t.x + t.width,
|
|
99
|
+
bottom: t.y + t.height
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function bt(t, e, n) {
|
|
103
|
+
let {
|
|
104
|
+
reference: o,
|
|
105
|
+
floating: i
|
|
106
|
+
} = t;
|
|
107
|
+
const s = ct(e), r = pt(e), l = mt(r), a = H(e), c = s === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, p = o[l] / 2 - i[l] / 2;
|
|
108
|
+
let f;
|
|
109
|
+
switch (a) {
|
|
110
|
+
case "top":
|
|
111
|
+
f = {
|
|
112
|
+
x: u,
|
|
113
|
+
y: o.y - i.height
|
|
114
|
+
};
|
|
115
|
+
break;
|
|
116
|
+
case "bottom":
|
|
117
|
+
f = {
|
|
118
|
+
x: u,
|
|
119
|
+
y: o.y + o.height
|
|
120
|
+
};
|
|
121
|
+
break;
|
|
122
|
+
case "right":
|
|
123
|
+
f = {
|
|
124
|
+
x: o.x + o.width,
|
|
125
|
+
y: d
|
|
126
|
+
};
|
|
127
|
+
break;
|
|
128
|
+
case "left":
|
|
129
|
+
f = {
|
|
130
|
+
x: o.x - i.width,
|
|
131
|
+
y: d
|
|
132
|
+
};
|
|
133
|
+
break;
|
|
134
|
+
default:
|
|
135
|
+
f = {
|
|
136
|
+
x: o.x,
|
|
137
|
+
y: o.y
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
switch (B(e)) {
|
|
141
|
+
case "start":
|
|
142
|
+
f[r] -= p * (n && c ? -1 : 1);
|
|
143
|
+
break;
|
|
144
|
+
case "end":
|
|
145
|
+
f[r] += p * (n && c ? -1 : 1);
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
return f;
|
|
149
|
+
}
|
|
150
|
+
const re = async (t, e, n) => {
|
|
151
|
+
const {
|
|
152
|
+
placement: o = "bottom",
|
|
153
|
+
strategy: i = "absolute",
|
|
154
|
+
middleware: s = [],
|
|
155
|
+
platform: r
|
|
156
|
+
} = n, l = s.filter(Boolean), a = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
157
|
+
let c = await r.getElementRects({
|
|
158
|
+
reference: t,
|
|
159
|
+
floating: e,
|
|
160
|
+
strategy: i
|
|
161
|
+
}), {
|
|
162
|
+
x: u,
|
|
163
|
+
y: d
|
|
164
|
+
} = bt(c, o, a), p = o, f = {}, m = 0;
|
|
165
|
+
for (let g = 0; g < l.length; g++) {
|
|
166
|
+
const {
|
|
167
|
+
name: w,
|
|
168
|
+
fn: h
|
|
169
|
+
} = l[g], {
|
|
170
|
+
x: v,
|
|
171
|
+
y,
|
|
172
|
+
data: O,
|
|
173
|
+
reset: b
|
|
174
|
+
} = await h({
|
|
175
|
+
x: u,
|
|
176
|
+
y: d,
|
|
177
|
+
initialPlacement: o,
|
|
178
|
+
placement: p,
|
|
179
|
+
strategy: i,
|
|
180
|
+
middlewareData: f,
|
|
181
|
+
rects: c,
|
|
182
|
+
platform: r,
|
|
183
|
+
elements: {
|
|
184
|
+
reference: t,
|
|
185
|
+
floating: e
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
u = v ?? u, d = y ?? d, f = {
|
|
189
|
+
...f,
|
|
190
|
+
[w]: {
|
|
191
|
+
...f[w],
|
|
192
|
+
...O
|
|
193
|
+
}
|
|
194
|
+
}, b && m <= 50 && (m++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (c = b.rects === !0 ? await r.getElementRects({
|
|
195
|
+
reference: t,
|
|
196
|
+
floating: e,
|
|
197
|
+
strategy: i
|
|
198
|
+
}) : b.rects), {
|
|
199
|
+
x: u,
|
|
200
|
+
y: d
|
|
201
|
+
} = bt(c, p, a)), g = -1);
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
x: u,
|
|
205
|
+
y: d,
|
|
206
|
+
placement: p,
|
|
207
|
+
strategy: i,
|
|
208
|
+
middlewareData: f
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
async function tt(t, e) {
|
|
212
|
+
var n;
|
|
213
|
+
e === void 0 && (e = {});
|
|
214
|
+
const {
|
|
215
|
+
x: o,
|
|
216
|
+
y: i,
|
|
217
|
+
platform: s,
|
|
218
|
+
rects: r,
|
|
219
|
+
elements: l,
|
|
220
|
+
strategy: a
|
|
221
|
+
} = t, {
|
|
222
|
+
boundary: c = "clippingAncestors",
|
|
223
|
+
rootBoundary: u = "viewport",
|
|
224
|
+
elementContext: d = "floating",
|
|
225
|
+
altBoundary: p = !1,
|
|
226
|
+
padding: f = 0
|
|
227
|
+
} = Y(e, t), m = Ft(f), w = l[p ? d === "floating" ? "reference" : "floating" : d], h = lt(await s.getClippingRect({
|
|
228
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(w))) == null || n ? w : w.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(l.floating)),
|
|
229
|
+
boundary: c,
|
|
230
|
+
rootBoundary: u,
|
|
231
|
+
strategy: a
|
|
232
|
+
})), v = d === "floating" ? {
|
|
233
|
+
...r.floating,
|
|
234
|
+
x: o,
|
|
235
|
+
y: i
|
|
236
|
+
} : r.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), O = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
|
|
237
|
+
x: 1,
|
|
238
|
+
y: 1
|
|
239
|
+
} : {
|
|
240
|
+
x: 1,
|
|
241
|
+
y: 1
|
|
242
|
+
}, b = lt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
243
|
+
elements: l,
|
|
244
|
+
rect: v,
|
|
245
|
+
offsetParent: y,
|
|
246
|
+
strategy: a
|
|
247
|
+
}) : v);
|
|
248
|
+
return {
|
|
249
|
+
top: (h.top - b.top + m.top) / O.y,
|
|
250
|
+
bottom: (b.bottom - h.bottom + m.bottom) / O.y,
|
|
251
|
+
left: (h.left - b.left + m.left) / O.x,
|
|
252
|
+
right: (b.right - h.right + m.right) / O.x
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
const se = (t) => ({
|
|
256
|
+
name: "arrow",
|
|
257
|
+
options: t,
|
|
258
|
+
async fn(e) {
|
|
259
|
+
const {
|
|
260
|
+
x: n,
|
|
261
|
+
y: o,
|
|
262
|
+
placement: i,
|
|
263
|
+
rects: s,
|
|
264
|
+
platform: r,
|
|
265
|
+
elements: l,
|
|
266
|
+
middlewareData: a
|
|
267
|
+
} = e, {
|
|
268
|
+
element: c,
|
|
269
|
+
padding: u = 0
|
|
270
|
+
} = Y(t, e) || {};
|
|
271
|
+
if (c == null)
|
|
272
|
+
return {};
|
|
273
|
+
const d = Ft(u), p = {
|
|
274
|
+
x: n,
|
|
275
|
+
y: o
|
|
276
|
+
}, f = pt(i), m = mt(f), g = await r.getDimensions(c), w = f === "y", h = w ? "top" : "left", v = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", O = s.reference[m] + s.reference[f] - p[f] - s.floating[m], b = p[f] - s.reference[f], A = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
|
|
277
|
+
let x = A ? A[y] : 0;
|
|
278
|
+
(!x || !await (r.isElement == null ? void 0 : r.isElement(A))) && (x = l.floating[y] || s.floating[m]);
|
|
279
|
+
const L = O / 2 - b / 2, D = x / 2 - g[m] / 2 - 1, T = J(d[h], D), P = J(d[v], D), _ = T, j = x - g[m] - P, E = x / 2 - g[m] / 2 + L, F = ut(_, E, j), M = !a.arrow && B(i) != null && E !== F && s.reference[m] / 2 - (E < _ ? T : P) - g[m] / 2 < 0, $ = M ? E < _ ? E - _ : E - j : 0;
|
|
280
|
+
return {
|
|
281
|
+
[f]: p[f] + $,
|
|
282
|
+
data: {
|
|
283
|
+
[f]: F,
|
|
284
|
+
centerOffset: E - F - $,
|
|
285
|
+
...M && {
|
|
286
|
+
alignmentOffset: $
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
reset: M
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
function le(t, e, n) {
|
|
294
|
+
return (t ? [...n.filter((i) => B(i) === t), ...n.filter((i) => B(i) !== t)] : n.filter((i) => H(i) === i)).filter((i) => t ? B(i) === t || (e ? rt(i) !== i : !1) : !0);
|
|
295
|
+
}
|
|
296
|
+
const ce = function(t) {
|
|
297
|
+
return t === void 0 && (t = {}), {
|
|
298
|
+
name: "autoPlacement",
|
|
299
|
+
options: t,
|
|
300
|
+
async fn(e) {
|
|
301
|
+
var n, o, i;
|
|
302
|
+
const {
|
|
303
|
+
rects: s,
|
|
304
|
+
middlewareData: r,
|
|
305
|
+
placement: l,
|
|
306
|
+
platform: a,
|
|
307
|
+
elements: c
|
|
308
|
+
} = e, {
|
|
309
|
+
crossAxis: u = !1,
|
|
310
|
+
alignment: d,
|
|
311
|
+
allowedPlacements: p = xt,
|
|
312
|
+
autoAlignment: f = !0,
|
|
313
|
+
...m
|
|
314
|
+
} = Y(t, e), g = d !== void 0 || p === xt ? le(d || null, f, p) : p, w = await tt(e, m), h = ((n = r.autoPlacement) == null ? void 0 : n.index) || 0, v = g[h];
|
|
315
|
+
if (v == null)
|
|
316
|
+
return {};
|
|
317
|
+
const y = Pt(v, s, await (a.isRTL == null ? void 0 : a.isRTL(c.floating)));
|
|
318
|
+
if (l !== v)
|
|
319
|
+
return {
|
|
320
|
+
reset: {
|
|
321
|
+
placement: g[0]
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
const O = [w[H(v)], w[y[0]], w[y[1]]], b = [...((o = r.autoPlacement) == null ? void 0 : o.overflows) || [], {
|
|
325
|
+
placement: v,
|
|
326
|
+
overflows: O
|
|
327
|
+
}], A = g[h + 1];
|
|
328
|
+
if (A)
|
|
329
|
+
return {
|
|
330
|
+
data: {
|
|
331
|
+
index: h + 1,
|
|
332
|
+
overflows: b
|
|
333
|
+
},
|
|
334
|
+
reset: {
|
|
335
|
+
placement: A
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
const x = b.map((T) => {
|
|
339
|
+
const P = B(T.placement);
|
|
340
|
+
return [T.placement, P && u ? (
|
|
341
|
+
// Check along the mainAxis and main crossAxis side.
|
|
342
|
+
T.overflows.slice(0, 2).reduce((_, j) => _ + j, 0)
|
|
343
|
+
) : (
|
|
344
|
+
// Check only the mainAxis.
|
|
345
|
+
T.overflows[0]
|
|
346
|
+
), T.overflows];
|
|
347
|
+
}).sort((T, P) => T[1] - P[1]), D = ((i = x.filter((T) => T[2].slice(
|
|
348
|
+
0,
|
|
349
|
+
// Aligned placements should not check their opposite crossAxis
|
|
350
|
+
// side.
|
|
351
|
+
B(T[0]) ? 2 : 3
|
|
352
|
+
).every((P) => P <= 0))[0]) == null ? void 0 : i[0]) || x[0][0];
|
|
353
|
+
return D !== l ? {
|
|
354
|
+
data: {
|
|
355
|
+
index: h + 1,
|
|
356
|
+
overflows: b
|
|
357
|
+
},
|
|
358
|
+
reset: {
|
|
359
|
+
placement: D
|
|
360
|
+
}
|
|
361
|
+
} : {};
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
}, ae = function(t) {
|
|
365
|
+
return t === void 0 && (t = {}), {
|
|
366
|
+
name: "flip",
|
|
367
|
+
options: t,
|
|
368
|
+
async fn(e) {
|
|
369
|
+
var n, o;
|
|
370
|
+
const {
|
|
371
|
+
placement: i,
|
|
372
|
+
middlewareData: s,
|
|
373
|
+
rects: r,
|
|
374
|
+
initialPlacement: l,
|
|
375
|
+
platform: a,
|
|
376
|
+
elements: c
|
|
377
|
+
} = e, {
|
|
378
|
+
mainAxis: u = !0,
|
|
379
|
+
crossAxis: d = !0,
|
|
380
|
+
fallbackPlacements: p,
|
|
381
|
+
fallbackStrategy: f = "bestFit",
|
|
382
|
+
fallbackAxisSideDirection: m = "none",
|
|
383
|
+
flipAlignment: g = !0,
|
|
384
|
+
...w
|
|
385
|
+
} = Y(t, e);
|
|
386
|
+
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
387
|
+
return {};
|
|
388
|
+
const h = H(i), v = H(l) === l, y = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), O = p || (v || !g ? [st(l)] : ee(l));
|
|
389
|
+
!p && m !== "none" && O.push(...oe(l, g, m, y));
|
|
390
|
+
const b = [l, ...O], A = await tt(e, w), x = [];
|
|
391
|
+
let L = ((o = s.flip) == null ? void 0 : o.overflows) || [];
|
|
392
|
+
if (u && x.push(A[h]), d) {
|
|
393
|
+
const _ = Pt(i, r, y);
|
|
394
|
+
x.push(A[_[0]], A[_[1]]);
|
|
395
|
+
}
|
|
396
|
+
if (L = [...L, {
|
|
397
|
+
placement: i,
|
|
398
|
+
overflows: x
|
|
399
|
+
}], !x.every((_) => _ <= 0)) {
|
|
400
|
+
var D, T;
|
|
401
|
+
const _ = (((D = s.flip) == null ? void 0 : D.index) || 0) + 1, j = b[_];
|
|
402
|
+
if (j)
|
|
403
|
+
return {
|
|
404
|
+
data: {
|
|
405
|
+
index: _,
|
|
406
|
+
overflows: L
|
|
407
|
+
},
|
|
408
|
+
reset: {
|
|
409
|
+
placement: j
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
let E = (T = L.filter((F) => F.overflows[0] <= 0).sort((F, M) => F.overflows[1] - M.overflows[1])[0]) == null ? void 0 : T.placement;
|
|
413
|
+
if (!E)
|
|
414
|
+
switch (f) {
|
|
415
|
+
case "bestFit": {
|
|
416
|
+
var P;
|
|
417
|
+
const F = (P = L.map((M) => [M.placement, M.overflows.filter(($) => $ > 0).reduce(($, Ut) => $ + Ut, 0)]).sort((M, $) => M[1] - $[1])[0]) == null ? void 0 : P[0];
|
|
418
|
+
F && (E = F);
|
|
419
|
+
break;
|
|
420
|
+
}
|
|
421
|
+
case "initialPlacement":
|
|
422
|
+
E = l;
|
|
423
|
+
break;
|
|
424
|
+
}
|
|
425
|
+
if (i !== E)
|
|
426
|
+
return {
|
|
427
|
+
reset: {
|
|
428
|
+
placement: E
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
return {};
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
function Ot(t, e) {
|
|
437
|
+
return {
|
|
438
|
+
top: t.top - e.height,
|
|
439
|
+
right: t.right - e.width,
|
|
440
|
+
bottom: t.bottom - e.height,
|
|
441
|
+
left: t.left - e.width
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
function At(t) {
|
|
445
|
+
return Lt.some((e) => t[e] >= 0);
|
|
446
|
+
}
|
|
447
|
+
const fe = function(t) {
|
|
448
|
+
return t === void 0 && (t = {}), {
|
|
449
|
+
name: "hide",
|
|
450
|
+
options: t,
|
|
451
|
+
async fn(e) {
|
|
452
|
+
const {
|
|
453
|
+
rects: n
|
|
454
|
+
} = e, {
|
|
455
|
+
strategy: o = "referenceHidden",
|
|
456
|
+
...i
|
|
457
|
+
} = Y(t, e);
|
|
458
|
+
switch (o) {
|
|
459
|
+
case "referenceHidden": {
|
|
460
|
+
const s = await tt(e, {
|
|
461
|
+
...i,
|
|
462
|
+
elementContext: "reference"
|
|
463
|
+
}), r = Ot(s, n.reference);
|
|
464
|
+
return {
|
|
465
|
+
data: {
|
|
466
|
+
referenceHiddenOffsets: r,
|
|
467
|
+
referenceHidden: At(r)
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
case "escaped": {
|
|
472
|
+
const s = await tt(e, {
|
|
473
|
+
...i,
|
|
474
|
+
altBoundary: !0
|
|
475
|
+
}), r = Ot(s, n.floating);
|
|
476
|
+
return {
|
|
477
|
+
data: {
|
|
478
|
+
escapedOffsets: r,
|
|
479
|
+
escaped: At(r)
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
default:
|
|
484
|
+
return {};
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
async function ue(t, e) {
|
|
490
|
+
const {
|
|
491
|
+
placement: n,
|
|
492
|
+
platform: o,
|
|
493
|
+
elements: i
|
|
494
|
+
} = t, s = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = H(n), l = B(n), a = ct(n) === "y", c = ["left", "top"].includes(r) ? -1 : 1, u = s && a ? -1 : 1, d = Y(e, t);
|
|
495
|
+
let {
|
|
496
|
+
mainAxis: p,
|
|
497
|
+
crossAxis: f,
|
|
498
|
+
alignmentAxis: m
|
|
499
|
+
} = typeof d == "number" ? {
|
|
500
|
+
mainAxis: d,
|
|
501
|
+
crossAxis: 0,
|
|
502
|
+
alignmentAxis: null
|
|
503
|
+
} : {
|
|
504
|
+
mainAxis: 0,
|
|
505
|
+
crossAxis: 0,
|
|
506
|
+
alignmentAxis: null,
|
|
507
|
+
...d
|
|
508
|
+
};
|
|
509
|
+
return l && typeof m == "number" && (f = l === "end" ? m * -1 : m), a ? {
|
|
510
|
+
x: f * u,
|
|
511
|
+
y: p * c
|
|
512
|
+
} : {
|
|
513
|
+
x: p * c,
|
|
514
|
+
y: f * u
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
const de = function(t) {
|
|
518
|
+
return t === void 0 && (t = 0), {
|
|
519
|
+
name: "offset",
|
|
520
|
+
options: t,
|
|
521
|
+
async fn(e) {
|
|
522
|
+
var n, o;
|
|
523
|
+
const {
|
|
524
|
+
x: i,
|
|
525
|
+
y: s,
|
|
526
|
+
placement: r,
|
|
527
|
+
middlewareData: l
|
|
528
|
+
} = e, a = await ue(e, t);
|
|
529
|
+
return r === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
530
|
+
x: i + a.x,
|
|
531
|
+
y: s + a.y,
|
|
532
|
+
data: {
|
|
533
|
+
...a,
|
|
534
|
+
placement: r
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
}, me = function(t) {
|
|
540
|
+
return t === void 0 && (t = {}), {
|
|
541
|
+
name: "shift",
|
|
542
|
+
options: t,
|
|
543
|
+
async fn(e) {
|
|
544
|
+
const {
|
|
545
|
+
x: n,
|
|
546
|
+
y: o,
|
|
547
|
+
placement: i
|
|
548
|
+
} = e, {
|
|
549
|
+
mainAxis: s = !0,
|
|
550
|
+
crossAxis: r = !1,
|
|
551
|
+
limiter: l = {
|
|
552
|
+
fn: (w) => {
|
|
553
|
+
let {
|
|
554
|
+
x: h,
|
|
555
|
+
y: v
|
|
556
|
+
} = w;
|
|
557
|
+
return {
|
|
558
|
+
x: h,
|
|
559
|
+
y: v
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
...a
|
|
564
|
+
} = Y(t, e), c = {
|
|
565
|
+
x: n,
|
|
566
|
+
y: o
|
|
567
|
+
}, u = await tt(e, a), d = ct(H(i)), p = Dt(d);
|
|
568
|
+
let f = c[p], m = c[d];
|
|
569
|
+
if (s) {
|
|
570
|
+
const w = p === "y" ? "top" : "left", h = p === "y" ? "bottom" : "right", v = f + u[w], y = f - u[h];
|
|
571
|
+
f = ut(v, f, y);
|
|
572
|
+
}
|
|
573
|
+
if (r) {
|
|
574
|
+
const w = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", v = m + u[w], y = m - u[h];
|
|
575
|
+
m = ut(v, m, y);
|
|
576
|
+
}
|
|
577
|
+
const g = l.fn({
|
|
578
|
+
...e,
|
|
579
|
+
[p]: f,
|
|
580
|
+
[d]: m
|
|
581
|
+
});
|
|
582
|
+
return {
|
|
583
|
+
...g,
|
|
584
|
+
data: {
|
|
585
|
+
x: g.x - n,
|
|
586
|
+
y: g.y - o
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
function N(t) {
|
|
593
|
+
return gt(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
594
|
+
}
|
|
595
|
+
function S(t) {
|
|
596
|
+
var e;
|
|
597
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
598
|
+
}
|
|
599
|
+
function V(t) {
|
|
600
|
+
var e;
|
|
601
|
+
return (e = (gt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
602
|
+
}
|
|
603
|
+
function gt(t) {
|
|
604
|
+
return t instanceof Node || t instanceof S(t).Node;
|
|
605
|
+
}
|
|
606
|
+
function W(t) {
|
|
607
|
+
return t instanceof Element || t instanceof S(t).Element;
|
|
608
|
+
}
|
|
609
|
+
function k(t) {
|
|
610
|
+
return t instanceof HTMLElement || t instanceof S(t).HTMLElement;
|
|
611
|
+
}
|
|
612
|
+
function Tt(t) {
|
|
613
|
+
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof S(t).ShadowRoot;
|
|
614
|
+
}
|
|
615
|
+
function nt(t) {
|
|
616
|
+
const {
|
|
617
|
+
overflow: e,
|
|
618
|
+
overflowX: n,
|
|
619
|
+
overflowY: o,
|
|
620
|
+
display: i
|
|
621
|
+
} = C(t);
|
|
622
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
|
|
623
|
+
}
|
|
624
|
+
function pe(t) {
|
|
625
|
+
return ["table", "td", "th"].includes(N(t));
|
|
626
|
+
}
|
|
627
|
+
function ht(t) {
|
|
628
|
+
const e = wt(), n = C(t);
|
|
629
|
+
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
|
|
630
|
+
}
|
|
631
|
+
function ge(t) {
|
|
632
|
+
let e = Q(t);
|
|
633
|
+
for (; k(e) && !at(e); ) {
|
|
634
|
+
if (ht(e))
|
|
635
|
+
return e;
|
|
636
|
+
e = Q(e);
|
|
637
|
+
}
|
|
638
|
+
return null;
|
|
639
|
+
}
|
|
640
|
+
function wt() {
|
|
641
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
642
|
+
}
|
|
643
|
+
function at(t) {
|
|
644
|
+
return ["html", "body", "#document"].includes(N(t));
|
|
645
|
+
}
|
|
646
|
+
function C(t) {
|
|
647
|
+
return S(t).getComputedStyle(t);
|
|
648
|
+
}
|
|
649
|
+
function ft(t) {
|
|
650
|
+
return W(t) ? {
|
|
651
|
+
scrollLeft: t.scrollLeft,
|
|
652
|
+
scrollTop: t.scrollTop
|
|
653
|
+
} : {
|
|
654
|
+
scrollLeft: t.pageXOffset,
|
|
655
|
+
scrollTop: t.pageYOffset
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
function Q(t) {
|
|
659
|
+
if (N(t) === "html")
|
|
660
|
+
return t;
|
|
661
|
+
const e = (
|
|
662
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
663
|
+
t.assignedSlot || // DOM Element detected.
|
|
664
|
+
t.parentNode || // ShadowRoot detected.
|
|
665
|
+
Tt(t) && t.host || // Fallback.
|
|
666
|
+
V(t)
|
|
667
|
+
);
|
|
668
|
+
return Tt(e) ? e.host : e;
|
|
669
|
+
}
|
|
670
|
+
function Mt(t) {
|
|
671
|
+
const e = Q(t);
|
|
672
|
+
return at(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : k(e) && nt(e) ? e : Mt(e);
|
|
673
|
+
}
|
|
674
|
+
function et(t, e, n) {
|
|
675
|
+
var o;
|
|
676
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
677
|
+
const i = Mt(t), s = i === ((o = t.ownerDocument) == null ? void 0 : o.body), r = S(i);
|
|
678
|
+
return s ? e.concat(r, r.visualViewport || [], nt(i) ? i : [], r.frameElement && n ? et(r.frameElement) : []) : e.concat(i, et(i, [], n));
|
|
679
|
+
}
|
|
680
|
+
function Bt(t) {
|
|
681
|
+
const e = C(t);
|
|
682
|
+
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
683
|
+
const i = k(t), s = i ? t.offsetWidth : n, r = i ? t.offsetHeight : o, l = it(n) !== s || it(o) !== r;
|
|
684
|
+
return l && (n = s, o = r), {
|
|
685
|
+
width: n,
|
|
686
|
+
height: o,
|
|
687
|
+
$: l
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
function vt(t) {
|
|
691
|
+
return W(t) ? t : t.contextElement;
|
|
692
|
+
}
|
|
693
|
+
function K(t) {
|
|
694
|
+
const e = vt(t);
|
|
695
|
+
if (!k(e))
|
|
696
|
+
return z(1);
|
|
697
|
+
const n = e.getBoundingClientRect(), {
|
|
698
|
+
width: o,
|
|
699
|
+
height: i,
|
|
700
|
+
$: s
|
|
701
|
+
} = Bt(e);
|
|
702
|
+
let r = (s ? it(n.width) : n.width) / o, l = (s ? it(n.height) : n.height) / i;
|
|
703
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
704
|
+
x: r,
|
|
705
|
+
y: l
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
const he = /* @__PURE__ */ z(0);
|
|
709
|
+
function kt(t) {
|
|
710
|
+
const e = S(t);
|
|
711
|
+
return !wt() || !e.visualViewport ? he : {
|
|
712
|
+
x: e.visualViewport.offsetLeft,
|
|
713
|
+
y: e.visualViewport.offsetTop
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
function we(t, e, n) {
|
|
717
|
+
return e === void 0 && (e = !1), !n || e && n !== S(t) ? !1 : e;
|
|
718
|
+
}
|
|
719
|
+
function X(t, e, n, o) {
|
|
720
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
721
|
+
const i = t.getBoundingClientRect(), s = vt(t);
|
|
722
|
+
let r = z(1);
|
|
723
|
+
e && (o ? W(o) && (r = K(o)) : r = K(t));
|
|
724
|
+
const l = we(s, n, o) ? kt(s) : z(0);
|
|
725
|
+
let a = (i.left + l.x) / r.x, c = (i.top + l.y) / r.y, u = i.width / r.x, d = i.height / r.y;
|
|
726
|
+
if (s) {
|
|
727
|
+
const p = S(s), f = o && W(o) ? S(o) : o;
|
|
728
|
+
let m = p, g = m.frameElement;
|
|
729
|
+
for (; g && o && f !== m; ) {
|
|
730
|
+
const w = K(g), h = g.getBoundingClientRect(), v = C(g), y = h.left + (g.clientLeft + parseFloat(v.paddingLeft)) * w.x, O = h.top + (g.clientTop + parseFloat(v.paddingTop)) * w.y;
|
|
731
|
+
a *= w.x, c *= w.y, u *= w.x, d *= w.y, a += y, c += O, m = S(g), g = m.frameElement;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
return lt({
|
|
735
|
+
width: u,
|
|
736
|
+
height: d,
|
|
737
|
+
x: a,
|
|
738
|
+
y: c
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
const ve = [":popover-open", ":modal"];
|
|
742
|
+
function $t(t) {
|
|
743
|
+
return ve.some((e) => {
|
|
744
|
+
try {
|
|
745
|
+
return t.matches(e);
|
|
746
|
+
} catch {
|
|
747
|
+
return !1;
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
function ye(t) {
|
|
752
|
+
let {
|
|
753
|
+
elements: e,
|
|
754
|
+
rect: n,
|
|
755
|
+
offsetParent: o,
|
|
756
|
+
strategy: i
|
|
757
|
+
} = t;
|
|
758
|
+
const s = i === "fixed", r = V(o), l = e ? $t(e.floating) : !1;
|
|
759
|
+
if (o === r || l && s)
|
|
760
|
+
return n;
|
|
761
|
+
let a = {
|
|
762
|
+
scrollLeft: 0,
|
|
763
|
+
scrollTop: 0
|
|
764
|
+
}, c = z(1);
|
|
765
|
+
const u = z(0), d = k(o);
|
|
766
|
+
if ((d || !d && !s) && ((N(o) !== "body" || nt(r)) && (a = ft(o)), k(o))) {
|
|
767
|
+
const p = X(o);
|
|
768
|
+
c = K(o), u.x = p.x + o.clientLeft, u.y = p.y + o.clientTop;
|
|
769
|
+
}
|
|
770
|
+
return {
|
|
771
|
+
width: n.width * c.x,
|
|
772
|
+
height: n.height * c.y,
|
|
773
|
+
x: n.x * c.x - a.scrollLeft * c.x + u.x,
|
|
774
|
+
y: n.y * c.y - a.scrollTop * c.y + u.y
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
function xe(t) {
|
|
778
|
+
return Array.from(t.getClientRects());
|
|
779
|
+
}
|
|
780
|
+
function Ht(t) {
|
|
781
|
+
return X(V(t)).left + ft(t).scrollLeft;
|
|
782
|
+
}
|
|
783
|
+
function be(t) {
|
|
784
|
+
const e = V(t), n = ft(t), o = t.ownerDocument.body, i = U(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), s = U(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
785
|
+
let r = -n.scrollLeft + Ht(t);
|
|
786
|
+
const l = -n.scrollTop;
|
|
787
|
+
return C(o).direction === "rtl" && (r += U(e.clientWidth, o.clientWidth) - i), {
|
|
788
|
+
width: i,
|
|
789
|
+
height: s,
|
|
790
|
+
x: r,
|
|
791
|
+
y: l
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
function Oe(t, e) {
|
|
795
|
+
const n = S(t), o = V(t), i = n.visualViewport;
|
|
796
|
+
let s = o.clientWidth, r = o.clientHeight, l = 0, a = 0;
|
|
797
|
+
if (i) {
|
|
798
|
+
s = i.width, r = i.height;
|
|
799
|
+
const c = wt();
|
|
800
|
+
(!c || c && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
|
|
801
|
+
}
|
|
802
|
+
return {
|
|
803
|
+
width: s,
|
|
804
|
+
height: r,
|
|
805
|
+
x: l,
|
|
806
|
+
y: a
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
function Ae(t, e) {
|
|
810
|
+
const n = X(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, s = k(t) ? K(t) : z(1), r = t.clientWidth * s.x, l = t.clientHeight * s.y, a = i * s.x, c = o * s.y;
|
|
811
|
+
return {
|
|
812
|
+
width: r,
|
|
813
|
+
height: l,
|
|
814
|
+
x: a,
|
|
815
|
+
y: c
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
function Rt(t, e, n) {
|
|
819
|
+
let o;
|
|
820
|
+
if (e === "viewport")
|
|
821
|
+
o = Oe(t, n);
|
|
822
|
+
else if (e === "document")
|
|
823
|
+
o = be(V(t));
|
|
824
|
+
else if (W(e))
|
|
825
|
+
o = Ae(e, n);
|
|
826
|
+
else {
|
|
827
|
+
const i = kt(t);
|
|
828
|
+
o = {
|
|
829
|
+
...e,
|
|
830
|
+
x: e.x - i.x,
|
|
831
|
+
y: e.y - i.y
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
return lt(o);
|
|
835
|
+
}
|
|
836
|
+
function Nt(t, e) {
|
|
837
|
+
const n = Q(t);
|
|
838
|
+
return n === e || !W(n) || at(n) ? !1 : C(n).position === "fixed" || Nt(n, e);
|
|
839
|
+
}
|
|
840
|
+
function Te(t, e) {
|
|
841
|
+
const n = e.get(t);
|
|
842
|
+
if (n)
|
|
843
|
+
return n;
|
|
844
|
+
let o = et(t, [], !1).filter((l) => W(l) && N(l) !== "body"), i = null;
|
|
845
|
+
const s = C(t).position === "fixed";
|
|
846
|
+
let r = s ? Q(t) : t;
|
|
847
|
+
for (; W(r) && !at(r); ) {
|
|
848
|
+
const l = C(r), a = ht(r);
|
|
849
|
+
!a && l.position === "fixed" && (i = null), (s ? !a && !i : !a && l.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || nt(r) && !a && Nt(t, r)) ? o = o.filter((u) => u !== r) : i = l, r = Q(r);
|
|
850
|
+
}
|
|
851
|
+
return e.set(t, o), o;
|
|
852
|
+
}
|
|
853
|
+
function Re(t) {
|
|
854
|
+
let {
|
|
855
|
+
element: e,
|
|
856
|
+
boundary: n,
|
|
857
|
+
rootBoundary: o,
|
|
858
|
+
strategy: i
|
|
859
|
+
} = t;
|
|
860
|
+
const r = [...n === "clippingAncestors" ? Te(e, this._c) : [].concat(n), o], l = r[0], a = r.reduce((c, u) => {
|
|
861
|
+
const d = Rt(e, u, i);
|
|
862
|
+
return c.top = U(d.top, c.top), c.right = J(d.right, c.right), c.bottom = J(d.bottom, c.bottom), c.left = U(d.left, c.left), c;
|
|
863
|
+
}, Rt(e, l, i));
|
|
864
|
+
return {
|
|
865
|
+
width: a.right - a.left,
|
|
866
|
+
height: a.bottom - a.top,
|
|
867
|
+
x: a.left,
|
|
868
|
+
y: a.top
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
function _e(t) {
|
|
872
|
+
const {
|
|
873
|
+
width: e,
|
|
874
|
+
height: n
|
|
875
|
+
} = Bt(t);
|
|
876
|
+
return {
|
|
877
|
+
width: e,
|
|
878
|
+
height: n
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
function Ee(t, e, n) {
|
|
882
|
+
const o = k(e), i = V(e), s = n === "fixed", r = X(t, !0, s, e);
|
|
883
|
+
let l = {
|
|
884
|
+
scrollLeft: 0,
|
|
885
|
+
scrollTop: 0
|
|
886
|
+
};
|
|
887
|
+
const a = z(0);
|
|
888
|
+
if (o || !o && !s)
|
|
889
|
+
if ((N(e) !== "body" || nt(i)) && (l = ft(e)), o) {
|
|
890
|
+
const d = X(e, !0, s, e);
|
|
891
|
+
a.x = d.x + e.clientLeft, a.y = d.y + e.clientTop;
|
|
892
|
+
} else
|
|
893
|
+
i && (a.x = Ht(i));
|
|
894
|
+
const c = r.left + l.scrollLeft - a.x, u = r.top + l.scrollTop - a.y;
|
|
895
|
+
return {
|
|
896
|
+
x: c,
|
|
897
|
+
y: u,
|
|
898
|
+
width: r.width,
|
|
899
|
+
height: r.height
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
function _t(t, e) {
|
|
903
|
+
return !k(t) || C(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
|
|
904
|
+
}
|
|
905
|
+
function Wt(t, e) {
|
|
906
|
+
const n = S(t);
|
|
907
|
+
if (!k(t) || $t(t))
|
|
908
|
+
return n;
|
|
909
|
+
let o = _t(t, e);
|
|
910
|
+
for (; o && pe(o) && C(o).position === "static"; )
|
|
911
|
+
o = _t(o, e);
|
|
912
|
+
return o && (N(o) === "html" || N(o) === "body" && C(o).position === "static" && !ht(o)) ? n : o || ge(t) || n;
|
|
913
|
+
}
|
|
914
|
+
const Se = async function(t) {
|
|
915
|
+
const e = this.getOffsetParent || Wt, n = this.getDimensions;
|
|
916
|
+
return {
|
|
917
|
+
reference: Ee(t.reference, await e(t.floating), t.strategy),
|
|
918
|
+
floating: {
|
|
919
|
+
x: 0,
|
|
920
|
+
y: 0,
|
|
921
|
+
...await n(t.floating)
|
|
922
|
+
}
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
function Ce(t) {
|
|
926
|
+
return C(t).direction === "rtl";
|
|
927
|
+
}
|
|
928
|
+
const Le = {
|
|
929
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: ye,
|
|
930
|
+
getDocumentElement: V,
|
|
931
|
+
getClippingRect: Re,
|
|
932
|
+
getOffsetParent: Wt,
|
|
933
|
+
getElementRects: Se,
|
|
934
|
+
getClientRects: xe,
|
|
935
|
+
getDimensions: _e,
|
|
936
|
+
getScale: K,
|
|
937
|
+
isElement: W,
|
|
938
|
+
isRTL: Ce
|
|
939
|
+
};
|
|
940
|
+
function De(t, e) {
|
|
941
|
+
let n = null, o;
|
|
942
|
+
const i = V(t);
|
|
943
|
+
function s() {
|
|
944
|
+
var l;
|
|
945
|
+
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
946
|
+
}
|
|
947
|
+
function r(l, a) {
|
|
948
|
+
l === void 0 && (l = !1), a === void 0 && (a = 1), s();
|
|
949
|
+
const {
|
|
950
|
+
left: c,
|
|
951
|
+
top: u,
|
|
952
|
+
width: d,
|
|
953
|
+
height: p
|
|
954
|
+
} = t.getBoundingClientRect();
|
|
955
|
+
if (l || e(), !d || !p)
|
|
956
|
+
return;
|
|
957
|
+
const f = ot(u), m = ot(i.clientWidth - (c + d)), g = ot(i.clientHeight - (u + p)), w = ot(c), v = {
|
|
958
|
+
rootMargin: -f + "px " + -m + "px " + -g + "px " + -w + "px",
|
|
959
|
+
threshold: U(0, J(1, a)) || 1
|
|
960
|
+
};
|
|
961
|
+
let y = !0;
|
|
962
|
+
function O(b) {
|
|
963
|
+
const A = b[0].intersectionRatio;
|
|
964
|
+
if (A !== a) {
|
|
965
|
+
if (!y)
|
|
966
|
+
return r();
|
|
967
|
+
A ? r(!1, A) : o = setTimeout(() => {
|
|
968
|
+
r(!1, 1e-7);
|
|
969
|
+
}, 100);
|
|
970
|
+
}
|
|
971
|
+
y = !1;
|
|
972
|
+
}
|
|
973
|
+
try {
|
|
974
|
+
n = new IntersectionObserver(O, {
|
|
975
|
+
...v,
|
|
976
|
+
// Handle <iframe>s
|
|
977
|
+
root: i.ownerDocument
|
|
978
|
+
});
|
|
979
|
+
} catch {
|
|
980
|
+
n = new IntersectionObserver(O, v);
|
|
981
|
+
}
|
|
982
|
+
n.observe(t);
|
|
983
|
+
}
|
|
984
|
+
return r(!0), s;
|
|
985
|
+
}
|
|
986
|
+
function Et(t, e, n, o) {
|
|
987
|
+
o === void 0 && (o = {});
|
|
988
|
+
const {
|
|
989
|
+
ancestorScroll: i = !0,
|
|
990
|
+
ancestorResize: s = !0,
|
|
991
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
992
|
+
layoutShift: l = typeof IntersectionObserver == "function",
|
|
993
|
+
animationFrame: a = !1
|
|
994
|
+
} = o, c = vt(t), u = i || s ? [...c ? et(c) : [], ...et(e)] : [];
|
|
995
|
+
u.forEach((h) => {
|
|
996
|
+
i && h.addEventListener("scroll", n, {
|
|
997
|
+
passive: !0
|
|
998
|
+
}), s && h.addEventListener("resize", n);
|
|
999
|
+
});
|
|
1000
|
+
const d = c && l ? De(c, n) : null;
|
|
1001
|
+
let p = -1, f = null;
|
|
1002
|
+
r && (f = new ResizeObserver((h) => {
|
|
1003
|
+
let [v] = h;
|
|
1004
|
+
v && v.target === c && f && (f.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1005
|
+
var y;
|
|
1006
|
+
(y = f) == null || y.observe(e);
|
|
1007
|
+
})), n();
|
|
1008
|
+
}), c && !a && f.observe(c), f.observe(e));
|
|
1009
|
+
let m, g = a ? X(t) : null;
|
|
1010
|
+
a && w();
|
|
1011
|
+
function w() {
|
|
1012
|
+
const h = X(t);
|
|
1013
|
+
g && (h.x !== g.x || h.y !== g.y || h.width !== g.width || h.height !== g.height) && n(), g = h, m = requestAnimationFrame(w);
|
|
1014
|
+
}
|
|
1015
|
+
return n(), () => {
|
|
1016
|
+
var h;
|
|
1017
|
+
u.forEach((v) => {
|
|
1018
|
+
i && v.removeEventListener("scroll", n), s && v.removeEventListener("resize", n);
|
|
1019
|
+
}), d == null || d(), (h = f) == null || h.disconnect(), f = null, a && cancelAnimationFrame(m);
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
const Pe = ce, Fe = me, Me = ae, Qe = fe, Be = se, ke = (t, e, n) => {
|
|
1023
|
+
const o = /* @__PURE__ */ new Map(), i = {
|
|
1024
|
+
platform: Le,
|
|
1025
|
+
...n
|
|
1026
|
+
}, s = {
|
|
1027
|
+
...i.platform,
|
|
1028
|
+
_c: o
|
|
1029
|
+
};
|
|
1030
|
+
return re(t, e, {
|
|
1031
|
+
...i,
|
|
1032
|
+
platform: s
|
|
1033
|
+
});
|
|
1034
|
+
};
|
|
1035
|
+
function $e(t) {
|
|
1036
|
+
return t != null && typeof t == "object" && "$el" in t;
|
|
1037
|
+
}
|
|
1038
|
+
function dt(t) {
|
|
1039
|
+
if ($e(t)) {
|
|
1040
|
+
const e = t.$el;
|
|
1041
|
+
return gt(e) && N(e) === "#comment" ? null : e;
|
|
1042
|
+
}
|
|
1043
|
+
return t;
|
|
1044
|
+
}
|
|
1045
|
+
function He(t) {
|
|
1046
|
+
return {
|
|
1047
|
+
name: "arrow",
|
|
1048
|
+
options: t,
|
|
1049
|
+
fn(e) {
|
|
1050
|
+
const n = dt(G(t.element));
|
|
1051
|
+
return n == null ? {} : Be({
|
|
1052
|
+
element: n,
|
|
1053
|
+
padding: t.padding
|
|
1054
|
+
}).fn(e);
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
}
|
|
1058
|
+
function Vt(t) {
|
|
1059
|
+
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1060
|
+
}
|
|
1061
|
+
function St(t, e) {
|
|
1062
|
+
const n = Vt(t);
|
|
1063
|
+
return Math.round(e * n) / n;
|
|
1064
|
+
}
|
|
1065
|
+
function Ne(t, e, n) {
|
|
1066
|
+
n === void 0 && (n = {});
|
|
1067
|
+
const o = n.whileElementsMounted, i = R(() => {
|
|
1068
|
+
var x;
|
|
1069
|
+
return (x = G(n.open)) != null ? x : !0;
|
|
1070
|
+
}), s = R(() => G(n.middleware)), r = R(() => {
|
|
1071
|
+
var x;
|
|
1072
|
+
return (x = G(n.placement)) != null ? x : "bottom";
|
|
1073
|
+
}), l = R(() => {
|
|
1074
|
+
var x;
|
|
1075
|
+
return (x = G(n.strategy)) != null ? x : "absolute";
|
|
1076
|
+
}), a = R(() => {
|
|
1077
|
+
var x;
|
|
1078
|
+
return (x = G(n.transform)) != null ? x : !0;
|
|
1079
|
+
}), c = R(() => dt(t.value)), u = R(() => dt(e.value)), d = I(0), p = I(0), f = I(l.value), m = I(r.value), g = Xt({}), w = I(!1), h = R(() => {
|
|
1080
|
+
const x = {
|
|
1081
|
+
position: f.value,
|
|
1082
|
+
left: "0",
|
|
1083
|
+
top: "0"
|
|
1084
|
+
};
|
|
1085
|
+
if (!u.value)
|
|
1086
|
+
return x;
|
|
1087
|
+
const L = St(u.value, d.value), D = St(u.value, p.value);
|
|
1088
|
+
return a.value ? {
|
|
1089
|
+
...x,
|
|
1090
|
+
transform: "translate(" + L + "px, " + D + "px)",
|
|
1091
|
+
...Vt(u.value) >= 1.5 && {
|
|
1092
|
+
willChange: "transform"
|
|
1093
|
+
}
|
|
1094
|
+
} : {
|
|
1095
|
+
position: f.value,
|
|
1096
|
+
left: L + "px",
|
|
1097
|
+
top: D + "px"
|
|
1098
|
+
};
|
|
1099
|
+
});
|
|
1100
|
+
let v;
|
|
1101
|
+
function y() {
|
|
1102
|
+
c.value == null || u.value == null || ke(c.value, u.value, {
|
|
1103
|
+
middleware: s.value,
|
|
1104
|
+
placement: r.value,
|
|
1105
|
+
strategy: l.value
|
|
1106
|
+
}).then((x) => {
|
|
1107
|
+
d.value = x.x, p.value = x.y, f.value = x.strategy, m.value = x.placement, g.value = x.middlewareData, w.value = !0;
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
function O() {
|
|
1111
|
+
typeof v == "function" && (v(), v = void 0);
|
|
1112
|
+
}
|
|
1113
|
+
function b() {
|
|
1114
|
+
if (O(), o === void 0) {
|
|
1115
|
+
y();
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
if (c.value != null && u.value != null) {
|
|
1119
|
+
v = o(c.value, u.value, y);
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
function A() {
|
|
1124
|
+
i.value || (w.value = !1);
|
|
1125
|
+
}
|
|
1126
|
+
return Z([s, r, l], y, {
|
|
1127
|
+
flush: "sync"
|
|
1128
|
+
}), Z([c, u], b, {
|
|
1129
|
+
flush: "sync"
|
|
1130
|
+
}), Z(i, A, {
|
|
1131
|
+
flush: "sync"
|
|
1132
|
+
}), Yt() && qt(O), {
|
|
1133
|
+
x: q(d),
|
|
1134
|
+
y: q(p),
|
|
1135
|
+
strategy: q(f),
|
|
1136
|
+
placement: q(m),
|
|
1137
|
+
middlewareData: q(g),
|
|
1138
|
+
isPositioned: q(w),
|
|
1139
|
+
floatingStyles: h,
|
|
1140
|
+
update: y
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
var It = /* @__PURE__ */ ((t) => (t.TOP = "top", t.RIGHT = "right", t.BOTTOM = "bottom", t.LEFT = "left", t))(It || {}), zt = /* @__PURE__ */ ((t) => (t.AUTO = "auto", t.AUTO_START = "auto-start", t.AUTO_END = "auto-end", t.TOP_START = "top-start", t.TOP_END = "top-end", t.RIGHT_START = "right-start", t.RIGHT_END = "right-end", t.BOTTOM_START = "bottom-start", t.BOTTOM_END = "bottom-end", t.LEFT_START = "left-start", t.LEFT_END = "left-end", t))(zt || {}), jt = /* @__PURE__ */ ((t) => (t.TOOLTIP = "tooltip", t.POPOVER = "dialog", t))(jt || {});
|
|
1144
|
+
const Ct = { ...It, ...zt }, We = (t, e) => t ? e[1] + 7 : e[1], Ve = (t) => {
|
|
1145
|
+
let e = Array.isArray(t) ? t : [t];
|
|
1146
|
+
return e = e.filter((n) => n !== "auto" && n !== "auto-start" && n !== "auto-end").map((n) => n), {
|
|
1147
|
+
fallbackPlacements: e
|
|
1148
|
+
};
|
|
1149
|
+
}, Ie = {
|
|
1150
|
+
name: "sameWidth",
|
|
1151
|
+
fn: ({ elements: t }) => (t.floating.style.width = `${t.reference.offsetWidth}px`, {})
|
|
1152
|
+
}, ze = {}, je = /* @__PURE__ */ Gt({
|
|
1153
|
+
...ze,
|
|
1154
|
+
__name: "popper-container",
|
|
1155
|
+
props: {
|
|
1156
|
+
/**
|
|
1157
|
+
* The aria role assigned to the container. Defaults to null, which means it's not set if nothing is passed.
|
|
1158
|
+
*/
|
|
1159
|
+
ariaRole: {
|
|
1160
|
+
type: String,
|
|
1161
|
+
default: null,
|
|
1162
|
+
validator: (t) => Object.values(jt).includes(t)
|
|
1163
|
+
},
|
|
1164
|
+
/**
|
|
1165
|
+
* Indicates if container should have additional arrow, pointing at target element
|
|
1166
|
+
* Can be just a boolean flag, or an object with additional configuration:
|
|
1167
|
+
* @property {Array<string>} arrow.classes – apply any additional classes to the arrow element.
|
|
1168
|
+
* @property {string} arrow.padding – useful when content has rounded corners, @see {@link https://floating-ui.com/docs/arrow#padding}
|
|
1169
|
+
*/
|
|
1170
|
+
arrow: { type: Object, default: void 0 },
|
|
1171
|
+
/**
|
|
1172
|
+
* Disables wrapping focus-trap component.
|
|
1173
|
+
* Mostly useful for the storybook demo.
|
|
1174
|
+
*/
|
|
1175
|
+
disabledFocusTrap: { type: Boolean, default: !1 },
|
|
1176
|
+
/**
|
|
1177
|
+
* Allows to configure to fallback position to the one specified, it could be 'auto' or ['right', 'top', ...].
|
|
1178
|
+
* Useful when not using auto as starting placement.
|
|
1179
|
+
* @see {@link https://floating-ui.com/docs/flip#fallbackplacements}
|
|
1180
|
+
*/
|
|
1181
|
+
fallbackPosition: {
|
|
1182
|
+
type: [Array, String],
|
|
1183
|
+
default: null
|
|
1184
|
+
},
|
|
1185
|
+
/**
|
|
1186
|
+
* Instructs popover to be visible outside of the containing container.
|
|
1187
|
+
* Useful when component would be used in limited containers like Modal, Side panel, etc.
|
|
1188
|
+
* @see {@link https://floating-ui.com/docs/usefloating#strategy}
|
|
1189
|
+
*/
|
|
1190
|
+
fixedPositioning: { type: Boolean, default: !1 },
|
|
1191
|
+
/**
|
|
1192
|
+
* The id to be set on the component. Use it for accessibility purposes.
|
|
1193
|
+
*/
|
|
1194
|
+
id: { type: String, default: null },
|
|
1195
|
+
/**
|
|
1196
|
+
* If hiding / showing popper element then use this property to tell the popper when to update it's position.
|
|
1197
|
+
* This will drastically help improve performance, as we will not need to track hidden elements.
|
|
1198
|
+
*/
|
|
1199
|
+
isHidden: { type: Boolean, default: null },
|
|
1200
|
+
/**
|
|
1201
|
+
* Instructs popper container to have the same width as target element.
|
|
1202
|
+
*/
|
|
1203
|
+
matchWidth: { type: Boolean, default: !1 },
|
|
1204
|
+
/**
|
|
1205
|
+
* Custom set of middleware. Useful for low-level control over Popper behavior in some really complex use cases.
|
|
1206
|
+
* @see {@link https://floating-ui.com/docs/middleware}
|
|
1207
|
+
*/
|
|
1208
|
+
middleware: { type: Array, default: null },
|
|
1209
|
+
/**
|
|
1210
|
+
* Allows to displace a popper container from its target element.
|
|
1211
|
+
* @see {@link https://floating-ui.com/docs/offset#options}
|
|
1212
|
+
*/
|
|
1213
|
+
offset: {
|
|
1214
|
+
type: Array,
|
|
1215
|
+
default: () => [0, 0],
|
|
1216
|
+
validator: (t) => (t == null ? void 0 : t.length) === 2
|
|
1217
|
+
},
|
|
1218
|
+
/**
|
|
1219
|
+
* Position relative to the target element
|
|
1220
|
+
* @see {@link https://floating-ui.com/docs/computeposition#placement}
|
|
1221
|
+
*/
|
|
1222
|
+
position: {
|
|
1223
|
+
type: String,
|
|
1224
|
+
default: Ct.AUTO,
|
|
1225
|
+
validator: (t) => Object.values(Ct).includes(t)
|
|
1226
|
+
},
|
|
1227
|
+
/**
|
|
1228
|
+
* Reference to the DOM element or Vue component for positioning
|
|
1229
|
+
*/
|
|
1230
|
+
targetElement: { type: [Element, Object], required: !0 }
|
|
1231
|
+
},
|
|
1232
|
+
emits: ["placement"],
|
|
1233
|
+
setup(t, { emit: e }) {
|
|
1234
|
+
var y;
|
|
1235
|
+
const n = t, { position: o } = Kt(n), i = I(), s = I(null), r = I(n.position), l = R(
|
|
1236
|
+
() => n.targetElement.$el ? n.targetElement.$el : n.targetElement
|
|
1237
|
+
), a = R(
|
|
1238
|
+
() => i.value.$el ? i.value.$el : i.value
|
|
1239
|
+
), c = R(() => (n == null ? void 0 : n.position) !== "auto" && (n == null ? void 0 : n.fallbackPosition) !== "auto"), u = R(() => {
|
|
1240
|
+
switch (n.position) {
|
|
1241
|
+
case "auto-start":
|
|
1242
|
+
return { alignment: "start", crossAxis: !0 };
|
|
1243
|
+
case "auto-end":
|
|
1244
|
+
return { alignment: "end", crossAxis: !0 };
|
|
1245
|
+
default:
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
}), d = R(() => n.fixedPositioning ? "fixed" : "absolute"), { floatingStyles: p, middlewareData: f, placement: m, update: g } = Ne(l, i, {
|
|
1249
|
+
placement: o,
|
|
1250
|
+
middleware: [
|
|
1251
|
+
// Adds flip modifier if fallbackPosition is not set to auto
|
|
1252
|
+
...c.value ? [
|
|
1253
|
+
Me({
|
|
1254
|
+
fallbackPlacements: Ve(n.fallbackPosition).fallbackPlacements
|
|
1255
|
+
})
|
|
1256
|
+
] : [],
|
|
1257
|
+
// Adds autoposition middlelare if position is set to any auto variants
|
|
1258
|
+
...c.value ? [] : [Pe(u.value)],
|
|
1259
|
+
// Add shifting middle in case popper is still not fully visible in view port
|
|
1260
|
+
Fe(),
|
|
1261
|
+
// Adds offset middlelare if offset property is set
|
|
1262
|
+
...n.offset ? [de(We(n.arrow, n.offset))] : [],
|
|
1263
|
+
// Adds arrow middlelare if arrow property is set, can set additional padding property
|
|
1264
|
+
...n.arrow ? [He({ element: s, padding: n.arrow.padding || 0 })] : [],
|
|
1265
|
+
// Adds same width middleware to keep popper width same as referenced element's width
|
|
1266
|
+
...n.matchWidth ? [Ie] : [],
|
|
1267
|
+
// If there is additional custom middleware to add via the property then add it
|
|
1268
|
+
...((y = n.middleware) == null ? void 0 : y.length) > 0 ? n.middleware : []
|
|
1269
|
+
],
|
|
1270
|
+
strategy: d,
|
|
1271
|
+
// If we're mounting the element with a `v-if` then we need to auto update it while it's mounted
|
|
1272
|
+
...n.isHidden === null ? { whileElementsMounted: Et } : []
|
|
1273
|
+
});
|
|
1274
|
+
let w;
|
|
1275
|
+
Z(
|
|
1276
|
+
() => n.isHidden,
|
|
1277
|
+
() => {
|
|
1278
|
+
n.isHidden !== null && !n.isHidden ? w = Et(l == null ? void 0 : l.value, a == null ? void 0 : a.value, g) : n.isHidden !== null && n.isHidden && typeof w == "function" && w();
|
|
1279
|
+
}
|
|
1280
|
+
), Z(
|
|
1281
|
+
() => m.value,
|
|
1282
|
+
() => {
|
|
1283
|
+
r.value !== m.value && (r.value = m.value, e("placement", r.value));
|
|
1284
|
+
}
|
|
1285
|
+
);
|
|
1286
|
+
const h = R(() => {
|
|
1287
|
+
var O, b;
|
|
1288
|
+
return {
|
|
1289
|
+
position: "absolute",
|
|
1290
|
+
left: ((O = f.value.arrow) == null ? void 0 : O.x) != null ? `${f.value.arrow.x}px` : "",
|
|
1291
|
+
top: ((b = f.value.arrow) == null ? void 0 : b.y) != null ? `${f.value.arrow.y}px` : ""
|
|
1292
|
+
};
|
|
1293
|
+
}), v = R(() => {
|
|
1294
|
+
var O;
|
|
1295
|
+
return {
|
|
1296
|
+
class: n.arrow.classes,
|
|
1297
|
+
style: h.value,
|
|
1298
|
+
// Applies a data-hide attribute to arrow element depending on center offset.
|
|
1299
|
+
...((O = f.value.arrow) == null ? void 0 : O.centerOffset) !== 0 ? { "data-hide": "" } : {}
|
|
1300
|
+
};
|
|
1301
|
+
});
|
|
1302
|
+
return { __sfc: !0, props: n, emit: e, position: o, popperContainerRef: i, floatingArrow: s, emittedPosition: r, targetElement: l, popperContainerElement: a, isFlipMiddleware: c, getAutoPlacementProps: u, strategy: d, floatingStyles: p, middlewareData: f, placement: m, update: g, cleanupAutoUpdate: w, arrowStyles: h, arrowAttributes: v, BentoFocusTrap: Jt };
|
|
1303
|
+
}
|
|
1304
|
+
});
|
|
1305
|
+
var Ue = function() {
|
|
1306
|
+
var e = this, n = e._self._c, o = e._self._setupProxy;
|
|
1307
|
+
return n(o.BentoFocusTrap, e._b({ ref: "popperContainerRef", staticClass: "b-popper-container", style: o.floatingStyles, attrs: { id: e.id, "data-popper-placement": o.placement, disabled: e.disabledFocusTrap, role: e.ariaRole } }, "bento-focus-trap", e.$attrs, !1), [e._t("default"), o.props.arrow ? n("span", e._b({ ref: "floatingArrow", staticClass: "b-popper-container__arrow", attrs: { "data-testid": "arrow" } }, "span", o.arrowAttributes, !1)) : e._e()], 2);
|
|
1308
|
+
}, Xe = [], Ye = /* @__PURE__ */ Qt(
|
|
1309
|
+
je,
|
|
1310
|
+
Ue,
|
|
1311
|
+
Xe,
|
|
1312
|
+
!1,
|
|
1313
|
+
null,
|
|
1314
|
+
"2dc38cd5",
|
|
1315
|
+
null,
|
|
1316
|
+
null
|
|
1317
|
+
);
|
|
1318
|
+
const Ze = Ye.exports;
|
|
1319
|
+
export {
|
|
1320
|
+
It as P,
|
|
1321
|
+
Ze as a,
|
|
1322
|
+
jt as b,
|
|
1323
|
+
Ct as c,
|
|
1324
|
+
zt as d,
|
|
1325
|
+
Qe as h,
|
|
1326
|
+
de as o
|
|
1327
|
+
};
|
|
1328
|
+
//# sourceMappingURL=index.8ac70774.js.map
|