{
  "version": 3,
  "sources": ["/cdn/shop/t/36/assets/component-cart-items.js?x=1"],
  "sourcesContent": ["import { Component } from '@theme/component';\nimport {\n  fetchConfig,\n  debounce,\n  onAnimationEnd,\n  prefersReducedMotion,\n  resetShimmer,\n  startViewTransition,\n} from '@theme/utilities';\nimport { morphSection, sectionRenderer } from '@theme/section-renderer';\nimport { ThemeEvents, QuantitySelectorUpdateEvent } from '@theme/events';\nimport { cartPerformance } from '@theme/performance';\nimport {\n  createViewEventElement,\n  CartErrorEvent,\n  CartDiscountUpdateEvent,\n  CartLinesUpdateEvent,\n  CartNoteUpdateEvent,\n  StandardEvents,\n} from '@shopify/events';\n\n/** @typedef {import('./utilities').TextComponent} TextComponent */\n\n/**\n * A custom element that displays a cart items component.\n *\n * @typedef {object} Refs\n * @property {HTMLElement[]} quantitySelectors - The quantity selector elements.\n * @property {HTMLTableRowElement[]} cartItemRows - The cart item rows.\n * @property {TextComponent} cartTotal - The cart total.\n *\n * @extends {Component<Refs>}\n */\nexport class CartItemsComponent extends createViewEventElement(Component) {\n  #debouncedOnChange = debounce(\n    /** @param {Event} event */\n    (event) => {\n      if (event instanceof QuantitySelectorUpdateEvent) this.#onQuantityChange(event);\n    },\n    300\n  );\n  /** @type {Promise<any> | null} */\n  #pendingCartFetch = null;\n\n  /**\n   * True when the event was dispatched from outside this cart-items-component (e.g.\n   * `Shopify.actions.updateCart(...)` from an external app, or the SFAPI default\n   * handler). Internal dispatchers (cart-discount-component, cart-note) live inside\n   * `this` and either morph the section themselves or don't need a refresh \u2014 running\n   * a fallback render in that case double-renders and can clobber form state.\n   * @param {Event} event\n   */\n  #isExternalCartUpdate(event) {\n    return !(event.target instanceof Node) || !this.contains(event.target);\n  }\n\n  /** @param {CartDiscountUpdateEvent} event */\n  #handleDiscountUpdate = (event) => {\n    const external = this.#isExternalCartUpdate(event);\n    event.promise\n      ?.then(({ detail }) => {\n        const sectionsHtml = detail?.sections?.[this.sectionId];\n        if (sectionsHtml) {\n          morphSection(this.sectionId, sectionsHtml, { mode: this.isDrawer ? 'hydration' : 'full' });\n          this.#updateCartQuantitySelectorButtonStates();\n        } else if (external) {\n          // External caller (Shopify.actions.updateCart or SFAPI default handler) didn't\n          // attach sections; refetch so the discount UI reflects the post-mutation cart.\n          // Internal cart-discount-component morphs the section itself \u2014 no fallback needed.\n          sectionRenderer.renderSection(this.sectionId, {\n            cache: false,\n            mode: this.isDrawer ? 'hydration' : 'full',\n          });\n        }\n      })\n      .catch((error) => {\n        if (error?.name !== 'AbortError') console.warn('[cart-items] Event promise rejected:', error);\n      });\n  };\n\n  /** @param {CartNoteUpdateEvent} event */\n  #handleNoteUpdate = (event) => {\n    // Internal cart-note dispatches don't need a section refresh \u2014 the user typed the\n    // value and the textarea retains it. Only external callers need the UI synced.\n    if (!this.#isExternalCartUpdate(event)) return;\n    event.promise\n      ?.then(({ detail }) => {\n        const sections = /** @type {Record<string, string> | undefined} */ (detail?.sections);\n        const sectionsHtml = sections?.[this.sectionId];\n        if (sectionsHtml) {\n          morphSection(this.sectionId, sectionsHtml, { mode: this.isDrawer ? 'hydration' : 'full' });\n        } else {\n          sectionRenderer.renderSection(this.sectionId, {\n            cache: false,\n            mode: this.isDrawer ? 'hydration' : 'full',\n          });\n        }\n      })\n      .catch((error) => {\n        if (error?.name !== 'AbortError') console.warn('[cart-items] Event promise rejected:', error);\n      });\n  };\n\n  connectedCallback() {\n    super.connectedCallback();\n\n    document.addEventListener(StandardEvents.cartLinesUpdate, this.#handleCartUpdate);\n    document.addEventListener(ThemeEvents.quantitySelectorUpdate, this.#debouncedOnChange);\n    document.addEventListener(StandardEvents.cartDiscountUpdate, this.#handleDiscountUpdate);\n    document.addEventListener(StandardEvents.cartNoteUpdate, this.#handleNoteUpdate);\n  }\n\n  disconnectedCallback() {\n    super.disconnectedCallback();\n\n    document.removeEventListener(StandardEvents.cartLinesUpdate, this.#handleCartUpdate);\n    document.removeEventListener(ThemeEvents.quantitySelectorUpdate, this.#debouncedOnChange);\n    document.removeEventListener(StandardEvents.cartDiscountUpdate, this.#handleDiscountUpdate);\n    document.removeEventListener(StandardEvents.cartNoteUpdate, this.#handleNoteUpdate);\n  }\n\n  /**\n   * Handles QuantitySelectorUpdateEvent change event.\n   * @param {QuantitySelectorUpdateEvent} event - The event.\n   */\n  #onQuantityChange(event) {\n    if (!(event.target instanceof Node) || !this.contains(event.target)) return;\n\n    const { quantity, cartLine: line } = event.detail;\n\n    // Cart items require a line number\n    if (!line) return;\n\n    if (quantity === 0) {\n      return this.onLineItemRemove(line);\n    }\n\n    this.updateQuantity({\n      line,\n      quantity,\n      action: 'change',\n    });\n    const lineItemRow = this.refs.cartItemRows[line - 1];\n\n    if (!lineItemRow) return;\n\n    const textComponent = /** @type {TextComponent | undefined} */ (lineItemRow.querySelector('text-component'));\n    textComponent?.shimmer();\n  }\n\n  /**\n   * Handles the line item removal.\n   * @param {number} line - The line item index.\n   */\n  onLineItemRemove(line) {\n    this.updateQuantity({\n      line,\n      quantity: 0,\n      action: 'clear',\n    });\n\n    const cartItemRowToRemove = this.refs.cartItemRows[line - 1];\n\n    if (!cartItemRowToRemove) return;\n\n    const rowsToRemove = [\n      cartItemRowToRemove,\n      // Get all nested lines of the row to remove\n      ...this.refs.cartItemRows.filter((row) => row.dataset.parentKey === cartItemRowToRemove.dataset.key),\n    ];\n\n    // If the cart item row is the last row, optimistically trigger the cart empty state\n    const isEmptyCart = rowsToRemove.length == this.refs.cartItemRows.length;\n\n    const template = document.getElementById('empty-cart-template');\n    if (isEmptyCart && template instanceof HTMLTemplateElement) {\n      const clone = document.importNode(template.content, true);\n\n      startViewTransition(() => {\n        document.getElementById('cart-drawer-heading')?.remove();\n        this.replaceChildren(clone);\n      }, [this.isDrawer ? 'empty-cart-drawer' : 'empty-cart-page']);\n\n      return;\n    }\n\n    // Add class to the row to trigger the animation\n    rowsToRemove.forEach((row) => {\n      const remove = () => row.remove();\n\n      if (prefersReducedMotion()) return remove();\n\n      row.style.setProperty('--row-height', `${row.clientHeight}px`);\n      row.classList.add('removing');\n\n      // Remove the row after the animation ends\n      onAnimationEnd(row, remove);\n    });\n  }\n\n  /**\n   * Updates the quantity.\n   * @param {Object} config - The config.\n   * @param {number} config.line - The line.\n   * @param {number} config.quantity - The quantity.\n   * @param {string} config.action - The action.\n   */\n  updateQuantity(config) {\n    const cartPerformaceUpdateMarker = cartPerformance.createStartingMarker(`${config.action}:user-action`);\n\n    this.#disableCartItems();\n\n    const { line, quantity } = config;\n    const { cartTotal } = this.refs;\n\n    const cartItemsComponents = document.querySelectorAll('cart-items-component');\n    const sectionsToUpdate = new Set([this.sectionId]);\n    cartItemsComponents.forEach((item) => {\n      if (item instanceof HTMLElement && item.dataset.sectionId) {\n        sectionsToUpdate.add(item.dataset.sectionId);\n      }\n    });\n\n    const body = JSON.stringify({\n      line: line,\n      quantity: quantity,\n      sections: Array.from(sectionsToUpdate).join(','),\n      sections_url: window.location.pathname,\n    });\n\n    cartTotal?.shimmer();\n\n    const deferredUpdatePromise = CartLinesUpdateEvent.createPromise();\n    const lineId = this.refs.cartItemRows[line - 1]?.dataset.key ?? '';\n    this.dispatchEvent(\n      new CartLinesUpdateEvent({\n        action: config.action === 'change' && quantity > 0 ? 'update' : 'remove',\n        context: 'cart',\n        lines: [{ id: lineId, quantity }],\n        promise: deferredUpdatePromise.promise,\n      })\n    );\n\n    fetch(`${Theme.routes.cart_change_url}`, fetchConfig('json', { body }))\n      .then((response) => {\n        return response.text();\n      })\n      .then((responseText) => {\n        const parsedResponseText = JSON.parse(responseText);\n\n        resetShimmer(this);\n\n        if (parsedResponseText.errors) {\n          this.#handleCartError(line, parsedResponseText);\n          deferredUpdatePromise.reject(new Error(parsedResponseText.errors));\n          return;\n        }\n\n        const newSectionHTML = new DOMParser().parseFromString(\n          parsedResponseText.sections[this.sectionId],\n          'text/html'\n        );\n\n        // Grab the new cart item count from a hidden element\n        const newCartHiddenItemCount = newSectionHTML.querySelector('[ref=\"cartItemCount\"]')?.textContent;\n        const newCartItemCount = newCartHiddenItemCount ? parseInt(newCartHiddenItemCount, 10) : 0;\n\n        // Update data-cart-quantity for all matching variants\n        this.#updateQuantitySelectors(parsedResponseText);\n\n        deferredUpdatePromise.resolve({\n          cart: CartLinesUpdateEvent.createCartFromAjaxResponse(parsedResponseText),\n          detail: {\n            sections: parsedResponseText.sections,\n            items: parsedResponseText.items,\n            itemCount: newCartItemCount,\n            source: 'cart-items-component',\n            didError: false,\n          },\n        });\n\n        morphSection(this.sectionId, parsedResponseText.sections[this.sectionId], {\n          mode: this.isDrawer ? 'hydration' : 'full',\n        });\n\n        this.#updateCartQuantitySelectorButtonStates();\n      })\n      .catch((error) => {\n        console.error(error);\n        deferredUpdatePromise.reject(error);\n\n        this.dispatchEvent(\n          new CartErrorEvent({\n            error: error?.message || 'Failed to update cart',\n            code: 'SERVICE_UNAVAILABLE',\n          })\n        );\n      })\n      .finally(() => {\n        this.#enableCartItems();\n        cartPerformance.measureFromMarker(cartPerformaceUpdateMarker);\n      });\n  }\n\n  /**\n   * Handles the cart error.\n   * @param {number} line - The line.\n   * @param {Object} parsedResponseText - The parsed response text.\n   * @param {string} parsedResponseText.errors - The errors.\n   */\n  #handleCartError = (line, parsedResponseText) => {\n    const quantitySelector = this.refs.quantitySelectors[line - 1];\n    const quantityInput = quantitySelector?.querySelector('input');\n\n    if (!quantityInput) throw new Error('Quantity input not found');\n\n    quantityInput.value = quantityInput.defaultValue;\n\n    const cartItemError = this.refs[`cartItemError-${line}`];\n    const cartItemErrorContainer = this.refs[`cartItemErrorContainer-${line}`];\n\n    if (!(cartItemError instanceof HTMLElement)) throw new Error('Cart item error not found');\n    if (!(cartItemErrorContainer instanceof HTMLElement)) throw new Error('Cart item error container not found');\n\n    cartItemError.textContent = parsedResponseText.errors;\n    cartItemErrorContainer.classList.remove('hidden');\n\n    this.dispatchEvent(\n      new CartErrorEvent({\n        error: parsedResponseText.errors || 'Cart update failed',\n        code: 'INVALID',\n      })\n    );\n  };\n\n  /**\n   * Handles the cart update.\n   *\n   * @param {CartLinesUpdateEvent} event\n   */\n  #handleCartUpdate = (event) => {\n    if (event.target === this) return;\n\n    event.promise\n      ?.then(async ({ detail }) => {\n        const sections = detail?.sections;\n        const cartItemsHtml = sections?.[this.sectionId];\n        // Animate empty \u2192 non-empty in the drawer (possible in squeeze mode\n        // where the page is interactive alongside the open drawer). This also\n        // needs the response stylesheet because it adds the cart summary markup.\n        const wasEmptyCartDrawer = this.isDrawer && this.querySelector('[data-cart-drawer-empty]') !== null;\n        /** @type {'hydration' | 'full'} */\n        const mode = this.isDrawer ? 'hydration' : 'full';\n        const morphOptions = {\n          mode,\n          injectStylesheet: wasEmptyCartDrawer,\n        };\n\n        if (cartItemsHtml) {\n          const existingKeys = new Set(this.refs.cartItemRows?.map((row) => row.dataset.key) ?? []);\n\n          if (wasEmptyCartDrawer) {\n            startViewTransition(() => {\n              morphSection(this.sectionId, cartItemsHtml, morphOptions);\n            }, ['fill-cart-drawer']);\n          } else {\n            await morphSection(this.sectionId, cartItemsHtml, morphOptions);\n          }\n\n          // Animate newly added rows (reverse of the remove animation).\n          if (!wasEmptyCartDrawer && !prefersReducedMotion()) {\n            for (const row of this.refs.cartItemRows ?? []) {\n              if (!existingKeys.has(row.dataset.key)) {\n                row.classList.add('adding');\n                onAnimationEnd(row, () => row.classList.remove('adding'));\n              }\n            }\n          }\n\n          // Update button states for all cart quantity selectors after morph\n          this.#updateCartQuantitySelectorButtonStates();\n        } else {\n          sectionRenderer.renderSection(this.sectionId, { cache: false, ...morphOptions });\n        }\n      })\n      .catch((error) => {\n        if (error?.name !== 'AbortError') console.warn('[cart-items] Event promise rejected:', error);\n      });\n  };\n\n  /**\n   * Disables the cart items.\n   */\n  #disableCartItems() {\n    this.classList.add('cart-items-disabled');\n  }\n\n  /**\n   * Enables the cart items.\n   */\n  #enableCartItems() {\n    this.classList.remove('cart-items-disabled');\n  }\n\n  /**\n   * Updates quantity selectors for all matching variants in the cart.\n   * @param {Object} updatedCart - The updated cart object.\n   * @param {Array<{variant_id: number, quantity: number}>} [updatedCart.items] - The cart items.\n   */\n  #updateQuantitySelectors(updatedCart) {\n    if (!updatedCart.items) return;\n\n    for (const item of updatedCart.items) {\n      const variantId = item.variant_id.toString();\n      const selectors = document.querySelectorAll(`quantity-selector-component[data-variant-id=\"${variantId}\"]`);\n\n      for (const selector of selectors) {\n        const input = selector.querySelector('input[data-cart-quantity]');\n        if (!input) continue;\n\n        input.setAttribute('data-cart-quantity', item.quantity.toString());\n\n        // Update the quantity selector's internal state\n        if ('updateCartQuantity' in selector && typeof selector.updateCartQuantity === 'function') {\n          selector.updateCartQuantity();\n        }\n      }\n    }\n  }\n\n  /**\n   * Updates button states for all cart quantity selector components.\n   */\n  #updateCartQuantitySelectorButtonStates() {\n    for (const selector of document.querySelectorAll('cart-quantity-selector-component')) {\n      /** @type {any} */ (selector).updateButtonStates?.();\n    }\n  }\n\n  async fetchCartData() {\n    if (this.#pendingCartFetch) return this.#pendingCartFetch;\n\n    this.#pendingCartFetch = (async () => {\n      const response = await fetch(`${Theme.routes.cart_url}.json`, {\n        headers: { Accept: 'application/json' },\n        credentials: 'same-origin',\n      });\n      if (!response.ok) throw new Error(`Failed to fetch cart: ${response.status} ${response.statusText}`);\n      const data = await response.json();\n      return data;\n    })().finally(() => {\n      this.#pendingCartFetch = null;\n    });\n\n    return this.#pendingCartFetch;\n  }\n\n  /**\n   * Gets the section id.\n   * @returns {string} The section id.\n   */\n  get sectionId() {\n    const { sectionId } = this.dataset;\n\n    if (!sectionId) throw new Error('Section id missing');\n\n    return sectionId;\n  }\n\n  /**\n   * @returns {boolean} Whether the component is a drawer.\n   */\n  get isDrawer() {\n    return this.dataset.drawer !== undefined;\n  }\n}\n\nif (!customElements.get('cart-items-component')) {\n  customElements.define('cart-items-component', CartItemsComponent);\n}\n"],
  "mappings": "AAAA,OAAS,cAAiB,mBAC1B,OACE,YACA,SACA,eACA,qBACA,aACA,wBACK,mBACP,OAAS,aAAc,oBAAuB,0BAC9C,OAAS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