{
  "version": 3,
  "sources": ["/cdn/shop/t/12/assets/theme.js?resku_ai=finn-repair-20261004"],
  "sourcesContent": ["const themeRefreshStrings = JSON.parse(document.getElementById('ThemeRefreshStrings')?.textContent || '{}');\n\ndocument.documentElement.className = document.documentElement.className.replace('no-js', 'js');\n\ncustomElements.define('quantity-input', class QuantityInput extends HTMLElement {\n  constructor() {\n    super();\n    this.input = this.querySelector('input');\n    this.querySelectorAll('button').forEach((button) => {\n      button.addEventListener('click', this.onButtonClick.bind(this));\n    });\n  }\n\n  onButtonClick(event) {\n    event.preventDefault();\n    const previousValue = Number(this.input.value || 1);\n    if (event.currentTarget.name === 'plus') {\n      this.input.stepUp();\n    } else {\n      this.input.stepDown();\n    }\n    if (previousValue !== Number(this.input.value)) {\n      this.input.dispatchEvent(new Event('change', { bubbles: true }));\n    }\n  }\n});\n\ndocument.addEventListener('click', (event) => {\n  const toggle = event.target.closest('[data-menu-toggle]');\n  if (!toggle) return;\n\n  const drawer = document.querySelector('[data-mobile-menu]');\n  const expanded = toggle.getAttribute('aria-expanded') === 'true';\n  toggle.setAttribute('aria-expanded', String(!expanded));\n  drawer?.toggleAttribute('hidden', expanded);\n});\n\nconst megaMenuItems = Array.from(document.querySelectorAll('.site-nav--mega .site-nav__item'));\nlet megaMenuCloseTimer;\n\nfunction closeMegaMenus(exceptItem) {\n  megaMenuItems.forEach((item) => {\n    if (item !== exceptItem) {\n      item.classList.remove('is-mega-open');\n      item.querySelector('.site-nav__link')?.setAttribute('aria-expanded', 'false');\n    }\n  });\n}\n\nfunction openMegaMenu(item) {\n  window.clearTimeout(megaMenuCloseTimer);\n  closeMegaMenus(item);\n  item.classList.remove('is-mega-dismissed');\n  item.classList.add('is-mega-open');\n  item.querySelector('.site-nav__link')?.setAttribute('aria-expanded', 'true');\n}\n\nfunction scheduleMegaMenuClose(item) {\n  window.clearTimeout(megaMenuCloseTimer);\n  megaMenuCloseTimer = window.setTimeout(() => {\n    if (item.contains(document.activeElement)) return;\n    item.classList.remove('is-mega-open');\n    item.querySelector('.site-nav__link')?.setAttribute('aria-expanded', 'false');\n  }, 240);\n}\n\nmegaMenuItems.forEach((item) => {\n  const link = item.querySelector('.site-nav__link');\n  const panel = item.querySelector('.mega-menu');\n  if (!link || !panel) return;\n\n  item.addEventListener('pointerenter', () => openMegaMenu(item));\n  link.addEventListener('focus', () => openMegaMenu(item));\n  item.addEventListener('pointerleave', () => scheduleMegaMenuClose(item));\n  panel.addEventListener('pointerenter', () => openMegaMenu(item));\n  panel.addEventListener('pointerleave', () => scheduleMegaMenuClose(item));\n\n  item.addEventListener('focusout', (event) => {\n    if (!item.contains(event.relatedTarget)) {\n      scheduleMegaMenuClose(item);\n    }\n  });\n});\n\ndocument.addEventListener('keydown', (event) => {\n  if (event.key === 'Escape') {\n    window.clearTimeout(megaMenuCloseTimer);\n    const focusedItem = megaMenuItems.find((item) => item.contains(document.activeElement));\n    focusedItem?.querySelector('.site-nav__link')?.focus();\n    closeMegaMenus();\n    megaMenuItems.forEach((item) => item.classList.add('is-mega-dismissed'));\n  }\n});\n\ndocument.addEventListener('click', (event) => {\n  const toggle = event.target.closest('[data-filter-toggle]');\n  if (!toggle) return;\n\n  const panel = document.querySelector('[data-filter-panel]');\n  const layout = document.querySelector('[data-collection-layout]');\n  const isDesktop = window.matchMedia('(min-width: 901px)').matches;\n\n  if (isDesktop && layout && panel) {\n    const isCollapsed = layout.toggleAttribute('data-filters-collapsed');\n    panel.toggleAttribute('hidden', isCollapsed);\n    document.documentElement.classList.remove('filters-open');\n    document.querySelectorAll('[data-filter-toggle][aria-expanded]').forEach((button) => {\n      button.setAttribute('aria-expanded', String(!isCollapsed));\n      const label = button.querySelector('.collection-filter-toggle__label');\n      if (label) {\n        label.textContent = isCollapsed ? 'Show refine tools' : 'Hide refine tools';\n      } else if (!button.hasAttribute('aria-label')) {\n        button.textContent = isCollapsed ? 'Show refine tools' : 'Hide refine tools';\n      }\n    });\n    return;\n  }\n\n  const isOpen = document.documentElement.classList.toggle('filters-open');\n  panel?.toggleAttribute('data-open', isOpen);\n  document.querySelectorAll('[data-filter-toggle][aria-expanded]').forEach((button) => {\n    button.setAttribute('aria-expanded', String(isOpen));\n    const label = button.querySelector('.collection-filter-toggle__label');\n    if (label) {\n      label.textContent = isOpen ? 'Hide refine tools' : 'Refine';\n    }\n  });\n});\n\nfunction syncCollectionFilterControls() {\n  const panel = document.querySelector('[data-filter-panel]');\n  const layout = document.querySelector('[data-collection-layout]');\n  if (!panel || !layout) return;\n\n  const isDesktop = window.matchMedia('(min-width: 901px)').matches;\n  const isCollapsed = layout.hasAttribute('data-filters-collapsed');\n  const isMobileOpen = document.documentElement.classList.contains('filters-open');\n\n  panel.toggleAttribute('hidden', isDesktop && isCollapsed);\n  if (!isDesktop) {\n    panel.removeAttribute('hidden');\n  }\n\n  document.querySelectorAll('[data-filter-toggle][aria-expanded]').forEach((button) => {\n    button.setAttribute('aria-expanded', String(isDesktop ? !isCollapsed : isMobileOpen));\n    const label = button.querySelector('.collection-filter-toggle__label');\n    if (label) {\n      label.textContent = isDesktop ? (isCollapsed ? 'Show refine tools' : 'Hide refine tools') : 'Refine';\n    }\n  });\n}\n\nsyncCollectionFilterControls();\nwindow.addEventListener('resize', syncCollectionFilterControls);\n\nconst swatchColorMap = [\n  ['black', '#151515'],\n  ['charcoal', '#343434'],\n  ['onyx', '#111111'],\n  ['grey', '#9a9a96'],\n  ['gray', '#9a9a96'],\n  ['silver', '#c8c6c0'],\n  ['smoke', '#7f8585'],\n  ['white', '#f6f1e8'],\n  ['ivory', '#efe7d5'],\n  ['cream', '#eadfc8'],\n  ['beige', '#c9b79f'],\n  ['tan', '#b99b73'],\n  ['taupe', '#a89582'],\n  ['brown', '#7a5738'],\n  ['walnut', '#6b442a'],\n  ['coffee', '#4a3225'],\n  ['blue', '#466d93'],\n  ['navy', '#1f334e'],\n  ['teal', '#2c7372'],\n  ['green', '#667b56'],\n  ['olive', '#6f7242'],\n  ['sage', '#9aaa87'],\n  ['red', '#9f3f34'],\n  ['burgundy', '#6c2732'],\n  ['rust', '#a65335'],\n  ['orange', '#bd6b38'],\n  ['terracotta', '#b9684d'],\n  ['amber', '#c88a3c'],\n  ['yellow', '#d8b341'],\n  ['mustard', '#b99534'],\n  ['gold', '#b68b3d'],\n  ['camel', '#b58352'],\n  ['caramel', '#a8733d'],\n  ['sand', '#d1bf9f'],\n  ['natural', '#c5aa7e'],\n  ['oak', '#b98d59'],\n  ['reclaimed', '#8a7158'],\n  ['leather', '#70492e'],\n  ['fabric', '#9a8f80'],\n  ['velvet', '#5d496f'],\n  ['chenille', '#8b8171'],\n  ['boucle', '#e4ded1'],\n  ['sherpa', '#efe8da'],\n  ['wood', '#8a5f3c'],\n  ['metal', '#9a9da0'],\n  ['marble', '#e6e3db'],\n  ['stone', '#bab3a7'],\n  ['glass', '#b7d4d8'],\n  ['acrylic', '#c9dde0']\n];\n\nfunction applySwatchColor(swatch) {\n  const value = String(swatch.dataset.swatch || '').toLowerCase();\n  const hex = String(swatch.dataset.swatchHex || '').trim();\n  const matches = swatchColorMap.filter(([key]) => value.includes(key)).map(([, color]) => color);\n  if (matches.length > 1) {\n    swatch.style.background = `linear-gradient(135deg, ${matches.slice(0, 3).join(', ')})`;\n  } else if (matches.length === 1) {\n    swatch.style.background = matches[0];\n  } else if (/^#(?:[0-9a-f]{3}){1,2}$/i.test(hex)) {\n    swatch.style.background = hex;\n  }\n}\n\ndocument.querySelectorAll('[data-filter-show-more]').forEach((button) => {\n  button.addEventListener('click', () => {\n    const group = button.closest('.filter-group');\n    const extraChoices = Array.from(group?.querySelectorAll('[data-filter-extra-choice]') || []);\n    const isExpanded = button.getAttribute('aria-expanded') === 'true';\n    extraChoices.forEach((choice) => {\n      choice.hidden = isExpanded;\n    });\n    button.setAttribute('aria-expanded', String(!isExpanded));\n    button.textContent = isExpanded ? `Show ${extraChoices.length} more` : 'Show fewer';\n  });\n});\n\ndocument.querySelectorAll('[data-swatch]').forEach(applySwatchColor);\n\ndocument.querySelectorAll('[data-variant-swatches]').forEach((fieldset) => {\n  const form = fieldset.closest('form');\n  const select = form?.querySelector('[data-variant-select]');\n  const dataScript = form?.querySelector('[data-product-variants]');\n  if (!form || !select || !dataScript) return;\n\n  let variants = [];\n  try {\n    variants = JSON.parse(dataScript.textContent || '[]');\n  } catch (error) {\n    variants = [];\n  }\n  if (!variants.length) return;\n\n  const optionPosition = Number.parseInt(fieldset.dataset.optionPosition || '0', 10);\n  fieldset.querySelectorAll('input[type=\"radio\"]').forEach((input) => {\n    input.addEventListener('change', () => {\n      const currentVariant = variants.find((variant) => String(variant.id) === String(select.value));\n      const desiredOptions = [...(currentVariant?.options || [])];\n      desiredOptions[optionPosition] = input.value;\n      const matchingVariant =\n        variants.find((variant) => variant.options?.every((value, index) => value === desiredOptions[index])) ||\n        variants.find((variant) => variant.available && variant.options?.[optionPosition] === input.value) ||\n        variants.find((variant) => variant.options?.[optionPosition] === input.value);\n\n      if (!matchingVariant) return;\n\n      select.value = String(matchingVariant.id);\n      select.dispatchEvent(new Event('change', { bubbles: true }));\n    });\n  });\n\n  select.addEventListener('change', () => {\n    const selectedVariant = variants.find((variant) => String(variant.id) === String(select.value));\n    const selectedValue = selectedVariant?.options?.[optionPosition];\n    if (!selectedValue) return;\n\n    const radio = fieldset.querySelector(`input[type=\"radio\"][value=\"${CSS.escape(selectedValue)}\"]`);\n    if (radio) radio.checked = true;\n  });\n});\n\nfunction normalizeFinishRoot(handle) {\n  let root = `-${String(handle || '').toLowerCase()}-`;\n  swatchColorMap.forEach(([term]) => {\n    root = root.replaceAll(`-${term}-`, '-');\n  });\n  ['faux-leather', 'top-grain', 'genuine', 'upholstered', 'finish', 'color'].forEach((term) => {\n    root = root.replaceAll(`-${term}-`, '-');\n  });\n  while (root.includes('--')) root = root.replaceAll('--', '-');\n  return root;\n}\n\nfunction titleCaseFinish(value) {\n  return String(value || '')\n    .replaceAll('-', ' ')\n    .replaceAll('_', ' ')\n    .split(' ')\n    .filter(Boolean)\n    .map((part) => part.charAt(0).toUpperCase() + part.slice(1).toLowerCase())\n    .join(' ');\n}\n\nfunction inferFinishLabel(product) {\n  const colorTag = (product.tags || []).find((tag) => String(tag).toLowerCase().startsWith('color_'));\n  if (colorTag) return titleCaseFinish(String(colorTag).replace(/^color_/i, ''));\n\n  const handle = String(product.handle || '').toLowerCase();\n  const colorTerms = swatchColorMap\n    .map(([term]) => term)\n    .filter((term) => !['fabric', 'velvet', 'chenille', 'boucle', 'sherpa', 'leather', 'wood', 'metal', 'marble', 'stone', 'glass', 'acrylic'].includes(term));\n  const matches = colorTerms.filter((term) => handle.includes(`-${term}-`) || handle.startsWith(`${term}-`) || handle.endsWith(`-${term}`));\n  if (matches.length) return matches.slice(0, 2).map(titleCaseFinish).join(' / ');\n\n  return product.title || 'View finish';\n}\n\nfunction formatSearchPrice(product) {\n  const price = Number.parseFloat(product.price || product.price_min || '');\n  if (!Number.isFinite(price)) return '';\n  return new Intl.NumberFormat(undefined, { style: 'currency', currency: window.Shopify?.currency?.active || 'USD' }).format(price);\n}\n\nfunction createFinishOptionCard(product) {\n  const card = document.createElement('a');\n  card.className = 'finish-option-card';\n  card.href = product.url || `/products/${product.handle}`;\n  card.setAttribute('aria-label', `View ${product.title || 'finish option'}`);\n  card.dataset.finishHandle = product.handle || '';\n\n  const media = document.createElement('span');\n  media.className = 'finish-option-card__media';\n  if (product.image || product.featured_image?.url) {\n    const image = document.createElement('img');\n    image.loading = 'lazy';\n    image.src = product.image || product.featured_image.url;\n    image.alt = product.title || '';\n    media.append(image);\n  }\n\n  const body = document.createElement('span');\n  body.className = 'finish-option-card__body';\n  const label = inferFinishLabel(product);\n  const swatch = document.createElement('span');\n  swatch.className = 'finish-option-card__swatch';\n  swatch.dataset.swatch = label.toLowerCase().replace(/[^a-z0-9]+/g, '-');\n  swatch.setAttribute('aria-hidden', 'true');\n  applySwatchColor(swatch);\n\n  const text = document.createElement('span');\n  const strong = document.createElement('strong');\n  strong.textContent = label;\n  const small = document.createElement('small');\n  small.textContent = formatSearchPrice(product);\n  text.append(strong, small);\n  body.append(swatch, text);\n  card.append(media, body);\n  return card;\n}\n\ndocument.querySelectorAll('[data-related-finishes]').forEach(async (section) => {\n  const query = section.dataset.searchQuery;\n  const currentHandle = section.dataset.currentHandle;\n  const currentRoot = section.dataset.currentRoot || normalizeFinishRoot(currentHandle);\n  const currentVendor = section.dataset.currentVendor;\n  const rail = section.querySelector('[data-related-finishes-results]');\n  if (!query || !currentHandle || !rail) return;\n\n  try {\n    const url = `/search/suggest.json?q=${encodeURIComponent(query)}&resources[type]=product&resources[limit]=10`;\n    const response = await fetch(url, { headers: { Accept: 'application/json' } });\n    if (!response.ok) return;\n    const data = await response.json();\n    const products = data?.resources?.results?.products || [];\n    let added = 0;\n\n    products.forEach((product) => {\n      if (!product.handle || product.handle === currentHandle || rail.querySelector(`[data-finish-handle=\"${CSS.escape(product.handle)}\"]`)) return;\n      if (currentVendor && product.vendor && product.vendor !== currentVendor) return;\n      if (normalizeFinishRoot(product.handle) !== currentRoot) return;\n      rail.append(createFinishOptionCard(product));\n      added += 1;\n    });\n\n    if (added > 0 || rail.querySelectorAll('.finish-option-card').length > 1) {\n      section.hidden = false;\n    }\n  } catch (error) {\n    return;\n  }\n});\n\nfunction prefillProductFinn(query) {\n  const assistant = document.querySelector('.resku-ai-assistant--product[data-resku-ai-assistant]')\n    || document.querySelector('[data-resku-ai-drawer] [data-resku-ai-assistant]')\n    || document.querySelector('[data-resku-ai-assistant]');\n  const input = assistant?.querySelector('[data-resku-ai-query]');\n  if (!input) {\n    openEmergencyFinnDrawer(query);\n    return Boolean(document.querySelector('[data-resku-ai-drawer] [data-resku-ai-query]'));\n  }\n  input.value = query;\n  input.focus();\n  assistant.scrollIntoView({ behavior: 'smooth', block: 'center' });\n  return true;\n}\n\ndocument.querySelectorAll('[data-fit-confidence]').forEach((block) => {\n  const fitText = (value) => String(value || '').replace(/\\s+/g, ' ').trim();\n\n  block.querySelectorAll('[data-fit-dimensions]').forEach((node) => {\n    const rawLines = node.innerText\n      .split(/\\n+/)\n      .map((line) => line.trim())\n      .filter(Boolean);\n\n    const formattedLines = rawLines.map((line) => line\n      .replace(/([A-Za-z])(\\d)/g, '$1 $2')\n      .replace(/\"([WDLH])/gi, '\" $1')\n      .replace(/\\s*[xX]\\s*/g, ' x ')\n      .replace(/\\s{2,}/g, ' ')\n      .trim());\n\n    if (formattedLines.length) {\n      node.textContent = '';\n      formattedLines.forEach((line) => {\n        const span = document.createElement('span');\n        span.textContent = line;\n        node.append(span);\n      });\n    }\n  });\n\n  const form = block.querySelector('[data-fit-calculator]');\n  const result = block.querySelector('[data-fit-result]');\n  if (!form || !result) return;\n\n  const productWidth = Number.parseFloat(block.dataset.productWidth || '');\n  const productDepth = Number.parseFloat(block.dataset.productDepth || '');\n  const productHeight = Number.parseFloat(block.dataset.productHeight || '');\n  if (!Number.isFinite(productWidth) || !Number.isFinite(productDepth)) return;\n\n  const productTitle = fitText(block.dataset.productTitle) || 'this piece';\n  const productType = fitText(block.dataset.productType) || 'furniture';\n  const searchUrl = fitText(block.dataset.searchUrl) || `/search?q=${encodeURIComponent(productType)}&type=product`;\n  const formatInches = (value) => `${Number(value).toFixed(Number(value) % 1 === 0 ? 0 : 1)}\"`;\n  const walkwayWidth = 30;\n  const breathingRoom = 6;\n  const doorwayTarget = Number.isFinite(productHeight)\n    ? Math.min(productDepth, productHeight)\n    : productDepth;\n  const finnQuery = (status, roomWidth, roomDepth) => [\n    `Will ${productTitle} fit in a room with ${formatInches(roomWidth)} width and ${formatInches(roomDepth)} depth?`,\n    `The product is ${formatInches(productWidth)} wide by ${formatInches(productDepth)} deep${Number.isFinite(productHeight) ? ` by ${formatInches(productHeight)} high` : ''}.`,\n    status === 'not_workable' ? 'Please suggest smaller alternatives too.' : 'Please help me check doorway clearance and layout.'\n  ].join(' ');\n\n  const renderFitResult = ({ status, title, message, checks, roomWidth, roomDepth }) => {\n    const encodedQuery = encodeURIComponent(finnQuery(status, roomWidth, roomDepth));\n    const statusLabel = status === 'comfortable' ? 'Comfortable footprint' : status === 'tight' ? 'Tight fit' : 'Not workable';\n    const checksHtml = checks.map((check) => `<li>${escapeHtml(check)}</li>`).join('');\n    const smallerLink = status === 'not_workable'\n      ? `<a class=\"fit-result__action fit-result__action--secondary\" href=\"${escapeHtml(searchUrl)}\">Browse smaller options</a>`\n      : '';\n\n    result.innerHTML = `\n      <div class=\"fit-result fit-result--${status}\">\n        <span class=\"fit-result__status\">${escapeHtml(statusLabel)}</span>\n        <strong>${escapeHtml(title)}</strong>\n        <p>${escapeHtml(message)}</p>\n        <ul>${checksHtml}</ul>\n        <div class=\"fit-result__actions\">\n          <button type=\"button\" class=\"fit-result__action\" data-fit-finn-query=\"${encodedQuery}\">Ask Finn to check the layout</button>\n          ${smallerLink}\n        </div>\n      </div>\n    `;\n    result.hidden = false;\n  };\n\n  form.addEventListener('submit', (event) => {\n    event.preventDefault();\n    const roomWidth = Number.parseFloat(new FormData(form).get('room_width'));\n    const roomDepth = Number.parseFloat(new FormData(form).get('room_depth'));\n\n    if (!Number.isFinite(roomWidth) || !Number.isFinite(roomDepth)) {\n      result.innerHTML = `\n        <div class=\"fit-result fit-result--neutral\">\n          <strong>Enter the room width and depth.</strong>\n          <p>Use inches for the clear floor space where the piece would sit.</p>\n        </div>\n      `;\n      result.hidden = false;\n      return;\n    }\n\n    const directFit = productWidth <= roomWidth && productDepth <= roomDepth;\n    const rotatedFit = productWidth <= roomDepth && productDepth <= roomWidth;\n    const directWithClearance = (productWidth + breathingRoom) <= roomWidth && (productDepth + breathingRoom) <= roomDepth;\n    const rotatedWithClearance = (productWidth + breathingRoom) <= roomDepth && (productDepth + breathingRoom) <= roomWidth;\n    const walkwayWarning = Math.max(roomWidth - productWidth, roomDepth - productDepth) < walkwayWidth;\n\n    if (directWithClearance || rotatedWithClearance) {\n      renderFitResult({\n        status: 'comfortable',\n        title: 'The footprint looks workable.',\n        message: `${productTitle} should fit this floor area with a little breathing room. Before ordering, confirm the path into the room.`,\n        roomWidth,\n        roomDepth,\n        checks: [\n          `Keep about ${formatInches(walkwayWidth)} for main walking paths when possible.`,\n          `Check the narrowest doorway, stair turn, or hallway against about ${formatInches(doorwayTarget)}.`,\n          'Measure the exact wall or floor area again if rugs, tables, or recliner motion share the space.'\n        ]\n      });\n    } else if (directFit || rotatedFit) {\n      renderFitResult({\n        status: 'tight',\n        title: 'It fits the footprint, but tightly.',\n        message: walkwayWarning\n          ? 'The piece can sit in the space, but the room may feel crowded once walking paths and nearby furniture are included.'\n          : 'The piece can sit in the space, but there is not much extra room for layout adjustments.',\n        roomWidth,\n        roomDepth,\n        checks: [\n          `Add at least ${formatInches(breathingRoom)} of side clearance if the piece needs to slide into place.`,\n          `Confirm doorways, stairs, elevators, and hall turns before ordering.`,\n          'Ask Finn with your doorway width and room layout if you want a second read.'\n        ]\n      });\n    } else {\n      renderFitResult({\n        status: 'not_workable',\n        title: 'This room size looks too small for the footprint.',\n        message: `${productTitle} is larger than the clear floor space you entered. A smaller ${productType.toLowerCase()} or a different layout will likely be easier to live with.`,\n        roomWidth,\n        roomDepth,\n        checks: [\n          'Recheck the room measurement if you entered wall-to-wall space instead of clear usable space.',\n          'Look for a narrower width or shallower depth before comparing finishes.',\n          'Ask Finn to find nearby options that keep the same look but scale down.'\n        ]\n      });\n    }\n  });\n\n  result.addEventListener('click', (event) => {\n    const button = event.target.closest('[data-fit-finn-query]');\n    if (!button) return;\n    const query = decodeURIComponent(button.getAttribute('data-fit-finn-query') || '');\n    prefillProductFinn(query);\n  });\n});\n\ndocument.querySelectorAll('[data-delivery-preview]').forEach((section) => {\n  section.addEventListener('click', (event) => {\n    const button = event.target.closest('[data-delivery-finn-query]');\n    if (!button) return;\n    prefillProductFinn(button.getAttribute('data-delivery-finn-query') || '');\n  });\n});\n\ndocument.addEventListener('click', (event) => {\n  const openButton = event.target.closest('[data-resku-ai-drawer-open]');\n  const closeButton = event.target.closest('[data-resku-ai-drawer-close]');\n  if (!openButton && !closeButton) return;\n\n  const drawer = document.querySelector('[data-resku-ai-drawer]');\n  const launcher = document.querySelector('[data-resku-ai-drawer-open]');\n  if (!drawer) return;\n\n  const shouldOpen = Boolean(openButton);\n  drawer.toggleAttribute('hidden', !shouldOpen);\n  document.documentElement.classList.toggle('resku-ai-drawer-open', shouldOpen);\n  launcher?.setAttribute('aria-expanded', String(shouldOpen));\n\n  if (shouldOpen) {\n    drawer.querySelector('[data-resku-ai-query]')?.focus();\n  }\n});\n\nconst collectionSearch = document.querySelector('[data-collection-search]');\nconst collectionCards = Array.from(document.querySelectorAll('[data-collection-card]'));\nconst collectionGroupButtons = Array.from(document.querySelectorAll('[data-collection-group]'));\nlet activeCollectionGroup = 'all';\n\nfunction updateCollectionIndex() {\n  const query = (collectionSearch?.value || '').trim().toLowerCase();\n  collectionCards.forEach((card) => {\n    const matchesGroup = activeCollectionGroup === 'all' || card.dataset.group === activeCollectionGroup;\n    const matchesSearch = !query || (card.dataset.search || '').includes(query);\n    card.hidden = !(matchesGroup && matchesSearch);\n  });\n}\n\ncollectionSearch?.addEventListener('input', updateCollectionIndex);\n\ncollectionGroupButtons.forEach((button) => {\n  button.addEventListener('click', () => {\n    activeCollectionGroup = button.dataset.collectionGroup || 'all';\n    collectionGroupButtons.forEach((item) => {\n      item.setAttribute('aria-pressed', String(item === button));\n    });\n    updateCollectionIndex();\n  });\n});\n\nfunction escapeHtml(value) {\n  return String(value || '').replace(/[&<>\"']/g, (char) => ({\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  })[char]);\n}\n\nfunction formatReskuAiPrice(value) {\n  const price = Number(value);\n  if (!Number.isFinite(price) || price <= 0) {\n    return '';\n  }\n  return `$${price.toLocaleString(undefined, { maximumFractionDigits: 0 })}`;\n}\n\nfunction normalizePredictiveProduct(product) {\n  const image = product.image || product.featured_image || {};\n  const imageUrl = typeof image === 'string' ? image : (image.url || image.src || '');\n  const price = product.price || product.price_min || product.price_max || '';\n  return {\n    title: product.title || product.product_title || '',\n    url: product.url || '',\n    image_url: imageUrl,\n    price\n  };\n}\n\nasync function fetchNativeSearchResults(query, limit = 6) {\n  const searchQuery = String(query || '').trim();\n  if (!searchQuery) return [];\n\n  const params = new URLSearchParams({\n    q: searchQuery,\n    'resources[type]': 'product',\n    'resources[limit]': String(limit),\n    'resources[options][unavailable_products]': 'last'\n  });\n\n  try {\n    const response = await fetch(`/search/suggest.json?${params.toString()}`, {\n      headers: {\n        'Accept': 'application/json'\n      },\n      credentials: 'same-origin'\n    });\n    if (!response.ok) return [];\n    const payload = await response.json();\n    const products = payload?.resources?.results?.products || [];\n    return products.map(normalizePredictiveProduct).filter((product) => product.title && product.url);\n  } catch (error) {\n    return [];\n  }\n}\n\nfunction stripSearchModifiers(query) {\n  return String(query || '')\n    .replace(/(?:under|below|less than|max|maximum|up to)\\s*\\$?\\s*[0-9][0-9,]*/gi, ' ')\n    .replace(/\\$?\\s*[0-9][0-9,]*\\s*(?:or less|and under|max|dollars?|bucks)?/gi, ' ')\n    .replace(/\\b(?:cheap|budget|affordable|inexpensive|lowest price|least expensive)\\b/gi, ' ')\n    .replace(/\\s+/g, ' ')\n    .trim();\n}\n\nfunction nativeSearchFallbackQueries(query, payload = {}) {\n  const intent = payload.intent || {};\n  const candidates = [\n    intent.product_type,\n    [intent.style, intent.product_type].filter(Boolean).join(' '),\n    [intent.color, intent.product_type].filter(Boolean).join(' '),\n    stripSearchModifiers(query)\n  ];\n  return [...new Set(candidates.map((candidate) => String(candidate || '').trim()).filter(Boolean))];\n}\n\nasync function resolveNativeSearchResults(query, payload = {}, exactResults = []) {\n  if (Array.isArray(exactResults) && exactResults.length) {\n    return { query, products: exactResults, usedFallback: false };\n  }\n\n  const fallbacks = nativeSearchFallbackQueries(query, payload).filter((candidate) => candidate !== query);\n  for (const fallbackQuery of fallbacks) {\n    const products = await fetchNativeSearchResults(fallbackQuery);\n    if (products.length) {\n      return { query: fallbackQuery, products, usedFallback: true };\n    }\n  }\n\n  return { query, products: [], usedFallback: false };\n}\n\nfunction formatNativeSearchPrice(value) {\n  if (typeof value === 'string') {\n    if (!value.trim()) return '';\n    if (value.includes('$')) return value;\n    const numeric = Number(value.replace(/,/g, ''));\n    if (Number.isFinite(numeric) && numeric > 0) {\n      return `$${numeric.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;\n    }\n    return value;\n  }\n  const price = Number(value);\n  if (!Number.isFinite(price) || price <= 0) {\n    return '';\n  }\n  return `$${(price / 100).toLocaleString(undefined, { maximumFractionDigits: 0 })}`;\n}\n\nfunction shopperQueryLabel(query) {\n  const normalized = String(query || '').toLowerCase();\n  if (/\\b(bar stool|bar stools|counter stool|counter stools)\\b/.test(normalized)) return 'bar stool';\n  if (/\\b(sectional|sectionals)\\b/.test(normalized)) return 'sectional';\n  if (/\\b(loveseat|loveseats)\\b/.test(normalized)) return 'loveseat';\n  if (/\\b(sleeper|sofa bed|futon)\\b/.test(normalized)) return 'sleeper sofa';\n  if (/\\b(sofa|sofas|couch|couches)\\b/.test(normalized)) return 'sofa';\n  if (/\\b(dining table|dining tables)\\b/.test(normalized)) return 'dining table';\n  if (/\\b(dining set|dining sets)\\b/.test(normalized)) return 'dining set';\n  if (/\\b(bed|beds)\\b/.test(normalized)) return 'bed';\n  if (/\\b(recliner|recliners)\\b/.test(normalized)) return 'recliner';\n  if (/\\b(chair|chairs)\\b/.test(normalized)) return 'chair';\n  return 'furniture';\n}\n\nfunction titleCaseLabel(label) {\n  return String(label || '')\n    .split(/\\s+/)\n    .filter(Boolean)\n    .map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`)\n    .join(' ');\n}\n\nfunction normalizedQueryWords(query) {\n  return String(query || '').toLowerCase().match(/[a-z0-9]+/g) || [];\n}\n\nfunction queryMentionsAny(query, terms) {\n  const normalized = ` ${String(query || '').toLowerCase()} `;\n  return terms.some((term) => normalized.includes(` ${term} `) || normalized.includes(term));\n}\n\nfunction isGenericSofaQuery(query) {\n  const words = normalizedQueryWords(query);\n  const mentionsSofa = words.some((word) => ['sofa', 'sofas', 'couch', 'couches'].includes(word));\n  if (!mentionsSofa) return false;\n  return !queryMentionsAny(query, [\n    'sectional',\n    'sectionals',\n    'sleeper',\n    'sleepers',\n    'sofa bed',\n    'sofabed',\n    'futon',\n    'futons',\n    'daybed',\n    'day bed',\n    'loveseat',\n    'loveseats',\n    'chaise'\n  ]);\n}\n\nfunction queryHasBudget(query) {\n  return /\\$?\\s*\\d[\\d,]*(?:\\s*(?:dollars?|bucks))?|\\b(under|below|less than|max|maximum|up to|budget|cheap|affordable|inexpensive|most expensive|highest price|priciest|premium|luxury|high end|higher end|best)\\b/i.test(String(query || ''));\n}\n\nfunction queryWantsPremium(query) {\n  return /\\b(most expensive|highest price|priciest|premium|luxury|high end|higher end|best|nicest|top of the line|statement)\\b/i.test(String(query || ''));\n}\n\nfunction queryHasScale(query) {\n  return /\\b(small|compact|apartment|apartment-size|apartment sized|large|oversized|deep|narrow|wide|long|short|low profile|high back|[0-9]+\\s*(?:in|inch|inches|ft|feet|foot|\"))\\b/i.test(String(query || ''));\n}\n\nfunction queryHasCompactScale(query) {\n  return /\\b(small|compact|apartment|apartment-size|apartment sized|small space|studio)\\b/i.test(String(query || ''));\n}\n\nfunction queryHasLargeScale(query) {\n  return /\\b(oversized|large|deep|extra deep|wide|long)\\b/i.test(String(query || ''));\n}\n\nfunction queryHasStyleOrMaterial(query) {\n  return /\\b(modern|contemporary|traditional|transitional|farmhouse|rustic|glam|mid-century|mid century|coastal|industrial|minimal|leather|faux leather|fabric|chenille|velvet|boucle|boucl\u00E9|linen|wood|metal|corduroy|performance|pet friendly|kid friendly|gray|grey|black|white|brown|beige|cream|green|blue)\\b/i.test(String(query || ''));\n}\n\nfunction sofaConstraintState(query) {\n  return {\n    scale: queryHasScale(query),\n    styleMaterial: queryHasStyleOrMaterial(query),\n    budget: queryHasBudget(query)\n  };\n}\n\nfunction productSearchText(product) {\n  return [\n    product?.title,\n    product?.handle,\n    product?.reason,\n    product?.product_type,\n    product?.type,\n    product?.category\n  ].filter(Boolean).join(' ').toLowerCase();\n}\n\nfunction isOrdinarySofaProduct(product) {\n  const text = productSearchText(product);\n  if (!text) return false;\n  const hasSofa = /\\b(sofa|sofas|couch|couches)\\b/.test(text);\n  const hasLivingSet = /\\b(2|3|two|three)[-\\s]?piece\\b.*\\bliving room\\b.*\\bset\\b/.test(text) || /\\bliving room\\b.*\\bset\\b.*\\bsofa\\b/.test(text);\n  if (!hasSofa && !hasLivingSet) return false;\n  return !/\\b(futon|futons|sleeper|sleepers|sofa bed|sofabed|convertible sofa|sectional|sectionals|chaise|loveseat|loveseats|daybed|day bed)\\b/.test(text);\n}\n\nfunction isSofaRelatedProduct(product) {\n  const text = productSearchText(product);\n  return /\\b(sofa|sofas|couch|couches|futon|sleeper|sectional|loveseat|chaise)\\b/.test(text);\n}\n\nfunction shapeProductRecommendations(products, query) {\n  const list = Array.isArray(products) ? products : [];\n  if (!isGenericSofaQuery(query)) return list;\n\n  const strict = list.filter(isOrdinarySofaProduct);\n  if (strict.length) return strict;\n\n  return [];\n}\n\nfunction normalizeProductIdentity(value) {\n  return String(value || '')\n    .toLowerCase()\n    .normalize('NFKD')\n    .replace(/[\\u0300-\\u036f]/g, '')\n    .replace(/[^a-z0-9]+/g, ' ')\n    .trim();\n}\n\nfunction productHandleFromUrl(value) {\n  const match = String(value || '').match(/\\/products\\/([^/?#]+)/i);\n  return match ? match[1] : '';\n}\n\nfunction reconcileProductRecommendations(products, nativeResults = { products: [] }) {\n  const liveProducts = Array.isArray(nativeResults?.products) ? nativeResults.products : [];\n  if (!liveProducts.length) return [];\n\n  const byTitle = new Map();\n  const byHandle = new Map();\n  liveProducts.forEach((product) => {\n    const titleKey = normalizeProductIdentity(product?.title);\n    const handleKey = normalizeProductIdentity(productHandleFromUrl(product?.url));\n    if (titleKey) byTitle.set(titleKey, product);\n    if (handleKey) byHandle.set(handleKey, product);\n  });\n\n  return (Array.isArray(products) ? products : []).flatMap((product) => {\n    const titleKey = normalizeProductIdentity(product?.title);\n    const handleKey = normalizeProductIdentity(product?.handle || productHandleFromUrl(product?.url));\n    const liveProduct = byTitle.get(titleKey) || byHandle.get(handleKey);\n    if (!liveProduct?.url) return [];\n    const liveHandle = productHandleFromUrl(liveProduct.url);\n    return [{\n      ...product,\n      handle: liveHandle || product.handle,\n      url: liveProduct.url,\n      image_url: liveProduct.image_url || product.image_url,\n      price: liveProduct.price || product.price\n    }];\n  });\n}\n\nfunction isOrdinarySofaNativeResult(product) {\n  const text = [product?.title, product?.url].filter(Boolean).join(' ').toLowerCase();\n  return /\\b(sofa|sofas|couch|couches)\\b/.test(text) && !/\\b(futon|futons|sleeper|sleepers|sofa bed|sofabed|convertible sofa|sectional|sectionals|chaise|loveseat|loveseats|daybed|day bed)\\b/.test(text);\n}\n\nfunction shapeNativeSearchResults(resultPayload, query) {\n  if (!resultPayload || !isGenericSofaQuery(query)) return resultPayload;\n  const products = Array.isArray(resultPayload.products) ? resultPayload.products : [];\n  const strictProducts = products.filter(isOrdinarySofaNativeResult);\n  return {\n    ...resultPayload,\n    query: resultPayload.query || 'sofa',\n    products: strictProducts.length ? strictProducts : products,\n    shapedByIntent: strictProducts.length > 0\n  };\n}\n\nfunction withIntentPathFallbacks(filters, query) {\n  const list = Array.isArray(filters) ? [...filters] : [];\n  if (!isGenericSofaQuery(query)) return list;\n\n  const existingUrls = new Set(list.map((filter) => String(filter?.url || '')));\n  const addPath = (label, url) => {\n    if (!existingUrls.has(url)) {\n      list.push({ label, url, intent_fallback: true });\n      existingUrls.add(url);\n    }\n  };\n\n  if (!list.some((filter) => /sofa/i.test(String(filter?.label || '')) && !/sleeper|futon|sectional|loveseat/i.test(String(filter?.label || '')))) {\n    addPath('Standard sofas', '/collections/all-sofas-loveseats');\n  }\n\n  if (!queryHasScale(query) && !queryHasStyleOrMaterial(query) && !queryHasBudget(query)) {\n    addPath('Sectionals', '/collections/stationary-sectional-sofas-1');\n    addPath('Sleeper sofas & futons', '/collections/convertible-sofa-futon');\n  }\n\n  return list;\n}\n\nfunction sofaIntentNoteHtml(query, productCount) {\n  if (!isGenericSofaQuery(query)) return '';\n  const constraints = sofaConstraintState(query);\n  const premiumIntent = queryWantsPremium(query);\n  const hasEnoughDetail = constraints.scale && (constraints.styleMaterial || constraints.budget);\n  const missing = [];\n  if (!constraints.scale) missing.push('scale');\n  if (!constraints.styleMaterial) missing.push('style or material');\n  if (!constraints.budget && !premiumIntent) missing.push('budget');\n\n  if (hasEnoughDetail) {\n    const detail = [\n      constraints.scale ? 'the size or room fit you gave me' : '',\n      constraints.styleMaterial ? 'your style or material cue' : '',\n      constraints.budget ? 'your budget' : ''\n    ].filter(Boolean).join(', ');\n    return `\n      <div class=\"resku-ai-assistant__group resku-ai-assistant__intent-note\">\n        <p>Nice. I am using ${escapeHtml(detail)} to keep this focused on standard living-room sofas.</p>\n        ${productCount ? '<p>These are the cleanest sofa matches I found first. Nearby paths are below if you meant a sectional, sleeper, or full living room set.</p>' : '<p>I did not get clean standard-sofa picks back, so start with the sofa path below or use regular search.</p>'}\n      </div>\n    `;\n  }\n\n  const suggestedPrompts = [];\n  if (!constraints.scale && !premiumIntent) {\n    suggestedPrompts.push(\n      { label: 'Apartment size', value: 'apartment size' },\n      { label: 'Standard sofa', value: 'standard sofa' },\n      { label: 'Oversized', value: 'oversized' }\n    );\n  }\n  if (premiumIntent) {\n    suggestedPrompts.push(\n      { label: 'Top grain leather', value: 'top grain leather' },\n      { label: 'Power reclining', value: 'power reclining' },\n      { label: 'Statement piece', value: 'statement piece' },\n      { label: 'Oversized comfort', value: 'oversized' }\n    );\n  } else if (!constraints.budget) {\n    suggestedPrompts.push(\n      { label: 'Under $800', value: 'under $800' },\n      { label: 'Under $1,200', value: 'under $1,200' }\n    );\n  }\n  if (!constraints.styleMaterial) {\n    suggestedPrompts.push(\n      { label: 'Modern', value: 'modern' },\n      { label: 'Leather', value: 'leather' }\n    );\n  }\n\n  return `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__intent-note resku-ai-assistant__intent-note--cascade\">\n      <p>${premiumIntent ? 'Got it. I am treating this as a premium standard-sofa search first.' : 'Awesome. I am treating \"sofa\" as a standard living-room sofa first.'}</p>\n      <p>Pick one answer below, or type your own detail in the search box above, and I will narrow by ${escapeHtml(missing.slice(0, 2).join(' and '))}.</p>\n      <div class=\"resku-ai-assistant__quick-replies\" aria-label=\"Add detail to this sofa search\">\n        ${suggestedPrompts.slice(0, 5).map((prompt) => `<button type=\"button\" data-resku-ai-suggest=\"${escapeHtml(prompt.value)}\">${escapeHtml(prompt.label)}</button>`).join('')}\n      </div>\n      ${productCount ? `<p>${premiumIntent ? 'I will lead with the strongest higher-end sofa matches first, then nearby paths below.' : 'I will still show the cleanest standard sofa matches first, then nearby paths below.'}</p>` : '<p>I did not get clean standard-sofa picks back yet, so start with the sofa path below or add one detail.</p>'}\n    </div>\n  `;\n}\n\nfunction isBroadShoppingQuery(query) {\n  const words = normalizedQueryWords(query);\n  const productWords = new Set(['sofa', 'sofas', 'couch', 'couches', 'sectional', 'sectionals', 'loveseat', 'loveseats', 'recliner', 'recliners', 'bed', 'beds', 'table', 'tables', 'stool', 'stools', 'chair', 'chairs', 'dresser', 'dressers', 'nightstand', 'nightstands']);\n  return words.length > 0 && words.length <= 3 && words.some((word) => productWords.has(word));\n}\n\nfunction shoppingRefinementPrompts(query) {\n  const label = shopperQueryLabel(query);\n  const normalized = ` ${String(query || '').toLowerCase()} `;\n  const premiumIntent = queryWantsPremium(query);\n  const promptsByLabel = {\n    'bar stool': [\n      ['Counter height', 'counter height'],\n      ['Bar height', 'bar height'],\n      ['Set of 2', 'set of 2'],\n      ['Swivel', 'swivel'],\n      ['Under $200', 'under $200'],\n      ['Black', 'black']\n    ],\n    sofa: premiumIntent\n      ? [\n          ['Top grain leather', 'top grain leather'],\n          ['Oversized', 'oversized'],\n          ['Power reclining', 'power reclining'],\n          ['Statement piece', 'statement piece'],\n          ['Modern luxury', 'modern luxury'],\n          ['Standard sofa', 'standard sofa']\n        ]\n      : [\n          ['Under $800', 'under $800'],\n          ['Modern', 'modern'],\n          ['Leather', 'leather'],\n          ['Black', 'black'],\n          ['Chenille', 'chenille']\n        ],\n    sectional: [\n      ['Modular', 'modular'],\n      ['Chaise', 'chaise'],\n      ['Power reclining', 'power reclining'],\n      ['Under $1,500', 'under $1500'],\n      ['Grey', 'grey'],\n      ['U-shaped', 'u shaped']\n    ],\n    bed: [\n      ['Queen', 'queen'],\n      ['King', 'king'],\n      ['Storage', 'storage'],\n      ['Upholstered', 'upholstered'],\n      ['Platform', 'platform'],\n      ['Under $700', 'under $700']\n    ],\n    recliner: [\n      ['Power', 'power'],\n      ['Rocker', 'rocker'],\n      ['Swivel', 'swivel'],\n      ['Lift chair', 'lift chair'],\n      ['Leather', 'leather'],\n      ['Under $600', 'under $600']\n    ],\n    chair: [\n      ['Accent', 'accent'],\n      ['Dining', 'dining'],\n      ['Office', 'office'],\n      ['Swivel', 'swivel'],\n      ['Upholstered', 'upholstered'],\n      ['Under $300', 'under $300']\n    ],\n    furniture: [\n      ['Room', 'living room'],\n      ['Budget', 'under $800'],\n      ['Color', 'black'],\n      ['Material', 'wood'],\n      ['Size', 'small space'],\n      ['Ships free', 'ships free']\n    ]\n  };\n  let prompts = promptsByLabel[label] || promptsByLabel.furniture;\n  if (label === 'sofa' && queryHasScale(query)) {\n    prompts = prompts.filter(([, value]) => !['apartment size', 'standard sofa', 'oversized', 'full-size'].includes(String(value).toLowerCase()));\n  } else if (label === 'sofa' && !premiumIntent) {\n    prompts = [\n      ['Apartment size', 'apartment size'],\n      ['Oversized', 'oversized'],\n      ...prompts\n    ];\n  }\n  const seen = new Set();\n  return prompts\n    .filter(([, value]) => !normalized.includes(` ${String(value).toLowerCase()} `))\n    .filter(([, value]) => {\n      const key = String(value).toLowerCase();\n      if (seen.has(key)) return false;\n      seen.add(key);\n      return true;\n    })\n    .slice(0, 5);\n}\n\nfunction broadQueryIntroHtml(query) {\n  if (!isBroadShoppingQuery(query)) return '';\n  const label = shopperQueryLabel(query);\n  const prompts = shoppingRefinementPrompts(query);\n  const premiumIntro = label === 'sofa' && queryWantsPremium(query);\n  return `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__answer resku-ai-assistant__answer--chat resku-ai-assistant__answer--intro resku-ai-assistant__answer--shopping\">\n      <div class=\"resku-ai-assistant__avatar\" aria-hidden=\"true\">F</div>\n      <div class=\"resku-ai-assistant__bubble\">\n        <h3>Finn</h3>\n        <p><strong>${escapeHtml(titleCaseLabel(label))} matches found.</strong> ${premiumIntro ? 'Are you thinking leather, oversized comfort, or more of a statement piece?' : 'What matters most?'}</p>\n        ${prompts.length ? `\n          <div class=\"resku-ai-assistant__quick-replies\" aria-label=\"Refine this ${escapeHtml(label)} search\">\n            ${prompts.map(([promptLabel, value]) => `<button type=\"button\" data-resku-ai-suggest=\"${escapeHtml(value)}\">${escapeHtml(promptLabel)}</button>`).join('')}\n          </div>\n        ` : ''}\n      </div>\n    </div>\n  `;\n}\n\nfunction isPlainShoppingQuery(query, payload = {}) {\n  const normalized = String(query || '').toLowerCase().trim();\n  if (!normalized) return false;\n\n  const intent = payload.intent || {};\n  const hasShoppingIntent = Boolean(\n    intent.product_type ||\n    intent.budget_max ||\n    intent.price_tier ||\n    intent.style ||\n    intent.color ||\n    (Array.isArray(intent.materials) && intent.materials.length) ||\n    (Array.isArray(intent.features) && intent.features.length) ||\n    intent.vendor ||\n    intent.room ||\n    intent.width_min ||\n    intent.width_max\n  );\n  if (!hasShoppingIntent) return false;\n\n  const asksForAdvice = /[?]|\\b(what|how|why|can|could|would|will|do|does|is|are|should|compare|difference|mean|help|guide|care|clean|cleaning|durable|pet|pets|kids|fit|measure|deliver|delivery|ship|shipping|return|warranty|damage|damaged|broken|assembly|assemble|setup|white glove)\\b/i.test(normalized);\n  return !asksForAdvice;\n}\n\nfunction shouldPrioritizeShoppingResults(query, payload = {}) {\n  const title = String(payload.answer_title || '').trim();\n  return /^store help$/i.test(title) && isPlainShoppingQuery(query, payload);\n}\n\nfunction hasStructuredShoppingIntent(payload = {}) {\n  const intent = payload.intent || {};\n  return Boolean(\n    intent.product_type ||\n    intent.budget_max ||\n    intent.price_tier ||\n    intent.style ||\n    intent.color ||\n    (Array.isArray(intent.materials) && intent.materials.length) ||\n    (Array.isArray(intent.features) && intent.features.length) ||\n    intent.vendor ||\n    intent.room ||\n    intent.width_min ||\n    intent.width_max\n  );\n}\n\nfunction isSearchTermQuery(query) {\n  const normalized = String(query || '').toLowerCase().trim();\n  if (!normalized) return false;\n  if (/[?]/.test(normalized)) return false;\n  return !/\\b(what|how|why|can|could|would|will|do|does|is|are|should|compare|difference|mean|help|guide|care|clean|cleaning|durable|pet|pets|kids|fit|measure|deliver|delivery|ship|shipping|return|warranty|damage|damaged|broken|assembly|assemble|setup|white glove)\\b/i.test(normalized);\n}\n\nfunction isProductSearchPhrase(query) {\n  const raw = String(query || '').toLowerCase().trim();\n  const normalized = ` ${raw} `;\n  if (!raw || /[?]/.test(raw) || isServiceIntentQuery(query)) return false;\n  if (/\\b(what|how|why|can|could|would|will|do|does|is|are|should|compare|difference|mean|help|guide|care|clean|cleaning|fit|measure|measuring|delivery|deliver|ship|shipping|return|warranty|damage|damaged|broken|assembly|assemble|setup|white glove)\\b/i.test(raw)) return false;\n  return /\\b(sofa|sofas|couch|couches|sectional|sectionals|loveseat|loveseats|recliner|recliners|bed|beds|dresser|dressers|nightstand|nightstands|table|tables|chair|chairs|stool|stools|bar stool|bar stools|counter stool|counter stools|lamp|lamps|desk|desks|mirror|mirrors|rug|rugs|cabinet|cabinets|console|consoles|bench|benches|ottoman|ottomans)\\b/.test(normalized);\n}\n\nfunction isServiceIntentQuery(query) {\n  const normalized = String(query || '').toLowerCase();\n  if (!normalized.trim()) return false;\n  return /\\b(ship|shipping|ships|deliver|delivery|delivered|zip|zipcode|postal|dfw|fort worth|dallas|north texas|nationwide|local delivery|free shipping|white glove|return|returns|refund|warranty|damaged|damage|broken|defect|defective|missing parts?|contact|phone|call|customer service|support)\\b/.test(normalized);\n}\n\nfunction isAdviceIntentQuery(query) {\n  const normalized = String(query || '').toLowerCase();\n  if (!normalized.trim()) return false;\n  if (isServiceIntentQuery(query)) return false;\n  return /[?]|\\b(what|how|why|can|could|would|will|do|does|is|are|should|compare|difference|mean|help|guide|care|clean|cleaning|durable|pet|pets|kids|fit|measure|measuring|measurement|dimensions?|width|depth|height|clearance|walkway|space|room|boucle|boucl\u00E9|sherpa|fabric|material|recliner buying|comfort|mobility)\\b/.test(normalized);\n}\n\nfunction inferFinnIntentMode(query, payload = {}, nativeResults = {}) {\n  const nativeProducts = Array.isArray(nativeResults?.products) ? nativeResults.products : [];\n  if (isServiceIntentQuery(query)) return 'service';\n  if (isProductSearchPhrase(query) || (isSearchTermQuery(query) && nativeProducts.length)) return 'shopping';\n  if (isAdviceIntentQuery(query) || matchingFinnGuideTopics(query).length) return 'advice';\n  if (hasStructuredShoppingIntent(payload)) return 'shopping';\n  return 'advice';\n}\n\nfunction isGuideAnswerPayload(payload = {}) {\n  const title = String(payload.answer_title || '').toLowerCase();\n  const answer = String(payload.answer || '').toLowerCase();\n  return /\\b(dining|fit|clearance|material|pet|comfort|delivery|returns|warranty|store help|guide)\\b/.test(title)\n    || /\\b(clearance|guide|table size|chair pull-out|walking clearance|store help)\\b/.test(answer);\n}\n\nfunction shouldUseNativeSearchFirst(query, payload = {}, nativeResults = {}) {\n  const nativeProducts = Array.isArray(nativeResults?.products) ? nativeResults.products : [];\n  if (inferFinnIntentMode(query, payload, nativeResults) !== 'shopping') return false;\n  if ((!isSearchTermQuery(query) && !isProductSearchPhrase(query)) || !nativeProducts.length) return false;\n  if (!hasStructuredShoppingIntent(payload)) return true;\n  return isProductSearchPhrase(query) && isGuideAnswerPayload(payload);\n}\n\nfunction polishFinnAnswer(answer) {\n  let text = String(answer || '').trim();\n  if (!text) return '';\n\n  text = text\n    .replace(/^\\s*(Delivery|Dining fit|Fit|Material|Pets?|Comfort|Returns?|Warranty|Store help)\\s*:\\s*/i, '')\n    .replace(/\\bthe shopper wants\\b/gi, 'you want')\n    .replace(/\\bthe shopper needs\\b/gi, 'you need')\n    .replace(/\\bthe shopper has\\b/gi, 'you have')\n    .replace(/\\bshopper wants\\b/gi, 'you want')\n    .replace(/\\bshopper needs\\b/gi, 'you need')\n    .replace(/\\bshopper has\\b/gi, 'you have')\n    .replace(/\\bAsk for\\b/gi, 'Share')\n    .replace(/\\bUse the ([^.]+?) page for the full policy details\\.?/gi, 'The $1 page has the full details.')\n    .replace(/\\bUse the ([^.]+?) page as the source of truth\\.?/gi, 'The $1 page has the latest details.')\n    .replace(/\\bUse the product delivery badge as the source of truth for that exact item\\.?/gi, 'Check the product delivery badge for that exact item.')\n    .replace(/\\bsource of truth\\b/gi, 'best reference')\n    .replace(/\\s+/g, ' ')\n    .trim();\n\n  return text;\n}\n\nconst FINN_MATERIAL_REFERENCE = {\n  \"leather\": {\n    \"label\": \"Leather\",\n    \"description\": \"Leather is made from animal hide. The leather type and the panels it covers are separate details.\"\n  },\n  \"top_grain\": {\n    \"label\": \"Top-grain leather\",\n    \"description\": \"Leather from the upper layer of the hide. The term alone does not tell you which furniture panels use it.\"\n  },\n  \"full_grain\": {\n    \"label\": \"Full-grain leather\",\n    \"description\": \"Leather that retains its original grain surface. Full-grain describes the leather, rather than how much of the furniture it covers.\"\n  },\n  \"split\": {\n    \"label\": \"Split leather\",\n    \"description\": \"Leather from a layer beneath the grain layer of the hide. Its finish or coating can vary.\"\n  },\n  \"leather_match\": {\n    \"label\": \"Leather match\",\n    \"description\": \"Real leather on specified seating areas, with a matching covering on other panels. Check the product details for the areas and materials used.\"\n  },\n  \"leather_throughout\": {\n    \"label\": \"Leather throughout\",\n    \"description\": \"Natural leather covers the exterior upholstered surfaces. Different panels may use different leather types.\"\n  },\n  \"faux_leather\": {\n    \"label\": \"Faux leather\",\n    \"description\": \"A synthetic covering made to resemble leather. Its polymer, backing and finish depend on the product.\"\n  },\n  \"bonded\": {\n    \"label\": \"Bonded leather\",\n    \"description\": \"A composite covering made with leather fibers and binders. It is a different construction from an intact leather hide.\"\n  },\n  \"pu\": {\n    \"label\": \"PU / polyurethane upholstery\",\n    \"description\": \"PU means polyurethane. A covering may use a polyurethane coating; its backing helps distinguish synthetic upholstery from coated split leather.\"\n  },\n  \"coated_split\": {\n    \"label\": \"Bicast / polyurethane-coated split leather\",\n    \"description\": \"Split leather with a polyurethane surface coating. The hide backing and coating are separate parts of the covering.\"\n  },\n  \"vinyl\": {\n    \"label\": \"Vinyl upholstery\",\n    \"description\": \"A synthetic covering commonly made with PVC. Leather-look versions belong to the faux leather family.\"\n  },\n  \"fabric\": {\n    \"label\": \"Fabric upholstery\",\n    \"description\": \"A broad term for textile upholstery. Fiber content and fabric construction provide more specific information.\"\n  },\n  \"chenille\": {\n    \"label\": \"Chenille\",\n    \"description\": \"Fabric made with yarn that has short projecting fibers, creating a fuzzy surface. Chenille describes construction rather than one specific fiber.\"\n  },\n  \"boucle\": {\n    \"label\": \"Boucl\u00E9\",\n    \"description\": \"Fabric with looped or curled yarn that creates a textured surface. Boucl\u00E9 does not identify one particular fiber.\"\n  },\n  \"velvet\": {\n    \"label\": \"Velvet\",\n    \"description\": \"A pile fabric with a closely cut surface. Velvet describes the fabric construction, rather than one particular fiber.\"\n  },\n  \"polyester\": {\n    \"label\": \"Polyester\",\n    \"description\": \"A synthetic fiber used in many upholstery fabrics. It can appear in different textures, weaves and blends.\"\n  },\n  \"linen_look\": {\n    \"label\": \"Linen-look / linen-like fabric\",\n    \"description\": \"Fabric described as having the look of linen. The actual fiber content is a separate product detail.\"\n  }\n};\n\nconst FINN_GUIDE_TOPICS = [\n  {\n    id: 'fit',\n    title: 'Will it fit?',\n    url: '/pages/furniture-measuring-guide',\n    linkLabel: 'Measuring guide',\n    patterns: [\n      /\\b(will|would|can)\\s+.+\\s+fit\\b/,\n      /\\bfit\\b/,\n      /\\bmeasure|measuring|measurement|dimensions?|width|depth|height\\b/,\n      /\\bdoorway|stairs?|hallway|elevator|clearance|walking space\\b/,\n      /\\bsmall apartment|apartment size|small space\\b/\n    ],\n    answer: 'For fit, I start with the product width, depth, and height, then compare that with the room, doorway path, stairs or elevator, and walking clearance.',\n    bullets: [\n      'Measure the room footprint and the wall or open space where the piece will sit.',\n      'Check the delivery path: front door, hallways, stair turns, elevators, and tight corners.',\n      'If you know your room or doorway measurements, send them and I can help compare.'\n    ]\n  },\n  {\n    id: 'delivery',\n    title: 'How delivery works',\n    url: '/pages/fort-worth-dfw-furniture-delivery-guide',\n    linkLabel: 'Delivery guide',\n    patterns: [\n      /\\b(ship|shipping|deliver|delivery|delivered)\\b/,\n      /\\bzip|zipcode|postal|california|out of state|outside texas|texas|dfw|fort worth|dallas\\b/,\n      /\\bnationwide|local delivery|free shipping\\b/\n    ],\n    answer: 'Check the delivery label on the item you want. Local-delivery items are for the DFW area. Qualifying DFW orders of $999 and above receive free local delivery; below $999, delivery is $99. Items marked Free shipping ship to the contiguous U.S. If the page says Confirm delivery, contact us with the product and your ZIP code before ordering.',\n    bullets: [\n      'Check the product delivery badge for that exact item.',\n      'If an item is Fort Worth local delivery and you are outside the area, customer service can double-check by ZIP code.',\n      'For delivery edge cases, include the item name and your ZIP code.'\n    ]\n  },\n  {\"id\": \"pets\", \"title\": \"Choosing for pets\", \"url\": \"/pages/pet-friendly-sofa-materials\", \"linkLabel\": \"Sofas and pets guide\", \"answer\": \"Start with your pet\u2019s habits and the care instructions for the sofa you are considering. There is no single material name that guarantees a sofa will suit every pet household.\", \"bullets\": [\"For scratching, ask about the exact covering and construction. No material label establishes scratch resistance.\", \"For spills or accidents, check the manufacturer\u2019s cleaning instructions and any restrictions.\", \"Tell us whether hair, claws or spills are your main concern, along with the sofa you like. We can help check the available information before you choose.\"], \"patterns\": [/\\b(pets?|dogs?|cats?|scratch(?:es|ing)?|fur|hair|claws?|kid friendly|kids friendly|easy to clean|cleanable|stains?|durable fabric)\\b/] },\n  { id: 'material-leather_match', title: FINN_MATERIAL_REFERENCE.leather_match.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-leather-match', linkLabel: 'Upholstery material guide', patterns: [/\\bleather[ -]match\\b/], answer: FINN_MATERIAL_REFERENCE.leather_match.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-leather_throughout', title: FINN_MATERIAL_REFERENCE.leather_throughout.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-leather-throughout', linkLabel: 'Upholstery material guide', patterns: [/\\b(100% leather|all[ -]leather|full leather|leather throughout)\\b/], answer: FINN_MATERIAL_REFERENCE.leather_throughout.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-full_grain', title: FINN_MATERIAL_REFERENCE.full_grain.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-full-grain', linkLabel: 'Upholstery material guide', patterns: [/\\bfull[ -]grain\\b/], answer: FINN_MATERIAL_REFERENCE.full_grain.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-top_grain', title: FINN_MATERIAL_REFERENCE.top_grain.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-top-grain', linkLabel: 'Upholstery material guide', patterns: [/\\btop[ -]grain\\b/], answer: FINN_MATERIAL_REFERENCE.top_grain.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-coated_split', title: FINN_MATERIAL_REFERENCE.coated_split.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-coated-split', linkLabel: 'Upholstery material guide', patterns: [/\\b(coated split|pu[ -]coated leather)\\b/], answer: FINN_MATERIAL_REFERENCE.coated_split.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-split', title: FINN_MATERIAL_REFERENCE.split.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-split', linkLabel: 'Upholstery material guide', patterns: [/\\bsplit leather\\b/], answer: FINN_MATERIAL_REFERENCE.split.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-bonded', title: FINN_MATERIAL_REFERENCE.bonded.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-bonded', linkLabel: 'Upholstery material guide', patterns: [/\\bbonded\\b/], answer: FINN_MATERIAL_REFERENCE.bonded.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-pu', title: FINN_MATERIAL_REFERENCE.pu.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-pu', linkLabel: 'Upholstery material guide', patterns: [/\\bpu\\b|\\bpolyurethane\\b/], answer: FINN_MATERIAL_REFERENCE.pu.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-faux_leather', title: FINN_MATERIAL_REFERENCE.faux_leather.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-faux-leather', linkLabel: 'Upholstery material guide', patterns: [/\\b(faux leather|leatherette|synthetic leather)\\b/], answer: FINN_MATERIAL_REFERENCE.faux_leather.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-vinyl', title: FINN_MATERIAL_REFERENCE.vinyl.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-vinyl', linkLabel: 'Upholstery material guide', patterns: [/\\b(vinyl|pvc)\\b/], answer: FINN_MATERIAL_REFERENCE.vinyl.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-leather', title: FINN_MATERIAL_REFERENCE.leather.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-leather', linkLabel: 'Upholstery material guide', patterns: [/\\bleather\\b/], answer: FINN_MATERIAL_REFERENCE.leather.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-chenille', title: FINN_MATERIAL_REFERENCE.chenille.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-chenille', linkLabel: 'Upholstery material guide', patterns: [/\\bchenille\\b/], answer: FINN_MATERIAL_REFERENCE.chenille.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-boucle', title: FINN_MATERIAL_REFERENCE.boucle.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-boucle', linkLabel: 'Upholstery material guide', patterns: [/\\bboucl[e\u00E9]\\b/], answer: FINN_MATERIAL_REFERENCE.boucle.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-velvet', title: FINN_MATERIAL_REFERENCE.velvet.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-velvet', linkLabel: 'Upholstery material guide', patterns: [/\\bvelvet\\b/], answer: FINN_MATERIAL_REFERENCE.velvet.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-polyester', title: FINN_MATERIAL_REFERENCE.polyester.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-polyester', linkLabel: 'Upholstery material guide', patterns: [/\\bpolyester\\b/], answer: FINN_MATERIAL_REFERENCE.polyester.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-linen_look', title: FINN_MATERIAL_REFERENCE.linen_look.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-linen-look', linkLabel: 'Upholstery material guide', patterns: [/\\blinen[ -]look\\b/], answer: FINN_MATERIAL_REFERENCE.linen_look.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-fabric', title: FINN_MATERIAL_REFERENCE.fabric.label, url: '/pages/chenille-vs-boucle-vs-faux-leather#material-fabric', linkLabel: 'Upholstery material guide', patterns: [/\\bfabric\\b/], answer: FINN_MATERIAL_REFERENCE.fabric.description, bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  { id: 'material-unknown', title: 'Check the exact upholstery', url: '/pages/chenille-vs-boucle-vs-faux-leather', linkLabel: 'Upholstery material guide', patterns: [/\\b(sherpa|teddy|performance fabric|upholstery|material)\\b/], answer: 'The label alone may not identify the covering, fiber content or care requirements. Check the product\u2019s detailed upholstery information or send our team the item link.', bullets: [\"What is the covering made from? Look for fiber content, hide type, coating or backing where specified.\", \"Which parts use it? On mixed upholstery, ask about the seats, inside arms, outside arms and back.\", \"Use the product\u2019s care instructions for cleaning. The material name alone does not establish durability or suitability for pets.\"] },\n  {\n    id: 'dining-clearance',\n    title: 'Dining table size and clearance',\n    url: '/pages/dining-table-size-clearance-guide',\n    linkLabel: 'Dining clearance guide',\n    patterns: [\n      /\\bdining\\b.*\\b(clearance|space|room|fit|size|seat|seats|chairs?)\\b/,\n      /\\b(table|chairs?)\\b.*\\b(clearance|walkway|space|room)\\b/,\n      /\\b(clearance|walkway|space|room)\\b.*\\b(dining|table|chairs?)\\b/,\n      /\\bcounter height|bar height|standard height|stool height|bar stool|counter stool\\b/\n    ],\n    answer: 'For dining fit, the table size is only part of the answer. Chair pull-out room and walking clearance around the table matter just as much.',\n    bullets: [\n      'Think about seated space, chair movement, and walkways around the table.',\n      'Counter-height and bar-height seating are different, so match stool height to the table or counter.',\n      'Tell me your room size and how many seats you want, and I can narrow the table path.'\n    ]\n  },\n  {\n    id: 'recliners',\n    title: 'Recliner buying guide',\n    url: '/pages/recliner-buying-guide-comfort-mobility',\n    linkLabel: 'Recliner guide',\n    patterns: [\n      /\\brecliner|recliners|power motion|manual motion|lift chair|rocker|glider|swivel\\b/,\n      /\\bmobility|comfort|footrest|wall hugger\\b/\n    ],\n    answer: 'For recliners, I compare comfort, motion type, room clearance, seat scale, and how the person will use it every day.',\n    bullets: [\n      'Power motion can be easier for daily use, while manual motion may be simpler.',\n      'Check wall clearance and fully reclined depth before choosing.',\n      'For mobility needs, seat height, arm support, and control placement matter.'\n    ]\n  },\n  {\n    id: 'returns-warranty',\n    title: 'Returns and warranty',\n    url: '/pages/returns-warranty-explained',\n    linkLabel: 'Returns and warranty guide',\n    patterns: [\n      /\\breturn|returns|refund|warranty|damaged|damage|broken|defect|defective|missing parts?|arrived\\b/,\n      /\\bwhat if something goes wrong\\b/\n    ],\n    answer: 'For returns, warranty, damage, or missing-parts questions, start with the store policy page and contact customer service quickly with order and item details.',\n    bullets: [\n      'Keep packaging and take photos if something arrives damaged.',\n      'Include your order number, item name, and clear photos when contacting support.',\n      'Policies can depend on timing and item condition, so the guide is the best next step.'\n    ]\n  }\n];\n\nfunction matchingFinnGuideTopics(query) {\n  const normalized = String(query || '').toLowerCase().normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n  if (!normalized.trim()) return [];\n  if (isProductSearchPhrase(query)) return [];\n  const matches = FINN_GUIDE_TOPICS.filter((topic) => topic.patterns.some((pattern) => pattern.test(normalized)));\n  const specific = matches.some((topic) => topic.id.startsWith('material-') && !['material-leather', 'material-fabric', 'material-unknown'].includes(topic.id));\n  return matches.filter((topic) => !specific || !['material-leather', 'material-fabric', 'material-unknown'].includes(topic.id)).slice(0, 2);\n}\n\nfunction isGeneralMaterialHelp(query) {\n  if (/\\b(this|that|these|those|sku|item|model)\\b/i.test(String(query || ''))) return false;\n  return matchingFinnGuideTopics(query).some((topic) => topic.id.startsWith('material-') || topic.id === 'pets');\n}\n\nfunction openMaterialGuideAnchor() {\n  const id = window.location.hash.slice(1);\n  if (!id.startsWith('material-')) return;\n  const target = document.getElementById(id);\n  if (target && target.matches('.fh-material details')) target.open = true;\n}\nwindow.addEventListener('hashchange', openMaterialGuideAnchor);\nopenMaterialGuideAnchor();\n\nfunction renderFinnGuideAnswer(query) {\n  const topics = matchingFinnGuideTopics(query);\n  if (!topics.length) return '';\n  const primary = topics[0];\n  const secondary = topics.slice(1);\n  return `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__answer resku-ai-assistant__answer--chat resku-ai-assistant__answer--guide\">\n      <div class=\"resku-ai-assistant__avatar\" aria-hidden=\"true\">F</div>\n      <div class=\"resku-ai-assistant__bubble\">\n        <h3>Finn</h3>\n        <p>${escapeHtml(primary.answer)}</p>\n        <ul class=\"resku-ai-assistant__guide-points\">\n          ${primary.bullets.map((bullet) => `<li>${escapeHtml(bullet)}</li>`).join('')}\n        </ul>\n        <div class=\"resku-ai-assistant__guide-actions\">\n          <a href=\"${escapeHtml(primary.url)}\">${escapeHtml(primary.linkLabel)}</a>\n          ${secondary.map((topic) => `<a href=\"${escapeHtml(topic.url)}\">${escapeHtml(topic.linkLabel)}</a>`).join('')}\n        </div>\n        <span class=\"resku-ai-assistant__answer-context\">${escapeHtml(primary.title)}</span>\n      </div>\n    </div>\n  `;\n}\n\nfunction productSuggestionReason(reason, query) {\n  const text = String(reason || '').trim();\n  if (!text) return 'A strong place to start.';\n  if (/matches\\s+.+;\\s+belongs in/i.test(text)) {\n    return `A relevant ${shopperQueryLabel(query)} option to compare.`;\n  }\n  return text\n    .replace(/^Literal Shopify search match$/i, 'Search result')\n    .replace(/catalog/i, 'store');\n}\n\nfunction renderNativeSearchResults(resultPayload, submittedQuery) {\n  const products = Array.isArray(resultPayload?.products) ? resultPayload.products : [];\n  const query = resultPayload?.query || submittedQuery || '';\n  const label = shopperQueryLabel(query);\n  const searchUrl = `/search?q=${encodeURIComponent(query || '')}&type=product`;\n  const isPrimary = resultPayload?.primary === true;\n  return `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__regular-search\">\n      <div class=\"resku-ai-assistant__group-heading\">\n        <h3>${isPrimary ? `${escapeHtml(titleCaseLabel(label))} results` : `More ${escapeHtml(label)} results`}</h3>\n        <a href=\"${escapeHtml(searchUrl)}\">View all</a>\n      </div>\n      ${resultPayload?.usedFallback ? `<p>Showing close search results for \"${escapeHtml(query)}\".</p>` : ''}\n      ${products.length ? `\n        <div class=\"resku-ai-assistant__products\">\n          ${products.slice(0, 4).map((product) => `\n            <a href=\"${escapeHtml(product.url)}\">\n              ${product.image_url ? `\n                <img\n                  src=\"${escapeHtml(product.image_url)}\"\n                  alt=\"${escapeHtml(product.title)}\"\n                  loading=\"lazy\"\n                  width=\"84\"\n                  height=\"84\"\n                >\n              ` : ''}\n              <span class=\"resku-ai-assistant__product-copy\">\n                <strong>${escapeHtml(product.title)}</strong>\n                ${formatNativeSearchPrice(product.price) ? `<span class=\"resku-ai-assistant__product-facts\">${escapeHtml(formatNativeSearchPrice(product.price))}</span>` : ''}\n                <span>Search result</span>\n              </span>\n            </a>\n          `).join('')}\n        </div>\n      ` : `\n        <p>No extra search suggestions came back for this phrase.</p>\n      `}\n    </div>\n  `;\n}\n\nfunction regularSearchUrl(query) {\n  return `/search?q=${encodeURIComponent(query || '')}&type=product`;\n}\n\nfunction hasBackendContactHandoff(payload = {}) {\n  return Boolean(payload?.contact_handoff);\n}\n\nfunction hasGuidedShoppingSignals(payload = {}) {\n  return Boolean(\n    hasStructuredShoppingIntent(payload)\n    || (Array.isArray(payload?.product_recommendations) && payload.product_recommendations.length)\n    || (Array.isArray(payload?.recommended_filters) && payload.recommended_filters.length)\n    || (Array.isArray(payload?.follow_up_questions) && payload.follow_up_questions.length)\n  );\n}\n\nfunction hasHelpSignals(payload = {}) {\n  return Boolean(\n    hasBackendContactHandoff(payload)\n    || (Array.isArray(payload?.help_cards) && payload.help_cards.length)\n    || /^store help$/i.test(String(payload?.answer_title || '').trim())\n  );\n}\n\nfunction isAmbiguousGatewayQuery(query, payload = {}) {\n  if (!isBroadShoppingQuery(query)) return false;\n  if (isServiceIntentQuery(query) || isAdviceIntentQuery(query)) return false;\n  if (hasStructuredShoppingIntent(payload)) return false;\n  return true;\n}\n\nfunction classifyStorefrontUiIntent(query, payload = {}, nativeResults = {}, uiState = {}) {\n  if (uiState.forceMode === 'guided_finn' || uiState.active) return 'guided_finn';\n  if (uiState.forceMode === 'regular_search') return 'regular_search';\n  if (isServiceIntentQuery(query) || isAdviceIntentQuery(query) || hasHelpSignals(payload)) return 'help_question';\n  if (isAmbiguousGatewayQuery(query, payload)) return 'intent_gateway';\n  if (queryWantsPremium(query) || payload?.intent?.sort === 'price_desc') return 'guided_finn';\n  if (isProductSearchPhrase(query) || isSearchTermQuery(query) || hasGuidedShoppingSignals(payload) || Array.isArray(nativeResults?.products) && nativeResults.products.length) {\n    return 'regular_search';\n  }\n  return 'help_question';\n}\n\nfunction renderRegularSearchEscape(query, label = 'Regular search') {\n  return `\n    <a class=\"resku-ai-assistant__escape-link\" href=\"${escapeHtml(regularSearchUrl(query))}\">\n      ${escapeHtml(label)}\n    </a>\n  `;\n}\n\nfunction renderIntentActionBar(query, uiIntent, options = {}) {\n  const showGuided = options.showGuided !== false;\n  const guidedActive = uiIntent === 'guided_finn';\n  return `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__intent-actions\">\n      <div class=\"resku-ai-assistant__intent-actions-copy\">\n        <strong>${guidedActive ? 'Guided Finn shopping is active.' : 'Website search stays available.'}</strong>\n        <p>${guidedActive ? 'You can keep shopping with Finn, or jump back to the real website results at any point.' : 'Use the real website search for the original query, or switch into guided shopping when you want help narrowing it down.'}</p>\n      </div>\n      <div class=\"resku-ai-assistant__intent-actions-buttons\">\n        ${renderRegularSearchEscape(query, uiIntent === 'regular_search' ? 'Open website results' : 'Search the website')}\n        ${showGuided ? `<button type=\"button\" data-resku-ai-action=\"guided_finn\">${guidedActive ? 'Continue with Finn' : 'Shop with Finn'}</button>` : ''}\n      </div>\n    </div>\n  `;\n}\n\nfunction renderIntentGateway(query, nativeResults = {}) {\n  const preview = renderNativeSearchResults({ ...shapeNativeSearchResults(nativeResults, query), primary: true }, query);\n  return `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__gateway\">\n      <div class=\"resku-ai-assistant__gateway-copy\">\n        <h3>${escapeHtml(titleCaseLabel(shopperQueryLabel(query)))} search</h3>\n        <p>This looks like a broad product search. You can browse exact Shopify results right away, or have Finn guide the shopping session.</p>\n      </div>\n      <div class=\"resku-ai-assistant__gateway-actions\">\n        <a class=\"button button--secondary\" href=\"${escapeHtml(regularSearchUrl(query))}\">Browse regular results</a>\n        <button class=\"button\" type=\"button\" data-resku-ai-action=\"guided_finn\">Shop with Finn</button>\n      </div>\n    </div>\n    ${preview}\n  `;\n}\n\nfunction currentPageQueryParams() {\n  return new URLSearchParams(window.location.search || '');\n}\n\nconst FINN_GUIDED_SESSION_SCHEMA = 'resku_finn_guided_session_v1';\n\nfunction finnGuidedSessionKey(hostname = window.location.hostname) {\n  return `resku:finn:guided:${String(hostname || '').toLowerCase()}`;\n}\n\nfunction loadFinnGuidedSession() {\n  try {\n    const raw = window.sessionStorage?.getItem(finnGuidedSessionKey()) || '';\n    const value = raw ? JSON.parse(raw) : {};\n    if (value?.schema_version !== FINN_GUIDED_SESSION_SCHEMA) return {};\n    return value;\n  } catch (error) {\n    return {};\n  }\n}\n\nfunction visibleFinnPayload(payload = {}) {\n  const keys = [\n    'answer_title', 'answer', 'recommended_filters', 'product_recommendations',\n    'follow_up_questions', 'help_cards', 'citations', 'contact_handoff',\n    'intent', 'conversation', 'finn_session_id'\n  ];\n  return keys.reduce((result, key) => {\n    if (payload[key] !== undefined) result[key] = payload[key];\n    return result;\n  }, {});\n}\n\nfunction saveFinnGuidedSession(session = {}) {\n  const value = {\n    schema_version: FINN_GUIDED_SESSION_SCHEMA,\n    store_domain: window.location.hostname,\n    updated_at: new Date().toISOString(),\n    ...session,\n    messages: Array.isArray(session.messages) ? session.messages.slice(-10) : []\n  };\n  try {\n    window.sessionStorage?.setItem(finnGuidedSessionKey(), JSON.stringify(value));\n  } catch (error) {\n    // A private browser mode may decline storage; Finn still works in-page.\n  }\n  return value;\n}\n\nfunction finnTravelUrl(urlLike) {\n  const url = new URL(urlLike || '/', window.location.origin);\n  if (url.origin !== window.location.origin) return url.toString();\n  url.searchParams.set('finn_resume', '1');\n  url.searchParams.set('finn_mode', 'guided_finn');\n  return url.toString();\n}\n\nfunction renderFinnConversationHistory(messages = []) {\n  const earlier = messages.slice(0, -2);\n  if (!earlier.length) return '';\n  return `\n    <details class=\"resku-ai-assistant__history\">\n      <summary>Earlier chat with Finn (${Math.ceil(earlier.length / 2)} turn${earlier.length > 2 ? 's' : ''})</summary>\n      <div class=\"resku-ai-assistant__history-log\">\n        ${earlier.map((message) => `\n          <p class=\"resku-ai-assistant__history-message resku-ai-assistant__history-message--${message.role === 'assistant' ? 'finn' : 'shopper'}\">\n            <strong>${message.role === 'assistant' ? 'Finn' : 'You'}</strong>\n            <span>${escapeHtml(message.text || '')}</span>\n          </p>\n        `).join('')}\n      </div>\n    </details>\n  `;\n}\n\nfunction renderFinnMemorySummary(conversation = {}) {\n  const summary = String(conversation?.summary || '').trim();\n  const turnCount = Number(conversation?.turn_count || 0);\n  if (!summary || turnCount < 2) return '';\n  return `\n    <div class=\"resku-ai-assistant__memory\" aria-label=\"What Finn is remembering\">\n      <span>Shopping plan \u00B7 ${turnCount} turns</span>\n      <p>${escapeHtml(summary)}</p>\n    </div>\n  `;\n}\n\nfunction renderFinnResumeLanding(node, session = {}) {\n  if (!node) return;\n  const pending = session.pending_navigation || {};\n  const summary = String(session.conversation?.summary || '').trim();\n  const targetLabel = String(pending.label || document.title || 'this page').trim();\n  node.innerHTML = `\n    <span class=\"resku-ai-resume__eyebrow\">Finn came with you</span>\n    <strong>We\u2019re at ${escapeHtml(targetLabel)}.</strong>\n    <p>${summary ? `I still have: ${escapeHtml(summary)}.` : 'Your guided-shopping conversation is ready to continue.'} Ask about this page without starting over.</p>\n  `;\n  node.hidden = false;\n}\n\nfunction budgetFromQuery(query) {\n  const text = String(query || '').toLowerCase();\n  const underMatch = text.match(/\\b(?:under|below|less than|max(?:imum)?|up to)\\s+\\$?\\s*([\\d,]+)/i);\n  if (underMatch) {\n    return { max: Number(String(underMatch[1] || '').replace(/,/g, '')) || 0 };\n  }\n  const overMatch = text.match(/\\b(?:over|above|more than|min(?:imum)?|starting at)\\s+\\$?\\s*([\\d,]+)/i);\n  if (overMatch) {\n    return { min: Number(String(overMatch[1] || '').replace(/,/g, '')) || 0 };\n  }\n  return { min: 0, max: 0 };\n}\n\nfunction normalizeLooseToken(value) {\n  return String(value || '')\n    .toLowerCase()\n    .replace(/&/g, ' and ')\n    .replace(/[^a-z0-9]+/g, ' ')\n    .trim();\n}\n\nfunction mergeSearchParams(targetParams, urlLike) {\n  if (!urlLike) return;\n  try {\n    const parsed = new URL(urlLike, window.location.origin);\n    parsed.searchParams.forEach((value, key) => {\n      if (!key || key === 'page') return;\n      targetParams.set(key, value);\n    });\n  } catch (error) {\n    // Ignore malformed fallback URLs from context payloads.\n  }\n}\n\nfunction collectionPathForQuery(query, context = {}) {\n  const normalized = ` ${normalizeLooseToken(query)} `;\n  const currentHandle = String(context?.collection?.handle || '');\n  const pathMap = [\n    { test: /\\b(sectional|modular sectional|u shaped|l shaped)\\b/, path: '/collections/stationary-sectional-sofas-1' },\n    { test: /\\b(sleeper sofa|sofa bed|futon|convertible sofa)\\b/, path: '/collections/convertible-sofa-futon' },\n    { test: /\\b(loveseat|loveseats)\\b/, path: '/collections/loveseats' },\n    { test: /\\b(recliner|recliners|lift chair|power recliner|glider recliner)\\b/, path: '/collections/reclining-chairs' },\n    { test: /\\b(sofa|sofas|couch|couches)\\b/, path: '/collections/all-sofas-loveseats' },\n    { test: /\\b(coffee table|accent table|end table|console table|sofa table)\\b/, path: '/collections/coffee-accent-tables' }\n  ];\n\n  const match = pathMap.find((entry) => entry.test.test(normalized));\n  if (!match) return currentHandle ? `/collections/${currentHandle}` : '';\n  return match.path;\n}\n\nfunction queryFilterMatch(valueLabel, query) {\n  const normalizedLabel = normalizeLooseToken(valueLabel);\n  const normalizedQuery = ` ${normalizeLooseToken(query)} `;\n  if (!normalizedLabel) return false;\n  if (normalizedLabel.includes('nationwide free shipping')) {\n    return /\\b(nationwide|ships free|free shipping)\\b/i.test(String(query || ''));\n  }\n  if (normalizedLabel.includes('fort worth local delivery')) {\n    return /\\b(local delivery|fort worth|dfw|dallas)\\b/i.test(String(query || ''));\n  }\n  if (normalizedQuery.includes(` ${normalizedLabel} `)) return true;\n  const labelTokens = normalizedLabel.split(' ').filter(Boolean);\n  return labelTokens.some((token) => token.length > 3 && normalizedQuery.includes(` ${token} `));\n}\n\nfunction applyQueryToCollectionUrl(query, context = {}) {\n  if (String(context?.surface || '') !== 'collection' || !context?.collection?.url) return '';\n\n  const targetPath = collectionPathForQuery(query, context) || context.collection.url;\n  const targetUrl = new URL(targetPath, window.location.origin);\n  const currentParams = currentPageQueryParams();\n  const currentSort = currentParams.get('sort_by');\n  if (currentSort) targetUrl.searchParams.set('sort_by', currentSort);\n\n  const budget = budgetFromQuery(query);\n  if (budget.min > 0) targetUrl.searchParams.set('filter.v.price.gte', String(budget.min));\n  if (budget.max > 0) targetUrl.searchParams.set('filter.v.price.lte', String(budget.max));\n\n  const filters = Array.isArray(context?.available_filters) ? context.available_filters : [];\n  filters.forEach((filter) => {\n    const filterLabel = normalizeLooseToken(filter?.label);\n    if (!['style', 'color', 'material', 'upholstery', 'delivery', 'product type', 'seating type'].includes(filterLabel)) {\n      return;\n    }\n\n    const values = Array.isArray(filter?.values) ? filter.values : [];\n    const matchingValue = values.find((value) => queryFilterMatch(value?.label, query));\n    if (matchingValue?.url) {\n      mergeSearchParams(targetUrl.searchParams, matchingValue.url);\n    }\n  });\n\n  return targetUrl.toString();\n}\n\nfunction shouldRedirectCollectionResults(query, context = {}, payload = {}, nativeResults = {}, uiState = {}) {\n  if (String(context?.surface || '') !== 'collection') return '';\n  const uiIntent = classifyStorefrontUiIntent(query, payload, nativeResults, uiState);\n  if (!['guided_finn', 'regular_search', 'intent_gateway'].includes(uiIntent)) return '';\n  if (!isProductSearchPhrase(query) && !isGenericSofaQuery(query) && !hasGuidedShoppingSignals(payload)) return '';\n\n  const nextUrl = applyQueryToCollectionUrl(query, context);\n  if (!nextUrl) return '';\n\n  const currentUrl = new URL(window.location.href);\n  ['finn_query', 'finn_mode'].forEach((key) => currentUrl.searchParams.delete(key));\n  const nextParsed = new URL(nextUrl, window.location.origin);\n  ['finn_query', 'finn_mode'].forEach((key) => nextParsed.searchParams.delete(key));\n  const normalizedCurrent = `${currentUrl.pathname}?${currentUrl.searchParams.toString()}`;\n  const normalizedNext = `${nextParsed.pathname}?${nextParsed.searchParams.toString()}`;\n  return normalizedCurrent === normalizedNext ? '' : nextParsed.toString();\n}\n\nconst SHOPPER_CONTACT_ALERT_ENDPOINT_PATH = '/api/theme-ai/shopper-contact-alert';\nconst SHOPPER_CONTACT_ALERT_ENDPOINT_OVERRIDE = typeof window !== 'undefined' && window.RESKU_SHOPPER_CONTACT_ALERT_ENDPOINT\n  ? window.RESKU_SHOPPER_CONTACT_ALERT_ENDPOINT\n  : '';\n\nfunction normalizeContactMethod(value) {\n  const normalized = String(value || '').toLowerCase().trim();\n  if (['email', 'phone_call', 'text', 'either'].includes(normalized)) return normalized;\n  return 'unspecified';\n}\n\nfunction contactConsentValue(isGranted) {\n  return isGranted ? 'granted' : 'declined';\n}\n\nfunction conciseText(value, fallback = '') {\n  const text = String(value || '').replace(/\\s+/g, ' ').trim();\n  return text || fallback;\n}\n\nfunction inferStoreKey(storefront) {\n  const normalized = String(storefront || '').toLowerCase();\n  if (normalized.includes('finally')) return 'finally_home';\n  return normalized\n    .replace(/[^a-z0-9]+/g, '_')\n    .replace(/^_+|_+$/g, '') || 'unknown_store';\n}\n\nfunction buildQuestionSummary(query, payload = {}) {\n  const handoff = payload.contact_handoff || {};\n  if (typeof handoff === 'object') {\n    const summary = conciseText(handoff.question_summary || handoff.summary || handoff.title || handoff.label);\n    if (summary) return summary;\n  }\n  const answerTitle = conciseText(payload.answer_title);\n  if (answerTitle && !/^finn note$/i.test(answerTitle)) return answerTitle;\n  return conciseText(query, 'Shopper requested store follow-up from Finn.');\n}\n\nfunction buildConversationExcerpt(query, payload = {}) {\n  const handoff = payload.contact_handoff || {};\n  if (typeof handoff === 'object') {\n    const excerpt = conciseText(handoff.conversation_excerpt || handoff.excerpt);\n    if (excerpt) return excerpt;\n  }\n  const parts = [\n    query ? `Shopper: ${query}` : '',\n    payload.answer ? `Finn: ${polishFinnAnswer(payload.answer)}` : ''\n  ].filter(Boolean);\n  return conciseText(parts.join(' | '), 'Shopper requested store follow-up from Finn.');\n}\n\nfunction pageContextFromAssistant(context = {}) {\n  const product = context.product || {};\n  const collection = context.collection || {};\n  const storefront = conciseText(context.shop, 'Finally Home');\n  return {\n    storefront,\n    store_key: inferStoreKey(storefront),\n    page_url: window.location.href,\n    page_type: context.page_type || context.surface || document.body?.dataset?.template || '',\n    locale: document.documentElement.lang || '',\n    product_handle: product.handle || '',\n    product_title: product.title || '',\n    collection_handle: collection.handle || '',\n    collection_title: collection.title || ''\n  };\n}\n\nfunction buildShopperContactAlert(form, context = {}, uiState = {}) {\n  const data = new FormData(form);\n  const payload = uiState.lastPayload || {};\n  const query = uiState.lastQuery || uiState.originalQuery || '';\n  const pageContext = pageContextFromAssistant(context);\n  const preferredContactMethod = normalizeContactMethod(data.get('preferred_contact_method'));\n  const shopperName = conciseText(data.get('shopper_name'));\n  const shopperEmail = conciseText(data.get('shopper_email'));\n  const shopperPhone = conciseText(data.get('shopper_phone'));\n  const contactConsent = contactConsentValue(data.get('contact_consent') === 'granted');\n  const shopperMessage = conciseText(data.get('shopper_message'));\n\n  return {\n    alert_type: 'shopper_contact_request',\n    status: 'new',\n    storefront: pageContext.storefront,\n    store_key: pageContext.store_key,\n    shopper_name: shopperName,\n    shopper_email: shopperEmail,\n    shopper_phone: shopperPhone,\n    preferred_contact_method: preferredContactMethod,\n    contact_consent: contactConsent,\n    question_summary: buildQuestionSummary(query, payload),\n    conversation_excerpt: buildConversationExcerpt(query, payload),\n    shopper_message: shopperMessage,\n    page_url: pageContext.page_url,\n    page_type: pageContext.page_type,\n    product_handle: pageContext.product_handle,\n    product_title: pageContext.product_title,\n    collection_handle: pageContext.collection_handle,\n    collection_title: pageContext.collection_title,\n    escalation_reason: payload.contact_handoff?.escalation_reason || 'human_follow_up_requested',\n    finn_confidence: payload.contact_handoff?.finn_confidence || payload.finn_confidence || 'unspecified',\n    conversation_id: uiState.finnSessionId || payload.finn_session_id || '',\n    locale: pageContext.locale,\n    captured_at: new Date().toISOString()\n  };\n}\n\nfunction validateShopperContactAlert(alert) {\n  const missing = [];\n  if (!alert.shopper_name) missing.push('your name');\n  if (!alert.shopper_email && !alert.shopper_phone) missing.push('an email or phone number');\n  if (!alert.preferred_contact_method || alert.preferred_contact_method === 'unspecified') missing.push('a preferred contact method');\n  if (alert.contact_consent !== 'granted') missing.push('permission for the store to contact you');\n  if (!alert.question_summary) missing.push('a question summary');\n  if (!alert.conversation_excerpt) missing.push('the Finn conversation context');\n  if (!alert.storefront) missing.push('storefront');\n  if (!alert.captured_at) missing.push('capture time');\n  return missing;\n}\n\nfunction shopperContactAlertEndpoints(baseEndpoint) {\n  if (SHOPPER_CONTACT_ALERT_ENDPOINT_OVERRIDE) {\n    return [SHOPPER_CONTACT_ALERT_ENDPOINT_OVERRIDE];\n  }\n  const endpoint = resolveReskuAiEndpoint(baseEndpoint, SHOPPER_CONTACT_ALERT_ENDPOINT_PATH);\n  return endpointFallbacks(endpoint, SHOPPER_CONTACT_ALERT_ENDPOINT_PATH);\n}\n\nasync function postShopperContactAlert(alert, endpoints) {\n  const body = JSON.stringify(alert);\n  let lastError;\n  for (const endpoint of endpoints.filter(Boolean)) {\n    try {\n      const response = await fetch(endpoint, {\n        method: 'POST',\n        headers: {\n          'Content-Type': 'application/json',\n          'bypass-tunnel-reminder': 'true'\n        },\n        credentials: 'omit',\n        body\n      });\n      if (!response.ok) {\n        throw new Error(`Contact alert failed with ${response.status}`);\n      }\n      return response.json().catch(() => ({}));\n    } catch (error) {\n      lastError = error;\n    }\n  }\n  throw lastError || new Error('Contact alert failed');\n}\n\nfunction renderContactHandoff(payload = {}) {\n  const handoff = payload?.contact_handoff;\n  if (!handoff) return '';\n  const title = typeof handoff === 'object' ? handoff.title || handoff.label || 'Contact help' : 'Contact help';\n  const text = typeof handoff === 'object'\n    ? handoff.text || handoff.description || 'I can pass this to the store team and ask them to follow up.'\n    : String(handoff);\n  return `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__contact-handoff\">\n      <h3>${escapeHtml(title)}</h3>\n      ${text ? `<p>${escapeHtml(text)}</p>` : ''}\n      <form class=\"resku-ai-contact-form\" data-resku-contact-form>\n        <label>\n          <span>Name</span>\n          <input name=\"shopper_name\" autocomplete=\"name\" required>\n        </label>\n        <div class=\"resku-ai-contact-form__grid\">\n          <label>\n            <span>Email</span>\n            <input name=\"shopper_email\" type=\"email\" autocomplete=\"email\">\n          </label>\n          <label>\n            <span>Phone</span>\n            <input name=\"shopper_phone\" type=\"tel\" autocomplete=\"tel\">\n          </label>\n        </div>\n        <label>\n          <span>Preferred contact</span>\n          <select name=\"preferred_contact_method\" required>\n            <option value=\"\">Choose one</option>\n            <option value=\"email\">Email</option>\n            <option value=\"phone_call\">Phone call</option>\n            <option value=\"text\">Text</option>\n            <option value=\"either\">Either is fine</option>\n          </select>\n        </label>\n        <label>\n          <span>Anything else the store should know?</span>\n          <textarea name=\"shopper_message\" rows=\"3\" placeholder=\"Optional: timing, product names, room details, or best time to reach you.\"></textarea>\n        </label>\n        <label class=\"resku-ai-contact-form__consent\">\n          <input type=\"checkbox\" name=\"contact_consent\" value=\"granted\" required>\n          <span>Yes, the store may contact me about this question.</span>\n        </label>\n        <button class=\"button\" type=\"submit\">Send to store team</button>\n        <p class=\"resku-ai-contact-form__status\" data-resku-contact-status hidden></p>\n      </form>\n    </div>\n  `;\n}\n\nfunction humanizeCustomerVoiceRoom(title) {\n  const rawRoom = String(title || '').split(':').pop()?.trim().toLowerCase();\n  const roomLabels = {\n    living: 'living room',\n    dining: 'dining room',\n    bedroom: 'bedroom',\n    kids: 'kids room',\n    office: 'home office',\n    accents: 'accent'\n  };\n  return roomLabels[rawRoom] || rawRoom || 'similar';\n}\n\nfunction formatCustomerVoiceSummary(summary) {\n  const text = String(summary || '').trim();\n  if (!text) return '';\n\n  const ratingMatch = text.match(/(\\d+)\\s+public reviews?\\s+average\\s+([\\d.]+)\\s+stars?/i);\n  const sentences = text.split('.').map((sentence) => sentence.trim()).filter(Boolean);\n  const themes = sentences\n    .filter((sentence) => /mention/i.test(sentence))\n    .map((sentence) => sentence\n      .replace(/^Some reviews mention\\s+/i, '')\n      .replace(/^Customers often mention\\s+/i, '')\n      .replace(/^Reviews mention\\s+/i, '')\n      .trim())\n    .filter(Boolean);\n\n  const parts = [];\n  if (ratingMatch) {\n    parts.push(`Based on ${ratingMatch[1]} public reviews averaging ${ratingMatch[2]} stars.`);\n  }\n  if (themes.length) {\n    parts.push(`Common themes: ${themes.join('; ')}.`);\n  }\n  parts.push('Use the product specs for exact fit, dimensions, and materials.');\n  return parts.join(' ');\n}\n\nfunction formatCustomerVoiceItem(item) {\n  const rawLabel = String(item?.label || '').trim();\n  const rawText = String(item?.text || '').trim();\n  const positive = /positive/i.test(rawLabel);\n  const concern = /concern/i.test(rawLabel);\n  const baseLabel = rawLabel\n    .replace(/\\s+Positive$/i, '')\n    .replace(/\\s+Concern$/i, '')\n    .replace(/_/g, ' ')\n    .trim();\n  const labelMap = {\n    Assembly: 'Assembly notes',\n    Comfort: 'Comfort',\n    Delivery: 'Delivery and setup',\n    Service: 'Service',\n    Quality: 'Quality',\n    Value: 'Value',\n    Style: 'Style'\n  };\n  const countMatch = rawText.match(/Seen in\\s+(\\d+)\\s+public reviews?/i);\n  let text = rawText;\n\n  if (countMatch) {\n    const count = Number(countMatch[1]);\n    const reviewWord = count === 1 ? 'review' : 'reviews';\n    if (concern) {\n      text = `Mentioned in ${count} ${reviewWord}. Worth checking the product specs before deciding.`;\n    } else if (positive) {\n      text = `Mentioned positively in ${count} ${reviewWord}.`;\n    } else {\n      text = `Mentioned in ${count} ${reviewWord}.`;\n    }\n  }\n\n  return {\n    badge: item?.badge || 'Review',\n    label: labelMap[baseLabel] || baseLabel || 'Review note',\n    text\n  };\n}\n\nfunction formatReskuHelpCard(card) {\n  if (card?.type !== 'customer_voice') return card;\n  const room = humanizeCustomerVoiceRoom(card.title);\n  return {\n    ...card,\n    title: `What ${room} shoppers mention`,\n    summary: formatCustomerVoiceSummary(card.summary),\n    items: Array.isArray(card.items) ? card.items.map(formatCustomerVoiceItem) : []\n  };\n}\n\nfunction renderReskuAiResults(container, payload, nativeResults = { products: [] }, query = '', uiState = {}) {\n  const uiIntent = classifyStorefrontUiIntent(query, payload, nativeResults, uiState);\n  const prioritizeShoppingResults = uiIntent === 'regular_search' || shouldPrioritizeShoppingResults(query, payload);\n  const localMaterialHelp = uiIntent === 'help_question' && matchingFinnGuideTopics(query).some((topic) => topic.id.startsWith('material-') || topic.id === 'pets');\n  const answer = prioritizeShoppingResults || localMaterialHelp ? '' : polishFinnAnswer(payload.answer);\n  const answerTitle = String(payload.answer_title || 'Finn note').trim();\n  const citations = prioritizeShoppingResults ? [] : Array.isArray(payload.citations) ? payload.citations : [];\n  const helpCards = prioritizeShoppingResults || localMaterialHelp ? [] : Array.isArray(payload.help_cards) ? payload.help_cards : [];\n  const shapedNativeResults = shapeNativeSearchResults(nativeResults, query);\n  const filters = uiIntent === 'guided_finn' ? withIntentPathFallbacks(payload.recommended_filters, query) : [];\n  const products = uiIntent === 'guided_finn'\n    ? reconcileProductRecommendations(shapeProductRecommendations(payload.product_recommendations, query), shapedNativeResults)\n    : [];\n  const questions = uiIntent === 'guided_finn' && Array.isArray(payload.follow_up_questions) ? payload.follow_up_questions : [];\n  const productLabel = shopperQueryLabel(query);\n  const matchHeading = productLabel === 'furniture' ? 'Furniture matches' : `${productLabel.charAt(0).toUpperCase()}${productLabel.slice(1)} matches`;\n  const historyHtml = renderFinnConversationHistory(uiState.messages || []);\n  const memoryHtml = renderFinnMemorySummary(payload.conversation || uiState.conversation || {});\n\n  const introHtml = uiIntent === 'guided_finn' && !answer ? broadQueryIntroHtml(query) : '';\n  const intentNoteHtml = uiIntent === 'guided_finn' ? sofaIntentNoteHtml(query, products.length) : '';\n  const guideAnswerHtml = uiIntent === 'help_question' || uiIntent === 'guided_finn' ? renderFinnGuideAnswer(query) : '';\n  const answerHtml = answer ? `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__answer resku-ai-assistant__answer--chat\">\n      <div class=\"resku-ai-assistant__avatar\" aria-hidden=\"true\">F</div>\n      <div class=\"resku-ai-assistant__bubble\">\n        <h3>Finn</h3>\n        <p>${escapeHtml(answer)}</p>\n        ${answerTitle && !/^finn note$/i.test(answerTitle) ? `<span class=\"resku-ai-assistant__answer-context\">${escapeHtml(answerTitle)}</span>` : ''}\n        ${citations.length ? `\n          <div class=\"resku-ai-assistant__sources\">\n            ${citations.slice(0, 3).map((citation) => citation.source ? `\n              <a href=\"${escapeHtml(citation.source)}\">${escapeHtml(citation.title || 'Source')}</a>\n            ` : '').join('')}\n          </div>\n        ` : ''}\n      </div>\n    </div>\n  ` : '';\n\n  const helpCardHtml = helpCards.length ? `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__help-cards\">\n      ${helpCards.map((card) => {\n        const displayCard = formatReskuHelpCard(card);\n        return `\n        <article class=\"resku-ai-help-card\">\n          <div>\n            <h3>${escapeHtml(displayCard.title || 'Store help')}</h3>\n            ${displayCard.summary ? `<p>${escapeHtml(displayCard.summary)}</p>` : ''}\n          </div>\n          ${displayCard.map ? `\n            <div class=\"resku-ai-help-map\" aria-label=\"${escapeHtml(displayCard.map.label || 'Delivery area')}\">\n              <span class=\"resku-ai-help-map__ring\"></span>\n              <span>\n                <strong>${escapeHtml(displayCard.map.label || 'Delivery area')}</strong>\n                <small>${escapeHtml(displayCard.map.detail || '')}</small>\n              </span>\n            </div>\n          ` : ''}\n          ${Array.isArray(displayCard.items) && displayCard.items.length ? `\n            <div class=\"resku-ai-help-card__lanes\">\n              ${displayCard.items.map((item) => `\n                <div class=\"resku-ai-help-lane\">\n                  <span class=\"resku-ai-help-lane__badge\">${escapeHtml(item.badge || '')}</span>\n                  <strong>${escapeHtml(item.label || '')}</strong>\n                  <p>${escapeHtml(item.text || '')}</p>\n                </div>\n              `).join('')}\n            </div>\n          ` : ''}\n        </article>\n        `;\n      }).join('')}\n    </div>\n  ` : '';\n\n  const filterHtml = filters.length ? `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__paths\">\n      <div class=\"resku-ai-assistant__group-heading\">\n        <h3>Recommended paths</h3>\n        <span>Tap a path</span>\n      </div>\n      <div class=\"resku-ai-assistant__chips\">\n        ${filters.map((filter) => `<a href=\"${escapeHtml(filter.url || '#')}\" data-resku-finn-travel data-finn-target-label=\"${escapeHtml(filter.label || 'recommended path')}\" data-finn-target-type=\"collection\" aria-label=\"Take Finn to ${escapeHtml(filter.label)}\">${escapeHtml(filter.label)}<span aria-hidden=\"true\">Take Finn with you</span></a>`).join('')}\n      </div>\n    </div>\n  ` : '';\n\n  const productHtml = products.length ? `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__matches\">\n      <div class=\"resku-ai-assistant__group-heading\">\n        <h3>${escapeHtml(matchHeading)}</h3>\n        <span>Open a product</span>\n      </div>\n      <div class=\"resku-ai-assistant__products\">\n        ${products.slice(0, 4).map((product) => `\n          ${(() => {\n            const facts = [formatReskuAiPrice(product.price), product.dimensions].filter(Boolean);\n            return `\n          <a href=\"${escapeHtml(product.url || `/products/${product.handle}`)}\" data-resku-finn-travel data-finn-target-label=\"${escapeHtml(product.title || product.handle)}\" data-finn-target-type=\"product\" aria-label=\"Take Finn to ${escapeHtml(product.title || product.handle)}\">\n            ${product.image_url ? `\n              <img\n                src=\"${escapeHtml(product.image_url)}\"\n                alt=\"${escapeHtml(product.title || product.handle)}\"\n                loading=\"lazy\"\n                width=\"84\"\n                height=\"84\"\n              >\n            ` : ''}\n            <span class=\"resku-ai-assistant__product-copy\">\n              <strong>${escapeHtml(product.title || product.handle)}</strong>\n              ${facts.length ? `<span class=\"resku-ai-assistant__product-facts\">${escapeHtml(facts.join(' | '))}</span>` : ''}\n              <span>${escapeHtml(productSuggestionReason(product.reason, query))}</span>\n              <em>Take Finn to this product</em>\n            </span>\n          </a>\n            `;\n          })()}\n        `).join('')}\n      </div>\n    </div>\n  ` : '';\n\n  const questionHtml = uiIntent === 'guided_finn' && questions.length ? `\n    <div class=\"resku-ai-assistant__group\">\n      <h3>Tell Finn next</h3>\n      <ul>\n        ${questions.map((question) => `<li>${escapeHtml(question)}</li>`).join('')}\n      </ul>\n    </div>\n  ` : '';\n\n  const regularSearchHtml = query ? renderNativeSearchResults({ ...shapedNativeResults, primary: uiIntent === 'regular_search' }, query) : '';\n  const intentActionHtml = query ? renderIntentActionBar(query, uiIntent, { showGuided: uiIntent !== 'guided_finn' || Boolean(query) }) : '';\n  const gatewayHtml = uiIntent === 'intent_gateway' ? renderIntentGateway(query, shapedNativeResults) : '';\n  const contactHandoffHtml = uiIntent === 'help_question' ? renderContactHandoff(payload) : '';\n  const connectionNoteHtml = uiIntent === 'regular_search' && /^finn connection$/i.test(answerTitle) && payload.answer ? `\n    <div class=\"resku-ai-assistant__group resku-ai-assistant__intent-note\">\n      <p>${escapeHtml(payload.answer)}</p>\n    </div>\n  ` : '';\n\n  if (uiIntent === 'intent_gateway') {\n    container.innerHTML = intentActionHtml + gatewayHtml;\n    container.hidden = !container.innerHTML.trim();\n    return;\n  }\n\n  if (uiIntent === 'regular_search') {\n    container.innerHTML = intentActionHtml + connectionNoteHtml + regularSearchHtml;\n    container.hidden = !container.innerHTML.trim();\n    return;\n  }\n\n  container.innerHTML = historyHtml + memoryHtml + intentActionHtml + introHtml + answerHtml + intentNoteHtml + guideAnswerHtml + productHtml + filterHtml + regularSearchHtml + helpCardHtml + contactHandoffHtml + questionHtml;\n  container.hidden = !container.innerHTML.trim();\n}\n\nfunction resolveReskuAiEndpoint(endpoint, path) {\n  const value = String(endpoint || '').trim();\n  const endpointPath = String(path || '').trim();\n  if (!value || !endpointPath) return value;\n\n  try {\n    const url = new URL(value);\n    if (url.pathname.includes('/api/theme-ai/')) {\n      url.pathname = endpointPath;\n      url.search = '';\n      url.hash = '';\n      return url.toString();\n    }\n    url.pathname = `${url.pathname.replace(/\\/+$/, '')}${endpointPath}`;\n    return url.toString();\n  } catch (error) {\n    if (value.includes('/api/theme-ai/')) {\n      return value.replace(/\\/api\\/theme-ai\\/[^/?#]+.*/, endpointPath);\n    }\n    return `${value.replace(/\\/+$/, '')}${endpointPath}`;\n  }\n}\n\nconst RESKU_AI_FALLBACK_BASES = [];\n\nfunction endpointFallbacks(endpoint, path) {\n  const endpoints = [endpoint];\n  RESKU_AI_FALLBACK_BASES.forEach((base) => {\n    const fallback = resolveReskuAiEndpoint(base, path);\n    if (fallback && !endpoints.includes(fallback)) {\n      endpoints.push(fallback);\n    }\n  });\n  return endpoints.filter(Boolean);\n}\n\nasync function postReskuAiRequest(endpoints, body) {\n  let lastError;\n  for (const endpoint of endpoints) {\n    const controller = new AbortController();\n    const timeout = window.setTimeout(() => controller.abort(), 9000);\n    try {\n      const response = await fetch(endpoint, {\n        method: 'POST',\n        headers: {\n          'Content-Type': 'application/json',\n          'bypass-tunnel-reminder': 'true'\n        },\n        credentials: 'omit',\n        body,\n        signal: controller.signal\n      });\n\n      if (!response.ok) {\n        let message = `Request failed with ${response.status}`;\n        try {\n          const errorPayload = await response.json();\n          message = errorPayload.message || errorPayload.error || message;\n        } catch (error) {\n          // Keep the HTTP status message if the backend did not return JSON.\n        }\n        throw new Error(message);\n      }\n\n      return response.json();\n    } catch (error) {\n      lastError = error;\n    } finally {\n      window.clearTimeout(timeout);\n    }\n  }\n  throw lastError || new Error('Load failed');\n}\n\nfunction friendlyFinnError(error) {\n  const message = String(error?.message || '').toLowerCase();\n  if (message.includes('abort') || message.includes('timeout')) {\n    return 'Finn is taking longer than expected. You can still shop by room or use the filters below.';\n  }\n  if (message.includes('failed to fetch') || message.includes('load failed') || message.includes('network')) {\n    return 'Finn is having trouble connecting. You can still shop by room or use the filters below.';\n  }\n  return 'Finn could not answer that yet. Try a room, budget, style, material, size, or delivery question.';\n}\n\n  var FINN_PUBLIC_PROXY_PREFIX = '/apps/resku-finn';\n  var FINN_PUBLIC_CONTINUITY_SCHEMA = 'SALV105PublicContinuity.v1';\n  function finnPublicProductHandle() {\n    var match = String(window.location.pathname || '').match(/^\\/products\\/([a-z0-9][a-z0-9-]{0,254})\\/?$/i);\n    return match ? match[1].toLowerCase() : '';\n  }\n  function finnPublicDeployment(scope) {\n    var deployment = String(scope && scope.getAttribute('data-resku-public-deployment') || '');\n    if (!deployment) {\n      var observed = Array.prototype.map.call(document.querySelectorAll('[data-resku-public-deployment]'), function (node) {\n        return String(node.getAttribute('data-resku-public-deployment') || '');\n      }).filter(Boolean);\n      var unique = observed.filter(function (value, index) { return observed.indexOf(value) === index; });\n      if (unique.length === 1) deployment = unique[0];\n    }\n    if (!/^resku_finn_public_[a-z0-9_]{1,40}_v1$/.test(deployment)) throw new Error('deployment-unavailable');\n    return deployment;\n  }\n  function finnPublicStateKey(scope) {\n    var deployment = finnPublicDeployment(scope);\n    if (!/^resku_finn_public_[a-z0-9_]{1,40}_v1$/.test(deployment)) throw new Error('deployment-unavailable');\n    return 'resku:finn:public:' + window.location.hostname.toLowerCase() + ':' + deployment;\n  }\n  function finnPublicRandomHex() {\n    var values = new Uint8Array(32);\n    window.crypto.getRandomValues(values);\n    return Array.prototype.map.call(values, function (value) { return value.toString(16).padStart(2, '0'); }).join('');\n  }\n  function finnLoadPublicState(scope) {\n    var key = finnPublicStateKey(scope), value = {};\n    try { value = JSON.parse(window.sessionStorage.getItem(key) || '{}'); } catch (error) {}\n    if (!/^spn_[0-9a-f]{64}$/.test(String(value.browser_nonce || ''))) value = { browser_nonce: 'spn_' + finnPublicRandomHex() };\n    if (!/^spc_[0-9a-f]{64}$/.test(String(value.continuity_token || '')) || Date.parse(value.expires_at || '') <= Date.now()) {\n      delete value.continuity_token; delete value.expires_at;\n    }\n    window.sessionStorage.setItem(key, JSON.stringify(value));\n    return { key: key, value: value };\n  }\n  function finnPublicProxyJson(action, payload) {\n    var controller = new AbortController();\n    var timer = setTimeout(function () { controller.abort(); }, 9000);\n    var requestUrl = FINN_PUBLIC_PROXY_PREFIX + '/' + action + '?resku_request=' + finnPublicRandomHex();\n    return fetch(requestUrl, {\n      method: 'POST', headers: { 'Content-Type': 'application/json' },\n      body: JSON.stringify(payload), signal: controller.signal, cache: 'no-store'\n    }).then(function (response) {\n      if (!response.ok) throw new Error('storefront-context-unavailable');\n      return response.json();\n    }).finally(function () { clearTimeout(timer); });\n  }\n  function finnPublicContinuity(scope) {\n    var state = finnLoadPublicState(scope);\n    var deployment = finnPublicDeployment(scope);\n    if (state.value.continuity_token) return Promise.resolve(state);\n    return finnPublicProxyJson('continuity', { browser_nonce: state.value.browser_nonce, deployment_id: deployment })\n      .then(function (result) {\n        if (!result || result.schema_version !== FINN_PUBLIC_CONTINUITY_SCHEMA || !/^spc_[0-9a-f]{64}$/.test(String(result.continuity_token || ''))) throw new Error('continuity-unavailable');\n        state.value.continuity_token = result.continuity_token; state.value.expires_at = result.expires_at;\n        window.sessionStorage.setItem(state.key, JSON.stringify(state.value)); return state;\n      });\n  }\n  function finnPublicProductPost(scope, query, requestedShape) {\n    var handle = finnPublicProductHandle();\n    var deployment = finnPublicDeployment(scope);\n    if (!handle) return Promise.reject(new Error('product-unavailable'));\n    return finnPublicContinuity(scope).then(function (state) {\n      var common = { browser_nonce: state.value.browser_nonce, deployment_id: deployment, continuity_token: state.value.continuity_token };\n      return finnPublicProxyJson('product-binding', Object.assign({}, common, { public_handle: handle }))\n        .then(function (binding) {\n          if (!binding || !/^spb_[0-9a-f]{64}$/.test(String(binding.storefront_binding_token || ''))) throw new Error('binding-unavailable');\n          return finnPublicProxyJson('product-fit', Object.assign({}, common, {\n            storefront_binding_token: binding.storefront_binding_token, query: query, requested_shape: requestedShape\n          }));\n        });\n    });\n  }\n  function finnPublicCatalogPost(scope, query) {\n    var deployment = finnPublicDeployment(scope);\n    function requestCatalog() {\n      return finnPublicContinuity(scope).then(function (state) {\n        return finnPublicProxyJson('catalog-search', {\n          browser_nonce: state.value.browser_nonce,\n          deployment_id: deployment,\n          continuity_token: state.value.continuity_token,\n          query: query\n        });\n      });\n    }\n    return requestCatalog().catch(function () {\n      var state = finnLoadPublicState(scope);\n      delete state.value.continuity_token; delete state.value.expires_at;\n      window.sessionStorage.setItem(state.key, JSON.stringify(state.value));\n      return requestCatalog();\n    });\n  }\n\n\nfunction finnEmergencyRememberTurn(scope, query, payload) {\n  var state = finnLoadPublicState(scope);\n  var messages = Array.isArray(state.value.messages) ? state.value.messages : [];\n  var answer = String(payload && payload.answer || '').trim();\n  messages = messages.concat(\n    [{ role: 'shopper', text: String(query || '').trim().slice(0, 600) }],\n    answer ? [{ role: 'assistant', text: answer.slice(0, 2400) }] : []\n  ).filter(function (item) {\n    return item && (item.role === 'shopper' || item.role === 'assistant') && String(item.text || '').trim();\n  }).slice(-12);\n  state.value.messages = messages;\n  window.sessionStorage.setItem(state.key, JSON.stringify(state.value));\n  return messages;\n}\n\nfunction finnRepairText(key) {\n  return themeRefreshStrings.finn_repair?.[key] || '';\n}\n\nfunction finnDeliveryHelp(query) {\n  if (shopperQueryLabel(query) !== 'furniture' && !/\\b(what|how|when|can|could|will|do|does|is|are|why)\\b/i.test(query)) return false;\n  return !isProductSearchPhrase(query) && /\\b(deliver|delivery|shipping|ship|ships|dfw|nationwide|white glove)\\b/i.test(query);\n}\n\nfunction finnPublicBudget(query) {\n  const text = String(query || '').toLowerCase();\n  const amount = '([0-9][0-9,]*(?:\\\\.[0-9]{1,2})?)';\n  const range = text.match(new RegExp('\\\\bbetween\\\\s*\\\\$?\\\\s*' + amount + '\\\\s*(?:and|to|-)\\\\s*\\\\$?\\\\s*' + amount));\n  const max = text.match(new RegExp('\\\\b(under|below|less than|up to|max(?:imum)?|budget(?: of)?)\\\\s*\\\\$?\\\\s*' + amount));\n  const min = text.match(new RegExp('\\\\b(over|above|more than|at least|min(?:imum)?|starting at)\\\\s*\\\\$?\\\\s*' + amount));\n  const number = value => Number(String(value).replace(/,/g, '')) * 100;\n  if (range) return { min: number(range[1]), max: number(range[2]), minExclusive: false, maxExclusive: false };\n  return {\n    min: min ? number(min[2]) : null,\n    max: max ? number(max[2]) : null,\n    minExclusive: Boolean(min && /^(over|above|more than)$/.test(min[1])),\n    maxExclusive: Boolean(max && /^(under|below|less than)$/.test(max[1]))\n  };\n}\n\nfunction finnPriceMatches(price, budget) {\n  if (!Number.isFinite(price)) return false;\n  if (budget.min !== null && (budget.minExclusive ? price <= budget.min : price < budget.min)) return false;\n  if (budget.max !== null && (budget.maxExclusive ? price >= budget.max : price > budget.max)) return false;\n  return true;\n}\n\nfunction finnLiveProductMatches(product, query) {\n  const text = [product.title, ...(product.tags || [])].join(' ').toLowerCase();\n  if (shopperQueryLabel(query) === 'sofa') {\n    if (normalizeLooseToken(product.type) !== 'sofa') return false;\n    if (!/\\b(sofa|couch)\\b/i.test(product.title)) return false;\n    if (/\\b(loveseat|sectional|sofa bed|futon|sofa set|living room set)\\b|\\b[23][- ]piece\\b/.test(product.title.toLowerCase())) return false;\n  }\n  if (/\\bgr[ae]y\\b/i.test(query) && !/\\bgr[ae]y\\b/.test(text)) return false;\n  return true;\n}\n\nfunction finnStorefrontRoot() {\n  const root = window.Shopify?.routes?.root || '/';\n  return root.startsWith('/') && !root.startsWith('//') ? root : '/';\n}\n\nasync function finnReadCurrentProduct(candidate, query) {\n  const handle = String(candidate.handle || productHandleFromUrl(candidate.url) || '');\n  if (!/^[a-z0-9][a-z0-9-]{0,254}$/i.test(handle)) return null;\n  const controller = new AbortController();\n  const timeout = window.setTimeout(() => controller.abort(), 5000);\n  try {\n    const response = await fetch(`${finnStorefrontRoot()}products/${encodeURIComponent(handle)}.js`, {\n      headers: { Accept: 'application/json' }, credentials: 'same-origin', cache: 'no-store', signal: controller.signal\n    });\n    if (!response.ok) return null;\n    const product = await response.json();\n    if (!product.published_at || !product.title || !finnLiveProductMatches(product, query)) return null;\n    const budget = finnPublicBudget(query);\n    const variants = (product.variants || []).filter(variant => variant.available && finnPriceMatches(Number(variant.price), budget));\n    if (!variants.length) return null;\n    const selected = variants.reduce((best, variant) => Number(variant.price) < Number(best.price) ? variant : best);\n    return {\n      handle: product.handle, title: product.title,\n      url: `${finnStorefrontRoot()}products/${encodeURIComponent(product.handle)}?variant=${encodeURIComponent(selected.id)}`,\n      image_url: product.featured_image || '', price_cents: Number(selected.price),\n      price_varies: Boolean(product.price_varies), product_type: product.type,\n      current_storefront_verified: true\n    };\n  } catch (error) {\n    return null;\n  } finally {\n    window.clearTimeout(timeout);\n  }\n}\n\nasync function finnRefreshCatalogProducts(payload, query) {\n  const candidates = (Array.isArray(payload?.product_recommendations) ? payload.product_recommendations : []).slice(0, 8);\n  let products = (await Promise.all(candidates.map(candidate => finnReadCurrentProduct(candidate, query)))).filter(Boolean);\n  if (!products.length && shopperQueryLabel(query) === 'sofa') {\n    const collection = await finnSofaCollectionCandidates(query);\n    products = (await Promise.all(collection.map(candidate => finnReadCurrentProduct(candidate, query)))).filter(Boolean);\n  }\n  if (!products.length) {\n    const searchQuery = stripSearchModifiers(query).replace(/\\b(show me|find me|looking for|i need|i want|please)\\b/gi, '').trim();\n    const native = await fetchNativeSearchResults(searchQuery, 8);\n    products = (await Promise.all(native.map(candidate => finnReadCurrentProduct(candidate, query)))).filter(Boolean);\n  }\n  return products.filter((product, index, list) => list.findIndex(other => other.handle === product.handle) === index);\n}\n\nasync function finnSofaCollectionCandidates(query) {\n  const controller = new AbortController();\n  const timeout = window.setTimeout(() => controller.abort(), 6000);\n  try {\n    const base = `${finnStorefrontRoot()}collections/all-sofas-loveseats`;\n    const options = { credentials: 'same-origin', signal: controller.signal };\n    const source = await fetch(base, options);\n    if (!source.ok) return [];\n    const parser = new DOMParser();\n    const context = parser.parseFromString(await source.text(), 'text/html');\n    const filters = [...context.querySelectorAll('input[type=\"checkbox\"][name^=\"filter.\"]')];\n    const sofa = filters.find(input => /product_type$/.test(input.name) && input.value === 'Sofa');\n    if (!sofa) return [];\n    const params = new URLSearchParams({ sort_by: 'price-ascending' });\n    params.append(sofa.name, sofa.value);\n    if (/\\bgr[ae]y\\b/i.test(query)) {\n      filters.filter(input => /color$/.test(input.name) && /\\bgr[ae]y\\b|charcoal|graphite/i.test(input.value))\n        .forEach(input => params.append(input.name, input.value));\n    }\n    const budget = finnPublicBudget(query);\n    if (budget.max !== null) params.set('filter.v.price.lte', String(budget.max / 100));\n    if (budget.min !== null) params.set('filter.v.price.gte', String(budget.min / 100));\n    const response = await fetch(`${base}?${params}`, options);\n    if (!response.ok) return [];\n    const results = parser.parseFromString(await response.text(), 'text/html');\n    return [...results.querySelectorAll('.product-card__title a')].slice(0, 8)\n      .map(link => ({ url: link.getAttribute('href') || '' }));\n  } catch (error) {\n    return [];\n  } finally {\n    window.clearTimeout(timeout);\n  }\n}\n\nfunction finnCurrentPrice(product) {\n  const currency = window.Shopify?.currency?.active || 'USD';\n  const price = new Intl.NumberFormat(document.documentElement.lang || 'en-US', {\n    style: 'currency', currency, minimumFractionDigits: 2, maximumFractionDigits: 2\n  }).format(product.price_cents / 100);\n  return product.price_varies ? `${finnRepairText('from')} ${price}` : price;\n}\n\nfunction finnEmergencyProductCards(products) {\n  const current = (Array.isArray(products) ? products : []).filter(product => product.current_storefront_verified);\n  if (!current.length) return '';\n  return '<div class=\"resku-ai-assistant__group resku-ai-assistant__matches\">' +\n    '<div class=\"resku-ai-assistant__group-heading\"><h3>' + escapeHtml(finnRepairText('catalog_heading')) + '</h3></div>' +\n    '<div class=\"resku-ai-assistant__products\">' + current.slice(0, 4).map(product =>\n      '<a href=\"' + escapeHtml(product.url) + '\" data-resku-finn-travel data-finn-target-label=\"' + escapeHtml(product.title) + '\" data-finn-target-type=\"product\">' +\n      (product.image_url ? '<img src=\"' + escapeHtml(product.image_url) + '\" alt=\"' + escapeHtml(product.title) + '\" loading=\"lazy\" width=\"84\" height=\"84\">' : '') +\n      '<span class=\"resku-ai-assistant__product-copy\"><strong>' + escapeHtml(product.title) + '</strong>' +\n      '<span class=\"resku-ai-assistant__product-facts\">' + escapeHtml(finnCurrentPrice(product)) + '</span>' +\n      '<em>' + escapeHtml(finnRepairText('view_product')) + '</em></span></a>'\n    ).join('') + '</div></div>';\n}\n\nfunction finnPublicSearchEscape(query) {\n  const url = `${finnStorefrontRoot()}search?${new URLSearchParams({ q: stripSearchModifiers(query), type: 'product' })}`;\n  return '<div class=\"resku-ai-assistant__guide-actions\"><a href=\"' + escapeHtml(url) + '\">' + escapeHtml(finnRepairText('browse_search')) + '</a>' +\n    '<a href=\"' + escapeHtml(finnStorefrontRoot() + 'pages/contact') + '\">' + escapeHtml(finnRepairText('ask_team')) + '</a></div>';\n}\n\nfunction renderEmergencyFinnPublicResults(container, payload, query, scope, isCatalog) {\n  let answer = String(payload?.answer || '').trim();\n  const products = Array.isArray(payload?.product_recommendations) ? payload.product_recommendations : [];\n  if (isCatalog) {\n    const conversational = payload?.answer_engine?.model_used === true;\n    if (!conversational) answer = finnRepairText(products.length ? 'catalog_answer' : 'no_current_matches');\n  }\n  const messages = finnEmergencyRememberTurn(scope, query, { ...payload, answer });\n  const history = renderFinnConversationHistory(messages);\n  const answerHtml = answer ? '<div class=\"resku-ai-assistant__group resku-ai-assistant__answer resku-ai-assistant__answer--chat\">' +\n    '<div class=\"resku-ai-assistant__avatar\" aria-hidden=\"true\">F</div><div class=\"resku-ai-assistant__bubble\">' +\n    '<h3>Finn</h3><p>' + escapeHtml(answer) + '</p></div></div>' : '';\n  const body = history + answerHtml + (isCatalog ? finnEmergencyProductCards(products) + finnPublicSearchEscape(query) : '');\n  container.innerHTML = '<div class=\"resku-finn-secondary-results__body\">' + body + '</div>';\n  container.hidden = !container.innerHTML.trim();\n}\n\n\nfunction renderEmergencyFinnStoredTranscript(messages) {\n  if (!Array.isArray(messages) || !messages.length) return '';\n  var history = renderFinnConversationHistory(messages.concat([\n    { role: 'shopper', text: '' },\n    { role: 'assistant', text: '' }\n  ]));\n  return history.replace('<details class=', '<details open class=');\n}\n\nfunction openEmergencyFinnDrawer(query) {\n  var launcher = document.querySelector('[data-resku-ai-drawer-open]');\n  if (launcher) launcher.click();\n  var drawer = document.querySelector('[data-resku-ai-drawer]');\n  var input = drawer && drawer.querySelector('[data-resku-ai-query]');\n  if (input && query) input.value = String(query).slice(0, 600);\n  if (input) input.focus();\n}\n\nfunction restoreEmergencyFinnTranscript(assistant) {\n  var results = assistant && assistant.querySelector('[data-resku-ai-results]');\n  if (!results) return;\n  var state = finnLoadPublicState(assistant);\n  var messages = Array.isArray(state.value.messages) ? state.value.messages : [];\n  if (!messages.length) return;\n  results.innerHTML = renderEmergencyFinnStoredTranscript(messages);\n  results.hidden = false;\n}\n\nfunction installEmergencyStorefrontSearchUx() {\n  document.querySelectorAll('header a[href=\"/search\"], header a[href^=\"/search?\"]').forEach(function (link) {\n    if (/regular search|shopify search/i.test(link.textContent || '')) {\n      link.textContent = 'Search';\n      link.setAttribute('aria-label', 'Search furniture');\n    }\n  });\n  document.querySelectorAll('[data-resku-ai-assistant]').forEach(function (assistant) {\n    if (assistant.closest('[data-resku-ai-drawer]')) {\n      restoreEmergencyFinnTranscript(assistant);\n      return;\n    }\n    var endpoint = String(assistant.getAttribute('data-endpoint-path') || '');\n    var form = assistant.querySelector('[data-resku-ai-form]');\n    var input = assistant.querySelector('[data-resku-ai-query]');\n    if (endpoint === '/api/theme-ai/product-fit') {\n      assistant.innerHTML = '<div class=\"resku-ai-assistant__group\"><h3>Questions about this product?</h3>' +\n        '<button type=\"button\" data-resku-emergency-open-finn>Ask Finn about this product</button></div>';\n      assistant.querySelector('[data-resku-emergency-open-finn]').addEventListener('click', function () { openEmergencyFinnDrawer(''); });\n      return;\n    }\n    if (endpoint === '/api/theme-ai/collection-assistant') {\n      assistant.innerHTML = '<div class=\"resku-ai-assistant__group\"><h3>Want help narrowing these results?</h3>' +\n        '<button type=\"button\" data-resku-emergency-open-finn>Ask Finn</button></div>';\n      assistant.querySelector('[data-resku-emergency-open-finn]').addEventListener('click', function () { openEmergencyFinnDrawer(''); });\n      return;\n    }\n    if (endpoint !== '/api/theme-ai/homepage-concierge' || !form || !input) return;\n    if (window.location.pathname === '/') {\n      form.addEventListener('submit', function (event) {\n        var query = String(input.value || '').trim();\n        if (!query) return;\n        event.preventDefault();\n        event.stopImmediatePropagation();\n        window.location.assign('/search?q=' + encodeURIComponent(query) + '&type=product');\n      }, true);\n      var submit = form.querySelector('button[type=\"submit\"]');\n      if (submit) submit.textContent = themeRefreshStrings.search || 'Search furniture';\n      if (!assistant.querySelector('[data-resku-emergency-open-finn]')) {\n        var ask = document.createElement('button');\n        ask.type = 'button'; ask.className = 'button button--secondary'; ask.textContent = themeRefreshStrings.ask_finn || 'Ask Finn'; ask.setAttribute('data-resku-emergency-open-finn', '');\n        ask.addEventListener('click', function () { openEmergencyFinnDrawer(input.value); });\n        form.appendChild(ask);\n      }\n    } else if (window.location.pathname === '/search' && !assistant.closest('.resku-finn-secondary-search')) {\n      var details = document.createElement('details');\n      details.className = 'resku-finn-secondary-search';\n      var summary = document.createElement('summary');\n      summary.textContent = themeRefreshStrings.guidance || 'Furniture suggestions and advice';\n      assistant.parentNode.insertBefore(details, assistant);\n      details.appendChild(summary);\n      details.appendChild(assistant);\n    }\n  });\n}\nwindow.setTimeout(installEmergencyStorefrontSearchUx, 0);\n\ndocument.querySelectorAll('[data-resku-ai-assistant]').forEach((assistant) => {\n  const form = assistant.querySelector('[data-resku-ai-form]');\n  const input = assistant.querySelector('[data-resku-ai-query]');\n  const submitButton = form?.querySelector('button[type=\"submit\"]');\n  const contextNode = assistant.querySelector('[data-resku-ai-context]');\n  const empty = assistant.querySelector('[data-resku-ai-empty]');\n  const status = assistant.querySelector('[data-resku-ai-status]');\n  const results = assistant.querySelector('[data-resku-ai-results]');\n  const resumeNode = assistant.querySelector('[data-resku-ai-resume]');\n  const endpoint = resolveReskuAiEndpoint(assistant.dataset.endpoint, assistant.dataset.endpointPath);\n  const endpoints = endpointFallbacks(endpoint, assistant.dataset.endpointPath);\n  const requestedShape = assistant.dataset.requestedShape || 'collection_guided_shopper_v1';\n  const isDrawerAssistant = Boolean(assistant.closest('[data-resku-ai-drawer]'));\n  const isPublicProduct = assistant.dataset.endpointPath === '/api/theme-ai/product-fit';\n  const isPublicCatalog = assistant.dataset.endpointPath === '/api/theme-ai/homepage-concierge';\n  const storedSession = (isPublicProduct || isPublicCatalog) ? {} : loadFinnGuidedSession();\n\n  if (!form || !input || (!contextNode && !isPublicProduct && !isPublicCatalog) || !status || !results) return;\n\n  const defaultSubmitLabel = submitButton?.textContent?.trim() || 'Ask Finn';\n  const uiState = {\n    finnSessionId: storedSession.conversation_id || storedSession.conversation?.conversation_id || null,\n    conversation: storedSession.conversation || {},\n    messages: Array.isArray(storedSession.messages) ? storedSession.messages : [],\n    active: Boolean(storedSession.active),\n    forceMode: storedSession.force_mode || '',\n    originalQuery: storedSession.original_query || '',\n    lastQuery: storedSession.last_query || '',\n    lastPayload: storedSession.last_payload || {},\n    lastNativeResults: storedSession.last_native_results || { products: [] },\n    lastIntent: storedSession.last_intent || '',\n    pendingNavigation: storedSession.pending_navigation || null\n  };\n\n  const persistUiState = (overrides = {}) => (isPublicProduct || isPublicCatalog) ? null : saveFinnGuidedSession({\n    conversation_id: uiState.finnSessionId,\n    conversation: uiState.conversation,\n    messages: uiState.messages,\n    active: uiState.active,\n    force_mode: uiState.forceMode,\n    original_query: uiState.originalQuery,\n    last_query: uiState.lastQuery,\n    last_payload: visibleFinnPayload(uiState.lastPayload),\n    last_native_results: uiState.lastNativeResults,\n    last_intent: uiState.lastIntent,\n    pending_navigation: uiState.pendingNavigation,\n    ...overrides\n  });\n\n  const syncSubmitLabel = () => {\n    if (!submitButton) return;\n    submitButton.textContent = uiState.active || uiState.forceMode === 'guided_finn' ? defaultSubmitLabel : 'Search';\n  };\n  syncSubmitLabel();\n\n  let context = {};\n  try {\n    if (!isPublicProduct && !isPublicCatalog) context = JSON.parse(contextNode.textContent || '{}');\n    if (!isPublicProduct && !isPublicCatalog) context.storefront = { hostname: window.location.hostname };\n  } catch (error) {\n    status.textContent = 'Collection context is not available yet.';\n    status.hidden = false;\n  }\n\n  const startupParams = currentPageQueryParams();\n  const startupFinnQuery = startupParams.get('finn_query') || '';\n  const startupFinnMode = startupParams.get('finn_mode') || '';\n  const startupFinnResume = startupParams.get('finn_resume') === '1';\n  if (startupFinnQuery && !input.value.trim()) {\n    input.value = startupFinnQuery;\n    uiState.originalQuery = startupFinnQuery;\n    uiState.lastQuery = startupFinnQuery;\n  }\n  if (startupFinnMode === 'guided_finn' || startupFinnResume) {\n    uiState.active = true;\n    uiState.forceMode = 'guided_finn';\n    syncSubmitLabel();\n  }\n\n  const renderFromState = (query, payload, nativeResults) => {\n    const renderQuery = query || uiState.originalQuery || uiState.lastQuery;\n    renderReskuAiResults(results, payload, nativeResults, renderQuery, uiState);\n    uiState.lastIntent = classifyStorefrontUiIntent(renderQuery, payload, nativeResults, uiState);\n  };\n\n  let publicRequestSequence = 0;\n  const submitAssistant = async (options = {}) => {\n    const query = String(options.query ?? input.value).trim();\n    if (!query) return false;\n    const requestSequence = ++publicRequestSequence;\n    const isNewQuery = query !== uiState.lastQuery;\n    if (isNewQuery) {\n      if (!uiState.originalQuery) uiState.originalQuery = query;\n    }\n    if (!uiState.originalQuery) uiState.originalQuery = query;\n    uiState.lastQuery = query;\n    syncSubmitLabel();\n\n    const collectionRedirect = shouldRedirectCollectionResults(query, context, uiState.lastPayload, uiState.lastNativeResults, uiState);\n    if (collectionRedirect && options.allowCollectionRedirect !== false) {\n      const redirectUrl = new URL(collectionRedirect, window.location.origin);\n      redirectUrl.searchParams.set('finn_query', query);\n      redirectUrl.searchParams.set('finn_mode', uiState.active || uiState.forceMode === 'guided_finn' ? 'guided_finn' : 'regular_search');\n      if (uiState.active || uiState.forceMode === 'guided_finn') {\n        redirectUrl.searchParams.set('finn_resume', '1');\n        uiState.pendingNavigation = {\n          url: redirectUrl.toString(),\n          label: 'the recommended collection',\n          type: 'collection',\n          from: window.location.pathname,\n          submit_on_arrival: true\n        };\n        persistUiState();\n      }\n      window.location.assign(redirectUrl.toString());\n      return false;\n    }\n\n    empty?.setAttribute('hidden', '');\n    results.hidden = true;\n    status.hidden = false;\n    if ((isPublicCatalog || isPublicProduct) && finnDeliveryHelp(query)) {\n      const delivery = FINN_GUIDE_TOPICS.find(topic => topic.id === 'delivery');\n      const messages = finnEmergencyRememberTurn(assistant, query, { answer: delivery.answer });\n      results.innerHTML = renderFinnConversationHistory(messages) + renderFinnGuideAnswer('How delivery works');\n      results.hidden = false;\n      status.hidden = true;\n      return true;\n    }\n    if (isPublicCatalog && isGeneralMaterialHelp(query)) {\n      const topics = matchingFinnGuideTopics(query);\n      const messages = finnEmergencyRememberTurn(assistant, query, { answer: topics[0].answer });\n      results.innerHTML = renderFinnConversationHistory(messages) + renderFinnGuideAnswer(query);\n      results.hidden = false;\n      status.hidden = true;\n      return true;\n    }\n    if (isPublicProduct || isPublicCatalog) {\n      status.textContent = finnRepairText('loading');\n      try {\n        const payload = isPublicProduct\n          ? await finnPublicProductPost(assistant, query, requestedShape)\n          : await finnPublicCatalogPost(assistant, query);\n        status.hidden = true;\n        if (isPublicCatalog) {\n          payload.product_recommendations = await finnRefreshCatalogProducts(payload, query);\n        }\n        if (requestSequence !== publicRequestSequence) return false;\n        renderEmergencyFinnPublicResults(results, payload, query, assistant, isPublicCatalog);\n        return true;\n      } catch (error) {\n        if (requestSequence !== publicRequestSequence) return false;\n        if (isPublicCatalog) {\n          const products = await finnRefreshCatalogProducts({}, query);\n          if (requestSequence !== publicRequestSequence) return false;\n          status.hidden = true;\n          renderEmergencyFinnPublicResults(results, { product_recommendations: products }, query, assistant, true);\n          return false;\n        }\n        status.hidden = true;\n        renderReskuAiResults(results, {\n          answer_title: 'Storefront context unavailable',\n          answer: 'Finn cannot use current published storefront evidence right now.',\n          recommended_filters: [], product_recommendations: [], follow_up_questions: []\n        }, { products: [] }, '', {});\n        return false;\n      }\n    }\n    const nativeSearchPromise = fetchNativeSearchResults(query);\n\n    if (!endpoints.length) {\n      const nativeResults = await resolveNativeSearchResults(query, {}, await nativeSearchPromise);\n      uiState.lastPayload = {};\n      uiState.lastNativeResults = nativeResults;\n      uiState.forceMode = 'regular_search';\n      status.hidden = true;\n      renderFromState(query, {}, nativeResults);\n      return false;\n    }\n\n    status.textContent = uiState.active || uiState.forceMode === 'guided_finn'\n      ? 'Finding helpful Finn guidance...'\n      : 'Checking regular search and Finn guidance...';\n\n    try {\n      const [payload, exactNativeResults] = await Promise.all([\n        postReskuAiRequest(\n          endpoints,\n          JSON.stringify({\n            query,\n            context: {\n              ...context,\n              conversation_id: uiState.finnSessionId || uiState.conversation?.conversation_id || '',\n              conversation_state: uiState.conversation || {},\n              navigation: uiState.pendingNavigation || {}\n            },\n            requested_shape: requestedShape\n          })\n        ),\n        nativeSearchPromise\n      ]);\n      const nativeResults = await resolveNativeSearchResults(query, payload, exactNativeResults);\n      uiState.finnSessionId = payload?.finn_session_id || uiState.finnSessionId;\n      uiState.conversation = payload?.conversation || uiState.conversation;\n      uiState.lastPayload = payload;\n      uiState.lastNativeResults = nativeResults;\n      uiState.messages = [\n        ...uiState.messages,\n        { role: 'shopper', text: query },\n        ...(payload?.answer ? [{ role: 'assistant', text: polishFinnAnswer(payload.answer) }] : [])\n      ].slice(-10);\n      uiState.pendingNavigation = null;\n\n      status.hidden = true;\n      renderFromState(query, payload, nativeResults);\n      persistUiState();\n      syncSubmitLabel();\n      return true;\n    } catch (error) {\n      const nativeResults = await resolveNativeSearchResults(query, {}, await nativeSearchPromise);\n      const fallbackPayload = {\n        answer_title: 'Finn connection',\n        answer: friendlyFinnError(error),\n        recommended_filters: [],\n        product_recommendations: [],\n        follow_up_questions: []\n      };\n      uiState.lastPayload = fallbackPayload;\n      uiState.lastNativeResults = nativeResults;\n      uiState.forceMode = 'regular_search';\n      status.hidden = true;\n      renderFromState(query, fallbackPayload, nativeResults);\n      syncSubmitLabel();\n      return false;\n    }\n  };\n\n  form.addEventListener('submit', (event) => {\n    event.preventDefault();\n    submitAssistant();\n  });\n\n  results.addEventListener('submit', async (event) => {\n    const contactForm = event.target.closest('[data-resku-contact-form]');\n    if (!contactForm) return;\n\n    event.preventDefault();\n    const contactStatus = contactForm.querySelector('[data-resku-contact-status]');\n    const submitContactButton = contactForm.querySelector('button[type=\"submit\"]');\n    const alertPayload = buildShopperContactAlert(contactForm, context, uiState);\n    const missing = validateShopperContactAlert(alertPayload);\n\n    if (missing.length) {\n      if (contactStatus) {\n        contactStatus.textContent = `Please add ${missing.join(', ')}.`;\n        contactStatus.hidden = false;\n      }\n      return;\n    }\n\n    if (contactStatus) {\n      contactStatus.textContent = 'Sending this to the store team...';\n      contactStatus.hidden = false;\n    }\n    if (submitContactButton) {\n      submitContactButton.disabled = true;\n    }\n\n    try {\n      await postShopperContactAlert(alertPayload, shopperContactAlertEndpoints(assistant.dataset.endpoint));\n      if (contactStatus) {\n        contactStatus.textContent = 'Got it. Your request was sent to the store team.';\n      }\n      contactForm.reset();\n    } catch (error) {\n      if (contactStatus) {\n        contactStatus.textContent = 'I could not send that yet. Please call or email the store, or try again in a moment.';\n      }\n      if (submitContactButton) {\n        submitContactButton.disabled = false;\n      }\n    }\n  });\n\n  results.addEventListener('click', (event) => {\n    const travel = event.target.closest('[data-resku-finn-travel]');\n    if (travel) {\n      const rawUrl = travel.getAttribute('href') || '/';\n      const targetUrl = finnTravelUrl(rawUrl);\n      if (new URL(targetUrl, window.location.origin).origin !== window.location.origin) return;\n      event.preventDefault();\n      uiState.active = true;\n      uiState.forceMode = 'guided_finn';\n      uiState.pendingNavigation = {\n        url: targetUrl,\n        label: travel.getAttribute('data-finn-target-label') || 'the next page',\n        type: travel.getAttribute('data-finn-target-type') || 'page',\n        from: window.location.pathname\n      };\n      persistUiState();\n      window.location.assign(targetUrl);\n      return;\n    }\n\n    const action = event.target.closest('[data-resku-ai-action]');\n    if (action) {\n      const actionType = action.getAttribute('data-resku-ai-action') || '';\n      if (actionType === 'guided_finn') {\n        uiState.active = true;\n        uiState.forceMode = 'guided_finn';\n        syncSubmitLabel();\n        status.hidden = true;\n        renderFromState(uiState.originalQuery || input.value.trim(), uiState.lastPayload, uiState.lastNativeResults);\n        persistUiState();\n      }\n      return;\n    }\n\n    const suggestion = event.target.closest('[data-resku-ai-suggest]');\n    if (!suggestion) return;\n\n    const current = input.value.trim();\n    const addition = suggestion.getAttribute('data-resku-ai-suggest') || '';\n    if (!addition) return;\n\n    const currentWords = normalizedQueryWords(current);\n    const additionWords = normalizedQueryWords(addition);\n    const alreadyIncluded = additionWords.every((word) => currentWords.includes(word));\n    input.value = alreadyIncluded ? current : [current, addition].filter(Boolean).join(' ');\n    if (uiState.originalQuery) {\n      uiState.active = true;\n      uiState.forceMode = 'guided_finn';\n    }\n    syncSubmitLabel();\n    input.focus();\n    submitAssistant();\n  });\n\n  const shouldAutoSubmitFinn = assistant.dataset.autoSubmit === 'true'\n    || Boolean(startupFinnQuery && (\n      !startupFinnResume\n      || (isDrawerAssistant && storedSession.pending_navigation?.submit_on_arrival)\n    ));\n  if (shouldAutoSubmitFinn && input.value.trim() && endpoint) {\n    window.setTimeout(() => submitAssistant(), 160);\n  }\n\n  if (isDrawerAssistant && startupFinnResume && !storedSession.pending_navigation?.submit_on_arrival && uiState.lastQuery && Object.keys(uiState.lastPayload || {}).length) {\n    input.value = uiState.lastQuery;\n    empty?.setAttribute('hidden', '');\n    renderFinnResumeLanding(resumeNode, storedSession);\n    renderFromState(uiState.lastQuery, uiState.lastPayload, uiState.lastNativeResults);\n    const drawer = assistant.closest('[data-resku-ai-drawer]');\n    const launcher = document.querySelector('[data-resku-ai-drawer-open]');\n    drawer?.removeAttribute('hidden');\n    document.documentElement.classList.add('resku-ai-drawer-open');\n    launcher?.setAttribute('aria-expanded', 'true');\n    uiState.pendingNavigation = null;\n    persistUiState({ pending_navigation: null });\n    if (window.history?.replaceState) {\n      const cleanUrl = new URL(window.location.href);\n      cleanUrl.searchParams.delete('finn_resume');\n      window.history.replaceState({}, '', `${cleanUrl.pathname}${cleanUrl.search}${cleanUrl.hash}`);\n    }\n  }\n});\n\ndocument.querySelectorAll('[data-product-thumb]').forEach((thumb) => {\n  thumb.addEventListener('click', (event) => {\n    const productMedia = thumb.closest('.product__media');\n    const mainImage = productMedia?.querySelector('.product__media-main img');\n    const thumbImage = thumb.querySelector('img');\n    if (!mainImage || !thumbImage) return;\n\n    event.preventDefault();\n    mainImage.src = thumb.href;\n    mainImage.removeAttribute('srcset');\n    mainImage.alt = thumbImage.alt || mainImage.alt;\n\n    productMedia.querySelectorAll('[data-product-thumb][aria-current=\"true\"]').forEach((currentThumb) => {\n      currentThumb.removeAttribute('aria-current');\n    });\n    thumb.setAttribute('aria-current', 'true');\n  });\n});\n\n// Keep the purchase summary in sync for every native variant selector.\ndocument.querySelectorAll('.product-form [data-variant-select]').forEach((select) => {\n  const form = select.closest('form');\n  const root = form?.closest('.product');\n  const source = form?.querySelector('[data-product-variants]');\n  if (!root || !source) return;\n  let variants;\n  try { variants = JSON.parse(source.textContent); } catch { return; }\n  const updatePurchase = () => {\n    const variant = variants.find((item) => String(item.id) === String(select.value));\n    if (!variant) return;\n    const price = root.querySelector('[data-product-price]');\n    if (price && variant.priceMarkup) price.innerHTML = variant.priceMarkup;\n    const button = form.querySelector('[name=\"add\"]');\n    if (button) {\n      button.disabled = !variant.available;\n      button.textContent = variant.available ? button.dataset.addLabel : button.dataset.soldOutLabel;\n    }\n    const image = root.querySelector('.product__image');\n    if (image && variant.image) {\n      image.removeAttribute('srcset');\n      image.src = variant.image;\n      image.alt = variant.imageAlt || '';\n    }\n    const url = new URL(window.location.href);\n    url.searchParams.set('variant', String(variant.id));\n    window.history.replaceState({}, '', url);\n  };\n  select.addEventListener('change', updatePurchase);\n});\n"],
  "mappings": "AAAA,MAAM,oBAAsB,KAAK,MAAM,SAAS,eAAe,qBAAqB,GAAG,aAAe,IAAI,EAE1G,SAAS,gBAAgB,UAAY,SAAS,gBAAgB,UAAU,QAAQ,QAAS,IAAI,EAE7F,eAAe,OAAO,iBAAkB,cAA4B,WAAY,CAC9E,aAAc,CACZ,MAAM,EACN,KAAK,MAAQ,KAAK,cAAc,OAAO,EACvC,KAAK,iBAAiB,QAAQ,EAAE,QAAS,QAAW,CAClD,OAAO,iBAAiB,QAAS,KAAK,cAAc,KAAK,IAAI,CAAC,CAChE,CAAC,CACH,CAEA,cAAc,MAAO,CACnB,MAAM,eAAe,EACrB,MAAM,cAAgB,OAAO,KAAK,MAAM,OAAS,CAAC,EAC9C,MAAM,cAAc,OAAS,OAC/B,KAAK,MAAM,OAAO,EAElB,KAAK,MAAM,SAAS,EAElB,gBAAkB,OAAO,KAAK,MAAM,KAAK,GAC3C,KAAK,MAAM,cAAc,IAAI,MAAM,SAAU,CAAE,QAAS,EAAK,CAAC,CAAC,CAEnE,CACF,CAAC,EAED,SAAS,iBAAiB,QAAU,OAAU,CAC5C,MAAM,OAAS,MAAM,OAAO,QAAQ,oBAAoB,EACxD,GAAI,CAAC,OAAQ,OAEb,MAAM,OAAS,SAAS,cAAc,oBAAoB,EACpD,SAAW,OAAO,aAAa,eAAe,IAAM,OAC1D,OAAO,aAAa,gBAAiB,OAAO,CAAC,QAAQ,CAAC,EACtD,QAAQ,gBAAgB,SAAU,QAAQ,CAC5C,CAAC,EAED,MAAM,cAAgB,MAAM,KAAK,SAAS,iBAAiB,iCAAiC,CAAC,EAC7F,IAAI,mBAEJ,SAAS,eAAe,W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