MockProcessor-498b60c5.js
1 year ago
MockProcessor-498b60c5.js.map
1 year ago
add-query-args-0e2a8393.js
1 year ago
add-query-args-0e2a8393.js.map
1 year ago
address-b892540d.js
1 year ago
address-b892540d.js.map
1 year ago
animation-registry-12eed2e3.js
1 year ago
animation-registry-12eed2e3.js.map
1 year ago
app-globals-707edcd4.js
1 year ago
app-globals-707edcd4.js.map
1 year ago
consumer-e06b16d3.js
1 year ago
consumer-e06b16d3.js.map
1 year ago
countries-c2f41f03.js
1 year ago
countries-c2f41f03.js.map
1 year ago
currency-a0c9bff4.js
1 year ago
currency-a0c9bff4.js.map
1 year ago
error-12ea55b3.js
1 year ago
error-12ea55b3.js.map
1 year ago
fetch-e3c5d1b9.js
1 year ago
fetch-e3c5d1b9.js.map
1 year ago
form-data-76641f16.js
1 year ago
form-data-76641f16.js.map
1 year ago
functions-2a4a4ba3.js
1 year ago
functions-2a4a4ba3.js.map
1 year ago
getters-09dda855.js
1 year ago
getters-09dda855.js.map
1 year ago
getters-1a55b8a4.js
1 year ago
getters-1a55b8a4.js.map
1 year ago
getters-26526b7c.js
1 year ago
getters-26526b7c.js.map
1 year ago
getters-a7eec27c.js
1 year ago
getters-a7eec27c.js.map
1 year ago
getters-b1d93841.js
1 year ago
getters-b1d93841.js.map
1 year ago
google-a86aa761.js
1 year ago
google-a86aa761.js.map
1 year ago
google-dd89f242.js
1 year ago
google-dd89f242.js.map
1 year ago
index-06061d4e.js
1 year ago
index-06061d4e.js.map
1 year ago
index-675be13e.js
1 year ago
index-675be13e.js.map
1 year ago
index-745b6bec.js
1 year ago
index-745b6bec.js.map
1 year ago
index-822e5799.js
1 year ago
index-822e5799.js.map
1 year 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.js
1 year ago
index.js.map
2 years 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-e110eea6.js
1 year ago
library-e110eea6.js.map
1 year ago
loader.js
1 year ago
loader.js.map
1 year ago
media-d21119a3.js
1 year ago
media-d21119a3.js.map
1 year ago
mutations-066b82f0.js
1 year ago
mutations-066b82f0.js.map
1 year ago
mutations-7ba12644.js
1 year ago
mutations-7ba12644.js.map
1 year ago
mutations-e77bd122.js
1 year ago
mutations-e77bd122.js.map
1 year ago
mutations-ed6d0770.js
1 year ago
mutations-ed6d0770.js.map
1 year ago
mutations-f11a19f9.js
1 year ago
mutations-f11a19f9.js.map
1 year ago
page-align-0cdacf32.js
1 year ago
page-align-0cdacf32.js.map
1 year ago
price-d5770168.js
1 year ago
price-d5770168.js.map
1 year ago
pure-963214cb.js
1 year ago
pure-963214cb.js.map
1 year ago
quantity-1f39f750.js
1 year ago
quantity-1f39f750.js.map
1 year ago
remove-query-args-938c53ea.js
1 year ago
remove-query-args-938c53ea.js.map
1 year ago
sc-address_3.entry.js
1 year ago
sc-address_3.entry.js.map
1 year ago
sc-alert_13.entry.js
1 year ago
sc-alert_13.entry.js.map
1 year ago
sc-avatar.entry.js
1 year ago
sc-avatar.entry.js.map
1 year ago
sc-badge-notice.entry.js
1 year ago
sc-badge-notice.entry.js.map
1 year ago
sc-breadcrumb.entry.js
1 year ago
sc-breadcrumb.entry.js.map
1 year ago
sc-breadcrumbs.entry.js
1 year ago
sc-breadcrumbs.entry.js.map
1 year ago
sc-button-group.entry.js
1 year ago
sc-button-group.entry.js.map
1 year ago
sc-cancel-dialog_2.entry.js
1 year ago
sc-cancel-dialog_2.entry.js.map
1 year ago
sc-cancel-discount_4.entry.js
1 year ago
sc-cancel-discount_4.entry.js.map
1 year ago
sc-card.entry.js
1 year ago
sc-card.entry.js.map
1 year ago
sc-cart-button.entry.js
1 year ago
sc-cart-button.entry.js.map
1 year ago
sc-cart-form-submit.entry.js
1 year ago
sc-cart-form-submit.entry.js.map
1 year ago
sc-cart-form.entry.js
1 year ago
sc-cart-form.entry.js.map
1 year ago
sc-cart-header.entry.js
1 year ago
sc-cart-header.entry.js.map
1 year ago
sc-cart-icon.entry.js
1 year ago
sc-cart-icon.entry.js.map
1 year ago
sc-cart-loader.entry.js
1 year ago
sc-cart-loader.entry.js.map
1 year ago
sc-cart-session-provider_3.entry.js
1 year ago
sc-cart-session-provider_3.entry.js.map
1 year ago
sc-cart-submit.entry.js
1 year ago
sc-cart-submit.entry.js.map
1 year ago
sc-cart.entry.js
1 year ago
sc-cart.entry.js.map
1 year ago
sc-cc-logo_2.entry.js
1 year ago
sc-cc-logo_2.entry.js.map
1 year ago
sc-charges-list.entry.js
1 year ago
sc-charges-list.entry.js.map
1 year ago
sc-checkout-form-errors.entry.js
1 year ago
sc-checkout-form-errors.entry.js.map
1 year ago
sc-checkout-mollie-payment_2.entry.js
1 year ago
sc-checkout-mollie-payment_2.entry.js.map
1 year ago
sc-checkout-product-price-variant-selector.entry.js
1 year ago
sc-checkout-product-price-variant-selector.entry.js.map
1 year ago
sc-checkout-stock-alert_8.entry.js
1 year ago
sc-checkout-stock-alert_8.entry.js.map
1 year ago
sc-checkout.entry.js
1 year ago
sc-checkout.entry.js.map
1 year ago
sc-choice-container.entry.js
1 year ago
sc-choice-container.entry.js.map
1 year ago
sc-choice.entry.js
1 year ago
sc-choice.entry.js.map
1 year ago
sc-choices.entry.js
1 year ago
sc-choices.entry.js.map
1 year ago
sc-column_2.entry.js
1 year ago
sc-column_2.entry.js.map
1 year ago
sc-compact-address_11.entry.js
1 year ago
sc-compact-address_11.entry.js.map
1 year ago
sc-conditional-form.entry.js
1 year ago
sc-conditional-form.entry.js.map
1 year ago
sc-consumer.entry.js
1 year ago
sc-consumer.entry.js.map
1 year ago
sc-coupon-form.entry.js
1 year ago
sc-coupon-form.entry.js.map
1 year ago
sc-custom-order-price-input.entry.js
1 year ago
sc-custom-order-price-input.entry.js.map
1 year ago
sc-customer-details.entry.js
1 year ago
sc-customer-details.entry.js.map
1 year ago
sc-customer-edit.entry.js
1 year ago
sc-customer-edit.entry.js.map
1 year ago
sc-customer-email.entry.js
1 year ago
sc-customer-email.entry.js.map
1 year ago
sc-customer-firstname.entry.js
1 year ago
sc-customer-firstname.entry.js.map
1 year ago
sc-customer-lastname.entry.js
1 year ago
sc-customer-lastname.entry.js.map
1 year ago
sc-customer-name.entry.js
1 year ago
sc-customer-name.entry.js.map
1 year ago
sc-customer-phone.entry.js
1 year ago
sc-customer-phone.entry.js.map
1 year ago
sc-dashboard-customer-details.entry.js
1 year ago
sc-dashboard-customer-details.entry.js.map
1 year ago
sc-dashboard-downloads-list.entry.js
1 year ago
sc-dashboard-downloads-list.entry.js.map
1 year ago
sc-divider.entry.js
1 year ago
sc-divider.entry.js.map
1 year ago
sc-donation-choices.entry.js
1 year ago
sc-donation-choices.entry.js.map
1 year ago
sc-downloads-list.entry.js
1 year ago
sc-downloads-list.entry.js.map
1 year ago
sc-dropdown_3.entry.js
1 year ago
sc-dropdown_3.entry.js.map
1 year ago
sc-empty.entry.js
1 year ago
sc-empty.entry.js.map
1 year ago
sc-express-payment.entry.js
1 year ago
sc-express-payment.entry.js.map
1 year ago
sc-feature-demo-banner.entry.js
1 year ago
sc-feature-demo-banner.entry.js.map
1 year ago
sc-form-control_2.entry.js
1 year ago
sc-form-control_2.entry.js.map
1 year ago
sc-form-row.entry.js
1 year ago
sc-form-row.entry.js.map
1 year ago
sc-form.entry.js
1 year ago
sc-form.entry.js.map
1 year ago
sc-format-bytes.entry.js
1 year ago
sc-format-bytes.entry.js.map
1 year ago
sc-format-interval.entry.js
1 year ago
sc-format-interval.entry.js.map
1 year ago
sc-fulfillment-shipping-status-badge.entry.js
1 year ago
sc-fulfillment-shipping-status-badge.entry.js.map
1 year ago
sc-fulfillments.entry.js
1 year ago
sc-fulfillments.entry.js.map
1 year ago
sc-heading_2.entry.js
1 year ago
sc-heading_2.entry.js.map
1 year ago
sc-image-slider.entry.js
1 year ago
sc-image-slider.entry.js.map
1 year ago
sc-invoices-list.entry.js
1 year ago
sc-invoices-list.entry.js.map
1 year ago
sc-license.entry.js
1 year ago
sc-license.entry.js.map
1 year ago
sc-licenses-list.entry.js
1 year ago
sc-licenses-list.entry.js.map
1 year ago
sc-line-item-bump.entry.js
1 year ago
sc-line-item-bump.entry.js.map
1 year ago
sc-line-item-total.entry.js
1 year ago
sc-line-item-total.entry.js.map
1 year ago
sc-line-item.entry.js
1 year ago
sc-line-item.entry.js.map
1 year ago
sc-line-items-provider.entry.js
1 year ago
sc-line-items-provider.entry.js.map
1 year ago
sc-line-items.entry.js
1 year ago
sc-line-items.entry.js.map
1 year ago
sc-login-form.entry.js
1 year ago
sc-login-form.entry.js.map
1 year ago
sc-manual-payment-method_3.entry.js
1 year ago
sc-manual-payment-method_3.entry.js.map
1 year ago
sc-menu-divider.entry.js
1 year ago
sc-menu-divider.entry.js.map
1 year ago
sc-menu-label_2.entry.js
1 year ago
sc-menu-label_2.entry.js.map
1 year ago
sc-mollie-add-method.entry.js
1 year ago
sc-mollie-add-method.entry.js.map
1 year ago
sc-order-confirmation-customer.entry.js
1 year ago
sc-order-confirmation-customer.entry.js.map
1 year ago
sc-order-confirmation-details.entry.js
1 year ago
sc-order-confirmation-details.entry.js.map
1 year ago
sc-order-confirmation-line-items_2.entry.js
1 year ago
sc-order-confirmation-line-items_2.entry.js.map
1 year ago
sc-order-confirmation.entry.js
1 year ago
sc-order-confirmation.entry.js.map
1 year ago
sc-order-coupon-form.entry.js
1 year ago
sc-order-coupon-form.entry.js.map
1 year ago
sc-order-detail.entry.js
1 year ago
sc-order-detail.entry.js.map
1 year ago
sc-order-fulfillment-badge.entry.js
1 year ago
sc-order-fulfillment-badge.entry.js.map
1 year ago
sc-order-manual-instructions.entry.js
1 year ago
sc-order-manual-instructions.entry.js.map
1 year ago
sc-order-password.entry.js
1 year ago
sc-order-password.entry.js.map
1 year ago
sc-order-return-badge.entry.js
1 year ago
sc-order-return-badge.entry.js.map
1 year ago
sc-order-shipment-badge.entry.js
1 year ago
sc-order-shipment-badge.entry.js.map
1 year ago
sc-order-status-badge.entry.js
1 year ago
sc-order-status-badge.entry.js.map
1 year ago
sc-order-submit.entry.js
1 year ago
sc-order-submit.entry.js.map
1 year ago
sc-order-summary.entry.js
1 year ago
sc-order-summary.entry.js.map
1 year ago
sc-order.entry.js
1 year ago
sc-order.entry.js.map
1 year ago
sc-orders-list.entry.js
1 year ago
sc-orders-list.entry.js.map
1 year ago
sc-pagination.entry.js
1 year ago
sc-pagination.entry.js.map
1 year ago
sc-password-nag.entry.js
1 year ago
sc-password-nag.entry.js.map
1 year ago
sc-password.entry.js
1 year ago
sc-password.entry.js.map
1 year ago
sc-payment-method-choice_2.entry.js
1 year ago
sc-payment-method-choice_2.entry.js.map
1 year ago
sc-payment-method-details.entry.js
1 year ago
sc-payment-method-details.entry.js.map
1 year ago
sc-payment-methods-list.entry.js
1 year ago
sc-payment-methods-list.entry.js.map
1 year ago
sc-payment.entry.js
1 year ago
sc-payment.entry.js.map
1 year ago
sc-paypal-add-method.entry.js
1 year ago
sc-paypal-add-method.entry.js.map
1 year ago
sc-paypal-buttons_2.entry.js
1 year ago
sc-paypal-buttons_2.entry.js.map
1 year ago
sc-paystack-add-method.entry.js
1 year ago
sc-paystack-add-method.entry.js.map
1 year ago
sc-phone-input.entry.js
1 year ago
sc-phone-input.entry.js.map
1 year ago
sc-pill-option.entry.js
1 year ago
sc-pill-option.entry.js.map
1 year ago
sc-premium-tag.entry.js
1 year ago
sc-premium-tag.entry.js.map
1 year ago
sc-price-choice-container.entry.js
1 year ago
sc-price-choice-container.entry.js.map
1 year ago
sc-price-choice.entry.js
1 year ago
sc-price-choice.entry.js.map
1 year ago
sc-price-choices.entry.js
1 year ago
sc-price-choices.entry.js.map
1 year ago
sc-price-input.entry.js
1 year ago
sc-price-input.entry.js.map
1 year ago
sc-price-range.entry.js
1 year ago
sc-price-range.entry.js.map
1 year ago
sc-price.entry.js
1 year ago
sc-price.entry.js.map
1 year ago
sc-product-buy-button.entry.js
1 year ago
sc-product-buy-button.entry.js.map
1 year ago
sc-product-donation-amount-choice.entry.js
1 year ago
sc-product-donation-amount-choice.entry.js.map
1 year ago
sc-product-donation-choices.entry.js
1 year ago
sc-product-donation-choices.entry.js.map
1 year ago
sc-product-donation-custom-amount.entry.js
1 year ago
sc-product-donation-custom-amount.entry.js.map
1 year ago
sc-product-item-image_3.entry.js
1 year ago
sc-product-item-image_3.entry.js.map
1 year ago
sc-product-item-list.entry.js
1 year ago
sc-product-item-list.entry.js.map
1 year ago
sc-product-item.entry.js
1 year ago
sc-product-item.entry.js.map
1 year ago
sc-product-line-item_2.entry.js
1 year ago
sc-product-line-item_2.entry.js.map
1 year ago
sc-product-pills-variant-option.entry.js
1 year ago
sc-product-pills-variant-option.entry.js.map
1 year ago
sc-product-price-choices.entry.js
1 year ago
sc-product-price-choices.entry.js.map
1 year ago
sc-product-price-modal.entry.js
1 year ago
sc-product-price-modal.entry.js.map
1 year ago
sc-product-price.entry.js
1 year ago
sc-product-price.entry.js.map
1 year ago
sc-product-quantity.entry.js
1 year ago
sc-product-quantity.entry.js.map
1 year ago
sc-product-selected-price.entry.js
1 year ago
sc-product-selected-price.entry.js.map
1 year ago
sc-product-text.entry.js
1 year ago
sc-product-text.entry.js.map
1 year ago
sc-provider.entry.js
1 year ago
sc-provider.entry.js.map
1 year ago
sc-provisional-banner.entry.js
1 year ago
sc-provisional-banner.entry.js.map
1 year ago
sc-purchase-downloads-list.entry.js
1 year ago
sc-purchase-downloads-list.entry.js.map
1 year ago
sc-recurring-price-choice-container.entry.js
1 year ago
sc-recurring-price-choice-container.entry.js.map
1 year ago
sc-rich-text.entry.js
1 year ago
sc-rich-text.entry.js.map
1 year ago
sc-spacing.entry.js
1 year ago
sc-spacing.entry.js.map
1 year ago
sc-stacked-list_2.entry.js
1 year ago
sc-stacked-list_2.entry.js.map
1 year ago
sc-stripe-add-method.entry.js
1 year ago
sc-stripe-add-method.entry.js.map
1 year ago
sc-stripe-element.entry.js
1 year ago
sc-stripe-element.entry.js.map
1 year ago
sc-stripe-payment-element.entry.js
1 year ago
sc-stripe-payment-element.entry.js.map
1 year ago
sc-stripe-payment-request.entry.js
1 year ago
sc-stripe-payment-request.entry.js.map
1 year ago
sc-subscription-ad-hoc-confirm.entry.js
1 year ago
sc-subscription-ad-hoc-confirm.entry.js.map
1 year ago
sc-subscription-details_2.entry.js
1 year ago
sc-subscription-details_2.entry.js.map
1 year ago
sc-subscription-payment-method.entry.js
1 year ago
sc-subscription-payment-method.entry.js.map
1 year ago
sc-subscription-payment.entry.js
1 year ago
sc-subscription-payment.entry.js.map
1 year ago
sc-subscription-switch.entry.js
1 year ago
sc-subscription-switch.entry.js.map
1 year ago
sc-subscription-variation-confirm.entry.js
1 year ago
sc-subscription-variation-confirm.entry.js.map
1 year ago
sc-subscription.entry.js
1 year ago
sc-subscription.entry.js.map
1 year ago
sc-subscriptions-list.entry.js
1 year ago
sc-subscriptions-list.entry.js.map
1 year ago
sc-summary.entry.js
1 year ago
sc-summary.entry.js.map
1 year ago
sc-switch.entry.js
1 year ago
sc-switch.entry.js.map
1 year ago
sc-tab-group.entry.js
1 year ago
sc-tab-group.entry.js.map
1 year ago
sc-tab-panel.entry.js
1 year ago
sc-tab-panel.entry.js.map
1 year ago
sc-tab.entry.js
1 year ago
sc-tab.entry.js.map
1 year ago
sc-table-head.entry.js
1 year ago
sc-table-head.entry.js.map
1 year ago
sc-table_3.entry.js
1 year ago
sc-table_3.entry.js.map
1 year ago
sc-tag.entry.js
1 year ago
sc-tag.entry.js.map
1 year ago
sc-toggle.entry.js
1 year ago
sc-toggle.entry.js.map
1 year ago
sc-toggles.entry.js
1 year ago
sc-toggles.entry.js.map
1 year ago
sc-total.entry.js
1 year ago
sc-total.entry.js.map
1 year ago
sc-upcoming-invoice.entry.js
1 year ago
sc-upcoming-invoice.entry.js.map
1 year ago
sc-upgrade-required.entry.js
1 year ago
sc-upgrade-required.entry.js.map
1 year ago
sc-upsell-countdown-timer.entry.js
1 year ago
sc-upsell-countdown-timer.entry.js.map
1 year ago
sc-upsell-no-thanks-button.entry.js
1 year ago
sc-upsell-no-thanks-button.entry.js.map
1 year ago
sc-upsell-submit-button.entry.js
1 year ago
sc-upsell-submit-button.entry.js.map
1 year ago
sc-upsell-totals.entry.js
1 year ago
sc-upsell-totals.entry.js.map
1 year ago
sc-upsell.entry.js
1 year ago
sc-upsell.entry.js.map
1 year ago
sc-visually-hidden.entry.js
1 year ago
sc-visually-hidden.entry.js.map
1 year ago
sc-wordpress-password-edit.entry.js
1 year ago
sc-wordpress-password-edit.entry.js.map
1 year ago
sc-wordpress-user-edit.entry.js
1 year ago
sc-wordpress-user-edit.entry.js.map
1 year ago
sc-wordpress-user.entry.js
1 year ago
sc-wordpress-user.entry.js.map
1 year ago
store-093f0f6a.js
1 year ago
store-093f0f6a.js.map
1 year ago
store-a8bae355.js
1 year ago
store-a8bae355.js.map
1 year ago
store-dcefd119.js
1 year ago
store-dcefd119.js.map
1 year ago
surecart.js
1 year ago
surecart.js.map
1 year ago
tax-d4911dbc.js
1 year ago
tax-d4911dbc.js.map
1 year ago
universe-5a73abb7.js
1 year ago
universe-5a73abb7.js.map
1 year ago
util-50af2a83.js
1 year ago
util-50af2a83.js.map
1 year ago
utils-e9ee502a.js
1 year ago
utils-e9ee502a.js.map
1 year ago
watchers-38693c1f.js
1 year ago
watchers-38693c1f.js.map
1 year ago
watchers-4d2edfb0.js
1 year ago
watchers-4d2edfb0.js.map
1 year ago
watchers-4e5b728a.js
1 year ago
watchers-4e5b728a.js.map
1 year ago
watchers-67501779.js
1 year ago
watchers-67501779.js.map
1 year ago
watchers-a697b0c8.js
1 year ago
watchers-a697b0c8.js.map
1 year ago
sc-customer-details.entry.js
426 lines
| 1 | import { r as registerInstance, h, a as getElement } from './index-745b6bec.js'; |
| 2 | import { c as countryChoices } from './address-b892540d.js'; |
| 3 | import { z as zones } from './tax-d4911dbc.js'; |
| 4 | |
| 5 | var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; |
| 6 | |
| 7 | var index_umd = {exports: {}}; |
| 8 | |
| 9 | (function (module, exports) { |
| 10 | (function (global, factory) { |
| 11 | factory(exports) ; |
| 12 | })(commonjsGlobal, (function (exports) { |
| 13 | // This file is auto-generated via "npm run update-formats". Do not alter manually! |
| 14 | const addressFormats = new Map([ |
| 15 | ['AC', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 16 | ['AD', { local: '%N%n%O%n%A%n%Z %C' }], |
| 17 | ['AE', { local: '%N%n%O%n%A%n%S', latin: '%N%n%O%n%A%n%S' }], |
| 18 | ['AF', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 19 | ['AI', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 20 | ['AL', { local: '%N%n%O%n%A%n%Z%n%C' }], |
| 21 | ['AM', { local: '%N%n%O%n%A%n%Z%n%C%n%S', latin: '%N%n%O%n%A%n%Z%n%C%n%S' }], |
| 22 | ['AR', { local: '%N%n%O%n%A%n%Z %C%n%S' }], |
| 23 | ['AS', { local: '%N%n%O%n%A%n%C %S %Z' }], |
| 24 | ['AT', { local: '%O%n%N%n%A%n%Z %C' }], |
| 25 | ['AU', { local: '%O%n%N%n%A%n%C %S %Z' }], |
| 26 | ['AX', { local: '%O%n%N%n%A%nAX-%Z %C%n� |
| 27 | LAND' }], |
| 28 | ['AZ', { local: '%N%n%O%n%A%nAZ %Z %C' }], |
| 29 | ['BA', { local: '%N%n%O%n%A%n%Z %C' }], |
| 30 | ['BB', { local: '%N%n%O%n%A%n%C, %S %Z' }], |
| 31 | ['BD', { local: '%N%n%O%n%A%n%C - %Z' }], |
| 32 | ['BE', { local: '%O%n%N%n%A%n%Z %C' }], |
| 33 | ['BF', { local: '%N%n%O%n%A%n%C %X' }], |
| 34 | ['BG', { local: '%N%n%O%n%A%n%Z %C' }], |
| 35 | ['BH', { local: '%N%n%O%n%A%n%C %Z' }], |
| 36 | ['BL', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 37 | ['BM', { local: '%N%n%O%n%A%n%C %Z' }], |
| 38 | ['BN', { local: '%N%n%O%n%A%n%C %Z' }], |
| 39 | ['BR', { local: '%O%n%N%n%A%n%D%n%C-%S%n%Z' }], |
| 40 | ['BS', { local: '%N%n%O%n%A%n%C, %S' }], |
| 41 | ['BT', { local: '%N%n%O%n%A%n%C %Z' }], |
| 42 | ['BY', { local: '%O%n%N%n%A%n%Z, %C%n%S' }], |
| 43 | ['CA', { local: '%N%n%O%n%A%n%C %S %Z' }], |
| 44 | ['CC', { local: '%O%n%N%n%A%n%C %S %Z' }], |
| 45 | ['CH', { local: '%O%n%N%n%A%nCH-%Z %C' }], |
| 46 | ['CI', { local: '%N%n%O%n%X %A %C %X' }], |
| 47 | ['CL', { local: '%N%n%O%n%A%n%Z %C%n%S' }], |
| 48 | ['CN', { local: '%Z%n%S%C%D%n%A%n%O%n%N', latin: '%N%n%O%n%A%n%D%n%C%n%S, %Z' }], |
| 49 | ['CO', { local: '%N%n%O%n%A%n%D%n%C, %S, %Z' }], |
| 50 | ['CR', { local: '%N%n%O%n%A%n%S, %C%n%Z' }], |
| 51 | ['CU', { local: '%N%n%O%n%A%n%C %S%n%Z' }], |
| 52 | ['CV', { local: '%N%n%O%n%A%n%Z %C%n%S' }], |
| 53 | ['CX', { local: '%O%n%N%n%A%n%C %S %Z' }], |
| 54 | ['CY', { local: '%N%n%O%n%A%n%Z %C' }], |
| 55 | ['CZ', { local: '%N%n%O%n%A%n%Z %C' }], |
| 56 | ['DE', { local: '%N%n%O%n%A%n%Z %C' }], |
| 57 | ['DK', { local: '%N%n%O%n%A%n%Z %C' }], |
| 58 | ['DO', { local: '%N%n%O%n%A%n%Z %C' }], |
| 59 | ['DZ', { local: '%N%n%O%n%A%n%Z %C' }], |
| 60 | ['EC', { local: '%N%n%O%n%A%n%Z%n%C' }], |
| 61 | ['EE', { local: '%N%n%O%n%A%n%Z %C %S' }], |
| 62 | ['EG', { local: '%N%n%O%n%A%n%C%n%S%n%Z', latin: '%N%n%O%n%A%n%C%n%S%n%Z' }], |
| 63 | ['EH', { local: '%N%n%O%n%A%n%Z %C' }], |
| 64 | ['ES', { local: '%N%n%O%n%A%n%Z %C %S' }], |
| 65 | ['ET', { local: '%N%n%O%n%A%n%Z %C' }], |
| 66 | ['FI', { local: '%O%n%N%n%A%nFI-%Z %C' }], |
| 67 | ['FK', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 68 | ['FM', { local: '%N%n%O%n%A%n%C %S %Z' }], |
| 69 | ['FO', { local: '%N%n%O%n%A%nFO%Z %C' }], |
| 70 | ['FR', { local: '%O%n%N%n%A%n%Z %C' }], |
| 71 | ['GB', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 72 | ['GE', { local: '%N%n%O%n%A%n%Z %C' }], |
| 73 | ['GF', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 74 | ['GG', { local: '%N%n%O%n%A%n%C%nGUERNSEY%n%Z' }], |
| 75 | ['GI', { local: '%N%n%O%n%A%nGIBRALTAR%n%Z' }], |
| 76 | ['GL', { local: '%N%n%O%n%A%n%Z %C' }], |
| 77 | ['GN', { local: '%N%n%O%n%Z %A %C' }], |
| 78 | ['GP', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 79 | ['GR', { local: '%N%n%O%n%A%n%Z %C' }], |
| 80 | ['GS', { local: '%N%n%O%n%A%n%n%C%n%Z' }], |
| 81 | ['GT', { local: '%N%n%O%n%A%n%Z- %C' }], |
| 82 | ['GU', { local: '%N%n%O%n%A%n%C %Z' }], |
| 83 | ['GW', { local: '%N%n%O%n%A%n%Z %C' }], |
| 84 | ['HK', { local: '%S%n%C%n%A%n%O%n%N', latin: '%N%n%O%n%A%n%C%n%S' }], |
| 85 | ['HM', { local: '%O%n%N%n%A%n%C %S %Z' }], |
| 86 | ['HN', { local: '%N%n%O%n%A%n%C, %S%n%Z' }], |
| 87 | ['HR', { local: '%N%n%O%n%A%nHR-%Z %C' }], |
| 88 | ['HT', { local: '%N%n%O%n%A%nHT%Z %C' }], |
| 89 | ['HU', { local: '%N%n%O%n%C%n%A%n%Z' }], |
| 90 | ['ID', { local: '%N%n%O%n%A%n%C%n%S %Z' }], |
| 91 | ['IE', { local: '%N%n%O%n%A%n%D%n%C%n%S%n%Z' }], |
| 92 | ['IL', { local: '%N%n%O%n%A%n%C %Z' }], |
| 93 | ['IM', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 94 | ['IN', { local: '%N%n%O%n%A%n%C %Z%n%S' }], |
| 95 | ['IO', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 96 | ['IQ', { local: '%O%n%N%n%A%n%C, %S%n%Z' }], |
| 97 | ['IR', { local: '%O%n%N%n%S%n%C, %D%n%A%n%Z' }], |
| 98 | ['IS', { local: '%N%n%O%n%A%n%Z %C' }], |
| 99 | ['IT', { local: '%N%n%O%n%A%n%Z %C %S' }], |
| 100 | ['JE', { local: '%N%n%O%n%A%n%C%nJERSEY%n%Z' }], |
| 101 | ['JM', { local: '%N%n%O%n%A%n%C%n%S %X' }], |
| 102 | ['JO', { local: '%N%n%O%n%A%n%C %Z' }], |
| 103 | ['JP', { local: '〒%Z%n%S%n%A%n%O%n%N', latin: '%N%n%O%n%A, %S%n%Z' }], |
| 104 | ['KE', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 105 | ['KG', { local: '%N%n%O%n%A%n%Z %C' }], |
| 106 | ['KH', { local: '%N%n%O%n%A%n%C %Z' }], |
| 107 | ['KI', { local: '%N%n%O%n%A%n%S%n%C' }], |
| 108 | ['KN', { local: '%N%n%O%n%A%n%C, %S' }], |
| 109 | ['KP', { local: '%Z%n%S%n%C%n%A%n%O%n%N', latin: '%N%n%O%n%A%n%C%n%S, %Z' }], |
| 110 | ['KR', { local: '%S %C%D%n%A%n%O%n%N%n%Z', latin: '%N%n%O%n%A%n%D%n%C%n%S%n%Z' }], |
| 111 | ['KW', { local: '%N%n%O%n%A%n%Z %C' }], |
| 112 | ['KY', { local: '%N%n%O%n%A%n%S %Z' }], |
| 113 | ['KZ', { local: '%Z%n%S%n%C%n%A%n%O%n%N' }], |
| 114 | ['LA', { local: '%N%n%O%n%A%n%Z %C' }], |
| 115 | ['LB', { local: '%N%n%O%n%A%n%C %Z' }], |
| 116 | ['LI', { local: '%O%n%N%n%A%nFL-%Z %C' }], |
| 117 | ['LK', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 118 | ['LR', { local: '%N%n%O%n%A%n%Z %C' }], |
| 119 | ['LS', { local: '%N%n%O%n%A%n%C %Z' }], |
| 120 | ['LT', { local: '%O%n%N%n%A%nLT-%Z %C %S' }], |
| 121 | ['LU', { local: '%O%n%N%n%A%nL-%Z %C' }], |
| 122 | ['LV', { local: '%N%n%O%n%A%n%S%n%C, %Z' }], |
| 123 | ['MA', { local: '%N%n%O%n%A%n%Z %C' }], |
| 124 | ['MC', { local: '%N%n%O%n%A%nMC-%Z %C %X' }], |
| 125 | ['MD', { local: '%N%n%O%n%A%nMD-%Z %C' }], |
| 126 | ['ME', { local: '%N%n%O%n%A%n%Z %C' }], |
| 127 | ['MF', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 128 | ['MG', { local: '%N%n%O%n%A%n%Z %C' }], |
| 129 | ['MH', { local: '%N%n%O%n%A%n%C %S %Z' }], |
| 130 | ['MK', { local: '%N%n%O%n%A%n%Z %C' }], |
| 131 | ['MM', { local: '%N%n%O%n%A%n%C, %Z' }], |
| 132 | ['MN', { local: '%N%n%O%n%A%n%C%n%S %Z' }], |
| 133 | ['MO', { local: '%A%n%O%n%N', latin: '%N%n%O%n%A' }], |
| 134 | ['MP', { local: '%N%n%O%n%A%n%C %S %Z' }], |
| 135 | ['MQ', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 136 | ['MT', { local: '%N%n%O%n%A%n%C %Z' }], |
| 137 | ['MU', { local: '%N%n%O%n%A%n%Z%n%C' }], |
| 138 | ['MV', { local: '%N%n%O%n%A%n%C %Z' }], |
| 139 | ['MW', { local: '%N%n%O%n%A%n%C %X' }], |
| 140 | ['MX', { local: '%N%n%O%n%A%n%D%n%Z %C, %S' }], |
| 141 | ['MY', { local: '%N%n%O%n%A%n%D%n%Z %C%n%S' }], |
| 142 | ['MZ', { local: '%N%n%O%n%A%n%Z %C%S' }], |
| 143 | ['NA', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 144 | ['NC', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 145 | ['NE', { local: '%N%n%O%n%A%n%Z %C' }], |
| 146 | ['NF', { local: '%O%n%N%n%A%n%C %S %Z' }], |
| 147 | ['NG', { local: '%N%n%O%n%A%n%D%n%C %Z%n%S' }], |
| 148 | ['NI', { local: '%N%n%O%n%A%n%Z%n%C, %S' }], |
| 149 | ['NL', { local: '%O%n%N%n%A%n%Z %C' }], |
| 150 | ['NO', { local: '%N%n%O%n%A%n%Z %C' }], |
| 151 | ['NP', { local: '%N%n%O%n%A%n%C %Z' }], |
| 152 | ['NR', { local: '%N%n%O%n%A%n%S' }], |
| 153 | ['NZ', { local: '%N%n%O%n%A%n%D%n%C %Z' }], |
| 154 | ['OM', { local: '%N%n%O%n%A%n%Z%n%C' }], |
| 155 | ['PA', { local: '%N%n%O%n%A%n%C%n%S' }], |
| 156 | ['PE', { local: '%N%n%O%n%A%n%C %Z%n%S' }], |
| 157 | ['PF', { local: '%N%n%O%n%A%n%Z %C %S' }], |
| 158 | ['PG', { local: '%N%n%O%n%A%n%C %Z %S' }], |
| 159 | ['PH', { local: '%N%n%O%n%A%n%D, %C%n%Z %S' }], |
| 160 | ['PK', { local: '%N%n%O%n%A%n%D%n%C-%Z' }], |
| 161 | ['PL', { local: '%N%n%O%n%A%n%Z %C' }], |
| 162 | ['PM', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 163 | ['PN', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 164 | ['PR', { local: '%N%n%O%n%A%n%C PR %Z' }], |
| 165 | ['PT', { local: '%N%n%O%n%A%n%Z %C' }], |
| 166 | ['PW', { local: '%N%n%O%n%A%n%C %S %Z' }], |
| 167 | ['PY', { local: '%N%n%O%n%A%n%Z %C' }], |
| 168 | ['RE', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 169 | ['RO', { local: '%N%n%O%n%A%n%Z %S %C' }], |
| 170 | ['RS', { local: '%N%n%O%n%A%n%Z %C' }], |
| 171 | ['RU', { local: '%N%n%O%n%A%n%C%n%S%n%Z', latin: '%N%n%O%n%A%n%C%n%S%n%Z' }], |
| 172 | ['SA', { local: '%N%n%O%n%A%n%C %Z' }], |
| 173 | ['SC', { local: '%N%n%O%n%A%n%C%n%S' }], |
| 174 | ['SD', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 175 | ['SE', { local: '%O%n%N%n%A%nSE-%Z %C' }], |
| 176 | ['SG', { local: '%N%n%O%n%A%nSINGAPORE %Z' }], |
| 177 | ['SH', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 178 | ['SI', { local: '%N%n%O%n%A%nSI-%Z %C' }], |
| 179 | ['SJ', { local: '%N%n%O%n%A%n%Z %C' }], |
| 180 | ['SK', { local: '%N%n%O%n%A%n%Z %C' }], |
| 181 | ['SM', { local: '%N%n%O%n%A%n%Z %C' }], |
| 182 | ['SN', { local: '%N%n%O%n%A%n%Z %C' }], |
| 183 | ['SO', { local: '%N%n%O%n%A%n%C, %S %Z' }], |
| 184 | ['SR', { local: '%N%n%O%n%A%n%C%n%S' }], |
| 185 | ['SV', { local: '%N%n%O%n%A%n%Z-%C%n%S' }], |
| 186 | ['SZ', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 187 | ['TA', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 188 | ['TC', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 189 | ['TH', { local: '%N%n%O%n%A%n%D %C%n%S %Z', latin: '%N%n%O%n%A%n%D, %C%n%S %Z' }], |
| 190 | ['TJ', { local: '%N%n%O%n%A%n%Z %C' }], |
| 191 | ['TM', { local: '%N%n%O%n%A%n%Z %C' }], |
| 192 | ['TN', { local: '%N%n%O%n%A%n%Z %C' }], |
| 193 | ['TR', { local: '%N%n%O%n%A%n%Z %C/%S' }], |
| 194 | ['TV', { local: '%N%n%O%n%A%n%C%n%S' }], |
| 195 | ['TW', { local: '%Z%n%S%C%n%A%n%O%n%N', latin: '%N%n%O%n%A%n%C, %S %Z' }], |
| 196 | ['TZ', { local: '%N%n%O%n%A%n%Z %C' }], |
| 197 | ['UA', { local: '%N%n%O%n%A%n%C%n%S%n%Z', latin: '%N%n%O%n%A%n%C%n%S%n%Z' }], |
| 198 | ['UM', { local: '%N%n%O%n%A%n%C %S %Z' }], |
| 199 | ['US', { local: '%N%n%O%n%A%n%C, %S %Z' }], |
| 200 | ['UY', { local: '%N%n%O%n%A%n%Z %C %S' }], |
| 201 | ['UZ', { local: '%N%n%O%n%A%n%Z %C%n%S' }], |
| 202 | ['VA', { local: '%N%n%O%n%A%n%Z %C' }], |
| 203 | ['VC', { local: '%N%n%O%n%A%n%C %Z' }], |
| 204 | ['VE', { local: '%N%n%O%n%A%n%C %Z, %S' }], |
| 205 | ['VG', { local: '%N%n%O%n%A%n%C%n%Z' }], |
| 206 | ['VI', { local: '%N%n%O%n%A%n%C %S %Z' }], |
| 207 | ['VN', { local: '%N%n%O%n%A%n%C%n%S %Z', latin: '%N%n%O%n%A%n%C%n%S %Z' }], |
| 208 | ['WF', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 209 | ['XK', { local: '%N%n%O%n%A%n%Z %C' }], |
| 210 | ['YT', { local: '%O%n%N%n%A%n%Z %C %X' }], |
| 211 | ['ZA', { local: '%N%n%O%n%A%n%D%n%C%n%Z' }], |
| 212 | ['ZM', { local: '%N%n%O%n%A%n%Z %C' }], |
| 213 | ]); |
| 214 | const defaultAddressFormat = '%N%n%O%n%A%n%C'; |
| 215 | |
| 216 | const getFormatString = (countryCode, scriptType) => { |
| 217 | var _a; |
| 218 | const format = addressFormats.get(countryCode.toUpperCase()); |
| 219 | if (!format) { |
| 220 | return defaultAddressFormat; |
| 221 | } |
| 222 | return (_a = format[scriptType]) !== null && _a !== void 0 ? _a : format.local; |
| 223 | }; |
| 224 | const getFormatSubstrings = (format) => { |
| 225 | const parts = []; |
| 226 | let escaped = false; |
| 227 | let currentLiteral = ''; |
| 228 | for (const char of format) { |
| 229 | if (escaped) { |
| 230 | escaped = false; |
| 231 | parts.push(`%${char}`); |
| 232 | continue; |
| 233 | } |
| 234 | if (char !== '%') { |
| 235 | currentLiteral += char; |
| 236 | continue; |
| 237 | } |
| 238 | if (currentLiteral.length > 0) { |
| 239 | parts.push(currentLiteral); |
| 240 | currentLiteral = ''; |
| 241 | } |
| 242 | escaped = true; |
| 243 | } |
| 244 | if (currentLiteral.length > 0) { |
| 245 | parts.push(currentLiteral); |
| 246 | } |
| 247 | return parts; |
| 248 | }; |
| 249 | const fields = new Map([ |
| 250 | ['%N', 'name'], |
| 251 | ['%O', 'organization'], |
| 252 | ['%A', 'addressLines'], |
| 253 | ['%D', 'dependentLocality'], |
| 254 | ['%C', 'locality'], |
| 255 | ['%S', 'administrativeArea'], |
| 256 | ['%Z', 'postalCode'], |
| 257 | ['%X', 'sortingCode'], |
| 258 | ['%R', 'postalCountry'], |
| 259 | ]); |
| 260 | const getFieldForFormatSubstring = (formatSubstring) => { |
| 261 | const field = fields.get(formatSubstring); |
| 262 | /* istanbul ignore next imported format strings should never contain invalid substrings */ |
| 263 | if (!field) { |
| 264 | throw new Error(`Could not find field for format substring ${formatSubstring}`); |
| 265 | } |
| 266 | return field; |
| 267 | }; |
| 268 | const addressHasValueForField = (address, field) => { |
| 269 | if (field === 'addressLines') { |
| 270 | return address.addressLines !== undefined && address.addressLines.length > 0; |
| 271 | } |
| 272 | return address[field] !== undefined && address[field] !== ''; |
| 273 | }; |
| 274 | const formatSubstringRepresentsField = (formatSubstring) => { |
| 275 | return formatSubstring !== '%n' && formatSubstring.startsWith('%'); |
| 276 | }; |
| 277 | const pruneFormat = (formatSubstrings, address) => { |
| 278 | const prunedFormat = []; |
| 279 | for (const [i, formatSubstring] of formatSubstrings.entries()) { |
| 280 | // Always keep the newlines. |
| 281 | if (formatSubstring === '%n') { |
| 282 | prunedFormat.push(formatSubstring); |
| 283 | continue; |
| 284 | } |
| 285 | if (formatSubstringRepresentsField(formatSubstring)) { |
| 286 | // Always keep non-empty address fields. |
| 287 | if (addressHasValueForField(address, getFieldForFormatSubstring(formatSubstring))) { |
| 288 | prunedFormat.push(formatSubstring); |
| 289 | } |
| 290 | continue; |
| 291 | } |
| 292 | // Only keep literals that satisfy these two conditions: |
| 293 | // 1. Not preceding an empty field. |
| 294 | // 2. Not following a removed field. |
| 295 | if ((i === formatSubstrings.length - 1 |
| 296 | || formatSubstrings[i + 1] === '%n' |
| 297 | || addressHasValueForField(address, getFieldForFormatSubstring(formatSubstrings[i + 1]))) && (i === 0 |
| 298 | || !formatSubstringRepresentsField(formatSubstrings[i - 1]) |
| 299 | || (prunedFormat.length > 0 && formatSubstringRepresentsField(prunedFormat[prunedFormat.length - 1])))) { |
| 300 | prunedFormat.push(formatSubstring); |
| 301 | } |
| 302 | } |
| 303 | return prunedFormat; |
| 304 | }; |
| 305 | const formatAddress = (address, scriptType = 'local') => { |
| 306 | var _a; |
| 307 | const formatString = getFormatString((_a = address.postalCountry) !== null && _a !== void 0 ? _a : 'ZZ', scriptType); |
| 308 | const formatSubstrings = getFormatSubstrings(formatString); |
| 309 | const prunedFormat = pruneFormat(formatSubstrings, address); |
| 310 | const lines = []; |
| 311 | let currentLine = ''; |
| 312 | for (const formatSubstring of prunedFormat) { |
| 313 | if (formatSubstring === '%n') { |
| 314 | if (currentLine.length > 0) { |
| 315 | lines.push(currentLine); |
| 316 | currentLine = ''; |
| 317 | } |
| 318 | continue; |
| 319 | } |
| 320 | if (!formatSubstringRepresentsField(formatSubstring)) { |
| 321 | // Not a symbol we recognize, so must be a literal. We append it unchanged. |
| 322 | currentLine += formatSubstring; |
| 323 | continue; |
| 324 | } |
| 325 | const field = getFieldForFormatSubstring(formatSubstring); |
| 326 | /* istanbul ignore next imported format strings should never contain the postal country */ |
| 327 | if (field === 'postalCountry') { |
| 328 | // Country name is treated separately. |
| 329 | continue; |
| 330 | } |
| 331 | if (field === 'addressLines') { |
| 332 | // The field "address lines" represents the address lines of an address, so there can be multiple values. |
| 333 | // It is safe to assert addressLines to be defined here, as the pruning process already checked for that. |
| 334 | const addressLines = address.addressLines.filter(addressLine => addressLine !== ''); |
| 335 | if (addressLines.length === 0) { |
| 336 | // Empty address lines are ignored. |
| 337 | continue; |
| 338 | } |
| 339 | currentLine += addressLines[0]; |
| 340 | if (addressLines.length > 1) { |
| 341 | lines.push(currentLine); |
| 342 | currentLine = ''; |
| 343 | lines.push(...addressLines.slice(1)); |
| 344 | } |
| 345 | continue; |
| 346 | } |
| 347 | // Any other field can be appended as is. |
| 348 | currentLine += address[field]; |
| 349 | } |
| 350 | if (currentLine.length > 0) { |
| 351 | lines.push(currentLine); |
| 352 | } |
| 353 | return lines; |
| 354 | }; |
| 355 | |
| 356 | exports.formatAddress = formatAddress; |
| 357 | |
| 358 | Object.defineProperty(exports, '__esModule', { value: true }); |
| 359 | |
| 360 | })); |
| 361 | |
| 362 | }(index_umd, index_umd.exports)); |
| 363 | |
| 364 | const scCustomerDetailsCss = ""; |
| 365 | const ScCustomerDetailsStyle0 = scCustomerDetailsCss; |
| 366 | |
| 367 | const ScCustomerDetails = class { |
| 368 | constructor(hostRef) { |
| 369 | registerInstance(this, hostRef); |
| 370 | this.heading = undefined; |
| 371 | this.editLink = undefined; |
| 372 | this.customer = undefined; |
| 373 | this.loading = undefined; |
| 374 | this.error = undefined; |
| 375 | } |
| 376 | renderContent() { |
| 377 | var _a, _b, _c, _d, _e, _f, _g, _h; |
| 378 | if (this.loading) { |
| 379 | return this.renderLoading(); |
| 380 | } |
| 381 | if (!this.customer) { |
| 382 | return this.renderEmpty(); |
| 383 | } |
| 384 | return (h("sc-card", { "no-padding": true }, h("sc-stacked-list", null, !!((_a = this === null || this === void 0 ? void 0 : this.customer) === null || _a === void 0 ? void 0 : _a.name) && (h("sc-stacked-list-row", { style: { '--columns': '3' }, mobileSize: 480 }, h("div", null, h("strong", null, wp.i18n.__('Billing Name', 'surecart'))), h("div", null, (_b = this.customer) === null || _b === void 0 ? void 0 : _b.name), h("div", null))), !!((_c = this === null || this === void 0 ? void 0 : this.customer) === null || _c === void 0 ? void 0 : _c.email) && (h("sc-stacked-list-row", { style: { '--columns': '3' }, mobileSize: 480 }, h("div", null, h("strong", null, wp.i18n.__('Billing Email', 'surecart'))), h("div", null, (_d = this.customer) === null || _d === void 0 ? void 0 : _d.email), h("div", null))), !!Object.keys(((_e = this === null || this === void 0 ? void 0 : this.customer) === null || _e === void 0 ? void 0 : _e.shipping_address) || {}).length && this.renderAddress(wp.i18n.__('Shipping Address', 'surecart'), this.customer.shipping_address), !!Object.keys((_f = this.customer) === null || _f === void 0 ? void 0 : _f.billing_address_display).length && this.renderAddress(wp.i18n.__('Billing Address', 'surecart'), this.customer.billing_address_display), !!((_g = this === null || this === void 0 ? void 0 : this.customer) === null || _g === void 0 ? void 0 : _g.phone) && (h("sc-stacked-list-row", { style: { '--columns': '3' }, mobileSize: 480 }, h("div", null, h("strong", null, wp.i18n.__('Phone', 'surecart'))), h("div", null, (_h = this.customer) === null || _h === void 0 ? void 0 : _h.phone), h("div", null))), (() => { |
| 385 | var _a, _b, _c, _d; |
| 386 | const { number_type, number } = ((_a = this.customer) === null || _a === void 0 ? void 0 : _a.tax_identifier) || {}; |
| 387 | if (!number || !number_type) |
| 388 | return; |
| 389 | const label = ((_b = zones === null || zones === void 0 ? void 0 : zones[number_type]) === null || _b === void 0 ? void 0 : _b.label) || wp.i18n.__('Tax Id', 'surecart'); |
| 390 | const isInvalid = ((_d = (_c = this.customer) === null || _c === void 0 ? void 0 : _c.tax_identifier) === null || _d === void 0 ? void 0 : _d[`valid_${number_type}`]) === false; |
| 391 | return (h("sc-stacked-list-row", { style: { '--columns': '3' }, mobileSize: 480 }, h("div", null, h("strong", null, label)), h("div", null, number, " ", isInvalid && h("sc-tag", { type: "warning" }, wp.i18n.__('Invalid', 'surecart'))), h("div", null))); |
| 392 | })()))); |
| 393 | } |
| 394 | renderAddress(label = 'Address', address) { |
| 395 | var _a; |
| 396 | const { name, line_1, line_2, city, state, postal_code, country } = address; |
| 397 | const countryName = (_a = countryChoices.find(({ value }) => value === country)) === null || _a === void 0 ? void 0 : _a.label; |
| 398 | return (h("sc-stacked-list-row", { style: { '--columns': '3' }, mobileSize: 480 }, h("div", null, h("strong", null, label)), h("div", null, [ |
| 399 | ...(index_umd.exports.formatAddress({ |
| 400 | name: name || '', |
| 401 | postalCountry: country || '', |
| 402 | administrativeArea: state || '', |
| 403 | locality: city || '', |
| 404 | postalCode: postal_code || '', |
| 405 | addressLines: [line_1, line_2].filter(Boolean), |
| 406 | }) || []), |
| 407 | countryName || country, |
| 408 | ].join('\n')), h("div", null))); |
| 409 | } |
| 410 | renderEmpty() { |
| 411 | return (h("div", null, h("sc-divider", { style: { '--spacing': '0' } }), h("slot", { name: "empty" }, h("sc-empty", { icon: "user" }, wp.i18n.__("You don't have any billing information.", 'surecart'))))); |
| 412 | } |
| 413 | renderLoading() { |
| 414 | return (h("sc-card", { "no-padding": true }, h("sc-stacked-list", null, h("sc-stacked-list-row", { style: { '--columns': '2' }, "mobile-size": 0 }, h("div", { style: { padding: '0.5em' } }, h("sc-skeleton", { style: { width: '30%', marginBottom: '0.75em' } }), h("sc-skeleton", { style: { width: '20%', marginBottom: '0.75em' } }), h("sc-skeleton", { style: { width: '40%' } })))))); |
| 415 | } |
| 416 | render() { |
| 417 | var _a, _b, _c; |
| 418 | return (h("sc-dashboard-module", { key: '71753e0f2080a6cecbec505bb6db6aba7c389e7b', exportparts: "base, heading, heading-text, heading-title, heading-description", class: "customer-details", error: this.error }, h("span", { key: '66fda8c41ec6feb1414ee93518ff5dc3cbfaaa99', slot: "heading" }, this.heading || wp.i18n.__('Billing Details', 'surecart'), ' ', !!((_a = this === null || this === void 0 ? void 0 : this.customer) === null || _a === void 0 ? void 0 : _a.id) && !((_b = this === null || this === void 0 ? void 0 : this.customer) === null || _b === void 0 ? void 0 : _b.live_mode) && (h("sc-tag", { key: '03cb4889d8223134bf315bec3db4b368fcc7351f', exportparts: "base:test-tag__base, content:test-tag__content", type: "warning", size: "small" }, wp.i18n.__('Test', 'surecart')))), !!this.editLink && !!((_c = this.customer) === null || _c === void 0 ? void 0 : _c.id) && (h("sc-button", { key: '1dcc1d1c3c3c40cda9152196235f8160b36ed41e', exportparts: "base:button__base, label:button__label, prefix:button__prefix", type: "link", href: this.editLink, slot: "end" }, h("sc-icon", { key: '3d46c53cee461433d384fa0b0f08b8dd964e07a9', name: "edit-3", slot: "prefix" }), wp.i18n.__('Update', 'surecart'))), this.renderContent())); |
| 419 | } |
| 420 | get el() { return getElement(this); } |
| 421 | }; |
| 422 | ScCustomerDetails.style = ScCustomerDetailsStyle0; |
| 423 | |
| 424 | export { ScCustomerDetails as sc_customer_details }; |
| 425 | |
| 426 | //# sourceMappingURL=sc-customer-details.entry.js.map |