MockProcessor-5c5e066a.js
1 month ago
MockProcessor-5c5e066a.js.map
1 month ago
add-query-args-0e2a8393.js
1 year ago
add-query-args-0e2a8393.js.map
1 year ago
address-b8e2e4c8.js
2 months ago
address-b8e2e4c8.js.map
2 months ago
animation-registry-de37bd7e.js
2 months ago
animation-registry-de37bd7e.js.map
2 months ago
app-globals-0eef0276.js
1 month ago
app-globals-0eef0276.js.map
1 month ago
consumer-f1775a76.js
1 month ago
consumer-f1775a76.js.map
1 month ago
currency-a0c9bff4.js
1 year ago
currency-a0c9bff4.js.map
1 year ago
error-b146b98f.js
4 days ago
error-b146b98f.js.map
4 days ago
fetch-cdff67be.js
2 weeks ago
fetch-cdff67be.js.map
2 weeks ago
floating-ui.dom.esm-8dce4ea1.js
5 months ago
floating-ui.dom.esm-8dce4ea1.js.map
5 months ago
form-data-76641f16.js
1 year ago
form-data-76641f16.js.map
1 year ago
functions-4f009ce1.js
2 months ago
functions-4f009ce1.js.map
2 months ago
geo-permission-62aea8ee.js
4 days ago
geo-permission-62aea8ee.js.map
4 days ago
getters-1049a6f8.js
1 month ago
getters-1049a6f8.js.map
1 month ago
getters-1477d792.js
1 month ago
getters-1477d792.js.map
1 month ago
getters-4b4a9eb5.js
4 days ago
getters-4b4a9eb5.js.map
4 days ago
getters-4bb6cc1b.js
1 month ago
getters-4bb6cc1b.js.map
1 month ago
getters-92cbd197.js
4 days ago
getters-92cbd197.js.map
4 days ago
google-a86aa761.js
1 year ago
google-a86aa761.js.map
1 year ago
google-ff13b5f8.js
2 weeks ago
google-ff13b5f8.js.map
2 weeks ago
google-maps-e8b00ffd.js
2 months ago
google-maps-e8b00ffd.js.map
2 months ago
index-18f5a1bc.js
1 month ago
index-18f5a1bc.js.map
1 month ago
index-1db2635f.js
1 year ago
index-1db2635f.js.map
1 year ago
index-25e5af33.js
1 month ago
index-25e5af33.js.map
1 month ago
index-4aa538b7.js
4 days ago
index-4aa538b7.js.map
4 days ago
index-824c562b.js
1 month ago
index-824c562b.js.map
1 month ago
index-871d88b8.js
1 year ago
index-871d88b8.js.map
1 year ago
index-c5a96d53.js
2 years ago
index-c5a96d53.js.map
2 years ago
index-d602bc13.js
2 weeks ago
index-d602bc13.js.map
2 weeks ago
index.js
4 days ago
index.js.map
4 days ago
inline-c012a0f9.js
1 year ago
inline-c012a0f9.js.map
1 year ago
lazy-deb42890.js
1 year ago
lazy-deb42890.js.map
1 year ago
library-1bd957d5.js
1 month ago
library-1bd957d5.js.map
1 month ago
loader.js
4 days ago
loader.js.map
1 year ago
media-d21119a3.js
1 year ago
media-d21119a3.js.map
1 year ago
mutations-596ff451.js
4 days ago
mutations-596ff451.js.map
4 days ago
mutations-636921ce.js
4 days ago
mutations-636921ce.js.map
4 days ago
mutations-7458343f.js
1 month ago
mutations-7458343f.js.map
1 month ago
mutations-c99167c2.js
2 weeks ago
mutations-c99167c2.js.map
2 weeks ago
page-align-0cdacf32.js
1 year ago
page-align-0cdacf32.js.map
1 year ago
price-1ff6aa07.js
2 months ago
price-1ff6aa07.js.map
2 months ago
pure-963214cb.js
1 year ago
pure-963214cb.js.map
1 year ago
quantity-5c986f3d.js
2 months ago
quantity-5c986f3d.js.map
2 months ago
razorpay-4c4a3d31.js
2 months ago
razorpay-4c4a3d31.js.map
2 months ago
remove-query-args-938c53ea.js
1 year ago
remove-query-args-938c53ea.js.map
1 year ago
sc-address_5.entry.js
4 days ago
sc-address_5.entry.js.map
2 months ago
sc-alert.entry.js
4 days ago
sc-alert.entry.js.map
1 year ago
sc-avatar_2.entry.js
4 days ago
sc-avatar_2.entry.js.map
1 month ago
sc-badge-notice.entry.js
4 days ago
sc-badge-notice.entry.js.map
1 year ago
sc-block-ui.entry.js
4 days ago
sc-block-ui.entry.js.map
3 months ago
sc-breadcrumb.entry.js
4 days ago
sc-breadcrumb.entry.js.map
1 year ago
sc-breadcrumbs.entry.js
4 days ago
sc-breadcrumbs.entry.js.map
1 year ago
sc-button-group.entry.js
4 days ago
sc-button-group.entry.js.map
1 year ago
sc-button_6.entry.js
4 days ago
sc-button_6.entry.js.map
1 month ago
sc-cancel-dialog_3.entry.js
4 days ago
sc-cancel-dialog_3.entry.js.map
1 month ago
sc-cancel-discount_4.entry.js
4 days ago
sc-cancel-discount_4.entry.js.map
1 month ago
sc-card_2.entry.js
4 days ago
sc-card_2.entry.js.map
2 months ago
sc-cart-button.entry.js
4 days ago
sc-cart-button.entry.js.map
1 year ago
sc-cart-form-submit.entry.js
1 month ago
sc-cart-form-submit.entry.js.map
1 year ago
sc-cart-form.entry.js
4 days ago
sc-cart-form.entry.js.map
1 month ago
sc-cart-header.entry.js
4 days ago
sc-cart-header.entry.js.map
1 year ago
sc-cart-icon.entry.js
4 days ago
sc-cart-icon.entry.js.map
1 year ago
sc-cart-loader.entry.js
4 days ago
sc-cart-loader.entry.js.map
1 year ago
sc-cart-session-provider_3.entry.js
4 days ago
sc-cart-session-provider_3.entry.js.map
1 month ago
sc-cart-submit.entry.js
1 month ago
sc-cart-submit.entry.js.map
1 year ago
sc-cart.entry.js
4 days ago
sc-cart.entry.js.map
1 month ago
sc-cc-logo_2.entry.js
4 days ago
sc-cc-logo_2.entry.js.map
4 days ago
sc-charges-list.entry.js
4 days ago
sc-charges-list.entry.js.map
1 month ago
sc-checkout-autofill-provider_11.entry.js
4 days ago
sc-checkout-autofill-provider_11.entry.js.map
4 days ago
sc-checkout-form-errors.entry.js
1 month ago
sc-checkout-form-errors.entry.js.map
1 year ago
sc-checkout-mollie-payment_3.entry.js
4 days ago
sc-checkout-mollie-payment_3.entry.js.map
1 month ago
sc-checkout-product-price-variant-selector.entry.js
4 days ago
sc-checkout-product-price-variant-selector.entry.js.map
1 month ago
sc-checkout.entry.js
4 days ago
sc-checkout.entry.js.map
4 days ago
sc-choice-container.entry.js
4 days ago
sc-choice-container.entry.js.map
1 year ago
sc-choice.entry.js
4 days ago
sc-choice.entry.js.map
1 year ago
sc-choices.entry.js
4 days ago
sc-choices.entry.js.map
1 year ago
sc-column_2.entry.js
4 days ago
sc-column_2.entry.js.map
4 days ago
sc-compact-address_18.entry.js
4 days ago
sc-compact-address_18.entry.js.map
2 weeks ago
sc-conditional-form.entry.js
4 days ago
sc-conditional-form.entry.js.map
1 month ago
sc-consumer.entry.js
1 month ago
sc-consumer.entry.js.map
1 year ago
sc-coupon-form.entry.js
4 days ago
sc-coupon-form.entry.js.map
4 months ago
sc-custom-order-price-input.entry.js
2 weeks ago
sc-custom-order-price-input.entry.js.map
1 month ago
sc-customer-details.entry.js
4 days ago
sc-customer-details.entry.js.map
6 months ago
sc-customer-edit.entry.js
4 days ago
sc-customer-edit.entry.js.map
1 month ago
sc-customer-email.entry.js
4 days ago
sc-customer-email.entry.js.map
1 month ago
sc-customer-firstname.entry.js
4 days ago
sc-customer-firstname.entry.js.map
1 month ago
sc-customer-lastname.entry.js
4 days ago
sc-customer-lastname.entry.js.map
1 month ago
sc-customer-name.entry.js
4 days ago
sc-customer-name.entry.js.map
1 month ago
sc-dashboard-customer-details.entry.js
4 days ago
sc-dashboard-customer-details.entry.js.map
1 month ago
sc-dashboard-downloads-list.entry.js
4 days ago
sc-dashboard-downloads-list.entry.js.map
1 month ago
sc-dialog.entry.js
4 days ago
sc-dialog.entry.js.map
3 months ago
sc-divider.entry.js
4 days ago
sc-divider.entry.js.map
1 year ago
sc-donation-choices.entry.js
1 month ago
sc-donation-choices.entry.js.map
1 year ago
sc-downloads-list.entry.js
4 days ago
sc-downloads-list.entry.js.map
2 weeks ago
sc-dropdown_3.entry.js
4 days ago
sc-dropdown_3.entry.js.map
5 months ago
sc-empty_3.entry.js
4 days ago
sc-empty_3.entry.js.map
2 months ago
sc-express-payment.entry.js
4 days ago
sc-express-payment.entry.js.map
2 months ago
sc-feature-demo-banner.entry.js
4 days ago
sc-feature-demo-banner.entry.js.map
1 year ago
sc-flex.entry.js
4 days ago
sc-flex.entry.js.map
1 year ago
sc-form-control_2.entry.js
4 days ago
sc-form-control_2.entry.js.map
1 month ago
sc-form-row.entry.js
4 days ago
sc-form-row.entry.js.map
1 year ago
sc-form.entry.js
4 days ago
sc-form.entry.js.map
1 year ago
sc-format-bytes.entry.js
1 month ago
sc-format-bytes.entry.js.map
1 year ago
sc-format-interval.entry.js
1 month ago
sc-format-interval.entry.js.map
1 year ago
sc-format-number.entry.js
1 month ago
sc-format-number.entry.js.map
1 year ago
sc-fulfillment-shipping-status-badge.entry.js
1 month ago
sc-fulfillment-shipping-status-badge.entry.js.map
2 months ago
sc-fulfillments.entry.js
2 weeks ago
sc-fulfillments.entry.js.map
1 month ago
sc-heading_2.entry.js
4 days ago
sc-heading_2.entry.js.map
1 year ago
sc-image-slider.entry.js
4 days ago
sc-image-slider.entry.js.map
4 days ago
sc-invoice-status-badge.entry.js
4 days ago
sc-invoice-status-badge.entry.js.map
2 months ago
sc-invoices-list.entry.js
4 days ago
sc-invoices-list.entry.js.map
1 month ago
sc-license.entry.js
4 days ago
sc-license.entry.js.map
1 month ago
sc-licenses-list.entry.js
4 days ago
sc-licenses-list.entry.js.map
4 days ago
sc-line-item-bump.entry.js
4 days ago
sc-line-item-bump.entry.js.map
1 year ago
sc-line-item-total.entry.js
4 days ago
sc-line-item-total.entry.js.map
5 months ago
sc-line-item.entry.js
4 days ago
sc-line-item.entry.js.map
1 year ago
sc-line-items-provider.entry.js
4 days ago
sc-line-items-provider.entry.js.map
1 year ago
sc-line-items.entry.js
4 days ago
sc-line-items.entry.js.map
2 weeks ago
sc-login-form.entry.js
4 days ago
sc-login-form.entry.js.map
1 month ago
sc-manual-payment-method_3.entry.js
4 days ago
sc-manual-payment-method_3.entry.js.map
2 months ago
sc-menu-divider.entry.js
4 days ago
sc-menu-divider.entry.js.map
1 year ago
sc-menu-label_2.entry.js
4 days ago
sc-menu-label_2.entry.js.map
2 weeks ago
sc-mollie-add-method.entry.js
2 weeks ago
sc-mollie-add-method.entry.js.map
1 month ago
sc-order-confirmation-customer.entry.js
1 month ago
sc-order-confirmation-customer.entry.js.map
1 year ago
sc-order-confirmation-details.entry.js
1 month ago
sc-order-confirmation-details.entry.js.map
10 months ago
sc-order-confirmation-line-items_2.entry.js
4 days ago
sc-order-confirmation-line-items_2.entry.js.map
5 months ago
sc-order-confirmation.entry.js
4 days ago
sc-order-confirmation.entry.js.map
1 month ago
sc-order-coupon-form.entry.js
4 days ago
sc-order-coupon-form.entry.js.map
1 month ago
sc-order-detail.entry.js
1 month ago
sc-order-detail.entry.js.map
1 year ago
sc-order-fulfillment-badge.entry.js
4 days ago
sc-order-fulfillment-badge.entry.js.map
2 months ago
sc-order-manual-instructions.entry.js
1 month ago
sc-order-manual-instructions.entry.js.map
1 year ago
sc-order-password.entry.js
1 month ago
sc-order-password.entry.js.map
1 year ago
sc-order-return-badge.entry.js
4 days ago
sc-order-return-badge.entry.js.map
2 months ago
sc-order-shipment-badge.entry.js
1 month ago
sc-order-shipment-badge.entry.js.map
2 months ago
sc-order-status-badge.entry.js
4 days ago
sc-order-status-badge.entry.js.map
2 months ago
sc-order-submit.entry.js
4 days ago
sc-order-submit.entry.js.map
1 month ago
sc-order-summary.entry.js
4 days ago
sc-order-summary.entry.js.map
2 weeks ago
sc-order.entry.js
4 days ago
sc-order.entry.js.map
1 month ago
sc-orders-list.entry.js
4 days ago
sc-orders-list.entry.js.map
1 month ago
sc-pagination.entry.js
1 month ago
sc-pagination.entry.js.map
1 year ago
sc-password-nag.entry.js
2 weeks ago
sc-password-nag.entry.js.map
1 month ago
sc-password.entry.js
4 days ago
sc-password.entry.js.map
4 days ago
sc-payment-method-choice_2.entry.js
4 days ago
sc-payment-method-choice_2.entry.js.map
1 year ago
sc-payment-method-details.entry.js
4 days ago
sc-payment-method-details.entry.js.map
1 year ago
sc-payment-methods-list.entry.js
4 days ago
sc-payment-methods-list.entry.js.map
1 month ago
sc-payment.entry.js
4 days ago
sc-payment.entry.js.map
2 months ago
sc-paypal-add-method.entry.js
4 days ago
sc-paypal-add-method.entry.js.map
1 month ago
sc-paypal-buttons_2.entry.js
4 days ago
sc-paypal-buttons_2.entry.js.map
1 month ago
sc-paystack-add-method.entry.js
4 days ago
sc-paystack-add-method.entry.js.map
1 month ago
sc-pill-option.entry.js
4 days ago
sc-pill-option.entry.js.map
1 year ago
sc-popover.entry.js
4 days ago
sc-popover.entry.js.map
5 months ago
sc-premium-tag.entry.js
4 days ago
sc-premium-tag.entry.js.map
1 year ago
sc-price-choice-container.entry.js
1 month ago
sc-price-choice-container.entry.js.map
1 year ago
sc-price-choice.entry.js
2 weeks ago
sc-price-choice.entry.js.map
1 month ago
sc-price-choices.entry.js
4 days ago
sc-price-choices.entry.js.map
1 year ago
sc-price-input.entry.js
4 days ago
sc-price-input.entry.js.map
1 year ago
sc-price-range_4.entry.js
4 days ago
sc-price-range_4.entry.js.map
1 year ago
sc-price.entry.js
1 month ago
sc-price.entry.js.map
10 months ago
sc-product-buy-button.entry.js
4 days ago
sc-product-buy-button.entry.js.map
1 month ago
sc-product-donation-amount-choice.entry.js
4 days ago
sc-product-donation-amount-choice.entry.js.map
1 month ago
sc-product-donation-choices.entry.js
4 days ago
sc-product-donation-choices.entry.js.map
1 month ago
sc-product-donation-custom-amount.entry.js
4 days ago
sc-product-donation-custom-amount.entry.js.map
1 month ago
sc-product-item-list.entry.js
2 weeks ago
sc-product-item-list.entry.js.map
1 month ago
sc-product-item.entry.js
4 days ago
sc-product-item.entry.js.map
1 year ago
sc-product-pills-variant-option.entry.js
4 days ago
sc-product-pills-variant-option.entry.js.map
1 year ago
sc-product-price-choices.entry.js
2 weeks ago
sc-product-price-choices.entry.js.map
1 year ago
sc-product-price-modal.entry.js
4 days ago
sc-product-price-modal.entry.js.map
1 month ago
sc-product-price.entry.js
4 days ago
sc-product-price.entry.js.map
1 month ago
sc-product-quantity.entry.js
4 days ago
sc-product-quantity.entry.js.map
1 year ago
sc-product-selected-price.entry.js
4 days ago
sc-product-selected-price.entry.js.map
1 month ago
sc-product-text.entry.js
2 weeks ago
sc-product-text.entry.js.map
1 year ago
sc-provider.entry.js
1 month ago
sc-provider.entry.js.map
1 year ago
sc-provisional-banner.entry.js
4 days ago
sc-provisional-banner.entry.js.map
10 months ago
sc-purchase-downloads-list.entry.js
4 days ago
sc-purchase-downloads-list.entry.js.map
2 weeks ago
sc-razorpay-add-method.entry.js
4 days ago
sc-razorpay-add-method.entry.js.map
1 month ago
sc-recurring-price-choice-container.entry.js
1 month ago
sc-recurring-price-choice-container.entry.js.map
1 year ago
sc-review-stars.entry.js
1 month ago
sc-review-stars.entry.js.map
4 months ago
sc-rich-text.entry.js
4 days ago
sc-rich-text.entry.js.map
4 days ago
sc-skeleton.entry.js
4 days ago
sc-skeleton.entry.js.map
1 year ago
sc-spacing.entry.js
4 days ago
sc-spacing.entry.js.map
1 year ago
sc-stripe-add-method.entry.js
4 days ago
sc-stripe-add-method.entry.js.map
1 month ago
sc-stripe-element.entry.js
4 days ago
sc-stripe-element.entry.js.map
1 month ago
sc-stripe-payment-element.entry.js
4 days ago
sc-stripe-payment-element.entry.js.map
1 month ago
sc-stripe-payment-request.entry.js
4 days ago
sc-stripe-payment-request.entry.js.map
1 month ago
sc-subscription-ad-hoc-confirm.entry.js
4 days ago
sc-subscription-ad-hoc-confirm.entry.js.map
5 months ago
sc-subscription-details_2.entry.js
4 days ago
sc-subscription-details_2.entry.js.map
1 month ago
sc-subscription-payment-method.entry.js
4 days ago
sc-subscription-payment-method.entry.js.map
1 month ago
sc-subscription-payment.entry.js
4 days ago
sc-subscription-payment.entry.js.map
1 month ago
sc-subscription-switch.entry.js
2 weeks ago
sc-subscription-switch.entry.js.map
1 month ago
sc-subscription-variation-confirm.entry.js
4 days ago
sc-subscription-variation-confirm.entry.js.map
1 year ago
sc-subscription.entry.js
4 days ago
sc-subscription.entry.js.map
1 month ago
sc-subscriptions-list.entry.js
4 days ago
sc-subscriptions-list.entry.js.map
1 month ago
sc-summary.entry.js
4 days ago
sc-summary.entry.js.map
1 year ago
sc-swap.entry.js
4 days ago
sc-swap.entry.js.map
1 month ago
sc-switch.entry.js
4 days ago
sc-switch.entry.js.map
6 months ago
sc-tab-group.entry.js
4 days ago
sc-tab-group.entry.js.map
1 year ago
sc-tab-panel.entry.js
4 days ago
sc-tab-panel.entry.js.map
1 year ago
sc-tab.entry.js
4 days ago
sc-tab.entry.js.map
1 year ago
sc-table-head.entry.js
4 days ago
sc-table-head.entry.js.map
1 year ago
sc-table_3.entry.js
4 days ago
sc-table_3.entry.js.map
8 months ago
sc-tag.entry.js
4 days ago
sc-tag.entry.js.map
2 months ago
sc-test-mode-info.entry.js
4 days ago
sc-test-mode-info.entry.js.map
5 months ago
sc-text.entry.js
4 days ago
sc-text.entry.js.map
1 year ago
sc-toggle.entry.js
4 days ago
sc-toggle.entry.js.map
1 year ago
sc-toggles.entry.js
4 days ago
sc-toggles.entry.js.map
1 year ago
sc-total.entry.js
4 days ago
sc-total.entry.js.map
10 months ago
sc-upcoming-invoice.entry.js
4 days ago
sc-upcoming-invoice.entry.js.map
1 month ago
sc-upgrade-required.entry.js
1 month ago
sc-upgrade-required.entry.js.map
1 year ago
sc-upsell-countdown-timer.entry.js
4 days ago
sc-upsell-countdown-timer.entry.js.map
1 year ago
sc-upsell-no-thanks-button.entry.js
4 days ago
sc-upsell-no-thanks-button.entry.js.map
1 month ago
sc-upsell-submit-button.entry.js
4 days ago
sc-upsell-submit-button.entry.js.map
1 month ago
sc-upsell-totals.entry.js
4 days ago
sc-upsell-totals.entry.js.map
1 month ago
sc-upsell.entry.js
4 days ago
sc-upsell.entry.js.map
1 month ago
sc-verification-code.entry.js
4 days ago
sc-verification-code.entry.js.map
1 month ago
sc-visually-hidden.entry.js
4 days ago
sc-visually-hidden.entry.js.map
1 year ago
sc-wordpress-password-edit.entry.js
4 days ago
sc-wordpress-password-edit.entry.js.map
1 month ago
sc-wordpress-user-edit.entry.js
4 days ago
sc-wordpress-user-edit.entry.js.map
1 month ago
sc-wordpress-user.entry.js
4 days ago
sc-wordpress-user.entry.js.map
1 year ago
store-02394e82.js
1 month ago
store-02394e82.js.map
1 month ago
store-289e460c.js
1 month ago
store-289e460c.js.map
1 month ago
store-b1758b00.js
1 month ago
store-b1758b00.js.map
1 month ago
surecart.js
4 days ago
surecart.js.map
1 year ago
tax-a03623ca.js
1 year ago
tax-a03623ca.js.map
1 year ago
universe-7bd0ac2b.js
1 month ago
universe-7bd0ac2b.js.map
1 month ago
util-dfbf863e.js
1 month ago
util-dfbf863e.js.map
1 month ago
utils-f84b2118.js
2 months ago
utils-f84b2118.js.map
2 months ago
watchers-17c3cde1.js
2 weeks ago
watchers-17c3cde1.js.map
2 weeks ago
watchers-35242771.js
2 weeks ago
watchers-35242771.js.map
2 weeks ago
watchers-447890ff.js
4 days ago
watchers-447890ff.js.map
4 days ago
watchers-c7bbc6b2.js
1 month ago
watchers-c7bbc6b2.js.map
1 month ago
watchers-fb5eec9b.js
4 days ago
watchers-fb5eec9b.js.map
4 days ago
sc-popover.entry.js
180 lines
| 1 | import { r as registerInstance, c as createEvent, h, a as getElement } from './index-25e5af33.js'; |
| 2 | import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shift, b as size } from './floating-ui.dom.esm-8dce4ea1.js'; |
| 3 | import { s as speak } from './index-c5a96d53.js'; |
| 4 | |
| 5 | const scPopoverCss = ":host{display:inline-block;--panel-height:75vh}slot[name=title]{font-weight:600;font-size:14px}.popover{position:relative}.popover.popover--open .popover__positioner{visibility:visible;opacity:1;transform:scale(1)}.popover__header{display:flex;justify-content:space-between;padding-bottom:1em}.popover__header-close-button{display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:none;background:transparent;cursor:pointer;border-radius:var(--sc-border-radius-small)}.popover__header-close-button:focus{outline:2px solid var(--sc-focus-ring-color, var(--sc-color-primary-500));outline-offset:2px}.popover__header-close-button:hover{opacity:0.7}.popover__header-close-icon{vertical-align:middle;width:1.5em;height:1.5em}.popover__footer{border-top:1px solid var(--sc-input-border-color);padding-top:0.5em;margin-top:1em}.popover__trigger{display:block;cursor:pointer;border-width:0;outline:none;background-color:unset}.popover--disabled,.popover--disabled .popover__trigger{cursor:not-allowed}.popover__positioner{position:absolute;right:0;width:100%;z-index:var(--sc-z-index-popover);opacity:0;visibility:hidden;transform:scale(0.9);min-width:var(--panel-width, \"fit-content\")}.popover__panel{transform-origin:top left;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);max-height:var(--panel-height);font-family:var(--sc-font-sans);font-size:var(--sc-font-size-medium);font-weight:var(--sc-font-weight-normal);color:var(--sc-input-label-color);background-color:var(--sc-panel-background-color);border:solid 1px var(--sc-panel-border-color);border-radius:var(--sc-border-radius-x-large);box-shadow:var(--sc-shadow-large);overflow:auto;overscroll-behavior:none;transition:var(--sc-transition-fast) opacity, var(--sc-transition-fast) transform;z-index:5;padding:var(--sc-spacing-medium)}"; |
| 6 | const ScPopoverStyle0 = scPopoverCss; |
| 7 | |
| 8 | const ScPopover = class { |
| 9 | constructor(hostRef) { |
| 10 | registerInstance(this, hostRef); |
| 11 | this.scShow = createEvent(this, "scShow", 7); |
| 12 | this.scHide = createEvent(this, "scHide", 7); |
| 13 | this.boundHandleOutsideClick = (evt) => this.handleOutsideClick(evt); |
| 14 | this.boundHandleKeyDown = (evt) => this.handleKeyDown(evt); |
| 15 | this.boundHandleFocusOut = (evt) => this.handleFocusOut(evt); |
| 16 | this.disabled = undefined; |
| 17 | this.open = false; |
| 18 | this.placement = 'bottom-start'; |
| 19 | this.distance = 0; |
| 20 | this.skidding = 0; |
| 21 | this.hoist = false; |
| 22 | this.isVisible = undefined; |
| 23 | } |
| 24 | handleOpenChange() { |
| 25 | this.open ? this.show() : this.hide(); |
| 26 | } |
| 27 | handleOutsideClick(evt) { |
| 28 | const path = evt.composedPath(); |
| 29 | if (!path.some(item => { |
| 30 | return item === this.el; |
| 31 | })) { |
| 32 | this.open = false; |
| 33 | } |
| 34 | } |
| 35 | handleKeyDown(event) { |
| 36 | if (event.key === 'Escape') { |
| 37 | event.stopPropagation(); |
| 38 | this.hide(); |
| 39 | } |
| 40 | } |
| 41 | handleTriggerKeyDown(event) { |
| 42 | if (event.key === 'Enter' || event.key === ' ') { |
| 43 | event.preventDefault(); |
| 44 | if (this.disabled) |
| 45 | return; |
| 46 | if (this.open) { |
| 47 | this.hide(); |
| 48 | } |
| 49 | else { |
| 50 | this.show(); |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | /** |
| 55 | * Handles focus leaving the popover. |
| 56 | * Closes the popover if focus moves outside of it. |
| 57 | */ |
| 58 | handleFocusOut(event) { |
| 59 | const relatedTarget = event.relatedTarget; |
| 60 | // If focus is moving to something outside the popover, close it |
| 61 | if (relatedTarget && !this.el.contains(relatedTarget)) { |
| 62 | this.open = false; |
| 63 | } |
| 64 | } |
| 65 | startPositioner() { |
| 66 | this.stopPositioner(); |
| 67 | this.updatePositioner(); |
| 68 | this.positionerCleanup = autoUpdate(this.trigger, this.positioner, this.updatePositioner.bind(this)); |
| 69 | } |
| 70 | updatePositioner() { |
| 71 | if (!this.open || !this.trigger || !this.positioner) { |
| 72 | return; |
| 73 | } |
| 74 | computePosition(this.trigger, this.positioner, { |
| 75 | placement: this.placement, |
| 76 | middleware: [ |
| 77 | offset({ mainAxis: this.distance, crossAxis: this.skidding }), |
| 78 | flip(), |
| 79 | shift(), |
| 80 | size({ |
| 81 | apply: ({ availableWidth: width, availableHeight: height }) => { |
| 82 | // Ensure the panel stays within the viewport when we have lots of menu items |
| 83 | Object.assign(this.panel.style, { |
| 84 | maxWidth: `${width}px`, |
| 85 | maxHeight: `${height}px`, |
| 86 | }); |
| 87 | }, |
| 88 | padding: 8, |
| 89 | }), |
| 90 | ], |
| 91 | strategy: this.hoist ? 'fixed' : 'absolute', |
| 92 | }).then(({ x, y, placement }) => { |
| 93 | this.positioner.setAttribute('data-placement', placement); |
| 94 | Object.assign(this.positioner.style, { |
| 95 | position: this.hoist ? 'fixed' : 'absolute', |
| 96 | left: `${x}px`, |
| 97 | top: `${y}px`, |
| 98 | right: 'auto', |
| 99 | }); |
| 100 | }); |
| 101 | } |
| 102 | stopPositioner() { |
| 103 | var _a; |
| 104 | if (this.positionerCleanup) { |
| 105 | this.positionerCleanup(); |
| 106 | this.positionerCleanup = undefined; |
| 107 | (_a = this.positioner) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-placement'); |
| 108 | } |
| 109 | } |
| 110 | show() { |
| 111 | speak(wp.i18n.__('Popover opened. Press Escape to close.', 'surecart'), 'assertive'); |
| 112 | this.scShow.emit(); |
| 113 | // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher |
| 114 | if (this.isVisible) { |
| 115 | return; |
| 116 | } |
| 117 | this.isVisible = true; |
| 118 | this.open = true; |
| 119 | this.startPositioner(); |
| 120 | document.addEventListener('keydown', this.boundHandleKeyDown); |
| 121 | this.el.addEventListener('focusout', this.boundHandleFocusOut); |
| 122 | this.panel.focus(); |
| 123 | } |
| 124 | hide() { |
| 125 | var _a; |
| 126 | speak(wp.i18n.__('Popover closed.', 'surecart'), 'assertive'); |
| 127 | this.scHide.emit(); |
| 128 | // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher |
| 129 | if (!this.isVisible) { |
| 130 | return; |
| 131 | } |
| 132 | this.stopPositioner(); |
| 133 | document.removeEventListener('keydown', this.boundHandleKeyDown); |
| 134 | this.el.removeEventListener('focusout', this.boundHandleFocusOut); |
| 135 | this.isVisible = false; |
| 136 | this.open = false; |
| 137 | const slotted = this.el.shadowRoot.querySelector('slot[name="trigger"]'); |
| 138 | const trigger = slotted.assignedElements({ flatten: true })[0]; |
| 139 | (_a = trigger === null || trigger === void 0 ? void 0 : trigger.focus) === null || _a === void 0 ? void 0 : _a.call(trigger); |
| 140 | } |
| 141 | componentWillLoad() { |
| 142 | document.addEventListener('mousedown', this.boundHandleOutsideClick); |
| 143 | } |
| 144 | disconnectedCallback() { |
| 145 | document.removeEventListener('mousedown', this.boundHandleOutsideClick); |
| 146 | document.removeEventListener('keydown', this.boundHandleKeyDown); |
| 147 | this.el.removeEventListener('focusout', this.boundHandleFocusOut); |
| 148 | } |
| 149 | handleHide() { |
| 150 | this.open = false; |
| 151 | this.trigger.focus(); |
| 152 | } |
| 153 | render() { |
| 154 | return (h("div", { key: '3b84db4c99c91df9db59e7194cf74e7bf379f105', part: "base", class: { |
| 155 | 'popover': true, |
| 156 | 'popover--open': this.open, |
| 157 | 'popover--disabled': this.disabled, |
| 158 | } }, h("span", { key: '70ac56c7ede3dc4d95cfdc378710625c7d481a1a', part: "trigger", class: "popover__trigger", ref: el => (this.trigger = el), onClick: () => { |
| 159 | if (this.disabled) |
| 160 | return; |
| 161 | if (this.open) { |
| 162 | this.hide(); |
| 163 | } |
| 164 | else { |
| 165 | setTimeout(() => { |
| 166 | this.show(); |
| 167 | }, 0); |
| 168 | } |
| 169 | }, onKeyDown: e => this.handleTriggerKeyDown(e), tabindex: "0", role: "button", "aria-expanded": this.open ? 'true' : 'false', "aria-haspopup": "dialog", "aria-label": wp.i18n.__('Press Enter to open popover', 'surecart') }, h("slot", { key: '5602a4f09215a72f63d7b0d17ad379e6f025bef8', name: "trigger" })), h("div", { key: 'a53c35c68e49490486c23f891255e95bf8225ac8', class: "popover__positioner", ref: el => (this.positioner = el) }, h("div", { key: 'e0108f27681c5c2c74419aa5553c70e54f927699', part: "panel", class: "popover__panel", role: "dialog", "aria-modal": "false", tabindex: "-1", ref: el => (this.panel = el) }, h("div", { key: 'a6fe414cfb0cdf7f8f840470508b8a45802600bc', class: "popover__header" }, h("slot", { key: '92cd26d0e9d15a4732b77ae874c1c2d6ee113e4e', name: "title" }), h("button", { key: '420f6571eda27346e44661bfcc1f74b02645a564', type: "button", class: "popover__header-close-button", onClick: () => this.handleHide(), onKeyDown: e => e.key === 'Enter' && this.handleHide(), "aria-label": wp.i18n.__('Close', 'surecart') }, h("sc-icon", { key: '4ac0f236da945768b05f6fe46de30e665d2451e6', class: "popover__header-close-icon", name: "x" }))), h("slot", { key: '388e490728fc3347b0b34125aa7d5b0811f77258', name: "content" }), h("div", { key: '4ebea21ac2cdf935d83668d0d9d5d6d9eb0d5e89', class: "popover__footer" }, h("slot", { key: 'cb06409f279fe27f1cbba6ed0b8db895312f1230', name: "footer" })))))); |
| 170 | } |
| 171 | get el() { return getElement(this); } |
| 172 | static get watchers() { return { |
| 173 | "open": ["handleOpenChange"] |
| 174 | }; } |
| 175 | }; |
| 176 | ScPopover.style = ScPopoverStyle0; |
| 177 | |
| 178 | export { ScPopover as sc_popover }; |
| 179 | |
| 180 | //# sourceMappingURL=sc-popover.entry.js.map |