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5B,UAAY,UAAH5D,OC1B7B,yWD0BgD,YAAAA,OEzBrC,+BF0BP+E,KAAKuG,QACP,CAEOE,wBAAAA,CAAyBzH,EAAc0H,EAAmB0Z,GAC1DpgB,KAAKyJ,aAAwB,iBAATzK,GAIzBgB,KAAKuG,QACP,CAEQA,MAAAA,GACUvG,KAAKS,WAAWrG,cAA2B,YACnDyE,UAAYmB,KAAKiB,QAAQyb,OACnC,EASG5nB,eAAeC,IAAI,qBACtBD,eAAeE,OAAO,mBAAoBk2B,gB","sources":["webpack://lange/./scripts/web-components/add-to-cart-product/index.ts","webpack://lange/./scripts/web-components/add-to-cart-set/index.ts","webpack://lange/./scripts/web-components/variant-selector-option/index.ts","webpack://lange/webpack/bootstrap","webpack://lange/./scripts/lib/call-utils.ts","webpack://lange/./scripts/common/liquid-global.ts","webpack://lange/./scripts/sections/modal-cart/modal-cart.ts","webpack://lange/./scripts/sections/modal-cart/cart-service/get-cart.ts","webpack://lange/./scripts/sections/modal-cart/toggle-sub-line-items.ts","webpack://lange/./scripts/sections/modal-cart/cart-service/add-to-cart.ts","webpack://lange/./scripts/lib/update-cart-html.ts","webpack://lange/./scripts/web-components/add-to-cart/index.ts","webpack://lange/./scripts/web-components/add-to-cart/index.scss","webpack://lange/./scripts/web-components/add-to-cart/index.html","webpack://lange/./scripts/web-components/notify-me-button/index.ts","webpack://lange/./scripts/web-components/notify-me-button/index.scss","webpack://lange/./scripts/web-components/notify-me-button/index.html","webpack://lange/./scripts/web-components/alert/index.ts","webpack://lange/./scripts/web-components/alert/index.scss","webpack://lange/./scripts/web-components/alert/index.html","webpack://lange/./scripts/web-components/before-after/index.ts","webpack://lange/./scripts/web-components/before-after/index.scss","webpack://lange/./scripts/web-components/before-after/index.html","webpack://lange/./scripts/web-components/before-after-benefits/index.ts","webpack://lange/./scripts/web-components/before-after-benefits/index.scss","webpack://lange/./scripts/web-components/before-after-benefits/index.html","webpack://lange/./scripts/common/a11y.ts","webpack://lange/./scripts/web-components/clickable-area/index.ts","webpack://lange/./scripts/web-components/clickable-area/index.scss","webpack://lange/./scripts/web-components/clickable-area/index.html","webpack://lange/./scripts/web-components/countdown-timer/index.ts","webpack://lange/./scripts/web-components/countdown-timer/index.scss","webpack://lange/./scripts/web-components/countdown-timer/index.html","webpack://lange/./scripts/web-components/modal/index.ts","webpack://lange/./scripts/web-components/modal/index.scss","webpack://lange/./scripts/web-components/modal/index.html","webpack://lange/../node_modules/just-validate/dist/just-validate.es.js","webpack://lange/./scripts/web-components/notify-me-modal/index.ts","webpack://lange/./scripts/web-components/notify-me-modal/index.scss","webpack://lange/./scripts/web-components/notify-me-modal/index.html","webpack://lange/./scripts/common/segment-utils.ts","webpack://lange/./scripts/common/services/back-in-stock-service.ts","webpack://lange/./scripts/common/event-dispatch.ts","webpack://lange/./scripts/web-components/product-rating-stars/index.ts","webpack://lange/./scripts/web-components/product-rating-stars/index.scss","webpack://lange/./scripts/web-components/product-rating-stars/index.html","webpack://lange/./scripts/web-components/product-step/index.ts","webpack://lange/./scripts/web-components/product-step/index.scss","webpack://lange/./scripts/web-components/product-step/index.html","webpack://lange/./scripts/web-components/product-steps/index.ts","webpack://lange/./scripts/web-components/product-steps/index.scss","webpack://lange/./scripts/web-components/product-steps/index.html","webpack://lange/./scripts/web-components/variant-selector/index.ts","webpack://lange/./scripts/web-components/variant-selector/index.scss","webpack://lange/./scripts/web-components/variant-selector/index.html","webpack://lange/./scripts/web-components/quantity-input/index.ts","webpack://lange/./scripts/web-components/quantity-input/index.scss","webpack://lange/./scripts/web-components/quantity-input/index.html","webpack://lange/./scripts/web-components/search-sort-by/index.ts","webpack://lange/./scripts/web-components/tabs/index.ts","webpack://lange/./scripts/web-components/tabs/index.scss","webpack://lange/./scripts/web-components/tabs/index.html","webpack://lange/./scripts/web-components/video-inline/index.ts","webpack://lange/./scripts/web-components/video-inline/index.scss","webpack://lange/./scripts/web-components/video-inline/index.html","webpack://lange/./scripts/common/services/klaviyo-service.ts","webpack://lange/../node_modules/klaviyo-subscribe/index.js","webpack://lange/./scripts/web-components/sign-up-banner/index.ts","webpack://lange/./scripts/web-components/sign-up-banner/index.scss","webpack://lange/./scripts/web-components/sign-up-banner/index.html","webpack://lange/./scripts/web-components/product-card/index.ts","webpack://lange/./scripts/web-components/product-card/index.scss","webpack://lange/./scripts/web-components/product-card/index.html","webpack://lange/./scripts/web-components/hoverable-image/index.ts","webpack://lange/./scripts/web-components/hoverable-image/index.scss","webpack://lange/./scripts/web-components/hoverable-image/index.html","webpack://lange/./scripts/web-components/registration-form/index.ts","webpack://lange/./scripts/web-components/accordion/index.ts","webpack://lange/./scripts/web-components/accordion/index.scss","webpack://lange/./scripts/web-components/accordion/index.html","webpack://lange/./scripts/web-components/accordion-item/index.ts","webpack://lange/./scripts/web-components/accordion-item/index.scss","webpack://lange/./scripts/web-components/accordion-item/index.html","webpack://lange/./scripts/web-components/discount-message/index.ts","webpack://lange/./scripts/web-components/discount-message/index.scss","webpack://lange/./scripts/web-components/discount-message/index.html"],"sourcesContent":["/**\n * This is a placeholder element that carries data properties, needed for add to cart functionality\n * It has no functionality.\n */\nclass AddToCartProduct extends HTMLElement {\n  readonly dataset!: {\n    /**\n     * Boolean represented as string representing product availability\n     */\n    available: 'false' | 'true';\n\n    /**\n     * Product ID, a stringified integer\n     */\n    id: string;\n\n    /**\n     * Selected variant ID, a stringified integer\n     */\n    selectedVariantId: string;\n\n    /**\n     * Set subproduct index, a stringified integer started from 0\n     */\n    setIndex: string;\n  };\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'add-to-cart-product': AddToCartProduct;\n  }\n}\n\nif (!customElements.get('add-to-cart-product')) {\n  customElements.define('add-to-cart-product', AddToCartProduct);\n}\n","/**\n * This is a placeholder element that carries data properties, needed for add to cart functionality\n * It has no functionality.\n */\nclass AddToCartSet extends HTMLElement {\n  readonly dataset!: {\n    /**\n     * Set compare at price as cents, a stringified integer number\n     */\n    compareAtPrice: string;\n\n    /**\n     * Set product ID, a stringified integer number\n     */\n    id: string;\n\n    /**\n     * Set image url\n     */\n    imageUrl: string;\n\n    /**\n     * Set name\n     */\n    name: string;\n\n    /**\n     * Set price as cents, a stringified integer number\n     */\n    price: string;\n  };\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'add-to-cart-set': AddToCartSet;\n  }\n}\n\nif (!customElements.get('add-to-cart-set')) {\n  customElements.define('add-to-cart-set', AddToCartSet);\n}\n","/**\n * This is a placeholder element that carries product option data, needed for the variant selector\n * functionality. It has no functionality itself.\n */\nclass VariantSelectorOption extends HTMLElement {\n  readonly dataset!: {\n    /**\n     * Boolean represented as string representing product availability\n     */\n    available: 'false' | 'true';\n\n    /**\n     * CSS class to set a color associated with variant option as a background for the color swatch\n     */\n    backgroundClass: string;\n\n    /**\n     * Color swatch badge label, e.g. \"New\"\n     */\n    badge: string;\n\n    /**\n     * Badge style, only \"default\", \"highlighted\" are supported now\n     */\n    badgeStyle: string;\n\n    /**\n     * Variant's compare at price, a stringified integer representing cents, e.g. \"1200\" means $12\n     */\n    compareAtPrice: string;\n\n    /**\n     * Content to be displayed in the compare at price modal for a particular variant\n     */\n    compareAtPriceModalContent: string;\n\n    /**\n     * Variant additional short description\n     */\n    description: string;\n\n    /**\n     * Discount offer message\n     */\n    discountMessage: string;\n\n    /**\n     * Options group name, e.g. \"Color\", \"Shade\"\n     */\n    group: string;\n\n    /**\n     * Variant image src\n     */\n    image: string;\n\n    /**\n     * Variant's price, a stringified integer representing cents, e.g. \"1200\" means $12\n     */\n    price: string;\n\n    /**\n     * Top badge label, e.g. \"50% off\", \"Sale\"\n     */\n    topBadge: string;\n\n    /**\n     * Top badge style (black or red color), e.g. \"default\", \"highlighted\"\n     */\n    topBadgeStyle: 'default' | 'highlighted';\n\n    /**\n     * Variant associated option name\n     */\n    value: string;\n\n    /**\n     * Variant ID, a stringified integer\n     */\n    variantId: string;\n  };\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'variant-selector-option': VariantSelectorOption;\n  }\n}\n\nif (!customElements.get('variant-selector-option')) {\n  customElements.define('variant-selector-option', VariantSelectorOption);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// Keeps track of the timeout timer between the start and end of all calls\nlet timerId: ReturnType<typeof setTimeout>;\n\n/**\n * Called at the beginning of most service operations. This signals to the view that an operation\n * has started.\n *\n * @see http://jdebp.info/FGA/function-perilogues.html\n */\nexport function startCall(...args: any[]) {\n  // This should never happen because we always clear the timeout and set the variable value back\n  // to undefined in the epilogue. This might help debug some screwy things.\n\n  if (typeof timerId !== 'undefined') {\n    window.console.error('concurrent call detected!');\n    window.console.error('[call-utils.ts] args: ', args);\n\n    window.Sentry?.captureException(new Error('Concurrent checkout service call detected'), {\n      extra: {\n        args\n      },\n      level: 'warning'\n    });\n  }\n\n  // Guarantee that the end event will fire by starting a timer.\n  timerId = setTimeout(() => {\n    endCall(false, true);\n  }, 30 * 1000, true);\n\n  const event = new CustomEvent('ofir-cart-call-started', { cancelable: false });\n  dispatchEvent(event);\n}\n\n/**\n * Called at the end of most service operations. This signals to the view that an operation has\n * completed (successfully or not).\n *\n * This is called either manually whenever the operation completed, or automatically, if the\n * operation errored or has not completed after a certain amount of time. We do this to prevent\n * the situation of never firing an end event in case of extremely messed up code. Sometimes that\n * kind of thing happens and we never want to fully lock someone out of cart interactions.\n *\n * @see http://jdebp.info/FGA/function-perilogues.html\n */\nexport function endCall(notifyView = true, didTimeOut = false) {\n  // Unconditionally clear the timeout timer, regardless of whether the timer id is set.\n  clearTimeout(timerId);\n\n  // Reset the timer id. Not really needed but it makes it crystal clear that there is no timer id\n  // active.\n  timerId = undefined;\n\n  // If we got here from a timeout, just make sure something is logged. In theory, nothing ever\n  // times out.\n  if (didTimeOut) {\n    console.warn('epilogue timed out');\n  }\n\n  const event = new CustomEvent('ofir-cart-call-ended', {\n    cancelable: false,\n    detail: {\n      is_timeout: didTimeOut,\n      notify_view: notifyView\n    }\n  });\n\n  dispatchEvent(event);\n}\n","/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Do not use this export. This is a hacky fix to a strange inlining optimization performed by\n * webpack where it removes this module and points identifiers directly to the global values.\n * Without this export, webpack fails to understand that `window.__ofir` must also be inlined.\n *\n * @type {unknown}\n */\nexport const __ofir: unknown = window.__ofir;\n\n/**\n * Cart should never be undefined\n */\nexport const Cart: OfirLiquidGlobals.Cart = window.__ofir?.Cart;\n\n/**\n * Checkout is undefined if user is not loading a checkout page.\n *\n * @type {OfirLiquidGlobals.Checkout}\n */\nexport const Checkout: OfirLiquidGlobals.Checkout = window.__ofir?.Checkout;\n\n/**\n * Collection is undefined if user is not loading a product or collection page.\n *\n * @type {OfirLiquidGlobals.Collection}\n */\nexport const Collection: OfirLiquidGlobals.Collection = window.__ofir?.Collection;\n\n/**\n * Customer is undefined if user is not logged in.\n *\n * @type {OfirLiquidGlobals.Customer}\n */\nexport const Customer: OfirLiquidGlobals.Customer = window.__ofir?.Customer;\n\n/**\n * GiftCard is undefined if user is not on gift card page.\n *\n * @type {OfirLiquidGlobals.GiftCard}\n */\nexport const GiftCard: OfirLiquidGlobals.GiftCard = window.__ofir?.GiftCard;\n\n/**\n * Order is undefined unless user is on thank_you page, order status page or account/order detail\n * page.\n *\n * @type {OfirLiquidGlobals.Order}\n */\nexport const Order: OfirLiquidGlobals.Order = window.__ofir?.Order;\n\n/** @type {OfirLiquidGlobals.Page} */\nexport const Page: OfirLiquidGlobals.Page = window.__ofir?.Page;\n\n/** @type {OfirLiquidGlobals.Pagination} */\nexport const Pagination: OfirLiquidGlobals.Pagination = window.__ofir?.Pagination;\n\n/**\n * Product is undefined if not accessing a product page template.\n *\n * @type {OfirLiquidGlobals.Product}\n */\nexport const Product: OfirLiquidGlobals.Product = window.__ofir?.Product;\n\n/** @type {OfirLiquidGlobals.Request} */\nexport const Request: OfirLiquidGlobals.Request = window.__ofir?.Request;\n\n/** @type {OfirLiquidGlobals.Scripts} */\nexport const Scripts: OfirLiquidGlobals.Scripts = window.__ofir?.Scripts;\n\n/** @type {OfirLiquidGlobals.Search} */\nexport const Search: OfirLiquidGlobals.Search = window.__ofir?.Search;\n\n/** @type {OfirLiquidGlobals.SearchEngineListing} */\nexport const SearchEngineListing: OfirLiquidGlobals.SearchEngineListing =\n  window.__ofir?.SearchEngineListing;\n\n/** @type {OfirLiquidGlobals.SectionSettings} */\nexport const SectionSettings: OfirLiquidGlobals.SectionSettings = window.__ofir?.SectionSettings;\n\n/** @type {OfirLiquidGlobals.Shop} */\nexport const Shop: OfirLiquidGlobals.Shop = window.__ofir?.Shop;\n\n/** @type {OfirLiquidGlobals.Template} */\nexport const Template: OfirLiquidGlobals.Template = window.__ofir?.Template;\n\n/** @type {OfirLiquidGlobals.Theme} */\nexport const Theme: OfirLiquidGlobals.Theme = window.__ofir?.Theme;\n\n/** @type {OfirLiquidGlobals.ThemeSettings} */\nexport const ThemeSettings: OfirLiquidGlobals.ThemeSettings = window.__ofir?.ThemeSettings;\n","import type * as ajax from '@integrabeauty/shopify-ajax-api';\nimport * as LiquidGlobal from '../../common/liquid-global';\nimport * as CartService from './cart-service';\n\nexport function loadCartModal() {\n  const cartLinkElement = document.getElementById('cart-link');\n  if (!cartLinkElement) {\n    return;\n  }\n\n  const cartModalElement = document.getElementById('cart-modal');\n  if (!cartModalElement) {\n    return;\n  }\n\n  const modalContentElement = cartModalElement.querySelector('.modal-content');\n  if (!modalContentElement) {\n    return;\n  }\n\n  const closeModalElement = cartModalElement.querySelector('.cart__close');\n  if (!closeModalElement) {\n    return;\n  }\n\n  cartLinkElement.addEventListener('click', function (event: Event) {\n    openModal(event);\n    CartService.getCart(false).then((cart: ajax.Cart) => {\n      const detail = <OfirCustomEvents.ViewCartEventDetails>{\n        items: cart.items,\n        source: 'cart-header-icon'\n      };\n      const viewCartEvent = new CustomEvent('ofir-view-cart', {\n        cancelable: false,\n        detail\n      });\n\n      dispatchEvent(viewCartEvent);\n    }).catch(console.error);\n  });\n\n  closeModalElement.addEventListener('click', function onCloseIconClicked(event: Event) {\n    event.preventDefault();\n    toggleSlideAnimation(event);\n  });\n\n  modalContentElement.addEventListener('click', function (event: Event) {\n    if (!closeModalElement.contains(<HTMLElement>event.target)) {\n      event.stopPropagation();\n    }\n  });\n\n  cartModalElement.addEventListener('click', toggleSlideAnimation);\n}\n\nfunction toggleSlideAnimation(event: Event) {\n  event.preventDefault();\n  const cartModalElement = document.getElementById('cart-modal');\n  const modalContentElement = cartModalElement?.querySelector('.modal-content');\n  modalContentElement?.classList.toggle('animate-slide-in-right');\n  modalContentElement?.classList.toggle('animate-slide-out-right');\n  if (modalContentElement?.classList.contains('animate-slide-out-right')) {\n    closeModal(event);\n  }\n}\n\nfunction closeModal(event: Event) {\n  event.preventDefault();\n  const cartModalElement = document.getElementById('cart-modal');\n  cartModalElement?.classList.add('hidden');\n  document.documentElement.setAttribute('style', '');\n  toggleSlideAnimation(event);\n}\n\nexport function openModal(event?: Event) {\n  event?.preventDefault();\n  const cartModalElement = document.getElementById('cart-modal');\n  if (!cartModalElement?.classList.contains('hidden')) {\n    return;\n  }\n\n  cartModalElement.classList.remove('hidden');\n  document.documentElement.setAttribute('style', 'overflow: hidden;');\n\n  const cartModalOpenedEvent = new CustomEvent('cart-modal-opened');\n  dispatchEvent(cartModalOpenedEvent);\n}\n\nfunction updateListeners(event: OfirCustomEvents.CartCallEndedEvent) {\n  if (event.detail.notify_view) {\n    loadCartModal();\n    openModal();\n  }\n}\n\nif (LiquidGlobal.Template.name !== 'cart') {\n  addEventListener('ofir-cart-call-ended', <EventListener>updateListeners);\n  addEventListener('DOMContentLoaded', loadCartModal);\n}\n\ndeclare global {\n  interface WindowEventMap {\n    'cart-modal-opened': CustomEvent;\n  }\n}\n","import type * as ajax from '@integrabeauty/shopify-ajax-api';\nimport * as CallUtils from '../../../lib/call-utils';\n\n/**\n * Utility method to retrieve a users current cart using the provided Shopify Ajax API endpoint.\n *\n * The imported CallUtils methods emit events to notify any view layer logic listening so it can\n * implement any required changes to update the user of the application state. You only need to use\n * these methods if you want the UX/UI to represent and/or provide messaging for the asynchronous\n * request.\n *\n * Since all Shopify cart interaction are done client side asynchronously, there are numorous use\n * cases involving the need for the most up-to-date shopping cart. Examples being after a user adds\n * an item to their cart or changes a quantity. The LiquiGlobal.Cart values would not be accurate,\n * and if required; users should utilize this method with emitStartStop value of false to not\n * interfere with UX/UI operations.\n *\n * @param notifyView passed on to ofir-cart-call-ended event to for view layer listeners (false)\n * @param emitStartStop passed as control to emit start and stop call events (false)\n *\n * @returns cart data\n *\n * @see https://shopify.dev/api/ajax/reference/cart#get-locale-cart-js\n */\nexport async function getCart(notifyView = true, emitStartStop = false) {\n  if (emitStartStop) {\n    CallUtils.startCall('getCart');\n  }\n\n  let response;\n  let cart;\n\n  try {\n    response = await fetch('/cart.js', {\n      method: 'GET',\n      headers: {\n        'Content-Type': 'application/json'\n      }\n    });\n\n    if (!response.ok) {\n      throw new Error(`CartService.getCart Error: ${response.status} ${response.statusText} ` +\n        response.url);\n    }\n\n    cart = <ajax.Cart> await response.json();\n  } catch (error) {\n    window.Sentry?.captureException(error, {\n      extra: {\n        source: 'cart-service-get-cart'\n      }\n    });\n  } finally {\n    if (emitStartStop) {\n      CallUtils.endCall(notifyView);\n    }\n  }\n\n  return cart;\n}\n","export function attachToggleHandlers() {\n  const variantToggles = document.querySelectorAll('.cart-line-item__show-details');\n\n  for (const toggle of variantToggles) {\n    toggle.addEventListener('click', onToggleClicked);\n  }\n}\n\nfunction onToggleClicked(event: Event) {\n  event.preventDefault();\n\n  const element = <HTMLElement>event.currentTarget;\n  const targetId = element.getAttribute('aria-controls');\n  const toggleTarget = document.getElementById(targetId);\n  if (!toggleTarget) {\n    return;\n  }\n\n  toggleTarget.classList.toggle('hidden');\n\n  if (toggleTarget.classList.contains('hidden')) {\n    element.textContent = 'Show Details';\n    element.setAttribute('aria-expanded', 'false');\n  } else {\n    element.textContent = 'Hide Details';\n    element.setAttribute('aria-expanded', 'true');\n  }\n}\n\naddEventListener('DOMContentLoaded', attachToggleHandlers);\n","import * as CallUtils from '../../../lib/call-utils';\nimport updateCartHtml from '../../../lib/update-cart-html';\n\n/**\n * Utilizes the Shopify Ajax API endpoint to add an array of products to a users shopping cart.\n *\n * The imported CallUtils methods emit events to notify any view layer logic listening so it can\n * implement any required changes to update the user of the application state. You only need to use\n * these methods if you want the UX/UI to represent and/or provide messaging for the asynchronous\n * request.\n *\n * @param payload form data to be submitted\n * @param notifyView passed on to ofir-cart-call-ended event to for view layer listeners\n *\n * @returns lineItems cart data\n *\n * @see https://shopify.dev/api/ajax/reference/cart#post-locale-cart-add-js\n */\nexport async function addToCart(payload: ShopifyAjaxApi.AddToCartPayload, notifyView = true) {\n  CallUtils.startCall('addToCart', payload);\n\n  let response;\n  let lineItems;\n  const addedItems = <ShopifyAjaxApi.LineItem[]>[];\n\n  try {\n    const body = JSON.stringify({ ...payload, sections: 'modal-cart' });\n    response = await fetch('/cart/add.js', {\n      method: 'POST',\n      body,\n      headers: {\n        'Content-Type': 'application/json'\n      }\n    });\n\n    if (!response.ok) {\n      throw new Error(`CartService.addToCart Error: ${response.status} ${response.statusText} ` +\n        response.url);\n    }\n\n    lineItems = <ShopifyAjaxApi.AddToCartResponse> await response.json();\n\n    const addedVariantIds = payload.items.map((i: ShopifyAjaxApi.AddToCartItem) => i.id);\n    for (const item of lineItems.items) {\n      if (addedVariantIds.indexOf(item.variant_id) > -1) {\n        const addedItem = payload.items.find(\n          (i: ShopifyAjaxApi.AddToCartItem) => i.id === item.variant_id);\n        addedItems.push({ ...item, quantity: addedItem.quantity });\n        break;\n      }\n    }\n\n    const customEvent = new CustomEvent('ofir-add-to-cart', {\n      cancelable: false,\n      detail: {\n        items: addedItems,\n        modal_cart: lineItems.sections['modal-cart'],\n        success: true\n      }\n    });\n    dispatchEvent(customEvent);\n\n    if (lineItems.sections?.['modal-cart']) {\n      updateCartHtml(lineItems.sections['modal-cart']);\n    }\n\n    if (notifyView) {\n      const detail = <OfirCustomEvents.ViewCartEventDetails>{\n        items: lineItems.items,\n        source: 'add-to-cart-cta'\n      };\n      const viewCartEvent = new CustomEvent('ofir-view-cart', {\n        cancelable: false,\n        detail\n      });\n\n      dispatchEvent(viewCartEvent);\n    }\n  } catch (error) {\n    const detail = <OfirCustomEvents.AddToCartEvent['detail']>{\n      error_code: response.status,\n      error_message: response.statusText,\n      items: addedItems,\n      payload,\n      success: false\n    };\n\n    window.Sentry?.captureException(error, {\n      extra: {\n        ...detail,\n        source: 'cart-service-add-to-cart'\n      }\n    });\n\n    const customEvent = new CustomEvent('ofir-add-to-cart', {\n      cancelable: false,\n      detail\n    });\n\n    dispatchEvent(customEvent);\n  } finally {\n    CallUtils.endCall(notifyView, false);\n  }\n\n  return lineItems;\n}\n\ndeclare global {\n  interface WindowEventMap {\n    'ofir-add-to-cart': OfirCustomEvents.AddToCartEvent;\n  }\n}\n","import * as LiquidGlobals from '../common/liquid-global';\nimport * as ModalCart from '../sections/modal-cart/modal-cart';\nimport * as ToggleSubLineItems from '../sections/modal-cart/toggle-sub-line-items';\n\nexport default function updateCartHtml(html: string) {\n  const element = document.createElement('div');\n  element.innerHTML = html;\n\n  const cartContentElement = element.querySelector('.modal-content');\n  if (!cartContentElement) {\n    return;\n  }\n\n  if (LiquidGlobals.Template.name !== 'cart') {\n    const cartModalElement = document.getElementById('cart-modal');\n    const modalContentElement = cartModalElement?.querySelector('.modal-content');\n    if (!modalContentElement) {\n      return;\n    }\n\n    const modalContentCartHeaderElement = modalContentElement.querySelector('.cart__header');\n    modalContentCartHeaderElement.innerHTML =\n      cartContentElement.querySelector('.cart__header').innerHTML;\n\n    const modalContentCartContentElement = modalContentElement.querySelector('.cart__main');\n    modalContentCartContentElement.innerHTML =\n      cartContentElement.querySelector('.cart__main').innerHTML;\n\n    const cartCount =\n      cartContentElement.querySelector('.cart__header > span').textContent.replace(/\\D+/, '');\n    const cartCounterElement = document.querySelector('#cart-counter');\n    cartCounterElement.textContent = cartCount;\n\n    if (parseInt(cartCount, 10) === 0) {\n      cartCounterElement.classList.add('hidden');\n    } else {\n      cartCounterElement.classList.remove('hidden');\n    }\n  } else {\n    // Update cart content if user landed on cart page\n    const cartPageElement = document.getElementById('cart-page');\n    if (cartPageElement.classList.contains('cart--empty')) {\n      return;\n    }\n\n    const cartPageCartHeaderElement = cartPageElement.querySelector('.cart__header');\n    cartPageCartHeaderElement.innerHTML =\n      cartContentElement.querySelector('.cart__header').innerHTML;\n\n    const cartPageCartContentElement = cartPageElement.querySelector('.cart__main');\n    cartPageCartContentElement.innerHTML =\n      cartContentElement.querySelector('.cart__main').innerHTML;\n  }\n\n  ToggleSubLineItems.attachToggleHandlers();\n  ModalCart.loadCartModal();\n}\n","import type { CustomElement } from '@integrabeauty/custom-elements';\n// TODO this web component shouldn't import anything from another section\nimport * as CartService from '../../sections/modal-cart/cart-service';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * The custom element that handles \"Add to Cart\" functionality.\n *\n * This component relies on <add-to-cart-product> and <add-to-cart-set> placeholder elements passed\n * to the default slot. The <add-to-cart-product> element holds the data of the product that should\n * be added to the cart. The <add-to-cart-set> holds data set's properties.\n *\n * *Regular product:*\n * The product data is held by <add-to-cart-product>. On the \"variant-changed\" event the\n * selected variant ID and availability of the product are updated. When the button clicked the\n * payload object of type ShopifyAjaxApi.AddToCartPayload composed and sent via the CartService.\n * In case the selected variant is unavailable the notify me button should be shown instead of add\n * to cart button.\n *\n * *Set product:*\n * The products data is help by several <add-to-cart-product> elements that should\n * be passed to the default slot. Each represents the product in the bundle. Since the set can\n * consist from similar products the \"data-set-index\" attribute should be set for each\n * <add-to-cart-product> to distinguish products. On the \"variant-changed\" event the selected\n * variant ID and availability of the related product are updated. Also, <add-to-cart-set> should\n * be passed to the default slot. This element holds set properties. When the button clicked the\n * payload object of type ShopifyAjaxApi.AddToCartPayload composed and sent via the CartService. In\n * case any of selected product variant is unavailable the notify me button should be shown instead\n * of add to cart button.\n */\nclass AddToCart extends HTMLElement implements CustomElement {\n  readonly dataset!: {\n    /**\n     * Defines the button variant. Currently, only 'secondary' is supported. Default styles applied\n     * if no value is set.\n     */\n    buttonVariant: 'secondary';\n\n    /**\n     * Represents whether the component for a Sets product.\n     */\n    isSet: 'false' | 'true';\n\n    /**\n     * Represents whether the component for an upsell product.\n     */\n    isUpsell: 'false' | 'true';\n  };\n\n  public shadowRoot!: ShadowRoot;\n\n  /**\n   * Indicates the quantity of products to be added to the cart.\n   */\n  private quantity = 1;\n\n  private onAddToCartClickedBound = this.onAddToCartClicked.bind(this);\n  private onVariantChangedBound = this.onVariantChanged.bind(this);\n  private onQuantityChangedBound = this.onQuantityChanged.bind(this);\n\n  public constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    // call it to set initial component state\n    this.updateAvailability();\n\n    const addToCart = this.shadowRoot.querySelector('button');\n    addToCart.addEventListener('click', this.onAddToCartClickedBound);\n\n    addEventListener('variant-changed', this.onVariantChangedBound);\n    addEventListener('quantity-input-changed', this.onQuantityChangedBound);\n  }\n\n  public disconnectedCallback() {\n    const addToCart = this.shadowRoot.querySelector('button');\n    addToCart.removeEventListener('click', this.onAddToCartClickedBound);\n\n    removeEventListener('variant-changed', this.onVariantChangedBound);\n    removeEventListener('quantity-input-changed', this.onQuantityChangedBound);\n  }\n\n  private onAddToCartClicked(_event: Event) {\n    const button = this.shadowRoot.querySelector('button');\n    button.disabled = true;\n\n    let payload;\n    if (this.dataset.isSet === 'true') {\n      payload = this.composeSetProductPayload();\n    } else if (this.dataset.isUpsell === 'true') {\n      payload = this.composeUpsellProductPayload();\n    } else {\n      payload = this.composeRegularProductPayload();\n    }\n\n    CartService.addToCart(payload)\n      .catch(error => {\n        throw new Error(<string>error);\n      })\n      .finally(() => {\n        button.disabled = false;\n      });\n  }\n\n  /**\n   * Handle the change in product quantity input.\n   *\n   * At present, this is only relevant for PDP.\n   */\n  private onQuantityChanged(event: WindowEventMap['quantity-input-changed']) {\n    if (event.detail.source === 'pdp') {\n      // We need to update quantity only if the \"quantity-input-changed\" event is fired from a PDP\n      // product details section. This event is also fired from the quantity input in the mini cart.\n      // In this case, we don't need to update the quantity of any <add-to-cart> button, even if the\n      // product ID is the same.\n      const product = this.querySelector(`[data-id=\"${ event.detail.product_id }\"]`);\n      if (product) {\n        this.quantity = event.detail.quantity;\n      }\n    }\n  }\n\n  private composeRegularProductPayload() {\n    const product = this.querySelector('add-to-cart-product');\n    const payload: ShopifyAjaxApi.AddToCartPayload = {\n      items: [\n        {\n          id: parseInt(product.dataset.selectedVariantId, 10),\n\n          // At the moment, there's a quantity selector only on the set PDP. So in this case always\n          // the default value \"1\" will be used.\n          quantity: this.quantity\n        }\n      ]\n    };\n\n    const sellingPlan = getSellingPlan();\n    if (sellingPlan) {\n      payload.items[0].selling_plan = sellingPlan;\n    }\n\n    return payload;\n  }\n\n  private composeUpsellProductPayload() {\n    const product = this.querySelector('add-to-cart-product');\n    const payload: ShopifyAjaxApi.AddToCartPayload = {\n      items: [\n        {\n          id: parseInt(product.dataset.selectedVariantId, 10),\n\n          // At the moment, there's a quantity selector only on the set PDP. So in this case always\n          // the default value \"1\" will be used.\n          quantity: this.quantity,\n          properties: {\n            '_is_upsell': 'true'\n          }\n        }\n      ]\n    };\n\n    const sellingPlan = getSellingPlan();\n    if (sellingPlan) {\n      payload.items[0].selling_plan = sellingPlan;\n    }\n\n    return payload;\n  }\n\n  private composeSetProductPayload() {\n    const products = this.querySelectorAll('add-to-cart-product');\n    const variantIds = [];\n    for (const product of products) {\n      variantIds.push(product.dataset.selectedVariantId);\n    }\n\n    // Compose set properties. This object should be added to each product item in the add to cart\n    // request payload.\n    const setPropertiesElement = this.querySelector('add-to-cart-set');\n    const properties = {\n      'Set': setPropertiesElement.dataset.name,\n      '_is_set': 'true',\n      '_set_product_id': setPropertiesElement.dataset.id,\n      '_set_name': setPropertiesElement.dataset.name,\n      '_set_image_url': setPropertiesElement.dataset.imageUrl,\n      '_set_compare_at_price': setPropertiesElement.dataset.compareAtPrice,\n      '_set_price': setPropertiesElement.dataset.price,\n      _set_variant_ids: variantIds.join(',')\n    };\n\n    // A set can consist of similar products. If the same variants are selected for similar\n    // products, we shouldn't send them as different items but set the appropriate quantity.\n    const variantQuantities: Record<string, number> = {};\n    for (const variantId of variantIds) {\n      if (variantQuantities[variantId]) {\n        variantQuantities[variantId] = variantQuantities[variantId] + 1;\n      } else {\n        variantQuantities[variantId] = 1;\n      }\n    }\n\n    const payload: ShopifyAjaxApi.AddToCartPayload = { items: [] };\n    for (const id in variantQuantities) {\n      payload.items.push({\n        id: parseInt(id, 10),\n        properties,\n        quantity: variantQuantities[id] * this.quantity\n      });\n    }\n\n    return payload;\n  }\n\n  private onVariantChanged(event: WindowEventMap['variant-changed']) {\n    const {\n      id,\n      available,\n      product_id: productId,\n      setIndex\n    } = event.detail.variant;\n\n    let product: HTMLElementTagNameMap['add-to-cart-product'];\n    if (this.dataset.isSet === 'true') {\n      // A set can consist of similar products. We need \"setIndex\" to distinguish them.\n      const selector = `add-to-cart-product[data-id=\"${productId}\"][data-set-index=\"${setIndex}\"]`;\n      product = this.querySelector(selector);\n    } else {\n      product = this.querySelector(`add-to-cart-product[data-id=\"${productId}\"]`);\n    }\n\n    if (!product) {\n      // The \"variant-changed\" event can be dispatched by any variant selector on the page. If the\n      // product element is not found, it means that the variant that had been changed is not\n      // related to this add to cart button.\n      return;\n    }\n\n    product.dataset.selectedVariantId = id.toString();\n    product.dataset.available = available ? 'true' : 'false';\n\n    this.updateAvailability();\n  }\n\n  /**\n   * Update the availability of the product for displaying either the add to cart button\n   * or the notify me button based on product availability.\n   */\n  private updateAvailability() {\n    const addToCart = this.shadowRoot.querySelector('button');\n    const notifyMe = this.shadowRoot.querySelector('notify-me-button');\n\n    type AddToCartProduct = HTMLElementTagNameMap['add-to-cart-product'];\n\n    // Selecting the first unavailable product. This will be effective with a regular product\n    // containing only one <add-to-cart-product> element and a set with multiple\n    // <add-to-cart-product> elements. If no element is found, it means that the product or set\n    // can be added to the cart.\n    const unavailableProduct =\n      this.querySelector<AddToCartProduct>('add-to-cart-product[data-available=\"false\"]');\n    if (unavailableProduct) {\n      addToCart.hidden = true;\n      notifyMe.hidden = false;\n\n      // Set product ID and variant ID of the unavailable item.\n\n      // TODO: How to handle cases when two or more items of the set are unavailable? Currently,\n      // the data from the first unavailable item is used.\n      notifyMe.dataset.productId = unavailableProduct.dataset.id;\n      notifyMe.dataset.variantId = unavailableProduct.dataset.selectedVariantId;\n    } else {\n      addToCart.hidden = false;\n      notifyMe.hidden = true;\n    }\n  }\n}\n\n/**\n * Retrieves the selected selling plan based on the subscription checkbox and radio button selection\n *\n * TODO Move it out of this custom element. I don't think it should be here, but for now it's more\n * or less a copy-paste of the existing functionality encapsulated in the custom element. We can\n * create a custom element to handle the subscription selector which will dispatch some event that\n * we can handle in this component then.\n */\nfunction getSellingPlan() {\n  const subscribeCheckbox =\n    document.querySelector<HTMLInputElement>('.subscribe-and-save__checkbox');\n  if (!subscribeCheckbox?.checked) {\n    return null;\n  }\n\n  const selectedRadioElement =\n    document.querySelector<HTMLInputElement>('.subscribe-and-save__radio:checked');\n  if (selectedRadioElement) {\n    return parseInt(selectedRadioElement.value, 10);\n  } else {\n    return null;\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'add-to-cart': AddToCart;\n  }\n}\n\nif (!customElements.get('add-to-cart')) {\n  customElements.define('add-to-cart', AddToCart);\n}\n","export default \":host{display:inline-flex;flex-direction:column;font-size:1rem;justify-content:flex-end;min-height:48px;width:100%}:host([data-button-variant=secondary]) button{background-color:#fff;border-color:#000;color:#000}:host([data-button-variant=secondary]) button:active,:host([data-button-variant=secondary]) button:hover{background-color:#f5f5f5;border-color:#1e1e1e}button{align-items:center;background-color:#000;border:1px solid #000;border-radius:0;color:#fff;cursor:pointer;flex-shrink:0;font-family:Poppins,sans-serif;font-size:inherit;font-weight:600;justify-content:center;letter-spacing:.16em;line-height:1;min-height:inherit;padding:10px 16px;text-align:center;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);white-space:nowrap;width:100%}button:active,button:hover{background-color:#333;border-color:#333}button:focus{outline:2px solid #000;outline-offset:1px}notify-me-button{min-height:inherit}button:disabled{opacity:.6}slot:not([name]){display:none}\";","// Module\nvar code = \"<button>Add to Bag</button><notify-me-button></notify-me-button><slot></slot>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\n/**\n * The custom element that is used to show a notify me button that opens a modal when clicked.\n */\nclass NotifyMeButton extends HTMLElement {\n  readonly dataset!: {\n    /**\n     * Product ID, a stringified integer number\n     */\n    productId: string;\n\n    /**\n     * Product variant ID, a stringified integer number\n     */\n    variantId: string;\n  };\n\n  public shadowRoot!: ShadowRoot;\n\n  private onButtonClickedBound = this.onButtonClicked.bind(this);\n\n  public constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    const button = this.shadowRoot.querySelector('button');\n    button.addEventListener('click', this.onButtonClickedBound);\n  }\n\n  public disconnectedCallback() {\n    const button = this.shadowRoot.querySelector('button');\n    button.removeEventListener('click', this.onButtonClickedBound);\n  }\n\n  private onButtonClicked(_event: Event) {\n    type OfirModal = HTMLElementTagNameMap['ofir-modal'];\n    const notifyMeModal = document.querySelector<OfirModal>('.notify-me-modal');\n    notifyMeModal.dataset.open = 'true';\n\n    const modalContent = notifyMeModal.querySelector('notify-me-modal');\n    modalContent.dataset.productId = this.dataset.productId;\n    modalContent.dataset.variantId = this.dataset.variantId;\n    modalContent.dataset.update = Date.now().toString();\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'notify-me-button': NotifyMeButton;\n  }\n}\n\nif (!customElements.get('notify-me-button')) {\n  customElements.define('notify-me-button', NotifyMeButton);\n}\n","export default \":host{display:inline-block;font-size:1rem;min-height:48px;width:100%}button{align-items:center;background-color:#d6d6d6;border:1px solid #d6d6d6;border-radius:0;color:#545454;cursor:pointer;display:inline-flex;font-family:Poppins,sans-serif;font-size:inherit;font-weight:600;justify-content:center;letter-spacing:.16em;line-height:1;min-height:inherit;padding:10px 16px;text-align:center;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);white-space:nowrap;width:100%}button:active,button:hover{background-color:#d1d1d1;border-color:#d1d1d1}button:focus{outline:2px solid #000;outline-offset:1px}:host([hidden]){display:none}\";","// Module\nvar code = \"<button>Notify Me</button>\";\n// Exports\nexport default code;","import type { CustomElement } from '@integrabeauty/custom-elements';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * Renders an customer messaging\n */\nexport class AlertElement extends HTMLElement implements CustomElement {\n  timerId: ReturnType<typeof setTimeout>;\n\n  public static get observedAttributes() {\n    return [\n      'data-type'\n    ];\n  }\n\n  readonly dataset!: {\n    /**\n     * Boolean represented as string to render the close button.\n     */\n    close: 'false' | 'true';\n\n    /**\n     * Boolean represented as string to hide/show the messaging component.\n     */\n    hidden: 'false' | 'true';\n\n    /**\n     * Position of the messaging component. Makes the component absolute and place the component\n     * according to the attribute value.\n     */\n    position: 'bottom-left' | 'bottom-right' | 'full' | 'top-left' | 'top-right';\n\n    /**\n     * Boolean represented as string to set the component as `position: fixe;`. It might be helpful\n     * in some cases with combination of the data-position attribute.\n     */\n    positionFixed: 'false' | 'true';\n\n    /**\n     * Time in milliseconds after which the component should hide.\n     */\n    timer: string;\n\n    /**\n     * Messaging severity level.\n     */\n    type: 'error' | 'info' | 'success';\n  };\n\n  private onCloseClickedBound = this.onCloseClicked.bind(this);\n\n  constructor() {\n    super();\n\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    const closeButton = this.shadowRoot.querySelector('.close-button');\n    closeButton.addEventListener('click', this.onCloseClickedBound);\n\n    if (this.dataset.timer) {\n      this.timerId = setTimeout(() => {\n        this.remove();\n      }, parseInt(this.dataset.timer, 10));\n    }\n  }\n\n  public disconnectedCallback() {\n    const closeButton = this.shadowRoot.querySelector('.close-button');\n    closeButton.removeEventListener('click', this.onCloseClickedBound);\n\n    if (this.timerId) {\n      clearTimeout(this.timerId);\n    }\n  }\n\n  private onCloseClicked(_event: Event) {\n    this.remove();\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'alert-element': AlertElement;\n  }\n}\n\nif (!customElements.get('alert-element')) {\n  customElements.define('alert-element', AlertElement);\n}\n","export default \":host{border:1px solid;border-radius:2px;display:block;margin-bottom:16px;padding:16px 42px 16px 16px;position:relative}:host([data-hidden=true]){display:none}:host([data-type=info]){background-color:#ffe5ad;border-color:#ffb619;color:#000;font-weight:600}:host([data-type=success]){background-color:#f9fef6;border-color:#3c8f12;color:#378410}:host([data-type=error]){background-color:#edcccc;border-color:#d50407;color:#d50407}:host([data-position]){max-width:300px;position:absolute;width:100%;z-index:99999}:host([data-position-fixed=true]){position:fixed}:host([data-position=top-left]){left:16px;top:16px}:host([data-position=top-right]){right:16px;top:16px}:host([data-position=bottom-left]){bottom:16px;left:16px}:host([data-position=bottom-right]){bottom:16px;right:16px}.close-button{appearance:none;background-color:#0000;border:none;box-sizing:initial;cursor:pointer;display:none;height:14px;line-height:1;padding:8px;position:absolute;right:0;top:0;width:14px}:host([data-close=true]) .close-button{display:block}::slotted([slot=content]){padding-left:0!important;padding-right:0!important}\";","// Module\nvar code = \"<div role=\\\"alert\\\"><button class=\\\"close-button\\\" aria-label=\\\"Close notification\\\"><svg stroke=\\\"black\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M0.600006 23.4L23.4 0.6\\\" stroke-width=\\\"1.5\\\" stroke-miterlimit=\\\"10\\\"></path><path d=\\\"M23.4 23.4L0.600006 0.6\\\" stroke-width=\\\"1.5\\\" stroke-miterlimit=\\\"10\\\"></path></svg></button><slot name=\\\"content\\\"></slot></div>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\n/**\n * Renders visual comparison of 2 selected images. Images are divided with separator, there is\n * option to enable separator dragging and option for adding labels for images\n */\nclass OfirBeforeAfter extends HTMLElement {\n  readonly dataset!: {\n    /**\n     * Defines if separator is draggable or static\n     */\n    draggableSeparator: string;\n\n    /**\n     * Represents index of before/after image groupings, used when more than one model is configured\n     */\n    index: string;\n\n    /**\n     * Indicates whether only one image is provided\n     */\n    singleImage: string;\n  };\n\n  public shadowRoot!: ShadowRoot;\n\n  /**\n   * Holds container with image on top, when user drags the separator all width changes are\n   * applied to this container\n   */\n  private overlay?: HTMLElement | null;\n\n  private onRangeInputBound = this.onRangeInput.bind(this);\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  connectedCallback() {\n    if (this.dataset.singleImage === 'true') {\n      const separator = this.shadowRoot.querySelector('.separator');\n      separator.classList.add('hide');\n\n      const image = this.querySelector<HTMLElement>('span');\n      if (image.dataset.beforeLabel && image.dataset.afterLabel) {\n        image.classList.add('image-label');\n      }\n    } else {\n      if (this.dataset.draggableSeparator === 'true') {\n        const slidesContainer = this.shadowRoot.querySelector('.slides-container');\n        slidesContainer.classList.add('draggable');\n\n        const sliderRange = this.shadowRoot.querySelector<HTMLInputElement>(\n          '.slides-container [type=\"range\"]');\n        sliderRange.addEventListener('input', this.onRangeInputBound);\n      }\n\n      const imageBefore = this.querySelector<HTMLElement>('span:first-child');\n      imageBefore.classList.add('active');\n      imageBefore.classList.add('overlay');\n\n      this.overlay = imageBefore;\n\n      if (imageBefore.dataset.label) {\n        imageBefore.classList.add('slide-label');\n      }\n\n      const imageAfter = this.querySelector<HTMLElement>('span:last-child');\n      if (imageAfter.dataset.label) {\n        imageAfter.classList.add('slide-label');\n      }\n    }\n  }\n\n  disconnectedCallback() {\n    const sliderRange = this.shadowRoot.querySelector('.slides-container [type=\"range\"]');\n    sliderRange.removeEventListener('input', this.onRangeInputBound);\n  }\n\n  onRangeInput(event: Event) {\n    console.log('onRangeInput');\n    const value = (<HTMLInputElement>event.target).value;\n\n    const separator = this.shadowRoot.querySelector<HTMLElement>('.separator');\n    const dragHandler = this.shadowRoot.querySelector<HTMLElement>('.drag-handler');\n    const dragHandlerWidth = parseInt(window.getComputedStyle(dragHandler).width, 10);\n    separator.style.left = `calc(${value}%)`;\n    dragHandler.style.left = `calc(${value}% - ${dragHandlerWidth / 2}px)`;\n\n    this.overlay.style.width = `${value}%`;\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'ofir-before-after': OfirBeforeAfter;\n  }\n}\n\nif (!customElements.get('ofir-before-after')) {\n  customElements.define('ofir-before-after', OfirBeforeAfter);\n}\n","export default \":host{display:flex;flex-direction:column;font-family:Poppins,sans-serif;position:relative}[type=range]{appearance:none;background-color:#0000;border:none;height:100%;left:0;margin:0;opacity:0;outline:none;padding:0;position:absolute;top:0;width:100%;z-index:20}.draggable [type=range]{cursor:ew-resize}.separator{background-color:#fff;height:100%;left:50%;position:absolute;width:3px;z-index:0}.separator.hide{display:none}.draggable .separator{z-index:1}.drag-handler{display:none;height:31px;left:calc(50% - 15px);position:absolute;top:calc(50% - 15.5px);width:31px;z-index:3}.draggable .drag-handler{display:block}.slides-container{display:inline-flex;flex-direction:column;height:inherit;overflow:hidden;position:relative;-webkit-user-select:none;user-select:none;width:inherit}@media only screen and (min-width:769px){.drag-handler{height:60px;left:calc(50% - 30px);top:calc(50% - 30.5px);width:61px}}\";","// Module\nvar code = \"<div class=\\\"slides-container\\\"><input type=\\\"range\\\" min=\\\"0\\\" max=\\\"100\\\" value=\\\"50\\\"><svg class=\\\"drag-handler\\\" viewBox=\\\"0 0 60 61\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><g clip-path=\\\"url(#clip0_9466_17143)\\\"><circle cx=\\\"29.7346\\\" cy=\\\"30.3812\\\" r=\\\"29.6437\\\" fill=\\\"white\\\"/><path d=\\\"M47.3425 29.0711C48.0661 29.7946 48.0661 30.9677 47.3425 31.6912L40.4771 38.5568C40.1153 38.9186 39.6411 39.0995 39.1671 39.0995C38.693 39.0995 38.2188 38.9186 37.8571 38.5569C37.1335 37.8333 37.1335 36.6603 37.8571 35.9368L41.5596 32.234H17.9095L21.6122 35.9367C22.3358 36.6603 22.3358 37.8333 21.6122 38.5568C21.2504 38.9186 20.7763 39.0995 20.3022 39.0995C19.8281 39.0995 19.3539 38.9186 18.9922 38.5569L12.1266 31.6914C11.7791 31.3438 11.5839 30.8727 11.5839 30.3812C11.5839 29.8898 11.7791 29.4186 12.1266 29.0711L18.9922 22.2056C19.7158 21.4821 20.8889 21.4821 21.6123 22.2056C22.3359 22.9291 22.3359 24.1022 21.6123 24.8257L17.9094 28.5285H41.5595L37.8568 24.8258C37.1332 24.1023 37.1332 22.9292 37.8568 22.2057C38.5806 21.4822 39.7537 21.4822 40.477 22.2057L47.3425 29.0711ZM59.3783 30.3812C59.3783 46.7269 46.0802 60.025 29.7346 60.025C13.3889 60.025 0.0908203 46.7269 0.0908203 30.3812C0.0908203 14.0356 13.3888 0.737488 29.7346 0.737488C46.0803 0.737488 59.3783 14.0356 59.3783 30.3812ZM55.6729 30.3812C55.6729 16.0788 44.037 4.44296 29.7346 4.44296C15.4322 4.44296 3.79629 16.0788 3.79629 30.3812C3.79629 44.6837 15.4322 56.3195 29.7346 56.3195C44.037 56.3195 55.6729 44.6837 55.6729 30.3812Z\\\" fill=\\\"black\\\"/></g></svg><div class=\\\"separator\\\"></div><slot></slot></div>\";\n// Exports\nexport default code;","import * as a11y from '../../common/a11y';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * Renders benefits box for Before/After web component\n */\nclass OfirBenefits extends HTMLElement {\n  public shadowRoot!: ShadowRoot;\n  private onOpenClickedBound = this.onOpenClicked.bind(this);\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  connectedCallback() {\n    const openElement = this.shadowRoot.querySelector('.header');\n    openElement?.addEventListener('click', this.onOpenClickedBound);\n  }\n\n  disconnectedCallback() {\n    const openElement = this.shadowRoot.querySelector('.header');\n    openElement?.removeEventListener('click', this.onOpenClickedBound);\n  }\n\n  onOpenClicked(event: Event) {\n    const target = <HTMLElement>event.target;\n    const openSign = target.querySelector('.open-sign');\n\n    // eslint-disable-next-line @typescript-eslint/no-deprecated\n    if (a11y.isExpanded(openSign)) {\n      // eslint-disable-next-line @typescript-eslint/no-deprecated\n      a11y.collapse(openSign);\n      openSign.innerHTML = '&mdash;';\n    } else {\n      // eslint-disable-next-line @typescript-eslint/no-deprecated\n      a11y.expand(openSign);\n      openSign.innerHTML = '&plus;';\n    }\n\n    this.shadowRoot.querySelector('.wrapper').classList.toggle('hidden');\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'ofir-before-after-benefits': OfirBenefits;\n  }\n}\n\nif (!customElements.get('ofir-before-after-benefits')) {\n  customElements.define('ofir-before-after-benefits', OfirBenefits);\n}\n","export default \":host{align-items:flex-start;display:flex;flex-direction:column;font-family:Poppins,sans-serif;font-size:1.125rem;gap:32px;height:100%;justify-content:center;padding:32px;width:100%}@media screen and (max-width:767px){:host{padding:16px}}:host h3{font-size:1.5rem;font-weight:600;letter-spacing:.029px;line-height:1.5rem;margin:0}@media screen and (max-width:767px){:host h3{font-size:1.25rem;line-height:1.25rem}}.hidden{display:none}.header>*{pointer-events:none}.open-sign{display:none}@media only screen and (max-width:768px){.open-sign{display:inline}.header{cursor:pointer;pointer-events:all}}\";","// Module\nvar code = \"<h3>Benefits</h3><slot></slot>\";\n// Exports\nexport default code;","/**\n * Collapses an element by updating its aria properties.\n *\n * This tolerates null/undefined as input.\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function collapse(element: Element) {\n  // We use setAttribute because we have observed errors using other techniques.\n\n  element?.setAttribute('aria-expanded', 'false');\n}\n\n/**\n * Expands an element by updating its aria properties.\n *\n * This tolerates null/undefined as input.\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function expand(element: Element) {\n  // We use setAttribute because we have observed errors using other techniques.\n\n  element?.setAttribute('aria-expanded', 'true');\n}\n\n/**\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function disable(element: Element) {\n  element?.setAttribute('aria-disabled', 'true');\n}\n\n/**\n * @todo remove the attribute instead? what is better? to set to false or remove?\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function enable(element: Element) {\n  element?.setAttribute('aria-disabled', 'false');\n}\n\n/**\n * @param element the element to mark as hidden, may be null or undefined\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function hide(element: Element) {\n  element?.setAttribute('aria-hidden', 'true');\n}\n\n/**\n * @param element the element to mark as visible, may be null or undefined\n * @param remove if true then the aria-hidden attribute is removed, if false then the aria hidden\n * attribute is set to the string value of false, this is optional and the default behavior is to\n * keep the attribute and set it to false\n *\n * @todo should we just unconditionally always remove instead of set to hidden? it is tricky because\n * we have some poorly coded css that is checking for aria-hidden=false instead of !=true, we might\n * have to first go and fix the css\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function show(element: Element, remove = false) {\n  if (remove) {\n    element?.removeAttribute('aria-hidden');\n  } else {\n    element?.setAttribute('aria-hidden', 'false');\n  }\n}\n\n/**\n * Mark the element and its descendants as inert. This is similar to \"aria-hidden\"\n * but additionally helps with keyboard focus, as the element would never receive it.\n * Marking the element as inert changes its state not only in the accessibility tree\n * but also in the render tree. The element will not receive any events.\n *\n * @param element any HTML element\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function makeInert(element: HTMLElement) {\n  element.setAttribute('inert', '');\n}\n\n/**\n * Clear the inert attribute and state.\n *\n * @param element any HTML element\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function clearInert(element: HTMLElement) {\n  element.removeAttribute('inert');\n}\n\n/**\n * @param element any html element, may be null/undefined\n * @returns whether the given element is expanded\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function isExpanded(element: Element) {\n  return element?.getAttribute('aria-expanded') === 'true';\n}\n\n/**\n * @param element an input element that can be checked/unchecked\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function check(element: HTMLElement) {\n  element.setAttribute('aria-checked', 'true');\n}\n\n/**\n * @param element an input element that can be checked/unchecked\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function uncheck(element: HTMLElement) {\n  element.setAttribute('aria-checked', 'false');\n}\n\n/**\n * @param element any HTML element used as a selectable option\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function select(element: HTMLElement) {\n  element.setAttribute('aria-selected', 'true');\n}\n\n/**\n * @param element any HTML element used as a selectable option\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function unselect(element: HTMLElement) {\n  element.removeAttribute('aria-selected');\n}\n\n/**\n * @param element any HTML element\n * @param label string used as a value for the added `aria-label` attribute\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function label(element: HTMLElement, label: string) {\n  element.setAttribute('aria-label', label);\n}\n\n/**\n * Remove the `aria-label` attribute from the element\n *\n * @param element any HTML element\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function removeLabel(element: HTMLElement) {\n  element.removeAttribute('aria-label');\n}\n\n/**\n * Set `aria-current` attribute to the provided element.\n *\n * @param element any HTML element\n * @param value one of available values\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current#values}\n * @see List of all available values\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function current(element: HTMLElement, value: AriaCurrentValues) {\n  // TODO should we use optional chaining?\n  element.setAttribute('aria-current', value);\n}\n\ntype AriaCurrentValues = 'date' | 'false' | 'location' | 'page' | 'step' | 'time' | 'true';\n\n/**\n * Define if the element should receive keyboard focus\n *\n * @param element any HTML element\n * @param value true - if element should be focusable\n *              false - if it shouldn't\n *              undefined - if the default browser behavior should be restored\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function focusable(element: HTMLElement, value: boolean | undefined) {\n  if (typeof value === 'undefined') {\n    element.removeAttribute('tabindex');\n  } else {\n    element.setAttribute('tabindex', value ? '0' : '-1');\n  }\n}\n\n/**\n * Set `aria-controls` attribute to the provided element.\n *\n * @param element any HTML element\n * @param value {string} ID of the controlled element\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function controls(element: HTMLElement, value: string) {\n  element.setAttribute('aria-controls', value);\n}\n\n/**\n * Set the aria-invalid attribute of the provided element to one of the possible values that\n * represent an invalid state.\n *\n * @param element any html element, may be null/undefined\n * @param value\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function invalid(element: Element, value: 'grammar' | 'spelling' | 'true') {\n  element?.setAttribute('aria-invalid', value);\n}\n\n/**\n * Set the `aria-invalid` attribute of the provided element to 'false'.\n *\n * @param element any html element, may be null/undefined\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function valid(element: Element) {\n  element?.setAttribute('aria-invalid', 'false');\n}\n\n/**\n * Check element validity according to aria-invalid attribute. If the attribute is not present, or\n * its value is false, or its value is an empty string, the default value of false applies which\n * means that the element is valid.\n *\n * @param element any html element, may be null/undefined\n *\n * @deprecated This library was removed from Lange, and all its functions were inlined to simplify\n * the transition to Shopify apps.\n */\nexport function isValid(element: Element) {\n  if (!element) {\n    return;\n  }\n\n  const ariaInvalid = element.getAttribute('aria-invalid');\n\n  return !ariaInvalid || ariaInvalid === 'false';\n}\n","import type { CustomElement } from '@integrabeauty/custom-elements';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * ClickableArea works like an <a> element, but should be used for very specific\n * cases, where the <a> element would cause difficulties to accessibility.\n *\n * This element should be used in cases where links with the same `href` and\n * the same accessible text are duplicated for some reason. One such example\n * is a product card. We have a product title wrapped in a link to the product\n * page, and next to it we have a product image with the same target. This causes\n * an accessibility problem because we shouldn't have any of the following:\n * - a link with no accessible title (`img alt` would be the accessible title here)\n * - a decorative image having non-empty alt\n * - two links with the same title (and the same target)\n * - non-clickable image\n *\n * ClickableArea is a workaround for this situation. It is not focusable and\n * has a role of `presentation`. It is also not a real HTML link (<a>).\n * This means it will be completely invisible to the assistive technology\n * while offering a possibility for mouse/touchscreen users to have a bigger\n * are they can click on.\n *\n * When not to use this component:\n *\n * It should never be used when the slotted content contains information\n * that's not repeated nearby. In other words it should never be used if\n * this would cause to hide information and/or functionality from users\n * with disabilities. This means it should also never be used when there\n * are no other links to the clickable-area url in a close proximity of\n * the element.\n */\nclass ClickableArea extends HTMLElement implements CustomElement {\n  public static get observedAttributes() {\n    return [\n      'data-url'\n    ];\n  }\n\n  readonly dataset!: {\n    /**\n     * Absolute or relative URL to the target page\n     *\n     * If left empty, the redirect will be disabled\n     */\n    url: string;\n  };\n\n  private onClickedBound = this.onClicked.bind(this);\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    const clickable = this.shadowRoot.querySelector('.clickable-wrapper');\n    clickable.addEventListener('click', this.onClickedBound);\n  }\n\n  public disconnectedCallback() {\n    const clickable = this.shadowRoot.querySelector('.clickable-wrapper');\n    clickable?.removeEventListener('click', this.onClickedBound);\n  }\n\n  private onClicked(_event: Event) {\n    if (this.dataset.url) {\n      window.location.href = this.dataset.url;\n    }\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'clickable-area': ClickableArea;\n  }\n}\n\nif (!customElements.get('clickable-area')) {\n  customElements.define('clickable-area', ClickableArea);\n}\n","export default \":host{cursor:pointer;display:inline}.clickable-wrapper{display:inline;position:relative}\";","// Module\nvar code = \"<div role=\\\"presentation\\\" class=\\\"clickable-wrapper\\\" tabindex=\\\"-1\\\"><slot></slot></div>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\nclass CountdownTimer extends HTMLElement {\n  static get observedAttributes() {\n    return ['data-title', 'data-end-time', 'data-start-time'];\n  }\n\n  public dataset!: {\n    /**\n     * The end time of the timer, timestamps in seconds.\n     */\n    endTime: string;\n\n    /**\n     * The start time of the timer, timestamps in seconds.\n     */\n    startTime: string;\n\n    /**\n     * The title of the block\n     */\n    title: string;\n  };\n\n  public shadowRoot!: ShadowRoot;\n  private startTime?: number;\n  private endTime?: number;\n  private timeItemMap: TimeItemMap;\n  private timer?: ReturnType<typeof setInterval>;\n\n  /**\n   * The circumference of the rounded SVG progress bar. We need that for calculations\n   */\n  private circumference? = 182.21;\n\n  /**\n   * Flag that indicates if the component is hidden\n   */\n  private isHidden: boolean;\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    this.timeItemMap = {};\n    this.render();\n    this.restartTimer();\n  }\n\n  public disconnectedCallback() {\n    clearTimeout(this.timer);\n  }\n\n  public attributeChangedCallback(name: string, _oldValue: string, newValue: string) {\n    if (name === 'data-title') {\n      this.renderTitle();\n    }\n\n    if (name === 'data-end-time') {\n      this.endTime = parseInt(newValue, 10) * 1000;\n      const nowTime = Date.now();\n      if (this.endTime - nowTime > 0) {\n        this.show();\n      } else {\n        this.hide();\n      }\n    }\n\n    if (name === 'data-start-time') {\n      this.startTime = parseInt(newValue, 10) * 1000;\n    }\n\n    if (this.timeItemMap && (name === 'data-start-time' || name === 'data-end-time')) {\n      this.restartTimer();\n    }\n  }\n\n  private render() {\n    if (this.isHidden) {\n      return;\n    }\n\n    this.renderTitle();\n    this.renderTimeItem('days', 'Days', Math.floor((this.endTime - this.startTime) / 86400000));\n    this.renderTimeItem('hours', 'Hours', 24);\n    this.renderTimeItem('minutes', 'Minutes', 60);\n    this.renderTimeItem('seconds', 'Seconds', 60);\n  }\n\n  private renderTitle() {\n    const titleEl = this.shadowRoot.querySelector('.title');\n    titleEl.textContent = this.dataset.title;\n  }\n\n  /**\n   * Creates form the template and appends an element for a timer item (days, hours, minutes, or\n   * seconds).\n   */\n  private renderTimeItem(id: string, label: string, maxValue: number) {\n    const timeItemTemplate =\n      <HTMLTemplateElement>this.shadowRoot.getElementById('time-item-template');\n    const timeItemEl = <HTMLElement>timeItemTemplate.content.cloneNode(true);\n    const timeItemRootEl = timeItemEl.querySelector('.time-item');\n    timeItemRootEl.setAttribute('id', id);\n\n    const labelEl = timeItemEl.querySelector('.label');\n    labelEl.textContent = label;\n\n    const timeEl = this.shadowRoot.querySelector('.time');\n\n    this.timeItemMap[id] = {\n      maxValue,\n      prevDash: 0,\n      prevValue: 0,\n      progressBarTrackEl: timeItemEl.querySelector('.progress-bar-track'),\n      valueEl: timeItemEl.querySelector('.value')\n    };\n\n    timeEl.appendChild(timeItemEl);\n  }\n\n  /**\n   * Updates time for all items\n   */\n  private updateTime() {\n    const nowTime = Date.now();\n\n    const remaining = getTimeRemaining(this.endTime, nowTime);\n    for (const [timeItemId, timeItemValue] of Object.entries(remaining)) {\n      this.updateTimeItem(timeItemId, timeItemValue);\n    }\n  }\n\n  /**\n   * Update time for the time item with provided id\n   */\n  private updateTimeItem(id: string, newValue: number) {\n    const { valueEl, progressBarTrackEl, maxValue, prevValue, prevDash } = this.timeItemMap[id];\n    if (prevValue !== Math.floor(newValue)) {\n      valueEl.textContent = Math.floor(newValue).toString();\n      this.timeItemMap[id].prevValue = newValue;\n    }\n\n    const newDash = Math.floor((1 - newValue / maxValue) * this.circumference * 100) / 100;\n    if (newDash !== prevDash) {\n      progressBarTrackEl.setAttribute('stroke-dasharray',\n        `${newDash} ${this.circumference}`);\n      this.timeItemMap[id].prevDash = newDash;\n    }\n  }\n\n  /**\n   * Restart the timer\n   */\n  private restartTimer() {\n    if (this.isHidden) {\n      return;\n    }\n\n    if (!this.timeItemMap || !this.timeItemMap.days.valueEl || !this.timeItemMap.hours.valueEl ||\n      !this.timeItemMap.minutes.valueEl || !this.timeItemMap.seconds.valueEl) {\n      return;\n    }\n\n    clearInterval(this.timer);\n    this.timer = setInterval(this.updateTime.bind(this), 100);\n  }\n\n  /**\n   * Show the whole component\n   */\n  private show() {\n    this.isHidden = false;\n    this.style.display = null;\n  }\n\n  /**\n   * Hide the whole component. We need that when there's no time remain but the block is still\n   * placed on the page.\n   */\n  private hide() {\n    this.isHidden = true;\n    clearInterval(this.timer);\n    this.style.display = 'none';\n  }\n}\n\n/**\n * Return an object with the remaining time accurate to the hundredth to smoothly animate\n * the progress bar\n */\nfunction getTimeRemaining(endingMs: number, currentMs: number) {\n  let timeRemainingSeconds = (endingMs - currentMs) / 1000;\n\n  const days = Math.floor(timeRemainingSeconds / 86400 * 100) / 100;\n  timeRemainingSeconds -= Math.floor(days) * 86400;\n\n  const hours = Math.floor(timeRemainingSeconds / 3600 * 100) / 100;\n  timeRemainingSeconds -= Math.floor(hours) % 24 * 3600;\n\n  const minutes = Math.floor(timeRemainingSeconds / 60 * 100) / 100;\n  timeRemainingSeconds -= Math.floor(minutes) * 60;\n\n  const seconds = Math.floor(timeRemainingSeconds % 60 * 100) / 100;\n\n  return {\n    days,\n    hours,\n    minutes,\n    seconds\n  };\n}\n\ntype TimeItemMap = Record<string, {\n  maxValue: number;\n  prevDash: number;\n  prevValue: number;\n  progressBarTrackEl: HTMLElement;\n  valueEl: HTMLElement;\n}>;\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'countdown-timer': CountdownTimer;\n  }\n}\n\nif (!customElements.get('countdown-timer')) {\n  customElements.define('countdown-timer', CountdownTimer);\n}\n","export default \":host{--gap:16px;display:block;padding:var(--gap);text-align:center;width:100%}@media(min-width:768px){:host{--gap:24px}}@media(min-width:1024px){:host{column-gap:40px;display:flex;justify-content:center}}@media(min-width:1024px){.main{display:flex;flex-direction:column;flex-shrink:0;justify-content:center;width:calc(50% - 20px)}}.title{font-weight:600;margin-bottom:var(--gap);margin-top:0}.title:empty{display:none}.time{display:flex;justify-content:space-between;margin-bottom:var(--gap);margin-left:auto;margin-right:auto;width:288px}@media(min-width:1024px){.time{width:434px}}.value-wrapper{align-items:center;border-radius:50%;box-sizing:border-box;display:flex;font-family:inherit;font-size:1rem;height:61px;justify-content:center;line-height:1;margin-bottom:1.125rem;position:relative;width:61px}@media(min-width:1024px){.value-wrapper{height:78px;width:78px}}.value{font-size:1.5rem;font-weight:600;line-height:1}@media(min-width:1024px){.value{font-size:2rem}}.progress-bar{height:100%;inset:0;pointer-events:none;position:absolute;transform:rotate(-25deg);width:100%}.label{font-size:.875rem;line-height:1.5}@media(min-width:1024px){.label{font-size:1rem}slot[name=form]{width:calc(50% - 20px)}}\";","// Module\nvar code = \"<div class=\\\"main\\\"><h2 class=\\\"title\\\"></h2><div class=\\\"time\\\"></div></div><template id=\\\"time-item-template\\\"><div class=\\\"time-item\\\"><div class=\\\"value-wrapper\\\"><span class=\\\"value\\\">0</span><svg class=\\\"progress-bar\\\" width=\\\"63\\\" height=\\\"63\\\" viewBox=\\\"0 0 63 63\\\"><circle class=\\\"bg\\\" cx=\\\"31.5\\\" cy=\\\"31.5\\\" r=\\\"27.5\\\" fill=\\\"none\\\" stroke=\\\"#e6e7e8\\\" stroke-width=\\\"3\\\"></circle><circle class=\\\"progress-bar-track\\\" cx=\\\"31.5\\\" cy=\\\"31.5\\\" r=\\\"29\\\" fill=\\\"none\\\" stroke=\\\"#ee3932\\\" stroke-width=\\\"3\\\" stroke-linecap=\\\"round\\\" stroke-dasharray=\\\"0 182.21\\\"></circle><circle cx=\\\"60\\\" cy=\\\"31.5\\\" r=\\\"3\\\" fill=\\\"#ee3932\\\"></circle></svg></div><div class=\\\"label\\\">Label</div></div></template>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\nexport class OfirModal extends HTMLElement {\n  static get observedAttributes() {\n    return [\n      'data-open'\n    ];\n  }\n\n  readonly dataset!: {\n    open: string;\n  };\n\n  public shadowRoot!: ShadowRoot;\n  private hideModalBound = this.hideModal.bind(this);\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    const closeButtonElement = this.shadowRoot.querySelector('.close-button');\n    closeButtonElement.addEventListener('click', this.hideModalBound);\n\n    const modalScrimElement = this.shadowRoot.querySelector('.modal-scrim');\n    modalScrimElement.addEventListener('click', this.hideModalBound);\n  }\n\n  public attributeChangedCallback(_name: string, oldValue: string, newValue: string) {\n    if (!this.isConnected || oldValue === newValue) {\n      return;\n    }\n\n    if (newValue === 'true') {\n      showModal();\n    } else {\n      this.hideModal();\n    }\n  }\n\n  private hideModal() {\n    this.setAttribute('data-open', 'false');\n    document.documentElement.style.overflow = null;\n  }\n}\n\nfunction showModal() {\n  document.documentElement.style.overflow = 'hidden';\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'ofir-modal': OfirModal;\n  }\n}\n\nif (!customElements.get('ofir-modal')) {\n  customElements.define('ofir-modal', OfirModal);\n}\n","export default \":host{display:none}:host([data-open=true]){display:block}.modal-box{background-color:#f5f5f5;border-radius:10px;box-sizing:border-box;left:50%;max-height:90vh;max-width:400px;overflow:auto;padding:1rem 1rem 2rem;position:fixed;top:50%;transform:translate(-50%,-50%);width:calc(100vw - 32px);z-index:100}.close-button{appearance:none;background-color:#0000;border:none;cursor:pointer;padding:16px;position:absolute;right:0;top:0;transition-duration:.2s}.close-button:hover{opacity:.6}.modal-scrim{background:#0009;bottom:0;left:0;position:fixed;right:0;top:0}\";","// Module\nvar code = \"<div class=\\\"modal-scrim\\\"></div><div class=\\\"modal-box\\\"><button class=\\\"close-button\\\" type=\\\"button\\\"><svg width=\\\"14\\\" height=\\\"14\\\" viewBox=\\\"0 0 14 14\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"M1 1L12.9998 13\\\" stroke=\\\"#36322F\\\" stroke-width=\\\"1.2\\\" stroke-linecap=\\\"round\\\"/><path d=\\\"M12.9998 1L1 13\\\" stroke=\\\"#36322F\\\" stroke-width=\\\"1.2\\\" stroke-linecap=\\\"round\\\"/></svg></button><div class=\\\"content\\\"><slot name=\\\"content\\\"></slot></div></div>\";\n// Exports\nexport default code;","var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n  __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n  return value;\n};\nconst EMAIL_REGEXP = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\nconst INTEGER_REGEXP = /^-?[0-9]\\d*$/;\nconst PASSWORD_REGEXP = /^(?=.*[A-Za-z])(?=.*\\d).{8,}$/;\nconst STRONG_PASSWORD_REGEXP = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$/;\nconst isEmpty = (value) => {\n  let newVal = value;\n  if (typeof value === \"string\") {\n    newVal = value.trim();\n  }\n  return !newVal;\n};\nconst isEmail = (value) => {\n  return EMAIL_REGEXP.test(value);\n};\nconst isLengthMoreThanMax = (value, len) => {\n  return value.length > len;\n};\nconst isLengthLessThanMin = (value, len) => {\n  return value.length < len;\n};\nconst isNumber = (value) => {\n  if (typeof value !== \"string\") {\n    return false;\n  }\n  return !isNaN(+value) && !isNaN(parseFloat(value));\n};\nconst isInteger = (value) => {\n  return INTEGER_REGEXP.test(value);\n};\nconst isPassword = (value) => {\n  return PASSWORD_REGEXP.test(value);\n};\nconst isStrongPassword = (value) => {\n  return STRONG_PASSWORD_REGEXP.test(value);\n};\nconst isNumberMoreThanMax = (value, len) => {\n  return value > len;\n};\nconst isNumberLessThanMin = (value, len) => {\n  return value < len;\n};\nconst isInvalidOrEmptyString = (value) => {\n  return typeof value !== \"string\" || value === \"\";\n};\nvar Rules = /* @__PURE__ */ ((Rules2) => {\n  Rules2[\"Required\"] = \"required\";\n  Rules2[\"Email\"] = \"email\";\n  Rules2[\"MinLength\"] = \"minLength\";\n  Rules2[\"MaxLength\"] = \"maxLength\";\n  Rules2[\"Password\"] = \"password\";\n  Rules2[\"Number\"] = \"number\";\n  Rules2[\"Integer\"] = \"integer\";\n  Rules2[\"MaxNumber\"] = \"maxNumber\";\n  Rules2[\"MinNumber\"] = \"minNumber\";\n  Rules2[\"StrongPassword\"] = \"strongPassword\";\n  Rules2[\"CustomRegexp\"] = \"customRegexp\";\n  Rules2[\"MinFilesCount\"] = \"minFilesCount\";\n  Rules2[\"MaxFilesCount\"] = \"maxFilesCount\";\n  Rules2[\"Files\"] = \"files\";\n  return Rules2;\n})(Rules || {});\nvar GroupRules = /* @__PURE__ */ ((GroupRules2) => {\n  GroupRules2[\"Required\"] = \"required\";\n  return GroupRules2;\n})(GroupRules || {});\nvar CustomStyleTagIds = /* @__PURE__ */ ((CustomStyleTagIds2) => {\n  CustomStyleTagIds2[\"Label\"] = \"label\";\n  CustomStyleTagIds2[\"LabelArrow\"] = \"labelArrow\";\n  return CustomStyleTagIds2;\n})(CustomStyleTagIds || {});\nconst defaultDictionary = [\n  {\n    key: Rules.Required,\n    dict: {\n      en: \"The field is required\"\n    }\n  },\n  {\n    key: Rules.Email,\n    dict: {\n      en: \"Email has invalid format\"\n    }\n  },\n  {\n    key: Rules.MaxLength,\n    dict: {\n      en: \"The field must contain a maximum of :value characters\"\n    }\n  },\n  {\n    key: Rules.MinLength,\n    dict: {\n      en: \"The field must contain a minimum of :value characters\"\n    }\n  },\n  {\n    key: Rules.Password,\n    dict: {\n      en: \"Password must contain minimum eight characters, at least one letter and one number\"\n    }\n  },\n  {\n    key: Rules.StrongPassword,\n    dict: {\n      en: \"Password should contain minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character\"\n    }\n  },\n  {\n    key: Rules.Number,\n    dict: {\n      en: \"Value should be a number\"\n    }\n  },\n  {\n    key: Rules.MaxNumber,\n    dict: {\n      en: \"Number should be less or equal than :value\"\n    }\n  },\n  {\n    key: Rules.MinNumber,\n    dict: {\n      en: \"Number should be more or equal than :value\"\n    }\n  },\n  {\n    key: Rules.MinFilesCount,\n    dict: {\n      en: \"Files count should be more or equal than :value\"\n    }\n  },\n  {\n    key: Rules.MaxFilesCount,\n    dict: {\n      en: \"Files count should be less or equal than :value\"\n    }\n  },\n  {\n    key: Rules.Files,\n    dict: {\n      en: \"Uploaded files have one or several invalid properties (extension/size/type etc).\"\n    }\n  }\n];\nconst DEFAULT_ERROR_FIELD_MESSAGE = \"Value is incorrect\";\nconst isPromise = (val) => typeof val === \"object\" && val !== null && \"then\" in val && typeof val.then === \"function\";\nconst getNodeParents = (el) => {\n  let elem = el;\n  const els = [];\n  while (elem) {\n    els.unshift(elem);\n    elem = elem.parentNode;\n  }\n  return els;\n};\nconst getClosestParent = (groups, parents) => {\n  const reversedParents = [...parents].reverse();\n  for (let i = 0, len = reversedParents.length; i < len; ++i) {\n    const parent = reversedParents[i];\n    for (const key in groups) {\n      const group = groups[key];\n      if (group.groupElem === parent) {\n        return [key, group];\n      }\n    }\n  }\n  return null;\n};\nconst getClassList = (classList) => {\n  if (Array.isArray(classList)) {\n    return classList.filter((cls) => cls.length > 0);\n  }\n  if (typeof classList === \"string\" && classList.trim()) {\n    return [...classList.split(\" \").filter((cls) => cls.length > 0)];\n  }\n  return [];\n};\nconst isElement = (element) => {\n  return element instanceof Element || element instanceof HTMLDocument;\n};\nconst errorLabelCss = `.just-validate-error-label[data-tooltip=true]{position:fixed;padding:4px 8px;background:#423f3f;color:#fff;white-space:nowrap;z-index:10;border-radius:4px;transform:translateY(-5px)}.just-validate-error-label[data-tooltip=true]:before{content:'';width:0;height:0;border-left:solid 5px transparent;border-right:solid 5px transparent;border-bottom:solid 5px #423f3f;position:absolute;z-index:3;display:block;bottom:-5px;transform:rotate(180deg);left:calc(50% - 5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]{transform:translateX(-5px)}.just-validate-error-label[data-tooltip=true][data-direction=left]:before{right:-7px;bottom:auto;left:auto;top:calc(50% - 2px);transform:rotate(90deg)}.just-validate-error-label[data-tooltip=true][data-direction=right]{transform:translateX(5px)}.just-validate-error-label[data-tooltip=true][data-direction=right]:before{right:auto;bottom:auto;left:-7px;top:calc(50% - 2px);transform:rotate(-90deg)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]{transform:translateY(5px)}.just-validate-error-label[data-tooltip=true][data-direction=bottom]:before{right:auto;bottom:auto;left:calc(50% - 5px);top:-5px;transform:rotate(0)}`;\nconst TOOLTIP_ARROW_HEIGHT = 5;\nconst defaultGlobalConfig = {\n  errorFieldStyle: {\n    color: \"#b81111\",\n    border: \"1px solid #B81111\"\n  },\n  errorFieldCssClass: \"just-validate-error-field\",\n  successFieldCssClass: \"just-validate-success-field\",\n  errorLabelStyle: {\n    color: \"#b81111\"\n  },\n  errorLabelCssClass: \"just-validate-error-label\",\n  successLabelCssClass: \"just-validate-success-label\",\n  focusInvalidField: true,\n  lockForm: true,\n  testingMode: false,\n  validateBeforeSubmitting: false,\n  submitFormAutomatically: false\n};\nclass JustValidate {\n  constructor(form, globalConfig, dictLocale) {\n    __publicField(this, \"form\", null);\n    __publicField(this, \"fields\", {});\n    __publicField(this, \"groupFields\", {});\n    __publicField(this, \"errors\", {});\n    __publicField(this, \"isValid\", false);\n    __publicField(this, \"isSubmitted\", false);\n    __publicField(this, \"globalConfig\", defaultGlobalConfig);\n    __publicField(this, \"errorLabels\", {});\n    __publicField(this, \"successLabels\", {});\n    __publicField(this, \"eventListeners\", []);\n    __publicField(this, \"dictLocale\", defaultDictionary);\n    __publicField(this, \"currentLocale\", \"en\");\n    __publicField(this, \"customStyleTags\", {});\n    __publicField(this, \"onSuccessCallback\");\n    __publicField(this, \"onFailCallback\");\n    __publicField(this, \"onValidateCallback\");\n    __publicField(this, \"tooltips\", []);\n    __publicField(this, \"lastScrollPosition\");\n    __publicField(this, \"isScrollTick\");\n    __publicField(this, \"fieldIds\", /* @__PURE__ */ new Map());\n    __publicField(this, \"getKeyByFieldSelector\", (field) => {\n      return this.fieldIds.get(field);\n    });\n    __publicField(this, \"getFieldSelectorByKey\", (key) => {\n      for (const [fieldSelector, k] of this.fieldIds) {\n        if (key === k) {\n          return fieldSelector;\n        }\n      }\n      return void 0;\n    });\n    __publicField(this, \"getCompatibleFields\", () => {\n      const fields = {};\n      Object.keys(this.fields).forEach((key) => {\n        let newKey = key;\n        const fieldSelector = this.getFieldSelectorByKey(key);\n        if (typeof fieldSelector === \"string\") {\n          newKey = fieldSelector;\n        }\n        fields[newKey] = { ...this.fields[key] };\n      });\n      return fields;\n    });\n    __publicField(this, \"setKeyByFieldSelector\", (field) => {\n      if (this.fieldIds.has(field)) {\n        return this.fieldIds.get(field);\n      }\n      const key = String(this.fieldIds.size + 1);\n      this.fieldIds.set(field, key);\n      return key;\n    });\n    __publicField(this, \"refreshAllTooltips\", () => {\n      this.tooltips.forEach((item) => {\n        item.refresh();\n      });\n    });\n    __publicField(this, \"handleDocumentScroll\", () => {\n      this.lastScrollPosition = window.scrollY;\n      if (!this.isScrollTick) {\n        window.requestAnimationFrame(() => {\n          this.refreshAllTooltips();\n          this.isScrollTick = false;\n        });\n        this.isScrollTick = true;\n      }\n    });\n    __publicField(this, \"formSubmitHandler\", (ev) => {\n      ev.preventDefault();\n      this.isSubmitted = true;\n      this.validateHandler(ev);\n    });\n    __publicField(this, \"handleFieldChange\", (target) => {\n      let foundKey;\n      for (const key in this.fields) {\n        const field = this.fields[key];\n        if (field.elem === target) {\n          foundKey = key;\n          break;\n        }\n      }\n      if (!foundKey) {\n        return;\n      }\n      this.fields[foundKey].touched = true;\n      this.validateField(foundKey, true);\n    });\n    __publicField(this, \"handleGroupChange\", (target) => {\n      let foundKey;\n      for (const key in this.groupFields) {\n        const group = this.groupFields[key];\n        if (group.elems.find((elem) => elem === target)) {\n          foundKey = key;\n          break;\n        }\n      }\n      if (!foundKey) {\n        return;\n      }\n      this.groupFields[foundKey].touched = true;\n      this.validateGroup(foundKey, true);\n    });\n    __publicField(this, \"handlerChange\", (ev) => {\n      if (!ev.target) {\n        return;\n      }\n      this.handleFieldChange(ev.target);\n      this.handleGroupChange(ev.target);\n      this.renderErrors();\n    });\n    this.initialize(form, globalConfig, dictLocale);\n  }\n  initialize(form, globalConfig, dictLocale) {\n    this.form = null;\n    this.errors = {};\n    this.isValid = false;\n    this.isSubmitted = false;\n    this.globalConfig = defaultGlobalConfig;\n    this.errorLabels = {};\n    this.successLabels = {};\n    this.eventListeners = [];\n    this.customStyleTags = {};\n    this.tooltips = [];\n    this.currentLocale = \"en\";\n    if (typeof form === \"string\") {\n      const elem = document.querySelector(form);\n      if (!elem) {\n        throw Error(\n          `Form with ${form} selector not found! Please check the form selector`\n        );\n      }\n      this.setForm(elem);\n    } else if (form instanceof HTMLFormElement) {\n      this.setForm(form);\n    } else {\n      throw Error(\n        `Form selector is not valid. Please specify a string selector or a DOM element.`\n      );\n    }\n    this.globalConfig = { ...defaultGlobalConfig, ...globalConfig };\n    if (dictLocale) {\n      this.dictLocale = [...dictLocale, ...defaultDictionary];\n    }\n    if (this.isTooltip()) {\n      const styleTag = document.createElement(\"style\");\n      styleTag.textContent = errorLabelCss;\n      this.customStyleTags[CustomStyleTagIds.Label] = document.head.appendChild(styleTag);\n      this.addListener(\"scroll\", document, this.handleDocumentScroll);\n    }\n  }\n  getLocalisedString(rule, ruleValue, customMsg) {\n    var _a;\n    const search = customMsg != null ? customMsg : rule;\n    let localisedStr = (_a = this.dictLocale.find((item) => item.key === search)) == null ? void 0 : _a.dict[this.currentLocale];\n    if (!localisedStr) {\n      if (customMsg) {\n        localisedStr = customMsg;\n      }\n    }\n    if (localisedStr && ruleValue !== void 0) {\n      switch (rule) {\n        case Rules.MaxLength:\n        case Rules.MinLength:\n        case Rules.MaxNumber:\n        case Rules.MinNumber:\n        case Rules.MinFilesCount:\n        case Rules.MaxFilesCount:\n          localisedStr = localisedStr.replace(\":value\", String(ruleValue));\n      }\n    }\n    return localisedStr || customMsg || DEFAULT_ERROR_FIELD_MESSAGE;\n  }\n  getFieldErrorMessage(fieldRule, elem) {\n    const msg = typeof fieldRule.errorMessage === \"function\" ? fieldRule.errorMessage(this.getElemValue(elem), this.fields) : fieldRule.errorMessage;\n    return this.getLocalisedString(fieldRule.rule, fieldRule.value, msg);\n  }\n  getFieldSuccessMessage(successMessage, elem) {\n    const msg = typeof successMessage === \"function\" ? successMessage(this.getElemValue(elem), this.fields) : successMessage;\n    return this.getLocalisedString(void 0, void 0, msg);\n  }\n  getGroupErrorMessage(groupRule) {\n    return this.getLocalisedString(\n      groupRule.rule,\n      void 0,\n      groupRule.errorMessage\n    );\n  }\n  getGroupSuccessMessage(groupRule) {\n    if (!groupRule.successMessage) {\n      return void 0;\n    }\n    return this.getLocalisedString(\n      void 0,\n      void 0,\n      groupRule.successMessage\n    );\n  }\n  setFieldInvalid(key, fieldRule) {\n    this.fields[key].isValid = false;\n    this.fields[key].errorMessage = this.getFieldErrorMessage(\n      fieldRule,\n      this.fields[key].elem\n    );\n  }\n  setFieldValid(key, successMessage) {\n    this.fields[key].isValid = true;\n    if (successMessage !== void 0) {\n      this.fields[key].successMessage = this.getFieldSuccessMessage(\n        successMessage,\n        this.fields[key].elem\n      );\n    }\n  }\n  setGroupInvalid(key, groupRule) {\n    this.groupFields[key].isValid = false;\n    this.groupFields[key].errorMessage = this.getGroupErrorMessage(groupRule);\n  }\n  setGroupValid(key, groupRule) {\n    this.groupFields[key].isValid = true;\n    this.groupFields[key].successMessage = this.getGroupSuccessMessage(groupRule);\n  }\n  getElemValue(elem) {\n    switch (elem.type) {\n      case \"checkbox\":\n        return elem.checked;\n      case \"file\":\n        return elem.files;\n      default:\n        return elem.value;\n    }\n  }\n  validateGroupRule(key, elems, groupRule) {\n    switch (groupRule.rule) {\n      case GroupRules.Required: {\n        if (elems.every((elem) => !elem.checked)) {\n          this.setGroupInvalid(key, groupRule);\n        } else {\n          this.setGroupValid(key, groupRule);\n        }\n      }\n    }\n  }\n  validateFieldRule(key, elem, fieldRule, afterInputChanged = false) {\n    const ruleValue = fieldRule.value;\n    const elemValue = this.getElemValue(elem);\n    if (fieldRule.plugin) {\n      const result = fieldRule.plugin(\n        elemValue,\n        this.getCompatibleFields()\n      );\n      if (!result) {\n        this.setFieldInvalid(key, fieldRule);\n      }\n      return;\n    }\n    switch (fieldRule.rule) {\n      case Rules.Required: {\n        if (isEmpty(elemValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.Email: {\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        if (!isEmail(elemValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.MaxLength: {\n        if (ruleValue === void 0) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field is not defined. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (typeof ruleValue !== \"number\") {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] should be a number. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        if (isLengthMoreThanMax(elemValue, ruleValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.MinLength: {\n        if (ruleValue === void 0) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field is not defined. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (typeof ruleValue !== \"number\") {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] should be a number. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        if (isLengthLessThanMin(elemValue, ruleValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.Password: {\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        if (!isPassword(elemValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.StrongPassword: {\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        if (!isStrongPassword(elemValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.Number: {\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        if (!isNumber(elemValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.Integer: {\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        if (!isInteger(elemValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.MaxNumber: {\n        if (ruleValue === void 0) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field is not defined. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (typeof ruleValue !== \"number\") {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field should be a number. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        const num = +elemValue;\n        if (Number.isNaN(num) || isNumberMoreThanMax(num, ruleValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.MinNumber: {\n        if (ruleValue === void 0) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field is not defined. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (typeof ruleValue !== \"number\") {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field should be a number. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (isInvalidOrEmptyString(elemValue)) {\n          break;\n        }\n        const num = +elemValue;\n        if (Number.isNaN(num) || isNumberLessThanMin(num, ruleValue)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.CustomRegexp: {\n        if (ruleValue === void 0) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field is not defined. This field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          return;\n        }\n        let regexp;\n        try {\n          regexp = new RegExp(ruleValue);\n        } catch (e) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] should be a valid regexp. This field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        const str = String(elemValue);\n        if (str !== \"\" && !regexp.test(str)) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n        break;\n      }\n      case Rules.MinFilesCount: {\n        if (ruleValue === void 0) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field is not defined. This field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (typeof ruleValue !== \"number\") {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field should be a number. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (Number.isFinite(elemValue == null ? void 0 : elemValue.length) && elemValue.length < ruleValue) {\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        break;\n      }\n      case Rules.MaxFilesCount: {\n        if (ruleValue === void 0) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field is not defined. This field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (typeof ruleValue !== \"number\") {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field should be a number. The field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        if (Number.isFinite(elemValue == null ? void 0 : elemValue.length) && elemValue.length > ruleValue) {\n          this.setFieldInvalid(key, fieldRule);\n          break;\n        }\n        break;\n      }\n      case Rules.Files: {\n        if (ruleValue === void 0) {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field is not defined. This field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          return;\n        }\n        if (typeof ruleValue !== \"object\") {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field should be an object. This field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          return;\n        }\n        const filesConfig = ruleValue.files;\n        if (typeof filesConfig !== \"object\") {\n          console.error(\n            `Value for ${fieldRule.rule} rule for [${key}] field should be an object with files array. This field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          return;\n        }\n        const isFilePropsInvalid = (file, fileConfig) => {\n          const minSizeInvalid = Number.isFinite(fileConfig.minSize) && file.size < fileConfig.minSize;\n          const maxSizeInvalid = Number.isFinite(fileConfig.maxSize) && file.size > fileConfig.maxSize;\n          const nameInvalid = Array.isArray(fileConfig.names) && !fileConfig.names.includes(file.name);\n          const extInvalid = Array.isArray(fileConfig.extensions) && !fileConfig.extensions.includes(\n            file.name.split(\".\")[file.name.split(\".\").length - 1]\n          );\n          const typeInvalid = Array.isArray(fileConfig.types) && !fileConfig.types.includes(file.type);\n          return minSizeInvalid || maxSizeInvalid || nameInvalid || extInvalid || typeInvalid;\n        };\n        if (typeof elemValue === \"object\" && elemValue !== null) {\n          for (let fileIdx = 0, len = elemValue.length; fileIdx < len; ++fileIdx) {\n            const file = elemValue.item(fileIdx);\n            if (!file) {\n              this.setFieldInvalid(key, fieldRule);\n              break;\n            }\n            const filesInvalid = isFilePropsInvalid(file, filesConfig);\n            if (filesInvalid) {\n              this.setFieldInvalid(key, fieldRule);\n              break;\n            }\n          }\n        }\n        break;\n      }\n      default: {\n        if (typeof fieldRule.validator !== \"function\") {\n          console.error(\n            `Validator for custom rule for [${key}] field should be a function. This field will be always invalid.`\n          );\n          this.setFieldInvalid(key, fieldRule);\n          return;\n        }\n        const result = fieldRule.validator(\n          elemValue,\n          this.getCompatibleFields()\n        );\n        if (typeof result !== \"boolean\" && typeof result !== \"function\") {\n          console.error(\n            `Validator return value for [${key}] field should be boolean or function. It will be cast to boolean.`\n          );\n        }\n        if (typeof result === \"function\") {\n          if (afterInputChanged) {\n            this.fields[key].asyncCheckPending = true;\n          } else {\n            this.fields[key].asyncCheckPending = false;\n            const promise = result();\n            if (!isPromise(promise)) {\n              console.error(\n                `Validator function for custom rule for [${key}] field should return a Promise. This field will be always invalid.`\n              );\n              this.setFieldInvalid(key, fieldRule);\n              return;\n            }\n            return promise.then((resp) => {\n              if (!resp) {\n                this.setFieldInvalid(key, fieldRule);\n              }\n            }).catch(() => {\n              this.setFieldInvalid(key, fieldRule);\n            });\n          }\n        }\n        if (!result) {\n          this.setFieldInvalid(key, fieldRule);\n        }\n      }\n    }\n  }\n  isFormValid() {\n    let isValid = true;\n    for (let i = 0, len = Object.values(this.fields).length; i < len; ++i) {\n      const item = Object.values(this.fields)[i];\n      if (item.isValid === void 0) {\n        isValid = void 0;\n        break;\n      }\n      if (item.isValid === false) {\n        isValid = false;\n        break;\n      }\n    }\n    for (let i = 0, len = Object.values(this.groupFields).length; i < len; ++i) {\n      const item = Object.values(this.groupFields)[i];\n      if (item.isValid === void 0) {\n        isValid = void 0;\n        break;\n      }\n      if (item.isValid === false) {\n        isValid = false;\n        break;\n      }\n    }\n    return isValid;\n  }\n  validateField(key, afterInputChanged = false) {\n    var _a;\n    const field = this.fields[key];\n    field.isValid = true;\n    const promises = [];\n    [...field.rules].reverse().forEach((rule) => {\n      const res = this.validateFieldRule(\n        key,\n        field.elem,\n        rule,\n        afterInputChanged\n      );\n      if (isPromise(res)) {\n        promises.push(res);\n      }\n    });\n    if (field.isValid) {\n      this.setFieldValid(key, (_a = field.config) == null ? void 0 : _a.successMessage);\n    }\n    return Promise.allSettled(promises).finally(() => {\n      var _a2;\n      if (afterInputChanged) {\n        (_a2 = this.onValidateCallback) == null ? void 0 : _a2.call(this, {\n          isValid: this.isFormValid(),\n          isSubmitted: this.isSubmitted,\n          fields: this.getCompatibleFields(),\n          groups: { ...this.groupFields }\n        });\n      }\n    });\n  }\n  revalidateField(fieldSelector) {\n    if (typeof fieldSelector !== \"string\" && !isElement(fieldSelector)) {\n      throw Error(\n        `Field selector is not valid. Please specify a string selector or a valid DOM element.`\n      );\n    }\n    const key = this.getKeyByFieldSelector(fieldSelector);\n    if (!key || !this.fields[key]) {\n      console.error(`Field not found. Check the field selector.`);\n      return Promise.reject();\n    }\n    return new Promise((resolve) => {\n      this.validateField(key, true).finally(() => {\n        this.clearFieldStyle(key);\n        this.clearFieldLabel(key);\n        this.renderFieldError(key, true);\n        resolve(!!this.fields[key].isValid);\n      });\n    });\n  }\n  revalidateGroup(groupSelector) {\n    if (typeof groupSelector !== \"string\" && !isElement(groupSelector)) {\n      throw Error(\n        `Group selector is not valid. Please specify a string selector or a valid DOM element.`\n      );\n    }\n    const key = this.getKeyByFieldSelector(groupSelector);\n    if (!key || !this.groupFields[key]) {\n      console.error(`Group not found. Check the group selector.`);\n      return Promise.reject();\n    }\n    return new Promise((resolve) => {\n      this.validateGroup(key).finally(() => {\n        this.clearFieldLabel(key);\n        this.renderGroupError(key, true);\n        resolve(!!this.groupFields[key].isValid);\n      });\n    });\n  }\n  validateGroup(key, afterInputChanged = false) {\n    const group = this.groupFields[key];\n    const promises = [];\n    [...group.rules].reverse().forEach((rule) => {\n      const res = this.validateGroupRule(key, group.elems, rule);\n      if (isPromise(res)) {\n        promises.push(res);\n      }\n    });\n    return Promise.allSettled(promises).finally(() => {\n      var _a;\n      if (afterInputChanged) {\n        (_a = this.onValidateCallback) == null ? void 0 : _a.call(this, {\n          isValid: this.isFormValid(),\n          isSubmitted: this.isSubmitted,\n          fields: this.getCompatibleFields(),\n          groups: { ...this.groupFields }\n        });\n      }\n    });\n  }\n  focusInvalidField() {\n    for (const key in this.fields) {\n      const field = this.fields[key];\n      if (!field.isValid) {\n        setTimeout(() => field.elem.focus(), 0);\n        break;\n      }\n    }\n  }\n  afterSubmitValidation(forceRevalidation = false) {\n    this.renderErrors(forceRevalidation);\n    if (this.globalConfig.focusInvalidField) {\n      this.focusInvalidField();\n    }\n  }\n  validate(forceRevalidation = false) {\n    return new Promise((resolve) => {\n      const promises = [];\n      Object.keys(this.fields).forEach((key) => {\n        const promise = this.validateField(key);\n        if (isPromise(promise)) {\n          promises.push(promise);\n        }\n      });\n      Object.keys(this.groupFields).forEach((key) => {\n        const promise = this.validateGroup(key);\n        if (isPromise(promise)) {\n          promises.push(promise);\n        }\n      });\n      Promise.allSettled(promises).then(() => {\n        var _a;\n        this.afterSubmitValidation(forceRevalidation);\n        (_a = this.onValidateCallback) == null ? void 0 : _a.call(this, {\n          isValid: this.isFormValid(),\n          isSubmitted: this.isSubmitted,\n          fields: this.getCompatibleFields(),\n          groups: { ...this.groupFields }\n        });\n        resolve(!!promises.length);\n      });\n    });\n  }\n  revalidate() {\n    return new Promise((resolve) => {\n      this.validateHandler(void 0, true).finally(() => {\n        if (this.globalConfig.focusInvalidField) {\n          this.focusInvalidField();\n        }\n        resolve(this.isValid);\n      });\n    });\n  }\n  validateHandler(ev, forceRevalidation = false) {\n    if (this.globalConfig.lockForm) {\n      this.lockForm();\n    }\n    return this.validate(forceRevalidation).finally(() => {\n      var _a, _b, _c;\n      if (this.globalConfig.lockForm) {\n        this.unlockForm();\n      }\n      if (this.isValid) {\n        (_a = this.onSuccessCallback) == null ? void 0 : _a.call(this, ev);\n        if (this.globalConfig.submitFormAutomatically) {\n          (_b = ev == null ? void 0 : ev.currentTarget) == null ? void 0 : _b.submit();\n        }\n      } else {\n        (_c = this.onFailCallback) == null ? void 0 : _c.call(this, this.getCompatibleFields(), this.groupFields);\n      }\n    });\n  }\n  setForm(form) {\n    this.form = form;\n    this.form.setAttribute(\"novalidate\", \"novalidate\");\n    this.removeListener(\"submit\", this.form, this.formSubmitHandler);\n    this.addListener(\"submit\", this.form, this.formSubmitHandler);\n  }\n  addListener(type, elem, handler) {\n    elem.addEventListener(type, handler);\n    this.eventListeners.push({ type, elem, func: handler });\n  }\n  removeListener(type, elem, handler) {\n    elem.removeEventListener(type, handler);\n    this.eventListeners = this.eventListeners.filter(\n      (item) => item.type !== type || item.elem !== elem\n    );\n  }\n  addField(fieldSelector, rules, config) {\n    if (typeof fieldSelector !== \"string\" && !isElement(fieldSelector)) {\n      throw Error(\n        `Field selector is not valid. Please specify a string selector or a valid DOM element.`\n      );\n    }\n    let elem;\n    if (typeof fieldSelector === \"string\") {\n      elem = this.form.querySelector(fieldSelector);\n    } else {\n      elem = fieldSelector;\n    }\n    if (!elem) {\n      throw Error(\n        `Field doesn't exist in the DOM! Please check the field selector.`\n      );\n    }\n    if (!Array.isArray(rules) || !rules.length) {\n      throw Error(\n        `Rules argument should be an array and should contain at least 1 element.`\n      );\n    }\n    rules.forEach((item) => {\n      if (!(\"rule\" in item || \"validator\" in item || \"plugin\" in item)) {\n        throw Error(\n          `Rules argument must contain at least one rule or validator property.`\n        );\n      }\n      if (!item.validator && !item.plugin && (!item.rule || !Object.values(Rules).includes(item.rule))) {\n        throw Error(\n          `Rule should be one of these types: ${Object.values(Rules).join(\n            \", \"\n          )}. Provided value: ${item.rule}`\n        );\n      }\n    });\n    const key = this.setKeyByFieldSelector(fieldSelector);\n    this.fields[key] = {\n      elem,\n      rules,\n      isValid: void 0,\n      touched: false,\n      config\n    };\n    this.setListeners(elem);\n    if (this.isSubmitted || this.globalConfig.validateBeforeSubmitting) {\n      this.validateField(key);\n    }\n    return this;\n  }\n  removeField(fieldSelector) {\n    if (typeof fieldSelector !== \"string\" && !isElement(fieldSelector)) {\n      throw Error(\n        `Field selector is not valid. Please specify a string selector or a valid DOM element.`\n      );\n    }\n    const key = this.getKeyByFieldSelector(fieldSelector);\n    if (!key || !this.fields[key]) {\n      console.error(`Field not found. Check the field selector.`);\n      return this;\n    }\n    const type = this.getListenerType(this.fields[key].elem.type);\n    this.removeListener(type, this.fields[key].elem, this.handlerChange);\n    this.clearErrors();\n    delete this.fields[key];\n    return this;\n  }\n  removeGroup(group) {\n    if (typeof group !== \"string\") {\n      throw Error(\n        `Group selector is not valid. Please specify a string selector.`\n      );\n    }\n    const key = this.getKeyByFieldSelector(group);\n    if (!key || !this.groupFields[key]) {\n      console.error(`Group not found. Check the group selector.`);\n      return this;\n    }\n    this.groupFields[key].elems.forEach((elem) => {\n      const type = this.getListenerType(elem.type);\n      this.removeListener(type, elem, this.handlerChange);\n    });\n    this.clearErrors();\n    delete this.groupFields[key];\n    return this;\n  }\n  addRequiredGroup(groupField, errorMessage, config, successMessage) {\n    if (typeof groupField !== \"string\" && !isElement(groupField)) {\n      throw Error(\n        `Group selector is not valid. Please specify a string selector or a valid DOM element.`\n      );\n    }\n    let elem;\n    if (typeof groupField === \"string\") {\n      elem = this.form.querySelector(groupField);\n    } else {\n      elem = groupField;\n    }\n    if (!elem) {\n      throw Error(`Group selector not found! Please check the group selector.`);\n    }\n    const inputs = elem.querySelectorAll(\"input\");\n    const childrenInputs = Array.from(inputs).filter((input) => {\n      const parent = getClosestParent(this.groupFields, getNodeParents(input));\n      if (!parent) {\n        return true;\n      }\n      return parent[1].elems.find((elem2) => elem2 !== input);\n    });\n    const key = this.setKeyByFieldSelector(groupField);\n    this.groupFields[key] = {\n      rules: [\n        {\n          rule: GroupRules.Required,\n          errorMessage,\n          successMessage\n        }\n      ],\n      groupElem: elem,\n      elems: childrenInputs,\n      touched: false,\n      isValid: void 0,\n      config\n    };\n    inputs.forEach((input) => {\n      this.setListeners(input);\n    });\n    return this;\n  }\n  getListenerType(type) {\n    switch (type) {\n      case \"checkbox\":\n      case \"select-one\":\n      case \"file\":\n      case \"radio\": {\n        return \"change\";\n      }\n      default: {\n        return \"input\";\n      }\n    }\n  }\n  setListeners(elem) {\n    const type = this.getListenerType(elem.type);\n    this.removeListener(type, elem, this.handlerChange);\n    this.addListener(type, elem, this.handlerChange);\n  }\n  clearFieldLabel(key) {\n    var _a, _b;\n    (_a = this.errorLabels[key]) == null ? void 0 : _a.remove();\n    (_b = this.successLabels[key]) == null ? void 0 : _b.remove();\n  }\n  clearFieldStyle(key) {\n    var _a, _b, _c, _d;\n    const field = this.fields[key];\n    const errorStyle = ((_a = field.config) == null ? void 0 : _a.errorFieldStyle) || this.globalConfig.errorFieldStyle;\n    Object.keys(errorStyle).forEach((key2) => {\n      field.elem.style[key2] = \"\";\n    });\n    const successStyle = ((_b = field.config) == null ? void 0 : _b.successFieldStyle) || this.globalConfig.successFieldStyle || {};\n    Object.keys(successStyle).forEach((key2) => {\n      field.elem.style[key2] = \"\";\n    });\n    field.elem.classList.remove(\n      ...getClassList(\n        ((_c = field.config) == null ? void 0 : _c.errorFieldCssClass) || this.globalConfig.errorFieldCssClass\n      ),\n      ...getClassList(\n        ((_d = field.config) == null ? void 0 : _d.successFieldCssClass) || this.globalConfig.successFieldCssClass\n      )\n    );\n  }\n  clearErrors() {\n    var _a, _b;\n    Object.keys(this.errorLabels).forEach(\n      (key) => this.errorLabels[key].remove()\n    );\n    Object.keys(this.successLabels).forEach(\n      (key) => this.successLabels[key].remove()\n    );\n    for (const key in this.fields) {\n      this.clearFieldStyle(key);\n    }\n    for (const key in this.groupFields) {\n      const group = this.groupFields[key];\n      const errorStyle = ((_a = group.config) == null ? void 0 : _a.errorFieldStyle) || this.globalConfig.errorFieldStyle;\n      Object.keys(errorStyle).forEach((key2) => {\n        group.elems.forEach((elem) => {\n          var _a2;\n          elem.style[key2] = \"\";\n          elem.classList.remove(\n            ...getClassList(\n              ((_a2 = group.config) == null ? void 0 : _a2.errorFieldCssClass) || this.globalConfig.errorFieldCssClass\n            )\n          );\n        });\n      });\n      const successStyle = ((_b = group.config) == null ? void 0 : _b.successFieldStyle) || this.globalConfig.successFieldStyle || {};\n      Object.keys(successStyle).forEach((key2) => {\n        group.elems.forEach((elem) => {\n          var _a2;\n          elem.style[key2] = \"\";\n          elem.classList.remove(\n            ...getClassList(\n              ((_a2 = group.config) == null ? void 0 : _a2.successFieldCssClass) || this.globalConfig.successFieldCssClass\n            )\n          );\n        });\n      });\n    }\n    this.tooltips = [];\n  }\n  isTooltip() {\n    return !!this.globalConfig.tooltip;\n  }\n  lockForm() {\n    const elems = this.form.querySelectorAll(\n      \"input, textarea, button, select\"\n    );\n    for (let i = 0, len = elems.length; i < len; ++i) {\n      elems[i].setAttribute(\n        \"data-just-validate-fallback-disabled\",\n        elems[i].disabled ? \"true\" : \"false\"\n      );\n      elems[i].setAttribute(\"disabled\", \"disabled\");\n      elems[i].style.pointerEvents = \"none\";\n      elems[i].style.webkitFilter = \"grayscale(100%)\";\n      elems[i].style.filter = \"grayscale(100%)\";\n    }\n  }\n  unlockForm() {\n    const elems = this.form.querySelectorAll(\n      \"input, textarea, button, select\"\n    );\n    for (let i = 0, len = elems.length; i < len; ++i) {\n      if (elems[i].getAttribute(\"data-just-validate-fallback-disabled\") !== \"true\") {\n        elems[i].removeAttribute(\"disabled\");\n      }\n      elems[i].style.pointerEvents = \"\";\n      elems[i].style.webkitFilter = \"\";\n      elems[i].style.filter = \"\";\n    }\n  }\n  renderTooltip(elem, errorLabel, position) {\n    var _a;\n    const { top, left, width, height } = elem.getBoundingClientRect();\n    const errorLabelRect = errorLabel.getBoundingClientRect();\n    const pos = position || ((_a = this.globalConfig.tooltip) == null ? void 0 : _a.position);\n    switch (pos) {\n      case \"left\": {\n        errorLabel.style.top = `${top + height / 2 - errorLabelRect.height / 2}px`;\n        errorLabel.style.left = `${left - errorLabelRect.width - TOOLTIP_ARROW_HEIGHT}px`;\n        break;\n      }\n      case \"top\": {\n        errorLabel.style.top = `${top - errorLabelRect.height - TOOLTIP_ARROW_HEIGHT}px`;\n        errorLabel.style.left = `${left + width / 2 - errorLabelRect.width / 2}px`;\n        break;\n      }\n      case \"right\": {\n        errorLabel.style.top = `${top + height / 2 - errorLabelRect.height / 2}px`;\n        errorLabel.style.left = `${left + width + TOOLTIP_ARROW_HEIGHT}px`;\n        break;\n      }\n      case \"bottom\": {\n        errorLabel.style.top = `${top + height + TOOLTIP_ARROW_HEIGHT}px`;\n        errorLabel.style.left = `${left + width / 2 - errorLabelRect.width / 2}px`;\n        break;\n      }\n    }\n    errorLabel.dataset.direction = pos;\n    const refresh = () => {\n      this.renderTooltip(elem, errorLabel, position);\n    };\n    return {\n      refresh\n    };\n  }\n  createErrorLabelElem(key, errorMessage, config) {\n    const errorLabel = document.createElement(\"div\");\n    errorLabel.innerHTML = errorMessage;\n    const customErrorLabelStyle = this.isTooltip() ? config == null ? void 0 : config.errorLabelStyle : (config == null ? void 0 : config.errorLabelStyle) || this.globalConfig.errorLabelStyle;\n    Object.assign(errorLabel.style, customErrorLabelStyle);\n    errorLabel.classList.add(\n      ...getClassList(\n        (config == null ? void 0 : config.errorLabelCssClass) || this.globalConfig.errorLabelCssClass\n      ),\n      \"just-validate-error-label\"\n    );\n    if (this.isTooltip()) {\n      errorLabel.dataset.tooltip = \"true\";\n    }\n    if (this.globalConfig.testingMode) {\n      errorLabel.dataset.testId = `error-label-${key}`;\n    }\n    this.errorLabels[key] = errorLabel;\n    return errorLabel;\n  }\n  createSuccessLabelElem(key, successMessage, config) {\n    if (successMessage === void 0) {\n      return null;\n    }\n    const successLabel = document.createElement(\"div\");\n    successLabel.innerHTML = successMessage;\n    const customSuccessLabelStyle = (config == null ? void 0 : config.successLabelStyle) || this.globalConfig.successLabelStyle;\n    Object.assign(successLabel.style, customSuccessLabelStyle);\n    successLabel.classList.add(\n      ...getClassList(\n        (config == null ? void 0 : config.successLabelCssClass) || this.globalConfig.successLabelCssClass\n      ),\n      \"just-validate-success-label\"\n    );\n    if (this.globalConfig.testingMode) {\n      successLabel.dataset.testId = `success-label-${key}`;\n    }\n    this.successLabels[key] = successLabel;\n    return successLabel;\n  }\n  renderErrorsContainer(label, errorsContainer) {\n    const container = errorsContainer || this.globalConfig.errorsContainer;\n    if (typeof container === \"string\") {\n      const elem = this.form.querySelector(container);\n      if (elem) {\n        elem.appendChild(label);\n        return true;\n      } else {\n        console.error(\n          `Error container with ${container} selector not found. Errors will be rendered as usual`\n        );\n      }\n    }\n    if (container instanceof Element) {\n      container.appendChild(label);\n      return true;\n    }\n    if (container !== void 0) {\n      console.error(\n        `Error container not found. It should be a string or existing Element. Errors will be rendered as usual`\n      );\n    }\n    return false;\n  }\n  renderGroupLabel(elem, label, errorsContainer, isSuccess) {\n    if (!isSuccess) {\n      const renderedInErrorsContainer = this.renderErrorsContainer(\n        label,\n        errorsContainer\n      );\n      if (renderedInErrorsContainer) {\n        return;\n      }\n    }\n    elem.appendChild(label);\n  }\n  renderFieldLabel(elem, label, errorsContainer, isSuccess) {\n    var _a, _b, _c, _d, _e, _f, _g;\n    if (!isSuccess) {\n      const renderedInErrorsContainer = this.renderErrorsContainer(\n        label,\n        errorsContainer\n      );\n      if (renderedInErrorsContainer) {\n        return;\n      }\n    }\n    if (elem.type === \"checkbox\" || elem.type === \"radio\") {\n      const labelElem = document.querySelector(\n        `label[for=\"${elem.getAttribute(\"id\")}\"]`\n      );\n      if (((_b = (_a = elem.parentElement) == null ? void 0 : _a.tagName) == null ? void 0 : _b.toLowerCase()) === \"label\") {\n        (_d = (_c = elem.parentElement) == null ? void 0 : _c.parentElement) == null ? void 0 : _d.appendChild(label);\n      } else if (labelElem) {\n        (_e = labelElem.parentElement) == null ? void 0 : _e.appendChild(label);\n      } else {\n        (_f = elem.parentElement) == null ? void 0 : _f.appendChild(label);\n      }\n    } else {\n      (_g = elem.parentElement) == null ? void 0 : _g.appendChild(label);\n    }\n  }\n  showLabels(fields, isError) {\n    Object.keys(fields).forEach((fieldName, i) => {\n      const error = fields[fieldName];\n      const key = this.getKeyByFieldSelector(fieldName);\n      if (!key || !this.fields[key]) {\n        console.error(`Field not found. Check the field selector.`);\n        return;\n      }\n      const field = this.fields[key];\n      field.isValid = !isError;\n      this.clearFieldStyle(key);\n      this.clearFieldLabel(key);\n      this.renderFieldError(key, false, error);\n      if (i === 0 && this.globalConfig.focusInvalidField) {\n        setTimeout(() => field.elem.focus(), 0);\n      }\n    });\n  }\n  showErrors(fields) {\n    if (typeof fields !== \"object\") {\n      throw Error(\n        \"[showErrors]: Errors should be an object with key: value format\"\n      );\n    }\n    this.showLabels(fields, true);\n  }\n  showSuccessLabels(fields) {\n    if (typeof fields !== \"object\") {\n      throw Error(\n        \"[showSuccessLabels]: Labels should be an object with key: value format\"\n      );\n    }\n    this.showLabels(fields, false);\n  }\n  renderFieldError(key, forced = false, message) {\n    var _a, _b, _c, _d, _e, _f;\n    const field = this.fields[key];\n    if (field.isValid === false) {\n      this.isValid = false;\n    }\n    if (field.isValid === void 0 || !forced && !this.isSubmitted && !field.touched && message === void 0) {\n      return;\n    }\n    if (field.isValid) {\n      if (!field.asyncCheckPending) {\n        const successLabel = this.createSuccessLabelElem(\n          key,\n          message !== void 0 ? message : field.successMessage,\n          field.config\n        );\n        if (successLabel) {\n          this.renderFieldLabel(\n            field.elem,\n            successLabel,\n            (_a = field.config) == null ? void 0 : _a.errorsContainer,\n            true\n          );\n        }\n        field.elem.classList.add(\n          ...getClassList(\n            ((_b = field.config) == null ? void 0 : _b.successFieldCssClass) || this.globalConfig.successFieldCssClass\n          )\n        );\n      }\n      return;\n    }\n    field.elem.classList.add(\n      ...getClassList(\n        ((_c = field.config) == null ? void 0 : _c.errorFieldCssClass) || this.globalConfig.errorFieldCssClass\n      )\n    );\n    const errorLabel = this.createErrorLabelElem(\n      key,\n      message !== void 0 ? message : field.errorMessage,\n      field.config\n    );\n    this.renderFieldLabel(\n      field.elem,\n      errorLabel,\n      (_d = field.config) == null ? void 0 : _d.errorsContainer\n    );\n    if (this.isTooltip()) {\n      this.tooltips.push(\n        this.renderTooltip(\n          field.elem,\n          errorLabel,\n          (_f = (_e = field.config) == null ? void 0 : _e.tooltip) == null ? void 0 : _f.position\n        )\n      );\n    }\n  }\n  renderGroupError(key, force = true) {\n    var _a, _b, _c, _d;\n    const group = this.groupFields[key];\n    if (group.isValid === false) {\n      this.isValid = false;\n    }\n    if (group.isValid === void 0 || !force && !this.isSubmitted && !group.touched) {\n      return;\n    }\n    if (group.isValid) {\n      group.elems.forEach((elem) => {\n        var _a2, _b2;\n        Object.assign(\n          elem.style,\n          ((_a2 = group.config) == null ? void 0 : _a2.successFieldStyle) || this.globalConfig.successFieldStyle\n        );\n        elem.classList.add(\n          ...getClassList(\n            ((_b2 = group.config) == null ? void 0 : _b2.successFieldCssClass) || this.globalConfig.successFieldCssClass\n          )\n        );\n      });\n      const successLabel = this.createSuccessLabelElem(\n        key,\n        group.successMessage,\n        group.config\n      );\n      if (successLabel) {\n        this.renderGroupLabel(\n          group.groupElem,\n          successLabel,\n          (_a = group.config) == null ? void 0 : _a.errorsContainer,\n          true\n        );\n      }\n      return;\n    }\n    this.isValid = false;\n    group.elems.forEach((elem) => {\n      var _a2, _b2;\n      Object.assign(\n        elem.style,\n        ((_a2 = group.config) == null ? void 0 : _a2.errorFieldStyle) || this.globalConfig.errorFieldStyle\n      );\n      elem.classList.add(\n        ...getClassList(\n          ((_b2 = group.config) == null ? void 0 : _b2.errorFieldCssClass) || this.globalConfig.errorFieldCssClass\n        )\n      );\n    });\n    const errorLabel = this.createErrorLabelElem(\n      key,\n      group.errorMessage,\n      group.config\n    );\n    this.renderGroupLabel(\n      group.groupElem,\n      errorLabel,\n      (_b = group.config) == null ? void 0 : _b.errorsContainer\n    );\n    if (this.isTooltip()) {\n      this.tooltips.push(\n        this.renderTooltip(\n          group.groupElem,\n          errorLabel,\n          (_d = (_c = group.config) == null ? void 0 : _c.tooltip) == null ? void 0 : _d.position\n        )\n      );\n    }\n  }\n  renderErrors(forceRevalidation = false) {\n    if (!this.isSubmitted && !forceRevalidation && !this.globalConfig.validateBeforeSubmitting) {\n      return;\n    }\n    this.clearErrors();\n    this.isValid = true;\n    for (const key in this.groupFields) {\n      this.renderGroupError(key);\n    }\n    for (const key in this.fields) {\n      this.renderFieldError(key);\n    }\n  }\n  destroy() {\n    this.eventListeners.forEach((event) => {\n      this.removeListener(event.type, event.elem, event.func);\n    });\n    Object.keys(this.customStyleTags).forEach((key) => {\n      this.customStyleTags[key].remove();\n    });\n    this.clearErrors();\n    if (this.globalConfig.lockForm) {\n      this.unlockForm();\n    }\n  }\n  refresh() {\n    this.destroy();\n    if (!this.form) {\n      console.error(\"Cannot initialize the library! Form is not defined\");\n    } else {\n      this.initialize(this.form, this.globalConfig);\n      Object.keys(this.fields).forEach((key) => {\n        const fieldSelector = this.getFieldSelectorByKey(key);\n        if (fieldSelector) {\n          this.addField(\n            fieldSelector,\n            [...this.fields[key].rules],\n            this.fields[key].config\n          );\n        }\n      });\n    }\n  }\n  setCurrentLocale(locale) {\n    if (typeof locale !== \"string\" && locale !== void 0) {\n      console.error(\"Current locale should be a string\");\n      return;\n    }\n    this.currentLocale = locale;\n    if (this.isSubmitted) {\n      this.validate();\n    }\n  }\n  onSuccess(callback) {\n    this.onSuccessCallback = callback;\n    return this;\n  }\n  onFail(callback) {\n    this.onFailCallback = callback;\n    return this;\n  }\n  onValidate(callback) {\n    this.onValidateCallback = callback;\n    return this;\n  }\n}\nexport {\n  CustomStyleTagIds,\n  GroupRules,\n  Rules,\n  JustValidate as default\n};\n","import type { CustomElement } from '@integrabeauty/custom-elements';\nimport JustValidate, { Rules } from 'just-validate';\nimport { dispatch } from '../../common/event-dispatch';\nimport { readAJSUserTraits } from '../../common/segment-utils';\nimport * as BackInStockService from '../../common/services/back-in-stock-service';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * Renders notify me modal content. It should be wrapped in ofir-modal component to be a modal\n * window.\n */\nclass NotifyMeModal extends HTMLElement implements CustomElement {\n  public static get observedAttributes() {\n    return ['data-update'];\n  }\n\n  readonly dataset!: {\n    /**\n     * The ID of the product.\n     */\n    productId: string;\n\n    /**\n     * Setting this attribute triggers rendering.\n     */\n    update: string;\n\n    /**\n     * The ID of product's variant.\n     */\n    variantId: string;\n  };\n\n  private validation: JustValidate;\n\n  private onContinueButtonClickedBound = this.onContinueButtonClicked.bind(this);\n  private onValidationSucceedBound = this.onValidationSucceed.bind(this);\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${ styles }</style>${ html }`;\n  }\n\n  public connectedCallback() {\n    const emailInput = this.shadowRoot.querySelector<HTMLInputElement>('#email');\n\n    const userEmail = getUserEmail();\n    if (userEmail) {\n      emailInput.value = userEmail;\n    }\n\n    this.initForm();\n\n    const continueButtons = this.shadowRoot.querySelectorAll<HTMLButtonElement>('.continue-button');\n    for (const continueButton of continueButtons) {\n      continueButton.addEventListener('click', this.onContinueButtonClickedBound);\n    }\n  }\n\n  public disconnectedCallback() {\n    this.validation.destroy();\n\n    const continueButtons = this.shadowRoot.querySelectorAll<HTMLButtonElement>('.continue-button');\n    for (const continueButton of continueButtons) {\n      continueButton.removeEventListener('click', this.onContinueButtonClickedBound);\n    }\n  }\n\n  public attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n    if (!this.isConnected || oldValue === newValue) {\n      return;\n    }\n\n    if (name === 'data-update') {\n      this.resetForm();\n    }\n  }\n\n  /**\n   * Inits the form validation. This method should be called only once when the component is\n   * created. Do not call it each time when we need to refresh the form, use resetForm() in this\n   * case.\n   */\n  private initForm() {\n    const form = this.shadowRoot.querySelector<HTMLFormElement>('form');\n\n    this.validation = new JustValidate(form, {\n      errorsContainer: this.shadowRoot.querySelector('.input-error'),\n      errorLabelStyle: {},\n      errorFieldCssClass: 'error',\n      successFieldCssClass: 'success',\n      lockForm: true\n    });\n\n    this.validation.addField('#email', [\n      {\n        rule: Rules.Required,\n        errorMessage: 'Email Address is required'\n      },\n      {\n        rule: Rules.Email,\n        errorMessage: 'Email Address is invalid'\n      }\n    ]);\n\n    this.validation.onSuccess(this.onValidationSucceedBound);\n  }\n\n  private resetForm() {\n    const errorSection = this.shadowRoot.querySelector<HTMLElement>('.error-section');\n    errorSection.hidden = true;\n\n    const successSection = this.shadowRoot.querySelector<HTMLElement>('.success-section');\n    successSection.hidden = true;\n\n    const form = this.shadowRoot.querySelector<HTMLFormElement>('form');\n    form.hidden = false;\n\n    this.validation.refresh();\n  }\n\n  private onContinueButtonClicked(_event: Event) {\n    this.resetForm();\n    closeModal();\n  }\n\n  private onValidationSucceed(event: Event) {\n    event.preventDefault();\n\n    this.sendForm().catch(console.error);\n  }\n\n  private async sendForm() {\n    const input = this.shadowRoot.querySelector<HTMLInputElement>('#email');\n    const email = input.value;\n\n    const productId = parseInt(this.dataset.productId, 10);\n    const variantId = parseInt(this.dataset.variantId, 10);\n\n    const subscriptionStatus = await handleEmailSubscribe(email, productId, variantId);\n\n    // subscribed\n    if (subscriptionStatus === 'OK') {\n      const userEmailElement = this.shadowRoot.querySelector<HTMLElement>('.user-email');\n      userEmailElement.innerText = email;\n\n      const successSection = this.shadowRoot.querySelector<HTMLElement>('.success-section');\n      successSection.hidden = false;\n\n      // errors\n    } else {\n      const errorSection = this.shadowRoot.querySelector<HTMLElement>('.error-section');\n      errorSection.hidden = false;\n\n      const errorMessage = this.shadowRoot.querySelector('.error-message');\n      errorMessage.textContent = subscriptionStatus;\n    }\n\n    const form = this.shadowRoot.querySelector('form');\n    form.hidden = true;\n  }\n}\n\nfunction getUserEmail() {\n  const userTraits = readAJSUserTraits();\n  if (!userTraits?.email) {\n    return;\n  }\n\n  const email: string = userTraits.email;\n  return email;\n}\n\nasync function handleEmailSubscribe(email: string, productId: number, variantId: number) {\n  return BackInStockService.subscribeEmail(email, productId, variantId).catch(error => {\n    // We do not trigger a rejection here. See https://stackoverflow.com/questions/42013104. We\n    // are going to \"handle\" the error that just happened and change the promise chain step to\n    // resolve instead of reject so that the subsequent .then is always reached.\n    //\n    // Emulate the error response from the BackInStock call so that we treat things like HTTP\n    // errors the same as a successful server response that contains an error.\n    console.warn(error?.message);\n\n    const syntheticResponseBody = <BackInStock.ResponseBody>{\n      status: 'Error',\n      errors: {\n        base: ['Uh oh! Something went wrong, please try again.']\n      }\n    };\n\n    return syntheticResponseBody;\n  }).then(response => {\n    // eslint-disable-next-line @typescript-eslint/no-deprecated\n    dispatch('oos-form-submitted', {\n      email: email,\n      product_id: productId,\n      product_url: window.location.pathname,\n      success: response?.status === 'OK',\n      variant_id: variantId\n    });\n\n    if (response.status === 'Error') {\n      const errorMessage = BackInStockService.findErrorMessage(response);\n      if (errorMessage) {\n        return errorMessage;\n      } else {\n        window.Sentry?.captureException(new Error('Unexpected response from BIS'), {\n          extra: {\n            response\n          },\n          level: 'warning'\n        });\n      }\n\n      return 'An unknown problem occurred. Please try again in a few moments';\n    }\n\n    return response.status;\n  }).catch(error => {\n    // We really screwed up, our own code has a bug in it somehow.\n    console.error(error);\n    window.Sentry?.captureException(error);\n\n    return 'An unknown problem occurred. Please try again in a few moments';\n  });\n}\n\nfunction closeModal() {\n  const modal = document.querySelector<HTMLElementTagNameMap['ofir-modal']>('.notify-me-modal');\n  modal.dataset.open = 'false';\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'notify-me-modal': NotifyMeModal;\n  }\n}\n\nif (!customElements.get('notify-me-modal')) {\n  customElements.define('notify-me-modal', NotifyMeModal);\n}\n","export default \":host{display:block;padding-left:32px;padding-right:32px}h2{font-size:2rem;font-weight:600;margin-bottom:8px;margin-top:0;text-align:center}label{font-weight:500;margin-bottom:8px}input,label{display:block;font-size:.875rem}input{appearance:none;background-color:#fff;border:1px solid #838383;border-radius:4px;box-sizing:border-box;line-height:1.5rem;padding:.5rem .75rem;width:100%}input.error,input.error:focus{border-color:#d50407;outline-color:#d50407}.input-error{color:#d50407;font-size:.875rem;margin-top:4px}.input-error:empty{display:none}button{align-items:center;background-color:#000;border:1px solid #000;border-radius:0;color:#fff;cursor:pointer;display:block;font-family:Poppins,sans-serif;font-size:1rem;font-weight:600;height:48px;justify-content:center;letter-spacing:.16em;line-height:1;padding:10px 16px;text-align:center;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);white-space:nowrap;width:100%}button:active,button:hover{background-color:#333;border-color:#333}button:focus{outline:2px solid #000;outline-offset:1px}button:hover{background-color:#1e1e1e}.continue-button{margin-left:auto;margin-right:auto;width:auto}.message,.notify-me-button{margin-top:32px}.message{font-size:.75rem;margin-bottom:0}.error-message{color:#d50407;margin-bottom:8px;margin-top:0;text-align:center}.success-section p{margin-bottom:24px;margin-top:0;text-align:center}\";","// Module\nvar code = \"<form><h2>Keep me Updated.</h2><label for=\\\"email\\\">Email</label><input id=\\\"email\\\" type=\\\"email\\\" name=\\\"email-notifications\\\" placeholder=\\\"Email\\\" autocomplete=\\\"email\\\" pattern=\\\"[\\\\w!#\\\\$%&'\\\\*\\\\+\\\\/\\\\=\\\\?\\\\^`\\\\{\\\\|\\\\}~\\\\-]+(:?\\\\.[\\\\w!#\\\\$%&'\\\\*\\\\+\\\\/\\\\=\\\\?\\\\^`\\\\{\\\\|\\\\}~\\\\-]+)*@(?:[a-z0-9](?:[a-z0-9\\\\-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9\\\\-]*[a-z0-9])?\\\" spellcheck=\\\"false\\\" autocapitalize=\\\"off\\\" autocorrect=\\\"off\\\"><div class=\\\"input-error\\\"></div><button type=\\\"submit\\\" class=\\\"notify-me-button\\\">Notify Me</button><p class=\\\"message\\\">We’ll only use your email to notify you when this product is restocked.</p></form><div class=\\\"success-section\\\" hidden><h2>You’re all set.</h2><p>If your product comes back in stock, we’ll notify you at&#32;<span class=\\\"user-email\\\"></span></p><button class=\\\"continue-button\\\">Continue Shopping</button></div><div class=\\\"error-section\\\" hidden><h2>Keep me Updated.</h2><p class=\\\"error-message\\\"></p><button class=\\\"continue-button\\\">Continue Shopping</button></div>\";\n// Exports\nexport default code;","export function readAJSUserTraits() {\n  let ajsUserTraits;\n  try {\n    ajsUserTraits = localStorage?.getItem('ajs_user_traits');\n  } catch (error) {\n    window.console.warn(error);\n    // suppress\n  }\n\n  if (!ajsUserTraits) {\n    return;\n  }\n\n  let traits: Record<string, any>;\n  try {\n    traits = JSON.parse(ajsUserTraits);\n  } catch (error) {\n    window.console.warn(error);\n    // suppress\n  }\n\n  return traits;\n}\n\nexport function readAJSShopifyUserId() {\n  let ajsUserId: string;\n  try {\n    ajsUserId = localStorage?.getItem('ajs_user_id');\n  } catch (error) {\n    console.warn(error);\n    // suppress\n  }\n\n  if (!ajsUserId) {\n    return;\n  }\n\n  // The local storage value contains double quotes. We are using JSON.parse to parse the string\n  // and remove the quotes.\n\n  let customerId: number;\n  try {\n    customerId = parseInt(<string>JSON.parse(ajsUserId), 10);\n  } catch (error) {\n    console.warn(error);\n    // suppress\n  }\n\n  if (Number.isInteger(customerId)) {\n    return customerId;\n  }\n}\n","/**\n * Signs up a user to receive an email notification when a product is available for sale again\n * because its available inventory increased. Returns a promise that resolves when the subscription\n * completes.\n *\n * @returns the response from subscribing\n */\nexport async function subscribeEmail(email: string, productId: number, variantId: number) {\n  // The create function does not actually return a true instance of a JavaScript promise. It\n  // returns something that is similar to a promise, but not compliant. There is no catch method of\n  // the thing that create returns. However, since it has a then method, we can await it. We have to\n  // still wrap the return value within another promise by qualifying subscribeEmail as async. This\n  // way callers can interact with the output as expected, such as by using .catch.\n  return window.BIS.create(email, variantId, productId);\n}\n\n/**\n * Signs up a user to receive an sms notification when a product is available for sale again\n * because its available inventory increased. Returns a promise that resolves when the subscription\n * completes.\n *\n * @returns the response from subscribing\n */\nexport async function subscribeSMS(phoneNumber: string, productId: number, variantId: number) {\n  // The create function does not actually return a true instance of a JavaScript promise. It\n  // returns something that is similar to a promise, but not compliant. There is no catch method of\n  // the thing that create returns. However, since it has a then method, we can await it. We have to\n  // still wrap the return value within another promise by qualifying subscribeEmail as async. This\n  // way callers can interact with the output as expected, such as by using .catch.\n  return window.BIS.create(null, variantId, productId, {\n    phone_number: phoneNumber\n  });\n}\n\n/**\n * Searches the response body from BackInStock for the presence of an error message and returns the\n * first error message found.\n */\nexport function findErrorMessage(body: Partial<BackInStock.ResponseBody>) {\n  // The BIS docs say one thing but the real service does something different. It sometimes returns\n  // an undocumented \"email\" property that is an array of strings representing errors, and does not\n  // return an base property. See https://sentry.io/organizations/integrabeauty/issues/3479928414\n\n  if (Array.isArray(body.errors?.base) && body.errors.base.length > 0 &&\n    typeof body.errors.base[0] === 'string' && body.errors.base[0].length > 0) {\n    return body.errors.base[0];\n  } else if (Array.isArray(body.errors?.email) && body.errors.email.length > 0 &&\n    typeof body.errors.email[0] === 'string' && body.errors.email[0].length) {\n    return body.errors.email.join('\\n');\n  }\n\n  return undefined;\n}\n\n/**\n * Fired when out of stock form is submitted.\n */\ntype OOSFormSubmittedDetails = {\n  /**\n   * The value of the email address input. This is not validated before the event is dispatched.\n   */\n  email?: string;\n\n  /**\n   * The value of the phone number input.\n   */\n  phone?: string;\n\n  /**\n   * Id of the Shopify product near which the oos form was displayed\n   */\n  product_id: number;\n\n  /**\n   * Value of the Shopify product url near which the oos form was displayed, this may not be an\n   * absolute url\n   */\n  product_url: string;\n\n  /**\n   * Whether the Back-In-Stock registration was successful.\n   */\n  success: boolean;\n\n  /**\n   * Id of the Shopify variant near which the oos form was displayed\n   */\n  variant_id: number;\n};\ntype OOSFormSubmittedEvent = CustomEvent<Partial<OOSFormSubmittedDetails>>;\n\ndeclare global {\n  interface WindowEventMap {\n    'oos-form-submitted': OOSFormSubmittedEvent;\n  }\n}\n","/**\n * dispatch accepts a variable optional target. The target could be the window, or it could be the\n * document. We technically should infer which type to use based on that. However, as a quick fix,\n * we just merge the various maps together so that we have one big map of event type to target. This\n * way it does not matter whether the caller uses addEventListener on window or document, the event\n * can be found in either map.\n */\ntype EventMaps = DocumentEventMap & WindowEventMap;\n\n/**\n * Creates and dispatches a custom event.\n *\n * The primary benefit is type safety. Using this method of dispatching events ensures that the\n * given event properties align with the given event type. Fortunately all the extra type safety\n * transpiles away and does not bloat the code.\n *\n * A secondary benefit is that there is less boilerplate involved when dispatching events.\n *\n * @param type the type of the event\n * @param detail the custom event details\n * @param target from where to emit the event, such as from an element, defaults to window\n *\n * @deprecated We decided to decouple our component from local libraries. Use the dispatchEvent\n * instead\n *\n * TODO Clean up all places where this library is used, then remove the library.\n */\nexport function dispatch<\n  Key extends keyof EventMaps,\n  T extends Record<string, any> = EventMaps[Key]\n>(type: Key, detail?: T['detail'], target?: EventTarget) {\n  const event = new CustomEvent<T['detail']>(type, { cancelable: false, detail });\n\n  if (target) {\n    target.dispatchEvent(event);\n  } else {\n    dispatchEvent(event);\n  }\n}\n","import type { CustomElement } from '@integrabeauty/custom-elements';\nimport html from './index.html';\nimport styles from './index.scss';\n\nclass ProductRatingStars extends HTMLElement implements CustomElement {\n  public static get observedAttributes() {\n    return [\n      'data-average',\n      'data-count'\n    ];\n  }\n\n  readonly dataset!: {\n    /**\n     * Boolean flag represented as string to style the review count element accented.\n     */\n    accent: 'false' | 'true';\n\n    /**\n     * Average rating\n     */\n    average: string;\n\n    /**\n     * Total reviews count.\n     */\n    count: string;\n\n    /**\n     * Boolean flag represented as string to display average rating.\n     */\n    displayAverage: 'false' | 'true';\n\n    /**\n     * Boolean flag represented as string to hide reviews count.\n     */\n    hideCount: 'false' | 'true';\n\n    /**\n     * Boolean flag represented as string to mark that the component used for sets.\n     */\n    isSet: 'false' | 'true';\n\n    /**\n     * Boolean flag represented as string to align items to the right.\n     */\n    right: 'false' | 'true';\n\n    /**\n     * Boolean flag represented as string to renders elements stacked rather than in a single line.\n     */\n    stacked: 'false' | 'true';\n  };\n\n  private formatter: Intl.NumberFormat;\n\n  private onDOMContentLoadedBound = this.onDOMContentLoaded.bind(this);\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n\n    this.formatter = new Intl.NumberFormat('en-US');\n  }\n\n  public connectedCallback() {\n    this.render();\n    this.addEventListener('click', onClick);\n    addEventListener('DOMContentLoaded', this.onDOMContentLoadedBound);\n  }\n\n  public disconnectedCallback() {\n    removeEventListener('DOMContentLoaded', this.onDOMContentLoadedBound);\n  }\n\n  private onDOMContentLoaded() {\n    const productReviewsElement = document.querySelector('#reviews');\n    if (!productReviewsElement) {\n      const wrapper = this.shadowRoot.querySelector('.container');\n      wrapper.classList.add('no-click');\n    }\n  }\n\n  public attributeChangedCallback(_name: string, _oldValue: string, _newValue: string) {\n    this.render();\n  }\n\n  private render() {\n    const count = parseInt(this.dataset.count, 10);\n    const rating = parseFloat(this.dataset.average);\n    if (!count || !rating) {\n      return;\n    }\n\n    this.renderStars();\n\n    const ratingCount = this.shadowRoot.querySelector('.count');\n    ratingCount.textContent = `${this.formatter.format(count)} Reviews`;\n\n    const ratingAverage = this.shadowRoot.querySelector('.average');\n    ratingAverage.textContent = this.dataset.average;\n  }\n\n  private renderStars() {\n    const rating = parseFloat(this.dataset.average);\n    const stars = this.shadowRoot.querySelectorAll<HTMLElement>('.star');\n\n    let i = 0;\n    for (const star of stars) {\n      star.dataset.state = 'full';\n\n      const diff = rating - i;\n      if (diff <= 0) {\n        star.dataset.state = 'empty';\n      } else if (diff < 0.8) {\n        star.dataset.state = 'half-empty';\n      }\n\n      i++;\n    }\n  }\n}\n\nfunction onClick() {\n  // TODO improvement suggestion: for Sets we can go to the review section of the product from\n  // the set\n  const productReviewsElement = document.querySelector('#reviews');\n  if (productReviewsElement) {\n    productReviewsElement.scrollIntoView({ behavior: 'smooth' });\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'product-rating-stars': ProductRatingStars;\n  }\n}\n\nif (!customElements.get('product-rating-stars')) {\n  customElements.define('product-rating-stars', ProductRatingStars);\n}\n","export default \".container{align-items:center;cursor:pointer;display:flex;gap:4px}.container.no-click{cursor:default}.stars{align-items:center;color:#000;display:flex;gap:2px;line-height:1}.star{background-image:url('data:image/svg+xml;utf8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"currentColor\\\" viewBox=\\\"0 0 16 16\\\"><path d=\\\"M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z\\\"/></svg>');background-repeat:no-repeat;height:14px;width:14px}.star[data-state=empty]{background-image:url('data:image/svg+xml;utf8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"currentColor\\\" viewBox=\\\"0 0 16 16\\\"><path d=\\\"M2.866 14.85c-.078.444.36.791.746.593l4.39-2.256 4.389 2.256c.386.198.824-.149.746-.592l-.83-4.73 3.522-3.356c.33-.314.16-.888-.282-.95l-4.898-.696L8.465.792a.513.513 0 0 0-.927 0L5.354 5.12l-4.898.696c-.441.062-.612.636-.283.95l3.523 3.356-.83 4.73zm4.905-2.767-3.686 1.894.694-3.957a.565.565 0 0 0-.163-.505L1.71 6.745l4.052-.576a.525.525 0 0 0 .393-.288L8 2.223l1.847 3.658a.525.525 0 0 0 .393.288l4.052.575-2.906 2.77a.565.565 0 0 0-.163.506l.694 3.957-3.686-1.894a.503.503 0 0 0-.461 0z\\\"/></svg>')}.star[data-state=half-empty]{background-image:url('data:image/svg+xml;utf8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" fill=\\\"currentColor\\\" viewBox=\\\"0 0 16 16\\\"><path d=\\\"M5.354 5.119 7.538.792A.516.516 0 0 1 8 .5c.183 0 .366.097.465.292l2.184 4.327 4.898.696A.537.537 0 0 1 16 6.32a.548.548 0 0 1-.17.445l-3.523 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256a.52.52 0 0 1-.146.05c-.342.06-.668-.254-.6-.642l.83-4.73L.173 6.765a.55.55 0 0 1-.172-.403.58.58 0 0 1 .085-.302.513.513 0 0 1 .37-.245l4.898-.696zM8 12.027a.5.5 0 0 1 .232.056l3.686 1.894-.694-3.957a.565.565 0 0 1 .162-.505l2.907-2.77-4.052-.576a.525.525 0 0 1-.393-.288L8.001 2.223 8 2.226v9.8z\\\" /></svg>')}.count{font-size:.75rem;line-height:1}@media only screen and (min-width:768px){.count{font-size:.75rem}}.average,.count.hide-count{display:none}.average{font-size:.875rem;margin-bottom:-1px;margin-left:4px}:host([data-accent=true]) .count{color:#7c0d3f;font-weight:600;text-decoration:underline}:host([data-small=true]) .star{height:14px;width:14px}:host([data-small=true]) .count{font-size:.75rem}:host([data-stacked=true]) .container{align-items:unset;flex-direction:column}:host([data-right=true]) .container{justify-content:flex-end}:host([data-right=true]):host([data-stacked=true]) .container{align-items:flex-end}:host([data-hide-count=true]) .count{display:none}:host([data-display-average=true]) .average{display:block}:host([data-is-set=true]) .container{margin-top:7px}@media only screen and (min-width:768px){:host([data-is-set=true]) .container{margin-top:4px}}:host([data-is-set=true]) .star{height:8px;width:8px}@media only screen and (min-width:768px){:host([data-is-set=true]) .star{height:12px;width:12px}}\";","// Module\nvar code = \"<div class=\\\"container\\\"><div class=\\\"stars\\\"><span class=\\\"star\\\" data-state=\\\"full\\\"></span><span class=\\\"star\\\" data-state=\\\"full\\\"></span><span class=\\\"star\\\" data-state=\\\"full\\\"></span><span class=\\\"star\\\" data-state=\\\"full\\\"></span><span class=\\\"star\\\" data-state=\\\"full\\\"></span><span class=\\\"average\\\"></span></div><span class=\\\"count\\\"></span></div>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\n/** TODO This component should be refactored for better accessibility. Markup is incorrect. We\n *  shouldn't use <figure> in this context. Also, I think it will be better to not have a number in\n *  markup but use <ol> for the list of steps and use CSS counter. The level of the step's title\n *  should be h3 and no other headings.\n */\n\n/**\n * Renders a product usage step card\n */\nclass OfirProductStep extends HTMLElement {\n  readonly dataset!: {\n    /**\n     * Description of the product usage at this step\n     */\n    description: string;\n\n    /**\n     * The image source URL\n     */\n    imageSrc: string;\n\n    /**\n     * The numerical step of this instance\n     */\n    step: string;\n\n    /**\n     * Heading/title of the current step\n     */\n    title: string;\n  };\n\n  public shadowRoot!: ShadowRoot;\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    this.render();\n  }\n\n  private render() {\n    const imageElem = this.shadowRoot.querySelector('img');\n    imageElem.src = this.dataset.imageSrc;\n    imageElem.alt = `Step ${this.dataset.step}`;\n\n    const stepNumberElem = this.shadowRoot.querySelector('h3');\n    stepNumberElem.textContent = this.dataset.step;\n\n    const titleElem = this.shadowRoot.querySelector('h4');\n    titleElem.textContent = this.dataset.title;\n\n    const descriptionElem = this.shadowRoot.querySelector('p');\n    descriptionElem.textContent = this.dataset.description;\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'ofir-product-step': OfirProductStep;\n  }\n}\n\nif (!customElements.get('ofir-product-step')) {\n  customElements.define('ofir-product-step', OfirProductStep);\n}\n","export default \"*,:after,:before{box-sizing:border-box;font-size:2rem;font-weight:600;letter-spacing:.038px;line-height:2rem;margin:0;padding:0}@media screen and (min-width:1024px){*,:after,:before{font-size:2.5rem;letter-spacing:.048px;line-height:2.5rem}}:host{display:block}figure{display:block}img{margin-bottom:24px;width:100%}figcaption{display:flex;padding-bottom:24px}@media screen and (max-width:768px){figcaption{padding:0 16px 24px}}h3{margin-right:16px;width:40px}.text{flex:1;padding-right:16px}h4{margin-bottom:16px}h3,h4{font-size:2rem;font-weight:700;letter-spacing:.038px;line-height:2rem}@media screen and (max-width:1024px){h3,h4{font-size:1.5rem!important;letter-spacing:.029px!important;line-height:1.5rem!important}}p{font-size:1rem;font-weight:300;letter-spacing:.019px;line-height:1.5rem}@media screen and (min-width:1024px){p{font-size:1.125rem;letter-spacing:.022px;line-height:1.6875rem}}\";","// Module\nvar code = \"<figure><img><figcaption><h3></h3><div class=\\\"text\\\"><h4></h4><p></p></div></figcaption></figure>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\n/**\n * Renders a wrapper for the <ofir-product-step>s.\n */\nclass OfirProductSteps extends HTMLElement {\n  public shadowRoot!: ShadowRoot;\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'ofir-product-steps': OfirProductSteps;\n  }\n}\n\nif (!customElements.get('ofir-product-steps')) {\n  customElements.define('ofir-product-steps', OfirProductSteps);\n}\n","export default \":host{display:block}@media only screen and (min-width:768px){:host{display:grid;gap:40px 16px;grid-template-columns:repeat(2,minmax(0,1fr));margin-left:auto;margin-right:auto;max-width:704px}}@media only screen and (min-width:1280px){:host{grid-template-columns:repeat(4,minmax(0,1fr));max-width:unset}}:host([data-add-bottom-margin=true]){margin-bottom:16px}@media only screen and (min-width:992px){:host([data-add-bottom-margin=true]){margin-bottom:32px}}\";","// Module\nvar code = \"<slot></slot>\";\n// Exports\nexport default code;","import type { CustomElement } from '@integrabeauty/custom-elements';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * A custom element for selecting product variants. Includes list of selectable options and\n * the title and description of the selected variant.\n *\n * The data for all variants are stored as `<variant-selector-option>` elements. Each element\n * contains data-attributes, which store the values needed to handle the variant selector's\n * functionality.\n *\n * This custom element doesn't gather all variants data to an object. It's easily accessible via\n * `querySelector`, we don't need to access it frequently, nor process this data. The selected\n * variant is also not stored as a class property and taken via `querySelector('input:checked')`.\n *\n * Currently, only one option group is used for products, but technically a Shopify product can have\n * multiple options, e.g. \"Color\", \"Size\" etc.\n */\nclass VariantSelector extends HTMLElement implements CustomElement {\n  readonly dataset!: {\n    /**\n     * Boolean represented as string that indicates whether the element is expandable or not.\n     */\n    expandable: 'false' | 'true';\n\n    /**\n     * Set the horizontal alignment of the component on desktop. Depending on where it's placed we\n     * need to make the elements of the component centered.\n     */\n    horizontalAlignmentDesktop: 'center';\n\n    /**\n     * Set the horizontal alignment of the component on mobile. Depending on where it's placed we\n     * need to make the elements of the component centered.\n     */\n    horizontalAlignmentMobile: 'center';\n\n    /**\n     * The ID of the initially selected product variant, a stringified integer\n     */\n    initSelectedVariantId: string;\n\n    /**\n     * A string representing a boolean that indicates whether the component is being used for a\n     * gift card product.\n     *\n     * Depending on whether this is a basic product or a gift card, the component should be\n     * rendered and styled differently.\n     */\n    isGiftCard: 'false' | 'true';\n\n    /**\n     * Product ID, a stringified integer\n     */\n    productId: string;\n\n    /**\n     * Index of the product in the set, string representing a positive integer. Optional\n     *\n     * Required only for subproducts on sets PDP. A set can consist of similar products. We need\n     * \"setIndex\" to distinguish them\n     */\n    setIndex: string;\n\n    /**\n     * Set the size of the component. We need the variant selector component in different sizes\n     * depending on where it's placed. It affects only styles.\n     *\n     * TODO: The `lagre` option is not in use for now and most likely we won't need it. I'll keep it\n     * here for now and remove later if really not needed.\n     */\n    size: 'large' | 'medium' | 'small';\n\n    /**\n     * Represents the possible variants for the title style.\n     *\n     * <strong>Berry</strong> - Muted Plum with Cool Undertones\"\n     * Default: variant name + variant short description, e.g.\"Berry - Muted Plum with Cool\n     * Undertones\"\n     * Condensed: variant name, e.g. \"Berry\"\n     */\n    titleFormat: 'condensed' | 'default' | 'none';\n  };\n\n  public shadowRoot!: ShadowRoot;\n  private onInputChangedBound = this.onInputChanged.bind(this);\n  private onExpandButtonClickedBound = this.onExpandButtonClicked.bind(this);\n  private onSlotChangeBound = this.onSlotChange.bind(this);\n\n  public constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    const slot = this.shadowRoot.querySelector('slot');\n    slot.addEventListener('slotchange', this.onSlotChangeBound);\n  }\n\n  public disconnectedCallback() {\n    const slot = this.shadowRoot.querySelector('slot');\n    slot.removeEventListener('slotchange', this.onSlotChangeBound);\n\n    this.shadowRoot.removeEventListener('change', this.onInputChangedBound);\n\n    const expandButton = this.shadowRoot.querySelector('.expand');\n    if (expandButton) {\n      // Checking this condition is important. The expand buttons are added only if the attribute\n      // data-expandable=\"true\" is set and the variant selector contains more than 4 options. Also,\n      // we remove it after clicking.\n      expandButton.removeEventListener('click', this.onExpandButtonClickedBound);\n    }\n  }\n\n  /**\n   * Handles the `slotchange` event. When the slot is populated with `<variant-selector-option>`\n   * elements, it calls the `onSlotReady` method to proceed with rendering and event setup.\n   * DOMContentLoaded is not reliable for cases when this component is slotted into another\n   * component, like in the upsell modal.\n   */\n  private onSlotChange(e: Event) {\n    const slot = <HTMLSlotElement>e.target;\n    const assignedElements = slot.assignedElements();\n    if (assignedElements.length > 0) {\n      this.onSlotReady();\n    }\n  }\n\n  private onSlotReady() {\n    this.render();\n    this.renderTitle();\n\n    this.shadowRoot.addEventListener('change', this.onInputChangedBound);\n\n    const expandButton = this.shadowRoot.querySelector('.expand');\n    if (expandButton) {\n      // Checking this condition is important. The expand buttons are added only if the attribute\n      // data-expandable=\"true\" is set and the variant selector contains more than 4 options.\n      expandButton.addEventListener('click', this.onExpandButtonClickedBound);\n    }\n\n    // Sending initial event\n    const selector =\n      `variant-selector-option[data-variant-id=\"${this.dataset.initSelectedVariantId}\"]`;\n    type VariantSelectorOptionType = HTMLElementTagNameMap['variant-selector-option'];\n    let initialVariant = this.querySelector<VariantSelectorOptionType>(selector);\n    if (!initialVariant) {\n      // There's a strange error in Sentry. I cannot reproduce so trying to catch it. I assume\n      // that `this.dataset.initSelectedVariantId` is not passed sometimes. If it helps we\n      // will investigate more why it happens.\n      const variantOptions = this.querySelectorAll('variant-selector-option');\n      const options = [];\n      for (const variantOption of variantOptions) {\n        options.push({\n          variantId: variantOption.dataset.variantId,\n          value: variantOption.dataset.value,\n          available: variantOption.dataset.available\n        });\n      }\n\n      Sentry.captureMessage('Variant selector initial variant not found', {\n        level: 'warning',\n        extra: {\n          initSelectedVariantId: this.dataset.initSelectedVariantId,\n          productId: this.dataset.productId,\n          parentElement: this.parentElement,\n          options\n        }\n      });\n\n      // Fallback to the first variant\n      initialVariant = this.querySelector<VariantSelectorOptionType>('variant-selector-option');\n    }\n\n    const variantChangedEvent = new CustomEvent<VariantChangedEvent['detail']>('variant-changed', {\n      cancelable: false,\n      bubbles: true,\n      detail: {\n        initial: true,\n        source: 'variant-selector',\n        variant: {\n          available: initialVariant.dataset.available === 'true',\n          description: initialVariant.dataset.description,\n          id: parseInt(initialVariant.dataset.variantId, 10),\n          product_id: parseInt(this.dataset.productId, 10),\n          coming_soon: false,\n          option: initialVariant.dataset.value,\n          price: parseInt(initialVariant.dataset.price, 10),\n          compareAtPrice: initialVariant.dataset.compareAtPrice,\n          compareAtPriceModalContent: initialVariant.dataset.compareAtPriceModalContent,\n          setIndex: parseInt(this.dataset.setIndex, 10) ?? null,\n          image: initialVariant.dataset.image ?? '',\n          color: this.getVariantColor(initialVariant.dataset.backgroundClass),\n          discountMessage: initialVariant.dataset.discountMessage ?? '',\n          topBadge: initialVariant.dataset.topBadge ?? '',\n          topBadgeStyle: initialVariant.dataset.topBadgeStyle ?? 'default'\n        }\n      }\n    });\n    this.dispatchEvent(variantChangedEvent);\n  }\n\n  private onInputChanged(_event: Event) {\n    this.renderTitle();\n\n    const input = this.shadowRoot.querySelector('input:checked');\n    type Variant = HTMLElementTagNameMap['variant-selector-option'];\n    const selector = `variant-selector-option[data-variant-id=\"${input.id}\"]`;\n    const variant = this.querySelector<Variant>(selector);\n\n    const variantChangedEvent = new CustomEvent<VariantChangedEvent['detail']>('variant-changed', {\n      cancelable: false,\n      bubbles: true,\n      detail: {\n        initial: false,\n        source: 'variant-selector',\n        variant: {\n          available: variant.dataset.available === 'true',\n          description: variant.dataset.description,\n          id: parseInt(variant.dataset.variantId, 10),\n          product_id: parseInt(this.dataset.productId, 10),\n          coming_soon: false,\n          option: variant.dataset.value,\n          price: parseInt(variant.dataset.price, 10),\n          compareAtPrice: variant.dataset.compareAtPrice,\n          compareAtPriceModalContent: variant.dataset.compareAtPriceModalContent,\n          setIndex: parseInt(this.dataset.setIndex, 10) ?? null,\n          image: variant.dataset.image ?? '',\n          color: this.getVariantColor(variant.dataset.backgroundClass),\n          discountMessage: variant.dataset.discountMessage,\n          topBadge: variant.dataset.topBadge ?? '',\n          topBadgeStyle: variant.dataset.topBadgeStyle ?? 'default'\n        }\n      }\n    });\n    this.dispatchEvent(variantChangedEvent);\n  }\n\n  private onExpandButtonClicked(event: Event) {\n    const button = <HTMLElement>event.currentTarget;\n    button.remove();\n\n    const options = this.shadowRoot.querySelector('.options');\n    options.classList.remove('collapsed');\n  }\n\n  /**\n   * Renders the variant options for the variant selector component based on data stored in\n   * `<variant-selector-option>` elements.\n   */\n  private render() {\n    const options = this.querySelectorAll<HTMLElementTagNameMap['variant-selector-option']>(\n      'variant-selector-option');\n    const optionsFragment = document.createDocumentFragment();\n    for (const variant of options) {\n      const input = document.createElement('input');\n      input.id = variant.dataset.variantId;\n      input.type = 'radio';\n      input.name = variant.dataset.group;\n      input.value = variant.dataset.value;\n      input.classList.add('visually-hidden');\n      if (variant.dataset.available !== 'true') {\n        input.classList.add('unavailable');\n      }\n\n      input.checked = variant.dataset.variantId === this.dataset.initSelectedVariantId;\n\n      const label = document.createElement('label');\n      label.setAttribute('for', variant.dataset.variantId);\n      label.setAttribute('title', variant.dataset.value);\n      if (variant.dataset.backgroundClass) {\n        label.classList.add(variant.dataset.backgroundClass);\n      }\n\n      let labelHtml = '';\n      if (this.dataset.isGiftCard === 'true') {\n        labelHtml = removeDecimals(variant.dataset.value);\n      } else {\n        labelHtml = `<span class=\"visually-hidden\">${variant.dataset.value}</span>`;\n      }\n\n      if (variant.dataset.badge) {\n        const badgeStyleClass = variant.dataset.badgeStyle ?? '';\n        labelHtml += `<span class=\"badge ${badgeStyleClass}\">${variant.dataset.badge}</span>`;\n      }\n\n      label.innerHTML = labelHtml;\n\n      const container = document.createElement('div');\n      container.appendChild(input);\n      container.appendChild(label);\n      optionsFragment.appendChild(container);\n    }\n\n    const optionsContainer = this.shadowRoot.querySelector('.options');\n    optionsContainer.appendChild(optionsFragment);\n\n    if (this.dataset.expandable === 'true' && options.length > 4) {\n      optionsContainer.classList.add('collapsed');\n\n      const expandButton = this.shadowRoot.querySelector<HTMLTemplateElement>('#expand-button');\n      optionsContainer.appendChild(expandButton.content.cloneNode(true));\n    }\n  }\n\n  /**\n   * Renders the title and short description based on the selected variant.\n   */\n  private renderTitle() {\n    const titleElement = this.shadowRoot.querySelector('.title');\n    if (this.dataset.titleFormat === 'none') {\n      if (titleElement) {\n        titleElement.remove();\n      }\n\n      return;\n    }\n\n    let checkedInput = this.shadowRoot.querySelector('input:checked');\n    if (!checkedInput) {\n      // This is a fallback, it should not happen normally. Trying to fix a strange Sentry error\n      checkedInput = this.shadowRoot.querySelector('input');\n    }\n\n    type Variant = HTMLElementTagNameMap['variant-selector-option'];\n    const selector = `variant-selector-option[data-variant-id=\"${checkedInput.id}\"]`;\n    const selectedVariant = this.querySelector<Variant>(selector);\n    const { value, description } = selectedVariant.dataset;\n\n    let title = '';\n\n    if (value) {\n      if (this.dataset.isGiftCard === 'true') {\n        title += `<strong>${removeDecimals(value)}</strong>`;\n      } else {\n        title += `<strong>${value}</strong>`;\n      }\n    }\n\n    if (this.dataset.titleFormat !== 'condensed' && description) {\n      title += ` - ${description}`;\n    }\n\n    titleElement.innerHTML = title;\n  }\n\n  /**\n   * Retrieves the background color defined in the CSS for a variant color swatch.\n   *\n   * @todo This approach isn't ideal, but it's set up like this for now to get things working.\n   * We need to start discussing a better way to handle variant colors. One idea is to store them in\n   * Shopify so the content team can manage them directly, but this would require more investigation\n   */\n  private getVariantColor(backgroundClass: string) {\n    // e.g., gift card\n    if (!backgroundClass) {\n      return '';\n    }\n\n    const style = this.shadowRoot.querySelector('style');\n    const rules: CSSRuleList = style.sheet.cssRules;\n\n    // Escape exclamation marks and other common problematic characters\n    const escapedBackgroundClass = backgroundClass\n      .replace(/[!\"#$%&'()*+,.:;?@^`{|}~]/g, '\\\\$&');\n\n    for (const rule of rules) {\n      if (rule instanceof CSSStyleRule && rule.selectorText === `.${escapedBackgroundClass}`) {\n        const backgroundColor = rule.style.backgroundColor;\n        if (backgroundColor) {\n          return backgroundColor;\n        }\n      }\n    }\n\n    return '';\n  }\n}\n\n/**\n * Removes the decimal part from a price string if it ends with \".00\".\n *\n * @param priceString - e.g. \"$10.00\"\n */\nfunction removeDecimals(priceString: string): string {\n  return priceString.replace(/\\.00$/, '');\n}\n\n// TODO The detail of the event should be refactored, it's very old and tends to copy the structure\n// and key names of some Shopify object, but there's no sense to do that, we don't need all these\n// values. This object has to be reviewed and only the parameters we need for the variant selector\n// functionality should stay. For now, I leave them as optional for compatibility until the old\n// variant selector is replaced with this custom element for all places.\ntype VariantChangedEvent = CustomEvent<{\n  initial: boolean;\n  source: string;\n  variant: {\n    /**\n     * Indicates whether the variant is available or not.\n     */\n    available: boolean;\n\n    /**\n     * The variant's color in CSS RGB format, used in the UI to display color swatches.\n     * Returns an empty string if no color is found.\n     *\n     * @example \"rgb(51, 47, 33)\"\n     */\n    color: string;\n\n    /**\n     * Indicates whether the coming soon variant.\n     */\n    coming_soon: boolean | null;\n\n    /**\n     * Variant compare at price. It's possible, that's different variants will have each own\n     * compare at price. Represented as string with currency symbol, e.g. \"$12\"\n     */\n    compareAtPrice: string;\n\n    /**\n     * Content to be displayed in the compare at price modal for a particular variant\n     */\n    compareAtPriceModalContent: string;\n\n    /**\n     * Variant additional short description\n     */\n    description: string | null;\n\n    /**\n     * Discount offer message\n     */\n    discountMessage: string;\n\n    /**\n     * Product variant ID\n     */\n    id: number;\n\n    /**\n     * Variant image src\n     */\n    image: string;\n\n    /**\n     * Variant main media ID\n     *\n     * @todo check if we need it anywhere\n     */\n    media_id?: number | null;\n\n    /**\n     * Variant associated option name\n     */\n    option?: string;\n\n    /**\n     * List of all variant options\n     *\n     * @todo check if we need it anywhere\n     */\n    options?: string[];\n\n    /**\n     * Variant price. It's possible, that's different variants will have each own price, e.g. the\n     * gift card. Represented as cents, e.g. \"1200\" means $12\n     */\n    price?: number;\n\n    /**\n     * Variant product ID\n     */\n    product_id: number;\n\n    /**\n     * Index of the product in the set.\n     *\n     * A set can consist of similar products. We need \"setIndex\" to distinguish them\n     */\n    setIndex?: number;\n\n    /**\n     * Top badge label, e.g. \"50% off\", \"Sale\"\n     */\n    topBadge: string;\n\n    /**\n     * Top badge style (black or red color), e.g. \"default\", \"highlighted\"\n     */\n    topBadgeStyle: 'default' | 'highlighted';\n  };\n}>;\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'variant-selector': VariantSelector;\n  }\n\n  interface WindowEventMap {\n    'variant-changed': VariantChangedEvent;\n  }\n\n  interface HTMLElementEventMap {\n    'variant-changed': VariantChangedEvent;\n  }\n}\n\nif (!customElements.get('variant-selector')) {\n  customElements.define('variant-selector', VariantSelector);\n}\n","export default \":host{display:block}@media only screen and (max-width:767px){:host([data-horizontal-alignment-mobile=center]){text-align:center}:host([data-horizontal-alignment-mobile=center]) .options{justify-content:center}}@media only screen and (min-width:768px){:host([data-horizontal-alignment-desktop=center]){text-align:center}:host([data-horizontal-alignment-desktop=center]) .options{justify-content:center}}:host([data-size=large]) .expand,:host([data-size=large]) label{height:42px;width:42px}:host([data-size=medium]) .title{font-size:.75rem}@media only screen and (min-width:768px){:host([data-size=medium]) .title{font-size:.875rem}}:host([data-size=medium]) .options{column-gap:0}@media only screen and (min-width:768px){:host([data-size=medium]) .options{column-gap:3px}}:host([data-size=medium]) .expand,:host([data-size=medium]) label{height:28px;width:28px}@media only screen and (min-width:768px){:host([data-size=medium]) .expand,:host([data-size=medium]) label{height:32px;width:32px}}:host([data-size=small]) .title{font-size:.75rem}:host([data-size=small]) .expand,:host([data-size=small]) label{height:24px;width:24px}:host([data-size=small]) .badge{font-size:9px;padding:1px 3px}:host([data-is-gift-card=true]) label{background-color:#000;font-size:.875rem;font-weight:500;height:auto;line-height:1;padding:8px 12px;text-align:center;width:auto}:host([data-is-gift-card=true]) .expand{background-color:#000;border-radius:100px;height:30px;width:36px}:host([data-is-gift-card=true]) .expand svg{stroke:#fff}:host([data-is-gift-card=true]) input:checked+label:before{border-color:#000}:host([data-is-gift-card=true]):host([data-size=small]) label{padding:6px 8px}:host([data-is-gift-card=true]):host([data-size=small]) .expand{height:28px}strong{font-weight:600}.title{margin-bottom:8px}.options{align-items:center;column-gap:3px;display:flex;flex-wrap:wrap;margin-left:-4px;margin-right:-4px}@media only screen and (min-width:768px){.options{row-gap:4px}}.options.collapsed>div:nth-of-type(n+5){display:none}.expand,label{background-clip:padding-box;border:4px solid #0000;border-radius:100px;box-sizing:initial;color:#fff;cursor:pointer;display:block;position:relative}label:hover:before{border-color:#cdcfd1}label:before{border:1px solid #0000;border-radius:100px;bottom:-4px;content:\\\"\\\";left:-4px;position:absolute;right:-4px;top:-4px}label:after{border-right:1px solid #fff;bottom:-5px;left:50%;position:absolute;top:-5px;transform:rotate(-45deg)}@media only screen and (min-width:768px){label:after{bottom:-4px;top:-4px}}.badge{background-color:#000;bottom:-4px;color:#fff;font-size:.625rem;font-weight:600;left:50%;line-height:1;padding:2px 3px;position:absolute;text-transform:uppercase;transform:translateX(-50%)}@media only screen and (min-width:768px){.badge{font-size:.6875rem;padding-left:4px;padding-right:4px}}.badge.highlighted{background-color:#e71d13}input:checked+label:before{border-color:#1e1e1e}input:focus+label:before{border-color:#000;border-width:2px}.unavailable+label:after{content:\\\"\\\"}.expand{align-items:center;appearance:none;background-color:#e6e7e8;border-radius:50%;cursor:pointer;display:flex;justify-content:center;min-width:unset;padding:0}.expand:hover{background-color:#cdcfd1;border-color:#0000}.expand svg{width:20px}.visually-hidden{height:1px;overflow:hidden;position:absolute;width:1px;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);white-space:nowrap}.bg-120ml{background-color:#e9ecee}.bg-6pm{background-color:#b16a56}.bg-all-that{background-color:#683431}.bg-allspice{background-color:#774212}.bg-almond{background-color:#dbb497}.bg-almond-fruit{background-color:#9f5f54}.bg-amber{background-color:#d19c70}.bg-anise{background-color:#a86531}.bg-apricot{background-color:#f09491}.bg-bare-rice{background-color:#dbc8b6}.bg-barley{background-color:#f8d4b2}.bg-berry{background-color:#b66c6d}.bg-biscuit{background-color:#debc8b}.bg-black{background-color:#0f171f}.bg-blonde-shot{background-color:#bba370}.bg-blush{background-color:#dea39c}.bg-brick{background-color:#7c2629}.bg-burgundy{background-color:#992359}.bg-burgundy-2{background-color:#7c0d3f}.bg-burgundy-3{background-color:#b24d76}.bg-butter{background-color:#e0c09f}.bg-cacao{background-color:#7e694f}.bg-caramel{background-color:#d2a57c}.bg-cardamon{background-color:#dea76e}.bg-cardinal{background-color:#ab2328}.bg-carob{background-color:#4f3324}.bg-cashew{background-color:#d7a179}.bg-celestial-cool-tones{background-color:#b4b5df}.bg-ceramic{background-color:#ce9464}.bg-chai{background-color:#733d11}.bg-chalkshine{background-color:#d9d2ca}.bg-charcoal{background-color:#212721}.bg-cherry{background-color:#d6001c}.bg-chili{background-color:#c10016}.bg-chocolate{background-color:#5c3d31}.bg-cinnamon{background-color:#ae7947}.bg-clear{background-color:#e6e6e6}.bg-cloudless{background-color:#a7bcd6}.bg-clove{background-color:#4c2812}.bg-cocoa{background-color:#7e502e}.bg-coffee{background-color:#7a4617}.bg-coral{background-color:#fa4616}.bg-coriander{background-color:#d8a379}.bg-cork{background-color:#f3d3b0}.bg-cotton{background-color:#f3d8bb}.bg-cranberry{background-color:#971b2f}.bg-cream{background-color:#f6dec4}.bg-crimson{background-color:#9b2242}.bg-cumin{background-color:#c6925c}.bg-currant{background-color:#ad5389}.bg-daydream{background-color:#b47d75}.bg-deep{background-color:#c48e50}.bg-deep-hunter-green{background-color:#183029}.bg-dewy{background-color:#f7f7f7}.bg-eggshell{background-color:#d7c4b7}.bg-enamel{background-color:#fee8d3}.bg-espresso{background-color:#382e2c}.bg-fair{background-color:#fce7c4}.bg-fig{background-color:#6f2c3f}.bg-flax{background-color:#b08054}.bg-future-dusk{background-color:#3b3a4a}.bg-ginger{background-color:#e7b78a}.bg-glacier{background-color:#e0e0e0}.bg-go-there\\\\!{background-color:#905e7b}.bg-gold-dust{background-color:#db9900}.bg-graphite{background-color:#545859}.bg-guava{background-color:#df7a99}.bg-hazelnut{background-color:#c39367}.bg-henna{background-color:#965c2c}.bg-hibiscus{background-color:#b46b7a}.bg-high-desert{background-color:#dda69d}.bg-honey{background-color:#dda87b}.bg-ink{background-color:#0f171f}.bg-jute{background-color:#ddb182}.bg-latte{background-color:#ad7c59}.bg-leather{background-color:#4e3629}.bg-licorice{background-color:#0f171f}.bg-lilac{background-color:#d6c1d7}.bg-linen{background-color:#f4d1ab}.bg-longan-berry{background-color:#bf9474}.bg-lychee{background-color:#e4aeb1}.bg-matte{background-color:#f8eeee}.bg-matte-finish\\\\/standard{background-color:#7e4d4d}.bg-medium{background-color:#f3d098}.bg-milk{background-color:#fde4ce}.bg-millet{background-color:#9d6e46}.bg-sapphire{background-color:#002f6c}.bg-nudesicle{background-color:#dfb8a7}.bg-nutmeg{background-color:#dca86e}.bg-off-pink{background-color:#bc8a7e}.bg-opal-shades{background-color:#8b5a6b}.bg-orange-caves{background-color:#f38e58}.bg-original{background-color:#f6ece5}.bg-onyx{background-color:#332f21}.bg-papyrus{background-color:#bf9474}.bg-pecan{background-color:#8c5c30}.bg-peony{background-color:#fac0b8}.bg-pepper{background-color:#4e4b48}.bg-pink-smoothie{background-color:#dea09a}.bg-porcelain{background-color:#fdecd8}.bg-praline{background-color:#d5a286}.bg-quinoa{background-color:#cda890}.bg-rattan{background-color:#e6ba8b}.bg-red-clay{background-color:#b0493d}.bg-rich-brown{background-color:#4f2c1d}.bg-rose{background-color:#cf6f77}.bg-rye{background-color:#c09c83}.bg-sable{background-color:#b27846}.bg-sand{background-color:#edcea2}.bg-sesame{background-color:#ecc49b}.bg-silk{background-color:#eddbc1}.bg-smudge-proof-licorice{background-color:#0f171f}.bg-sumac{background-color:#89532f}.bg-tamarind{background-color:#c68f56}.bg-marine{background-color:#003b49}.bg-terracotta{background-color:#e3b699}.bg-toffee{background-color:#8f3237}.bg-truffle{background-color:#562d0f}.bg-ultra-violet{background-color:#512a44}.bg-waterproof-licorice{background-color:#0f171f}.bg-what-eh-ver\\\\!{background-color:#c48672}.bg-silver-ice{background-color:#f2ebe7}.bg-sunset-spark{background-color:#c48672}.bg-radiant-rose{background-color:#dea39c}.bg-gold-rush{background-color:#d4b59e}.bg-diva{background-color:#dd5680}.bg-doll{background-color:#e3aeb1}.bg-muse{background-color:#be625e}.bg-dew{background-color:#e7e6e6}.bg-pink-ice{background-color:#dda69d}.bg-golden-hour{background-color:#d9ac95}.bg-copper-glow{background-color:#cf7b69}.bg-pink-apple{background-color:#e17974}.bg-watermelon{background-color:#c52f40}.bg-dragon-fruit{background-color:#9f2842}.bg-raisin{background-color:#b66b7a}.bg-rhubarb{background-color:#9a4856}.bg-brown-pear{background-color:#a75247}.bg-clay{background-color:#cc9a8d}.bg-bluff{background-color:#ad7f66}.bg-oasis{background-color:#af6f53}.bg-cove{background-color:#7f4c3a}.bg-mesa{background-color:#5b3427}.bg-poppy{background-color:#b06f76}.bg-sangria{background-color:#852c4d}.bg-mocha-glow{background-color:#ae6a61}.bg-desert-rose{background-color:#a94545}.bg-zest{background-color:#de754b}\";","// Module\nvar code = \"<div class=\\\"title\\\"></div><div class=\\\"options\\\"></div><slot></slot><template id=\\\"expand-button\\\"><button class=\\\"expand\\\" aria-label=\\\"Show all options\\\"><svg role=\\\"presentation\\\" width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 20 20\\\" fill=\\\"none\\\" stroke=\\\"#83888C\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><title>Show all options</title><path d=\\\"M1 9.99976L19 9.99992M9.99965 0.999969L9.99982 19\\\" stroke-linecap=\\\"square\\\"></path></svg></button></template>\";\n// Exports\nexport default code;","import type { CustomElement } from '@integrabeauty/custom-elements';\nimport html from './index.html';\nimport styles from './index.scss';\n\nexport class QuantityInput extends HTMLElement implements CustomElement {\n  static get observedAttributes() {\n    return [\n      'data-min',\n      'data-max'\n    ];\n  }\n\n  readonly dataset!: {\n    /**\n     * The initial value of the input, number of items. Later, we shouldn't react on this attribute\n     * changes because this component is the source of truth of item quantity.\n     */\n    initValue: string;\n\n    /**\n     * The maximum value of the input\n     */\n    max: string;\n\n    /**\n     * The minimum value of the input\n     */\n    min: string;\n\n    /**\n     * Product ID, a stringified integer. Needed to send with the changed event to distinguish\n     * to which product this event is related\n     */\n    productId: string;\n\n    /**\n     * The source of the component. We need that to distinguish events sending from a cart set item,\n     * cart regular product item, or a PDP.\n     */\n    source: 'cart-set' | 'cart-variant' | 'pdp';\n\n    /**\n     * The list of line_item.key properties delimited by a comma from the Shopify liquid object.\n     * Could be a single line item key value if the line item is a regular product variant but not\n     * a set.\n     * (Ignore the line break in the example)\n     *\n     * @example \"41980707274803:83ce40615fdb0df94ae38ae310adf77d,40530477187123:053e0078de2c9659e0a\n     * 3d1c7a2145514,40530477613107:cc94938c3475ee097bac79ff2908d6e4\"\n     *\n     * @see https://shopify.dev/docs/api/liquid/objects/line_item#line_item-key\n     */\n    variantKeys: string;\n  };\n\n  /**\n   * We need to store the value to compare new and old values.\n   */\n  private value: number;\n\n  /**\n   * Indicates if the component is a part of a cart line item. In this case, we need additional UX\n   * logic because the whole cart is being updated.\n   */\n  private isInCartItem: boolean;\n\n  public shadowRoot!: ShadowRoot;\n  private onQuantityDecreasedBound = this.onQuantityDecreased.bind(this);\n  private onQuantityIncreasedBound = this.onQuantityIncreased.bind(this);\n  private onInputChangedBound = this.onInputChanged.bind(this);\n  private onCartUpdateStartedBound = this.onCartUpdateStarted.bind(this);\n\n  constructor() {\n    super();\n\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n    this.isInCartItem = false;\n  }\n\n  public connectedCallback() {\n    const input = this.shadowRoot.querySelector('input');\n\n    if (this.dataset.initValue) {\n      input.setAttribute('value', this.dataset.initValue);\n    }\n\n    input.addEventListener('change', this.onInputChangedBound);\n\n    this.value = parseInt(input.value, 10);\n\n    const minusButton = this.shadowRoot.querySelector('.minus-button');\n    minusButton.addEventListener('click', this.onQuantityDecreasedBound);\n\n    const plusButton = this.shadowRoot.querySelector('.plus-button');\n    plusButton.addEventListener('click', this.onQuantityIncreasedBound);\n\n    const parentLineItemEl = this.closest('.cart-line-item, .cart-item-set-footer');\n    if (parentLineItemEl) {\n      this.isInCartItem = true;\n    }\n\n    this.render();\n\n    addEventListener('cart-update-started', this.onCartUpdateStartedBound);\n  }\n\n  public disconnectedCallback() {\n    const minusButton = this.shadowRoot.querySelector('.minus-button');\n    minusButton.removeEventListener('click', this.onQuantityDecreasedBound);\n\n    const plusButton = this.shadowRoot.querySelector('.plus-button');\n    plusButton.removeEventListener('click', this.onQuantityIncreasedBound);\n\n    const inputElement = this.shadowRoot.querySelector('input');\n    inputElement.removeEventListener('change', this.onInputChangedBound);\n\n    removeEventListener('cart-update-started', this.onCartUpdateStartedBound);\n  }\n\n  public attributeChangedCallback(_name: string, oldValue: string, newValue: string) {\n    if (!this.isConnected || newValue === oldValue) {\n      return;\n    }\n\n    this.render();\n  }\n\n  private onQuantityDecreased() {\n    this.setInputValue(this.value - 1, this.value);\n  }\n\n  private onQuantityIncreased() {\n    this.setInputValue(this.value + 1, this.value);\n  }\n\n  private onInputChanged(event: Event) {\n    const newValue = parseInt((<HTMLInputElement>event.target).value, 10);\n    this.setInputValue(newValue, this.value);\n  }\n\n  private onCartUpdateStarted(_event: Event) {\n    if (this.isInCartItem) {\n      // We disable controls but don't need to enable because in the current implementation\n      // the whole mini cart modal's HTML is overwritten by the HTML fetch from the Shopify\n      // endpoint. Trying to wait the \"ofir-cart-call-ended\" event and then enable buttons cause\n      // a bug because this event fires after the mini card has been updated and always enable\n      // \"-\"/\"+\" buttons but that's wrong.\n      this.disableControls();\n    }\n  }\n\n  private setInputValue(newValue: number, oldValue: number) {\n    if (newValue === oldValue) {\n      return;\n    }\n\n    const input = this.shadowRoot.querySelector('input');\n\n    const max = parseInt(input.max, 10);\n    const min = parseInt(input.min, 10);\n\n    if (newValue < min) {\n      input.value = min.toString();\n    } else if (newValue > max) {\n      input.value = max.toString();\n    } else {\n      input.value = newValue.toString();\n    }\n\n    // After setting a new value to the input, it might not be equal to `newValue` but instead\n    // `max` or `min`. If the final input value remains the same, there's no need to rerender and\n    // send an event.\n    const inputUpdatedValue = parseInt(input.value, 10);\n    if (inputUpdatedValue === oldValue) {\n      return;\n    }\n\n    this.value = inputUpdatedValue;\n\n    this.render();\n\n    const quantityChange =\n      new CustomEvent(\n        'quantity-input-changed', {\n          detail: {\n            quantity: inputUpdatedValue,\n            old_quantity: oldValue,\n            source: this.dataset.source || 'none',\n            variant_keys: this.dataset.variantKeys,\n            product_id: this.dataset.productId\n          },\n          bubbles: true\n        });\n    dispatchEvent(quantityChange);\n  }\n\n  private disableControls() {\n    const minusButton = this.shadowRoot.querySelector<HTMLButtonElement>('.minus-button');\n    minusButton.disabled = true;\n\n    const plusButton = this.shadowRoot.querySelector<HTMLButtonElement>('.plus-button');\n    plusButton.disabled = true;\n\n    const input = this.shadowRoot.querySelector('input');\n    input.disabled = true;\n  }\n\n  private render() {\n    const input = this.shadowRoot.querySelector('input');\n\n    input.ariaLabel = `Quantity ${input.value}`;\n\n    if (this.dataset.min && this.dataset.min !== input.min) {\n      input.setAttribute('min', this.dataset.min);\n    }\n\n    if (this.dataset.max && this.dataset.max !== input.max) {\n      input.setAttribute('max', this.dataset.max);\n    }\n\n    const minusButton = this.shadowRoot.querySelector<HTMLButtonElement>('.minus-button');\n    minusButton.disabled = input.value === input.min;\n\n    const plusButton = this.shadowRoot.querySelector<HTMLButtonElement>('.plus-button');\n    plusButton.disabled = input.value === input.max;\n  }\n}\n\ntype QuantityInputChangedEvent = CustomEvent<{\n  old_quantity: number;\n\n  /**\n   * Product ID, a stringified integer. Needed to distinguish to which product this event is related\n   */\n  product_id: string;\n  quantity: number;\n\n  /**\n   * The event firing source. We need that to distinguish events sending from a cart set item,\n   * cart regular product item, or a PDP.\n   */\n  source?: 'cart-set' | 'cart-variant' | 'pdp';\n\n  /**\n   * The list of line_item.key properties delimited by a comma from the Shopify liquid object.\n   * Could be a single line item key value if the line item is a regular product variant but not\n   * a set.\n   * (Ignore the line break in the example)\n   *\n   * @example \"41980707274803:83ce40615fdb0df94ae38ae310adf77d,40530477187123:053e0078de2c9659e0a\n   * 3d1c7a2145514,40530477613107:cc94938c3475ee097bac79ff2908d6e4\"\n   *\n   * @see https://shopify.dev/docs/api/liquid/objects/line_item#line_item-key\n   */\n  variant_keys?: string;\n}>;\n\ndeclare global {\n  interface WindowEventMap {\n    'quantity-input-changed': QuantityInputChangedEvent;\n  }\n\n  interface HTMLElementTagNameMap {\n    'quantity-input': QuantityInput;\n  }\n}\n\nif (!customElements.get('quantity-input')) {\n  customElements.define('quantity-input', QuantityInput);\n}\n","export default \":host{--side-size:3rem;border:1px solid #e6e7e8!important;border-radius:.125rem;box-sizing:initial;display:grid;font-size:1rem;grid-template-columns:repeat(3,var(--side-size));grid-template-rows:var(--side-size);text-align:center}button{background-color:#0000;border:none;border-radius:.125rem;cursor:pointer;padding:0;position:relative;transition-duration:.15s;transition-property:background-color}button:focus{outline:2px solid #000;outline-offset:1px}button:disabled{cursor:default}button:disabled:after,button:disabled:before{background-color:#e6e7e8}button:after,button:before{background-color:#000;content:\\\"\\\";height:.125rem;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:.75rem}button:after{transform:translate(-50%,-50%) rotate(90deg)}button.minus-button:after{content:none}input{appearance:none;-moz-appearance:textfield;background-color:#0000;border:none;font-family:inherit;font-size:inherit;padding:.5rem;text-align:inherit}input:focus{outline:2px solid #000;outline-offset:1px}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}\";","// Module\nvar code = \"<button type=\\\"button\\\" class=\\\"minus-button\\\"><span class=\\\"sr-only\\\">Decrease quantity by 1</span></button><input type=\\\"number\\\" name=\\\"quantity\\\" aria-label=\\\"Quantity\\\" min=\\\"1\\\" max=\\\"99\\\" value=\\\"1\\\"><button type=\\\"button\\\" class=\\\"plus-button\\\"><span class=\\\"sr-only\\\">Increase quantity by 1</span></button>\";\n// Exports\nexport default code;","export class SearchSortBy extends HTMLElement {\n  private selectElement: HTMLSelectElement;\n\n  constructor() {\n    super();\n  }\n\n  public connectedCallback() {\n    addEventListener('DOMContentLoaded', () => {\n      this.selectElement = document.querySelector('.main-search-sort__select');\n      this.selectElement.addEventListener('change', this.updateSearchURL.bind(this));\n      this.setInitialSelectedValue();\n    });\n  }\n\n  private setInitialSelectedValue() {\n    const params = new URLSearchParams(location.search);\n    if (params.has('sort_by')) {\n      this.selectElement.value = params.get('sort_by');\n    }\n  }\n\n  private updateSearchURL() {\n    const url = new URL(location.href);\n    const params = new URLSearchParams(url.search);\n    params.set('sort_by', this.selectElement.value);\n    url.search = params.toString();\n    location.href = url.href;\n  }\n}\n\nif (!customElements.get('search-sort-by')) {\n  customElements.define('search-sort-by', SearchSortBy);\n}\n","import type { CustomElement } from '@integrabeauty/custom-elements';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * Renders Tab component\n *\n * Accepts 2 slots tabs and content with equal number of elements\n */\nclass OfirTabs extends HTMLElement implements CustomElement {\n  public static get observedAttributes() {\n    return ['data-active-tab'];\n  }\n\n  readonly dataset!: {\n    /**\n     * The number of the currently active tab\n     */\n    activeTab: string;\n  };\n\n  public shadowRoot!: ShadowRoot;\n  private onTabClickedBound = this.onTabClicked.bind(this);\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    const tabs = this.getTabs();\n    if (!tabs.length) {\n      return;\n    }\n\n    for (const tab of tabs) {\n      tab.addEventListener('click', this.onTabClickedBound);\n    }\n\n    if (!this.dataset.activeTab) {\n      this.setActiveTab(0);\n      this.setActiveContent(0);\n    }\n  }\n\n  public disconnectedCallback() {\n    const tabs = this.getTabs();\n    for (const tab of tabs) {\n      tab.removeEventListener('click', this.onTabClickedBound);\n    }\n  }\n\n  public attributeChangedCallback(_name: string, _oldValue: string, newValue: string) {\n    if (!this.isConnected) {\n      return;\n    }\n\n    const activeIndex = parseInt(newValue, 10);\n    this.setActiveTab(activeIndex);\n    this.setActiveContent(activeIndex);\n  }\n\n  private onTabClicked(event: Event) {\n    const target = <HTMLElement>event.target;\n    const parentChildren = Array.from(target.parentElement.children);\n    const activeIndex = parentChildren.findIndex(child => child === target);\n\n    if (activeIndex === -1) {\n      return;\n    }\n\n    this.setActiveTab(activeIndex);\n    this.setActiveContent(activeIndex);\n  }\n\n  private getTabs() {\n    const tabsContainer = this.querySelector('[slot=\"tabs\"]');\n    // if splide carousel as tabs do not handle\n    if (!tabsContainer || tabsContainer.classList.contains('thumbs')) {\n      return [];\n    }\n\n    return Array.from(tabsContainer.children);\n  }\n\n  private getContentItems() {\n    // todo: this selector does not work for nested tabs, find better way to handle it\n    let content = this.querySelectorAll('[slot=\"content\"]:first-of-type > .content-item');\n    // if above variable empty that means we are in nested tab component and we have to use another\n    // selector\n    if (content.length === 0) {\n      content = this.querySelectorAll('[slot=\"content\"] > .content-item');\n    }\n\n    return content;\n  }\n\n  private setActiveTab(activeIndex: number) {\n    const tabs = this.getTabs();\n    if (!tabs.length) {\n      return;\n    }\n\n    for (const tab of tabs) {\n      tab.classList.remove('active');\n    }\n\n    tabs[activeIndex].classList.add('active');\n  }\n\n  private setActiveContent(activeIndex: number) {\n    const contentItems = this.getContentItems();\n\n    for (const contentItem of contentItems) {\n      contentItem.classList.remove('active');\n    }\n\n    if (contentItems.length > 0) {\n      contentItems.item(activeIndex).classList.add('active');\n    }\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'ofir-tabs': OfirTabs;\n  }\n}\n\nif (!customElements.get('ofir-tabs')) {\n  customElements.define('ofir-tabs', OfirTabs);\n}\n","export default \":host{display:flex;flex-direction:column;font-family:Poppins,sans-serif;margin-bottom:16px;position:relative;width:100%}@media screen and (min-width:1024px){:host{margin-bottom:32px}}:host(.reverse){flex-direction:column-reverse}\";","// Module\nvar code = \"<div class=\\\"header\\\"><slot name=\\\"tabs\\\"></slot></div><slot name=\\\"content\\\"></slot>\";\n// Exports\nexport default code;","import type { CustomElement } from '@integrabeauty/custom-elements';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * Video component with optional title and subtitle\n */\nexport class VideoInline extends HTMLElement implements CustomElement {\n  readonly dataset!: {\n    /**\n     * Video orientation\n     */\n    orientation: '18-7' | 'landscape' | 'portrait' | 'square';\n\n    /**\n     * Subtitle, optional\n     */\n    subtitle: string;\n\n    /**\n     * Title, optional\n     */\n    title: string;\n  };\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    this.render();\n  }\n\n  private render() {\n    const title = this.shadowRoot.querySelector('.title');\n    if (this.dataset.title) {\n      title.textContent = this.dataset.title;\n    } else {\n      title.remove();\n    }\n\n    const subtitle = this.shadowRoot.querySelector('.subtitle');\n    if (this.dataset.subtitle) {\n      subtitle.textContent = this.dataset.subtitle;\n    } else {\n      subtitle.remove();\n    }\n  }\n}\n\ncustomElements.define('video-inline', VideoInline);\n","export default \":host{aspect-ratio:2880/1120;display:flex;flex-direction:column-reverse;line-height:1;position:relative}:host([data-orientation=portrait]),:host([data-orientation=square]){margin:0 auto}@media only screen and (min-width:768px){:host([data-orientation=portrait]),:host([data-orientation=square]){margin:0 122px;width:calc(100% - 245px)}}@media only screen and (min-width:1024px){:host([data-orientation=portrait]),:host([data-orientation=square]){margin:0 auto;max-width:653px;padding-left:0;padding-right:0;width:100%}}:host([data-orientation=portrait]) .content,:host([data-orientation=square]) .content{padding-left:32px;padding-right:32px}@media only screen and (min-width:1024px){:host([data-orientation=portrait]) .content,:host([data-orientation=square]) .content{align-items:flex-start;flex:1 1 0%}}@media only screen and (min-width:1280px){:host([data-orientation=portrait]) .content,:host([data-orientation=square]) .content{max-width:653px}}:host([data-orientation=portrait]){aspect-ratio:9/16}:host([data-orientation=\\\"18-7\\\"]){aspect-ratio:18/7}:host([data-orientation=square]){aspect-ratio:1}::slotted(video){height:100%!important;left:0;object-fit:cover;position:absolute;top:0;width:100%}.content{align-items:center;display:flex;flex-direction:column;justify-content:center;left:50%;padding:24px 16px 16px;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:2}.title{font-size:1.5rem;font-weight:600;line-height:1.5rem;margin:0 0 8px}@media only screen and (min-width:1024px){.title{font-size:2rem;line-height:2rem}}.subtitle{font-size:1rem;font-weight:300;line-height:1rem;margin:0}@media only screen and (min-width:1024px){.subtitle{font-size:1.125rem;line-height:1.75rem}}\";","// Module\nvar code = \"<slot></slot><div class=\\\"content\\\"><h2 class=\\\"title\\\"></h2><p class=\\\"subtitle\\\"></p></div>\";\n// Exports\nexport default code;","import * as Klaviyo from 'klaviyo-subscribe';\n\ntype SubscribeParams = {\n  email: string;\n  listId: string;\n  name: string;\n  source: string;\n};\n\nexport async function subscribe(params: SubscribeParams) {\n  return Klaviyo.subscribe(params.listId || '', params.email, {\n    $first_name: params.name,\n    $email: params.email,\n    $source: params.source,\n    $fields: '$source'\n  });\n}\n","export function subscribe (listId, email, params = {}) {\n  const config = Object.assign({}, params, {\n    g: listId,\n    email\n  })\n\n  const body = Object.keys(config).reduce((str, key) => {\n    str.append(key, config[key])\n    return str\n  }, new URLSearchParams())\n\n  return fetch('https://manage.kmail-lists.com/ajax/subscriptions/subscribe', {\n    method: 'POST',\n    headers: {\n      \"Access-Control-Allow-Headers\": \"*\",\n      \"Content-Type\": \"application/x-www-form-urlencoded; charset=utf-8\"\n    },\n    body\n  }).then(res => res.json())\n}\n","import JustValidate, { Rules } from 'just-validate';\nimport * as KlaviyoService from '../../common/services/klaviyo-service';\nimport html from './index.html';\nimport styles from './index.scss';\n\n/**\n * A custom element for displaying a banner with email subscription sign-up form.\n */\nclass SignUpBanner extends HTMLElement {\n  private onFormSubmittedBound = this.onFormSubmitted.bind(this);\n  private validator: JustValidate;\n  public shadowRoot!: ShadowRoot;\n\n  public constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    this.initValidator();\n\n    const form = this.shadowRoot.querySelector('form');\n    form.addEventListener('submit', this.onFormSubmittedBound);\n  }\n\n  public disconnectedCallback() {\n    this.validator.destroy();\n\n    const form = this.shadowRoot.querySelector('form');\n    form.removeEventListener('submit', this.onFormSubmittedBound);\n  }\n\n  private onFormSubmitted(event: Event) {\n    event.preventDefault();\n    this.submitForm().catch(console.error);\n  }\n\n  private async submitForm() {\n    const form = this.shadowRoot.querySelector('form');\n    const button = form.querySelector('button');\n    const message = this.shadowRoot.querySelector<HTMLElement>('.message');\n    message.hidden = true;\n\n    const isValid = await this.validator.revalidate();\n    if (!isValid) {\n      return;\n    }\n\n    button.disabled = true;\n\n    try {\n      const input = form.querySelector('input');\n      const email = input.value;\n\n      const result = await KlaviyoService.subscribe({\n        listId: 'XaetUh',\n        email,\n        name: '',\n        source: 'signup_banner'\n      });\n      if (result.success) {\n        message.textContent = 'You\\'re in!';\n        message.classList.add('success');\n      } else {\n        message.textContent = `An error occurred while signing up for newsletter. Please try again\n            later!`;\n        message.classList.add('error');\n      }\n    } catch (error) {\n      console.error(error);\n      message.textContent = `An error occurred while signing up for newsletter and text marketing\n          messages. Please try again later!`;\n\n      message.classList.add('error');\n    } finally {\n      button.disabled = false;\n      message.hidden = false;\n      form.hidden = true;\n    }\n  }\n\n  private initValidator() {\n    const form = this.shadowRoot.querySelector('form');\n    this.validator = new JustValidate(form, {\n      errorFieldCssClass: 'invalid',\n      successFieldCssClass: 'success',\n      errorLabelCssClass: 'error-label',\n      lockForm: true\n    });\n\n    this.validator.addField('input[type=\"email\"]', [\n      {\n        rule: <Rules.Required>'required',\n        errorMessage: 'Email Address is required'\n      },\n      {\n        rule: <Rules.Email>'email',\n        errorMessage: 'Email Address is invalid'\n      }\n    ]);\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'sign-up-banner': SignUpBanner;\n  }\n}\n\nif (!customElements.get('sign-up-banner')) {\n  customElements.define('sign-up-banner', SignUpBanner);\n}\n","export default \":host{align-items:center;color:#000;display:flex;flex-direction:column;justify-content:center;padding:64px 16px;position:relative;text-align:center}@media only screen and (min-width:768px){:host{min-height:min(100vh - 80px,720px);padding:100px 40px 80px}}slot[name=image]{bottom:0;display:block;left:0;position:absolute;right:0;top:0;z-index:-1}::slotted([slot=image]){height:100%!important;object-fit:cover;object-position:center;width:100%}.suptitle{font-family:Gilda Display,serif;font-size:1.25rem;font-weight:400;line-height:1;margin-bottom:18px;margin-top:0;max-width:27em;text-transform:uppercase}@media only screen and (min-width:768px){.suptitle{font-size:1.875rem}}.title{font-family:Gilda Display,serif;font-size:2.825rem;font-style:normal;font-weight:400;line-height:1.1;margin-bottom:24px;margin-top:0;max-width:23em;text-transform:uppercase}@media only screen and (min-width:768px){.title{font-size:3.125rem;margin-bottom:43px}}.form-title,.message{font-size:1.125rem;font-weight:600;line-height:1.35;margin:0 auto 28px;max-width:25em}@media only screen and (min-width:768px){.form-title,.message{font-size:1.375rem}}form{max-width:400px;position:relative;width:100%}@media only screen and (min-width:768px){form{max-width:684px}.form-row{display:flex}}input{background-color:#fff;border:1px solid #fff;border-radius:4px;box-sizing:border-box;display:block;flex-grow:1;font-family:inherit;font-size:inherit;line-height:46px;margin-bottom:14px;padding:0 10px;width:100%}@media only screen and (min-width:768px){input{border-bottom-right-radius:0;border-top-right-radius:0;margin-bottom:0}}input::placeholder{color:#83888c}.invalid{border-color:#d50407}button{align-items:center;background-color:#000;border:1px solid #000;border-radius:0;color:#fff;cursor:pointer;display:inline-flex;font-family:Poppins,sans-serif;font-size:1rem;font-weight:600;height:48px;justify-content:center;letter-spacing:.16em;line-height:1;padding:10px 16px;text-align:center;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);white-space:nowrap;width:100%}button:active,button:hover{background-color:#333;border-color:#333}button:focus{outline:2px solid #000;outline-offset:1px}button:disabled,button[disabled]{background-color:#e6e7e8;border-color:#e6e7e8;color:#83888c;pointer-events:none}.error-label{color:#d50407!important;font-weight:600;left:0;padding-top:8px;position:absolute;right:0;text-align:left;top:100%}.message{margin-bottom:0;margin-top:14px}.error{color:#d50407}.visually-hidden{height:1px;overflow:hidden;position:absolute;width:1px;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);white-space:nowrap}\";","// Module\nvar code = \"<slot name=\\\"image\\\"></slot><p class=\\\"suptitle\\\"><slot name=\\\"suptitle\\\"></slot></p><h1 class=\\\"title\\\"><slot name=\\\"title\\\"></slot></h1><form><p class=\\\"form-title\\\"><slot name=\\\"form-title\\\"></slot></p><div class=\\\"form-row\\\"><label for=\\\"email\\\" class=\\\"visually-hidden\\\">Your Email Address</label><input id=\\\"email\\\" type=\\\"email\\\" name=\\\"email\\\" placeholder=\\\"Your Email Address\\\" required><button>Get on the list</button></div></form><div class=\\\"message\\\" hidden></div>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\n/**\n * A custom web component for displaying product card on PLP, predictable search, in product\n * carousels, etc.\n */\nclass ProductCard extends HTMLElement {\n  readonly dataset: {\n    /**\n     * Initial value for the top badge.\n     *\n     * For products that don't have the variant selector and have a top badge, this value will be\n     * used. For products with variant selector, the top badge will be updated based on the selected\n     * variant by initial variant-changed event.\n     */\n    initTopBadge: string;\n\n    /**\n     * Initial style for the top badge.\n     */\n    initTopBadgeStyle: string;\n\n    /**\n     * Boolean represented as string, whether the product is an upsell product\n     */\n    isUpsell: 'false' | 'true';\n\n    /**\n     * Defines the size variant for the component\n     */\n    size: 'default' | 'small';\n\n    /**\n     * Defines the style variant for the component\n     */\n    styleVariant: 'upsell';\n\n    /**\n     * A concatenated string of all tags\n     */\n    upsellTags: string;\n\n    /**\n     * Product url without variant\n     */\n    url: string;\n  };\n\n  public shadowRoot!: ShadowRoot;\n\n  private onVariantChangedBound = this.onVariantChanged.bind(this);\n\n  public constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    if (this.dataset.initTopBadge) {\n      const topBadge = this.shadowRoot.querySelector('product-top-badge');\n      topBadge.dataset.value = this.dataset.initTopBadge;\n      topBadge.dataset.style = this.dataset.initTopBadgeStyle || 'default';\n    }\n\n    this.addEventListener('variant-changed', this.onVariantChangedBound);\n  }\n\n  public disconnectedCallback() {\n    this.removeEventListener('variant-changed', this.onVariantChangedBound);\n  }\n\n  private onVariantChanged(event: WindowEventMap['variant-changed']) {\n    const variantImages = this.querySelectorAll<HTMLElement>('picture');\n\n    // update image\n    for (const image of variantImages) {\n      if (image.classList.contains(`${ event.detail.variant.id }`)) {\n        image.classList.remove('hidden');\n      } else {\n        image.classList.add('hidden');\n      }\n    }\n\n    // update urls\n    const variantUrl = `${ this.dataset.url }?variant=${ event.detail.variant.id }`;\n    const selector = 'a[slot=\"title\"], a[slot=\"action\"]';\n    const productLinks = this.querySelectorAll<HTMLAnchorElement>(selector);\n    for (const productLink of productLinks) {\n      productLink.setAttribute('href', variantUrl);\n    }\n\n    const clickableArea = this.querySelector('clickable-area');\n    clickableArea.dataset.url = variantUrl;\n\n    // update top badge\n    const topBadge = this.shadowRoot.querySelector('product-top-badge');\n    topBadge.dataset.value = event.detail.variant.topBadge;\n    topBadge.dataset.style = event.detail.variant.topBadgeStyle;\n\n    if (this.dataset.isUpsell === 'true') {\n      type UpsellPrice = HTMLElementTagNameMap['upsell-price'];\n      const upsellPrice = this.querySelector<UpsellPrice>('upsell-price');\n      if (upsellPrice) {\n        upsellPrice.dataset.price = event.detail.variant.price.toString();\n      }\n    } else {\n      // update price\n      const priceElement = this.querySelector('.product-card-final-price');\n      const previousValue = priceElement.textContent || '';\n      priceElement.textContent =\n        previousValue.replace(/\\d+/g, (event.detail.variant.price / 100).toFixed(0));\n\n      // update compare at price\n      const compareAtPriceElement = this.querySelector('.price__compare-at');\n      compareAtPriceElement.textContent = event.detail.variant.compareAtPrice || '';\n\n      // create a compare at price info button if needed\n      if (event.detail.variant.compareAtPriceModalContent) {\n        const compareAtPriceInfo = document.createElement('compare-at-price-info');\n        compareAtPriceInfo.dataset.content = event.detail.variant.compareAtPriceModalContent;\n        compareAtPriceElement.appendChild(compareAtPriceInfo);\n      }\n\n      // update discount message\n      const discountMessage = this.querySelector('discount-message');\n      if (discountMessage) {\n        discountMessage.dataset.message = event.detail.variant.discountMessage;\n      }\n    }\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'product-card': ProductCard;\n  }\n}\n\nif (!customElements.get('product-card')) {\n  customElements.define('product-card', ProductCard);\n}\n","export default \":host{display:flex;flex-direction:column;height:100%;position:relative;width:100%}:host([data-size=small]) .title{font-size:1rem}:host([data-size=small]) ::slotted([slot=subtitle]){font-size:.875rem}:host([data-size=small]) ::slotted([slot=discount-message]){font-size:.75rem;line-height:1.3;padding:6px 12px}:host([data-size=small]) ::slotted([slot=action]){font-size:.875rem!important;min-height:36px!important}:host([data-size=small]) ::slotted(.cta[slot=action]){height:36px!important}:host([data-is-upsell=true]){background-color:#fff;padding:0 10px 12px}:host([data-is-upsell=true]) .title{font-size:1rem;margin-top:8px}:host([data-is-upsell=true]) ::slotted([slot=subtitle]){font-size:.75rem}:host([data-is-upsell=true]) slot[name=price]{order:-2}:host([data-is-upsell=true]) ::slotted([slot=price]){margin-bottom:8px}:host([data-is-upsell=true]) slot[name=discount-message]{margin-bottom:8px;order:-1}:host([data-is-upsell=true]) ::slotted([slot=discount-message]){font-size:.75rem;line-height:1.3;padding:0;text-align:left}:host([data-is-upsell=true]) ::slotted([slot=action]){font-size:.875rem!important;min-height:36px!important}:host([data-is-upsell=true]) ::slotted(.cta[slot=action]){height:36px!important}slot{display:block}slot[name=image]{margin-left:auto;margin-right:auto}.title{font-size:1rem;font-weight:600;letter-spacing:.07em;line-height:1;margin-bottom:4px;text-transform:uppercase}@media only screen and (min-width:1280px){.title{font-size:1.375rem}}::slotted([slot=subtitle]){font-size:.75rem;letter-spacing:.07em;line-height:1.5;margin-bottom:8px!important;text-transform:uppercase}@media only screen and (min-width:1280px){::slotted([slot=subtitle]){font-size:.875rem}}::slotted([slot=rating]){display:block;margin-bottom:18px}product-top-badge{left:0;position:absolute;top:18px}@media only screen and (min-width:768px){product-top-badge{top:30px}}::slotted([slot=price]){margin-bottom:12px}footer{display:flex;flex-direction:column;flex-grow:1}::slotted([slot=discount-message]){font-size:.75rem;margin-bottom:14px;padding:8px 10px}@media only screen and (min-width:768px){::slotted([slot=discount-message]){font-size:1rem;padding-bottom:20px;padding-top:20px}}slot[name=variant-selector]{flex-grow:1}::slotted([slot=variant-selector]){margin-bottom:22px}slot[name=action]{font-size:.75rem;margin-top:auto}::slotted([slot=action]){font-size:.875rem}@media only screen and (min-width:768px){::slotted([slot=action]){font-size:1rem}}\";","// Module\nvar code = \"<slot name=\\\"image\\\"></slot><h3 class=\\\"title\\\"><slot name=\\\"title\\\"></slot></h3><slot name=\\\"subtitle\\\"></slot><slot name=\\\"rating\\\"></slot><product-top-badge></product-top-badge><footer><slot name=\\\"price\\\"></slot><slot name=\\\"variant-selector\\\"></slot><slot name=\\\"discount-message\\\"></slot><slot name=\\\"action\\\"></slot></footer>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\n/**\n * A custom element that handles image change on hover.\n */\nclass HoverableImage extends HTMLElement {\n  public shadowRoot!: ShadowRoot;\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'hoverable-image': HoverableImage;\n  }\n}\n\nif (!customElements.get('hoverable-image')) {\n  customElements.define('hoverable-image', HoverableImage);\n}\n","export default \":host{display:block}slot[name=hover-image]{display:none}:host(:hover) slot{display:none}:host(:hover) slot[name=hover-image]{display:block}\";","// Module\nvar code = \"<slot></slot><slot name=\\\"hover-image\\\"></slot>\";\n// Exports\nexport default code;","import * as KlaviyoService from '../../common/services/klaviyo-service';\n\n/**\n * Represents a custom HTML element for a registration form that integrates subscription\n * handling for email marketing consent and user account registration.\n *\n * Our registration form includes a checkbox for email subscription consent. When a user registers,\n * we need to subscribe them to emails immediately. Unfortunately, we can't use the built-in\n * Klaviyo-Shopify integration because it doesn't support adding a custom \"source\" field.\n */\nexport class RegistrationForm extends HTMLElement {\n  public shadowRoot!: ShadowRoot;\n\n  constructor() {\n    super();\n  }\n\n  public connectedCallback() {\n    const form = this.querySelector('form');\n    form.addEventListener('submit', onFormSubmitted);\n  }\n\n  public disconnectedCallback() {\n    const form = this.querySelector('form');\n    form.removeEventListener('submit', onFormSubmitted);\n  }\n}\n\nfunction onFormSubmitted(event: Event) {\n  const form = <HTMLFormElement>event.target;\n  const subscriptionCheckbox = form.querySelector<HTMLInputElement>('#email-marketing-consent');\n\n  if (!subscriptionCheckbox?.checked) {\n    return;\n  }\n\n  event.preventDefault();\n\n  const emailInput = form.querySelector<HTMLInputElement>('#register-form-email');\n  const email = emailInput ? emailInput.value : '';\n\n  const firstNameInput = form.querySelector<HTMLInputElement>('#register-form-firstname');\n  const lastNameInput = form.querySelector<HTMLInputElement>('#register-form-lastname');\n  const firstName = firstNameInput ? firstNameInput.value : '';\n  const lastName = lastNameInput ? lastNameInput.value : '';\n\n  const name = `${firstName}${lastName ? ` ${lastName}` : ''}`;\n\n  KlaviyoService.subscribe({\n    email,\n    listId: 'Y36k8y',\n    name,\n    source: 'account_checkbox'\n  })\n    .then(result => {\n      if (!result.success) {\n        console.error('Subscription attempt by registration failed.');\n      }\n    })\n    .catch(error => {\n      console.error('Subscription attempt by registration failed.', error);\n    })\n    .finally(() => {\n      // No matter what happens with the subscription, the user must be registered.\n      form.submit();\n    });\n}\n\nif (!customElements.get('registration-form')) {\n  customElements.define('registration-form', RegistrationForm);\n}\n","import html from './index.html';\nimport styles from './index.scss';\n\n/**\n * A custom element that handles accordion functionality. Accordion items should be passed\n * as <accordion-item> elements into the default slot.\n */\nclass AccordionElement extends HTMLElement {\n  public shadowRoot!: ShadowRoot;\n\n  private onAccordionItemHeaderClickedBound = this.onAccordionItemHeaderClicked.bind(this);\n\n  public constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    this.addEventListener('accordion-item-header-clicked', this.onAccordionItemHeaderClickedBound);\n  }\n\n  public disconnectedCallback() {\n    this.removeEventListener('accordion-item-header-clicked',\n      this.onAccordionItemHeaderClickedBound);\n  }\n\n  private onAccordionItemHeaderClicked(event: Event) {\n    type AccordionItem = HTMLElementTagNameMap['accordion-item'];\n\n    const currentlyActiveItem =\n      this.querySelector<AccordionItem>('accordion-item[data-expanded=\"true\"]');\n    if (currentlyActiveItem) {\n      currentlyActiveItem.dataset.expanded = 'false';\n    }\n\n    const clickedItem = <AccordionItem>event.target;\n    if (clickedItem === currentlyActiveItem) {\n      return;\n    }\n\n    clickedItem.dataset.expanded = 'true';\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'accordion-element': AccordionElement;\n  }\n}\n\nif (!customElements.get('accordion-element')) {\n  customElements.define('accordion-element', AccordionElement);\n}\n","export default \":host{display:block}::slotted(accordion-item){margin-bottom:-1px}::slotted(accordion-item:last-child){margin-bottom:0}\";","// Module\nvar code = \"<slot></slot>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\n/**\n * A custom element representing a single item in an accordion component.\n *\n * The AccordionItem component manages an `expanded` state through the `data-expanded` attribute\n * and emits a custom event when its header is clicked. The parent <accordion-element> element\n * controls which item should be expanded/collapsed by setting the `data-expanded` attribute.\n */\nclass AccordionItem extends HTMLElement {\n  public static get observedAttributes() {\n    return [\n      'data-expanded'\n    ];\n  }\n\n  readonly dataset!: {\n    /**\n     * Whether the component is expanded/collapsed.\n     */\n    expanded: 'false' | 'true';\n  };\n\n  public shadowRoot!: ShadowRoot;\n\n  private onHeaderClickedBound = this.onHeaderClicked.bind(this);\n\n  public constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n  }\n\n  public connectedCallback() {\n    const button = this.shadowRoot.querySelector('button');\n    button.addEventListener('click', this.onHeaderClickedBound);\n  }\n\n  public disconnectedCallback() {\n    const button = this.shadowRoot.querySelector('button');\n    button.removeEventListener('click', this.onHeaderClickedBound);\n  }\n\n  public attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n    if (!this.isConnected || name !== 'data-expanded' || newValue === oldValue) {\n      return;\n    }\n\n    const button = this.shadowRoot.querySelector('button');\n    button.setAttribute('aria-expanded', this.dataset.expanded);\n  }\n\n  private onHeaderClicked(_event: Event) {\n    const event = new CustomEvent('accordion-item-header-clicked', {\n      cancelable: false,\n      bubbles: true\n    });\n    this.dispatchEvent(event);\n  }\n}\n\ndeclare global {\n  interface WindowEventMap {\n    'accordion-item-header-clicked': CustomEvent;\n  }\n\n  interface HTMLElementTagNameMap {\n    'accordion-item': AccordionItem;\n  }\n}\n\nif (!customElements.get('accordion-item')) {\n  customElements.define('accordion-item', AccordionItem);\n}\n","export default \":host{border:1px solid #dbdbdb;display:block;width:100%}:host([data-expanded=true]) .icon{transform:rotate(180deg)}:host([data-expanded=true]) .content{max-height:9999px;transition-delay:.4s;transition-duration:.4s;transition-timing-function:cubic-bezier(.5,0,1,0)}button{align-items:center;appearance:none;background:none;border:none;color:inherit;cursor:pointer;display:flex;font:inherit;font-size:1.125rem;font-weight:600;height:auto;justify-content:space-between;letter-spacing:.07em;line-height:1.3333;margin:0;outline:none;padding:11px 27px 11px 18px;text-transform:uppercase;width:100%}button:focus{outline:2px solid #000;outline-offset:1px}button:hover .icon:after,button:hover .icon:before{background-color:#b66c6d}.icon{background-image:url(\\\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%231e1e1e' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9.673 6 6 6-6'/%3E%3C/svg%3E\\\");background-position:50%;background-repeat:no-repeat;background-size:contain;color:#0000;display:block;height:24px;position:relative;width:24px}.content{font-size:.875rem;max-height:0;overflow:hidden;transition-duration:.4s;transition-property:max-height;transition-timing-function:cubic-bezier(0,1,0,1)}@media only screen and (min-width:768px){.content{font-size:1rem}}slot[name=content]{display:block;padding:16px}\";","// Module\nvar code = \"<button aria-expanded=\\\"false\\\" aria-controls=\\\"content\\\"><slot name=\\\"title\\\"></slot><span class=\\\"icon\\\" aria-hidden=\\\"true\\\"></span></button><div id=\\\"content\\\" class=\\\"content\\\" role=\\\"region\\\"><slot name=\\\"content\\\"></slot></div>\";\n// Exports\nexport default code;","import html from './index.html';\nimport styles from './index.scss';\n\n/**\n * A custom HTML element that displays a product variant's discount message. It observes the\n * 'data-message' attribute and updates the rendered message accordingly when the attribute changes.\n */\nclass DiscountMessage extends HTMLElement {\n  static get observedAttributes() {\n    return [\n      'data-message'\n    ];\n  }\n\n  public dataset!: {\n    /**\n     * Discount offer message\n     */\n    message: string;\n  };\n\n  public shadowRoot!: ShadowRoot;\n\n  constructor() {\n    super();\n    this.attachShadow({ mode: 'open' });\n    this.shadowRoot.innerHTML = `<style>${styles}</style>${html}`;\n    this.render();\n  }\n\n  public attributeChangedCallback(name: string, _oldValue: string, _newValue: string) {\n    if (!this.isConnected || name !== 'data-message') {\n      return;\n    }\n\n    this.render();\n  }\n\n  private render() {\n    const message = this.shadowRoot.querySelector<HTMLElement>('.message');\n    message.innerHTML = this.dataset.message;\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'discount-message': DiscountMessage;\n  }\n}\n\nif (!customElements.get('discount-message')) {\n  customElements.define('discount-message', DiscountMessage);\n}\n","export default \":host{background-color:#f5f5f5;border-radius:2px;display:block;font-size:.875rem;font-weight:600;padding:10px 20px;text-align:center;width:100%}@media screen and (min-width:768px){:host{font-size:1rem;padding-bottom:12px;padding-top:12px}}:host(:not([data-message])),:host([data-message=\\\"\\\"]){display:none}b,strong{font-weight:600}.message:empty{display:none}\";","// Module\nvar code = \"<div class=\\\"message\\\"></div>\";\n// Exports\nexport default code;"],"names":["AddToCartProduct","HTMLElement","customElements","get","define","AddToCartSet","VariantSelectorOption","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","timerId","startCall","_window$Sentry","window","console","error","_len","arguments","length","args","Array","_key","Sentry","captureException","Error","extra","level","setTimeout","endCall","event","CustomEvent","cancelable","dispatchEvent","notifyView","didTimeOut","clearTimeout","warn","detail","is_timeout","notify_view","__ofir","_window$__ofir","Cart","_window$__ofir2","Checkout","_window$__ofir3","Collection","_window$__ofir4","Customer","_window$__ofir5","GiftCard","_window$__ofir6","Order","_window$__ofir7","Page","_window$__ofir8","Pagination","_window$__ofir9","Product","_window$__ofir0","Request","_window$__ofir1","Scripts","_window$__ofir10","Search","_window$__ofir11","SearchEngineListing","_window$__ofir12","SectionSettings","_window$__ofir13","Shop","Template","_window$__ofir14","_window$__ofir15","Theme","_window$__ofir16","ThemeSettings","loadCartModal","cartLinkElement","document","getElementById","cartModalElement","modalContentElement","querySelector","closeModalElement","addEventListener","openModal","async","emitStartStop","CallUtils","response","cart","fetch","method","headers","ok","concat","status","statusText","url","json","source","CartService","then","items","viewCartEvent","catch","preventDefault","toggleSlideAnimation","contains","target","stopPropagation","classList","toggle","add","documentElement","setAttribute","closeModal","remove","cartModalOpenedEvent","attachToggleHandlers","variantToggles","querySelectorAll","onToggleClicked","element","currentTarget","targetId","getAttribute","toggleTarget","textContent","addToCart","payload","lineItems","addedItems","_lineItems$sections","body","JSON","stringify","_extends","sections","addedVariantIds","map","i","id","item","indexOf","variant_id","addedItem","find","push","quantity","customEvent","modal_cart","success","html","createElement","innerHTML","cartContentElement","LiquidGlobals","name","cartCount","replace","cartCounterElement","parseInt","cartPageElement","ToggleSubLineItems","ModalCart","updateCartHtml","error_code","error_message","LiquidGlobal","AddToCart","constructor","super","onAddToCartClickedBound","this","onAddToCartClicked","bind","onVariantChangedBound","onVariantChanged","onQuantityChangedBound","onQuantityChanged","attachShadow","mode","shadowRoot","connectedCallback","updateAvailability","disconnectedCallback","removeEventListener","_event","button","disabled","dataset","isSet","composeSetProductPayload","isUpsell","composeUpsellProductPayload","composeRegularProductPayload","finally","product_id","product","selectedVariantId","sellingPlan","getSellingPlan","selling_plan","properties","products","variantIds","setPropertiesElement","imageUrl","compareAtPrice","price","_set_variant_ids","join","variantQuantities","variantId","available","productId","setIndex","variant","selector","toString","notifyMe","unavailableProduct","hidden","subscribeCheckbox","checked","selectedRadioElement","value","NotifyMeButton","onButtonClickedBound","onButtonClicked","notifyMeModal","open","modalContent","update","Date","now","AlertElement","observedAttributes","onCloseClickedBound","onCloseClicked","timer","OfirBeforeAfter","onRangeInputBound","onRangeInput","singleImage","image","beforeLabel","afterLabel","draggableSeparator","imageBefore","overlay","label","imageAfter","log","separator","dragHandler","dragHandlerWidth","getComputedStyle","width","style","left","OfirBenefits","onOpenClickedBound","onOpenClicked","openElement","openSign","a11y","ClickableArea","onClickedBound","onClicked","clickable","location","href","CountdownTimer","circumference","timeItemMap","render","restartTimer","attributeChangedCallback","_oldValue","newValue","renderTitle","endTime","nowTime","show","hide","startTime","isHidden","renderTimeItem","Math","floor","title","maxValue","timeItemEl","content","cloneNode","timeEl","prevDash","prevValue","progressBarTrackEl","valueEl","appendChild","updateTime","remaining","endingMs","currentMs","timeRemainingSeconds","days","hours","minutes","seconds","getTimeRemaining","timeItemId","timeItemValue","Object","entries","updateTimeItem","newDash","clearInterval","setInterval","display","OfirModal","hideModalBound","hideModal","_name","oldValue","isConnected","overflow","__defProp","defineProperty","__publicField","obj","key","__defNormalProp","enumerable","configurable","writable","EMAIL_REGEXP","INTEGER_REGEXP","PASSWORD_REGEXP","STRONG_PASSWORD_REGEXP","isInvalidOrEmptyString","Rules","Rules2","GroupRules","GroupRules2","CustomStyleTagIds","CustomStyleTagIds2","defaultDictionary","Required","dict","en","Email","MaxLength","MinLength","Password","StrongPassword","Number","MaxNumber","MinNumber","MinFilesCount","MaxFilesCount","Files","isPromise","val","getClassList","isArray","filter","cls","trim","_toConsumableArray","split","isElement","Element","HTMLDocument","defaultGlobalConfig","errorFieldStyle","color","border","errorFieldCssClass","successFieldCssClass","errorLabelStyle","errorLabelCssClass","successLabelCssClass","focusInvalidField","lockForm","testingMode","validateBeforeSubmitting","submitFormAutomatically","JustValidate","form","globalConfig","dictLocale","Map","field","fieldIds","fieldSelector","k","fields","keys","forEach","newKey","getFieldSelectorByKey","has","String","size","set","tooltips","refresh","lastScrollPosition","scrollY","isScrollTick","requestAnimationFrame","refreshAllTooltips","ev","isSubmitted","validateHandler","foundKey","elem","touched","validateField","groupFields","elems","validateGroup","handleFieldChange","handleGroupChange","renderErrors","initialize","errors","isValid","errorLabels","successLabels","eventListeners","customStyleTags","currentLocale","setForm","HTMLFormElement","isTooltip","styleTag","Label","head","addListener","handleDocumentScroll","getLocalisedString","rule","ruleValue","customMsg","_a","search","localisedStr","getFieldErrorMessage","fieldRule","msg","errorMessage","getElemValue","getFieldSuccessMessage","successMessage","getGroupErrorMessage","groupRule","getGroupSuccessMessage","setFieldInvalid","setFieldValid","setGroupInvalid","setGroupValid","type","files","validateGroupRule","every","validateFieldRule","afterInputChanged","elemValue","plugin","getCompatibleFields","newVal","isEmpty","test","isLengthMoreThanMax","len","isLengthLessThanMin","isPassword","isStrongPassword","isNaN","parseFloat","isNumber","Integer","isInteger","num","isNumberMoreThanMax","isNumberLessThanMin","CustomRegexp","regexp","RegExp","e","str","isFinite","filesConfig","isFilePropsInvalid","file","fileConfig","minSizeInvalid","minSize","maxSizeInvalid","maxSize","nameInvalid","names","includes","extInvalid","extensions","typeInvalid","types","fileIdx","validator","result","asyncCheckPending","promise","resp","isFormValid","values","promises","rules","reverse","res","config","Promise","allSettled","_a2","onValidateCallback","call","groups","revalidateField","getKeyByFieldSelector","resolve","clearFieldStyle","clearFieldLabel","renderFieldError","reject","revalidateGroup","groupSelector","renderGroupError","group","focus","afterSubmitValidation","forceRevalidation","validate","revalidate","_b","_c","unlockForm","onSuccessCallback","submit","onFailCallback","removeListener","formSubmitHandler","handler","func","addField","setKeyByFieldSelector","setListeners","removeField","getListenerType","handlerChange","clearErrors","removeGroup","addRequiredGroup","groupField","inputs","childrenInputs","from","input","parent","getClosestParent","parents","reversedParents","groupElem","el","els","unshift","parentNode","getNodeParents","elem2","_field$elem$classList","_d","errorStyle","key2","successStyle","successFieldStyle","apply","_elem$classList","_elem$classList2","tooltip","pointerEvents","webkitFilter","removeAttribute","renderTooltip","errorLabel","position","top","height","getBoundingClientRect","errorLabelRect","pos","direction","createErrorLabelElem","_errorLabel$classList","customErrorLabelStyle","assign","testId","createSuccessLabelElem","_successLabel$classLi","successLabel","customSuccessLabelStyle","successLabelStyle","renderErrorsContainer","errorsContainer","container","renderGroupLabel","isSuccess","renderFieldLabel","_e","_f","_g","labelElem","parentElement","tagName","toLowerCase","showLabels","isError","fieldName","showErrors","showSuccessLabels","forced","message","_field$elem$classList3","_field$elem$classList2","force","_elem$classList3","_b2","_elem$classList4","destroy","setCurrentLocale","locale","onSuccess","callback","onFail","onValidate","NotifyMeModal","onContinueButtonClickedBound","onContinueButtonClicked","onValidationSucceedBound","onValidationSucceed","emailInput","userEmail","userTraits","ajsUserTraits","traits","_localStorage","localStorage","getItem","parse","readAJSUserTraits","email","getUserEmail","initForm","continueButtons","continueButton","validation","resetForm","modal","sendForm","subscriptionStatus","BIS","create","BackInStockService","base","dispatch","product_url","pathname","_body$errors","_body$errors2","_window$Sentry2","handleEmailSubscribe","innerText","ProductRatingStars","onDOMContentLoadedBound","onDOMContentLoaded","formatter","Intl","NumberFormat","onClick","_newValue","count","rating","average","renderStars","format","stars","star","state","diff","productReviewsElement","scrollIntoView","behavior","OfirProductStep","imageElem","src","imageSrc","alt","step","description","OfirProductSteps","VariantSelector","onInputChangedBound","onInputChanged","onExpandButtonClickedBound","onExpandButtonClicked","onSlotChangeBound","onSlotChange","expandButton","assignedElements","onSlotReady","_parseInt","_initialVariant$datas","_initialVariant$datas2","_initialVariant$datas3","_initialVariant$datas4","initSelectedVariantId","initialVariant","variantOptions","options","variantOption","captureMessage","variantChangedEvent","bubbles","initial","coming_soon","option","compareAtPriceModalContent","getVariantColor","backgroundClass","discountMessage","topBadge","topBadgeStyle","_parseInt2","_variant$dataset$imag","_variant$dataset$topB","_variant$dataset$topB2","optionsFragment","createDocumentFragment","labelHtml","isGiftCard","removeDecimals","badge","_variant$dataset$badg","badgeStyleClass","badgeStyle","optionsContainer","expandable","titleElement","titleFormat","checkedInput","selectedVariant","sheet","cssRules","escapedBackgroundClass","CSSStyleRule","selectorText","backgroundColor","priceString","QuantityInput","onQuantityDecreasedBound","onQuantityDecreased","onQuantityIncreasedBound","onQuantityIncreased","onCartUpdateStartedBound","onCartUpdateStarted","isInCartItem","initValue","closest","setInputValue","disableControls","max","min","inputUpdatedValue","quantityChange","old_quantity","variant_keys","variantKeys","ariaLabel","SearchSortBy","selectElement","updateSearchURL","setInitialSelectedValue","params","URLSearchParams","URL","OfirTabs","onTabClickedBound","onTabClicked","tabs","getTabs","tab","activeTab","setActiveTab","setActiveContent","activeIndex","children","findIndex","child","tabsContainer","getContentItems","contentItems","contentItem","VideoInline","subtitle","subscribe","t","n","r","g","s","reduce","append","Klaviyo","listId","$first_name","$email","$source","$fields","SignUpBanner","onFormSubmittedBound","onFormSubmitted","initValidator","submitForm","KlaviyoService","ProductCard","initTopBadge","initTopBadgeStyle","variantImages","variantUrl","productLinks","productLink","upsellPrice","priceElement","previousValue","toFixed","compareAtPriceElement","compareAtPriceInfo","HoverableImage","RegistrationForm","subscriptionCheckbox","firstNameInput","lastNameInput","firstName","lastName","AccordionElement","onAccordionItemHeaderClickedBound","onAccordionItemHeaderClicked","currentlyActiveItem","expanded","clickedItem","AccordionItem","onHeaderClickedBound","onHeaderClicked","DiscountMessage"],"sourceRoot":""}