From 2d36f3d3476a19484d36904afa5234dfd835c3a8 Mon Sep 17 00:00:00 2001 From: Stephen Date: Fri, 13 Sep 2024 14:23:56 -0500 Subject: [PATCH 01/89] [chore] create develop branch from dropin fork (#94) --- .eslintignore | 1 + .eslintrc.js | 7 + .github/workflows/run-e2e-tests.yaml | 25 + .gitignore | 2 +- .hlxignore | 1 + .npmrc | 2 + README.md | 14 +- blocks/commerce-account/api/getCustomer.js | 141 + blocks/commerce-account/commerce-account.css | 68 +- blocks/commerce-account/commerce-account.js | 163 +- .../helpers/convertDateFormat.js | 12 + .../helpers/validateOrdersStatus.js | 15 + .../commerce-cart-order-summary.css | 1 + .../commerce-cart-order-summary.js | 27 + .../commerce-cart-summary.css | 1 + .../commerce-cart-summary.js | 26 + blocks/commerce-cart/commerce-cart.js | 46 +- .../commerce-checkout/commerce-checkout.css | 45 +- blocks/commerce-checkout/commerce-checkout.js | 203 +- .../commerce-confirm-account.css | 4 + .../commerce-confirm-account.js | 68 + .../commerce-create-account.css | 4 + .../commerce-create-account.js | 19 + .../commerce-create-password.css | 4 + .../commerce-create-password.js | 68 + .../commerce-empty-cart.css | 1 + .../commerce-empty-cart.js | 15 + .../commerce-forgot-password.css | 4 + .../commerce-forgot-password.js | 22 + blocks/commerce-login/commerce-login.css | 6 +- blocks/commerce-login/commerce-login.js | 25 +- .../commerce-mini-cart/commerce-mini-cart.css | 1 + .../commerce-mini-cart/commerce-mini-cart.js | 20 + .../commerce-order-confirmation.css | 1 + .../commerce-order-confirmation.js | 55 + blocks/fragment/fragment.js | 1 + blocks/header/header.css | 233 +- blocks/header/header.js | 153 +- blocks/header/renderAuthCombine.js | 223 + blocks/header/renderAuthDropdown.js | 104 + blocks/modal/modal.css | 53 + blocks/modal/modal.js | 69 + .../ProductDetailsCarousel.js | 5 - .../ProductDetailsSidebar.js | 1 + .../product-details-custom.js | 10 +- blocks/product-details/product-details.css | 11 +- blocks/product-details/product-details.js | 265 +- blocks/product-list-page/product-list-page.js | 8 +- blocks/product-teaser/product-teaser.js | 10 +- cypress/.gitignore | 10 + cypress/README.md | 11 + cypress/cypress.config.js | 32 + cypress/package-lock.json | 12224 ++++++++++++ cypress/package.json | 32 + cypress/reporter-config.json | 9 + cypress/src/actions/index.js | 68 + cypress/src/assertions/index.js | 168 + cypress/src/fields/index.js | 104 + cypress/src/fixtures/index.js | 33 + cypress/src/fixtures/userInfo.json | 17 + cypress/src/plugins/index.js | 22 + cypress/src/support/deleteCustomer.js | 25 + cypress/src/support/getUserTokenCookie.js | 8 + cypress/src/support/index.js | 2 + .../e2eTests/verifyAuthUserCheckout.spec.js | 181 + .../e2eTests/verifyGuestUserCheckout.spec.js | 102 + .../verifyLowStockInfoMessage.spec.js | 22 + head.html | 6 +- icons/close.svg | 3 + package-lock.json | 2394 ++- package.json | 8 +- postinstall.js | 3 +- scripts/__dropins__/storefront-auth/api.d.ts | 1 + scripts/__dropins__/storefront-auth/api.js | 1 + .../api/confirmEmail/confirmEmail.d.ts | 4 + .../graphql/confirmEmail.graphql.d.ts | 2 + .../api/confirmEmail/index.d.ts | 2 + .../api/createCustomer/createCustomer.d.ts | 4 + .../graphql/createCustomer.graphql.d.ts | 2 + .../graphql/createCustomerV2.graphql.d.ts | 2 + .../api/createCustomer/index.d.ts | 2 + .../createCustomerAddress.d.ts | 4 + .../createCustomerAddress.graphql.d.ts | 2 + .../api/createCustomerAddress/index.d.ts | 2 + .../api/fetch-graphql/fetch-graphql.d.ts | 8 + .../api/fetch-graphql/index.d.ts | 2 + .../getAttributesForm/getAttributesForm.d.ts | 4 + .../graphql/getAttributesForm.graphql.d.ts | 2 + .../api/getAttributesForm/index.d.ts | 2 + .../api/getCustomerData/getCustomerData.d.ts | 4 + .../graphql/getCustomerData.graphql.d.ts | 2 + .../api/getCustomerData/index.d.ts | 2 + .../getCustomerToken/getCustomerToken.d.ts | 15 + .../graphql/getCustomerToken.graphql.d.ts | 2 + .../api/getCustomerToken/index.d.ts | 2 + .../api/getStoreConfig/getStoreConfig.d.ts | 4 + .../graphql/getStoreConfig.graphql.d.ts | 2 + .../api/getStoreConfig/index.d.ts | 2 + .../storefront-auth/api/index.d.ts | 14 + .../storefront-auth/api/initialize/index.d.ts | 2 + .../api/initialize/initialize.d.ts | 14 + .../requestPasswordResetEmail.graphql.d.ts | 2 + .../api/requestPasswordResetEmail/index.d.ts | 2 + .../requestPasswordResetEmail.d.ts | 4 + .../resendConfirmationEmail.graphql.d.ts | 2 + .../api/resendConfirmationEmail/index.d.ts | 2 + .../resendConfirmationEmail.d.ts | 4 + .../graphql/resetPassword.graphql.d.ts | 2 + .../api/resetPassword/index.d.ts | 2 + .../api/resetPassword/resetPassword.d.ts | 4 + .../graphql/revokeCustomerToken.graphql.d.ts | 2 + .../api/revokeCustomerToken/index.d.ts | 2 + .../revokeCustomerToken.d.ts | 4 + .../chunks/EmailConfirmationForm.js | 1 + .../chunks/ResetPasswordForm.js | 1 + .../storefront-auth/chunks/SignInForm.js | 1 + .../storefront-auth/chunks/SignUpForm.js | 1 + .../storefront-auth/chunks/SkeletonLoader.js | 1 + .../storefront-auth/chunks/confirmEmail.js | 12 + .../chunks/createCustomerAddress.js | 61 + .../chunks/getCustomerToken.js | 15 + .../storefront-auth/chunks/getStoreConfig.js | 15 + .../storefront-auth/chunks/index.js | 1 + .../storefront-auth/chunks/index2.js | 1 + .../storefront-auth/chunks/index3.js | 1 + .../storefront-auth/chunks/initialize.js | 1 + .../storefront-auth/chunks/network-error.js | 1 + .../chunks/requestPasswordResetEmail.js | 5 + .../chunks/resendConfirmationEmail.js | 4 + .../storefront-auth/chunks/resetPassword.js | 5 + .../chunks/revokeCustomerToken.js | 8 + .../chunks/setReCaptchaToken.js | 1 + .../chunks/simplifyTransformAttributesForm.js | 1 + .../chunks/transform-attributes-form.js | 1 + .../storefront-auth/chunks/useInLineAlert.js | 1 + .../chunks/usePasswordValidationMessage.js | 1 + .../EmailConfirmationForm.d.ts | 5 + .../EmailConfirmationForm/index.d.ts | 3 + .../ResetPasswordForm/ResetPasswordForm.d.ts | 6 + .../components/ResetPasswordForm/index.d.ts | 3 + .../components/SignInForm/SignInForm.d.ts | 5 + .../components/SignInForm/index.d.ts | 3 + .../components/SignUpForm/SignUpForm.d.ts | 5 + .../components/SignUpForm/index.d.ts | 3 + .../SkeletonLoader/SkeletonLoader.d.ts | 5 + .../Skeletons/ResetPasswordSkeleton.d.ts | 2 + .../Skeletons/SignInSkeleton.d.ts | 2 + .../Skeletons/SignUpSkeleton.d.ts | 2 + .../SkeletonLoader/Skeletons/index.d.ts | 4 + .../components/SkeletonLoader/index.d.ts | 3 + .../SuccessNotificationForm.d.ts | 6 + .../SuccessNotificationForm/index.d.ts | 3 + .../components/UI/Button/Button.d.ts | 16 + .../components/UI/Button/index.d.ts | 3 + .../components/UI/Form/Form.d.ts | 5 + .../components/UI/Form/index.d.ts | 3 + .../components/UI/FormInputs/FormInputs.d.ts | 5 + .../components/UI/FormInputs/index.d.ts | 3 + .../components/UI/Title/Title.d.ts | 11 + .../components/UI/Title/index.d.ts | 3 + .../storefront-auth/components/UI/index.d.ts | 5 + .../UpdatePasswordForm.d.ts | 5 + .../components/UpdatePasswordForm/index.d.ts | 3 + .../storefront-auth/components/index.d.ts | 11 + .../configs/cookieConfigs.d.ts | 7 + .../configs/defaultCreateUserConfigs.d.ts | 9 + .../configs/patternConfigs.d.ts | 3 + .../containers/AuthCombine.d.ts | 3 + .../storefront-auth/containers/AuthCombine.js | 1 + .../containers/AuthCombine/AuthCombine.d.ts | 5 + .../containers/AuthCombine/index.d.ts | 3 + .../containers/ResetPassword.d.ts | 3 + .../containers/ResetPassword.js | 1 + .../ResetPassword/ResetPassword.d.ts | 5 + .../containers/ResetPassword/index.d.ts | 3 + .../storefront-auth/containers/SignIn.d.ts | 3 + .../storefront-auth/containers/SignIn.js | 1 + .../containers/SignIn/SignIn.d.ts | 5 + .../containers/SignIn/index.d.ts | 3 + .../storefront-auth/containers/SignUp.d.ts | 3 + .../storefront-auth/containers/SignUp.js | 1 + .../containers/SignUp/SignUp.d.ts | 5 + .../containers/SignUp/index.d.ts | 3 + .../containers/SuccessNotification.d.ts | 3 + .../containers/SuccessNotification.js | 1 + .../SuccessNotification.d.ts | 5 + .../containers/SuccessNotification/index.d.ts | 3 + .../containers/UpdatePassword.d.ts | 3 + .../containers/UpdatePassword.js | 1 + .../UpdatePassword/UpdatePassword.d.ts | 5 + .../containers/UpdatePassword/index.d.ts | 3 + .../storefront-auth/containers/index.d.ts | 7 + .../data/models/attributes-form.d.ts | 44 + .../data/models/customer-data.d.ts | 6 + .../storefront-auth/data/models/index.d.ts | 7 + .../data/models/password-reset-email.d.ts | 5 + .../data/models/reset-password.d.ts | 5 + .../data/models/revoke-customer-token.d.ts | 5 + .../data/models/store-config.d.ts | 8 + .../data/transforms/index.d.ts | 7 + .../transforms/transform-attributes-form.d.ts | 6 + .../data/transforms/transform-auth.d.ts | 37 + .../transforms/transform-customer-data.d.ts | 5 + .../transform-password-reset-email.d.ts | 5 + .../transforms/transform-reset-password.d.ts | 5 + .../transform-revoke-customer-token.d.ts | 5 + .../transforms/transform-store-config.d.ts | 5 + .../hooks/api/useGetAttributesForm.d.ts | 14 + .../hooks/api/useGetStoreConfigs.d.ts | 8 + .../components/useEmailConfirmationForm.d.ts | 7 + .../usePasswordValidationMessage.d.ts | 16 + .../components/useResetPasswordForm.d.ts | 8 + .../hooks/components/useSignInForm.d.ts | 23 + .../hooks/components/useSignUpForm.d.ts | 20 + .../components/useUpdatePasswordForm.d.ts | 16 + .../storefront-auth/hooks/ui/useForm.d.ts | 12 + .../hooks/useEmailConfirmation.d.ts | 11 + .../storefront-auth/hooks/useInLineAlert.d.ts | 7 + .../storefront-auth/i18n/en_US.json.d.ts | 76 + .../__dropins__/storefront-auth/lib/acdl.d.ts | 9 + .../storefront-auth/lib/checkIsFunction.d.ts | 2 + .../lib/clearUrlAndReplace.d.ts | 2 + .../lib/convertToInputDateFormat.d.ts | 2 + .../storefront-auth/lib/cookieUtils.d.ts | 3 + .../storefront-auth/lib/fetch-error.d.ts | 5 + .../lib/generateRandomDigits.d.ts | 2 + .../storefront-auth/lib/getFormValues.d.ts | 2 + .../storefront-auth/lib/getUrlParam.d.ts | 2 + .../storefront-auth/lib/mergeFormObjects.d.ts | 3 + .../storefront-auth/lib/network-error.d.ts | 6 + .../lib/setReCaptchaToken.d.ts | 2 + .../lib/simplifyTransformAttributesForm.d.ts | 2 + .../lib/validationUniqueSymbolsPassword.d.ts | 2 + .../__dropins__/storefront-auth/render.d.ts | 1 + scripts/__dropins__/storefront-auth/render.js | 8 + .../storefront-auth/render/Provider.d.ts | 8 + .../storefront-auth/render/index.d.ts | 2 + .../storefront-auth/render/render.d.ts | 4 + .../types/api/confirmEmail.types.d.ts | 17 + .../types/api/createCustomer.types.d.ts | 24 + .../api/createCustomerAddress.types.d.ts | 47 + .../types/api/getAttributesForm.types.d.ts | 31 + .../types/api/getCustomerData.types.d.ts | 13 + .../types/api/getCustomerToken.types.d.ts | 11 + .../types/api/passwordResetEmail.types.d.ts | 9 + .../api/resendConfirmationEmail.types.d.ts | 9 + .../types/api/resetPassword.types.d.ts | 9 + .../types/api/revokeCustomerToken.types.d.ts | 9 + .../types/api/storeConfig.types.d.ts | 16 + .../types/authCombine.types.d.ts | 12 + .../types/emailConfirmationForm.types.d.ts | 14 + .../storefront-auth/types/form.types.d.ts | 31 + .../storefront-auth/types/index.d.ts | 22 + .../types/notification.types.d.ts | 19 + .../types/resetPassword.types.d.ts | 15 + .../storefront-auth/types/signIn.types.d.ts | 44 + .../storefront-auth/types/signUp.types.d.ts | 51 + .../types/skeletonLoader.types.d.ts | 6 + .../types/successNotification.types.d.ts | 16 + .../types/updatePassword.types.d.ts | 34 + scripts/__dropins__/storefront-cart/api.d.ts | 1 + scripts/__dropins__/storefront-cart/api.js | 25 + .../addProductsToCart/addProductsToCart.d.ts | 13 + .../graphql/AddProductsToCartMutation.d.ts | 18 + .../api/addProductsToCart/index.d.ts | 18 + .../api/createEmptyCart/createEmptyCart.d.ts | 18 + .../graphql/CreateCartMutation.d.ts | 18 + .../api/createEmptyCart/index.d.ts | 18 + .../api/fetch-graphql/fetch-graphql.d.ts | 24 + .../api/fetch-graphql/index.d.ts | 18 + .../api/getCartData/getCartData.d.ts | 4 + .../api/getCartData/graphql/CartQuery.d.ts | 19 + .../api/getCartData/index.d.ts | 18 + .../getEstimateShipping.d.ts | 18 + .../graphql/countriesAndRegionsQueries.d.ts | 28 + .../estimateShippingMethodsMutation.d.ts | 18 + .../api/getEstimateShipping/index.d.ts | 18 + .../getEstimatedTotals.d.ts | 16 + .../graphql/GetEstimatedTotalsMutation.d.ts | 18 + .../api/getEstimatedTotals/index.d.ts | 18 + .../api/getStoreConfig/getStoreConfig.d.ts | 4 + .../graphql/StoreConfigQuery.d.ts | 18 + .../api/getStoreConfig/index.d.ts | 18 + .../api/graphql/CartFragment.d.ts | 20 + .../storefront-cart/api/index.d.ts | 30 + .../storefront-cart/api/initialize/index.d.ts | 18 + .../api/initialize/initialize.d.ts | 11 + .../graphql/MergeCartsMutation.d.ts | 18 + .../api/initializeCart/index.d.ts | 18 + .../api/initializeCart/initializeCart.d.ts | 6 + .../api/refreshCart/index.d.ts | 18 + .../api/refreshCart/refreshCart.d.ts | 4 + .../storefront-cart/api/resetCart/index.d.ts | 18 + .../api/resetCart/resetCart.d.ts | 4 + .../graphql/UpdateProductsMutation.d.ts | 18 + .../api/updateProductsFromCart/index.d.ts | 18 + .../updateProductsFromCart.d.ts | 9 + .../storefront-cart/chunks/CartFragment.js | 235 + .../storefront-cart/chunks/CartSummaryGrid.js | 1 + .../storefront-cart/chunks/CartSummaryList.js | 1 + .../storefront-cart/chunks/EmptyCart.js | 1 + .../storefront-cart/chunks/MiniCart.js | 1 + .../storefront-cart/chunks/OrderSummary.js | 1 + .../storefront-cart/chunks/acdl.js | 1 + .../chunks/getEstimateShipping.js | 48 + .../chunks/getEstimatedTotals.js | 22 + .../storefront-cart/chunks/getStoreConfig.js | 61 + .../storefront-cart/chunks/persisted-data.js | 1 + .../storefront-cart/chunks/resetCart.js | 1 + .../chunks/updateProductsFromCart.js | 20 + .../storefront-cart/components/Cart/Cart.d.ts | 10 + .../components/Cart/index.d.ts | 19 + .../CartSummaryGrid/CartSummaryGrid.d.ts | 9 + .../components/CartSummaryGrid/index.d.ts | 19 + .../CartSummaryList/CartSummaryList.d.ts | 12 + .../components/CartSummaryList/index.d.ts | 19 + .../components/EmptyCart/EmptyCart.d.ts | 8 + .../components/EmptyCart/index.d.ts | 19 + .../EstimateShipping/EstimateShipping.d.ts | 20 + .../components/EstimateShipping/index.d.ts | 18 + .../components/MiniCart/MiniCart.d.ts | 11 + .../components/MiniCart/index.d.ts | 19 + .../OrderSummary/OrderSummary.d.ts} | 40 +- .../components/OrderSummary/index.d.ts | 19 + .../storefront-cart/components/index.d.ts | 24 + .../storefront-cart/containers/Cart.d.ts | 3 + .../storefront-cart/containers/Cart.js | 1 + .../storefront-cart/containers/Cart/Cart.d.ts | 18 + .../containers/Cart/index.d.ts | 19 + .../containers/CartSummaryGrid.d.ts | 3 + .../containers/CartSummaryGrid.js | 1 + .../CartSummaryGrid/CartSummaryGrid.d.ts | 10 + .../containers/CartSummaryGrid/index.d.ts | 19 + .../containers/CartSummaryList.d.ts | 3 + .../containers/CartSummaryList.js | 1 + .../CartSummaryList/CartSummaryList.d.ts | 27 + .../containers/CartSummaryList/index.d.ts | 19 + .../storefront-cart/containers/EmptyCart.d.ts | 3 + .../storefront-cart/containers/EmptyCart.js | 1 + .../containers/EmptyCart/EmptyCart.d.ts | 8 + .../containers/EmptyCart/index.d.ts | 19 + .../containers/EstimateShipping.d.ts | 3 + .../containers/EstimateShipping.js | 1 + .../EstimateShipping/EstimateShipping.d.ts | 7 + .../containers/EstimateShipping/index.d.ts | 19 + .../storefront-cart/containers/MiniCart.d.ts | 3 + .../storefront-cart/containers/MiniCart.js | 1 + .../containers/MiniCart/MiniCart.d.ts | 15 + .../containers/MiniCart/index.d.ts | 19 + .../containers/OrderSummary.d.ts | 3 + .../containers/OrderSummary.js | 1 + .../containers/OrderSummary/OrderSummary.d.ts | 17 + .../containers/OrderSummary/index.d.ts | 19 + .../storefront-cart/containers/index.d.ts | 24 + .../data/models/acdl-models.d.ts | 89 + .../data/models/cart-model.d.ts | 113 + .../storefront-cart/data/models/index.d.ts | 20 + .../data/models/shipping-models.d.ts | 16 + .../data/models/store-models.d.ts | 37 + .../transforms/__fixtures__/cartModel.d.ts | 5 + .../__fixtures__/estimatedTotalsData.d.ts | 77 + .../__fixtures__/productTypesData.d.ts | 944 + .../transforms/__fixtures__/storeConfig.d.ts | 4 + .../data/transforms/acdl-context.d.ts | 11 + .../data/transforms/index.d.ts | 19 + .../data/transforms/transform-cart.d.ts | 4 + .../data/transforms/transform-shipping.d.ts | 5 + .../transforms/transform-store-config.d.ts | 4 + .../storefront-cart/hooks/index.d.ts | 19 + .../hooks/useEstimatedShipping.d.ts | 44 + .../hooks/useEstimatedTotals.d.ts | 31 + .../storefront-cart/i18n/en_US.json.d.ts | 107 + .../__dropins__/storefront-cart/lib/acdl.d.ts | 28 + .../storefront-cart/lib/cookies.d.ts | 18 + .../storefront-cart/lib/fetch-error.d.ts | 24 + .../storefront-cart/lib/persisted-data.d.ts | 11 + .../storefront-cart/lib/state.d.ts | 12 + .../__dropins__/storefront-cart/render.d.ts | 1 + scripts/__dropins__/storefront-cart/render.js | 2 + .../storefront-cart/render/Provider.d.ts | 8 + .../storefront-cart/render/index.d.ts | 18 + .../storefront-cart/render/render.d.ts | 4 + .../__generated__/types.d.ts | 15363 +++++++++++++++ .../__dropins__/storefront-checkout/api.d.ts | 1 + .../__dropins__/storefront-checkout/api.js | 1 + .../api/errors/errors.d.ts | 27 + .../storefront-checkout/api/errors/index.d.ts | 2 + .../estimateShippingMethods.d.ts | 13 + .../api/estimateShippingMethods/fixtures.d.ts | 8 + .../estimateShippingMethods.graphql.d.ts | 2 + .../graphql/index.d.ts | 2 + .../api/estimateShippingMethods/index.d.ts | 2 + .../api/fetch-graphql/fetch-graphql.d.ts | 9 + .../api/fetch-graphql/index.d.ts | 2 + .../fetchAddressFormFields.d.ts | 2 + .../api/fetchAddressFormFields/fixtures.d.ts | 5 + .../fetchAddressFormFields.graphql.d.ts | 2 + .../api/fetchAddressFormFields/index.d.ts | 3 + .../api/getCart/fixtures.d.ts | 12 + .../api/getCart/getCart.d.ts | 2 + .../api/getCart/graphql/getCart.graphql.d.ts | 4 + .../api/getCart/graphql/index.d.ts | 2 + .../api/getCart/index.d.ts | 2 + .../api/getCheckoutData/getCheckoutData.d.ts | 2 + .../api/getCheckoutData/index.d.ts | 2 + .../api/getCountries/fixtures.d.ts | 6 + .../api/getCountries/getCountries.d.ts | 2 + .../graphql/getCountries.graphql.d.ts | 2 + .../api/getCountries/index.d.ts | 2 + .../api/getCustomer/fixtures.d.ts | 5 + .../api/getCustomer/getCustomer.d.ts | 4 + .../graphql/getCustomer.graphql.d.ts | 2 + .../api/getCustomer/graphql/index.d.ts | 2 + .../api/getCustomer/index.d.ts | 2 + .../api/getRegions/fixtures.d.ts | 5 + .../api/getRegions/getRegions.d.ts | 5 + .../graphql/getRegions.graphql.d.ts | 2 + .../api/getRegions/index.d.ts | 2 + .../api/getStoreConfig/getStoreConfig.d.ts | 6 + .../graphql/getStoreConfig.graphql.d.ts | 2 + .../api/getStoreConfig/index.d.ts | 2 + .../storefront-checkout/api/index.d.ts | 23 + .../api/initialize/index.d.ts | 2 + .../api/initialize/initialize.d.ts | 10 + .../api/initialize/listeners.d.ts | 4 + .../api/initializeCheckout/index.d.ts | 2 + .../initializeCheckout.d.ts | 2 + .../graphql/isEmailAvailable.graphql.d.ts | 2 + .../api/isEmailAvailable/index.d.ts | 2 + .../isEmailAvailable/isEmailAvailable.d.ts | 4 + .../api/placeOrder/fixtures.d.ts | 6 + .../api/placeOrder/graphql/index.d.ts | 2 + .../graphql/placeOrder.graphql.d.ts | 2 + .../api/placeOrder/index.d.ts | 2 + .../api/placeOrder/placeOrder.d.ts | 2 + .../api/redirect/index.d.ts | 2 + .../api/redirect/redirect.d.ts | 2 + .../api/resetCheckout/index.d.ts | 2 + .../api/resetCheckout/resetCheckout.d.ts | 2 + .../api/resetCustomer/index.d.ts | 2 + .../api/resetCustomer/resetCustomer.d.ts | 2 + .../graphql/setBillingAddress.graphql.d.ts | 2 + .../api/setBillingAddress/index.d.ts | 2 + .../setBillingAddress/setBillingAddress.d.ts | 13 + .../graphql/setGuestEmailOnCart.graphql.d.ts | 2 + .../api/setGuestEmailOnCart/index.d.ts | 2 + .../setGuestEmailOnCart.d.ts | 2 + .../graphql/setPaymentMethod.graphql.d.ts | 2 + .../api/setPaymentMethod/index.d.ts | 2 + .../setPaymentMethod/setPaymentMethod.d.ts | 2 + .../graphql/setShippingAddress.graphql.d.ts | 2 + .../api/setShippingAddress/index.d.ts | 2 + .../setShippingAddress.d.ts | 30 + .../setShippingMethodsOnCart.graphql.d.ts | 2 + .../api/setShippingMethods/index.d.ts | 2 + .../setShippingMethods.d.ts | 2 + .../api/utils/dispatchApiCall.d.ts | 54 + .../api/utils/enqueueRequest.d.ts | 2 + .../api/utils/filterControlledErrors.d.ts | 18 + .../chunks/BillToShippingAddress.js | 1 + .../storefront-checkout/chunks/EmptyCart.js | 1 + .../storefront-checkout/chunks/ErrorBanner.js | 1 + .../chunks/MergedCartBanner.js | 1 + .../storefront-checkout/chunks/OutOfStock.js | 1 + .../chunks/ShippingMethods.js | 1 + .../chunks/getCart.graphql.js | 133 + .../storefront-checkout/chunks/getCustomer.js | 34 + .../storefront-checkout/chunks/placeOrder.js | 127 + .../chunks/resetCustomer.js | 36 + .../chunks/setBillingAddress.js | 13 + .../chunks/setShippingMethods.js | 98 + .../components/AddressForm/AddressForm.d.ts | 22 + .../components/AddressForm/constants.d.ts | 4 + .../components/AddressForm/index.d.ts | 7 + .../AddressForm/useAddressBackup.d.ts | 8 + .../AddressForm/useAddressForm.d.ts | 39 + .../useCheckoutAddressEventEmitter.d.ts | 10 + .../AddressForm/usePreselectedFields.d.ts | 9 + .../components/AddressForm/utils.d.ts | 13 + .../BillToShippingAddress.d.ts | 8 + .../BillToShippingAddressSkeleton.d.ts | 4 + .../BillToShippingAddress/index.d.ts | 4 + .../components/Checkout/Checkout.d.ts | 28 + .../components/Checkout/index.d.ts | 3 + .../components/EmptyCart/EmptyCart.d.ts | 9 + .../components/EmptyCart/index.d.ts | 3 + .../EstimateShipping/EstimateShipping.d.ts | 12 + .../EstimateShippingSkeleton.d.ts | 4 + .../components/EstimateShipping/index.d.ts | 4 + .../components/FieldsForm/FieldsForm.d.ts | 13 + .../FieldsForm/FieldsFormSkeleton.d.ts | 4 + .../components/FieldsForm/fieldFactory.d.ts | 9 + .../components/FieldsForm/fixtures.d.ts | 5 + .../components/FieldsForm/index.d.ts | 6 + .../components/FieldsForm/validation.d.ts | 18 + .../components/Heading/Heading.d.ts | 8 + .../components/Heading/index.d.ts | 3 + .../components/LoginForm/Email.d.ts | 13 + .../components/LoginForm/LoginForm.d.ts | 16 + .../LoginForm/LoginFormSkeleton.d.ts | 4 + .../components/LoginForm/SignIn.d.ts | 9 + .../components/LoginForm/SignOut.d.ts | 8 + .../components/LoginForm/index.d.ts | 6 + .../components/OutOfStock/OutOfStock.d.ts | 11 + .../components/OutOfStock/index.d.ts | 3 + .../OverlayLoader/OverlayLoader.d.ts | 6 + .../components/OverlayLoader/index.d.ts | 2 + .../PaymentMethods/PaymentMethods.d.ts | 13 + .../PaymentMethodsSkeleton.d.ts | 4 + .../components/PaymentMethods/index.d.ts | 4 + .../components/PlaceOrder/PlaceOrder.d.ts | 9 + .../PlaceOrder/PlaceOrderSkeleton.d.ts | 4 + .../components/PlaceOrder/index.d.ts | 3 + .../components/ServerError/ServerError.d.ts | 10 + .../components/ServerError/index.d.ts | 3 + .../ShippingMethods/ShippingMethods.d.ts | 12 + .../ShippingMethodsSkeleton.d.ts | 4 + .../components/ShippingMethods/index.d.ts | 4 + .../components/ToggleButton/ToggleButton.d.ts | 14 + .../ToggleButton/assets/icons/index.d.ts | 2 + .../ToggleButton/assets/images/index.d.ts | 2 + .../components/ToggleButton/index.d.ts | 3 + .../storefront-checkout/components/index.d.ts | 16 + .../containers/BillToShippingAddress.d.ts | 3 + .../containers/BillToShippingAddress.js | 1 + .../BillToShippingAddress.d.ts | 12 + .../BillToShippingAddress/constants.d.ts | 2 + .../BillToShippingAddress/index.d.ts | 4 + .../containers/BillingForm.d.ts | 3 + .../containers/BillingForm.js | 1 + .../containers/BillingForm/BillingForm.d.ts | 9 + .../containers/BillingForm/constants.d.ts | 2 + .../containers/BillingForm/index.d.ts | 4 + .../containers/Checkout.d.ts | 3 + .../containers/Checkout.js | 1 + .../containers/Checkout/Checkout.d.ts | 35 + .../containers/Checkout/constants.d.ts | 2 + .../containers/Checkout/index.d.ts | 4 + .../containers/EmptyCart.d.ts | 3 + .../containers/EmptyCart.js | 1 + .../containers/EmptyCart/EmptyCart.d.ts | 8 + .../containers/EmptyCart/index.d.ts | 3 + .../containers/ErrorBanner.d.ts | 3 + .../containers/ErrorBanner.js | 1 + .../containers/ErrorBanner/ErrorBanner.d.ts | 5 + .../containers/ErrorBanner/index.d.ts | 3 + .../containers/EstimateShipping.d.ts | 3 + .../containers/EstimateShipping.js | 1 + .../EstimateShipping/EstimateShipping.d.ts | 4 + .../containers/EstimateShipping/index.d.ts | 3 + .../containers/LoginForm.d.ts | 3 + .../containers/LoginForm.js | 1 + .../containers/LoginForm/LoginForm.d.ts | 12 + .../containers/LoginForm/constants.d.ts | 2 + .../containers/LoginForm/index.d.ts | 4 + .../containers/MergedCartBanner.d.ts | 3 + .../containers/MergedCartBanner.js | 1 + .../MergedCartBanner/MergedCartBanner.d.ts | 5 + .../containers/MergedCartBanner/index.d.ts | 3 + .../containers/OutOfStock.d.ts | 3 + .../containers/OutOfStock.js | 1 + .../containers/OutOfStock/OutOfStock.d.ts | 13 + .../containers/OutOfStock/index.d.ts | 3 + .../containers/PaymentMethods.d.ts | 3 + .../containers/PaymentMethods.js | 1 + .../PaymentMethods/PaymentMethods.d.ts | 25 + .../PaymentMethods/defaultHandlers.d.ts | 11 + .../containers/PaymentMethods/index.d.ts | 3 + .../containers/PlaceOrder.d.ts | 3 + .../containers/PlaceOrder.js | 1 + .../containers/PlaceOrder/PlaceOrder.d.ts | 11 + .../containers/PlaceOrder/index.d.ts | 3 + .../containers/ShippingForm.d.ts | 3 + .../containers/ShippingForm.js | 1 + .../containers/ShippingForm/ShippingForm.d.ts | 12 + .../containers/ShippingForm/constants.d.ts | 2 + .../containers/ShippingForm/index.d.ts | 4 + .../containers/ShippingMethods.d.ts | 3 + .../containers/ShippingMethods.js | 1 + .../ShippingMethods/ShippingMethods.d.ts | 14 + .../useShippingEstimateEventEmitter.d.ts | 3 + .../containers/ShippingMethods/index.d.ts | 3 + .../storefront-checkout/containers/index.d.ts | 14 + .../storefront-checkout/data/models/acdl.d.ts | 99 + .../data/models/address-form-fields.d.ts | 52 + .../data/models/address.d.ts | 21 + .../storefront-checkout/data/models/cart.d.ts | 14 + .../data/models/country.d.ts | 5 + .../data/models/custom-attribute.d.ts | 5 + .../data/models/customer.d.ts | 25 + .../data/models/email-availability.d.ts | 2 + .../data/models/index.d.ts | 14 + .../data/models/order.d.ts | 81 + .../data/models/payment-method.d.ts | 5 + .../data/models/price.d.ts | 5 + .../data/models/region.d.ts | 6 + .../data/models/shipping-estimate.d.ts | 17 + .../data/models/shipping-method.d.ts | 19 + .../data/models/store-config.d.ts | 17 + .../data/transforms/index.d.ts | 12 + .../data/transforms/transform-acdl.d.ts | 6 + .../transform-address-form-fields.d.ts | 66 + .../data/transforms/transform-address.d.ts | 89 + .../data/transforms/transform-cart.d.ts | 7 + .../data/transforms/transform-countries.d.ts | 5 + .../data/transforms/transform-customer.d.ts | 14 + .../transform-email-availability.d.ts | 6 + .../data/transforms/transform-order.d.ts | 7 + .../transforms/transform-payment-methods.d.ts | 9 + .../data/transforms/transform-regions.d.ts | 8 + .../transform-shipping-estimate.d.ts | 5 + .../transform-shipping-methods.d.ts | 14 + .../transforms/transform-store-config.d.ts | 6 + .../storefront-checkout/hocs/index.d.ts | 1 + .../hocs/withConditionalRendering.d.ts | 13 + .../storefront-checkout/hooks/index.d.ts | 4 + .../hooks/useBreakpoint/index.d.ts | 2 + .../hooks/useBreakpoint/useBreakpoint.d.ts | 2 + .../hooks/useLockScroll/index.d.ts | 2 + .../hooks/useLockScroll/useLockScroll.d.ts | 5 + .../hooks/useValidity/index.d.ts | 2 + .../hooks/useValidity/useValidity.d.ts | 19 + .../storefront-checkout/i18n/en_US.json.d.ts | 105 + .../storefront-checkout/lib/acdl.d.ts | 18 + .../storefront-checkout/lib/backup-data.d.ts | 4 + .../storefront-checkout/lib/fetch-error.d.ts | 7 + .../storefront-checkout/lib/index.d.ts | 3 + .../lib/network-error.d.ts | 6 + .../storefront-checkout/lib/redirect.d.ts | 2 + .../storefront-checkout/lib/state.d.ts | 7 + .../storefront-checkout/msw/browser.d.ts | 2 + .../fixtures/fragments/american-regions.d.ts | 4 + .../fragments/available-shipping-methods.d.ts | 23 + .../fixtures/fragments/billing-address.d.ts | 36 + .../msw/fixtures/fragments/cart.d.ts | 122 + .../msw/fixtures/fragments/countries.d.ts | 4 + .../msw/fixtures/fragments/form-fields.d.ts | 4 + .../msw/fixtures/fragments/index.d.ts | 8 + .../fixtures/fragments/shipping-address.d.ts | 42 + .../msw/fixtures/index.d.ts | 4 + .../mutations/estimate-shipping-methods.d.ts | 4 + .../msw/fixtures/mutations/index.d.ts | 8 + .../msw/fixtures/mutations/place-order.d.ts | 4 + .../mutations/set-billing-address.d.ts | 5 + .../fixtures/mutations/set-guest-email.d.ts | 4 + .../mutations/set-payment-method.d.ts | 4 + .../mutations/set-shipping-address.d.ts | 4 + .../mutations/set-shipping-methods.d.ts | 4 + .../queries/fetch-address-form-fields.d.ts | 4 + .../msw/fixtures/queries/get-cart.d.ts | 4 + .../msw/fixtures/queries/get-countries.d.ts | 4 + .../get-customer-cart-stock-status.d.ts | 4 + .../msw/fixtures/queries/get-customer.d.ts | 5 + .../msw/fixtures/queries/get-regions.d.ts | 4 + .../fixtures/queries/get-stock-status.d.ts | 4 + .../fixtures/queries/get-store-config.d.ts | 4 + .../msw/fixtures/queries/index.d.ts | 10 + .../fixtures/queries/is-email-available.d.ts | 4 + .../storefront-checkout/msw/handlers.d.ts | 4 + .../storefront-checkout/msw/server.d.ts | 2 + .../storefront-checkout/render.d.ts | 1 + .../__dropins__/storefront-checkout/render.js | 3 + .../storefront-checkout/render/Provider.d.ts | 8 + .../storefront-checkout/render/index.d.ts | 2 + .../storefront-checkout/render/render.d.ts | 6 + .../signals/AddressFormFieldsSignal.d.ts | 7 + .../signals/CartSignal.d.ts | 7 + .../signals/CountryListSignal.d.ts | 7 + .../signals/CustomerSignal.d.ts | 7 + .../EstimateShippingMethodsSignal.d.ts | 7 + .../signals/IsBillToShippingSignal.d.ts | 6 + .../signals/RegionsSignal.d.ts | 12 + .../signals/SelectedShippingMethodSignal.d.ts | 4 + .../signals/StoreConfigSignal.d.ts | 7 + .../storefront-checkout/signals/index.d.ts | 10 + .../storefront-checkout/tests/constants.d.ts | 3 + .../tests/integration/utils/index.d.ts | 3 + .../tests/integration/utils/setup.d.ts | 6 + .../tests/integration/utils/user-actions.d.ts | 2 + .../storefront-checkout/tests/mocks/svg.d.ts | 4 + .../tests/utils/expectError.d.ts | 9 + .../tests/utils/index.d.ts | 3 + .../tests/utils/mockEvents.d.ts | 5 + .../autocompleteFieldCodes.d.ts | 18 + .../utils/autocompleteFieldCodes/index.d.ts | 2 + .../utils/getDisplayName/getDisplayName.d.ts | 4 + .../utils/getDisplayName/index.d.ts | 2 + .../getMultilineValues.d.ts | 3 + .../utils/getMultilineValues/index.d.ts | 2 + .../storefront-checkout/utils/index.d.ts | 8 + .../utils/isEmpty/index.d.ts | 2 + .../utils/isEmpty/isEmpty.d.ts | 2 + .../utils/isNullish/index.d.ts | 2 + .../utils/isNullish/isNullish.d.ts | 2 + .../utils/parseRegionId/index.d.ts | 2 + .../utils/parseRegionId/parseRegionId.d.ts | 2 + .../utils/processFormFields/index.d.ts | 2 + .../processFormFields/processFormFields.d.ts | 21 + .../index.d.ts | 2 + .../refetchEstimatedShippingMethods.d.ts | 4 + .../utils/shippingMethods/index.d.ts | 2 + .../utils/shippingMethods/isEqual.d.ts | 4 + .../__generated__/mocks.d.ts | 1679 ++ .../__generated__/types.d.ts | 16147 ++++++++++++++++ .../storefront-order-confirmation/api.d.ts | 1 + .../storefront-order-confirmation/api.js | 1 + .../api/customerOrder/customerOrder.d.ts | 730 + .../graphql/customerOrder.graphql.d.ts | 2 + .../api/customerOrder/graphql/index.d.ts | 2 + .../api/customerOrder/index.d.ts | 2 + .../api/errors/errors.d.ts | 18 + .../api/errors/index.d.ts | 2 + .../api/fetch-graphql/fetch-graphql.d.ts | 8 + .../api/fetch-graphql/index.d.ts | 2 + .../graphql/guestOrder.graphql.d.ts | 3 + .../api/guestOrder/graphql/index.d.ts | 2 + .../api/guestOrder/guestOrder.d.ts | 735 + .../api/guestOrder/index.d.ts | 2 + .../graphql/guestOrderByToken.graphql.d.ts | 2 + .../api/guestOrderByToken/graphql/index.d.ts | 2 + .../guestOrderByToken/guestOrderByToken.d.ts | 730 + .../api/guestOrderByToken/index.d.ts | 2 + .../api/index.d.ts | 7 + .../api/initialize/index.d.ts | 2 + .../api/initialize/initialize.d.ts | 9 + .../graphql/isEmailAvailable.graphql.d.ts | 2 + .../api/isEmailAvailable/index.d.ts | 2 + .../isEmailAvailable/isEmailAvailable.d.ts | 2 + .../chunks/customerOrder.js | 134 + .../chunks/initialize.js | 1 + .../components/CartSummary/CartSummary.d.ts | 10 + .../CartSummary/CartSummarySkeleton.d.ts | 4 + .../components/CartSummary/index.d.ts | 4 + .../CartSummaryItem/CartSummaryItem.d.ts | 10 + .../components/CartSummaryItem/index.d.ts | 3 + .../components/Details/Details.d.ts | 10 + .../components/Details/DetailsSkeleton.d.ts | 4 + .../Details/fixtures/orderDetails.d.ts | 7 + .../components/Details/index.d.ts | 4 + .../components/Footer/Footer.d.ts | 10 + .../components/Footer/FooterSkeleton.d.ts | 4 + .../components/Footer/index.d.ts | 4 + .../components/Header/Header.d.ts | 11 + .../components/Header/HeaderSkeleton.d.ts | 4 + .../components/Header/index.d.ts | 4 + .../components/Message/Message.d.ts | 9 + .../components/Message/MessageSkeleton.d.ts | 4 + .../components/Message/index.d.ts | 4 + .../OrderConfirmation/OrderConfirmation.d.ts | 15 + .../OrderConfirmation/fixtures/cartItems.d.ts | 27 + .../components/OrderConfirmation/index.d.ts | 3 + .../OrderSearchForm/OrderSearchForm.d.ts | 15 + .../OrderSearchFormSkeleton.d.ts | 4 + .../components/OrderSearchForm/index.d.ts | 4 + .../components/OrderSummary/OrderSummary.d.ts | 44 + .../OrderSummary/OrderSummarySkeleton.d.ts | 4 + .../components/OrderSummary/index.d.ts | 4 + .../StaticSkeleton/StaticSkeleton.d.ts | 9 + .../components/StaticSkeleton/index.d.ts | 3 + .../components/index.d.ts | 11 + .../containers/OrderConfirmation.d.ts | 3 + .../containers/OrderConfirmation.js | 7 + .../OrderConfirmation/OrderConfirmation.d.ts | 21 + .../containers/OrderConfirmation/index.d.ts | 3 + .../containers/index.d.ts | 2 + .../data/models/index.d.ts | 3 + .../data/models/order.d.ts | 76 + .../data/models/price.d.ts | 5 + .../data/transforms/index.d.ts | 3 + .../transform-customer-address-input.d.ts | 5 + .../data/transforms/transform-order.d.ts | 7 + .../hooks/useBreakpoint/index.d.ts | 2 + .../hooks/useBreakpoint/useBreakpoint.d.ts | 2 + .../i18n/en_US.json.d.ts | 66 + .../lib/fetch-error.d.ts | 7 + .../lib/index.d.ts | 3 + .../lib/network-error.d.ts | 6 + .../reducers/index.d.ts | 2 + .../reducers/orderConfirmation.d.ts | 60 + .../storefront-order-confirmation/render.d.ts | 1 + .../storefront-order-confirmation/render.js | 2 + .../render/Provider.d.ts | 8 + .../render/index.d.ts | 2 + .../render/render.d.ts | 4 + .../tests/utils/mockEvents.d.ts | 5 + .../__mocks__/product-mocks.d.ts | 157 + .../api/fetch-graphql/fetch-graphql.d.ts | 15 + .../api/fetch-graphql/index.d.ts | 15 + .../graphql/getProductData.graphql.d.ts | 15 + .../api/getProductData/index.d.ts | 15 + .../getRefinedProduct/getRefinedProduct.d.ts | 2 +- .../graphql/RefineProductQuery.graphql.d.ts | 15 + .../api/getRefinedProduct/index.d.ts | 15 + .../api/graphql/ProductFragment.graphql.d.ts | 15 + .../ProductOptionFragment.graphql.d.ts | 15 + .../__dropins__/storefront-pdp/api/index.d.ts | 15 + .../storefront-pdp/api/initialize/index.d.ts | 15 + .../chunks/getRefinedProduct.js | 22 +- .../components/Carousel/index.d.ts | 15 + .../components/GalleryGrid/index.d.ts | 15 + .../components/Overlay/index.d.ts | 15 + .../components/PriceRange/index.d.ts | 15 + .../components/Product/Product.d.ts | 2 + .../components/Product/index.d.ts | 15 + .../components/Swatches/Swatches.d.ts | 10 +- .../components/Swatches/index.d.ts | 15 + .../storefront-pdp/components/Zoom/Zoom.d.ts | 9 + .../storefront-pdp/components/Zoom/index.d.ts | 18 + .../storefront-pdp/components/index.d.ts | 16 + .../containers/ProductDetails.js | 2 +- .../ProductDetails/ProductDetails.d.ts | 4 +- .../containers/ProductDetails/index.d.ts | 15 + .../storefront-pdp/containers/index.d.ts | 15 + .../data/models/acdl-models.d.ts | 15 + .../storefront-pdp/data/models/index.d.ts | 15 + .../data/models/product-model.d.ts | 20 +- .../storefront-pdp/data/transforms/index.d.ts | 15 + .../data/transforms/product-transform.d.ts | 2 +- .../storefront-pdp/i18n/en_US.json.d.ts | 7 +- .../__dropins__/storefront-pdp/lib/date.d.ts | 15 + .../storefront-pdp/lib/url-params.d.ts | 15 + scripts/__dropins__/storefront-pdp/render.js | 4 +- .../storefront-pdp/render/index.d.ts | 15 + scripts/__dropins__/tools/chunks/icons/Add.js | 2 +- .../tools/chunks/icons/AddressBook.js | 1 + .../tools/chunks/icons/EmptyBox.js | 1 + scripts/__dropins__/tools/chunks/icons/Eye.js | 1 + .../tools/chunks/icons/EyeClose.js | 1 + .../tools/chunks/image-params-keymap.js | 2 +- .../__dropins__/tools/chunks/initializer.js | 6 +- .../__dropins__/tools/chunks/vcomponent.js | 14 +- scripts/__dropins__/tools/components.js | 2 +- scripts/__dropins__/tools/event-bus.js | 2 +- scripts/__dropins__/tools/fetch-graphql.js | 2 +- scripts/__dropins__/tools/i18n.js | 2 +- scripts/__dropins__/tools/initializer.js | 4 +- scripts/__dropins__/tools/lib.js | 12 +- scripts/__dropins__/tools/preact-compat.js | 2 +- scripts/__dropins__/tools/preact-hooks.js | 2 +- scripts/__dropins__/tools/preact.js | 2 +- scripts/__dropins__/tools/recaptcha.js | 5 +- scripts/__dropins__/tools/signals.d.ts | 1 + scripts/__dropins__/tools/signals.js | 1 + .../src/components/CartItem/CartItem.d.ts | 10 +- .../elsie/src/components/Header/Header.d.ts | 11 + .../elsie/src/components/Header/index.d.ts | 3 + .../components/InLineAlert/InLineAlert.d.ts | 2 + .../InputPassword/InputPassword.d.ts | 19 + .../PasswordStatusIndicator.d.ts | 18 + .../PasswordStatusIndicator/index.d.ts | 3 + .../src/components/InputPassword/index.d.ts | 3 + .../elsie/src/components/Picker/Picker.d.ts | 6 +- .../src/components/PriceSummary/index.d.ts | 3 - .../components/RadioButton/RadioButton.d.ts | 1 + .../types/elsie/src/components/Tag/Tag.d.ts | 8 + .../types/elsie/src/components/Tag/index.d.ts | 3 + .../components/ToggleButton/ToggleButton.d.ts | 14 + .../src/components/ToggleButton/index.d.ts | 3 + .../src/components/UIProvider/UIProvider.d.ts | 2 + .../types/elsie/src/components/index.d.ts | 6 +- .../types/elsie/src/i18n/en_US.json.d.ts | 17 +- .../tools/types/elsie/src/i18n/index.d.ts | 45 + .../tools/types/elsie/src/icons/index.d.ts | 4 + .../tools/types/elsie/src/lib/render.d.ts | 20 +- .../tools/types/elsie/src/lib/signals.d.ts | 2 + .../tools/types/elsie/src/lib/slot.d.ts | 9 +- .../types/recaptcha/src/configs/index.d.ts | 1 + .../recaptchaBadgeSelector.config.d.ts | 2 + .../src/graphql/recaptchaConfig.graphql.d.ts | 2 +- .../tools/types/recaptcha/src/index.d.ts | 17 +- .../src/lib/_checkRecaptchaBadge.d.ts | 2 + .../src/lib/_convertKeysToCamelCase.d.ts | 6 + .../recaptcha/src/lib/_extendConfig.d.ts | 4 +- .../recaptcha/src/lib/_storageConfig.d.ts | 6 +- .../tools/types/recaptcha/src/lib/index.d.ts | 2 + .../src/services/recaptcha.service.d.ts | 4 +- scripts/commerce-events-collector.js | 2 +- scripts/commerce.js | 7 +- scripts/configs.js | 14 + scripts/dropins.js | 84 +- scripts/minicart/Minicart.js | 203 - scripts/minicart/api.js | 135 - scripts/minicart/cart.js | 307 - scripts/scripts.js | 101 +- styles/minicart.css | 292 - styles/styles.css | 154 +- 886 files changed, 61345 insertions(+), 2405 deletions(-) create mode 100644 .github/workflows/run-e2e-tests.yaml create mode 100644 .npmrc create mode 100644 blocks/commerce-account/api/getCustomer.js create mode 100644 blocks/commerce-account/helpers/convertDateFormat.js create mode 100644 blocks/commerce-account/helpers/validateOrdersStatus.js create mode 100644 blocks/commerce-cart-order-summary/commerce-cart-order-summary.css create mode 100644 blocks/commerce-cart-order-summary/commerce-cart-order-summary.js create mode 100644 blocks/commerce-cart-summary/commerce-cart-summary.css create mode 100644 blocks/commerce-cart-summary/commerce-cart-summary.js create mode 100644 blocks/commerce-confirm-account/commerce-confirm-account.css create mode 100644 blocks/commerce-confirm-account/commerce-confirm-account.js create mode 100644 blocks/commerce-create-account/commerce-create-account.css create mode 100644 blocks/commerce-create-account/commerce-create-account.js create mode 100644 blocks/commerce-create-password/commerce-create-password.css create mode 100644 blocks/commerce-create-password/commerce-create-password.js create mode 100644 blocks/commerce-empty-cart/commerce-empty-cart.css create mode 100644 blocks/commerce-empty-cart/commerce-empty-cart.js create mode 100644 blocks/commerce-forgot-password/commerce-forgot-password.css create mode 100644 blocks/commerce-forgot-password/commerce-forgot-password.js create mode 100644 blocks/commerce-mini-cart/commerce-mini-cart.css create mode 100644 blocks/commerce-mini-cart/commerce-mini-cart.js create mode 100644 blocks/commerce-order-confirmation/commerce-order-confirmation.css create mode 100644 blocks/commerce-order-confirmation/commerce-order-confirmation.js create mode 100644 blocks/header/renderAuthCombine.js create mode 100644 blocks/header/renderAuthDropdown.js create mode 100644 blocks/modal/modal.css create mode 100644 blocks/modal/modal.js create mode 100644 cypress/.gitignore create mode 100644 cypress/README.md create mode 100644 cypress/cypress.config.js create mode 100644 cypress/package-lock.json create mode 100644 cypress/package.json create mode 100644 cypress/reporter-config.json create mode 100644 cypress/src/actions/index.js create mode 100644 cypress/src/assertions/index.js create mode 100644 cypress/src/fields/index.js create mode 100644 cypress/src/fixtures/index.js create mode 100644 cypress/src/fixtures/userInfo.json create mode 100644 cypress/src/plugins/index.js create mode 100644 cypress/src/support/deleteCustomer.js create mode 100644 cypress/src/support/getUserTokenCookie.js create mode 100644 cypress/src/support/index.js create mode 100644 cypress/src/tests/e2eTests/verifyAuthUserCheckout.spec.js create mode 100644 cypress/src/tests/e2eTests/verifyGuestUserCheckout.spec.js create mode 100644 cypress/src/tests/e2eTests/verifyLowStockInfoMessage.spec.js create mode 100644 icons/close.svg create mode 100644 scripts/__dropins__/storefront-auth/api.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api.js create mode 100644 scripts/__dropins__/storefront-auth/api/confirmEmail/confirmEmail.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/confirmEmail/graphql/confirmEmail.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/confirmEmail/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/createCustomer/createCustomer.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomer.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/createCustomer/graphql/createCustomerV2.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/createCustomer/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/createCustomerAddress/createCustomerAddress.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/createCustomerAddress/graphql/createCustomerAddress.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/createCustomerAddress/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/fetch-graphql/fetch-graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/fetch-graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getAttributesForm/getAttributesForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getAttributesForm/graphql/getAttributesForm.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getAttributesForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getCustomerData/getCustomerData.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getCustomerData/graphql/getCustomerData.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getCustomerData/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getCustomerToken/getCustomerToken.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getCustomerToken/graphql/getCustomerToken.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getCustomerToken/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getStoreConfig/getStoreConfig.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/getStoreConfig/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/initialize/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/initialize/initialize.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/graphql/requestPasswordResetEmail.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/requestPasswordResetEmail/requestPasswordResetEmail.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/graphql/resendConfirmationEmail.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/resendConfirmationEmail/resendConfirmationEmail.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/resetPassword/graphql/resetPassword.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/resetPassword/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/resetPassword/resetPassword.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/revokeCustomerToken/graphql/revokeCustomerToken.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/revokeCustomerToken/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/api/revokeCustomerToken/revokeCustomerToken.d.ts create mode 100644 scripts/__dropins__/storefront-auth/chunks/EmailConfirmationForm.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/ResetPasswordForm.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/SignInForm.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/SignUpForm.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/SkeletonLoader.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/confirmEmail.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/createCustomerAddress.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/getCustomerToken.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/getStoreConfig.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/index.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/index2.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/index3.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/initialize.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/network-error.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/requestPasswordResetEmail.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/resendConfirmationEmail.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/resetPassword.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/revokeCustomerToken.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/setReCaptchaToken.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/simplifyTransformAttributesForm.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/transform-attributes-form.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/useInLineAlert.js create mode 100644 scripts/__dropins__/storefront-auth/chunks/usePasswordValidationMessage.js create mode 100644 scripts/__dropins__/storefront-auth/components/EmailConfirmationForm/EmailConfirmationForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/EmailConfirmationForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/ResetPasswordForm/ResetPasswordForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/ResetPasswordForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SignInForm/SignInForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SignInForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SignUpForm/SignUpForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SignUpForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SkeletonLoader/SkeletonLoader.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/ResetPasswordSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignInSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/SignUpSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SkeletonLoader/Skeletons/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SkeletonLoader/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SuccessNotificationForm/SuccessNotificationForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/SuccessNotificationForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/Button/Button.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/Button/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/Form/Form.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/Form/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/FormInputs/FormInputs.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/FormInputs/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/Title/Title.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/Title/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UI/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UpdatePasswordForm/UpdatePasswordForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/UpdatePasswordForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/components/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/configs/cookieConfigs.d.ts create mode 100644 scripts/__dropins__/storefront-auth/configs/defaultCreateUserConfigs.d.ts create mode 100644 scripts/__dropins__/storefront-auth/configs/patternConfigs.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/AuthCombine.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/AuthCombine.js create mode 100644 scripts/__dropins__/storefront-auth/containers/AuthCombine/AuthCombine.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/AuthCombine/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/ResetPassword.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/ResetPassword.js create mode 100644 scripts/__dropins__/storefront-auth/containers/ResetPassword/ResetPassword.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/ResetPassword/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SignIn.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SignIn.js create mode 100644 scripts/__dropins__/storefront-auth/containers/SignIn/SignIn.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SignIn/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SignUp.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SignUp.js create mode 100644 scripts/__dropins__/storefront-auth/containers/SignUp/SignUp.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SignUp/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SuccessNotification.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SuccessNotification.js create mode 100644 scripts/__dropins__/storefront-auth/containers/SuccessNotification/SuccessNotification.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/SuccessNotification/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/UpdatePassword.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/UpdatePassword.js create mode 100644 scripts/__dropins__/storefront-auth/containers/UpdatePassword/UpdatePassword.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/UpdatePassword/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/containers/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/models/attributes-form.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/models/customer-data.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/models/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/models/password-reset-email.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/models/reset-password.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/models/revoke-customer-token.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/models/store-config.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/transform-attributes-form.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/transform-auth.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/transform-customer-data.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/transform-password-reset-email.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/transform-reset-password.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/transform-revoke-customer-token.d.ts create mode 100644 scripts/__dropins__/storefront-auth/data/transforms/transform-store-config.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/api/useGetAttributesForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/api/useGetStoreConfigs.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/components/useEmailConfirmationForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/components/usePasswordValidationMessage.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/components/useResetPasswordForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/components/useSignInForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/components/useSignUpForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/components/useUpdatePasswordForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/ui/useForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/useEmailConfirmation.d.ts create mode 100644 scripts/__dropins__/storefront-auth/hooks/useInLineAlert.d.ts create mode 100644 scripts/__dropins__/storefront-auth/i18n/en_US.json.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/acdl.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/checkIsFunction.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/clearUrlAndReplace.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/convertToInputDateFormat.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/cookieUtils.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/fetch-error.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/generateRandomDigits.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/getFormValues.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/getUrlParam.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/mergeFormObjects.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/network-error.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/setReCaptchaToken.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/simplifyTransformAttributesForm.d.ts create mode 100644 scripts/__dropins__/storefront-auth/lib/validationUniqueSymbolsPassword.d.ts create mode 100644 scripts/__dropins__/storefront-auth/render.d.ts create mode 100644 scripts/__dropins__/storefront-auth/render.js create mode 100644 scripts/__dropins__/storefront-auth/render/Provider.d.ts create mode 100644 scripts/__dropins__/storefront-auth/render/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/render/render.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/confirmEmail.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/createCustomer.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/createCustomerAddress.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/getAttributesForm.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/getCustomerData.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/getCustomerToken.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/passwordResetEmail.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/resendConfirmationEmail.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/resetPassword.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/revokeCustomerToken.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/api/storeConfig.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/authCombine.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/emailConfirmationForm.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/form.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/index.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/notification.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/resetPassword.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/signIn.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/signUp.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/skeletonLoader.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/successNotification.types.d.ts create mode 100644 scripts/__dropins__/storefront-auth/types/updatePassword.types.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api.js create mode 100644 scripts/__dropins__/storefront-cart/api/addProductsToCart/addProductsToCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/addProductsToCart/graphql/AddProductsToCartMutation.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/addProductsToCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/createEmptyCart/createEmptyCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/createEmptyCart/graphql/CreateCartMutation.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/createEmptyCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/fetch-graphql/fetch-graphql.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/fetch-graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getCartData/getCartData.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getCartData/graphql/CartQuery.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getCartData/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getEstimateShipping/getEstimateShipping.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getEstimateShipping/graphql/countriesAndRegionsQueries.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getEstimateShipping/graphql/estimateShippingMethodsMutation.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getEstimateShipping/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getEstimatedTotals/getEstimatedTotals.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getEstimatedTotals/graphql/GetEstimatedTotalsMutation.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getEstimatedTotals/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getStoreConfig/getStoreConfig.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getStoreConfig/graphql/StoreConfigQuery.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/getStoreConfig/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/graphql/CartFragment.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/initialize/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/initialize/initialize.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/initializeCart/graphql/MergeCartsMutation.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/initializeCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/initializeCart/initializeCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/refreshCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/refreshCart/refreshCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/resetCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/resetCart/resetCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/updateProductsFromCart/graphql/UpdateProductsMutation.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/updateProductsFromCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/api/updateProductsFromCart/updateProductsFromCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/chunks/CartFragment.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/CartSummaryGrid.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/CartSummaryList.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/EmptyCart.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/MiniCart.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/OrderSummary.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/acdl.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/getEstimateShipping.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/getEstimatedTotals.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/getStoreConfig.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/persisted-data.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/resetCart.js create mode 100644 scripts/__dropins__/storefront-cart/chunks/updateProductsFromCart.js create mode 100644 scripts/__dropins__/storefront-cart/components/Cart/Cart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/Cart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/CartSummaryGrid/CartSummaryGrid.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/CartSummaryGrid/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/CartSummaryList/CartSummaryList.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/CartSummaryList/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/EmptyCart/EmptyCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/EmptyCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/EstimateShipping/EstimateShipping.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/EstimateShipping/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/MiniCart/MiniCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/MiniCart/index.d.ts rename scripts/__dropins__/{tools/types/elsie/src/components/PriceSummary/PriceSummary.d.ts => storefront-cart/components/OrderSummary/OrderSummary.d.ts} (55%) create mode 100644 scripts/__dropins__/storefront-cart/components/OrderSummary/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/components/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/Cart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/Cart.js create mode 100644 scripts/__dropins__/storefront-cart/containers/Cart/Cart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/Cart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/CartSummaryGrid.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/CartSummaryGrid.js create mode 100644 scripts/__dropins__/storefront-cart/containers/CartSummaryGrid/CartSummaryGrid.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/CartSummaryGrid/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/CartSummaryList.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/CartSummaryList.js create mode 100644 scripts/__dropins__/storefront-cart/containers/CartSummaryList/CartSummaryList.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/CartSummaryList/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/EmptyCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/EmptyCart.js create mode 100644 scripts/__dropins__/storefront-cart/containers/EmptyCart/EmptyCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/EmptyCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/EstimateShipping.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/EstimateShipping.js create mode 100644 scripts/__dropins__/storefront-cart/containers/EstimateShipping/EstimateShipping.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/EstimateShipping/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/MiniCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/MiniCart.js create mode 100644 scripts/__dropins__/storefront-cart/containers/MiniCart/MiniCart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/MiniCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/OrderSummary.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/OrderSummary.js create mode 100644 scripts/__dropins__/storefront-cart/containers/OrderSummary/OrderSummary.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/OrderSummary/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/containers/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/models/acdl-models.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/models/cart-model.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/models/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/models/shipping-models.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/models/store-models.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/__fixtures__/cartModel.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/__fixtures__/estimatedTotalsData.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/__fixtures__/productTypesData.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/__fixtures__/storeConfig.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/acdl-context.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/transform-cart.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/transform-shipping.d.ts create mode 100644 scripts/__dropins__/storefront-cart/data/transforms/transform-store-config.d.ts create mode 100644 scripts/__dropins__/storefront-cart/hooks/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/hooks/useEstimatedShipping.d.ts create mode 100644 scripts/__dropins__/storefront-cart/hooks/useEstimatedTotals.d.ts create mode 100644 scripts/__dropins__/storefront-cart/i18n/en_US.json.d.ts create mode 100644 scripts/__dropins__/storefront-cart/lib/acdl.d.ts create mode 100644 scripts/__dropins__/storefront-cart/lib/cookies.d.ts create mode 100644 scripts/__dropins__/storefront-cart/lib/fetch-error.d.ts create mode 100644 scripts/__dropins__/storefront-cart/lib/persisted-data.d.ts create mode 100644 scripts/__dropins__/storefront-cart/lib/state.d.ts create mode 100644 scripts/__dropins__/storefront-cart/render.d.ts create mode 100644 scripts/__dropins__/storefront-cart/render.js create mode 100644 scripts/__dropins__/storefront-cart/render/Provider.d.ts create mode 100644 scripts/__dropins__/storefront-cart/render/index.d.ts create mode 100644 scripts/__dropins__/storefront-cart/render/render.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/__generated__/types.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api.js create mode 100644 scripts/__dropins__/storefront-checkout/api/errors/errors.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/errors/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/estimateShippingMethods/estimateShippingMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/estimateShippingMethods/fixtures.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/estimateShippingMethods/graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/estimateShippingMethods/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/fetch-graphql/fetch-graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/fetch-graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/fetchAddressFormFields/fetchAddressFormFields.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/fetchAddressFormFields/fixtures.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/fetchAddressFormFields/graphql/fetchAddressFormFields.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/fetchAddressFormFields/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCart/fixtures.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCart/getCart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCart/graphql/getCart.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCart/graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCheckoutData/getCheckoutData.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCheckoutData/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCountries/fixtures.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCountries/getCountries.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCountries/graphql/getCountries.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCountries/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCustomer/fixtures.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCustomer/getCustomer.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCustomer/graphql/getCustomer.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCustomer/graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getCustomer/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getRegions/fixtures.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getRegions/getRegions.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getRegions/graphql/getRegions.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getRegions/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getStoreConfig/getStoreConfig.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/getStoreConfig/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/initialize/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/initialize/initialize.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/initialize/listeners.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/initializeCheckout/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/initializeCheckout/initializeCheckout.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/isEmailAvailable/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/isEmailAvailable/isEmailAvailable.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/placeOrder/fixtures.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/placeOrder/graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/placeOrder/graphql/placeOrder.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/placeOrder/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/placeOrder/placeOrder.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/redirect/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/redirect/redirect.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/resetCheckout/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/resetCheckout/resetCheckout.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/resetCustomer/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/resetCustomer/resetCustomer.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setBillingAddress/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setBillingAddress/setBillingAddress.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setGuestEmailOnCart/graphql/setGuestEmailOnCart.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setGuestEmailOnCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setPaymentMethod/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setPaymentMethod/setPaymentMethod.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setShippingAddress/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setShippingAddress/setShippingAddress.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setShippingMethods/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/setShippingMethods/setShippingMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/utils/dispatchApiCall.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/utils/enqueueRequest.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/api/utils/filterControlledErrors.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/chunks/BillToShippingAddress.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/EmptyCart.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/ErrorBanner.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/MergedCartBanner.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/OutOfStock.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/ShippingMethods.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/getCart.graphql.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/getCustomer.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/placeOrder.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/resetCustomer.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/setBillingAddress.js create mode 100644 scripts/__dropins__/storefront-checkout/chunks/setShippingMethods.js create mode 100644 scripts/__dropins__/storefront-checkout/components/AddressForm/AddressForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/AddressForm/constants.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/AddressForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/AddressForm/useAddressBackup.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/AddressForm/useAddressForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/AddressForm/useCheckoutAddressEventEmitter.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/AddressForm/usePreselectedFields.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/AddressForm/utils.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/BillToShippingAddress/BillToShippingAddress.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/BillToShippingAddress/BillToShippingAddressSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/BillToShippingAddress/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/Checkout/Checkout.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/Checkout/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/EmptyCart/EmptyCart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/EmptyCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/EstimateShipping/EstimateShipping.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/EstimateShipping/EstimateShippingSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/EstimateShipping/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/FieldsForm/FieldsForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/FieldsForm/FieldsFormSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/FieldsForm/fieldFactory.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/FieldsForm/fixtures.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/FieldsForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/FieldsForm/validation.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/Heading/Heading.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/Heading/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/LoginForm/Email.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/LoginForm/LoginForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/LoginForm/LoginFormSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/LoginForm/SignIn.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/LoginForm/SignOut.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/LoginForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/OutOfStock/OutOfStock.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/OutOfStock/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/OverlayLoader/OverlayLoader.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/OverlayLoader/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/PaymentMethods/PaymentMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/PaymentMethods/PaymentMethodsSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/PaymentMethods/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/PlaceOrder/PlaceOrder.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/PlaceOrder/PlaceOrderSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/PlaceOrder/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ServerError/ServerError.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ServerError/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ShippingMethods/ShippingMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ShippingMethods/ShippingMethodsSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ShippingMethods/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ToggleButton/ToggleButton.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ToggleButton/assets/icons/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ToggleButton/assets/images/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/ToggleButton/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/components/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillToShippingAddress.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillToShippingAddress.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillToShippingAddress/BillToShippingAddress.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillToShippingAddress/constants.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillToShippingAddress/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillingForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillingForm.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillingForm/BillingForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillingForm/constants.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/BillingForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/Checkout.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/Checkout.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/Checkout/Checkout.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/Checkout/constants.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/Checkout/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/EmptyCart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/EmptyCart.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/EmptyCart/EmptyCart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/EmptyCart/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ErrorBanner.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ErrorBanner.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/ErrorBanner/ErrorBanner.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ErrorBanner/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/EstimateShipping.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/EstimateShipping.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/EstimateShipping/EstimateShipping.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/EstimateShipping/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/LoginForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/LoginForm.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/LoginForm/LoginForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/LoginForm/constants.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/LoginForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/MergedCartBanner.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/MergedCartBanner.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/MergedCartBanner/MergedCartBanner.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/MergedCartBanner/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/OutOfStock.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/OutOfStock.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/OutOfStock/OutOfStock.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/OutOfStock/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/PaymentMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/PaymentMethods.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/PaymentMethods/PaymentMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/PaymentMethods/defaultHandlers.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/PaymentMethods/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/PlaceOrder.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/PlaceOrder.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/PlaceOrder/PlaceOrder.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/PlaceOrder/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingForm.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingForm/ShippingForm.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingForm/constants.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingMethods.js create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingMethods/ShippingMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/ShippingMethods/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/containers/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/acdl.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/address-form-fields.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/address.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/cart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/country.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/custom-attribute.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/customer.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/email-availability.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/order.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/payment-method.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/price.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/region.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/shipping-estimate.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/shipping-method.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/models/store-config.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-acdl.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-address-form-fields.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-address.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-cart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-countries.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-customer.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-email-availability.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-order.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-payment-methods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-regions.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-shipping-estimate.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-shipping-methods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/data/transforms/transform-store-config.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hocs/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hocs/withConditionalRendering.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hooks/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hooks/useBreakpoint/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hooks/useBreakpoint/useBreakpoint.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hooks/useLockScroll/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hooks/useLockScroll/useLockScroll.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hooks/useValidity/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/hooks/useValidity/useValidity.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/i18n/en_US.json.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/lib/acdl.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/lib/backup-data.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/lib/fetch-error.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/lib/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/lib/network-error.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/lib/redirect.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/lib/state.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/browser.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/fragments/american-regions.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/fragments/available-shipping-methods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/fragments/billing-address.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/fragments/cart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/fragments/countries.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/fragments/form-fields.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/fragments/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/fragments/shipping-address.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/mutations/estimate-shipping-methods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/mutations/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/mutations/place-order.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/mutations/set-billing-address.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/mutations/set-guest-email.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/mutations/set-payment-method.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/mutations/set-shipping-address.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/mutations/set-shipping-methods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/fetch-address-form-fields.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/get-cart.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/get-countries.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/get-customer-cart-stock-status.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/get-customer.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/get-regions.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/get-stock-status.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/get-store-config.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/fixtures/queries/is-email-available.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/handlers.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/msw/server.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/render.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/render.js create mode 100644 scripts/__dropins__/storefront-checkout/render/Provider.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/render/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/render/render.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/AddressFormFieldsSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/CartSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/CountryListSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/CustomerSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/EstimateShippingMethodsSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/IsBillToShippingSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/RegionsSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/SelectedShippingMethodSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/StoreConfigSignal.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/signals/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/tests/constants.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/tests/integration/utils/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/tests/integration/utils/setup.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/tests/integration/utils/user-actions.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/tests/mocks/svg.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/tests/utils/expectError.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/tests/utils/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/tests/utils/mockEvents.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/autocompleteFieldCodes/autocompleteFieldCodes.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/autocompleteFieldCodes/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/getDisplayName/getDisplayName.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/getDisplayName/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/getMultilineValues/getMultilineValues.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/getMultilineValues/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/isEmpty/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/isEmpty/isEmpty.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/isNullish/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/isNullish/isNullish.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/parseRegionId/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/parseRegionId/parseRegionId.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/processFormFields/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/processFormFields/processFormFields.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/refetchEstimatedShippingMethods/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/refetchEstimatedShippingMethods/refetchEstimatedShippingMethods.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/shippingMethods/index.d.ts create mode 100644 scripts/__dropins__/storefront-checkout/utils/shippingMethods/isEqual.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/__generated__/mocks.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/__generated__/types.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api.js create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/customerOrder/customerOrder.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/customerOrder/graphql/customerOrder.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/customerOrder/graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/customerOrder/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/errors/errors.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/errors/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/fetch-graphql/fetch-graphql.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/fetch-graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/guestOrder/graphql/guestOrder.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/guestOrder/graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/guestOrder/guestOrder.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/guestOrder/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/guestOrderByToken/graphql/guestOrderByToken.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/guestOrderByToken/graphql/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/guestOrderByToken/guestOrderByToken.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/guestOrderByToken/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/initialize/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/initialize/initialize.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/isEmailAvailable/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/api/isEmailAvailable/isEmailAvailable.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/chunks/customerOrder.js create mode 100644 scripts/__dropins__/storefront-order-confirmation/chunks/initialize.js create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/CartSummary/CartSummary.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/CartSummary/CartSummarySkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/CartSummary/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/CartSummaryItem/CartSummaryItem.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/CartSummaryItem/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Details/Details.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Details/DetailsSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Details/fixtures/orderDetails.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Details/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Footer/Footer.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Footer/FooterSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Footer/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Header/Header.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Header/HeaderSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Header/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Message/Message.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Message/MessageSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/Message/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderConfirmation/OrderConfirmation.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderConfirmation/fixtures/cartItems.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderConfirmation/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderSearchForm/OrderSearchForm.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderSearchForm/OrderSearchFormSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderSearchForm/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderSummary/OrderSummary.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderSummary/OrderSummarySkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/OrderSummary/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/StaticSkeleton/StaticSkeleton.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/StaticSkeleton/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/components/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/containers/OrderConfirmation.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/containers/OrderConfirmation.js create mode 100644 scripts/__dropins__/storefront-order-confirmation/containers/OrderConfirmation/OrderConfirmation.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/containers/OrderConfirmation/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/containers/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/data/models/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/data/models/order.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/data/models/price.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/data/transforms/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/data/transforms/transform-customer-address-input.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/data/transforms/transform-order.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/hooks/useBreakpoint/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/hooks/useBreakpoint/useBreakpoint.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/i18n/en_US.json.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/lib/fetch-error.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/lib/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/lib/network-error.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/reducers/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/reducers/orderConfirmation.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/render.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/render.js create mode 100644 scripts/__dropins__/storefront-order-confirmation/render/Provider.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/render/index.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/render/render.d.ts create mode 100644 scripts/__dropins__/storefront-order-confirmation/tests/utils/mockEvents.d.ts create mode 100644 scripts/__dropins__/storefront-pdp/__mocks__/product-mocks.d.ts create mode 100644 scripts/__dropins__/storefront-pdp/components/Zoom/Zoom.d.ts create mode 100644 scripts/__dropins__/storefront-pdp/components/Zoom/index.d.ts create mode 100644 scripts/__dropins__/tools/chunks/icons/AddressBook.js create mode 100644 scripts/__dropins__/tools/chunks/icons/EmptyBox.js create mode 100644 scripts/__dropins__/tools/chunks/icons/Eye.js create mode 100644 scripts/__dropins__/tools/chunks/icons/EyeClose.js create mode 100644 scripts/__dropins__/tools/signals.d.ts create mode 100644 scripts/__dropins__/tools/signals.js create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/Header/Header.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/Header/index.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/InputPassword/InputPassword.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/InputPassword/PasswordStatusIndicator/index.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/InputPassword/index.d.ts delete mode 100644 scripts/__dropins__/tools/types/elsie/src/components/PriceSummary/index.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/Tag/Tag.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/Tag/index.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/ToggleButton/ToggleButton.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/components/ToggleButton/index.d.ts create mode 100644 scripts/__dropins__/tools/types/elsie/src/lib/signals.d.ts create mode 100644 scripts/__dropins__/tools/types/recaptcha/src/configs/recaptchaBadgeSelector.config.d.ts create mode 100644 scripts/__dropins__/tools/types/recaptcha/src/lib/_checkRecaptchaBadge.d.ts create mode 100644 scripts/__dropins__/tools/types/recaptcha/src/lib/_convertKeysToCamelCase.d.ts delete mode 100644 scripts/minicart/Minicart.js delete mode 100644 scripts/minicart/api.js delete mode 100644 scripts/minicart/cart.js delete mode 100644 styles/minicart.css diff --git a/.eslintignore b/.eslintignore index 6c7e174a0f..5217195f8a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,3 +10,4 @@ scripts/commerce-events-collector.js scripts/commerce-events-sdk.js scripts/widgets plugins/ +cypress/ \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 34c6b71107..b1f96769da 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -14,5 +14,12 @@ module.exports = { 'import/extensions': ['error', { js: 'always' }], // require js file extensions in imports 'linebreak-style': ['error', 'unix'], // enforce unix linebreaks 'no-param-reassign': [2, { props: false }], // allow modifying properties of param + 'no-use-before-define': [2, { functions: false }], + 'no-console': [ + 'error', + { + allow: ['warn', 'error', 'info', 'debug'], + }, + ], }, }; diff --git a/.github/workflows/run-e2e-tests.yaml b/.github/workflows/run-e2e-tests.yaml new file mode 100644 index 0000000000..f388559b49 --- /dev/null +++ b/.github/workflows/run-e2e-tests.yaml @@ -0,0 +1,25 @@ +name: Cypress E2E Tests +on: push +jobs: + cypress-run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install root dependencies + run: npm ci + - name: Start server in the background + run: npm start & + + - name: Install Cypress and run tests + uses: cypress-io/github-action@v6 + with: + working-directory: cypress + browser: chrome + wait-on: 'http://localhost:3000' + config: baseUrl=http://localhost:3000 + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: cypress-screenshots + path: cypress/screenshots + if-no-files-found: ignore \ No newline at end of file diff --git a/.gitignore b/.gitignore index a840bb9670..080e4ef3bb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,4 @@ helix-importer-ui *.bak .idea # Ignore .map files in scripts/__dropins__/ directory and all its subdirectories -scripts/__dropins__/**/*.map \ No newline at end of file +scripts/__dropins__/**/*.map diff --git a/.hlxignore b/.hlxignore index a630daae5a..3b7d656e89 100644 --- a/.hlxignore +++ b/.hlxignore @@ -7,4 +7,5 @@ package-lock.json test/* postinstall.js tools/picker/src/* +cypress/ tools/pdp-metadata/* diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..1a1231825f --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +; force @adobe namespaced packages to be installed from npmjs.org +@adobe:registry=https://registry.npmjs.org diff --git a/README.md b/README.md index 1746cc66d8..53e926d81b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,18 @@ https://experienceleague.adobe.com/developer/commerce/storefront/ - Preview: https://main--{repo}--{owner}.aem.page/ - Live: https://main--{repo}--{owner}.aem.live/ +## Pre-requisites + +Out of the box, this project template uses a pre-configured Adobe Commerce environment. If you want to use your own Adobe Commerce environment, you'll need to update the `configs.xlsx` file in your content repository to have values that match your environment. + +Additionally, you need to have the following modules and customizations installed on your environment: + +1. magento/magento-extra-graphql: Commerce module required for Cart and Checkout Drop-Ins. +1. magento/module-data-services-graphql: Commerce module with functionality necessary for adding context to events. +1. magento/module-page-builder-product-recommendations: Commerce module required for PRex Widget +1. magento/module-visual-product-recommendations: Commerce module required for PRex Widget + + ## Installation ```sh @@ -33,4 +45,4 @@ npm run lint Major changes are described and documented as part of pull requests and tracked via the `changelog` tag. To keep your project up to date, please follow this list: -https://github.com/hlxsites/aem-boilerplate-commerce/issues?q=label%3Achangelog+is%3Aclosed \ No newline at end of file +https://github.com/hlxsites/aem-boilerplate-commerce/issues?q=label%3Achangelog+is%3Aclosed diff --git a/blocks/commerce-account/api/getCustomer.js b/blocks/commerce-account/api/getCustomer.js new file mode 100644 index 0000000000..117d671f74 --- /dev/null +++ b/blocks/commerce-account/api/getCustomer.js @@ -0,0 +1,141 @@ +import { getConfigValue, getCookie } from '../../../scripts/configs.js'; + +const getCustomer = async () => { + const query = ` + { + customer { + firstname + lastname + email + is_subscribed + wishlist { + id + items_count + sharing_code + updated_at + items { + id + qty + description + added_at + product { + id + sku + name + url_key + price { + regularPrice { + amount { + currency + value + } + } + } + image { + url + label + } + } + } + } + addresses { + firstname + lastname + city + company + country_code + region{ + region + region_code + region_id + } + region_id + telephone + id + vat_id + postcode + street + default_shipping + default_billing + } + orders { + page_info { + current_page + page_size + total_pages + } + items { + id + status + order_date + number + shipping_method + payment_methods { + type + name + } + billing_address { + firstname + lastname + city + country_code + region + telephone + postcode + telephone + street + } + shipping_address { + region + firstname + lastname + city + country_code + region_id + telephone + postcode + street + } + items { + product_name + product_type + product_url_key + id + quantity_invoiced + quantity_canceled + quantity_ordered + quantity_refunded + quantity_returned + quantity_shipped + status + product_sku + product_sale_price { + currency + value + } + } + } + } + } + } +`; + + const token = getCookie('auth_dropin_user_token'); + + try { + const response = await fetch(await getConfigValue('commerce-core-endpoint'), { + method: 'POST', + headers: { + Authorization: `Bearer ${token}`, + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ query }), + }); + + return await response.json(); + } catch (error) { + return null; + } +}; + +export default getCustomer; diff --git a/blocks/commerce-account/commerce-account.css b/blocks/commerce-account/commerce-account.css index 3d8a3f1b50..e32e249fba 100644 --- a/blocks/commerce-account/commerce-account.css +++ b/blocks/commerce-account/commerce-account.css @@ -1 +1,67 @@ -/* stylelint-disable no-empty-source */ \ No newline at end of file +* { + box-sizing: border-box; +} + +.admin-panel { + display: flex; + align-items: flex-start; +} + +.admin-panel .sidebar { + width: 300px; + background-color: #e0e0e06b; + padding: 10px; +} + +.admin-panel .logo { + padding: 10px; + text-align: center; +} + +.admin-panel .menu ul { + list-style: none; + padding: 0; + margin: 0; + padding-bottom: 10px; + border-bottom: 1px solid lightgray; +} + +.admin-panel .menu ul:last-child { + border: none; +} + +.admin-panel .menu a { + display: block; + padding: 10px; + text-decoration: none; +} + +.admin-panel .content { + padding: 20px; + flex-grow: 1; + border-left: 1px solid #e0e0e06b; +} + +.admin-panel h2 { + margin-top: 0; +} + +.admin-panel h4 { + padding-bottom: 0.5em; + border-bottom: 1px solid lightgray; +} + +.admin-panel address { + margin-bottom: 1em; +} + +.orders-list { + list-style: none; + padding: 0; +} + +.orders-list li { + display: flex; + gap: 0 10px; + margin: 10px; +} diff --git a/blocks/commerce-account/commerce-account.js b/blocks/commerce-account/commerce-account.js index bf713ed213..e2e1eb31ab 100644 --- a/blocks/commerce-account/commerce-account.js +++ b/blocks/commerce-account/commerce-account.js @@ -1,13 +1,158 @@ -import { readBlockConfig } from '../../scripts/aem.js'; +/* eslint-disable */ +// TODO - Initial block template, left as a reference +// import { readBlockConfig } from '../../scripts/aem.js'; +// +// export default function decorate(block) { +// const config = readBlockConfig(block); +// +// const content = document.createRange().createContextualFragment(`
+// Commerce Account drop-in +//
${JSON.stringify(config, null, 2)}
+//
`); +// +// block.textContent = ''; +// block.append(content); +// } -export default function decorate(block) { - const config = readBlockConfig(block); +// TODO - Temporally component commerce-account implemented for testing and demo purposes +import { getCookie } from '../../scripts/configs.js'; +import getCustomer from './api/getCustomer.js'; +import * as authApi from '@dropins/storefront-auth/api.js'; - const content = document.createRange().createContextualFragment(`
- Commerce Account dropin -
${JSON.stringify(config, null, 2)}
-
`); +import convertDateFormat from './helpers/convertDateFormat.js'; +import validateOrdersStatus from './helpers/validateOrdersStatus.js'; - block.textContent = ''; - block.append(content); +export default async function decorate(block) { + block.innerHTML = ''; + + const token = getCookie('auth_dropin_user_token'); + + if (!token) { + window.location.href = '/customer/login'; + } + + document.body.classList.add('my-account-element'); + + getCustomer(token).then((response) => { + if (!response?.data?.customer) { + window.location.href = '/'; + } + + const { + data: { customer }, + } = response; + + const { addresses, orders } = customer; + + const items = orders?.items.length ? orders.items : []; + + const userAddresses = addresses.reduce((acc, el) => { + if (!el.default_shipping) { + return acc; + } + const addressHTML = `
+

Default Shipping Address

+
+ ${el?.street[0]}
+ ${el?.city}, ${el?.region?.region}, ${el?.postcode}
+ ${el?.country_code}
+ T: ${el?.telephone} +
+ Edit Address +
`; + return acc + addressHTML; + }, ''); + + const userBillAddresses = addresses.reduce((acc, el) => { + if (!el.default_billing) { + return acc; + } + const addressHTML = `
+

Default Billing Address

+
+ ${el?.street[0]}
+ ${el?.city}, ${el?.region?.region}, ${el?.postcode}
+ ${el?.country_code}
+ T: ${el?.telephone} +
+ Edit Address +
`; + return acc + addressHTML; + }, ''); + + const renderOrdersList = items.reduce( + (acc, el, i) => { + const orderHTML = ` +
  • +
    ${i + 1}.
    +
    Order ${el.order_number || el.number}
    +
    ${convertDateFormat(el.created_at || el.order_date)}
    + ${el.status} +
  • `; + return acc + orderHTML; + }, + items.length ? '' : '
    ', + ); + + block.insertAdjacentHTML( + 'afterbegin', + `
    + +
    +

    My Account

    +
    + + + `, + ); + + const logoutDashboard = document.querySelector('.logoutDashboard'); + + logoutDashboard.addEventListener('click', async () => { + await authApi.revokeCustomerToken(); + window.location.href = '/customer/login'; + }); + }); } diff --git a/blocks/commerce-account/helpers/convertDateFormat.js b/blocks/commerce-account/helpers/convertDateFormat.js new file mode 100644 index 0000000000..3354a5bdd4 --- /dev/null +++ b/blocks/commerce-account/helpers/convertDateFormat.js @@ -0,0 +1,12 @@ +function convertDateFormat(inputDate) { + const dateObj = new Date(inputDate); + + // Format as "DD.MM.YYYY" (e.g., 31.01.2020) + return dateObj.toLocaleString('en-US', { + day: '2-digit', + month: '2-digit', + year: 'numeric', + }).replace(/\//g, '.'); +} + +export default convertDateFormat; diff --git a/blocks/commerce-account/helpers/validateOrdersStatus.js b/blocks/commerce-account/helpers/validateOrdersStatus.js new file mode 100644 index 0000000000..9f19d880d8 --- /dev/null +++ b/blocks/commerce-account/helpers/validateOrdersStatus.js @@ -0,0 +1,15 @@ +const validateOrdersStatus = (status) => { + switch (status) { + case 'Complete': + return 'is-info'; + case 'Pending': + return 'is-Light'; + case 'Processing': + return 'is-warning'; + case 'Canceled': + return 'is-danger'; + default: + return 'is-link'; + } +}; +export default validateOrdersStatus; diff --git a/blocks/commerce-cart-order-summary/commerce-cart-order-summary.css b/blocks/commerce-cart-order-summary/commerce-cart-order-summary.css new file mode 100644 index 0000000000..3d8a3f1b50 --- /dev/null +++ b/blocks/commerce-cart-order-summary/commerce-cart-order-summary.css @@ -0,0 +1 @@ +/* stylelint-disable no-empty-source */ \ No newline at end of file diff --git a/blocks/commerce-cart-order-summary/commerce-cart-order-summary.js b/blocks/commerce-cart-order-summary/commerce-cart-order-summary.js new file mode 100644 index 0000000000..4ff839d201 --- /dev/null +++ b/blocks/commerce-cart-order-summary/commerce-cart-order-summary.js @@ -0,0 +1,27 @@ +import { render as provider } from '@dropins/storefront-cart/render.js'; +import OrderSummary from '@dropins/storefront-cart/containers/OrderSummary.js'; +import EstimateShipping from '@dropins/storefront-cart/containers/EstimateShipping.js'; +import { readBlockConfig } from '../../scripts/aem.js'; + +export default async function decorate(block) { + const { + 'checkout-url': checkoutURL = '', + 'enable-estimate-shipping': enableEstimateShipping = 'false', + } = readBlockConfig(block); + + block.innerHTML = ''; + + return provider.render(OrderSummary, { + routeProduct: (product) => `/products/${product.url.urlKey}/${product.sku}`, + routeCheckout: checkoutURL ? () => checkoutURL : undefined, + slots: { + EstimateShipping: async (ctx) => { + if (enableEstimateShipping === 'true') { + const wrapper = document.createElement('div'); + await provider.render(EstimateShipping, {})(wrapper); + ctx.replaceWith(wrapper); + } + }, + }, + })(block); +} diff --git a/blocks/commerce-cart-summary/commerce-cart-summary.css b/blocks/commerce-cart-summary/commerce-cart-summary.css new file mode 100644 index 0000000000..ff7112406e --- /dev/null +++ b/blocks/commerce-cart-summary/commerce-cart-summary.css @@ -0,0 +1 @@ +/* stylelint-disable no-empty-source */ diff --git a/blocks/commerce-cart-summary/commerce-cart-summary.js b/blocks/commerce-cart-summary/commerce-cart-summary.js new file mode 100644 index 0000000000..7df039c185 --- /dev/null +++ b/blocks/commerce-cart-summary/commerce-cart-summary.js @@ -0,0 +1,26 @@ +import { render as provider } from '@dropins/storefront-cart/render.js'; +import CartSummaryList from '@dropins/storefront-cart/containers/CartSummaryList.js'; +import { readBlockConfig } from '../../scripts/aem.js'; + +export default async function decorate(block) { + const { + 'hide-heading': hideHeading = 'false', + 'start-shopping-url': startShoppingURL = '', + 'max-items': maxItems, + 'hide-attributes': hideAttributes = '', + 'enable-item-quantity-update': enableUpdateItemQuantity = 'false', + 'enable-item-remove': enableRemoveItem = 'true', + } = readBlockConfig(block); + + block.innerHTML = ''; + + return provider.render(CartSummaryList, { + hideHeading: hideHeading === 'true', + routeProduct: (product) => `/products/${product.url.urlKey}/${product.sku}`, + routeEmptyCartCTA: startShoppingURL ? () => startShoppingURL : undefined, + maxItems: parseInt(maxItems, 10) || undefined, + attributesToHide: hideAttributes.split(',').map((attr) => attr.trim().toLowerCase()), + enableUpdateItemQuantity: enableUpdateItemQuantity === 'true', + enableRemoveItem: enableRemoveItem === 'true', + })(block); +} diff --git a/blocks/commerce-cart/commerce-cart.js b/blocks/commerce-cart/commerce-cart.js index 41055d5dc3..bd11964fdb 100644 --- a/blocks/commerce-cart/commerce-cart.js +++ b/blocks/commerce-cart/commerce-cart.js @@ -1,13 +1,41 @@ -import { readBlockConfig } from '../../scripts/aem.js'; +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ -export default function decorate(block) { - const config = readBlockConfig(block); +// Dropin Providers +import { render as provider } from '@dropins/storefront-cart/render.js'; - const content = document.createRange().createContextualFragment(`
    - Commerce Cart dropin -
    ${JSON.stringify(config, null, 2)}
    -
    `); +// Dropin Containers +import Cart from '@dropins/storefront-cart/containers/Cart.js'; +import OrderSummary from '@dropins/storefront-cart/containers/OrderSummary.js'; +import EstimateShipping from '@dropins/storefront-cart/containers/EstimateShipping.js'; - block.textContent = ''; - block.append(content); +export default async function decorate(block) { + // Initialize Dropins – already initialized in scripts/dropins.js + + // Render Containers + return provider.render(Cart, { + routeEmptyCartCTA: () => '/', + routeProduct: (product) => `/products/${product.url.urlKey}/${product.sku}`, + routeCheckout: () => '/checkout', + slots: { + OrderSummary: (ctx) => { + const orderSummary = document.createElement('div'); + + provider.render(OrderSummary, { + routeCheckout: () => '/checkout', + slots: { + EstimateShipping: (orderSummaryContext) => { + const estimateShippingForm = document.createElement('div'); + + provider.render(EstimateShipping)(estimateShippingForm); + + orderSummaryContext.appendChild(estimateShippingForm); + }, + }, + })(orderSummary); + + ctx.appendChild(orderSummary); + }, + }, + })(block); } diff --git a/blocks/commerce-checkout/commerce-checkout.css b/blocks/commerce-checkout/commerce-checkout.css index 3d8a3f1b50..c263be37c7 100644 --- a/blocks/commerce-checkout/commerce-checkout.css +++ b/blocks/commerce-checkout/commerce-checkout.css @@ -1 +1,44 @@ -/* stylelint-disable no-empty-source */ \ No newline at end of file +/* stylelint-disable no-empty-source */ +/* stylelint-disable selector-class-pattern */ + +header .nav-hamburger, +header .nav-sections, +header .nav-tools { + display: none !important; +} + +/* CartSummaryList */ +.cart-summary-list { + padding: var(--spacing-medium); + background-color: var(--color-neutral-200); +} + +.cart-summary-list__heading { + display: flex; + justify-content: space-between; +} + +.cart-summary-list__heading-text { + font: var(--type-headline-2-strong-font); + letter-spacing: var(--type-headline-2-strong-letter-spacing); + color: var(--color-neutral-800); +} + +.cart-summary-list__edit { + font: var(--type-body-2-strong-font); + letter-spacing: var(--type-body-2-strong-letter-spacing); +} + +.cart-cart-summary-list__content { + margin-top: var(--spacing-small); +} + +.cart-cart-summary-list__heading { + row-gap: var(--spacing-small); + padding-top: 0; +} + +/* temporary fix to hide the default cart heading */ +[data-testid='default-cart-heading'] { + display: none; +} diff --git a/blocks/commerce-checkout/commerce-checkout.js b/blocks/commerce-checkout/commerce-checkout.js index c20feeef33..1c6f591705 100644 --- a/blocks/commerce-checkout/commerce-checkout.js +++ b/blocks/commerce-checkout/commerce-checkout.js @@ -1,13 +1,198 @@ -import { readBlockConfig } from '../../scripts/aem.js'; +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ -export default function decorate(block) { - const config = readBlockConfig(block); +// Dropin Tools +import { events } from '@dropins/tools/event-bus.js'; +import { initializers } from '@dropins/tools/initializer.js'; - const content = document.createRange().createContextualFragment(`
    - Commerce Checkout dropin -
    ${JSON.stringify(config, null, 2)}
    -
    `); +// Cart Dropin Modules +import * as cartApi from '@dropins/storefront-cart/api.js'; +import CartSummaryList from '@dropins/storefront-cart/containers/CartSummaryList.js'; +import { OrderSummary } from '@dropins/storefront-cart/containers/OrderSummary.js'; +import { render as cartProvider } from '@dropins/storefront-cart/render.js'; - block.textContent = ''; - block.append(content); +// Checkout Dropin Modules +import * as checkoutApi from '@dropins/storefront-checkout/api.js'; +import Checkout from '@dropins/storefront-checkout/containers/Checkout.js'; +import EstimateShipping from '@dropins/storefront-checkout/containers/EstimateShipping.js'; +import { render as checkoutProvider } from '@dropins/storefront-checkout/render.js'; + +// Order Confirmation Dropin Modules +import * as orderConfirmationApi from '@dropins/storefront-order-confirmation/api.js'; +import OrderConfirmation from '@dropins/storefront-order-confirmation/containers/OrderConfirmation.js'; +import { render as orderConfirmationProvider } from '@dropins/storefront-order-confirmation/render.js'; + +// Auth Dropin Modules +import * as authApi from '@dropins/storefront-auth/api.js'; +import AuthCombine from '@dropins/storefront-auth/containers/AuthCombine.js'; +import SignUp from '@dropins/storefront-auth/containers/SignUp.js'; +import { render as authProvider } from '@dropins/storefront-auth/render.js'; + +import { getUserTokenCookie } from '../../scripts/dropins.js'; +import { createModal } from '../modal/modal.js'; + +export default async function decorate(block) { + let modal = null; + + // Initialize Dropins + initializers.register(checkoutApi.initialize, {}); + + events.on( + 'authenticated', + (isAuthenticated) => { + if (isAuthenticated && modal) { + modal.removeModal(); + modal = null; + } + }, + { eager: true }, + ); + + // Display order confirmation + events.on('checkout/order', (orderData) => { + const token = getUserTokenCookie(); + const orderRef = token ? orderData.number : orderData.token; + const encodedOrderRef = encodeURIComponent(orderRef); + + window.history.pushState( + {}, + '', + `/order-confirmation?orderRef=${encodedOrderRef}`, + ); + + checkoutProvider.unmount(block); + + initializers.register(orderConfirmationApi.initialize, {}); + + const onSignUpClick = async ({ + inputsDefaultValueSet, + addressesData, + }) => { + const signUpForm = document.createElement('div'); + + authProvider.render(SignUp, { + routeSignIn: () => '/customer/login', + routeRedirectOnEmailConfirmationClose: () => '/customer/account', + inputsDefaultValueSet, + addressesData, + })(signUpForm); + + modal = await createModal([signUpForm]); + modal.showModal(); + }; + + orderConfirmationProvider.render(OrderConfirmation, { + orderRef, + orderData, + onSignUpClick, + routeHome: () => '/', + routeSupport: () => '/support', + })(block); + }); + + const onSignInClick = async (initialEmailValue) => { + const signInForm = document.createElement('div'); + + authProvider.render(AuthCombine, { + signInFormConfig: { renderSignUpLink: true, initialEmailValue }, + signUpFormConfig: {}, + resetPasswordFormConfig: {}, + })(signInForm); + + modal = await createModal([signInForm]); + modal.showModal(); + }; + + return checkoutProvider.render(Checkout, { + onSignInClick: async () => onSignInClick(), + onSignOutClick: () => { + authApi.revokeCustomerToken(); + }, + onCheckoutDataUpdate: () => { + cartApi.refreshCart().catch(console.error); + }, + routeHome: () => '/', + routeCart: () => '/cart', + slots: { + OrderSummary: (ctx) => { + const orderSummary = document.createElement('div'); + + cartProvider.render(OrderSummary, { + slots: { + EstimateShipping: (esCtx) => { + const estimateShippingForm = document.createElement('div'); + + checkoutProvider.render(EstimateShipping)( + estimateShippingForm, + ); + + esCtx.appendChild(estimateShippingForm); + }, + }, + })(orderSummary); + + ctx.appendChild(orderSummary); + }, + CartSummaryList: (checkoutCtx) => { + const cartSummaryList = document.createElement('div'); + cartSummaryList.classList.add('cart-summary-list'); + + cartProvider.render(CartSummaryList, { + slots: { + Heading: (headingCtx) => { + const { dictionary } = checkoutCtx; + const { title, editLink } = dictionary.Checkout.Slots.CartSummaryList + .Heading; + + const cartSummaryListHeading = document.createElement('div'); + cartSummaryListHeading.classList.add( + 'cart-summary-list__heading', + ); + + const cartSummaryListHeadingText = document.createElement('div'); + cartSummaryListHeadingText.classList.add( + 'cart-summary-list__heading-text', + ); + + cartSummaryListHeadingText.innerText = title.replace('{count}', headingCtx.count); + const editCartLink = document.createElement('a'); + editCartLink.classList.add( + 'cart-summary-list__edit', + ); + editCartLink.href = '/cart'; + editCartLink.rel = 'noreferrer'; + editCartLink.innerText = editLink; + + cartSummaryListHeading.appendChild( + cartSummaryListHeadingText, + ); + cartSummaryListHeading.appendChild(editCartLink); + headingCtx.appendChild(cartSummaryListHeading); + + headingCtx.onChange((nextHeadingCtx) => { + cartSummaryListHeadingText.innerText = title.replace('{count}', nextHeadingCtx.count); + }); + }, + }, + })(cartSummaryList); + + checkoutCtx.appendChild(cartSummaryList); + }, + PaymentMethods: async (context) => { + context.addPaymentMethodHandler('checkmo', { + render: (ctx, element) => { + if (element) { + // clear the element first + element.innerHTML = ''; + } + + // Optionally, create and render some custom content here. + // const $content = document.createElement('div'); + // $content.innerText = 'Custom Check / Money order handler'; + // ctx.appendHTMLElement($content); + }, + }); + }, + }, + })(block); } diff --git a/blocks/commerce-confirm-account/commerce-confirm-account.css b/blocks/commerce-confirm-account/commerce-confirm-account.css new file mode 100644 index 0000000000..095a339bad --- /dev/null +++ b/blocks/commerce-confirm-account/commerce-confirm-account.css @@ -0,0 +1,4 @@ +.commerce-confirm-account-container { + max-width: 700px; + margin: auto; +} diff --git a/blocks/commerce-confirm-account/commerce-confirm-account.js b/blocks/commerce-confirm-account/commerce-confirm-account.js new file mode 100644 index 0000000000..41cbbd19ef --- /dev/null +++ b/blocks/commerce-confirm-account/commerce-confirm-account.js @@ -0,0 +1,68 @@ +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ +import { SignIn } from '@dropins/storefront-auth/containers/SignIn.js'; +import { SuccessNotification } from '@dropins/storefront-auth/containers/SuccessNotification.js'; +import * as authApi from '@dropins/storefront-auth/api.js'; +import { render as authRenderer } from '@dropins/storefront-auth/render.js'; +import { Button } from '@dropins/tools/components.js'; +import { getCookie } from '../../scripts/configs.js'; + +export default async function decorate(block) { + const isAuthenticated = !!getCookie('auth_dropin_user_token'); + + if (isAuthenticated) { + window.location.href = '/customer/account'; + } else { + await authRenderer.render(SignIn, { + enableEmailConfirmation: true, + routeForgotPassword: () => '/customer/forgotpassword', + slots: { + SuccessNotification: (ctx) => { + const userName = ctx?.isSuccessful?.userName || ''; + + const elem = document.createElement('div'); + + authRenderer.render(SuccessNotification, { + labels: { + headingText: `Welcome ${userName}!`, + messageText: 'You have successfully logged in.', + }, + slots: { + SuccessNotificationActions: (innerCtx) => { + const primaryBtn = document.createElement('div'); + + authRenderer.render(Button, { + children: 'My Account', + + onClick: () => { + window.location.href = '/customer/account'; + }, + })(primaryBtn); + + innerCtx.appendChild(primaryBtn); + + const secondaryButton = document.createElement('div'); + secondaryButton.style.display = 'flex'; + secondaryButton.style.justifyContent = 'center'; + secondaryButton.style.marginTop = 'var(--spacing-xsmall)'; + + authRenderer.render(Button, { + children: 'Logout', + variant: 'tertiary', + onClick: async () => { + await authApi.revokeCustomerToken(); + window.location.href = '/'; + }, + })(secondaryButton); + + innerCtx.appendChild(secondaryButton); + }, + }, + })(elem); + + ctx.appendChild(elem); + }, + }, + })(block); + } +} diff --git a/blocks/commerce-create-account/commerce-create-account.css b/blocks/commerce-create-account/commerce-create-account.css new file mode 100644 index 0000000000..78209c252c --- /dev/null +++ b/blocks/commerce-create-account/commerce-create-account.css @@ -0,0 +1,4 @@ +.commerce-create-account-container { + max-width: 700px; + margin: auto; +} diff --git a/blocks/commerce-create-account/commerce-create-account.js b/blocks/commerce-create-account/commerce-create-account.js new file mode 100644 index 0000000000..1760aeddc5 --- /dev/null +++ b/blocks/commerce-create-account/commerce-create-account.js @@ -0,0 +1,19 @@ +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ +import { SignUp } from '@dropins/storefront-auth/containers/SignUp.js'; +import { render as authRenderer } from '@dropins/storefront-auth/render.js'; +import { getCookie } from '../../scripts/configs.js'; + +export default async function decorate(block) { + const isAuthenticated = !!getCookie('auth_dropin_user_token'); + + if (isAuthenticated) { + window.location.href = '/customer/account'; + } else { + await authRenderer.render(SignUp, { + hideCloseBtnOnEmailConfirmation: true, + routeSignIn: () => '/customer/login', + routeRedirectOnSignIn: () => '/customer/account', + })(block); + } +} diff --git a/blocks/commerce-create-password/commerce-create-password.css b/blocks/commerce-create-password/commerce-create-password.css new file mode 100644 index 0000000000..60fa3f7d66 --- /dev/null +++ b/blocks/commerce-create-password/commerce-create-password.css @@ -0,0 +1,4 @@ +.commerce-create-password-container { + max-width: 700px; + margin: auto; +} diff --git a/blocks/commerce-create-password/commerce-create-password.js b/blocks/commerce-create-password/commerce-create-password.js new file mode 100644 index 0000000000..8317f2a975 --- /dev/null +++ b/blocks/commerce-create-password/commerce-create-password.js @@ -0,0 +1,68 @@ +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ +import { UpdatePassword } from '@dropins/storefront-auth/containers/UpdatePassword.js'; +import { render as authRenderer } from '@dropins/storefront-auth/render.js'; +import { SuccessNotification } from '@dropins/storefront-auth/containers/SuccessNotification.js'; +import { Button } from '@dropins/tools/components.js'; +import * as authApi from '@dropins/storefront-auth/api.js'; +import { getCookie } from '../../scripts/configs.js'; + +export default async function decorate(block) { + const isAuthenticated = !!getCookie('auth_dropin_user_token'); + + if (isAuthenticated) { + window.location.href = '/customer/account'; + } else { + await authRenderer.render(UpdatePassword, { + routeWrongUrlRedirect: () => '/customer/login', + routeSignInPage: () => '/customer/login', + slots: { + SuccessNotification: (ctx) => { + const userName = ctx?.isSuccessful?.userName || ''; + + const elem = document.createElement('div'); + + authRenderer.render(SuccessNotification, { + labels: { + headingText: `Welcome ${userName}!`, + messageText: 'Your password has been successfully updated.', + }, + slots: { + SuccessNotificationActions: (innerCtx) => { + const primaryBtn = document.createElement('div'); + + authRenderer.render(Button, { + children: 'My Account', + + onClick: () => { + window.location.href = '/customer/account'; + }, + })(primaryBtn); + + innerCtx.appendChild(primaryBtn); + + const secondaryButton = document.createElement('div'); + secondaryButton.style.display = 'flex'; + secondaryButton.style.justifyContent = 'center'; + secondaryButton.style.marginTop = 'var(--spacing-xsmall)'; + + authRenderer.render(Button, { + children: 'Logout', + variant: 'tertiary', + onClick: async () => { + await authApi.revokeCustomerToken(); + window.location.href = '/'; + }, + })(secondaryButton); + + innerCtx.appendChild(secondaryButton); + }, + }, + })(elem); + + ctx.appendChild(elem); + }, + }, + })(block); + } +} diff --git a/blocks/commerce-empty-cart/commerce-empty-cart.css b/blocks/commerce-empty-cart/commerce-empty-cart.css new file mode 100644 index 0000000000..ff7112406e --- /dev/null +++ b/blocks/commerce-empty-cart/commerce-empty-cart.css @@ -0,0 +1 @@ +/* stylelint-disable no-empty-source */ diff --git a/blocks/commerce-empty-cart/commerce-empty-cart.js b/blocks/commerce-empty-cart/commerce-empty-cart.js new file mode 100644 index 0000000000..deeb10de59 --- /dev/null +++ b/blocks/commerce-empty-cart/commerce-empty-cart.js @@ -0,0 +1,15 @@ +import { render as provider } from '@dropins/storefront-cart/render.js'; +import EmptyCart from '@dropins/storefront-cart/containers/EmptyCart.js'; +import { readBlockConfig } from '../../scripts/aem.js'; + +export default async function decorate(block) { + const { + 'start-shopping-url': startShoppingURL = '', + } = readBlockConfig(block); + + block.innerHTML = ''; + + return provider.render(EmptyCart, { + routeCTA: startShoppingURL ? () => startShoppingURL : undefined, + })(block); +} diff --git a/blocks/commerce-forgot-password/commerce-forgot-password.css b/blocks/commerce-forgot-password/commerce-forgot-password.css new file mode 100644 index 0000000000..38b22de4bd --- /dev/null +++ b/blocks/commerce-forgot-password/commerce-forgot-password.css @@ -0,0 +1,4 @@ +.commerce-forgot-password-container { + max-width: 700px; + margin: auto; +} diff --git a/blocks/commerce-forgot-password/commerce-forgot-password.js b/blocks/commerce-forgot-password/commerce-forgot-password.js new file mode 100644 index 0000000000..1453b698c6 --- /dev/null +++ b/blocks/commerce-forgot-password/commerce-forgot-password.js @@ -0,0 +1,22 @@ +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ +import { ResetPassword } from '@dropins/storefront-auth/containers/ResetPassword.js'; +import { render as authRenderer } from '@dropins/storefront-auth/render.js'; +import { events } from '@dropins/tools/event-bus.js'; +import { getCookie } from '../../scripts/configs.js'; + +export default async function decorate(block) { + const isAuthenticated = !!getCookie('auth_dropin_user_token'); + + if (isAuthenticated) { + window.location.href = '/customer/account'; + } else { + await authRenderer.render(ResetPassword, { + routeSignIn: () => '/customer/login', + })(block); + } + + events.on('authenticated', (authenticated) => { + if (authenticated) window.location.href = '/customer/account'; + }); +} diff --git a/blocks/commerce-login/commerce-login.css b/blocks/commerce-login/commerce-login.css index 3d8a3f1b50..445ea0c80b 100644 --- a/blocks/commerce-login/commerce-login.css +++ b/blocks/commerce-login/commerce-login.css @@ -1 +1,5 @@ -/* stylelint-disable no-empty-source */ \ No newline at end of file +main .commerce-login-container { + max-width: 700px; + margin: 40px auto; + width: 100%; +} diff --git a/blocks/commerce-login/commerce-login.js b/blocks/commerce-login/commerce-login.js index 30c1e4ce8c..71e92bc28c 100644 --- a/blocks/commerce-login/commerce-login.js +++ b/blocks/commerce-login/commerce-login.js @@ -1,13 +1,18 @@ -import { readBlockConfig } from '../../scripts/aem.js'; +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ +import { SignIn } from '@dropins/storefront-auth/containers/SignIn.js'; +import { render as authRenderer } from '@dropins/storefront-auth/render.js'; +import { getCookie } from '../../scripts/configs.js'; -export default function decorate(block) { - const config = readBlockConfig(block); +export default async function decorate(block) { + const isAuthenticated = !!getCookie('auth_dropin_user_token'); - const content = document.createRange().createContextualFragment(`
    - Commerce Account dropin (Login) -
    ${JSON.stringify(config, null, 2)}
    -
    `); - - block.textContent = ''; - block.append(content); + if (isAuthenticated) { + window.location.href = '/customer/account'; + } else { + await authRenderer.render(SignIn, { + routeForgotPassword: () => '/customer/forgotpassword', + routeRedirectOnSignIn: () => '/customer/account', + })(block); + } } diff --git a/blocks/commerce-mini-cart/commerce-mini-cart.css b/blocks/commerce-mini-cart/commerce-mini-cart.css new file mode 100644 index 0000000000..ff7112406e --- /dev/null +++ b/blocks/commerce-mini-cart/commerce-mini-cart.css @@ -0,0 +1 @@ +/* stylelint-disable no-empty-source */ diff --git a/blocks/commerce-mini-cart/commerce-mini-cart.js b/blocks/commerce-mini-cart/commerce-mini-cart.js new file mode 100644 index 0000000000..d940012a64 --- /dev/null +++ b/blocks/commerce-mini-cart/commerce-mini-cart.js @@ -0,0 +1,20 @@ +import { render as provider } from '@dropins/storefront-cart/render.js'; +import MiniCart from '@dropins/storefront-cart/containers/MiniCart.js'; +import { readBlockConfig } from '../../scripts/aem.js'; + +export default async function decorate(block) { + const { + 'start-shopping-url': startShoppingURL = '', + 'cart-url': cartURL = '', + 'checkout-url': checkoutURL = '', + } = readBlockConfig(block); + + block.innerHTML = ''; + + return provider.render(MiniCart, { + routeEmptyCartCTA: startShoppingURL ? () => startShoppingURL : undefined, + routeCart: cartURL ? () => cartURL : undefined, + routeCheckout: checkoutURL ? () => checkoutURL : undefined, + routeProduct: (product) => `/products/${product.url.urlKey}/${product.sku}`, + })(block); +} diff --git a/blocks/commerce-order-confirmation/commerce-order-confirmation.css b/blocks/commerce-order-confirmation/commerce-order-confirmation.css new file mode 100644 index 0000000000..3d8a3f1b50 --- /dev/null +++ b/blocks/commerce-order-confirmation/commerce-order-confirmation.css @@ -0,0 +1 @@ +/* stylelint-disable no-empty-source */ \ No newline at end of file diff --git a/blocks/commerce-order-confirmation/commerce-order-confirmation.js b/blocks/commerce-order-confirmation/commerce-order-confirmation.js new file mode 100644 index 0000000000..ae4a9248a7 --- /dev/null +++ b/blocks/commerce-order-confirmation/commerce-order-confirmation.js @@ -0,0 +1,55 @@ +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ + +// Dropin Tools +import { events } from '@dropins/tools/event-bus.js'; +import { initializers } from '@dropins/tools/initializer.js'; + +// Order Confirmation Dropin Modules +import * as orderConfirmationApi from '@dropins/storefront-order-confirmation/api.js'; +import { render as provider } from '@dropins/storefront-order-confirmation/render.js'; +import OrderConfirmation from '@dropins/storefront-order-confirmation/containers/OrderConfirmation.js'; + +// Auth Dropin Modules +import { render as authProvider } from '@dropins/storefront-auth/render.js'; +import SignUp from '@dropins/storefront-auth/containers/SignUp.js'; + +import { createModal } from '../modal/modal.js'; + +export default async function decorate(block) { + let modal = null; + + // Initialize Dropins + initializers.register(orderConfirmationApi.initialize, {}); + + events.on('authenticated', (isAuthenticated) => { + if (isAuthenticated && modal) { + modal.removeModal(); + modal = null; + } + }); + + const onSignUpClick = async ({ inputsDefaultValueSet, addressesData }) => { + const signUpForm = document.createElement('div'); + + authProvider.render(SignUp, { + routeSignIn: () => '/customer/login', + routeRedirectOnEmailConfirmationClose: () => '/customer/account', + inputsDefaultValueSet, + addressesData, + })(signUpForm); + + modal = await createModal([signUpForm]); + modal.showModal(); + }; + + const params = new URLSearchParams(window.location.search); + const orderRef = params.get('orderRef'); + + return provider.render(OrderConfirmation, { + orderRef, + onSignUpClick, + routeHome: () => '/', + routeSupport: () => '/support', + })(block); +} diff --git a/blocks/fragment/fragment.js b/blocks/fragment/fragment.js index 9d9195c504..ed8ba22f6d 100644 --- a/blocks/fragment/fragment.js +++ b/blocks/fragment/fragment.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-cycle */ /* * Fragment Block * Include content on a page as a fragment. diff --git a/blocks/header/header.css b/blocks/header/header.css index 287a932d48..7062a61e8b 100644 --- a/blocks/header/header.css +++ b/blocks/header/header.css @@ -4,18 +4,19 @@ header .nav-wrapper { background-color: var(--background-color); width: 100%; - z-index: 2; + z-index: 3; position: fixed; + border-bottom: 1px solid var(--color-neutral-300); } header nav { box-sizing: border-box; display: grid; grid-template: - 'hamburger brand tools' var(--nav-height) - 'sections sections sections' 1fr / auto 1fr auto; + 'hamburger brand tools wrapperPopUpButton' var(--nav-height) + 'sections sections sections ...' 1fr / auto 1fr auto auto; align-items: center; - gap: 0 24px; + gap: 0 16px; margin: auto; max-width: 1248px; height: var(--nav-height); @@ -52,10 +53,6 @@ header nav p { line-height: 1; } -header nav a:any-link { - color: currentcolor; -} - /* hamburger */ header nav .nav-hamburger { grid-area: hamburger; @@ -265,23 +262,61 @@ header nav .nav-sections ul > li > ul > li { } /* tools */ +header nav .nav-tools-panel { + z-index: 100; + position: absolute; + box-shadow: var(--shape-shadow-2); + background: var(--background-color); + top: var(--nav-height); + right: 0; + width: 100%; + display: none; + box-sizing: border-box; +} + +header nav .nav-tools-panel--show { + display: block; +} + header nav .nav-tools { grid-area: tools; display: flex; - gap: 10px; + height: 100%; + gap: var(--spacing-small); + align-items: center; } -header nav .nav-tools > button, header nav .nav-tools .minicart-wrapper > button { +header nav .nav-tools-wrapper > button { color: var(--color-brand-700); background: transparent; - padding: 5px 10px; + padding: 10px; + border: unset; + cursor: pointer; + height: 40px; + width: 40px; } header nav .nav-tools button.nav-cart-button { background-image: url('../../icons/cart.svg'); background-repeat: no-repeat; - background-position: left center; - padding-left: 27px; + background-position: center; + position: relative; +} + +header nav .nav-tools button.nav-cart-button[data-count]::after { + content: attr(data-count); + position: absolute; + top: 0; + right: -2px; + background-color: var(--color-brand-700); + color: var(--color-neutral-100); + border-radius: 50%; + width: 1.75em; + height: 1.75em; + display: flex; + align-items: center; + font-size: 0.8em; + justify-content: center; } header nav .nav-tools button.nav-search-button { @@ -289,27 +324,34 @@ header nav .nav-tools button.nav-search-button { background-image: url('../../icons/search.svg'); background-repeat: no-repeat; background-position: center; - padding: 5px 15px; } -header .nav-search-input { - position: absolute; - z-index: 99; - top: var(--nav-height); - box-shadow: var(--shape-shadow-2); - background: var(--color-neutral-50); - left: 0; - right: 0; - padding: 20px; +header .nav-search-panel { + padding: var(--spacing-small); } -header .nav-search-input.hidden { - display: none; +header .nav-search-panel input { + width: 100%; + padding: 10px; + box-sizing: border-box; + font: var(--type-headline-2-default-font); + letter-spacing: var(--type-headline-2-default-letter-spacing); + border: 1px solid currentcolor; + appearance: none; } -header .nav-search-input input { - width: 100%; - padding: 5px; +/* Mini Cart */ + +.cart-mini-cart:not(:has(.cart-empty-cart)) { + max-height: 760px; + min-height: 360px; +} + +/* If viewport height is below max, set max height to 90% of viewport */ +@media (height < 820px) { + .cart-mini-cart:not(:has(.cart-empty-cart)) { + max-height: calc(100vh - var(--nav-height)); + } } header .nav-search-input .search_autocomplete .popover-container { @@ -317,12 +359,137 @@ header .nav-search-input .search_autocomplete .popover-container { } @media (width >= 1024px) { - header .nav-search-input { - left: unset; - right: 20px; + header nav .nav-tools-wrapper { + position: relative; + } + + header nav .nav-tools-panel { + top: calc(-12px + var(--nav-height)); + } + + header nav .minicart-panel { + width: 398px; } - header .nav-search-input input { - min-width: 400px; + header nav .nav-search-panel { + width: 398px; } } + +/* TODO - CSS for authCombine demo (Auth Drop-In) */ +#auth-combine-modal { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0 0 0 / 50%); + display: flex; + justify-content: center; + align-items: center; + z-index: 10; + overflow-y: auto; + padding: 10px 0; + box-sizing: border-box; +} + +#auth-combine-wrapper { + background-color: white; + border-radius: var(--shape-border-radius-2); + width: 100%; + max-width: 800px; + min-height: max-content; + margin: 0 10px; + box-sizing: border-box; + max-height: 90vh; + overflow-y: auto; + + @supports (height: 90svh) { + max-height: 90svh; + } +} + +/* TODO - CSS for auth dropdown demo (Auth Drop-In) */ + +.dropdown-wrapper.nav-tools-wrapper .nav-dropdown-button { + font: var(--type-body-1-default-font) !important; + letter-spacing: var(--type-body-1-default-letter-spacing) !important; + background-color: transparent; + margin: 0; + padding: 0; + border: 0; + display: flex; + justify-content: center; + align-items: center; + width: auto; + min-width: 40px; +} + +.dropdown-wrapper.nav-tools-wrapper .nav-auth-menu-panel { + font: var(--type-body-1-default-font) !important; + letter-spacing: var(--type-body-1-default-letter-spacing) !important; + width: 100%; +} + +@media (width >= 1024px) { + .dropdown-wrapper.nav-tools-wrapper .nav-auth-menu-panel { + width: 398px; + } +} + +.dropdown-wrapper.nav-tools-wrapper .nav-auth-menu-panel .authenticated-user-menu { + list-style: none; + cursor: pointer; + padding: 0; + margin: 0; + overflow: hidden; +} + +.dropdown-wrapper.nav-tools-wrapper .nav-auth-menu-panel .authenticated-user-menu li { + display: flex; + justify-content: space-between; + align-items: center; +} + +.dropdown-wrapper.nav-tools-wrapper .nav-auth-menu-panel .authenticated-user-menu li > a { + padding: 12px 15px; + display: inline-block; + width: 100%; + text-decoration: none; +} + +.dropdown-wrapper.nav-tools-wrapper .nav-auth-menu-panel .authenticated-user-menu li > a:hover, +.dropdown-wrapper.nav-tools-wrapper + .nav-auth-menu-panel + .authenticated-user-menu + li + > .logoutButton:hover { + background-color: lightgray; +} + +.dropdown-wrapper.nav-tools-wrapper .nav-auth-menu-panel .authenticated-user-menu li button { + cursor: pointer; + background-color: transparent !important; + color: currentcolor !important; + padding: 12px 15px !important; + display: inline-block !important; + width: 100% !important; + text-decoration: none !important; + font: var(--type-body-1-strong-font) !important; + letter-spacing: var(--type-body-1-strong-letter-spacing) !important; + margin: 0 !important; + text-align: start !important; + box-sizing: border-box !important; + border: none !important; + border-radius: 0 !important; +} + +.dropdown-wrapper.nav-tools-wrapper .nav-auth-menu-panel .authenticated-user-menu li button:hover { + background-color: lightgray !important; + border-radius: 0 !important; +} + +.grecaptcha-badge { + margin-top: 20px; + z-index: 3; +} diff --git a/blocks/header/header.js b/blocks/header/header.js index a1b6d1ea7f..d14b10c52e 100644 --- a/blocks/header/header.js +++ b/blocks/header/header.js @@ -1,7 +1,15 @@ -import { cartApi } from '../../scripts/minicart/api.js'; +/* eslint-disable import/no-unresolved */ + +// Drop-in Tools +import { events } from '@dropins/tools/event-bus.js'; + import { getMetadata } from '../../scripts/aem.js'; import { loadFragment } from '../fragment/fragment.js'; +// TODO: Following two imports added for demo purpose (Auth Drop-In) +import renderAuthCombine from './renderAuthCombine.js'; +import { renderAuthDropdown } from './renderAuthDropdown.js'; + // media query match that indicates mobile/tablet width const isDesktop = window.matchMedia('(min-width: 900px)'); @@ -58,9 +66,11 @@ function focusNavSection() { * @param {Boolean} expanded Whether the element should be expanded or collapsed */ function toggleAllNavSections(sections, expanded = false) { - sections.querySelectorAll('.nav-sections .default-content-wrapper > ul > li').forEach((section) => { - section.setAttribute('aria-expanded', expanded); - }); + sections + .querySelectorAll('.nav-sections .default-content-wrapper > ul > li') + .forEach((section) => { + section.setAttribute('aria-expanded', expanded); + }); } /** @@ -72,7 +82,7 @@ function toggleAllNavSections(sections, expanded = false) { function toggleMenu(nav, navSections, forceExpanded = null) { const expanded = forceExpanded !== null ? !forceExpanded : nav.getAttribute('aria-expanded') === 'true'; const button = nav.querySelector('.nav-hamburger button'); - document.body.style.overflowY = (expanded || isDesktop.matches) ? '' : 'hidden'; + document.body.style.overflowY = expanded || isDesktop.matches ? '' : 'hidden'; nav.setAttribute('aria-expanded', expanded ? 'false' : 'true'); toggleAllNavSections(navSections, expanded || isDesktop.matches ? 'false' : 'true'); button.setAttribute('aria-label', expanded ? 'Open navigation' : 'Close navigation'); @@ -135,47 +145,114 @@ export default async function decorate(block) { const navSections = nav.querySelector('.nav-sections'); if (navSections) { - navSections.querySelectorAll(':scope .default-content-wrapper > ul > li').forEach((navSection) => { - if (navSection.querySelector('ul')) navSection.classList.add('nav-drop'); - navSection.addEventListener('click', () => { - if (isDesktop.matches) { - const expanded = navSection.getAttribute('aria-expanded') === 'true'; - toggleAllNavSections(navSections); - navSection.setAttribute('aria-expanded', expanded ? 'false' : 'true'); - } + navSections + .querySelectorAll(':scope .default-content-wrapper > ul > li') + .forEach((navSection) => { + if (navSection.querySelector('ul')) navSection.classList.add('nav-drop'); + navSection.addEventListener('click', () => { + if (isDesktop.matches) { + const expanded = navSection.getAttribute('aria-expanded') === 'true'; + toggleAllNavSections(navSections); + navSection.setAttribute('aria-expanded', expanded ? 'false' : 'true'); + } + }); }); - }); } const navTools = nav.querySelector('.nav-tools'); - // Minicart - const minicartButton = document.createRange().createContextualFragment(`
    - -
    -
    `); - navTools.append(minicartButton); - navTools.querySelector('.nav-cart-button').addEventListener('click', () => { - cartApi.toggleCart(); - }); - cartApi.cartItemsQuantity.watch((quantity) => { - navTools.querySelector('.nav-cart-button').textContent = quantity; + /** Mini Cart */ + const excludeMiniCartFromPaths = ['/checkout', '/order-confirmation']; + + const minicart = document.createRange().createContextualFragment(` + + `); + + navTools.append(minicart); + + const minicartPanel = navTools.querySelector('.minicart-panel'); + + const cartButton = navTools.querySelector('.nav-cart-button'); + + if (excludeMiniCartFromPaths.includes(window.location.pathname)) { + cartButton.style.display = 'none'; + } + + // load nav as fragment + const miniCartMeta = getMetadata('mini-cart'); + const miniCartPath = miniCartMeta ? new URL(miniCartMeta, window.location).pathname : '/mini-cart'; + loadFragment(miniCartPath).then((miniCartFragment) => { + minicartPanel.append(miniCartFragment.firstElementChild); }); - // Search - const searchInput = document.createRange().createContextualFragment(` + `); + + navTools.append(search); + + const searchPanel = navTools.querySelector('.nav-search-panel'); + + const searchButton = navTools.querySelector('.nav-search-button'); + + const searchInput = searchPanel.querySelector('input'); + + async function toggleSearch(state) { + const show = state ?? !searchPanel.classList.contains('nav-tools-panel--show'); + + searchPanel.classList.toggle('nav-tools-panel--show', show); + + if (show) { + await import('./searchbar.js'); + searchInput.focus(); + } + } + + navTools.querySelector('.nav-search-button').addEventListener('click', () => toggleSearch()); + + // Close panels when clicking outside + document.addEventListener('click', (e) => { + if (!minicartPanel.contains(e.target) && !cartButton.contains(e.target)) { + toggleMiniCart(false); + } + + if (!searchPanel.contains(e.target) && !searchButton.contains(e.target)) { + toggleSearch(false); + } }); // hamburger for mobile @@ -195,4 +272,8 @@ export default async function decorate(block) { navWrapper.className = 'nav-wrapper'; navWrapper.append(nav); block.append(navWrapper); + + // TODO: Following statements added for demo purpose (Auth Drop-In) + renderAuthCombine(navSections); + renderAuthDropdown(navTools); } diff --git a/blocks/header/renderAuthCombine.js b/blocks/header/renderAuthCombine.js new file mode 100644 index 0000000000..5b1226dd2f --- /dev/null +++ b/blocks/header/renderAuthCombine.js @@ -0,0 +1,223 @@ +/* eslint-disable implicit-arrow-linebreak */ +// TODO - This module supposed to add link to authCombine container for demo purposes +/* eslint-disable import/no-unresolved */ +/* eslint-disable import/no-extraneous-dependencies */ +import { render as authRenderer } from '@dropins/storefront-auth/render.js'; +import { AuthCombine } from '@dropins/storefront-auth/containers/AuthCombine.js'; +import { SuccessNotification } from '@dropins/storefront-auth/containers/SuccessNotification.js'; +import * as authApi from '@dropins/storefront-auth/api.js'; +import { events } from '@dropins/tools/event-bus.js'; +import { Button } from '@dropins/tools/components.js'; +import { getCookie } from '../../scripts/configs.js'; + +const signInFormConfig = { + renderSignUpLink: true, + routeForgotPassword: () => '/customer/forgotpassword', + slots: { + SuccessNotification: (ctx) => { + const userName = ctx?.isSuccessful?.userName || ''; + + const elem = document.createElement('div'); + + authRenderer.render(SuccessNotification, { + labels: { + headingText: `Welcome ${userName}!`, + messageText: 'You have successfully logged in.', + }, + slots: { + SuccessNotificationActions: (innerCtx) => { + const primaryBtn = document.createElement('div'); + + authRenderer.render(Button, { + children: 'My Account', + + onClick: () => { + window.location.href = '/customer/account'; + }, + })(primaryBtn); + + innerCtx.appendChild(primaryBtn); + + const secondaryButton = document.createElement('div'); + secondaryButton.style.display = 'flex'; + secondaryButton.style.justifyContent = 'center'; + secondaryButton.style.marginTop = 'var(--spacing-xsmall)'; + + authRenderer.render(Button, { + children: 'Logout', + variant: 'tertiary', + onClick: async () => { + await authApi.revokeCustomerToken(); + window.location.href = '/'; + }, + })(secondaryButton); + + innerCtx.appendChild(secondaryButton); + }, + }, + })(elem); + + ctx.appendChild(elem); + }, + }, +}; + +const signUpFormConfig = { + routeSignIn: () => '/customer/login', + routeRedirectOnSignIn: () => '/customer/account', + isAutoSignInEnabled: false, + slots: { + SuccessNotification: (ctx) => { + const elem = document.createElement('div'); + + authRenderer.render(SuccessNotification, { + labels: { + headingText: 'Your account has been successfully created!', + messageText: 'You can login using sign-in page now.', + }, + slots: { + SuccessNotificationActions: (innerCtx) => { + const primaryBtn = document.createElement('div'); + + authRenderer.render(Button, { + children: 'Sign in', + + onClick: () => { + window.location.href = '/customer/login'; + }, + })(primaryBtn); + + innerCtx.appendChild(primaryBtn); + + const secondaryButton = document.createElement('div'); + secondaryButton.style.display = 'flex'; + secondaryButton.style.justifyContent = 'center'; + secondaryButton.style.marginTop = 'var(--spacing-xsmall)'; + + authRenderer.render(Button, { + children: 'Home', + variant: 'tertiary', + onClick: () => { + window.location.href = '/'; + }, + })(secondaryButton); + + innerCtx.appendChild(secondaryButton); + }, + }, + })(elem); + + ctx.appendChild(elem); + }, + }, +}; + +const resetPasswordFormConfig = { + routeSignIn: () => '/customer/login', +}; + +const onHeaderLinkClick = () => { + const viewportMeta = document.querySelector('meta[name="viewport"]'); + const originalViewportContent = viewportMeta.getAttribute('content'); + + if (getCookie('auth_dropin_firstname')) { + window.location.href = '/customer/account'; + return; + } + const signInModal = document.createElement('div'); + document.body.style.overflow = 'hidden'; + viewportMeta.setAttribute( + 'content', + 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no', + ); + + signInModal.setAttribute('id', 'auth-combine-modal'); + signInModal.classList.add('auth-combine-modal-overlay'); + + const closeModalWindow = (event) => { + if ((event.key === 'Escape' || event.key === 'Esc') && event.target.nodeName === 'BODY') { + signInModal.remove(); + } + }; + + window.addEventListener('keydown', closeModalWindow); + + signInModal.onclick = () => { + signInModal.remove(); + document.body.style.overflow = 'auto'; + viewportMeta.setAttribute('content', originalViewportContent); + }; + + const signInForm = document.createElement('div'); + signInForm.setAttribute('id', 'auth-combine-wrapper'); + signInForm.onclick = (event) => { + event.stopPropagation(); + }; + + signInModal.appendChild(signInForm); + document.body.appendChild(signInModal); + + authRenderer.render(AuthCombine, { + signInFormConfig, + signUpFormConfig, + resetPasswordFormConfig, + })(signInForm); +}; + +const renderAuthCombine = (navSections) => { + if (getCookie('auth_dropin_firstname')) return; + + const navListEl = navSections.querySelector('.default-content-wrapper > ul'); + + const test = document.createElement('li'); + test.classList.add('authCombineNavElement'); + test.innerText = 'Combined Auth'; + test.addEventListener('click', () => { + onHeaderLinkClick(); + + function getPopupElements() { + const headerBlock = document.querySelector('.header.block'); + const headerLoginButton = document.querySelector('#header-login-button'); + const popupElement = document.querySelector('#popup-menu'); + const popupMenuContainer = document.querySelector('.popupMenuContainer'); + + return { + headerBlock, + headerLoginButton, + popupElement, + popupMenuContainer, + }; + } + + events.on('authenticated', (isAuthenticated) => { + const authCombineNavElement = document.querySelector('.authCombineNavElement'); + if (isAuthenticated) { + const { headerLoginButton, popupElement, popupMenuContainer } = getPopupElements(); + + if (!authCombineNavElement || !headerLoginButton || !popupElement || !popupMenuContainer) { + return; + } + + authCombineNavElement.style.display = 'none'; + popupMenuContainer.innerHTML = ''; + popupElement.style.minWidth = '250px'; + if (headerLoginButton) { + const spanElementText = headerLoginButton.querySelector('span'); + spanElementText.textContent = `Hi, ${getCookie('auth_dropin_firstname')}`; + } + popupMenuContainer.insertAdjacentHTML( + 'afterend', + ``, + ); + } + }); + }); + + navListEl.appendChild(test); +}; + +export default renderAuthCombine; diff --git a/blocks/header/renderAuthDropdown.js b/blocks/header/renderAuthDropdown.js new file mode 100644 index 0000000000..3fc982ad21 --- /dev/null +++ b/blocks/header/renderAuthDropdown.js @@ -0,0 +1,104 @@ +/* eslint-disable import/prefer-default-export */ +import * as authApi from '@dropins/storefront-auth/api.js'; +import { render as authRenderer } from '@dropins/storefront-auth/render.js'; +import { SignIn } from '@dropins/storefront-auth/containers/SignIn.js'; +import { events } from '@dropins/tools/event-bus.js'; +import { getCookie } from '../../scripts/configs.js'; + +function checkAndRedirect(checkUrl, redirectUrl) { + // If the user is on the dashboard page and initiates logout, + // they will be redirected to the login page. + const currentUrl = window.location.pathname; + + if (currentUrl.includes(checkUrl)) { + window.location.href = `${window.location.origin}${redirectUrl}`; + } +} + +function renderSignIn(element) { + authRenderer.render(SignIn, { + onSuccessCallback: () => {}, + formSize: 'small', + routeForgotPassword: () => '/customer/forgotpassword', + })(element); +} + +export function renderAuthDropdown(navTools) { + const dropdownElement = document.createRange().createContextualFragment(` + `); + + navTools.append(dropdownElement); + + const authDropDownPanel = navTools.querySelector('.nav-auth-menu-panel'); + const authDropDownMenuList = navTools.querySelector('.authenticated-user-menu'); + const authDropinContainer = navTools.querySelector('#auth-dropin-container'); + const loginButton = navTools.querySelector('.nav-dropdown-button'); + const logoutButtonElement = navTools.querySelector('.authenticated-user-menu > li > button'); + + authDropDownPanel.addEventListener('click', (e) => e.stopPropagation()); + + async function toggleDropDownAuthMenu(state) { + const show = state ?? !authDropDownPanel.classList.contains('nav-tools-panel--show'); + + authDropDownPanel.classList.toggle('nav-tools-panel--show', show); + } + + loginButton.addEventListener('click', () => toggleDropDownAuthMenu()); + document.addEventListener('click', async (e) => { + const clickOnDropDownPanel = authDropDownPanel.contains(e.target); + const clickOnLoginButton = loginButton.contains(e.target); + + if (!clickOnDropDownPanel && !clickOnLoginButton) { + await toggleDropDownAuthMenu(false); + } + }); + + logoutButtonElement.addEventListener('click', async () => { + await authApi.revokeCustomerToken(); + checkAndRedirect('/customer/account', '/customer/login'); + }); + + renderSignIn(authDropinContainer); + + const updateDropDownUI = (isAuthenticated) => { + const getUserTokenCookie = getCookie('auth_dropin_user_token'); + const getUserNameCookie = getCookie('auth_dropin_firstname'); + + if (isAuthenticated || getUserTokenCookie) { + authDropDownMenuList.style.display = 'block'; + authDropinContainer.style.display = 'none'; + loginButton.textContent = `Hi, ${getUserNameCookie}`; + } else { + authDropDownMenuList.style.display = 'none'; + authDropinContainer.style.display = 'block'; + loginButton.innerHTML = ` + + + + + `; + } + }; + + events.on('authenticated', (isAuthenticated) => { + updateDropDownUI(isAuthenticated); + }); + + updateDropDownUI(); +} diff --git a/blocks/modal/modal.css b/blocks/modal/modal.css new file mode 100644 index 0000000000..aaea130c3a --- /dev/null +++ b/blocks/modal/modal.css @@ -0,0 +1,53 @@ +body.modal-open { + overflow: hidden; + } + + .modal dialog { + --dialog-border-radius: 16px; + + overscroll-behavior: none; + border: 1px solid #ccc; + border-radius: var(--dialog-border-radius); + width: 100vw; + } + + .modal dialog .modal-content { + overflow-y: auto; + overscroll-behavior: none; + max-height: calc(100dvh - 60px); + } + + @media (width >= 600px) { + .modal dialog { + padding: 30px; + width: 80vw; + max-width: 700px; + } + + .modal dialog .modal-content { + max-height: calc(100vh - 90px); + } + } + + .modal dialog::backdrop { + background-color: rgb(0 0 0 / 50%); + } + + .modal .close-button { + position: absolute; + top: 0; + right: 0; + width: 20px; + height: 100%; + max-height: 54px; + border-radius: 0 var(--dialog-border-radius) 0 0; + background-color: unset; + text-overflow: clip; + margin: 0; + border: none; + padding-right: 30px; + } + + .modal dialog .section { + padding: 0; + } \ No newline at end of file diff --git a/blocks/modal/modal.js b/blocks/modal/modal.js new file mode 100644 index 0000000000..3867ca8cea --- /dev/null +++ b/blocks/modal/modal.js @@ -0,0 +1,69 @@ +import { loadFragment } from '../fragment/fragment.js'; +import { + buildBlock, decorateBlock, decorateIcons, loadBlock, loadCSS, +} from '../../scripts/aem.js'; + +// This is not a traditional block, so there is no decorate function. Instead, links to +// a */modals/* path are automatically transformed into a modal. Other blocks can also use +// the createModal() and openModal() functions. + +export async function createModal(contentNodes) { + await loadCSS(`${window.hlx.codeBasePath}/blocks/modal/modal.css`); + const dialog = document.createElement('dialog'); + const dialogContent = document.createElement('div'); + dialogContent.classList.add('modal-content'); + dialogContent.append(...contentNodes); + dialog.append(dialogContent); + + const closeButton = document.createElement('button'); + closeButton.classList.add('close-button'); + closeButton.setAttribute('aria-label', 'Close'); + closeButton.type = 'button'; + closeButton.innerHTML = ''; + closeButton.addEventListener('click', () => dialog.close()); + dialog.append(closeButton); + + // close dialog on clicks outside the dialog. https://stackoverflow.com/a/70593278/79461 + dialog.addEventListener('click', (event) => { + const dialogDimensions = dialog.getBoundingClientRect(); + if (event.clientX < dialogDimensions.left || event.clientX > dialogDimensions.right + || event.clientY < dialogDimensions.top || event.clientY > dialogDimensions.bottom) { + dialog.close(); + } + }); + + const block = buildBlock('modal', ''); + document.querySelector('main').append(block); + decorateBlock(block); + await loadBlock(block); + decorateIcons(closeButton); + + dialog.addEventListener('close', () => { + document.body.classList.remove('modal-open'); + block.remove(); + }); + + block.append(dialog); + return { + block, + removeModal: () => dialog.close(), + showModal: () => { + dialog.showModal(); + // Google Chrome restores the scroll position when the dialog is reopened, + // so we need to reset it. + setTimeout(() => { dialogContent.scrollTop = 0; }, 0); + + document.body.classList.add('modal-open'); + }, + }; +} + +export async function openModal(fragmentUrl) { + const path = fragmentUrl.startsWith('http') + ? new URL(fragmentUrl, window.location).pathname + : fragmentUrl; + + const fragment = await loadFragment(path); + const { showModal } = await createModal(fragment.childNodes); + showModal(); +} diff --git a/blocks/product-details-custom/ProductDetailsCarousel.js b/blocks/product-details-custom/ProductDetailsCarousel.js index fc498eb026..ab60958f6a 100644 --- a/blocks/product-details-custom/ProductDetailsCarousel.js +++ b/blocks/product-details-custom/ProductDetailsCarousel.js @@ -101,11 +101,6 @@ export default class Carousel extends Component { render() { this.getImages(); - if (!this.images || !this.thumbnailImages) { - this.images = [`${window.origin}/${this.props.productImageFolder}/${this.props.sku}.jpg`]; - this.thumbnailImages = []; - } - return html` \n );\n}\n\nlet _ProgressBarBase = React.forwardRef(ProgressBarBase);\nexport {_ProgressBarBase as ProgressBarBase};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {clamp} from '@react-aria/utils';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport React, {CSSProperties} from 'react';\nimport {SpectrumProgressCircleProps} from '@react-types/progress';\nimport styles from '@adobe/spectrum-css-temp/components/circleloader/vars.css';\nimport {useProgressBar} from '@react-aria/progress';\n\nfunction ProgressCircle(props: SpectrumProgressCircleProps, ref: DOMRef) {\n let {\n value = 0,\n minValue = 0,\n maxValue = 100,\n size = 'M',\n staticColor,\n variant,\n isIndeterminate = false,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n } = props;\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n value = clamp(value, minValue, maxValue);\n let {progressBarProps} = useProgressBar({...props, value});\n\n let subMask1Style: CSSProperties = {};\n let subMask2Style: CSSProperties = {};\n if (!isIndeterminate) {\n let percentage = (value - minValue) / (maxValue - minValue) * 100;\n let angle;\n if (percentage > 0 && percentage <= 50) {\n angle = -180 + (percentage / 50 * 180);\n subMask1Style.transform = `rotate(${angle}deg)`;\n subMask2Style.transform = 'rotate(-180deg)';\n } else if (percentage > 50) {\n angle = -180 + (percentage - 50) / 50 * 180;\n subMask1Style.transform = 'rotate(0deg)';\n subMask2Style.transform = `rotate(${angle}deg)`;\n }\n }\n\n if (!ariaLabel && !ariaLabelledby) {\n console.warn('ProgressCircle requires an aria-label or aria-labelledby attribute for accessibility');\n }\n\n return (\n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n );\n}\n\n/**\n * ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.\n * They can represent determinate or indeterminate progress.\n */\nlet _ProgressCircle = React.forwardRef(ProgressCircle);\nexport {_ProgressCircle as ProgressCircle};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","import {filterDOMProps as $e3Dei$filterDOMProps, clamp as $e3Dei$clamp, mergeProps as $e3Dei$mergeProps} from \"@react-aria/utils\";\nimport {useLabel as $e3Dei$useLabel} from \"@react-aria/label\";\nimport {useNumberFormatter as $e3Dei$useNumberFormatter} from \"@react-aria/i18n\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nfunction $204d9ebcedfb8806$export$ed5abd763a836edc(props) {\n let { value: value = 0, minValue: minValue = 0, maxValue: maxValue = 100, valueLabel: valueLabel, isIndeterminate: isIndeterminate, formatOptions: formatOptions = {\n style: \"percent\"\n } } = props;\n let domProps = (0, $e3Dei$filterDOMProps)(props, {\n labelable: true\n });\n let { labelProps: labelProps, fieldProps: fieldProps } = (0, $e3Dei$useLabel)({\n ...props,\n // Progress bar is not an HTML input element so it\n // shouldn't be labeled by a
    , use a hidden input so the value can be submitted to a server.\n // If the collection isn't too big, use a hidden .\n if (state.collection.size <= 300) return /*#__PURE__*/ (0, $thkiX$react).createElement(\"div\", {\n ...containerProps,\n \"data-testid\": \"hidden-select-container\"\n }, /*#__PURE__*/ (0, $thkiX$react).createElement(\"input\", inputProps), /*#__PURE__*/ (0, $thkiX$react).createElement(\"label\", null, label, /*#__PURE__*/ (0, $thkiX$react).createElement(\"select\", {\n ...selectProps,\n ref: selectRef\n }, /*#__PURE__*/ (0, $thkiX$react).createElement(\"option\", null), [\n ...state.collection.getKeys()\n ].map((key)=>{\n let item = state.collection.getItem(key);\n if (item.type === \"item\") return /*#__PURE__*/ (0, $thkiX$react).createElement(\"option\", {\n key: item.key,\n value: item.key\n }, item.textValue);\n }))));\n else if (name) return /*#__PURE__*/ (0, $thkiX$react).createElement(\"input\", {\n type: \"hidden\",\n autoComplete: selectProps.autoComplete,\n name: name,\n disabled: isDisabled,\n value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : \"\"\n });\n return null;\n}\n\n\n\n\nexport {$58aed456727eb0f3$export$e64b2f635402ca43 as useSelect, $bdd25dc72710631f$export$f809e80f58e251d1 as useHiddenSelect, $bdd25dc72710631f$export$cbd84cdb2e668835 as HiddenSelect};\n//# sourceMappingURL=module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useSelect} from './useSelect';\nexport {useHiddenSelect, HiddenSelect} from './HiddenSelect';\nexport type {AriaSelectOptions, SelectAria} from './useSelect';\nexport type {AriaHiddenSelectProps, HiddenSelectProps} from './HiddenSelect';\nexport type {AriaSelectProps} from '@react-types/select';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from '@react-types/button';\nimport {AriaListBoxOptions} from '@react-aria/listbox';\nimport {AriaSelectProps} from '@react-types/select';\nimport {chain, filterDOMProps, mergeProps, useId} from '@react-aria/utils';\nimport {DOMAttributes, FocusableElement, KeyboardDelegate} from '@react-types/shared';\nimport {FocusEvent, RefObject, useMemo} from 'react';\nimport {ListKeyboardDelegate, useTypeSelect} from '@react-aria/selection';\nimport {SelectState} from '@react-stately/select';\nimport {setInteractionModality} from '@react-aria/interactions';\nimport {useCollator} from '@react-aria/i18n';\nimport {useField} from '@react-aria/label';\nimport {useMenuTrigger} from '@react-aria/menu';\n\nexport interface AriaSelectOptions extends Omit, 'children'> {\n /**\n * An optional keyboard delegate implementation for type to select,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\nexport interface SelectAria {\n /** Props for the label element. */\n labelProps: DOMAttributes,\n\n /** Props for the popup trigger element. */\n triggerProps: AriaButtonProps,\n\n /** Props for the element representing the selected value. */\n valueProps: DOMAttributes,\n\n /** Props for the popup. */\n menuProps: AriaListBoxOptions,\n\n /** Props for the select's description element, if any. */\n descriptionProps: DOMAttributes,\n\n /** Props for the select's error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a select component.\n * A select displays a collapsible list of options and allows a user to select one of them.\n * @param props - Props for the select.\n * @param state - State for the select, as returned by `useListState`.\n */\nexport function useSelect(props: AriaSelectOptions, state: SelectState, ref: RefObject): SelectAria {\n let {\n keyboardDelegate,\n isDisabled\n } = props;\n\n // By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).\n // When virtualized, the layout object will be passed in as a prop and override this.\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let delegate = useMemo(() => keyboardDelegate || new ListKeyboardDelegate(state.collection, state.disabledKeys, null, collator), [keyboardDelegate, state.collection, state.disabledKeys, collator]);\n\n let {menuTriggerProps, menuProps} = useMenuTrigger(\n {\n isDisabled,\n type: 'listbox'\n },\n state,\n ref\n );\n\n let onKeyDown = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowLeft': {\n // prevent scrolling containers\n e.preventDefault();\n\n let key = state.selectedKey != null ? delegate.getKeyAbove(state.selectedKey) : delegate.getFirstKey();\n if (key) {\n state.setSelectedKey(key);\n }\n break;\n }\n case 'ArrowRight': {\n // prevent scrolling containers\n e.preventDefault();\n\n let key = state.selectedKey != null ? delegate.getKeyBelow(state.selectedKey) : delegate.getFirstKey();\n if (key) {\n state.setSelectedKey(key);\n }\n break;\n }\n }\n };\n\n let {typeSelectProps} = useTypeSelect({\n keyboardDelegate: delegate,\n selectionManager: state.selectionManager,\n onTypeSelect(key) {\n state.setSelectedKey(key);\n }\n });\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span'\n });\n\n typeSelectProps.onKeyDown = typeSelectProps.onKeyDownCapture;\n delete typeSelectProps.onKeyDownCapture;\n\n let domProps = filterDOMProps(props, {labelable: true});\n let triggerProps = mergeProps(typeSelectProps, menuTriggerProps, fieldProps);\n\n let valueId = useId();\n\n return {\n labelProps: {\n ...labelProps,\n onClick: () => {\n if (!props.isDisabled) {\n ref.current.focus();\n\n // Show the focus ring so the user knows where focus went\n setInteractionModality('keyboard');\n }\n }\n },\n triggerProps: mergeProps(domProps, {\n ...triggerProps,\n isDisabled,\n onKeyDown: chain(triggerProps.onKeyDown, onKeyDown, props.onKeyDown),\n onKeyUp: props.onKeyUp,\n 'aria-labelledby': [\n valueId,\n triggerProps['aria-labelledby'],\n triggerProps['aria-label'] && !triggerProps['aria-labelledby'] ? triggerProps.id : null\n ].filter(Boolean).join(' '),\n onFocus(e: FocusEvent) {\n if (state.isFocused) {\n return;\n }\n\n if (props.onFocus) {\n props.onFocus(e);\n }\n\n if (props.onFocusChange) {\n props.onFocusChange(true);\n }\n\n state.setFocused(true);\n },\n onBlur(e: FocusEvent) {\n if (state.isOpen) {\n return;\n }\n\n if (props.onBlur) {\n props.onBlur(e);\n }\n\n if (props.onFocusChange) {\n props.onFocusChange(false);\n }\n\n state.setFocused(false);\n }\n }),\n valueProps: {\n id: valueId\n },\n menuProps: {\n ...menuProps,\n autoFocus: state.focusStrategy || true,\n shouldSelectOnPressUp: true,\n shouldFocusOnHover: true,\n disallowEmptySelection: true,\n linkBehavior: 'selection',\n onBlur: (e) => {\n if (e.currentTarget.contains(e.relatedTarget as Node)) {\n return;\n }\n\n if (props.onBlur) {\n props.onBlur(e);\n }\n\n if (props.onFocusChange) {\n props.onFocusChange(false);\n }\n\n state.setFocused(false);\n },\n 'aria-labelledby': [\n fieldProps['aria-labelledby'],\n triggerProps['aria-label'] && !fieldProps['aria-labelledby'] ? triggerProps.id : null\n ].filter(Boolean).join(' ')\n },\n descriptionProps,\n errorMessageProps\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\nimport React, {ReactNode, RefObject, useRef} from 'react';\nimport {SelectState} from '@react-stately/select';\nimport {useFormReset} from '@react-aria/utils';\nimport {useInteractionModality} from '@react-aria/interactions';\nimport {useVisuallyHidden} from '@react-aria/visually-hidden';\n\nexport interface AriaHiddenSelectProps {\n /**\n * Describes the type of autocomplete functionality the input should provide if any. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautocomplete).\n */\n autoComplete?: string,\n\n /** The text label for the select. */\n label?: ReactNode,\n\n /** HTML form input name. */\n name?: string,\n\n /** Sets the disabled state of the select and input. */\n isDisabled?: boolean\n}\n\nexport interface HiddenSelectProps extends AriaHiddenSelectProps {\n /** State for the select. */\n state: SelectState,\n\n /** A ref to the trigger element. */\n triggerRef: RefObject\n}\n\nexport interface AriaHiddenSelectOptions extends AriaHiddenSelectProps {\n /** A ref to the hidden `` element, which\n * can be used in combination with `useSelect` to support browser form autofill, mobile form\n * navigation, and native HTML form submission.\n */\nexport function useHiddenSelect(props: AriaHiddenSelectOptions, state: SelectState, triggerRef: RefObject) {\n let {autoComplete, name, isDisabled} = props;\n let modality = useInteractionModality();\n let {visuallyHiddenProps} = useVisuallyHidden();\n\n useFormReset(props.selectRef, state.selectedKey, state.setSelectedKey);\n\n // In Safari, the whereas other browsers\n // seem to identify it just by surrounding text.\n // The solution is to use to hide the elements, which clips the elements to a\n // 1px rectangle. In addition, we hide from screen readers with aria-hidden, and make the for this also works, but Safari on iOS briefly flashes\n // the native menu on focus, so this isn't ideal. A font-size of 16px or greater is required to\n // prevent Safari from zooming in on the input when it is focused.\n //\n // If the current interaction modality is null, then the user hasn't interacted with the page yet.\n // In this case, we set the tabIndex to -1 on the input element so that automated accessibility\n // checkers don't throw false-positives about focusable elements inside an aria-hidden parent.\n return {\n containerProps: {\n ...visuallyHiddenProps,\n 'aria-hidden': true,\n ['data-a11y-ignore']: 'aria-hidden-focus'\n },\n inputProps: {\n type: 'text',\n tabIndex: modality == null || state.isFocused || state.isOpen ? -1 : 0,\n style: {fontSize: 16},\n onFocus: () => triggerRef.current.focus(),\n disabled: isDisabled\n },\n selectProps: {\n tabIndex: -1,\n autoComplete,\n disabled: isDisabled,\n name,\n size: state.collection.size,\n value: state.selectedKey ?? '',\n onChange: (e: React.ChangeEvent) => state.setSelectedKey(e.target.value)\n }\n };\n}\n\n/**\n * Renders a hidden native ` element for this so that browser\n // autofill will work. Otherwise, use an .\n if (state.collection.size <= 300) {\n return (\n
    \n \n \n
    \n );\n } else if (name) {\n return (\n \n );\n }\n\n return null;\n}\n","import \"./main.css\";\nimport {Item as $ee97ea796309b076$re_export$Item, Section as $ee97ea796309b076$re_export$Section} from \"@react-stately/collections\";\nimport $j8tbs$react, {useMemo as $j8tbs$useMemo, useContext as $j8tbs$useContext, useRef as $j8tbs$useRef, Fragment as $j8tbs$Fragment} from \"react\";\nimport {useDOMRef as $j8tbs$useDOMRef, useStyleProps as $j8tbs$useStyleProps, classNames as $j8tbs$classNames, ClearSlots as $j8tbs$ClearSlots, SlotProvider as $j8tbs$SlotProvider} from \"@react-spectrum/utils\";\nimport {useListState as $j8tbs$useListState} from \"@react-stately/list\";\nimport {useListBox as $j8tbs$useListBox, useOption as $j8tbs$useOption, useListBoxSection as $j8tbs$useListBoxSection} from \"@react-aria/listbox\";\nimport {FocusScope as $j8tbs$FocusScope, FocusRing as $j8tbs$FocusRing} from \"@react-aria/focus\";\nimport {ListLayout as $j8tbs$ListLayout} from \"@react-stately/layout\";\nimport {useLayoutEffect as $j8tbs$useLayoutEffect, mergeProps as $j8tbs$mergeProps} from \"@react-aria/utils\";\nimport {ProgressCircle as $j8tbs$ProgressCircle} from \"@react-spectrum/progress\";\nimport {useCollator as $j8tbs$useCollator, useLocalizedStringFormatter as $j8tbs$useLocalizedStringFormatter, useLocale as $j8tbs$useLocale} from \"@react-aria/i18n\";\nimport {useProvider as $j8tbs$useProvider} from \"@react-spectrum/provider\";\nimport {VirtualizerItem as $j8tbs$VirtualizerItem, Virtualizer as $j8tbs$Virtualizer, useVirtualizerItem as $j8tbs$useVirtualizerItem, layoutInfoToStyle as $j8tbs$layoutInfoToStyle} from \"@react-aria/virtualizer\";\nimport $j8tbs$spectrumiconsuiCheckmarkMedium from \"@spectrum-icons/ui/CheckmarkMedium\";\nimport {Grid as $j8tbs$Grid} from \"@react-spectrum/layout\";\nimport {useHover as $j8tbs$useHover, isFocusVisible as $j8tbs$isFocusVisible} from \"@react-aria/interactions\";\nimport {Text as $j8tbs$Text} from \"@react-spectrum/text\";\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /// \n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nvar $0815878b47e2c7ae$exports = {};\nvar $067dbd0c037ad155$exports = {};\n$067dbd0c037ad155$exports = {\n \"loading\": `جارٍ التحميل...`,\n \"loadingMore\": `جارٍ تحميل المزيد...`\n};\n\n\nvar $6ee4da2747de1e02$exports = {};\n$6ee4da2747de1e02$exports = {\n \"loading\": `Зареждане...`,\n \"loadingMore\": `Зареждане на още...`\n};\n\n\nvar $b58a7d965b7aa1b3$exports = {};\n$b58a7d965b7aa1b3$exports = {\n \"loading\": `Načítání...`,\n \"loadingMore\": `Načítání dalších...`\n};\n\n\nvar $ecaca51f024191b0$exports = {};\n$ecaca51f024191b0$exports = {\n \"loading\": `Indlæser ...`,\n \"loadingMore\": `Indlæser flere ...`\n};\n\n\nvar $6e434aa373f128b4$exports = {};\n$6e434aa373f128b4$exports = {\n \"loading\": `Laden...`,\n \"loadingMore\": `Mehr laden ...`\n};\n\n\nvar $ddbe45fb199df913$exports = {};\n$ddbe45fb199df913$exports = {\n \"loading\": `Φόρτωση...`,\n \"loadingMore\": `Φόρτωση περισσότερων...`\n};\n\n\nvar $2083b83b84266bb4$exports = {};\n$2083b83b84266bb4$exports = {\n \"loading\": `Loading…`,\n \"loadingMore\": `Loading more…`\n};\n\n\nvar $a41434a97f5222d7$exports = {};\n$a41434a97f5222d7$exports = {\n \"loading\": `Cargando…`,\n \"loadingMore\": `Cargando más…`\n};\n\n\nvar $0a1b42c97638052f$exports = {};\n$0a1b42c97638052f$exports = {\n \"loading\": `Laadimine...`,\n \"loadingMore\": `Laadi rohkem...`\n};\n\n\nvar $177331a39d162ddc$exports = {};\n$177331a39d162ddc$exports = {\n \"loading\": `Ladataan…`,\n \"loadingMore\": `Ladataan lisää…`\n};\n\n\nvar $273b1d5ecf07fe52$exports = {};\n$273b1d5ecf07fe52$exports = {\n \"loading\": `Chargement...`,\n \"loadingMore\": `Chargement supplémentaire...`\n};\n\n\nvar $459441d19cfa90a8$exports = {};\n$459441d19cfa90a8$exports = {\n \"loading\": `טוען...`,\n \"loadingMore\": `טוען עוד...`\n};\n\n\nvar $c30474fbd65b2878$exports = {};\n$c30474fbd65b2878$exports = {\n \"loading\": `Učitavam...`,\n \"loadingMore\": `Učitavam još...`\n};\n\n\nvar $fd19cc1d41a750e5$exports = {};\n$fd19cc1d41a750e5$exports = {\n \"loading\": `Betöltés folyamatban…`,\n \"loadingMore\": `Továbbiak betöltése folyamatban…`\n};\n\n\nvar $158d0aece262406d$exports = {};\n$158d0aece262406d$exports = {\n \"loading\": `Caricamento...`,\n \"loadingMore\": `Caricamento altri...`\n};\n\n\nvar $bc830316669a23f8$exports = {};\n$bc830316669a23f8$exports = {\n \"loading\": `読み込み中...`,\n \"loadingMore\": `さらに読み込み中...`\n};\n\n\nvar $7fa23663d4de476d$exports = {};\n$7fa23663d4de476d$exports = {\n \"loading\": `로드 중`,\n \"loadingMore\": `추가 로드 중`\n};\n\n\nvar $827e42814bc8f58e$exports = {};\n$827e42814bc8f58e$exports = {\n \"loading\": `Įkeliama...`,\n \"loadingMore\": `Įkeliama daugiau...`\n};\n\n\nvar $6ca653959481d2db$exports = {};\n$6ca653959481d2db$exports = {\n \"loading\": `Notiek ielāde...`,\n \"loadingMore\": `Tiek ielādēts vēl...`\n};\n\n\nvar $9efb74877777657a$exports = {};\n$9efb74877777657a$exports = {\n \"loading\": `Laster inn ...`,\n \"loadingMore\": `Laster inn flere ...`\n};\n\n\nvar $d085d780952864a7$exports = {};\n$d085d780952864a7$exports = {\n \"loading\": `Laden...`,\n \"loadingMore\": `Meer laden...`\n};\n\n\nvar $c207a8811c9791e9$exports = {};\n$c207a8811c9791e9$exports = {\n \"loading\": `Ładowanie...`,\n \"loadingMore\": `Wczytywanie większej liczby...`\n};\n\n\nvar $eda3511d3b2e0e51$exports = {};\n$eda3511d3b2e0e51$exports = {\n \"loading\": `Carregando...`,\n \"loadingMore\": `Carregando mais...`\n};\n\n\nvar $a9c1da319e5254cb$exports = {};\n$a9c1da319e5254cb$exports = {\n \"loading\": `A carregar...`,\n \"loadingMore\": `A carregar mais...`\n};\n\n\nvar $bc5c688ddc9e69fb$exports = {};\n$bc5c688ddc9e69fb$exports = {\n \"loading\": `Se încarcă...`,\n \"loadingMore\": `Se încarcă mai multe...`\n};\n\n\nvar $84ec40785c299370$exports = {};\n$84ec40785c299370$exports = {\n \"loading\": `Загрузка...`,\n \"loadingMore\": `Дополнительная загрузка...`\n};\n\n\nvar $510ebbcbf8f3c784$exports = {};\n$510ebbcbf8f3c784$exports = {\n \"loading\": `Načítava sa...`,\n \"loadingMore\": `Načítava sa viac...`\n};\n\n\nvar $49f018934e6f92c2$exports = {};\n$49f018934e6f92c2$exports = {\n \"loading\": `Nalaganje...`,\n \"loadingMore\": `Nalaganje več vsebine...`\n};\n\n\nvar $7513a1b075b503d5$exports = {};\n$7513a1b075b503d5$exports = {\n \"loading\": `Učitavam...`,\n \"loadingMore\": `Učitavam još...`\n};\n\n\nvar $02c92e5e0c81f9a9$exports = {};\n$02c92e5e0c81f9a9$exports = {\n \"loading\": `Läser in...`,\n \"loadingMore\": `Läser in mer...`\n};\n\n\nvar $8165adf786eb9d46$exports = {};\n$8165adf786eb9d46$exports = {\n \"loading\": `Yükleniyor...`,\n \"loadingMore\": `Daha fazla yükleniyor...`\n};\n\n\nvar $228238165c1367ae$exports = {};\n$228238165c1367ae$exports = {\n \"loading\": `Завантаження…`,\n \"loadingMore\": `Завантаження інших об’єктів...`\n};\n\n\nvar $cc82b5cf91ddc409$exports = {};\n$cc82b5cf91ddc409$exports = {\n \"loading\": `正在加载...`,\n \"loadingMore\": `正在加载更多...`\n};\n\n\nvar $c1545fe26f1d3e20$exports = {};\n$c1545fe26f1d3e20$exports = {\n \"loading\": `正在載入`,\n \"loadingMore\": `正在載入更多…`\n};\n\n\n$0815878b47e2c7ae$exports = {\n \"ar-AE\": $067dbd0c037ad155$exports,\n \"bg-BG\": $6ee4da2747de1e02$exports,\n \"cs-CZ\": $b58a7d965b7aa1b3$exports,\n \"da-DK\": $ecaca51f024191b0$exports,\n \"de-DE\": $6e434aa373f128b4$exports,\n \"el-GR\": $ddbe45fb199df913$exports,\n \"en-US\": $2083b83b84266bb4$exports,\n \"es-ES\": $a41434a97f5222d7$exports,\n \"et-EE\": $0a1b42c97638052f$exports,\n \"fi-FI\": $177331a39d162ddc$exports,\n \"fr-FR\": $273b1d5ecf07fe52$exports,\n \"he-IL\": $459441d19cfa90a8$exports,\n \"hr-HR\": $c30474fbd65b2878$exports,\n \"hu-HU\": $fd19cc1d41a750e5$exports,\n \"it-IT\": $158d0aece262406d$exports,\n \"ja-JP\": $bc830316669a23f8$exports,\n \"ko-KR\": $7fa23663d4de476d$exports,\n \"lt-LT\": $827e42814bc8f58e$exports,\n \"lv-LV\": $6ca653959481d2db$exports,\n \"nb-NO\": $9efb74877777657a$exports,\n \"nl-NL\": $d085d780952864a7$exports,\n \"pl-PL\": $c207a8811c9791e9$exports,\n \"pt-BR\": $eda3511d3b2e0e51$exports,\n \"pt-PT\": $a9c1da319e5254cb$exports,\n \"ro-RO\": $bc5c688ddc9e69fb$exports,\n \"ru-RU\": $84ec40785c299370$exports,\n \"sk-SK\": $510ebbcbf8f3c784$exports,\n \"sl-SI\": $49f018934e6f92c2$exports,\n \"sr-SP\": $7513a1b075b503d5$exports,\n \"sv-SE\": $02c92e5e0c81f9a9$exports,\n \"tr-TR\": $8165adf786eb9d46$exports,\n \"uk-UA\": $228238165c1367ae$exports,\n \"zh-CN\": $cc82b5cf91ddc409$exports,\n \"zh-TW\": $c1545fe26f1d3e20$exports\n};\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $0c6f792811e33483$export$7ff8f37d2d81a48d = (0, $j8tbs$react).createContext(null);\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\n\n\nvar $286d1cb34bb7dc84$exports = {};\n\n$parcel$export($286d1cb34bb7dc84$exports, \"checkmark\", () => $286d1cb34bb7dc84$export$292abbf31ed842a, (v) => $286d1cb34bb7dc84$export$292abbf31ed842a = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"description\", () => $286d1cb34bb7dc84$export$6d59db4903f20f7d, (v) => $286d1cb34bb7dc84$export$6d59db4903f20f7d = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"end\", () => $286d1cb34bb7dc84$export$bd5df0f255a350f8, (v) => $286d1cb34bb7dc84$export$bd5df0f255a350f8 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"focus-ring\", () => $286d1cb34bb7dc84$export$f39a09f249340e2a, (v) => $286d1cb34bb7dc84$export$f39a09f249340e2a = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"i18nFontFamily\", () => $286d1cb34bb7dc84$export$8c4ee2c50c22c514, (v) => $286d1cb34bb7dc84$export$8c4ee2c50c22c514 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"icon\", () => $286d1cb34bb7dc84$export$1ca1ec8b29a4ce27, (v) => $286d1cb34bb7dc84$export$1ca1ec8b29a4ce27 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"is-active\", () => $286d1cb34bb7dc84$export$20fd0f7cd4e6112f, (v) => $286d1cb34bb7dc84$export$20fd0f7cd4e6112f = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"is-disabled\", () => $286d1cb34bb7dc84$export$d35bc1e505d1ebbf, (v) => $286d1cb34bb7dc84$export$d35bc1e505d1ebbf = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"is-focused\", () => $286d1cb34bb7dc84$export$e7dc768d35940237, (v) => $286d1cb34bb7dc84$export$e7dc768d35940237 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"is-highlighted\", () => $286d1cb34bb7dc84$export$451c613d0772eb99, (v) => $286d1cb34bb7dc84$export$451c613d0772eb99 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"is-hovered\", () => $286d1cb34bb7dc84$export$b8813cd5d7824ce7, (v) => $286d1cb34bb7dc84$export$b8813cd5d7824ce7 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"is-open\", () => $286d1cb34bb7dc84$export$a9781837241c946d, (v) => $286d1cb34bb7dc84$export$a9781837241c946d = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"is-selectable\", () => $286d1cb34bb7dc84$export$fbd22ba224473193, (v) => $286d1cb34bb7dc84$export$fbd22ba224473193 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"is-selected\", () => $286d1cb34bb7dc84$export$1e0fb04f31d3c22a, (v) => $286d1cb34bb7dc84$export$1e0fb04f31d3c22a = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"keyboard\", () => $286d1cb34bb7dc84$export$cfdd767f5a513509, (v) => $286d1cb34bb7dc84$export$cfdd767f5a513509 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-FocusRing-ring\", () => $286d1cb34bb7dc84$export$4109102f950813a6, (v) => $286d1cb34bb7dc84$export$4109102f950813a6 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-FocusRing\", () => $286d1cb34bb7dc84$export$24c7f46a6e3605dd, (v) => $286d1cb34bb7dc84$export$24c7f46a6e3605dd = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-FocusRing--quiet\", () => $286d1cb34bb7dc84$export$2927016961429360, (v) => $286d1cb34bb7dc84$export$2927016961429360 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Icon\", () => $286d1cb34bb7dc84$export$d374b04f30360026, (v) => $286d1cb34bb7dc84$export$d374b04f30360026 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu\", () => $286d1cb34bb7dc84$export$fae6af6decd50ac5, (v) => $286d1cb34bb7dc84$export$fae6af6decd50ac5 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-checkmark\", () => $286d1cb34bb7dc84$export$8e15a726e4f7e62d, (v) => $286d1cb34bb7dc84$export$8e15a726e4f7e62d = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-description\", () => $286d1cb34bb7dc84$export$36f1275051e39ead, (v) => $286d1cb34bb7dc84$export$36f1275051e39ead = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-divider\", () => $286d1cb34bb7dc84$export$e892026f534efed8, (v) => $286d1cb34bb7dc84$export$e892026f534efed8 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-end\", () => $286d1cb34bb7dc84$export$926a1bb74ed65667, (v) => $286d1cb34bb7dc84$export$926a1bb74ed65667 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-icon\", () => $286d1cb34bb7dc84$export$cbbae63ef9e44c7a, (v) => $286d1cb34bb7dc84$export$cbbae63ef9e44c7a = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-item\", () => $286d1cb34bb7dc84$export$45faad328e6c532b, (v) => $286d1cb34bb7dc84$export$45faad328e6c532b = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-itemGrid\", () => $286d1cb34bb7dc84$export$ee5f52784f57f9c8, (v) => $286d1cb34bb7dc84$export$ee5f52784f57f9c8 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-itemIcon\", () => $286d1cb34bb7dc84$export$f431001e1bb54633, (v) => $286d1cb34bb7dc84$export$f431001e1bb54633 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-itemLabel\", () => $286d1cb34bb7dc84$export$1aa6419c5c650567, (v) => $286d1cb34bb7dc84$export$1aa6419c5c650567 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-itemLabel--wrapping\", () => $286d1cb34bb7dc84$export$465092164a8e1d98, (v) => $286d1cb34bb7dc84$export$465092164a8e1d98 = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-keyboard\", () => $286d1cb34bb7dc84$export$4f9817a7dff6ba0f, (v) => $286d1cb34bb7dc84$export$4f9817a7dff6ba0f = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-popover\", () => $286d1cb34bb7dc84$export$d959f30786125b, (v) => $286d1cb34bb7dc84$export$d959f30786125b = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"spectrum-Menu-sectionHeading\", () => $286d1cb34bb7dc84$export$c20ea4b35020fbdd, (v) => $286d1cb34bb7dc84$export$c20ea4b35020fbdd = v);\n$parcel$export($286d1cb34bb7dc84$exports, \"text\", () => $286d1cb34bb7dc84$export$6f093cfa640b7166, (v) => $286d1cb34bb7dc84$export$6f093cfa640b7166 = v);\nvar $286d1cb34bb7dc84$export$292abbf31ed842a;\nvar $286d1cb34bb7dc84$export$6d59db4903f20f7d;\nvar $286d1cb34bb7dc84$export$bd5df0f255a350f8;\nvar $286d1cb34bb7dc84$export$f39a09f249340e2a;\nvar $286d1cb34bb7dc84$export$8c4ee2c50c22c514;\nvar $286d1cb34bb7dc84$export$1ca1ec8b29a4ce27;\nvar $286d1cb34bb7dc84$export$20fd0f7cd4e6112f;\nvar $286d1cb34bb7dc84$export$d35bc1e505d1ebbf;\nvar $286d1cb34bb7dc84$export$e7dc768d35940237;\nvar $286d1cb34bb7dc84$export$451c613d0772eb99;\nvar $286d1cb34bb7dc84$export$b8813cd5d7824ce7;\nvar $286d1cb34bb7dc84$export$a9781837241c946d;\nvar $286d1cb34bb7dc84$export$fbd22ba224473193;\nvar $286d1cb34bb7dc84$export$1e0fb04f31d3c22a;\nvar $286d1cb34bb7dc84$export$cfdd767f5a513509;\nvar $286d1cb34bb7dc84$export$4109102f950813a6;\nvar $286d1cb34bb7dc84$export$24c7f46a6e3605dd;\nvar $286d1cb34bb7dc84$export$2927016961429360;\nvar $286d1cb34bb7dc84$export$d374b04f30360026;\nvar $286d1cb34bb7dc84$export$fae6af6decd50ac5;\nvar $286d1cb34bb7dc84$export$8e15a726e4f7e62d;\nvar $286d1cb34bb7dc84$export$36f1275051e39ead;\nvar $286d1cb34bb7dc84$export$e892026f534efed8;\nvar $286d1cb34bb7dc84$export$926a1bb74ed65667;\nvar $286d1cb34bb7dc84$export$cbbae63ef9e44c7a;\nvar $286d1cb34bb7dc84$export$45faad328e6c532b;\nvar $286d1cb34bb7dc84$export$ee5f52784f57f9c8;\nvar $286d1cb34bb7dc84$export$f431001e1bb54633;\nvar $286d1cb34bb7dc84$export$1aa6419c5c650567;\nvar $286d1cb34bb7dc84$export$465092164a8e1d98;\nvar $286d1cb34bb7dc84$export$4f9817a7dff6ba0f;\nvar $286d1cb34bb7dc84$export$d959f30786125b;\nvar $286d1cb34bb7dc84$export$c20ea4b35020fbdd;\nvar $286d1cb34bb7dc84$export$6f093cfa640b7166;\n$286d1cb34bb7dc84$export$292abbf31ed842a = `Q7FggG_checkmark`;\n$286d1cb34bb7dc84$export$6d59db4903f20f7d = `Q7FggG_description`;\n$286d1cb34bb7dc84$export$bd5df0f255a350f8 = `Q7FggG_end`;\n$286d1cb34bb7dc84$export$f39a09f249340e2a = `Q7FggG_focus-ring`;\n$286d1cb34bb7dc84$export$8c4ee2c50c22c514 = `Q7FggG_i18nFontFamily`;\n$286d1cb34bb7dc84$export$1ca1ec8b29a4ce27 = `Q7FggG_icon`;\n$286d1cb34bb7dc84$export$20fd0f7cd4e6112f = `Q7FggG_is-active`;\n$286d1cb34bb7dc84$export$d35bc1e505d1ebbf = `Q7FggG_is-disabled`;\n$286d1cb34bb7dc84$export$e7dc768d35940237 = `Q7FggG_is-focused`;\n$286d1cb34bb7dc84$export$451c613d0772eb99 = `Q7FggG_is-highlighted`;\n$286d1cb34bb7dc84$export$b8813cd5d7824ce7 = `Q7FggG_is-hovered`;\n$286d1cb34bb7dc84$export$a9781837241c946d = `Q7FggG_is-open`;\n$286d1cb34bb7dc84$export$fbd22ba224473193 = `Q7FggG_is-selectable`;\n$286d1cb34bb7dc84$export$1e0fb04f31d3c22a = `Q7FggG_is-selected`;\n$286d1cb34bb7dc84$export$cfdd767f5a513509 = `Q7FggG_keyboard`;\n$286d1cb34bb7dc84$export$4109102f950813a6 = `Q7FggG_spectrum-FocusRing-ring`;\n$286d1cb34bb7dc84$export$24c7f46a6e3605dd = `Q7FggG_spectrum-FocusRing ${$286d1cb34bb7dc84$export$4109102f950813a6}`;\n$286d1cb34bb7dc84$export$2927016961429360 = `Q7FggG_spectrum-FocusRing--quiet`;\n$286d1cb34bb7dc84$export$d374b04f30360026 = `Q7FggG_spectrum-Icon`;\n$286d1cb34bb7dc84$export$fae6af6decd50ac5 = `Q7FggG_spectrum-Menu`;\n$286d1cb34bb7dc84$export$8e15a726e4f7e62d = `Q7FggG_spectrum-Menu-checkmark`;\n$286d1cb34bb7dc84$export$36f1275051e39ead = `Q7FggG_spectrum-Menu-description`;\n$286d1cb34bb7dc84$export$e892026f534efed8 = `Q7FggG_spectrum-Menu-divider`;\n$286d1cb34bb7dc84$export$926a1bb74ed65667 = `Q7FggG_spectrum-Menu-end`;\n$286d1cb34bb7dc84$export$cbbae63ef9e44c7a = `Q7FggG_spectrum-Menu-icon`;\n$286d1cb34bb7dc84$export$45faad328e6c532b = `Q7FggG_spectrum-Menu-item`;\n$286d1cb34bb7dc84$export$ee5f52784f57f9c8 = `Q7FggG_spectrum-Menu-itemGrid`;\n$286d1cb34bb7dc84$export$f431001e1bb54633 = `Q7FggG_spectrum-Menu-itemIcon`;\n$286d1cb34bb7dc84$export$1aa6419c5c650567 = `Q7FggG_spectrum-Menu-itemLabel`;\n$286d1cb34bb7dc84$export$465092164a8e1d98 = `Q7FggG_spectrum-Menu-itemLabel--wrapping`;\n$286d1cb34bb7dc84$export$4f9817a7dff6ba0f = `Q7FggG_spectrum-Menu-keyboard`;\n$286d1cb34bb7dc84$export$d959f30786125b = `Q7FggG_spectrum-Menu-popover`;\n$286d1cb34bb7dc84$export$c20ea4b35020fbdd = `Q7FggG_spectrum-Menu-sectionHeading`;\n$286d1cb34bb7dc84$export$6f093cfa640b7166 = `Q7FggG_text`;\n\n\n\n\nfunction $86983ea1fa3f7312$export$feb3b6b552c14a12(props) {\n let { item: item, shouldSelectOnPressUp: shouldSelectOnPressUp, shouldFocusOnHover: shouldFocusOnHover, shouldUseVirtualFocus: shouldUseVirtualFocus } = props;\n let { rendered: rendered, key: key } = item;\n let ElementType = item.props.href ? \"a\" : \"div\";\n let state = (0, $j8tbs$useContext)((0, $0c6f792811e33483$export$7ff8f37d2d81a48d));\n let ref = (0, $j8tbs$useRef)();\n let { optionProps: optionProps, labelProps: labelProps, descriptionProps: descriptionProps, isSelected: isSelected, isDisabled: isDisabled, isFocused: isFocused } = (0, $j8tbs$useOption)({\n \"aria-label\": item[\"aria-label\"],\n key: key,\n shouldSelectOnPressUp: shouldSelectOnPressUp,\n shouldFocusOnHover: shouldFocusOnHover,\n isVirtualized: true,\n shouldUseVirtualFocus: shouldUseVirtualFocus\n }, state, ref);\n let { hoverProps: hoverProps, isHovered: isHovered } = (0, $j8tbs$useHover)({\n ...props,\n isDisabled: isDisabled\n });\n let contents = typeof rendered === \"string\" ? /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$Text), null, rendered) : rendered;\n let isKeyboardModality = (0, $j8tbs$isFocusVisible)();\n return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$FocusRing), {\n focusRingClass: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"focus-ring\")\n }, /*#__PURE__*/ (0, $j8tbs$react).createElement(ElementType, {\n ...(0, $j8tbs$mergeProps)(optionProps, shouldFocusOnHover ? {} : hoverProps),\n ref: ref,\n className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"spectrum-Menu-item\", {\n // If using virtual focus, apply focused styles to the item when the user is interacting with keyboard modality\n \"is-focused\": shouldUseVirtualFocus && isFocused && isKeyboardModality,\n \"is-disabled\": isDisabled,\n \"is-selected\": isSelected,\n \"is-selectable\": state.selectionManager.selectionMode !== \"none\",\n // When shouldFocusOnHover is false, apply hover styles both when hovered with the mouse.\n // Otherwise, apply hover styles when focused using non-keyboard modality.\n \"is-hovered\": isHovered && !shouldFocusOnHover || isFocused && !isKeyboardModality\n })\n }, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$Grid), {\n UNSAFE_className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"spectrum-Menu-itemGrid\")\n }, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$ClearSlots), null, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$SlotProvider), {\n slots: {\n text: {\n UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)))[\"spectrum-Menu-itemLabel\"],\n ...labelProps\n },\n icon: {\n size: \"S\",\n UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)))[\"spectrum-Menu-icon\"]\n },\n description: {\n UNSAFE_className: (0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports)))[\"spectrum-Menu-description\"],\n ...descriptionProps\n }\n }\n }, contents, isSelected && /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$spectrumiconsuiCheckmarkMedium), {\n slot: \"checkmark\",\n UNSAFE_className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"spectrum-Menu-checkmark\")\n }))))));\n}\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\n\nfunction $92d678ed88836094$export$dca12b0bb56e4fc(props) {\n let { children: children, layoutInfo: layoutInfo, headerLayoutInfo: headerLayoutInfo, virtualizer: virtualizer, item: item } = props;\n let { headingProps: headingProps, groupProps: groupProps } = (0, $j8tbs$useListBoxSection)({\n heading: item.rendered,\n \"aria-label\": item[\"aria-label\"]\n });\n let headerRef = (0, $j8tbs$useRef)();\n (0, $j8tbs$useVirtualizerItem)({\n layoutInfo: headerLayoutInfo,\n virtualizer: virtualizer,\n ref: headerRef\n });\n let { direction: direction } = (0, $j8tbs$useLocale)();\n let state = (0, $j8tbs$useContext)((0, $0c6f792811e33483$export$7ff8f37d2d81a48d));\n return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$Fragment), null, /*#__PURE__*/ (0, $j8tbs$react).createElement(\"div\", {\n role: \"presentation\",\n ref: headerRef,\n style: (0, $j8tbs$layoutInfoToStyle)(headerLayoutInfo, direction)\n }, item.key !== state.collection.getFirstKey() && /*#__PURE__*/ (0, $j8tbs$react).createElement(\"div\", {\n role: \"presentation\",\n className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"spectrum-Menu-divider\")\n }), item.rendered && /*#__PURE__*/ (0, $j8tbs$react).createElement(\"div\", {\n ...headingProps,\n className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"spectrum-Menu-sectionHeading\")\n }, item.rendered)), /*#__PURE__*/ (0, $j8tbs$react).createElement(\"div\", {\n ...groupProps,\n style: (0, $j8tbs$layoutInfoToStyle)(layoutInfo, direction),\n className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"spectrum-Menu\")\n }, children));\n}\n\n\n\n\n\n\n\n\n\n\nfunction $3247d4a89e6094e9$export$25768ea656ae32a7(state, isLoading) {\n let { scale: scale } = (0, $j8tbs$useProvider)();\n let collator = (0, $j8tbs$useCollator)({\n usage: \"search\",\n sensitivity: \"base\"\n });\n let layout = (0, $j8tbs$useMemo)(()=>new (0, $j8tbs$ListLayout)({\n estimatedRowHeight: scale === \"large\" ? 48 : 32,\n estimatedHeadingHeight: scale === \"large\" ? 33 : 26,\n padding: scale === \"large\" ? 5 : 4,\n loaderHeight: 40,\n placeholderHeight: scale === \"large\" ? 48 : 32,\n collator: collator\n }), [\n collator,\n scale\n ]);\n layout.collection = state.collection;\n layout.disabledKeys = state.disabledKeys;\n (0, $j8tbs$useLayoutEffect)(()=>{\n // Sync loading state into the layout.\n if (layout.isLoading !== isLoading) {\n var _layout_virtualizer;\n layout.isLoading = isLoading;\n (_layout_virtualizer = layout.virtualizer) === null || _layout_virtualizer === void 0 ? void 0 : _layout_virtualizer.relayoutNow();\n }\n }, [\n layout,\n isLoading\n ]);\n return layout;\n}\n/** @private */ function $3247d4a89e6094e9$var$ListBoxBase(props, ref) {\n let { layout: layout, state: state, shouldSelectOnPressUp: shouldSelectOnPressUp, focusOnPointerEnter: focusOnPointerEnter, shouldUseVirtualFocus: shouldUseVirtualFocus, domProps: domProps = {}, transitionDuration: transitionDuration = 0, onScroll: onScroll } = props;\n let { listBoxProps: listBoxProps } = (0, $j8tbs$useListBox)({\n ...props,\n keyboardDelegate: layout,\n isVirtualized: true\n }, state, ref);\n let { styleProps: styleProps } = (0, $j8tbs$useStyleProps)(props);\n let stringFormatter = (0, $j8tbs$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($0815878b47e2c7ae$exports))));\n let renderWrapper = (parent, reusableView, children, renderChildren)=>{\n if (reusableView.viewType === \"section\") return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $92d678ed88836094$export$dca12b0bb56e4fc), {\n key: reusableView.key,\n item: reusableView.content,\n layoutInfo: reusableView.layoutInfo,\n virtualizer: reusableView.virtualizer,\n headerLayoutInfo: children.find((c)=>c.viewType === \"header\").layoutInfo\n }, renderChildren(children.filter((c)=>c.viewType === \"item\")));\n return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$VirtualizerItem), {\n key: reusableView.key,\n layoutInfo: reusableView.layoutInfo,\n virtualizer: reusableView.virtualizer,\n parent: parent === null || parent === void 0 ? void 0 : parent.layoutInfo\n }, reusableView.rendered);\n };\n return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $0c6f792811e33483$export$7ff8f37d2d81a48d).Provider, {\n value: state\n }, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$FocusScope), null, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$Virtualizer), {\n ...styleProps,\n ...(0, $j8tbs$mergeProps)(listBoxProps, domProps),\n ref: ref,\n focusedKey: state.selectionManager.focusedKey,\n autoFocus: !!props.autoFocus,\n sizeToFit: \"height\",\n scrollDirection: \"vertical\",\n className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"spectrum-Menu\", styleProps.className),\n layout: layout,\n collection: state.collection,\n renderWrapper: renderWrapper,\n transitionDuration: transitionDuration,\n isLoading: props.isLoading,\n onLoadMore: props.onLoadMore,\n shouldUseVirtualFocus: shouldUseVirtualFocus,\n onScroll: onScroll\n }, (type, item)=>{\n if (type === \"item\") return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $86983ea1fa3f7312$export$feb3b6b552c14a12), {\n item: item,\n shouldSelectOnPressUp: shouldSelectOnPressUp,\n shouldFocusOnHover: focusOnPointerEnter,\n shouldUseVirtualFocus: shouldUseVirtualFocus\n });\n else if (type === \"loader\") return(// aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n /*#__PURE__*/ (0, $j8tbs$react).createElement(\"div\", {\n role: \"option\",\n style: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"100%\"\n }\n }, /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $j8tbs$ProgressCircle), {\n isIndeterminate: true,\n size: \"S\",\n \"aria-label\": state.collection.size > 0 ? stringFormatter.format(\"loadingMore\") : stringFormatter.format(\"loading\"),\n UNSAFE_className: (0, $j8tbs$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($286d1cb34bb7dc84$exports))), \"spectrum-Dropdown-progressCircle\")\n })));\n else if (type === \"placeholder\") {\n let emptyState = props.renderEmptyState ? props.renderEmptyState() : null;\n if (emptyState == null) return null;\n return /*#__PURE__*/ (0, $j8tbs$react).createElement(\"div\", {\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n role: \"option\"\n }, emptyState);\n }\n })));\n}\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst $3247d4a89e6094e9$export$1afdcf349979fb7e = /*#__PURE__*/ (0, $j8tbs$react).forwardRef($3247d4a89e6094e9$var$ListBoxBase);\n\n\n\n\n\nfunction $3136257018b1a220$var$ListBox(props, ref) {\n let state = (0, $j8tbs$useListState)(props);\n let layout = (0, $3247d4a89e6094e9$export$25768ea656ae32a7)(state, props.isLoading);\n let domRef = (0, $j8tbs$useDOMRef)(ref);\n return /*#__PURE__*/ (0, $j8tbs$react).createElement((0, $3247d4a89e6094e9$export$1afdcf349979fb7e), {\n ...props,\n ref: domRef,\n state: state,\n layout: layout\n });\n}\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\n/**\n * A list of options that can allow selection of one or more.\n */ const $3136257018b1a220$export$41f133550aa26f48 = /*#__PURE__*/ (0, $j8tbs$react).forwardRef($3136257018b1a220$var$ListBox);\n\n\n\n\n\n\nexport {$3136257018b1a220$export$41f133550aa26f48 as ListBox, $3247d4a89e6094e9$export$25768ea656ae32a7 as useListBoxLayout, $3247d4a89e6094e9$export$1afdcf349979fb7e as ListBoxBase, $ee97ea796309b076$re_export$Item as Item, $ee97ea796309b076$re_export$Section as Section};\n//# sourceMappingURL=module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// \n\nexport {ListBox} from './ListBox';\nexport {useListBoxLayout, ListBoxBase} from './ListBoxBase';\nexport {Item, Section} from '@react-stately/collections';\nexport type {SpectrumListBoxProps} from '@react-types/listbox';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMRef} from '@react-types/shared';\nimport {ListBoxBase, useListBoxLayout} from './ListBoxBase';\nimport React, {ReactElement} from 'react';\nimport {SpectrumListBoxProps} from '@react-types/listbox';\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useListState} from '@react-stately/list';\n\nfunction ListBox(props: SpectrumListBoxProps, ref: DOMRef) {\n let state = useListState(props);\n let layout = useListBoxLayout(state, props.isLoading);\n let domRef = useDOMRef(ref);\n\n return (\n \n );\n}\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\n\n\n/**\n * A list of options that can allow selection of one or more.\n */\nconst _ListBox = React.forwardRef(ListBox) as (props: SpectrumListBoxProps & {ref?: DOMRef}) => ReactElement;\nexport {_ListBox as ListBox};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, FocusStrategy, Node, StyleProps} from '@react-types/shared';\nimport {AriaListBoxOptions, useListBox} from '@react-aria/listbox';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListBoxContext} from './ListBoxContext';\nimport {ListBoxOption} from './ListBoxOption';\nimport {ListBoxSection} from './ListBoxSection';\nimport {ListLayout} from '@react-stately/layout';\nimport {ListState} from '@react-stately/list';\nimport {mergeProps, useLayoutEffect} from '@react-aria/utils';\nimport {ProgressCircle} from '@react-spectrum/progress';\nimport React, {HTMLAttributes, ReactElement, ReactNode, RefObject, useMemo} from 'react';\nimport {ReusableView} from '@react-stately/virtualizer';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useCollator, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProvider} from '@react-spectrum/provider';\nimport {Virtualizer, VirtualizerItem} from '@react-aria/virtualizer';\n\ninterface ListBoxBaseProps extends AriaListBoxOptions, DOMProps, AriaLabelingProps, StyleProps {\n layout: ListLayout,\n state: ListState,\n autoFocus?: boolean | FocusStrategy,\n shouldFocusWrap?: boolean,\n shouldSelectOnPressUp?: boolean,\n focusOnPointerEnter?: boolean,\n domProps?: HTMLAttributes,\n disallowEmptySelection?: boolean,\n shouldUseVirtualFocus?: boolean,\n transitionDuration?: number,\n isLoading?: boolean,\n onLoadMore?: () => void,\n renderEmptyState?: () => ReactNode,\n onScroll?: () => void\n}\n\n/** @private */\nexport function useListBoxLayout(state: ListState, isLoading: boolean): ListLayout {\n let {scale} = useProvider();\n let collator = useCollator({usage: 'search', sensitivity: 'base'});\n let layout = useMemo(() =>\n new ListLayout({\n estimatedRowHeight: scale === 'large' ? 48 : 32,\n estimatedHeadingHeight: scale === 'large' ? 33 : 26,\n padding: scale === 'large' ? 5 : 4, // TODO: get from DNA\n loaderHeight: 40,\n placeholderHeight: scale === 'large' ? 48 : 32,\n collator\n })\n , [collator, scale]);\n\n layout.collection = state.collection;\n layout.disabledKeys = state.disabledKeys;\n\n useLayoutEffect(() => {\n // Sync loading state into the layout.\n if (layout.isLoading !== isLoading) {\n layout.isLoading = isLoading;\n layout.virtualizer?.relayoutNow();\n }\n }, [layout, isLoading]);\n return layout;\n}\n\n/** @private */\nfunction ListBoxBase(props: ListBoxBaseProps, ref: RefObject) {\n let {layout, state, shouldSelectOnPressUp, focusOnPointerEnter, shouldUseVirtualFocus, domProps = {}, transitionDuration = 0, onScroll} = props;\n let {listBoxProps} = useListBox({\n ...props,\n keyboardDelegate: layout,\n isVirtualized: true\n }, state, ref);\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n\n // This overrides collection view's renderWrapper to support heirarchy of items in sections.\n // The header is extracted from the children so it can receive ARIA labeling properties.\n type View = ReusableView, ReactNode>;\n let renderWrapper = (parent: View, reusableView: View, children: View[], renderChildren: (views: View[]) => ReactElement[]) => {\n if (reusableView.viewType === 'section') {\n return (\n c.viewType === 'header').layoutInfo}>\n {renderChildren(children.filter(c => c.viewType === 'item'))}\n \n );\n }\n\n return (\n \n {reusableView.rendered}\n \n );\n };\n\n return (\n \n \n \n {(type, item: Node) => {\n if (type === 'item') {\n return (\n \n );\n } else if (type === 'loader') {\n return (\n // aria-selected isn't needed here since this option is not selectable.\n // eslint-disable-next-line jsx-a11y/role-has-required-aria-props\n
    \n 0 ? stringFormatter.format('loadingMore') : stringFormatter.format('loading')}\n UNSAFE_className={classNames(styles, 'spectrum-Dropdown-progressCircle')} />\n
    \n );\n } else if (type === 'placeholder') {\n let emptyState = props.renderEmptyState ? props.renderEmptyState() : null;\n if (emptyState == null) {\n return null;\n }\n\n return (\n \n {emptyState}\n \n );\n }\n }}\n \n
    \n
    \n );\n}\n\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _ListBoxBase = React.forwardRef(ListBoxBase) as (props: ListBoxBaseProps & {ref?: RefObject}) => ReactElement;\nexport {_ListBoxBase as ListBoxBase};\n","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"loading\": \"جارٍ التحميل...\",\n \"loadingMore\": \"جارٍ تحميل المزيد...\"\n}\n","{\n \"loading\": \"Зареждане...\",\n \"loadingMore\": \"Зареждане на още...\"\n}\n","{\n \"loading\": \"Načítání...\",\n \"loadingMore\": \"Načítání dalších...\"\n}\n","{\n \"loading\": \"Indlæser ...\",\n \"loadingMore\": \"Indlæser flere ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"loadingMore\": \"Mehr laden ...\"\n}\n","{\n \"loading\": \"Φόρτωση...\",\n \"loadingMore\": \"Φόρτωση περισσότερων...\"\n}\n","{\n \"loading\": \"Loading…\",\n \"loadingMore\": \"Loading more…\"\n}\n","{\n \"loading\": \"Cargando…\",\n \"loadingMore\": \"Cargando más…\"\n}\n","{\n \"loading\": \"Laadimine...\",\n \"loadingMore\": \"Laadi rohkem...\"\n}\n","{\n \"loading\": \"Ladataan…\",\n \"loadingMore\": \"Ladataan lisää…\"\n}\n","{\n \"loading\": \"Chargement...\",\n \"loadingMore\": \"Chargement supplémentaire...\"\n}\n","{\n \"loading\": \"טוען...\",\n \"loadingMore\": \"טוען עוד...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"loadingMore\": \"Učitavam još...\"\n}\n","{\n \"loading\": \"Betöltés folyamatban…\",\n \"loadingMore\": \"Továbbiak betöltése folyamatban…\"\n}\n","{\n \"loading\": \"Caricamento...\",\n \"loadingMore\": \"Caricamento altri...\"\n}\n","{\n \"loading\": \"読み込み中...\",\n \"loadingMore\": \"さらに読み込み中...\"\n}\n","{\n \"loading\": \"로드 중\",\n \"loadingMore\": \"추가 로드 중\"\n}\n","{\n \"loading\": \"Įkeliama...\",\n \"loadingMore\": \"Įkeliama daugiau...\"\n}\n","{\n \"loading\": \"Notiek ielāde...\",\n \"loadingMore\": \"Tiek ielādēts vēl...\"\n}\n","{\n \"loading\": \"Laster inn ...\",\n \"loadingMore\": \"Laster inn flere ...\"\n}\n","{\n \"loading\": \"Laden...\",\n \"loadingMore\": \"Meer laden...\"\n}\n","{\n \"loading\": \"Ładowanie...\",\n \"loadingMore\": \"Wczytywanie większej liczby...\"\n}\n","{\n \"loading\": \"Carregando...\",\n \"loadingMore\": \"Carregando mais...\"\n}\n","{\n \"loading\": \"A carregar...\",\n \"loadingMore\": \"A carregar mais...\"\n}\n","{\n \"loading\": \"Se încarcă...\",\n \"loadingMore\": \"Se încarcă mai multe...\"\n}\n","{\n \"loading\": \"Загрузка...\",\n \"loadingMore\": \"Дополнительная загрузка...\"\n}\n","{\n \"loading\": \"Načítava sa...\",\n \"loadingMore\": \"Načítava sa viac...\"\n}\n","{\n \"loading\": \"Nalaganje...\",\n \"loadingMore\": \"Nalaganje več vsebine...\"\n}\n","{\n \"loading\": \"Učitavam...\",\n \"loadingMore\": \"Učitavam još...\"\n}\n","{\n \"loading\": \"Läser in...\",\n \"loadingMore\": \"Läser in mer...\"\n}\n","{\n \"loading\": \"Yükleniyor...\",\n \"loadingMore\": \"Daha fazla yükleniyor...\"\n}\n","{\n \"loading\": \"Завантаження…\",\n \"loadingMore\": \"Завантаження інших об’єктів...\"\n}\n","{\n \"loading\": \"正在加载...\",\n \"loadingMore\": \"正在加载更多...\"\n}\n","{\n \"loading\": \"正在載入\",\n \"loadingMore\": \"正在載入更多…\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ListState} from '@react-stately/list';\nimport React from 'react';\n\nexport const ListBoxContext = React.createContext>(null);\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport {classNames, ClearSlots, SlotProvider} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Grid} from '@react-spectrum/layout';\nimport {isFocusVisible, useHover} from '@react-aria/interactions';\nimport {ListBoxContext} from './ListBoxContext';\nimport {mergeProps} from '@react-aria/utils';\nimport {Node} from '@react-types/shared';\nimport React, {useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useOption} from '@react-aria/listbox';\n\ninterface OptionProps {\n item: Node,\n shouldSelectOnPressUp?: boolean,\n shouldFocusOnHover?: boolean,\n shouldUseVirtualFocus?: boolean\n}\n\n/** @private */\nexport function ListBoxOption(props: OptionProps) {\n let {\n item,\n shouldSelectOnPressUp,\n shouldFocusOnHover,\n shouldUseVirtualFocus\n } = props;\n\n let {\n rendered,\n key\n } = item;\n let ElementType: React.ElementType = item.props.href ? 'a' : 'div';\n let state = useContext(ListBoxContext);\n\n let ref = useRef();\n let {optionProps, labelProps, descriptionProps, isSelected, isDisabled, isFocused} = useOption(\n {\n 'aria-label': item['aria-label'],\n key,\n shouldSelectOnPressUp,\n shouldFocusOnHover,\n isVirtualized: true,\n shouldUseVirtualFocus\n },\n state,\n ref\n );\n let {hoverProps, isHovered} = useHover({\n ...props,\n isDisabled\n });\n\n let contents = typeof rendered === 'string'\n ? {rendered}\n : rendered;\n\n let isKeyboardModality = isFocusVisible();\n\n return (\n \n \n \n \n \n {contents}\n {isSelected &&\n \n }\n \n \n \n \n \n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {LayoutInfo} from '@react-stately/virtualizer';\nimport {layoutInfoToStyle, useVirtualizerItem, VirtualizerItemOptions} from '@react-aria/virtualizer';\nimport {ListBoxContext} from './ListBoxContext';\nimport {Node} from '@react-types/shared';\nimport React, {Fragment, ReactNode, useContext, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/menu/vars.css';\nimport {useListBoxSection} from '@react-aria/listbox';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface ListBoxSectionProps extends Omit {\n headerLayoutInfo: LayoutInfo,\n item: Node,\n children?: ReactNode\n}\n\n/** @private */\nexport function ListBoxSection(props: ListBoxSectionProps) {\n let {children, layoutInfo, headerLayoutInfo, virtualizer, item} = props;\n let {headingProps, groupProps} = useListBoxSection({\n heading: item.rendered,\n 'aria-label': item['aria-label']\n });\n\n let headerRef = useRef();\n useVirtualizerItem({\n layoutInfo: headerLayoutInfo,\n virtualizer,\n ref: headerRef\n });\n\n let {direction} = useLocale();\n let state = useContext(ListBoxContext);\n\n return (\n \n
    \n {item.key !== state.collection.getFirstKey() &&\n \n }\n {item.rendered &&\n \n {item.rendered}\n
    \n }\n \n \n {children}\n \n
    \n );\n}\n","import {filterDOMProps as $frWMC$filterDOMProps, useId as $frWMC$useId, mergeProps as $frWMC$mergeProps, useSlotId as $frWMC$useSlotId, isMac as $frWMC$isMac, isWebKit as $frWMC$isWebKit} from \"@react-aria/utils\";\nimport {useFocusWithin as $frWMC$useFocusWithin, useHover as $frWMC$useHover, isFocusVisible as $frWMC$isFocusVisible} from \"@react-aria/interactions\";\nimport {useLabel as $frWMC$useLabel} from \"@react-aria/label\";\nimport {useSelectableList as $frWMC$useSelectableList, useSelectableItem as $frWMC$useSelectableItem} from \"@react-aria/selection\";\nimport {getItemCount as $frWMC$getItemCount} from \"@react-stately/collections\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ const $b1f0cad8af73213b$export$3585ede4d035bf14 = new WeakMap();\nfunction $b1f0cad8af73213b$var$normalizeKey(key) {\n if (typeof key === \"string\") return key.replace(/\\s*/g, \"\");\n return \"\" + key;\n}\nfunction $b1f0cad8af73213b$export$9145995848b05025(state, itemKey) {\n let data = $b1f0cad8af73213b$export$3585ede4d035bf14.get(state);\n if (!data) throw new Error(\"Unknown list\");\n return `${data.id}-option-${$b1f0cad8af73213b$var$normalizeKey(itemKey)}`;\n}\n\n\n\n\n\nfunction $c132121280ec012d$export$50eacbbf140a3141(props, state, ref) {\n let domProps = (0, $frWMC$filterDOMProps)(props, {\n labelable: true\n });\n // Use props instead of state here. We don't want this to change due to long press.\n let selectionBehavior = props.selectionBehavior || \"toggle\";\n let linkBehavior = props.linkBehavior || (selectionBehavior === \"replace\" ? \"action\" : \"override\");\n if (selectionBehavior === \"toggle\" && linkBehavior === \"action\") // linkBehavior=\"action\" does not work with selectionBehavior=\"toggle\" because there is no way\n // to initiate selection (checkboxes are not allowed inside a listbox). Link items will not be\n // selectable in this configuration.\n linkBehavior = \"override\";\n let { listProps: listProps } = (0, $frWMC$useSelectableList)({\n ...props,\n ref: ref,\n selectionManager: state.selectionManager,\n collection: state.collection,\n disabledKeys: state.disabledKeys,\n linkBehavior: linkBehavior\n });\n let { focusWithinProps: focusWithinProps } = (0, $frWMC$useFocusWithin)({\n onFocusWithin: props.onFocus,\n onBlurWithin: props.onBlur,\n onFocusWithinChange: props.onFocusChange\n });\n // Share list id and some props with child options.\n let id = (0, $frWMC$useId)(props.id);\n (0, $b1f0cad8af73213b$export$3585ede4d035bf14).set(state, {\n id: id,\n shouldUseVirtualFocus: props.shouldUseVirtualFocus,\n shouldSelectOnPressUp: props.shouldSelectOnPressUp,\n shouldFocusOnHover: props.shouldFocusOnHover,\n isVirtualized: props.isVirtualized,\n onAction: props.onAction,\n linkBehavior: linkBehavior\n });\n let { labelProps: labelProps, fieldProps: fieldProps } = (0, $frWMC$useLabel)({\n ...props,\n id: id,\n // listbox is not an HTML input element so it\n // shouldn't be labeled by a
    elements. */\n isLink?: boolean,\n /**\n * A Set of other property names that should be included in the filter.\n */\n propNames?: Set\n}\n\nconst propRe = /^(data-.*)$/;\n\n/**\n * Filters out all props that aren't valid DOM props or defined via override prop obj.\n * @param props - The component props to be filtered.\n * @param opts - Props to override.\n */\nexport function filterDOMProps(props: DOMProps & AriaLabelingProps & LinkDOMProps, opts: Options = {}): DOMProps & AriaLabelingProps {\n let {labelable, isLink, propNames} = opts;\n let filteredProps = {};\n\n for (const prop in props) {\n if (\n Object.prototype.hasOwnProperty.call(props, prop) && (\n DOMPropNames.has(prop) ||\n (labelable && labelablePropNames.has(prop)) ||\n (isLink && linkPropNames.has(prop)) ||\n propNames?.has(prop) ||\n propRe.test(prop)\n )\n ) {\n filteredProps[prop] = props[prop];\n }\n }\n\n return filteredProps;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\n\n// This is a polyfill for element.focus({preventScroll: true});\n// Currently necessary for Safari and old Edge:\n// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option\n// See https://bugs.webkit.org/show_bug.cgi?id=178583\n//\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/calvellido/focus-options-polyfill\n\ninterface ScrollableElement {\n element: HTMLElement,\n scrollTop: number,\n scrollLeft: number\n}\n\nexport function focusWithoutScrolling(element: FocusableElement) {\n if (supportsPreventScroll()) {\n element.focus({preventScroll: true});\n } else {\n let scrollableElements = getScrollableElements(element);\n element.focus();\n restoreScrollPosition(scrollableElements);\n }\n}\n\nlet supportsPreventScrollCached: boolean = null;\nfunction supportsPreventScroll() {\n if (supportsPreventScrollCached == null) {\n supportsPreventScrollCached = false;\n try {\n var focusElem = document.createElement('div');\n focusElem.focus({\n get preventScroll() {\n supportsPreventScrollCached = true;\n return true;\n }\n });\n } catch (e) {\n // Ignore\n }\n }\n\n return supportsPreventScrollCached;\n}\n\nfunction getScrollableElements(element: FocusableElement): ScrollableElement[] {\n var parent = element.parentNode;\n var scrollableElements: ScrollableElement[] = [];\n var rootScrollingElement = document.scrollingElement || document.documentElement;\n\n while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n if (\n parent.offsetHeight < parent.scrollHeight ||\n parent.offsetWidth < parent.scrollWidth\n ) {\n scrollableElements.push({\n element: parent,\n scrollTop: parent.scrollTop,\n scrollLeft: parent.scrollLeft\n });\n }\n parent = parent.parentNode;\n }\n\n if (rootScrollingElement instanceof HTMLElement) {\n scrollableElements.push({\n element: rootScrollingElement,\n scrollTop: rootScrollingElement.scrollTop,\n scrollLeft: rootScrollingElement.scrollLeft\n });\n }\n\n return scrollableElements;\n}\n\nfunction restoreScrollPosition(scrollableElements: ScrollableElement[]) {\n for (let {element, scrollTop, scrollLeft} of scrollableElements) {\n element.scrollTop = scrollTop;\n element.scrollLeft = scrollLeft;\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport function getOffset(element, reverse, orientation = 'horizontal') {\n let rect = element.getBoundingClientRect();\n if (reverse) {\n return orientation === 'horizontal' ? rect.right : rect.bottom;\n }\n return orientation === 'horizontal' ? rect.left : rect.top;\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {focusWithoutScrolling, isMac, isWebKit} from './index';\nimport {isFirefox, isIPad} from './platform';\nimport {LinkDOMProps} from '@react-types/shared';\nimport React, {createContext, ReactNode, useContext, useMemo} from 'react';\n\ninterface Router {\n isNative: boolean,\n open: (target: Element, modifiers: Modifiers) => void\n}\n\nconst RouterContext = createContext({\n isNative: true,\n open: openSyntheticLink\n});\n\ninterface RouterProviderProps {\n navigate: (path: string) => void,\n children: ReactNode\n}\n\n/**\n * A RouterProvider accepts a `navigate` function from a framework or client side router,\n * and provides it to all nested React Aria links to enable client side navigation.\n */\nexport function RouterProvider(props: RouterProviderProps) {\n let {children, navigate} = props;\n\n let ctx = useMemo(() => ({\n isNative: false,\n open: (target: Element, modifiers: Modifiers) => {\n getSyntheticLink(target, link => {\n if (shouldClientNavigate(link, modifiers)) {\n navigate(link.pathname + link.search + link.hash);\n } else {\n openLink(link, modifiers);\n }\n });\n }\n }), [navigate]);\n\n return (\n \n {children}\n \n );\n}\n\nexport function useRouter(): Router {\n return useContext(RouterContext);\n}\n\ninterface Modifiers {\n metaKey?: boolean,\n ctrlKey?: boolean,\n altKey?: boolean,\n shiftKey?: boolean\n}\n\nexport function shouldClientNavigate(link: HTMLAnchorElement, modifiers: Modifiers) {\n // Use getAttribute here instead of link.target. Firefox will default link.target to \"_parent\" when inside an iframe.\n let target = link.getAttribute('target');\n return (\n (!target || target === '_self') &&\n link.origin === location.origin &&\n !link.hasAttribute('download') &&\n !modifiers.metaKey && // open in new tab (mac)\n !modifiers.ctrlKey && // open in new tab (windows)\n !modifiers.altKey && // download\n !modifiers.shiftKey\n );\n}\n\nexport function openLink(target: HTMLAnchorElement, modifiers: Modifiers, setOpening = true) {\n let {metaKey, ctrlKey, altKey, shiftKey} = modifiers;\n\n // Firefox does not recognize keyboard events as a user action by default, and the popup blocker\n // will prevent links with target=\"_blank\" from opening. However, it does allow the event if the\n // Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.\n if (isFirefox() && window.event?.type?.startsWith('key') && target.target === '_blank') {\n if (isMac()) {\n metaKey = true;\n } else {\n ctrlKey = true;\n }\n }\n\n // WebKit does not support firing click events with modifier keys, but does support keyboard events.\n // https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184\n let event = isWebKit() && isMac() && !isIPad() && process.env.NODE_ENV !== 'test'\n // @ts-ignore - keyIdentifier is a non-standard property, but it's what webkit expects\n ? new KeyboardEvent('keydown', {keyIdentifier: 'Enter', metaKey, ctrlKey, altKey, shiftKey})\n : new MouseEvent('click', {metaKey, ctrlKey, altKey, shiftKey, bubbles: true, cancelable: true});\n (openLink as any).isOpening = setOpening;\n focusWithoutScrolling(target);\n target.dispatchEvent(event);\n (openLink as any).isOpening = false;\n}\n// https://github.com/parcel-bundler/parcel/issues/8724\n(openLink as any).isOpening = false;\n\nfunction getSyntheticLink(target: Element, open: (link: HTMLAnchorElement) => void) {\n if (target instanceof HTMLAnchorElement) {\n open(target);\n } else if (target.hasAttribute('data-href')) {\n let link = document.createElement('a');\n link.href = target.getAttribute('data-href');\n if (target.hasAttribute('data-target')) {\n link.target = target.getAttribute('data-target');\n }\n if (target.hasAttribute('data-rel')) {\n link.rel = target.getAttribute('data-rel');\n }\n if (target.hasAttribute('data-download')) {\n link.download = target.getAttribute('data-download');\n }\n if (target.hasAttribute('data-ping')) {\n link.ping = target.getAttribute('data-ping');\n }\n if (target.hasAttribute('data-referrer-policy')) {\n link.referrerPolicy = target.getAttribute('data-referrer-policy');\n }\n target.appendChild(link);\n open(link);\n target.removeChild(link);\n }\n}\n\nfunction openSyntheticLink(target: Element, modifiers: Modifiers) {\n getSyntheticLink(target, link => openLink(link, modifiers));\n}\n\nexport function getSyntheticLinkProps(props: LinkDOMProps) {\n return {\n 'data-href': props.href,\n 'data-target': props.target,\n 'data-rel': props.rel,\n 'data-download': props.download,\n 'data-ping': props.ping,\n 'data-referrer-policy': props.referrerPolicy\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nfunction testUserAgent(re: RegExp) {\n if (typeof window === 'undefined' || window.navigator == null) {\n return false;\n }\n return (\n window.navigator['userAgentData']?.brands.some((brand: {brand: string, version: string}) => re.test(brand.brand))\n ) ||\n re.test(window.navigator.userAgent);\n}\n\nfunction testPlatform(re: RegExp) {\n return typeof window !== 'undefined' && window.navigator != null\n ? re.test(window.navigator['userAgentData']?.platform || window.navigator.platform)\n : false;\n}\n\nexport function isMac() {\n return testPlatform(/^Mac/i);\n}\n\nexport function isIPhone() {\n return testPlatform(/^iPhone/i);\n}\n\nexport function isIPad() {\n return testPlatform(/^iPad/i) ||\n // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n (isMac() && navigator.maxTouchPoints > 1);\n}\n\nexport function isIOS() {\n return isIPhone() || isIPad();\n}\n\nexport function isAppleDevice() {\n return isMac() || isIOS();\n}\n\nexport function isWebKit() {\n return testUserAgent(/AppleWebKit/i) && !isChrome();\n}\n\nexport function isChrome() {\n return testUserAgent(/Chrome/i);\n}\n\nexport function isAndroid() {\n return testUserAgent(/Android/i);\n}\n\nexport function isFirefox() {\n return testUserAgent(/Firefox/i);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet transitionsByElement = new Map>();\n\n// A list of callbacks to call once there are no transitioning elements.\nlet transitionCallbacks = new Set<() => void>();\n\nfunction setupGlobalEvents() {\n if (typeof window === 'undefined') {\n return;\n }\n\n let onTransitionStart = (e: TransitionEvent) => {\n // Add the transitioning property to the list for this element.\n let transitions = transitionsByElement.get(e.target);\n if (!transitions) {\n transitions = new Set();\n transitionsByElement.set(e.target, transitions);\n\n // The transitioncancel event must be registered on the element itself, rather than as a global\n // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n e.target.addEventListener('transitioncancel', onTransitionEnd);\n }\n\n transitions.add(e.propertyName);\n };\n\n let onTransitionEnd = (e: TransitionEvent) => {\n // Remove property from list of transitioning properties.\n let properties = transitionsByElement.get(e.target);\n if (!properties) {\n return;\n }\n\n properties.delete(e.propertyName);\n\n // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n if (properties.size === 0) {\n e.target.removeEventListener('transitioncancel', onTransitionEnd);\n transitionsByElement.delete(e.target);\n }\n\n // If no transitioning elements, call all of the queued callbacks.\n if (transitionsByElement.size === 0) {\n for (let cb of transitionCallbacks) {\n cb();\n }\n\n transitionCallbacks.clear();\n }\n };\n\n document.body.addEventListener('transitionrun', onTransitionStart);\n document.body.addEventListener('transitionend', onTransitionEnd);\n}\n\nif (typeof document !== 'undefined') {\n if (document.readyState !== 'loading') {\n setupGlobalEvents();\n } else {\n document.addEventListener('DOMContentLoaded', setupGlobalEvents);\n }\n}\n\nexport function runAfterTransition(fn: () => void) {\n // Wait one frame to see if an animation starts, e.g. a transition on mount.\n requestAnimationFrame(() => {\n // If no transitions are running, call the function immediately.\n // Otherwise, add it to a list of callbacks to run at the end of the animation.\n if (transitionsByElement.size === 0) {\n fn();\n } else {\n transitionCallbacks.add(fn);\n }\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n /* eslint-disable rulesdir/pure-render */\n\nimport {getOffset} from './getOffset';\nimport {Orientation} from '@react-types/shared';\nimport React, {HTMLAttributes, MutableRefObject, useRef} from 'react';\n\ninterface UseDrag1DProps {\n containerRef: MutableRefObject,\n reverse?: boolean,\n orientation?: Orientation,\n onHover?: (hovered: boolean) => void,\n onDrag?: (dragging: boolean) => void,\n onPositionChange?: (position: number) => void,\n onIncrement?: () => void,\n onDecrement?: () => void,\n onIncrementToMax?: () => void,\n onDecrementToMin?: () => void,\n onCollapseToggle?: () => void\n}\n\n// Keep track of elements that we are currently handling dragging for via useDrag1D.\n// If there's an ancestor and a descendant both using useDrag1D(), and the user starts\n// dragging the descendant, we don't want useDrag1D events to fire for the ancestor.\nconst draggingElements: HTMLElement[] = [];\n\n// created for splitview, this should be reusable for things like sliders/dials\n// It also handles keyboard events on the target allowing for increment/decrement by a given stepsize as well as minifying/maximizing and toggling between minified and previous size\n// It can also take a 'reverse' param to say if we should measure from the right/bottom instead of the top/left\n// It can also handle either a vertical or horizontal movement, but not both at the same time\n\nexport function useDrag1D(props: UseDrag1DProps): HTMLAttributes {\n console.warn('useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html');\n let {containerRef, reverse, orientation, onHover, onDrag, onPositionChange, onIncrement, onDecrement, onIncrementToMax, onDecrementToMin, onCollapseToggle} = props;\n let getPosition = (e) => orientation === 'horizontal' ? e.clientX : e.clientY;\n let getNextOffset = (e: MouseEvent) => {\n let containerOffset = getOffset(containerRef.current, reverse, orientation);\n let mouseOffset = getPosition(e);\n let nextOffset = reverse ? containerOffset - mouseOffset : mouseOffset - containerOffset;\n return nextOffset;\n };\n let dragging = useRef(false);\n let prevPosition = useRef(0);\n\n // Keep track of the current handlers in a ref so that the events can access them.\n let handlers = useRef({onPositionChange, onDrag});\n handlers.current.onDrag = onDrag;\n handlers.current.onPositionChange = onPositionChange;\n\n let onMouseDragged = (e: MouseEvent) => {\n e.preventDefault();\n let nextOffset = getNextOffset(e);\n if (!dragging.current) {\n dragging.current = true;\n if (handlers.current.onDrag) {\n handlers.current.onDrag(true);\n }\n if (handlers.current.onPositionChange) {\n handlers.current.onPositionChange(nextOffset);\n }\n }\n if (prevPosition.current === nextOffset) {\n return;\n }\n prevPosition.current = nextOffset;\n if (onPositionChange) {\n onPositionChange(nextOffset);\n }\n };\n\n let onMouseUp = (e: MouseEvent) => {\n const target = e.target as HTMLElement;\n dragging.current = false;\n let nextOffset = getNextOffset(e);\n if (handlers.current.onDrag) {\n handlers.current.onDrag(false);\n }\n if (handlers.current.onPositionChange) {\n handlers.current.onPositionChange(nextOffset);\n }\n\n draggingElements.splice(draggingElements.indexOf(target), 1);\n window.removeEventListener('mouseup', onMouseUp, false);\n window.removeEventListener('mousemove', onMouseDragged, false);\n };\n\n let onMouseDown = (e: React.MouseEvent) => {\n const target = e.currentTarget;\n // If we're already handling dragging on a descendant with useDrag1D, then\n // we don't want to handle the drag motion on this target as well.\n if (draggingElements.some(elt => target.contains(elt))) {\n return;\n }\n draggingElements.push(target);\n window.addEventListener('mousemove', onMouseDragged, false);\n window.addEventListener('mouseup', onMouseUp, false);\n };\n\n let onMouseEnter = () => {\n if (onHover) {\n onHover(true);\n }\n };\n\n let onMouseOut = () => {\n if (onHover) {\n onHover(false);\n }\n };\n\n let onKeyDown = (e) => {\n switch (e.key) {\n case 'Left':\n case 'ArrowLeft':\n if (orientation === 'horizontal') {\n e.preventDefault();\n if (onDecrement && !reverse) {\n onDecrement();\n } else if (onIncrement && reverse) {\n onIncrement();\n }\n }\n break;\n case 'Up':\n case 'ArrowUp':\n if (orientation === 'vertical') {\n e.preventDefault();\n if (onDecrement && !reverse) {\n onDecrement();\n } else if (onIncrement && reverse) {\n onIncrement();\n }\n }\n break;\n case 'Right':\n case 'ArrowRight':\n if (orientation === 'horizontal') {\n e.preventDefault();\n if (onIncrement && !reverse) {\n onIncrement();\n } else if (onDecrement && reverse) {\n onDecrement();\n }\n }\n break;\n case 'Down':\n case 'ArrowDown':\n if (orientation === 'vertical') {\n e.preventDefault();\n if (onIncrement && !reverse) {\n onIncrement();\n } else if (onDecrement && reverse) {\n onDecrement();\n }\n }\n break;\n case 'Home':\n e.preventDefault();\n if (onDecrementToMin) {\n onDecrementToMin();\n }\n break;\n case 'End':\n e.preventDefault();\n if (onIncrementToMax) {\n onIncrementToMax();\n }\n break;\n case 'Enter':\n e.preventDefault();\n if (onCollapseToggle) {\n onCollapseToggle();\n }\n break;\n }\n };\n\n return {onMouseDown, onMouseEnter, onMouseOut, onKeyDown};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef} from 'react';\n\ninterface GlobalListeners {\n addGlobalListener(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n addGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void,\n removeGlobalListener(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void,\n removeGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void,\n removeAllGlobalListeners(): void\n}\n\nexport function useGlobalListeners(): GlobalListeners {\n let globalListeners = useRef(new Map());\n let addGlobalListener = useCallback((eventTarget, type, listener, options) => {\n // Make sure we remove the listener after it is called with the `once` option.\n let fn = options?.once ? (...args) => {\n globalListeners.current.delete(listener);\n listener(...args);\n } : listener;\n globalListeners.current.set(listener, {type, eventTarget, fn, options});\n eventTarget.addEventListener(type, listener, options);\n }, []);\n let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {\n let fn = globalListeners.current.get(listener)?.fn || listener;\n eventTarget.removeEventListener(type, fn, options);\n globalListeners.current.delete(listener);\n }, []);\n let removeAllGlobalListeners = useCallback(() => {\n globalListeners.current.forEach((value, key) => {\n removeGlobalListener(value.eventTarget, value.type, key, value.options);\n });\n }, [removeGlobalListener]);\n\n // eslint-disable-next-line arrow-body-style\n useEffect(() => {\n return removeAllGlobalListeners;\n }, [removeAllGlobalListeners]);\n\n return {addGlobalListener, removeGlobalListener, removeAllGlobalListeners};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {useId} from './useId';\n\n/**\n * Merges aria-label and aria-labelledby into aria-labelledby when both exist.\n * @param props - Aria label props.\n * @param defaultLabel - Default value for aria-label when not present.\n */\nexport function useLabels(props: DOMProps & AriaLabelingProps, defaultLabel?: string): DOMProps & AriaLabelingProps {\n let {\n id,\n 'aria-label': label,\n 'aria-labelledby': labelledBy\n } = props;\n\n // If there is both an aria-label and aria-labelledby,\n // combine them by pointing to the element itself.\n id = useId(id);\n if (labelledBy && label) {\n let ids = new Set([id, ...labelledBy.trim().split(/\\s+/)]);\n labelledBy = [...ids].join(' ');\n } else if (labelledBy) {\n labelledBy = labelledBy.trim().split(/\\s+/).join(' ');\n }\n\n // If no labels are provided, use the default\n if (!label && !labelledBy && defaultLabel) {\n label = defaultLabel;\n }\n\n return {\n id,\n 'aria-label': label,\n 'aria-labelledby': labelledBy\n };\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject, useMemo, useRef} from 'react';\n\n/**\n * Offers an object ref for a given callback ref or an object ref. Especially\n * helfpul when passing forwarded refs (created using `React.forwardRef`) to\n * React Aria Hooks.\n *\n * @param forwardedRef The original ref intended to be used.\n * @returns An object ref that updates the given ref.\n * @see https://reactjs.org/docs/forwarding-refs.html\n */\nexport function useObjectRef(forwardedRef?: ((instance: T | null) => void) | MutableRefObject | null): MutableRefObject {\n const objRef = useRef();\n return useMemo(() => ({\n get current() {\n return objRef.current;\n },\n set current(value) {\n objRef.current = value;\n if (typeof forwardedRef === 'function') {\n forwardedRef(value);\n } else if (forwardedRef) {\n forwardedRef.current = value;\n }\n }\n }), [forwardedRef]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {EffectCallback, useEffect, useRef} from 'react';\n\n// Like useEffect, but only called for updates after the initial render.\nexport function useUpdateEffect(effect: EffectCallback, dependencies: any[]) {\n const isInitialMount = useRef(true);\n const lastDeps = useRef(null);\n\n useEffect(() => {\n isInitialMount.current = true;\n return () => {\n isInitialMount.current = false;\n };\n }, []);\n\n useEffect(() => {\n if (isInitialMount.current) {\n isInitialMount.current = false;\n } else if (!lastDeps.current || dependencies.some((dep, i) => !Object.is(dep, lastDeps[i]))) {\n effect();\n }\n lastDeps.current = dependencies;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n}\n","import {RefObject, useEffect} from 'react';\n\nfunction hasResizeObserver() {\n return typeof window.ResizeObserver !== 'undefined';\n}\n\ntype useResizeObserverOptionsType = {\n ref: RefObject | undefined,\n onResize: () => void\n}\n\nexport function useResizeObserver(options: useResizeObserverOptionsType) {\n const {ref, onResize} = options;\n\n useEffect(() => {\n let element = ref?.current;\n if (!element) {\n return;\n }\n\n if (!hasResizeObserver()) {\n window.addEventListener('resize', onResize, false);\n return () => {\n window.removeEventListener('resize', onResize, false);\n };\n } else {\n\n const resizeObserverInstance = new window.ResizeObserver((entries) => {\n if (!entries.length) {\n return;\n }\n\n onResize();\n });\n resizeObserverInstance.observe(element);\n\n return () => {\n if (element) {\n resizeObserverInstance.unobserve(element);\n }\n };\n }\n\n }, [onResize, ref]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject, RefObject} from 'react';\nimport {useLayoutEffect} from './';\n\ninterface ContextValue {\n ref?: MutableRefObject\n}\n\n// Syncs ref from context with ref passed to hook\nexport function useSyncRef(context: ContextValue, ref: RefObject) {\n useLayoutEffect(() => {\n if (context && context.ref && ref) {\n context.ref.current = ref.current;\n return () => {\n context.ref.current = null;\n };\n }\n });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport function getScrollParent(node: Element): Element {\n if (isScrollable(node)) {\n node = node.parentElement;\n }\n\n while (node && !isScrollable(node)) {\n node = node.parentElement;\n }\n\n return node || document.scrollingElement || document.documentElement;\n}\n\nexport function isScrollable(node: Element): boolean {\n let style = window.getComputedStyle(node);\n return /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\ninterface ViewportSize {\n width: number,\n height: number\n}\n\n// @ts-ignore\nlet visualViewport = typeof document !== 'undefined' && window.visualViewport;\n\nexport function useViewportSize(): ViewportSize {\n let isSSR = useIsSSR();\n let [size, setSize] = useState(() => isSSR ? {width: 0, height: 0} : getViewportSize());\n\n useEffect(() => {\n // Use visualViewport api to track available height even on iOS virtual keyboard opening\n let onResize = () => {\n setSize(size => {\n let newSize = getViewportSize();\n if (newSize.width === size.width && newSize.height === size.height) {\n return size;\n }\n return newSize;\n });\n };\n\n if (!visualViewport) {\n window.addEventListener('resize', onResize);\n } else {\n visualViewport.addEventListener('resize', onResize);\n }\n\n return () => {\n if (!visualViewport) {\n window.removeEventListener('resize', onResize);\n } else {\n visualViewport.removeEventListener('resize', onResize);\n }\n };\n }, []);\n\n return size;\n}\n\nfunction getViewportSize(): ViewportSize {\n return {\n width: visualViewport?.width || window.innerWidth,\n height: visualViewport?.height || window.innerHeight\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps} from '@react-types/shared';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useState} from 'react';\n\nlet descriptionId = 0;\nconst descriptionNodes = new Map();\n\nexport function useDescription(description: string): AriaLabelingProps {\n let [id, setId] = useState(undefined);\n\n useLayoutEffect(() => {\n if (!description) {\n return;\n }\n\n let desc = descriptionNodes.get(description);\n if (!desc) {\n let id = `react-aria-description-${descriptionId++}`;\n setId(id);\n\n let node = document.createElement('div');\n node.id = id;\n node.style.display = 'none';\n node.textContent = description;\n document.body.appendChild(node);\n desc = {refCount: 0, element: node};\n descriptionNodes.set(description, desc);\n } else {\n setId(desc.element.id);\n }\n\n desc.refCount++;\n return () => {\n if (--desc.refCount === 0) {\n desc.element.remove();\n descriptionNodes.delete(description);\n }\n };\n }, [description]);\n\n return {\n 'aria-describedby': description ? id : undefined\n };\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject, useEffect} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useEvent(\n ref: RefObject,\n event: K,\n handler: (this: Document, ev: GlobalEventHandlersEventMap[K]) => any,\n options?: boolean | AddEventListenerOptions\n) {\n let handleEvent = useEffectEvent(handler);\n let isDisabled = handler == null;\n\n useEffect(() => {\n if (isDisabled) {\n return;\n }\n\n let element = ref.current;\n element.addEventListener(event, handleEvent, options);\n return () => {\n element.removeEventListener(event, handleEvent, options);\n };\n }, [ref, event, options, isDisabled, handleEvent]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getScrollParent} from './';\n\ninterface ScrollIntoViewportOpts {\n /** The optional containing element of the target to be centered in the viewport. */\n containingElement?: Element\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(scrollView: HTMLElement, element: HTMLElement) {\n let offsetX = relativeOffset(scrollView, element, 'left');\n let offsetY = relativeOffset(scrollView, element, 'top');\n let width = element.offsetWidth;\n let height = element.offsetHeight;\n let x = scrollView.scrollLeft;\n let y = scrollView.scrollTop;\n\n // Account for top/left border offsetting the scroll top/Left\n let {borderTopWidth, borderLeftWidth} = getComputedStyle(scrollView);\n let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);\n let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);\n // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width\n let maxX = borderAdjustedX + scrollView.clientWidth;\n let maxY = borderAdjustedY + scrollView.clientHeight;\n\n if (offsetX <= x) {\n x = offsetX - parseInt(borderLeftWidth, 10);\n } else if (offsetX + width > maxX) {\n x += offsetX + width - maxX;\n }\n if (offsetY <= borderAdjustedY) {\n y = offsetY - parseInt(borderTopWidth, 10);\n } else if (offsetY + height > maxY) {\n y += offsetY + height - maxY;\n }\n scrollView.scrollLeft = x;\n scrollView.scrollTop = y;\n}\n\n/**\n * Computes the offset left or top from child to ancestor by accumulating\n * offsetLeft or offsetTop through intervening offsetParents.\n */\nfunction relativeOffset(ancestor: HTMLElement, child: HTMLElement, axis: 'left'|'top') {\n const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop';\n let sum = 0;\n while (child.offsetParent) {\n sum += child[prop];\n if (child.offsetParent === ancestor) {\n // Stop once we have found the ancestor we are interested in.\n break;\n } else if (child.offsetParent.contains(ancestor)) {\n // If the ancestor is not `position:relative`, then we stop at\n // _its_ offset parent, and we subtract off _its_ offset, so that\n // we end up with the proper offset from child to ancestor.\n sum -= ancestor[prop];\n break;\n }\n child = child.offsetParent as HTMLElement;\n }\n return sum;\n}\n\n/**\n * Scrolls the `targetElement` so it is visible in the viewport. Accepts an optional `opts.containingElement`\n * that will be centered in the viewport prior to scrolling the targetElement into view. If scrolling is prevented on\n * the body (e.g. targetElement is in a popover), this will only scroll the scroll parents of the targetElement up to but not including the body itself.\n */\nexport function scrollIntoViewport(targetElement: Element, opts?: ScrollIntoViewportOpts) {\n if (document.contains(targetElement)) {\n let root = document.scrollingElement || document.documentElement;\n let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';\n // If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view\n if (!isScrollPrevented) {\n let {left: originalLeft, top: originalTop} = targetElement.getBoundingClientRect();\n\n // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()\n // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically\n targetElement?.scrollIntoView?.({block: 'nearest'});\n let {left: newLeft, top: newTop} = targetElement.getBoundingClientRect();\n // Account for sub pixel differences from rounding\n if ((Math.abs(originalLeft - newLeft) > 1) || (Math.abs(originalTop - newTop) > 1)) {\n opts?.containingElement?.scrollIntoView?.({block: 'center', inline: 'center'});\n targetElement.scrollIntoView?.({block: 'nearest'});\n }\n } else {\n let scrollParent = getScrollParent(targetElement);\n // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.\n while (targetElement && scrollParent && targetElement !== root && scrollParent !== root) {\n scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n targetElement = scrollParent;\n scrollParent = getScrollParent(targetElement);\n }\n }\n }\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isAndroid} from './platform';\n\n// Original licensing for the following method can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/blob/3c713d513195a53788b3f8bb4b70279d68b15bcc/packages/react-interactions/events/src/dom/shared/index.js#L74-L87\n\n// Keyboards, Assistive Technologies, and element.click() all produce a \"virtual\"\n// click event. This is a method of inferring such clicks. Every browser except\n// IE 11 only sets a zero value of \"detail\" for click events that are \"virtual\".\n// However, IE 11 uses a zero value for all click events. For IE 11 we rely on\n// the quirk that it produces click events that are of type PointerEvent, and\n// where only the \"virtual\" click lacks a pointerType field.\n\nexport function isVirtualClick(event: MouseEvent | PointerEvent): boolean {\n // JAWS/NVDA with Firefox.\n if ((event as any).mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n\n // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n // to detect TalkBack virtual clicks.\n if (isAndroid() && (event as PointerEvent).pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n\n return event.detail === 0 && !(event as PointerEvent).pointerType;\n}\n\nexport function isVirtualPointerEvent(event: PointerEvent) {\n // If the pointer size is zero, then we assume it's from a screen reader.\n // Android TalkBack double tap will sometimes return a event with width and height of 1\n // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n // Talkback double tap from Windows Firefox touch screen press\n return (\n (!isAndroid() && event.width === 0 && event.height === 0) ||\n (event.width === 1 &&\n event.height === 1 &&\n event.pressure === 0 &&\n event.detail === 0 &&\n event.pointerType === 'mouse'\n )\n );\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/* eslint-disable rulesdir/pure-render */\n\nimport {useRef} from 'react';\n\nexport function useDeepMemo(value: T, isEqual: (a: T, b: T) => boolean): T {\n // Using a ref during render is ok here because it's only an optimization – both values are equivalent.\n // If a render is thrown away, it'll still work the same no matter if the next render is the same or not.\n let lastValue = useRef(null);\n if (value && lastValue.current && isEqual(value, lastValue.current)) {\n value = lastValue.current;\n }\n\n lastValue.current = value;\n return value;\n}\n","/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {RefObject, useEffect, useRef} from 'react';\nimport {useEffectEvent} from './useEffectEvent';\n\nexport function useFormReset(\n ref: RefObject,\n initialValue: T,\n onReset: (value: T) => void\n) {\n let resetValue = useRef(initialValue);\n let handleReset = useEffectEvent(() => {\n if (onReset) {\n onReset(resetValue.current);\n }\n });\n\n useEffect(() => {\n let form = ref?.current?.form;\n form?.addEventListener('reset', handleReset);\n return () => {\n form?.removeEventListener('reset', handleReset);\n };\n }, [ref, handleReset]);\n}\n","import {useState as $6imuh$useState, useRef as $6imuh$useRef, useEffect as $6imuh$useEffect, useCallback as $6imuh$useCallback} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {\n let [stateValue, setStateValue] = (0, $6imuh$useState)(value || defaultValue);\n let isControlledRef = (0, $6imuh$useRef)(value !== undefined);\n let isControlled = value !== undefined;\n (0, $6imuh$useEffect)(()=>{\n let wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) console.warn(`WARN: A component changed from ${wasControlled ? \"controlled\" : \"uncontrolled\"} to ${isControlled ? \"controlled\" : \"uncontrolled\"}.`);\n isControlledRef.current = isControlled;\n }, [\n isControlled\n ]);\n let currentValue = isControlled ? value : stateValue;\n let setValue = (0, $6imuh$useCallback)((value, ...args)=>{\n let onChangeCaller = (value, ...onChangeArgs)=>{\n if (onChange) {\n if (!Object.is(currentValue, value)) onChange(value, ...onChangeArgs);\n }\n if (!isControlled) // If uncontrolled, mutate the currentValue local variable so that\n // calling setState multiple times with the same value only emits onChange once.\n // We do not use a ref for this because we specifically _do_ want the value to\n // reset every render, and assigning to a ref in render breaks aborted suspended renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n currentValue = value;\n };\n if (typeof value === \"function\") {\n console.warn(\"We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320\");\n // this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates\n // when someone using useControlledState calls setControlledState(myFunc)\n // this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc\n // if we're in an uncontrolled state, then we also return the value of myFunc which to setState looks as though it was just called with myFunc from the beginning\n // otherwise we just return the controlled value, which won't cause a rerender because React knows to bail out when the value is the same\n let updateFunction = (oldValue, ...functionArgs)=>{\n let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);\n onChangeCaller(interceptedValue, ...args);\n if (!isControlled) return interceptedValue;\n return oldValue;\n };\n setStateValue(updateFunction);\n } else {\n if (!isControlled) setStateValue(value);\n onChangeCaller(value, ...args);\n }\n }, [\n isControlled,\n currentValue,\n onChange\n ]);\n return [\n currentValue,\n setValue\n ];\n}\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /**\n * Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest valid step.\n */ function $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, min = -Infinity, max = Infinity) {\n let newValue = Math.min(Math.max(value, min), max);\n return newValue;\n}\nfunction $9446cca9a3875146$export$cb6e0bb50bc19463(value, min, max, step) {\n min = Number(min);\n max = Number(max);\n let remainder = (value - (isNaN(min) ? 0 : min)) % step;\n let snappedValue = Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder;\n if (!isNaN(min)) {\n if (snappedValue < min) snappedValue = min;\n else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor((max - min) / step) * step;\n } else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor(max / step) * step;\n // correct floating point behavior by rounding to step precision\n let string = step.toString();\n let index = string.indexOf(\".\");\n let precision = index >= 0 ? string.length - index : 0;\n if (precision > 0) {\n let pow = Math.pow(10, precision);\n snappedValue = Math.round(snappedValue * pow) / pow;\n }\n return snappedValue;\n}\nfunction $9446cca9a3875146$export$b6268554fba451f(value, digits, base = 10) {\n const pow = Math.pow(base, digits);\n return Math.round(value * pow) / pow;\n}\n\n\n\n\nexport {$458b0a5536c1a7cf$export$40bfa8c7b0832715 as useControlledState, $9446cca9a3875146$export$7d15b64cf5a3a4c4 as clamp, $9446cca9a3875146$export$cb6e0bb50bc19463 as snapValueToStep, $9446cca9a3875146$export$b6268554fba451f as toFixedNumber};\n//# sourceMappingURL=module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useControlledState} from './useControlledState';\nexport {clamp, snapValueToStep, toFixedNumber} from './number';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef, useState} from 'react';\n\nexport function useControlledState(value: T, defaultValue: T | undefined, onChange?: (v: C, ...args: any[]) => void): [T, (value: T) => void];\nexport function useControlledState(value: T | undefined, defaultValue: T, onChange?: (v: C, ...args: any[]) => void): [T, (value: T) => void];\nexport function useControlledState(value: T, defaultValue: T, onChange?: (v: C, ...args: any[]) => void): [T, (value: T) => void] {\n let [stateValue, setStateValue] = useState(value || defaultValue);\n\n let isControlledRef = useRef(value !== undefined);\n let isControlled = value !== undefined;\n useEffect(() => {\n let wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`);\n }\n isControlledRef.current = isControlled;\n }, [isControlled]);\n\n let currentValue = isControlled ? value : stateValue;\n let setValue = useCallback((value, ...args) => {\n let onChangeCaller = (value, ...onChangeArgs) => {\n if (onChange) {\n if (!Object.is(currentValue, value)) {\n onChange(value, ...onChangeArgs);\n }\n }\n if (!isControlled) {\n // If uncontrolled, mutate the currentValue local variable so that\n // calling setState multiple times with the same value only emits onChange once.\n // We do not use a ref for this because we specifically _do_ want the value to\n // reset every render, and assigning to a ref in render breaks aborted suspended renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n currentValue = value;\n }\n };\n\n if (typeof value === 'function') {\n console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');\n // this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates\n // when someone using useControlledState calls setControlledState(myFunc)\n // this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc\n // if we're in an uncontrolled state, then we also return the value of myFunc which to setState looks as though it was just called with myFunc from the beginning\n // otherwise we just return the controlled value, which won't cause a rerender because React knows to bail out when the value is the same\n let updateFunction = (oldValue, ...functionArgs) => {\n let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);\n onChangeCaller(interceptedValue, ...args);\n if (!isControlled) {\n return interceptedValue;\n }\n return oldValue;\n };\n setStateValue(updateFunction);\n } else {\n if (!isControlled) {\n setStateValue(value);\n }\n onChangeCaller(value, ...args);\n }\n }, [isControlled, currentValue, onChange]);\n\n return [currentValue, setValue];\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest valid step.\n */\nexport function clamp(value: number, min: number = -Infinity, max: number = Infinity): number {\n let newValue = Math.min(Math.max(value, min), max);\n return newValue;\n}\n\nexport function snapValueToStep(value: number, min: number | undefined, max: number | undefined, step: number): number {\n min = Number(min);\n max = Number(max);\n let remainder = ((value - (isNaN(min) ? 0 : min)) % step);\n let snappedValue = Math.abs(remainder) * 2 >= step\n ? value + Math.sign(remainder) * (step - Math.abs(remainder))\n : value - remainder;\n\n if (!isNaN(min)) {\n if (snappedValue < min) {\n snappedValue = min;\n } else if (!isNaN(max) && snappedValue > max) {\n snappedValue = min + Math.floor((max - min) / step) * step;\n }\n } else if (!isNaN(max) && snappedValue > max) {\n snappedValue = Math.floor(max / step) * step;\n }\n\n // correct floating point behavior by rounding to step precision\n let string = step.toString();\n let index = string.indexOf('.');\n let precision = index >= 0 ? string.length - index : 0;\n\n if (precision > 0) {\n let pow = Math.pow(10, precision);\n snappedValue = Math.round(snappedValue * pow) / pow;\n }\n\n return snappedValue;\n}\n\n/* Takes a value and rounds off to the number of digits. */\nexport function toFixedNumber(value: number, digits: number, base: number = 10): number {\n const pow = Math.pow(base, digits);\n\n return Math.round(value * pow) / pow;\n}\n","import $73SJx$react, {useContext as $73SJx$useContext, useState as $73SJx$useState, useMemo as $73SJx$useMemo, useLayoutEffect as $73SJx$useLayoutEffect, useRef as $73SJx$useRef} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $73SJx$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $73SJx$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $73SJx$useState)(true);\n let value = (0, $73SJx$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? \"\" : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== \"undefined\") // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $73SJx$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $73SJx$react)[\"useId\"] === \"function\") {\n if (process.env.NODE_ENV !== \"test\" && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn(\"In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.\");\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $73SJx$react).createElement((0, $73SJx$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $73SJx$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== \"undefined\" && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $73SJx$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $73SJx$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $73SJx$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM) console.warn(\"When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.\");\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === \"test\" ? \"react-aria\" : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n // @ts-ignore\n let id = (0, $73SJx$react).useId();\n let [didSSR] = (0, $73SJx$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === \"test\" ? \"react-aria\" : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $73SJx$react)[\"useId\"] === \"function\" ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $73SJx$react)[\"useSyncExternalStore\"] === \"function\") return (0, $73SJx$react)[\"useSyncExternalStore\"]($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $73SJx$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR};\n//# sourceMappingURL=module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {SSRProvider, useSSRSafeId, useIsSSR} from './SSRProvider';\nexport type {SSRProviderProps} from './SSRProvider';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\nimport React, {ReactNode, useContext, useLayoutEffect, useMemo, useRef, useState} from 'react';\n\n// To support SSR, the auto incrementing id counter is stored in a context. This allows\n// it to be reset on every request to ensure the client and server are consistent.\n// There is also a prefix string that is used to support async loading components\n// Each async boundary must be wrapped in an SSR provider, which appends to the prefix\n// and resets the current id counter. This ensures that async loaded components have\n// consistent ids regardless of the loading order.\ninterface SSRContextValue {\n prefix: string,\n current: number\n}\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst defaultContext: SSRContextValue = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\n\nconst SSRContext = React.createContext(defaultContext);\nconst IsSSRContext = React.createContext(false);\n\nexport interface SSRProviderProps {\n /** Your application here. */\n children: ReactNode\n}\n\n// This is only used in React < 18.\nfunction LegacySSRProvider(props: SSRProviderProps): JSX.Element {\n let cur = useContext(SSRContext);\n let counter = useCounter(cur === defaultContext);\n let [isSSR, setIsSSR] = useState(true);\n let value: SSRContextValue = useMemo(() => ({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [cur, counter]);\n\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') {\n // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useLayoutEffect(() => {\n setIsSSR(false);\n }, []);\n }\n\n return (\n \n \n {props.children}\n \n \n );\n}\n\nlet warnedAboutSSRProvider = false;\n\n/**\n * When using SSR with React Aria in React 16 or 17, applications must be wrapped in an SSRProvider.\n * This ensures that auto generated ids are consistent between the client and server.\n */\nexport function SSRProvider(props: SSRProviderProps): JSX.Element {\n if (typeof React['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && !warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n warnedAboutSSRProvider = true;\n }\n return <>{props.children};\n }\n return ;\n}\n\nlet canUseDOM = Boolean(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nlet componentIds = new WeakMap();\n\nfunction useCounter(isDisabled = false) {\n let ctx = useContext(SSRContext);\n let ref = useRef(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;\n if (currentOwner) {\n let prevComponentValue = componentIds.get(currentOwner);\n if (prevComponentValue == null) {\n // On the first render, and first call to useId, store the id and state in our weak map.\n componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n } else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n componentIds.delete(currentOwner);\n }\n }\n\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\n\nfunction useLegacySSRSafeId(defaultId?: string): string {\n let ctx = useContext(SSRContext);\n\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === defaultContext && !canUseDOM) {\n console.warn('When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.');\n }\n\n let counter = useCounter(!!defaultId);\n let prefix = ctx === defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\n\nfunction useModernSSRSafeId(defaultId?: string): string {\n // @ts-ignore\n let id = React.useId();\n let [didSSR] = useState(useIsSSR());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\n\n// Use React.useId in React 18 if available, otherwise fall back to our old implementation.\n/** @private */\nexport const useSSRSafeId = typeof React['useId'] === 'function' ? useModernSSRSafeId : useLegacySSRSafeId;\n\nfunction getSnapshot() {\n return false;\n}\n\nfunction getServerSnapshot() {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction subscribe(onStoreChange: () => void): () => void {\n // noop\n return () => {};\n}\n\n/**\n * Returns whether the component is currently being server side rendered or\n * hydrated on the client. Can be used to delay browser-specific rendering\n * until after hydration.\n */\nexport function useIsSSR(): boolean {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof React['useSyncExternalStore'] === 'function') {\n return React['useSyncExternalStore'](subscribe, getSnapshot, getServerSnapshot);\n }\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useContext(IsSSRContext);\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t{\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener(\"languagechange\", $1e5a04cdaf7d1af8$var$updateLocale);\n $1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);\n return ()=>{\n $1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener(\"languagechange\", $1e5a04cdaf7d1af8$var$updateLocale);\n };\n }, []);\n // We cannot determine the browser's language on the server, so default to\n // en-US. This will be updated after hydration on the client to the correct value.\n if (isSSR) return {\n locale: \"en-US\",\n direction: \"ltr\"\n };\n return defaultLocale;\n}\n\n\n\nconst $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (0, $iFADg$react).createContext(null);\nfunction $18f2051aff69b9bf$export$a54013f0d02a8f82(props) {\n let { locale: locale, children: children } = props;\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let value = locale ? {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? \"rtl\" : \"ltr\"\n } : defaultLocale;\n return /*#__PURE__*/ (0, $iFADg$react).createElement($18f2051aff69b9bf$var$I18nContext.Provider, {\n value: value\n }, children);\n}\nfunction $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let context = (0, $iFADg$useContext)($18f2051aff69b9bf$var$I18nContext);\n return context || defaultLocale;\n}\n\n\nvar $2aa2084a6c2b6b4f$exports = {};\n\"use strict\";\n\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $fca6afa0e843324b$var$cache = new WeakMap();\nfunction $fca6afa0e843324b$var$getCachedDictionary(strings) {\n let dictionary = $fca6afa0e843324b$var$cache.get(strings);\n if (!dictionary) {\n dictionary = new (0, $iFADg$LocalizedStringDictionary)(strings);\n $fca6afa0e843324b$var$cache.set(strings, dictionary);\n }\n return dictionary;\n}\nfunction $fca6afa0e843324b$export$f12b703ca79dfbb1(strings) {\n let { locale: locale } = (0, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();\n let dictionary = (0, $iFADg$useMemo)(()=>$fca6afa0e843324b$var$getCachedDictionary(strings), [\n strings\n ]);\n return (0, $iFADg$useMemo)(()=>new (0, $iFADg$LocalizedStringFormatter)(locale, dictionary), [\n locale,\n dictionary\n ]);\n}\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $33bf17300c498528$export$a2f47a3d2973640(options = {}) {\n let { locale: locale } = (0, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();\n // @ts-ignore\n return (0, $iFADg$useMemo)(()=>new Intl.ListFormat(locale, options), [\n locale,\n options\n ]);\n}\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $896ba0a80a8f4d36$export$85fd5fdf27bacc79(options) {\n // Reuse last options object if it is shallowly equal, which allows the useMemo result to also be reused.\n options = (0, $iFADg$useDeepMemo)(options, $896ba0a80a8f4d36$var$isEqual);\n let { locale: locale } = (0, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();\n return (0, $iFADg$useMemo)(()=>new (0, $iFADg$DateFormatter)(locale, options), [\n locale,\n options\n ]);\n}\nfunction $896ba0a80a8f4d36$var$isEqual(a, b) {\n if (a === b) return true;\n let aKeys = Object.keys(a);\n let bKeys = Object.keys(b);\n if (aKeys.length !== bKeys.length) return false;\n for (let key of aKeys){\n if (b[key] !== a[key]) return false;\n }\n return true;\n}\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nfunction $a916eb452884faea$export$b7a616150fdb9f44(options = {}) {\n let { locale: locale } = (0, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();\n return (0, $iFADg$useMemo)(()=>new (0, $iFADg$NumberFormatter)(locale, options), [\n locale,\n options\n ]);\n}\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nlet $325a3faab7a68acd$var$cache = new Map();\nfunction $325a3faab7a68acd$export$a16aca283550c30d(options) {\n let { locale: locale } = (0, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();\n let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : \"\");\n if ($325a3faab7a68acd$var$cache.has(cacheKey)) return $325a3faab7a68acd$var$cache.get(cacheKey);\n let formatter = new Intl.Collator(locale, options);\n $325a3faab7a68acd$var$cache.set(cacheKey, formatter);\n return formatter;\n}\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $bb77f239b46e8c72$export$3274cf84b703fff(options) {\n let collator = (0, $325a3faab7a68acd$export$a16aca283550c30d)({\n usage: \"search\",\n ...options\n });\n // TODO(later): these methods don't currently support the ignorePunctuation option.\n let startsWith = (0, $iFADg$useCallback)((string, substring)=>{\n if (substring.length === 0) return true;\n // Normalize both strings so we can slice safely\n // TODO: take into account the ignorePunctuation option as well...\n string = string.normalize(\"NFC\");\n substring = substring.normalize(\"NFC\");\n return collator.compare(string.slice(0, substring.length), substring) === 0;\n }, [\n collator\n ]);\n let endsWith = (0, $iFADg$useCallback)((string, substring)=>{\n if (substring.length === 0) return true;\n string = string.normalize(\"NFC\");\n substring = substring.normalize(\"NFC\");\n return collator.compare(string.slice(-substring.length), substring) === 0;\n }, [\n collator\n ]);\n let contains = (0, $iFADg$useCallback)((string, substring)=>{\n if (substring.length === 0) return true;\n string = string.normalize(\"NFC\");\n substring = substring.normalize(\"NFC\");\n let scan = 0;\n let sliceLen = substring.length;\n for(; scan + sliceLen <= string.length; scan++){\n let slice = string.slice(scan, scan + sliceLen);\n if (collator.compare(substring, slice) === 0) return true;\n }\n return false;\n }, [\n collator\n ]);\n return (0, $iFADg$useMemo)(()=>({\n startsWith: startsWith,\n endsWith: endsWith,\n contains: contains\n }), [\n startsWith,\n endsWith,\n contains\n ]);\n}\n\n\n\n\nexport {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale, $fca6afa0e843324b$export$f12b703ca79dfbb1 as useLocalizedStringFormatter, $33bf17300c498528$export$a2f47a3d2973640 as useListFormatter, $896ba0a80a8f4d36$export$85fd5fdf27bacc79 as useDateFormatter, $a916eb452884faea$export$b7a616150fdb9f44 as useNumberFormatter, $325a3faab7a68acd$export$a16aca283550c30d as useCollator, $bb77f239b46e8c72$export$3274cf84b703fff as useFilter};\n//# sourceMappingURL=real-module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {I18nProvider, useLocale} from './context';\nexport {useMessageFormatter} from './useMessageFormatter';\nexport {useLocalizedStringFormatter} from './useLocalizedStringFormatter';\nexport {useListFormatter} from './useListFormatter';\nexport {useDateFormatter} from './useDateFormatter';\nexport {useNumberFormatter} from './useNumberFormatter';\nexport {useCollator} from './useCollator';\nexport {useFilter} from './useFilter';\n\nexport type {FormatMessage} from './useMessageFormatter';\nexport type {I18nProviderProps} from './context';\nexport type {Locale} from './useDefaultLocale';\nexport type {LocalizedStrings} from '@internationalized/message';\nexport type {DateFormatterOptions} from './useDateFormatter';\nexport type {DateFormatter} from '@internationalized/date';\nexport type {Filter} from './useFilter';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n /** Contents that should have the locale applied. */\n children: ReactNode,\n /** The locale to apply to the children. */\n locale?: string\n}\n\nconst I18nContext = React.createContext(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps) {\n let {locale, children} = props;\n let defaultLocale = useDefaultLocale();\n\n let value: Locale = locale ? {\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n } : defaultLocale;\n\n return (\n \n {children}\n \n );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n let defaultLocale = useDefaultLocale();\n let context = useContext(I18nContext);\n return context || defaultLocale;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(locale: string) {\n // If the Intl.Locale API is available, use it to get the script for the locale.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n // @ts-ignore\n if (Intl.Locale) {\n // @ts-ignore\n let script = new Intl.Locale(locale).maximize().script;\n return RTL_SCRIPTS.has(script);\n }\n\n // If not, just guess by the language (first part of the locale)\n let lang = locale.split('-')[0];\n return RTL_LANGS.has(lang);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Direction} from '@react-types/shared';\nimport {isRTL} from './utils';\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\nexport interface Locale {\n /** The [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for the locale. */\n locale: string,\n /** The writing direction for the locale. */\n direction: Direction\n}\n\n/**\n * Gets the locale setting of the browser.\n */\nexport function getDefaultLocale(): Locale {\n // @ts-ignore\n let locale = (typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage)) || 'en-US';\n try {\n // @ts-ignore\n Intl.DateTimeFormat.supportedLocalesOf([locale]);\n } catch (_err) {\n locale = 'en-US';\n }\n return {\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n };\n}\n\nlet currentLocale = getDefaultLocale();\nlet listeners = new Set<(locale: Locale) => void>();\n\nfunction updateLocale() {\n currentLocale = getDefaultLocale();\n for (let listener of listeners) {\n listener(currentLocale);\n }\n}\n\n/**\n * Returns the current browser/system language, and updates when it changes.\n */\nexport function useDefaultLocale(): Locale {\n let isSSR = useIsSSR();\n let [defaultLocale, setDefaultLocale] = useState(currentLocale);\n\n useEffect(() => {\n if (listeners.size === 0) {\n window.addEventListener('languagechange', updateLocale);\n }\n\n listeners.add(setDefaultLocale);\n\n return () => {\n listeners.delete(setDefaultLocale);\n if (listeners.size === 0) {\n window.removeEventListener('languagechange', updateLocale);\n }\n };\n }, []);\n\n // We cannot determine the browser's language on the server, so default to\n // en-US. This will be updated after hydration on the client to the correct value.\n if (isSSR) {\n return {\n locale: 'en-US',\n direction: 'ltr'\n };\n }\n\n return defaultLocale;\n}\n","\"use strict\";","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {LocalizedString, LocalizedStringDictionary, LocalizedStringFormatter, LocalizedStrings} from '@internationalized/string';\nimport {useLocale} from './context';\nimport {useMemo} from 'react';\n\nconst cache = new WeakMap();\nfunction getCachedDictionary(strings: LocalizedStrings): LocalizedStringDictionary {\n let dictionary = cache.get(strings);\n if (!dictionary) {\n dictionary = new LocalizedStringDictionary(strings);\n cache.set(strings, dictionary);\n }\n\n return dictionary;\n}\n\n/**\n * Provides localized string formatting for the current locale. Supports interpolating variables,\n * selecting the correct pluralization, and formatting numbers. Automatically updates when the locale changes.\n * @param strings - A mapping of languages to localized strings by key.\n */\nexport function useLocalizedStringFormatter(strings: LocalizedStrings): LocalizedStringFormatter {\n let {locale} = useLocale();\n let dictionary = useMemo(() => getCachedDictionary(strings), [strings]);\n return useMemo(() => new LocalizedStringFormatter(locale, dictionary), [locale, dictionary]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useLocale} from './context';\nimport {useMemo} from 'react';\n\n/**\n * Provides localized list formatting for the current locale. Automatically updates when the locale changes,\n * and handles caching of the list formatter for performance.\n * @param options - Formatting options.\n */\n\n// Typescript version 4.7 supports Intl.ListFormat - TODO upgrade\n// @ts-ignore\nexport function useListFormatter(options: Intl.ListFormatOptions = {}): Intl.ListFormat {\n let {locale} = useLocale();\n // @ts-ignore\n return useMemo(() => new Intl.ListFormat(locale, options), [locale, options]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DateFormatter} from '@internationalized/date';\nimport {useDeepMemo} from '@react-aria/utils';\nimport {useLocale} from './context';\nimport {useMemo} from 'react';\n\nexport interface DateFormatterOptions extends Intl.DateTimeFormatOptions {\n calendar?: string\n}\n\n/**\n * Provides localized date formatting for the current locale. Automatically updates when the locale changes,\n * and handles caching of the date formatter for performance.\n * @param options - Formatting options.\n */\nexport function useDateFormatter(options?: DateFormatterOptions): DateFormatter {\n // Reuse last options object if it is shallowly equal, which allows the useMemo result to also be reused.\n options = useDeepMemo(options, isEqual);\n let {locale} = useLocale();\n return useMemo(() => new DateFormatter(locale, options), [locale, options]);\n}\n\nfunction isEqual(a: DateFormatterOptions, b: DateFormatterOptions) {\n if (a === b) {\n return true;\n }\n\n let aKeys = Object.keys(a);\n let bKeys = Object.keys(b);\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n\n for (let key of aKeys) {\n if (b[key] !== a[key]) {\n return false;\n }\n }\n\n return true;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {NumberFormatOptions, NumberFormatter} from '@internationalized/number';\nimport {useLocale} from './context';\nimport {useMemo} from 'react';\n\n/**\n * Provides localized number formatting for the current locale. Automatically updates when the locale changes,\n * and handles caching of the number formatter for performance.\n * @param options - Formatting options.\n */\nexport function useNumberFormatter(options: NumberFormatOptions = {}): Intl.NumberFormat {\n let {locale} = useLocale();\n return useMemo(() => new NumberFormatter(locale, options), [locale, options]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useLocale} from './context';\n\nlet cache = new Map();\n\n/**\n * Provides localized string collation for the current locale. Automatically updates when the locale changes,\n * and handles caching of the collator for performance.\n * @param options - Collator options.\n */\nexport function useCollator(options?: Intl.CollatorOptions): Intl.Collator {\n let {locale} = useLocale();\n\n let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : '');\n if (cache.has(cacheKey)) {\n return cache.get(cacheKey);\n }\n\n let formatter = new Intl.Collator(locale, options);\n cache.set(cacheKey, formatter);\n return formatter;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useMemo} from 'react';\nimport {useCollator} from './useCollator';\n\nexport interface Filter {\n /** Returns whether a string starts with a given substring. */\n startsWith(string: string, substring: string): boolean,\n /** Returns whether a string ends with a given substring. */\n endsWith(string: string, substring: string): boolean,\n /** Returns whether a string contains a given substring. */\n contains(string: string, substring: string): boolean\n}\n\n/**\n * Provides localized string search functionality that is useful for filtering or matching items\n * in a list. Options can be provided to adjust the sensitivity to case, diacritics, and other parameters.\n */\nexport function useFilter(options?: Intl.CollatorOptions): Filter {\n let collator = useCollator({\n usage: 'search',\n ...options\n });\n\n // TODO(later): these methods don't currently support the ignorePunctuation option.\n let startsWith = useCallback((string, substring) => {\n if (substring.length === 0) {\n return true;\n }\n\n // Normalize both strings so we can slice safely\n // TODO: take into account the ignorePunctuation option as well...\n string = string.normalize('NFC');\n substring = substring.normalize('NFC');\n return collator.compare(string.slice(0, substring.length), substring) === 0;\n }, [collator]);\n\n let endsWith = useCallback((string, substring) => {\n if (substring.length === 0) {\n return true;\n }\n\n string = string.normalize('NFC');\n substring = substring.normalize('NFC');\n return collator.compare(string.slice(-substring.length), substring) === 0;\n }, [collator]);\n\n let contains = useCallback((string, substring) => {\n if (substring.length === 0) {\n return true;\n }\n\n string = string.normalize('NFC');\n substring = substring.normalize('NFC');\n\n let scan = 0;\n let sliceLen = substring.length;\n for (; scan + sliceLen <= string.length; scan++) {\n let slice = string.slice(scan, scan + sliceLen);\n if (collator.compare(substring, slice) === 0) {\n return true;\n }\n }\n\n return false;\n }, [collator]);\n\n return useMemo(() => ({\n startsWith,\n endsWith,\n contains\n }), [startsWith, endsWith, contains]);\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ class $5b160d28a433310d$export$c17fa47878dc55b6 {\n /** Returns a localized string for the given key and locale. */ getStringForLocale(key, locale) {\n let strings = this.strings[locale];\n if (!strings) {\n strings = $5b160d28a433310d$var$getStringsForLocale(locale, this.strings, this.defaultLocale);\n this.strings[locale] = strings;\n }\n let string = strings[key];\n if (!string) throw new Error(`Could not find intl message ${key} in ${locale} locale`);\n return string;\n }\n constructor(messages, defaultLocale = \"en-US\"){\n // Clone messages so we don't modify the original object.\n this.strings = {\n ...messages\n };\n this.defaultLocale = defaultLocale;\n }\n}\nfunction $5b160d28a433310d$var$getStringsForLocale(locale, strings, defaultLocale = \"en-US\") {\n // If there is an exact match, use it.\n if (strings[locale]) return strings[locale];\n // Attempt to find the closest match by language.\n // For example, if the locale is fr-CA (French Canadian), but there is only\n // an fr-FR (France) set of strings, use that.\n // This could be replaced with Intl.LocaleMatcher once it is supported.\n // https://github.com/tc39/proposal-intl-localematcher\n let language = $5b160d28a433310d$var$getLanguage(locale);\n if (strings[language]) return strings[language];\n for(let key in strings){\n if (key.startsWith(language + \"-\")) return strings[key];\n }\n // Nothing close, use english.\n return strings[defaultLocale];\n}\nfunction $5b160d28a433310d$var$getLanguage(locale) {\n // @ts-ignore\n if (Intl.Locale) // @ts-ignore\n return new Intl.Locale(locale).language;\n return locale.split(\"-\")[0];\n}\n\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ const $6db58dc88e78b024$var$pluralRulesCache = new Map();\nconst $6db58dc88e78b024$var$numberFormatCache = new Map();\nclass $6db58dc88e78b024$export$2f817fcdc4b89ae0 {\n /** Formats a localized string for the given key with the provided variables. */ format(key, variables) {\n let message = this.strings.getStringForLocale(key, this.locale);\n return typeof message === \"function\" ? message(variables, this) : message;\n }\n plural(count, options, type = \"cardinal\") {\n let opt = options[\"=\" + count];\n if (opt) return typeof opt === \"function\" ? opt() : opt;\n let key = this.locale + \":\" + type;\n let pluralRules = $6db58dc88e78b024$var$pluralRulesCache.get(key);\n if (!pluralRules) {\n pluralRules = new Intl.PluralRules(this.locale, {\n type: type\n });\n $6db58dc88e78b024$var$pluralRulesCache.set(key, pluralRules);\n }\n let selected = pluralRules.select(count);\n opt = options[selected] || options.other;\n return typeof opt === \"function\" ? opt() : opt;\n }\n number(value) {\n let numberFormat = $6db58dc88e78b024$var$numberFormatCache.get(this.locale);\n if (!numberFormat) {\n numberFormat = new Intl.NumberFormat(this.locale);\n $6db58dc88e78b024$var$numberFormatCache.set(this.locale, numberFormat);\n }\n return numberFormat.format(value);\n }\n select(options, value) {\n let opt = options[value] || options.other;\n return typeof opt === \"function\" ? opt() : opt;\n }\n constructor(locale, strings){\n this.locale = locale;\n this.strings = strings;\n }\n}\n\n\n\n\nexport {$5b160d28a433310d$export$c17fa47878dc55b6 as LocalizedStringDictionary, $6db58dc88e78b024$export$2f817fcdc4b89ae0 as LocalizedStringFormatter};\n//# sourceMappingURL=module.js.map\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport type {Variables, LocalizedString} from './LocalizedStringFormatter';\nexport type {LocalizedStrings} from './LocalizedStringDictionary';\nexport {LocalizedStringDictionary} from './LocalizedStringDictionary';\nexport {LocalizedStringFormatter} from './LocalizedStringFormatter';\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {LocalizedString} from './LocalizedStringFormatter';\n\nexport type LocalizedStrings = {\n [lang: string]: Record\n};\n\n/**\n * Stores a mapping of localized strings. Can be used to find the\n * closest available string for a given locale.\n */\nexport class LocalizedStringDictionary {\n private strings: LocalizedStrings;\n private defaultLocale: string;\n\n constructor(messages: LocalizedStrings, defaultLocale: string = 'en-US') {\n // Clone messages so we don't modify the original object.\n this.strings = {...messages};\n this.defaultLocale = defaultLocale;\n }\n\n /** Returns a localized string for the given key and locale. */\n getStringForLocale(key: K, locale: string): T {\n let strings = this.strings[locale];\n if (!strings) {\n strings = getStringsForLocale(locale, this.strings, this.defaultLocale);\n this.strings[locale] = strings;\n }\n\n let string = strings[key];\n if (!string) {\n throw new Error(`Could not find intl message ${key} in ${locale} locale`);\n }\n\n return string;\n }\n}\n\nfunction getStringsForLocale(locale: string, strings: LocalizedStrings, defaultLocale = 'en-US') {\n // If there is an exact match, use it.\n if (strings[locale]) {\n return strings[locale];\n }\n\n // Attempt to find the closest match by language.\n // For example, if the locale is fr-CA (French Canadian), but there is only\n // an fr-FR (France) set of strings, use that.\n // This could be replaced with Intl.LocaleMatcher once it is supported.\n // https://github.com/tc39/proposal-intl-localematcher\n let language = getLanguage(locale);\n if (strings[language]) {\n return strings[language];\n }\n\n for (let key in strings) {\n if (key.startsWith(language + '-')) {\n return strings[key];\n }\n }\n\n // Nothing close, use english.\n return strings[defaultLocale];\n}\n\nfunction getLanguage(locale: string) {\n // @ts-ignore\n if (Intl.Locale) {\n // @ts-ignore\n return new Intl.Locale(locale).language;\n }\n\n return locale.split('-')[0];\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport type {LocalizedStringDictionary} from './LocalizedStringDictionary';\n\nexport type Variables = Record | undefined;\nexport type LocalizedString = string | ((args: Variables, formatter?: LocalizedStringFormatter) => string);\ntype InternalString = string | (() => string);\n\nconst pluralRulesCache = new Map();\nconst numberFormatCache = new Map();\n\n/**\n * Formats localized strings from a LocalizedStringDictionary. Supports interpolating variables,\n * selecting the correct pluralization, and formatting numbers for the locale.\n */\nexport class LocalizedStringFormatter {\n private locale: string;\n private strings: LocalizedStringDictionary;\n\n constructor(locale: string, strings: LocalizedStringDictionary) {\n this.locale = locale;\n this.strings = strings;\n }\n\n /** Formats a localized string for the given key with the provided variables. */\n format(key: K, variables?: Variables): string {\n let message = this.strings.getStringForLocale(key, this.locale);\n return typeof message === 'function' ? message(variables, this) : message;\n }\n\n protected plural(count: number, options: Record, type: Intl.PluralRuleType = 'cardinal') {\n let opt = options['=' + count];\n if (opt) {\n return typeof opt === 'function' ? opt() : opt;\n }\n\n let key = this.locale + ':' + type;\n let pluralRules = pluralRulesCache.get(key);\n if (!pluralRules) {\n pluralRules = new Intl.PluralRules(this.locale, {type});\n pluralRulesCache.set(key, pluralRules);\n }\n\n let selected = pluralRules.select(count);\n opt = options[selected] || options.other;\n return typeof opt === 'function' ? opt() : opt;\n }\n\n protected number(value: number) {\n let numberFormat = numberFormatCache.get(this.locale);\n if (!numberFormat) {\n numberFormat = new Intl.NumberFormat(this.locale);\n numberFormatCache.set(this.locale, numberFormat);\n }\n return numberFormat.format(value);\n }\n\n protected select(options: Record, value: string) {\n let opt = options[value] || options.other;\n return typeof opt === 'function' ? opt() : opt;\n }\n}\n","import {_ as $cUVuN$_} from \"@swc/helpers/_/_class_private_field_init\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Portions of the code in this file are based on code from the TC39 Temporal proposal.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $2b4dce13dd5a17fa$export$842a2cf37af977e1(amount, numerator) {\n return amount - numerator * Math.floor(amount / numerator);\n}\nfunction $2b4dce13dd5a17fa$export$784d13d8ee351f07(date) {\n if (date.era) return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(date.calendar, date.era, date.year, date.month, date.day);\n else return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(date.calendar, date.year, date.month, date.day);\n}\nfunction $2b4dce13dd5a17fa$export$27fa0172ae2644b3(date) {\n if (date.era) return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);\n else return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.year, date.month, date.day, date.hour, date.minute, date.second);\n}\n\n\nconst $3b62074eb05584b2$var$EPOCH = 1721426; // 001/01/03 Julian C.E.\nfunction $3b62074eb05584b2$export$f297eb839006d339(era, year, month, day) {\n year = $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year);\n let y1 = year - 1;\n let monthOffset = -2;\n if (month <= 2) monthOffset = 0;\n else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) monthOffset = -1;\n return $3b62074eb05584b2$var$EPOCH - 1 + 365 * y1 + Math.floor(y1 / 4) - Math.floor(y1 / 100) + Math.floor(y1 / 400) + Math.floor((367 * month - 362) / 12 + monthOffset + day);\n}\nfunction $3b62074eb05584b2$export$553d7fa8e3805fc0(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\nfunction $3b62074eb05584b2$export$c36e0ecb2d4fa69d(era, year) {\n return era === \"BC\" ? 1 - year : year;\n}\nfunction $3b62074eb05584b2$export$4475b7e617eb123c(year) {\n let era = \"AD\";\n if (year <= 0) {\n era = \"BC\";\n year = 1 - year;\n }\n return [\n era,\n year\n ];\n}\nconst $3b62074eb05584b2$var$daysInMonth = {\n standard: [\n 31,\n 28,\n 31,\n 30,\n 31,\n 30,\n 31,\n 31,\n 30,\n 31,\n 30,\n 31\n ],\n leapyear: [\n 31,\n 29,\n 31,\n 30,\n 31,\n 30,\n 31,\n 31,\n 30,\n 31,\n 30,\n 31\n ]\n};\nclass $3b62074eb05584b2$export$80ee6245ec4f29ec {\n fromJulianDay(jd) {\n let jd0 = jd;\n let depoch = jd0 - $3b62074eb05584b2$var$EPOCH;\n let quadricent = Math.floor(depoch / 146097);\n let dqc = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(depoch, 146097);\n let cent = Math.floor(dqc / 36524);\n let dcent = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(dqc, 36524);\n let quad = Math.floor(dcent / 1461);\n let dquad = (0, $2b4dce13dd5a17fa$export$842a2cf37af977e1)(dcent, 1461);\n let yindex = Math.floor(dquad / 365);\n let extendedYear = quadricent * 400 + cent * 100 + quad * 4 + yindex + (cent !== 4 && yindex !== 4 ? 1 : 0);\n let [era, year] = $3b62074eb05584b2$export$4475b7e617eb123c(extendedYear);\n let yearDay = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, 1, 1);\n let leapAdj = 2;\n if (jd0 < $3b62074eb05584b2$export$f297eb839006d339(era, year, 3, 1)) leapAdj = 0;\n else if ($3b62074eb05584b2$export$553d7fa8e3805fc0(year)) leapAdj = 1;\n let month = Math.floor(((yearDay + leapAdj) * 12 + 373) / 367);\n let day = jd0 - $3b62074eb05584b2$export$f297eb839006d339(era, year, month, 1) + 1;\n return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, month, day);\n }\n toJulianDay(date) {\n return $3b62074eb05584b2$export$f297eb839006d339(date.era, date.year, date.month, date.day);\n }\n getDaysInMonth(date) {\n return $3b62074eb05584b2$var$daysInMonth[$3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? \"leapyear\" : \"standard\"][date.month - 1];\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getMonthsInYear(date) {\n return 12;\n }\n getDaysInYear(date) {\n return $3b62074eb05584b2$export$553d7fa8e3805fc0(date.year) ? 366 : 365;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getYearsInEra(date) {\n return 9999;\n }\n getEras() {\n return [\n \"BC\",\n \"AD\"\n ];\n }\n isInverseEra(date) {\n return date.era === \"BC\";\n }\n balanceDate(date) {\n if (date.year <= 0) {\n date.era = date.era === \"BC\" ? \"AD\" : \"BC\";\n date.year = 1 - date.year;\n }\n }\n constructor(){\n this.identifier = \"gregory\";\n }\n}\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Data from https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json\n// Locales starting on Sunday have been removed for compression.\nconst $2fe286d2fb449abb$export$7a5acbd77d414bd9 = {\n \"001\": 1,\n AD: 1,\n AE: 6,\n AF: 6,\n AI: 1,\n AL: 1,\n AM: 1,\n AN: 1,\n AR: 1,\n AT: 1,\n AU: 1,\n AX: 1,\n AZ: 1,\n BA: 1,\n BE: 1,\n BG: 1,\n BH: 6,\n BM: 1,\n BN: 1,\n BY: 1,\n CH: 1,\n CL: 1,\n CM: 1,\n CN: 1,\n CR: 1,\n CY: 1,\n CZ: 1,\n DE: 1,\n DJ: 6,\n DK: 1,\n DZ: 6,\n EC: 1,\n EE: 1,\n EG: 6,\n ES: 1,\n FI: 1,\n FJ: 1,\n FO: 1,\n FR: 1,\n GB: 1,\n GE: 1,\n GF: 1,\n GP: 1,\n GR: 1,\n HR: 1,\n HU: 1,\n IE: 1,\n IQ: 6,\n IR: 6,\n IS: 1,\n IT: 1,\n JO: 6,\n KG: 1,\n KW: 6,\n KZ: 1,\n LB: 1,\n LI: 1,\n LK: 1,\n LT: 1,\n LU: 1,\n LV: 1,\n LY: 6,\n MC: 1,\n MD: 1,\n ME: 1,\n MK: 1,\n MN: 1,\n MQ: 1,\n MV: 5,\n MY: 1,\n NL: 1,\n NO: 1,\n NZ: 1,\n OM: 6,\n PL: 1,\n QA: 6,\n RE: 1,\n RO: 1,\n RS: 1,\n RU: 1,\n SD: 6,\n SE: 1,\n SI: 1,\n SK: 1,\n SM: 1,\n SY: 6,\n TJ: 1,\n TM: 1,\n TR: 1,\n UA: 1,\n UY: 1,\n UZ: 1,\n VA: 1,\n VN: 1,\n XK: 1\n};\n\n\nfunction $14e0f24ef4ac5c92$export$ea39ec197993aef0(a, b) {\n b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);\n return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;\n}\nfunction $14e0f24ef4ac5c92$export$a18c89cbd24170ff(a, b) {\n b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);\n // In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month.\n a = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(a);\n b = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(b);\n return a.era === b.era && a.year === b.year && a.month === b.month;\n}\nfunction $14e0f24ef4ac5c92$export$5841f9eb9773f25f(a, b) {\n b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);\n a = $14e0f24ef4ac5c92$export$f91e89d3d0406102(a);\n b = $14e0f24ef4ac5c92$export$f91e89d3d0406102(b);\n return a.era === b.era && a.year === b.year;\n}\nfunction $14e0f24ef4ac5c92$export$91b62ebf2ba703ee(a, b) {\n return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;\n}\nfunction $14e0f24ef4ac5c92$export$5a8da0c44a3afdf2(a, b) {\n a = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(a);\n b = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(b);\n return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year && a.month === b.month;\n}\nfunction $14e0f24ef4ac5c92$export$ea840f5a6dda8147(a, b) {\n a = $14e0f24ef4ac5c92$export$f91e89d3d0406102(a);\n b = $14e0f24ef4ac5c92$export$f91e89d3d0406102(b);\n return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year;\n}\nfunction $14e0f24ef4ac5c92$export$629b0a497aa65267(date, timeZone) {\n return $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone));\n}\nfunction $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date, locale) {\n let julian = date.calendar.toJulianDay(date);\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let dayOfWeek = Math.ceil(julian + 1 - $14e0f24ef4ac5c92$var$getWeekStart(locale)) % 7;\n if (dayOfWeek < 0) dayOfWeek += 7;\n return dayOfWeek;\n}\nfunction $14e0f24ef4ac5c92$export$461939dd4422153(timeZone) {\n return (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(Date.now(), timeZone);\n}\nfunction $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone) {\n return (0, $11d87f3f76e88657$export$93522d1a439f3617)($14e0f24ef4ac5c92$export$461939dd4422153(timeZone));\n}\nfunction $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) {\n return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);\n}\nfunction $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {\n return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);\n}\nfunction $14e0f24ef4ac5c92$var$timeToMs(a) {\n return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;\n}\nfunction $14e0f24ef4ac5c92$export$126c91c941de7e(a, timeZone) {\n let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(a, timeZone);\n let tomorrow = a.add({\n days: 1\n });\n let tomorrowMs = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(tomorrow, timeZone);\n return (tomorrowMs - ms) / 3600000;\n}\nlet $14e0f24ef4ac5c92$var$localTimeZone = null;\nfunction $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {\n // TODO: invalidate this somehow?\n if ($14e0f24ef4ac5c92$var$localTimeZone == null) $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;\n return $14e0f24ef4ac5c92$var$localTimeZone;\n}\nfunction $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date) {\n // Use `subtract` instead of `set` so we don't get constrained in an era.\n return date.subtract({\n days: date.day - 1\n });\n}\nfunction $14e0f24ef4ac5c92$export$a2258d9c4118825c(date) {\n return date.add({\n days: date.calendar.getDaysInMonth(date) - date.day\n });\n}\nfunction $14e0f24ef4ac5c92$export$f91e89d3d0406102(date) {\n return $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date.subtract({\n months: date.month - 1\n }));\n}\nfunction $14e0f24ef4ac5c92$export$8b7aa55c66d5569e(date) {\n return $14e0f24ef4ac5c92$export$a2258d9c4118825c(date.add({\n months: date.calendar.getMonthsInYear(date) - date.month\n }));\n}\nfunction $14e0f24ef4ac5c92$export$5412ac11713b72ad(date) {\n if (date.calendar.getMinimumMonthInYear) return date.calendar.getMinimumMonthInYear(date);\n return 1;\n}\nfunction $14e0f24ef4ac5c92$export$b2f4953d301981d5(date) {\n if (date.calendar.getMinimumDayInMonth) return date.calendar.getMinimumDayInMonth(date);\n return 1;\n}\nfunction $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(date, locale) {\n let dayOfWeek = $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date, locale);\n return date.subtract({\n days: dayOfWeek\n });\n}\nfunction $14e0f24ef4ac5c92$export$ef8b6d9133084f4e(date, locale) {\n return $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(date, locale).add({\n days: 6\n });\n}\nconst $14e0f24ef4ac5c92$var$cachedRegions = new Map();\nfunction $14e0f24ef4ac5c92$var$getRegion(locale) {\n // If the Intl.Locale API is available, use it to get the region for the locale.\n // @ts-ignore\n if (Intl.Locale) {\n // Constructing an Intl.Locale is expensive, so cache the result.\n let region = $14e0f24ef4ac5c92$var$cachedRegions.get(locale);\n if (!region) {\n // @ts-ignore\n region = new Intl.Locale(locale).maximize().region;\n $14e0f24ef4ac5c92$var$cachedRegions.set(locale, region);\n }\n return region;\n }\n // If not, just try splitting the string.\n // If the second part of the locale string is 'u',\n // then this is a unicode extension, so ignore it.\n // Otherwise, it should be the region.\n let part = locale.split(\"-\")[1];\n return part === \"u\" ? null : part;\n}\nfunction $14e0f24ef4ac5c92$var$getWeekStart(locale) {\n // TODO: use Intl.Locale for this once browsers support the weekInfo property\n // https://github.com/tc39/proposal-intl-locale-info\n let region = $14e0f24ef4ac5c92$var$getRegion(locale);\n return (0, $2fe286d2fb449abb$export$7a5acbd77d414bd9)[region] || 0;\n}\nfunction $14e0f24ef4ac5c92$export$ccc1b2479e7dd654(date, locale) {\n let days = date.calendar.getDaysInMonth(date);\n return Math.ceil(($14e0f24ef4ac5c92$export$2061056d06d7cdf7($14e0f24ef4ac5c92$export$a5a3b454ada2268e(date), locale) + days) / 7);\n}\nfunction $14e0f24ef4ac5c92$export$5c333a116e949cdd(a, b) {\n if (a && b) return a.compare(b) <= 0 ? a : b;\n return a || b;\n}\nfunction $14e0f24ef4ac5c92$export$a75f2bff57811055(a, b) {\n if (a && b) return a.compare(b) >= 0 ? a : b;\n return a || b;\n}\nconst $14e0f24ef4ac5c92$var$WEEKEND_DATA = {\n AF: [\n 4,\n 5\n ],\n AE: [\n 5,\n 6\n ],\n BH: [\n 5,\n 6\n ],\n DZ: [\n 5,\n 6\n ],\n EG: [\n 5,\n 6\n ],\n IL: [\n 5,\n 6\n ],\n IQ: [\n 5,\n 6\n ],\n IR: [\n 5,\n 5\n ],\n JO: [\n 5,\n 6\n ],\n KW: [\n 5,\n 6\n ],\n LY: [\n 5,\n 6\n ],\n OM: [\n 5,\n 6\n ],\n QA: [\n 5,\n 6\n ],\n SA: [\n 5,\n 6\n ],\n SD: [\n 5,\n 6\n ],\n SY: [\n 5,\n 6\n ],\n YE: [\n 5,\n 6\n ]\n};\nfunction $14e0f24ef4ac5c92$export$618d60ea299da42(date, locale) {\n let julian = date.calendar.toJulianDay(date);\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let dayOfWeek = Math.ceil(julian + 1) % 7;\n if (dayOfWeek < 0) dayOfWeek += 7;\n let region = $14e0f24ef4ac5c92$var$getRegion(locale);\n // Use Intl.Locale for this once weekInfo is supported.\n // https://github.com/tc39/proposal-intl-locale-info\n let [start, end] = $14e0f24ef4ac5c92$var$WEEKEND_DATA[region] || [\n 6,\n 0\n ];\n return dayOfWeek === start || dayOfWeek === end;\n}\nfunction $14e0f24ef4ac5c92$export$ee9d87258e1d19ed(date, locale) {\n return !$14e0f24ef4ac5c92$export$618d60ea299da42(date, locale);\n}\n\n\nfunction $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) {\n date = $11d87f3f76e88657$export$b4a036af3fc0b032(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());\n let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);\n return $11d87f3f76e88657$var$epochFromParts(year, date.month, date.day, date.hour, date.minute, date.second, date.millisecond);\n}\nfunction $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, millisecond) {\n // Note: Date.UTC() interprets one and two-digit years as being in the\n // 20th century, so don't use it\n let date = new Date();\n date.setUTCHours(hour, minute, second, millisecond);\n date.setUTCFullYear(year, month - 1, day);\n return date.getTime();\n}\nfunction $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone) {\n // Fast path for UTC.\n if (timeZone === \"UTC\") return 0;\n // Fast path: for local timezone after 1970, use native Date.\n if (ms > 0 && timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)()) return new Date(ms).getTimezoneOffset() * -60000;\n let { year: year , month: month , day: day , hour: hour , minute: minute , second: second } = $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone);\n let utc = $11d87f3f76e88657$var$epochFromParts(year, month, day, hour, minute, second, 0);\n return utc - Math.floor(ms / 1000) * 1000;\n}\nconst $11d87f3f76e88657$var$formattersByTimeZone = new Map();\nfunction $11d87f3f76e88657$var$getTimeZoneParts(ms, timeZone) {\n let formatter = $11d87f3f76e88657$var$formattersByTimeZone.get(timeZone);\n if (!formatter) {\n formatter = new Intl.DateTimeFormat(\"en-US\", {\n timeZone: timeZone,\n hour12: false,\n era: \"short\",\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\"\n });\n $11d87f3f76e88657$var$formattersByTimeZone.set(timeZone, formatter);\n }\n let parts = formatter.formatToParts(new Date(ms));\n let namedParts = {};\n for (let part of parts)if (part.type !== \"literal\") namedParts[part.type] = part.value;\n return {\n // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253\n year: namedParts.era === \"BC\" || namedParts.era === \"B\" ? -namedParts.year + 1 : +namedParts.year,\n month: +namedParts.month,\n day: +namedParts.day,\n hour: namedParts.hour === \"24\" ? 0 : +namedParts.hour,\n minute: +namedParts.minute,\n second: +namedParts.second\n };\n}\nconst $11d87f3f76e88657$var$DAYMILLIS = 86400000;\nfunction $11d87f3f76e88657$export$136f38efe7caf549(date, timeZone) {\n let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date);\n let earlier = ms - $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);\n let later = ms - $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);\n return $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later);\n}\nfunction $11d87f3f76e88657$var$getValidWallTimes(date, timeZone, earlier, later) {\n let found = earlier === later ? [\n earlier\n ] : [\n earlier,\n later\n ];\n return found.filter((absolute)=>$11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute));\n}\nfunction $11d87f3f76e88657$var$isValidWallTime(date, timeZone, absolute) {\n let parts = $11d87f3f76e88657$var$getTimeZoneParts(absolute, timeZone);\n return date.year === parts.year && date.month === parts.month && date.day === parts.day && date.hour === parts.hour && date.minute === parts.minute && date.second === parts.second;\n}\nfunction $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation = \"compatible\") {\n let dateTime = $11d87f3f76e88657$export$b21e0b124e224484(date);\n // Fast path: if the time zone is UTC, use native Date.\n if (timeZone === \"UTC\") return $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);\n // Fast path: if the time zone is the local timezone and disambiguation is compatible, use native Date.\n if (timeZone === (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)() && disambiguation === \"compatible\") {\n dateTime = $11d87f3f76e88657$export$b4a036af3fc0b032(dateTime, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());\n // Don't use Date constructor here because two-digit years are interpreted in the 20th century.\n let date = new Date();\n let year = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(dateTime.era, dateTime.year);\n date.setFullYear(year, dateTime.month - 1, dateTime.day);\n date.setHours(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);\n return date.getTime();\n }\n let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(dateTime);\n let offsetBefore = $11d87f3f76e88657$export$59c99f3515d3493f(ms - $11d87f3f76e88657$var$DAYMILLIS, timeZone);\n let offsetAfter = $11d87f3f76e88657$export$59c99f3515d3493f(ms + $11d87f3f76e88657$var$DAYMILLIS, timeZone);\n let valid = $11d87f3f76e88657$var$getValidWallTimes(dateTime, timeZone, ms - offsetBefore, ms - offsetAfter);\n if (valid.length === 1) return valid[0];\n if (valid.length > 1) switch(disambiguation){\n // 'compatible' means 'earlier' for \"fall back\" transitions\n case \"compatible\":\n case \"earlier\":\n return valid[0];\n case \"later\":\n return valid[valid.length - 1];\n case \"reject\":\n throw new RangeError(\"Multiple possible absolute times found\");\n }\n switch(disambiguation){\n case \"earlier\":\n return Math.min(ms - offsetBefore, ms - offsetAfter);\n // 'compatible' means 'later' for \"spring forward\" transitions\n case \"compatible\":\n case \"later\":\n return Math.max(ms - offsetBefore, ms - offsetAfter);\n case \"reject\":\n throw new RangeError(\"No such absolute time found\");\n }\n}\nfunction $11d87f3f76e88657$export$e67a095c620b86fe(dateTime, timeZone, disambiguation = \"compatible\") {\n return new Date($11d87f3f76e88657$export$5107c82f94518f5c(dateTime, timeZone, disambiguation));\n}\nfunction $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone) {\n let offset = $11d87f3f76e88657$export$59c99f3515d3493f(ms, timeZone);\n let date = new Date(ms + offset);\n let year = date.getUTCFullYear();\n let month = date.getUTCMonth() + 1;\n let day = date.getUTCDate();\n let hour = date.getUTCHours();\n let minute = date.getUTCMinutes();\n let second = date.getUTCSeconds();\n let millisecond = date.getUTCMilliseconds();\n return new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)(year, month, day, timeZone, offset, hour, minute, second, millisecond);\n}\nfunction $11d87f3f76e88657$export$e57ff100d91bd4b9(date, timeZone) {\n return $11d87f3f76e88657$export$1b96692a1ba042ac(date.getTime(), timeZone);\n}\nfunction $11d87f3f76e88657$export$d7f92bcd3596b086(date) {\n return $11d87f3f76e88657$export$e57ff100d91bd4b9(date, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)());\n}\nfunction $11d87f3f76e88657$export$93522d1a439f3617(dateTime) {\n return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(dateTime.calendar, dateTime.era, dateTime.year, dateTime.month, dateTime.day);\n}\nfunction $11d87f3f76e88657$export$6f4d78149f3f53ac(date) {\n return {\n era: date.era,\n year: date.year,\n month: date.month,\n day: date.day\n };\n}\nfunction $11d87f3f76e88657$export$4d0393e732857be5(date) {\n return {\n hour: date.hour,\n minute: date.minute,\n second: date.second,\n millisecond: date.millisecond\n };\n}\nfunction $11d87f3f76e88657$export$b21e0b124e224484(date, time) {\n let hour = 0, minute = 0, second = 0, millisecond = 0;\n if (\"timeZone\" in date) ({ hour: hour , minute: minute , second: second , millisecond: millisecond } = date);\n else if (\"hour\" in date && !time) return date;\n if (time) ({ hour: hour , minute: minute , second: second , millisecond: millisecond } = time);\n return new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);\n}\nfunction $11d87f3f76e88657$export$d33f79e3ffc3dc83(dateTime) {\n return new (0, $35ea8db9cb2ccb90$export$680ea196effce5f)(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);\n}\nfunction $11d87f3f76e88657$export$b4a036af3fc0b032(date, calendar) {\n if (date.calendar.identifier === calendar.identifier) return date;\n let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));\n let copy = date.copy();\n copy.calendar = calendar;\n copy.era = calendarDate.era;\n copy.year = calendarDate.year;\n copy.month = calendarDate.month;\n copy.day = calendarDate.day;\n (0, $735220c2d4774dd3$export$c4e2ecac49351ef2)(copy);\n return copy;\n}\nfunction $11d87f3f76e88657$export$84c95a83c799e074(date, timeZone, disambiguation) {\n if (date instanceof (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)) {\n if (date.timeZone === timeZone) return date;\n return $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone);\n }\n let ms = $11d87f3f76e88657$export$5107c82f94518f5c(date, timeZone, disambiguation);\n return $11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone);\n}\nfunction $11d87f3f76e88657$export$83aac07b4c37b25(date) {\n let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;\n return new Date(ms);\n}\nfunction $11d87f3f76e88657$export$538b00033cc11c75(date, timeZone) {\n let ms = $11d87f3f76e88657$export$bd4fb2bc8bb06fb(date) - date.offset;\n return $11d87f3f76e88657$export$b4a036af3fc0b032($11d87f3f76e88657$export$1b96692a1ba042ac(ms, timeZone), date.calendar);\n}\nfunction $11d87f3f76e88657$export$d9b67bc93c097491(date) {\n return $11d87f3f76e88657$export$538b00033cc11c75(date, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)());\n}\n\n\n\nconst $735220c2d4774dd3$var$ONE_HOUR = 3600000;\nfunction $735220c2d4774dd3$export$e16d8520af44a096(date, duration) {\n let mutableDate = date.copy();\n let days = \"hour\" in mutableDate ? $735220c2d4774dd3$var$addTimeFields(mutableDate, duration) : 0;\n $735220c2d4774dd3$var$addYears(mutableDate, duration.years || 0);\n if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);\n mutableDate.month += duration.months || 0;\n $735220c2d4774dd3$var$balanceYearMonth(mutableDate);\n $735220c2d4774dd3$var$constrainMonthDay(mutableDate);\n mutableDate.day += (duration.weeks || 0) * 7;\n mutableDate.day += duration.days || 0;\n mutableDate.day += days;\n $735220c2d4774dd3$var$balanceDay(mutableDate);\n if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);\n // Constrain in case adding ended up with a date outside the valid range for the calendar system.\n // The behavior here is slightly different than when constraining in the `set` function in that\n // we adjust smaller fields to their minimum/maximum values rather than constraining each field\n // individually. This matches the general behavior of `add` vs `set` regarding how fields are balanced.\n if (mutableDate.year < 1) {\n mutableDate.year = 1;\n mutableDate.month = 1;\n mutableDate.day = 1;\n }\n let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);\n if (mutableDate.year > maxYear) {\n var _mutableDate_calendar, _mutableDate_calendar_isInverseEra;\n let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);\n mutableDate.year = maxYear;\n mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);\n mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);\n }\n if (mutableDate.month < 1) {\n mutableDate.month = 1;\n mutableDate.day = 1;\n }\n let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);\n if (mutableDate.month > maxMonth) {\n mutableDate.month = maxMonth;\n mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);\n }\n mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));\n return mutableDate;\n}\nfunction $735220c2d4774dd3$var$addYears(date, years) {\n var _date_calendar, _date_calendar_isInverseEra;\n if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date)) years = -years;\n date.year += years;\n}\nfunction $735220c2d4774dd3$var$balanceYearMonth(date) {\n while(date.month < 1){\n $735220c2d4774dd3$var$addYears(date, -1);\n date.month += date.calendar.getMonthsInYear(date);\n }\n let monthsInYear = 0;\n while(date.month > (monthsInYear = date.calendar.getMonthsInYear(date))){\n date.month -= monthsInYear;\n $735220c2d4774dd3$var$addYears(date, 1);\n }\n}\nfunction $735220c2d4774dd3$var$balanceDay(date) {\n while(date.day < 1){\n date.month--;\n $735220c2d4774dd3$var$balanceYearMonth(date);\n date.day += date.calendar.getDaysInMonth(date);\n }\n while(date.day > date.calendar.getDaysInMonth(date)){\n date.day -= date.calendar.getDaysInMonth(date);\n date.month++;\n $735220c2d4774dd3$var$balanceYearMonth(date);\n }\n}\nfunction $735220c2d4774dd3$var$constrainMonthDay(date) {\n date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));\n date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));\n}\nfunction $735220c2d4774dd3$export$c4e2ecac49351ef2(date) {\n if (date.calendar.constrainDate) date.calendar.constrainDate(date);\n date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));\n $735220c2d4774dd3$var$constrainMonthDay(date);\n}\nfunction $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {\n let inverseDuration = {};\n for(let key in duration)if (typeof duration[key] === \"number\") inverseDuration[key] = -duration[key];\n return inverseDuration;\n}\nfunction $735220c2d4774dd3$export$4e2d2ead65e5f7e3(date, duration) {\n return $735220c2d4774dd3$export$e16d8520af44a096(date, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));\n}\nfunction $735220c2d4774dd3$export$adaa4cf7ef1b65be(date, fields) {\n let mutableDate = date.copy();\n if (fields.era != null) mutableDate.era = fields.era;\n if (fields.year != null) mutableDate.year = fields.year;\n if (fields.month != null) mutableDate.month = fields.month;\n if (fields.day != null) mutableDate.day = fields.day;\n $735220c2d4774dd3$export$c4e2ecac49351ef2(mutableDate);\n return mutableDate;\n}\nfunction $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {\n let mutableValue = value.copy();\n if (fields.hour != null) mutableValue.hour = fields.hour;\n if (fields.minute != null) mutableValue.minute = fields.minute;\n if (fields.second != null) mutableValue.second = fields.second;\n if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;\n $735220c2d4774dd3$export$7555de1e070510cb(mutableValue);\n return mutableValue;\n}\nfunction $735220c2d4774dd3$var$balanceTime(time) {\n time.second += Math.floor(time.millisecond / 1000);\n time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1000);\n time.minute += Math.floor(time.second / 60);\n time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60);\n time.hour += Math.floor(time.minute / 60);\n time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60);\n let days = Math.floor(time.hour / 24);\n time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24);\n return days;\n}\nfunction $735220c2d4774dd3$export$7555de1e070510cb(time) {\n time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));\n time.second = Math.max(0, Math.min(time.second, 59));\n time.minute = Math.max(0, Math.min(time.minute, 59));\n time.hour = Math.max(0, Math.min(time.hour, 23));\n}\nfunction $735220c2d4774dd3$var$nonNegativeMod(a, b) {\n let result = a % b;\n if (result < 0) result += b;\n return result;\n}\nfunction $735220c2d4774dd3$var$addTimeFields(time, duration) {\n time.hour += duration.hours || 0;\n time.minute += duration.minutes || 0;\n time.second += duration.seconds || 0;\n time.millisecond += duration.milliseconds || 0;\n return $735220c2d4774dd3$var$balanceTime(time);\n}\nfunction $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) {\n let res = time.copy();\n $735220c2d4774dd3$var$addTimeFields(res, duration);\n return res;\n}\nfunction $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) {\n return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));\n}\nfunction $735220c2d4774dd3$export$d52ced6badfb9a4c(value, field, amount, options) {\n let mutable = value.copy();\n switch(field){\n case \"era\":\n {\n let eras = value.calendar.getEras();\n let eraIndex = eras.indexOf(value.era);\n if (eraIndex < 0) throw new Error(\"Invalid era: \" + value.era);\n eraIndex = $735220c2d4774dd3$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round);\n mutable.era = eras[eraIndex];\n // Constrain the year and other fields within the era, so the era doesn't change when we balance below.\n $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);\n break;\n }\n case \"year\":\n var _mutable_calendar, _mutable_calendar_isInverseEra;\n if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount;\n // The year field should not cycle within the era as that can cause weird behavior affecting other fields.\n // We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back\n // we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1.\n mutable.year = $735220c2d4774dd3$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round);\n if (mutable.year === -Infinity) mutable.year = 1;\n if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);\n break;\n case \"month\":\n mutable.month = $735220c2d4774dd3$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round);\n break;\n case \"day\":\n mutable.day = $735220c2d4774dd3$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round);\n break;\n default:\n throw new Error(\"Unsupported field \" + field);\n }\n if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);\n $735220c2d4774dd3$export$c4e2ecac49351ef2(mutable);\n return mutable;\n}\nfunction $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {\n let mutable = value.copy();\n switch(field){\n case \"hour\":\n {\n let hours = value.hour;\n let min = 0;\n let max = 23;\n if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {\n let isPM = hours >= 12;\n min = isPM ? 12 : 0;\n max = isPM ? 23 : 11;\n }\n mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max, options === null || options === void 0 ? void 0 : options.round);\n break;\n }\n case \"minute\":\n mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);\n break;\n case \"second\":\n mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);\n break;\n case \"millisecond\":\n mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);\n break;\n default:\n throw new Error(\"Unsupported field \" + field);\n }\n return mutable;\n}\nfunction $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false) {\n if (round) {\n value += Math.sign(amount);\n if (value < min) value = max;\n let div = Math.abs(amount);\n if (amount > 0) value = Math.ceil(value / div) * div;\n else value = Math.floor(value / div) * div;\n if (value > max) value = min;\n } else {\n value += amount;\n if (value < min) value = max - (min - value - 1);\n else if (value > max) value = min + (value - max - 1);\n }\n return value;\n}\nfunction $735220c2d4774dd3$export$96b1d28349274637(dateTime, duration) {\n let ms;\n if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) {\n let res = $735220c2d4774dd3$export$e16d8520af44a096((0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime), {\n years: duration.years,\n months: duration.months,\n weeks: duration.weeks,\n days: duration.days\n });\n // Changing the date may change the timezone offset, so we need to recompute\n // using the 'compatible' disambiguation.\n ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone);\n } else // Otherwise, preserve the offset of the original date.\n ms = (0, $11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;\n // Perform time manipulation in milliseconds rather than on the original time fields to account for DST.\n // For example, adding one hour during a DST transition may result in the hour field staying the same or\n // skipping an hour. This results in the offset field changing value instead of the specified field.\n ms += duration.milliseconds || 0;\n ms += (duration.seconds || 0) * 1000;\n ms += (duration.minutes || 0) * 60000;\n ms += (duration.hours || 0) * 3600000;\n let res = (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone);\n return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(res, dateTime.calendar);\n}\nfunction $735220c2d4774dd3$export$6814caac34ca03c7(dateTime, duration) {\n return $735220c2d4774dd3$export$96b1d28349274637(dateTime, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));\n}\nfunction $735220c2d4774dd3$export$9a297d111fc86b79(dateTime, field, amount, options) {\n // For date fields, we want the time to remain consistent and the UTC offset to potentially change to account for DST changes.\n // For time fields, we want the time to change by the amount given. This may result in the hour field staying the same, but the UTC\n // offset changing in the case of a backward DST transition, or skipping an hour in the case of a forward DST transition.\n switch(field){\n case \"hour\":\n {\n let min = 0;\n let max = 23;\n if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {\n let isPM = dateTime.hour >= 12;\n min = isPM ? 12 : 0;\n max = isPM ? 23 : 11;\n }\n // The minimum and maximum hour may be affected by daylight saving time.\n // For example, it might jump forward at midnight, and skip 1am.\n // Or it might end at midnight and repeat the 11pm hour. To handle this, we get\n // the possible absolute times for the min and max, and find the maximum range\n // that is within the current day.\n let plainDateTime = (0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime);\n let minDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {\n hour: min\n }), new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());\n let minAbsolute = [\n (0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, \"earlier\"),\n (0, $11d87f3f76e88657$export$5107c82f94518f5c)(minDate, dateTime.timeZone, \"later\")\n ].filter((ms)=>(0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === minDate.day)[0];\n let maxDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)($735220c2d4774dd3$export$e5d5e1c1822b6e56(plainDateTime, {\n hour: max\n }), new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());\n let maxAbsolute = [\n (0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, \"earlier\"),\n (0, $11d87f3f76e88657$export$5107c82f94518f5c)(maxDate, dateTime.timeZone, \"later\")\n ].filter((ms)=>(0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone).day === maxDate.day).pop();\n // Since hours may repeat, we need to operate on the absolute time in milliseconds.\n // This is done in hours from the Unix epoch so that cycleValue works correctly,\n // and then converted back to milliseconds.\n let ms = (0, $11d87f3f76e88657$export$bd4fb2bc8bb06fb)(dateTime) - dateTime.offset;\n let hours = Math.floor(ms / $735220c2d4774dd3$var$ONE_HOUR);\n let remainder = ms % $735220c2d4774dd3$var$ONE_HOUR;\n ms = $735220c2d4774dd3$var$cycleValue(hours, amount, Math.floor(minAbsolute / $735220c2d4774dd3$var$ONE_HOUR), Math.floor(maxAbsolute / $735220c2d4774dd3$var$ONE_HOUR), options === null || options === void 0 ? void 0 : options.round) * $735220c2d4774dd3$var$ONE_HOUR + remainder;\n // Now compute the new timezone offset, and convert the absolute time back to local time.\n return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);\n }\n case \"minute\":\n case \"second\":\n case \"millisecond\":\n // @ts-ignore\n return $735220c2d4774dd3$export$dd02b3e0007dfe28(dateTime, field, amount, options);\n case \"era\":\n case \"year\":\n case \"month\":\n case \"day\":\n {\n let res = $735220c2d4774dd3$export$d52ced6badfb9a4c((0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime), field, amount, options);\n let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone);\n return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);\n }\n default:\n throw new Error(\"Unsupported field \" + field);\n }\n}\nfunction $735220c2d4774dd3$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {\n // Set the date/time fields, and recompute the UTC offset to account for DST changes.\n // We also need to validate by converting back to a local time in case hours are skipped during forward DST transitions.\n let plainDateTime = (0, $11d87f3f76e88657$export$b21e0b124e224484)(dateTime);\n let res = $735220c2d4774dd3$export$e5d5e1c1822b6e56($735220c2d4774dd3$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);\n // If the resulting plain date time values are equal, return the original time.\n // We don't want to change the offset when setting the time to the same value.\n if (res.compare(plainDateTime) === 0) return dateTime;\n let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(res, dateTime.timeZone, disambiguation);\n return (0, $11d87f3f76e88657$export$b4a036af3fc0b032)((0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, dateTime.timeZone), dateTime.calendar);\n}\n\n\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $fae977aafc393c5c$var$TIME_RE = /^(\\d{2})(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst $fae977aafc393c5c$var$DATE_RE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst $fae977aafc393c5c$var$DATE_TIME_RE = /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst $fae977aafc393c5c$var$ZONED_DATE_TIME_RE = /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:([+-]\\d{2})(?::?(\\d{2}))?)?\\[(.*?)\\]$/;\nconst $fae977aafc393c5c$var$ABSOLUTE_RE = /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:(?:([+-]\\d{2})(?::?(\\d{2}))?)|Z)$/;\nconst $fae977aafc393c5c$var$DATE_TIME_DURATION_RE = /^((?-)|\\+)?P((?\\d*)Y)?((?\\d*)M)?((?\\d*)W)?((?\\d*)D)?((?(a: A, b: B): A | B {\n if (a && b) {\n return a.compare(b) <= 0 ? a : b;\n }\n\n return a || b;\n}\n\n/** Returns the greater of the two provider dates. */\nexport function maxDate(a: A, b: B): A | B {\n if (a && b) {\n return a.compare(b) >= 0 ? a : b;\n }\n\n return a || b;\n}\n\nconst WEEKEND_DATA = {\n AF: [4, 5],\n AE: [5, 6],\n BH: [5, 6],\n DZ: [5, 6],\n EG: [5, 6],\n IL: [5, 6],\n IQ: [5, 6],\n IR: [5, 5],\n JO: [5, 6],\n KW: [5, 6],\n LY: [5, 6],\n OM: [5, 6],\n QA: [5, 6],\n SA: [5, 6],\n SD: [5, 6],\n SY: [5, 6],\n YE: [5, 6]\n};\n\n/** Returns whether the given date is on a weekend in the given locale. */\nexport function isWeekend(date: DateValue, locale: string): boolean {\n let julian = date.calendar.toJulianDay(date);\n\n // If julian is negative, then julian % 7 will be negative, so we adjust\n // accordingly. Julian day 0 is Monday.\n let dayOfWeek = Math.ceil(julian + 1) % 7;\n if (dayOfWeek < 0) {\n dayOfWeek += 7;\n }\n\n let region = getRegion(locale);\n // Use Intl.Locale for this once weekInfo is supported.\n // https://github.com/tc39/proposal-intl-locale-info\n let [start, end] = WEEKEND_DATA[region] || [6, 0];\n return dayOfWeek === start || dayOfWeek === end;\n}\n\n/** Returns whether the given date is on a weekday in the given locale. */\nexport function isWeekday(date: DateValue, locale: string): boolean {\n return !isWeekend(date, locale);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Data from https://github.com/unicode-cldr/cldr-core/blob/master/supplemental/weekData.json\n// Locales starting on Sunday have been removed for compression.\nexport const weekStartData = {\n '001': 1,\n AD: 1,\n AE: 6,\n AF: 6,\n AI: 1,\n AL: 1,\n AM: 1,\n AN: 1,\n AR: 1,\n AT: 1,\n AU: 1,\n AX: 1,\n AZ: 1,\n BA: 1,\n BE: 1,\n BG: 1,\n BH: 6,\n BM: 1,\n BN: 1,\n BY: 1,\n CH: 1,\n CL: 1,\n CM: 1,\n CN: 1,\n CR: 1,\n CY: 1,\n CZ: 1,\n DE: 1,\n DJ: 6,\n DK: 1,\n DZ: 6,\n EC: 1,\n EE: 1,\n EG: 6,\n ES: 1,\n FI: 1,\n FJ: 1,\n FO: 1,\n FR: 1,\n GB: 1,\n GE: 1,\n GF: 1,\n GP: 1,\n GR: 1,\n HR: 1,\n HU: 1,\n IE: 1,\n IQ: 6,\n IR: 6,\n IS: 1,\n IT: 1,\n JO: 6,\n KG: 1,\n KW: 6,\n KZ: 1,\n LB: 1,\n LI: 1,\n LK: 1,\n LT: 1,\n LU: 1,\n LV: 1,\n LY: 6,\n MC: 1,\n MD: 1,\n ME: 1,\n MK: 1,\n MN: 1,\n MQ: 1,\n MV: 5,\n MY: 1,\n NL: 1,\n NO: 1,\n NZ: 1,\n OM: 6,\n PL: 1,\n QA: 6,\n RE: 1,\n RO: 1,\n RS: 1,\n RU: 1,\n SD: 6,\n SE: 1,\n SI: 1,\n SK: 1,\n SM: 1,\n SY: 6,\n TJ: 1,\n TM: 1,\n TR: 1,\n UA: 1,\n UY: 1,\n UZ: 1,\n VA: 1,\n VN: 1,\n XK: 1\n};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AnyDateTime, DateTimeDuration, Disambiguation} from './types';\nimport {CalendarDate, CalendarDateTime, Time, ZonedDateTime} from './CalendarDate';\nimport {epochFromDate, fromAbsolute, possibleAbsolutes, toAbsolute, toCalendar, toCalendarDateTime, toTimeZone} from './conversion';\nimport {getLocalTimeZone} from './queries';\nimport {GregorianCalendar} from './calendars/GregorianCalendar';\nimport {Mutable} from './utils';\n\nconst TIME_RE = /^(\\d{2})(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst DATE_RE = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nconst DATE_TIME_RE = /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?$/;\nconst ZONED_DATE_TIME_RE = /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:([+-]\\d{2})(?::?(\\d{2}))?)?\\[(.*?)\\]$/;\nconst ABSOLUTE_RE = /^(\\d{4})-(\\d{2})-(\\d{2})(?:T(\\d{2}))?(?::(\\d{2}))?(?::(\\d{2}))?(\\.\\d+)?(?:(?:([+-]\\d{2})(?::?(\\d{2}))?)|Z)$/;\nconst DATE_TIME_DURATION_RE =\n /^((?-)|\\+)?P((?\\d*)Y)?((?\\d*)M)?((?\\d*)W)?((?\\d*)D)?((?