{
  "version": 3,
  "sources": ["/cdn/shop/t/92/assets/pdp-clean-v4-commerce.js?lly=laley-custom-20260921-epostsjekk-v860"],
  "sourcesContent": ["/* ============================================================\n   Laley PDP Clean v4 \u2014 commerce\n   Modul\u00E6r PDP-runtime. Den gamle v3-monolitten er kun historisk arkiv.\n   Registrerer metoder p\u00E5 LaleyPDP.prototype via PDP.registerModule.\n   Krever pdp-clean-v4-core.js lastet f\u00F8rst (defer-rekkef\u00F8lge i product-clean-v3-1.liquid).\n   ============================================================ */\n(() => {\n  const PDP = window.LaleyPDPCleanV4;\n  if (!PDP || typeof PDP.registerModule !== 'function') {\n    console.error('[PDP] Kjerne mangler \u2014 hopper over modul: commerce');\n    return;\n  }\n\n  // Badge typography is a global Laley rule, not an outfit-specific override.\n  const BADGE_FONT_TOKEN = 'var(--lly-font-label)';\n\n  const applyBadgeTypography = (root = document) => {\n    const badges = root.matches?.('.pdp-clean__outfit-card-badge')\n      ? [root]\n      : Array.from(root.querySelectorAll?.('.pdp-clean__outfit-card-badge') || []);\n    badges.forEach((badge) => {\n      if (\n        badge.style.getPropertyValue('font-family') === BADGE_FONT_TOKEN\n        && badge.style.getPropertyPriority('font-family') === 'important'\n      ) return;\n      badge.style.setProperty('font-family', BADGE_FONT_TOKEN, 'important');\n    });\n  };\n\n  PDP.registerModule('commerce', {\n    productTitle() {\n      return this.section.querySelector('.pdp-clean__title')?.textContent?.trim() || 'produktet';\n    },\n\n    announcePurchase(message) {\n      if (!this.purchaseStatus) return;\n      this.purchaseStatus.textContent = '';\n      window.requestAnimationFrame(() => {\n        if (!this.destroyed && this.purchaseStatus?.isConnected) this.purchaseStatus.textContent = message;\n      });\n    },\n\n    setPurchaseFeedback(state, message) {\n      this.purchaseFeedbackState = state || null;\n      const pending = state === 'loading';\n      const locked = Boolean(state);\n      [this.atc, this.stickyButton].forEach((button) => {\n        if (!button) return;\n        if (pending) button.setAttribute('aria-busy', 'true');\n        else button.removeAttribute('aria-busy');\n        button.disabled = locked;\n        if (message) button.textContent = message;\n      });\n      if (message) this.announcePurchase(message);\n    },\n\n    restorePurchaseControls() {\n      this.purchaseFeedbackState = null;\n      if (typeof this.updateButtons === 'function') this.updateButtons(this.currentVariant);\n      if (typeof this.updateStickyContent === 'function') this.updateStickyContent(this.currentVariant);\n    },\n\n    openKundeklubb(trigger = null) {\n      const requestedMode = trigger?.dataset?.mode;\n      const triggerHasContext = trigger?.matches?.('[data-kk-open]');\n      const contextualTrigger = requestedMode === 'bis'\n        ? this.section.querySelector('[data-pdp-restock-trigger]')\n        : this.section.querySelector('[data-pdp-coming-soon-cta]');\n      const source = triggerHasContext ? trigger : (contextualTrigger || trigger || this.section);\n      const isProductSignup = source?.matches?.('[data-kk-waitlist], [data-kk-restock]');\n      const selectedVariantId = String(this.variantInput?.value || this.currentVariant?.id || '').trim();\n      // The server-rendered trigger cannot know a size selected after hydration.\n      // Carry the exact current variant on the owned trigger before the lazy\n      // Kundeklubb controller reads it. This is especially important for Shopify\n      // Bundles, where each pants/top combination is its own catalog variant.\n      if (isProductSignup && selectedVariantId) source.dataset.kkVariantId = selectedVariantId;\n\n      const open = () => {\n        const popup = document.querySelector('[data-kk-popup]');\n        if (popup?.classList.contains('is-open')) return true;\n        if (window.LaleyKundeklubb?.open(source, 'sidebar')) return true;\n        // Never use the promotional discount badge as a restock fallback: that\n        // opens the conversion popup and loses the selected variant context.\n        if (!isProductSignup) {\n          const badge = document.querySelector('[data-kk-badge]');\n          if (badge instanceof HTMLElement) badge.click();\n        }\n        return false;\n      };\n      const openAfterIntent = () => new Promise((resolve) => {\n        // Mount after the originating click has finished propagating, so it\n        // cannot be interpreted as an outside click by the newly connected\n        // drawer. A bounded readiness check handles custom-element upgrade time.\n        let attempt = 0;\n        const ensureOpen = () => {\n          const didOpen = open();\n          const popup = document.querySelector('[data-kk-popup]');\n          if (didOpen && popup?.classList.contains('is-open')) {\n            resolve(true);\n            return;\n          }\n          attempt += 1;\n          if (attempt >= 8) {\n            resolve(false);\n            return;\n          }\n          window.setTimeout(ensureOpen, 75);\n        };\n        window.requestAnimationFrame(ensureOpen);\n      });\n      const loadClub = () => {\n        if (window.LaleyKundeklubb?.open) return Promise.resolve('ready');\n        if (window.LaleyUI?.load) return window.LaleyUI.load('club');\n\n        // A very early PDP click can arrive before the deferred UI loader has\n        // installed window.LaleyUI. Wait for its explicit lifecycle event rather\n        // than silently exhausting a few arbitrary retries.\n        return new Promise((resolve, reject) => {\n          let settled = false;\n          let timeout = null;\n          const finish = (callback, value) => {\n            if (settled) return;\n            settled = true;\n            document.removeEventListener('laley:ui:ready', onReady);\n            window.clearTimeout(timeout);\n            callback(value);\n          };\n          const onReady = () => {\n            if (!window.LaleyUI?.load) {\n              finish(reject, new Error('Laley UI loader unavailable'));\n              return;\n            }\n            window.LaleyUI.load('club')\n              .then((value) => finish(resolve, value))\n              .catch((error) => finish(reject, error));\n          };\n          timeout = window.setTimeout(\n            () => finish(reject, new Error('Laley UI loader timeout')),\n            3000\n          );\n          document.addEventListener('laley:ui:ready', onReady, { once: true });\n        });\n      };\n      // Kundeklubb stays outside the critical path. The returned result lets the\n      // purchase owner report a controlled failure instead of a silent no-op.\n      return loadClub().then(openAfterIntent).catch(() => false);\n    },\n\n    bindBadgeTypography() {\n      const outfit = this.section.querySelector('.pdp-clean__outfit') || this.section;\n      let raf = null;\n      const schedule = () => {\n        if (raf) return;\n        raf = requestAnimationFrame(() => {\n          raf = null;\n          applyBadgeTypography(outfit);\n        });\n      };\n      schedule();\n      const observer = new MutationObserver((mutations) => {\n        for (const mutation of mutations) {\n          if (mutation.type === 'childList') {\n            schedule();\n            return;\n          }\n          if (\n            mutation.type === 'attributes'\n            && mutation.attributeName === 'style'\n            && mutation.target?.classList?.contains('pdp-clean__outfit-card-badge')\n          ) {\n            schedule();\n            return;\n          }\n        }\n      });\n      observer.observe(outfit, {\n        childList: true,\n        subtree: true,\n        attributes: true,\n        attributeFilter: ['style'],\n      });\n      this.unsubs.push(() => {\n        if (raf) cancelAnimationFrame(raf);\n        observer.disconnect();\n      });\n    },\n\n    bindOutfitForm(form, bubbles = false) {\n      if (!form || form.dataset.pdpOutfitBound === 'true') return;\n      form.dataset.pdpOutfitBound = 'true';\n      const button = form.querySelector('[data-pdp-outfit-add]');\n      const select = form.querySelector('[data-pdp-outfit-select]');\n      const idInput = form.querySelector('[data-pdp-outfit-variant-id]') || form.querySelector('input[name=\"id\"]');\n      if (!button) return;\n\n      const sync = () => {\n        if (!select) {\n          button.disabled = !idInput?.value || button.dataset.forceDisabled === 'true';\n          return;\n        }\n        const selected = select.selectedOptions?.[0];\n        const value = select.value || '';\n        const available = Boolean(value) && selected?.dataset.available !== 'false' && !selected?.disabled;\n        if (idInput) idInput.value = available ? value : '';\n        button.disabled = !available;\n        // Sondre juli-26: knappen er skjult til st\u00F8rrelse er valgt (sparer\n        // kort-h\u00F8yde) \u2014 vis den ved gyldig valg, skjul igjen ved tom/utsolgt.\n        button.hidden = !value;\n      };\n\n      if (select) {\n        this.on(select, 'change', sync);\n        sync();\n      }\n\n      this.on(form, 'submit', (event) => {\n        event.preventDefault();\n        event.stopPropagation();\n        sync();\n        if (button.disabled) {\n          if (select) select.focus();\n          return;\n        }\n        this.addOutfitFormToCart(form, button, sync);\n      });\n    },\n\n    async addOutfitFormToCart(form, button, sync) {\n      const formData = new FormData(form);\n      const variantId = String(formData.get('id') || '').trim();\n      if (!variantId) {\n        button.textContent = window.LaleyTranslate(\"choose_a_size_28892d\", \"Velg st\u00F8rrelse\");\n        sync?.();\n        return;\n      }\n\n      // Add directly once. theme:cart:add also performs an add in theme.js.\n      // The success events below refresh and open the cart after this request.\n\n      const originalText = button.textContent;\n      button.disabled = true;\n      button.textContent = window.LaleyTranslate(\"adding_a57e8a\", \"Legger til \u2026\");\n      this.announcePurchase(window.LaleyTranslate(\"adding_to_cart_590c8e\", \"Legger til i handlekurven\"));\n      window.LaleyCartInspiration?.beginAdd?.(button);\n\n      try {\n        const response = await fetch(this.cartUrl('cart/add.js'), {\n          method: 'POST',\n          headers: { Accept: 'application/json' },\n          body: formData,\n          signal: this.signal,\n        });\n        if (!response.ok) throw new Error('cart/add failed');\n        const item = await response.json();\n        // The add already succeeded. A failed refresh must not invite a duplicate add.\n        let cart = null;\n        try {\n          const cartResponse = await fetch(this.cartUrl('cart.js'), {\n            headers: { Accept: 'application/json' }, signal: this.signal,\n          });\n          if (cartResponse.ok) cart = await cartResponse.json();\n        } catch (_) { /* The confirmation refetches a missing snapshot. */ }\n\n        if (cart?.items) this.refreshCartCount(cart.item_count);\n        window.LaleyCartInspiration?.present?.({ cart, item, button,\n          addedQuantity: Math.max(1, Number(formData.get('quantity')) || 1) });\n        window.LaleyCartInspiration?.finishAdd?.(button);\n        if (cart?.items) this.announceCartUpdate(cart, item);\n        const ownsCartHandoff = window.LaleyCartInspiration?.ownsCartHandoff?.()\n          || window.LaleySubscriptionUpgrade?.ownsCartHandoff?.()\n          || window.LaleySetUpgrade?.ownsCartHandoff?.()\n          || window.LaleyProductUpsell?.ownsCartHandoff?.();\n        if (!ownsCartHandoff) this.openCartDrawer(cart);\n\n        button.textContent = window.LaleyTranslate(\"added_to_cart_755031\", \"Lagt i handlekurven\");\n        this.announcePurchase(window.LaleyTranslate(\"added_to_cart_755031\", \"Lagt i handlekurven\"));\n        const timer = window.setTimeout(() => {\n          button.textContent = originalText;\n          sync?.();\n        }, 950);\n        this.timers.push(timer);\n      } catch (error) {\n        if (error?.name === 'AbortError' || this.destroyed) return;\n        button.textContent = window.LaleyTranslate(\"something_went_wrong_please_try_again_989566\", \"Noe gikk galt \u2013 pr\u00F8v igjen\");\n        this.announcePurchase(window.LaleyTranslate(\"something_went_wrong_please_try_again_989566\", \"Noe gikk galt \u2013 pr\u00F8v igjen\"));\n        const timer = window.setTimeout(() => {\n          button.textContent = originalText;\n          sync?.();\n        }, 1400);\n        this.timers.push(timer);\n      } finally {\n        window.LaleyCartInspiration?.finishAdd?.(button);\n      }\n    },\n\n    refreshCartCount(count) {\n      const numericCount = Number(count);\n      if (!Number.isFinite(numericCount) || numericCount < 0) return;\n      const safeCount = Math.floor(numericCount);\n      document.querySelectorAll('[data-cart-count], [data-cart-count-bubble], .cart-count-bubble, .cart-count, .laley-hv2__cart-count').forEach((el) => {\n        const limit = Number(el.getAttribute('data-limit'));\n        el.textContent = Number.isFinite(limit) && limit > 0 && safeCount >= limit\n          ? `${limit - 1}+`\n          : String(safeCount);\n        el.setAttribute('data-cart-count', String(safeCount));\n        el.classList.toggle('is-empty', safeCount === 0);\n        el.hidden = false;\n        el.setAttribute('aria-hidden', safeCount === 0 ? 'true' : 'false');\n      });\n    },\n\n    announceCartUpdate(cart, item) {\n      // cartCount M\u00C5 med: temaets <cart-count>.onCartChange leser detail.cartCount\n      // fra theme:cart:change og skriver bokstavelig \u00ABundefined\u00BB hvis den mangler.\n      const detail = { cart, item, cartCount: Number(cart?.item_count) || 0 };\n      ['cart:refresh', 'cart:updated', 'cart:change', 'theme:cart:change', 'theme:cart:updated'].forEach((name) => {\n        document.dispatchEvent(new CustomEvent(name, { bubbles: true, detail }));\n      });\n    },\n\n    /* Packshot-kjeden (productLastImage/cartDrawerRoots/cartRowForAnchor/\n       cartImageForRow/applyCartPackshotImage/bindCartPackshots/\n       hydrateCartPackshots, ~180 linjer) er PENSJONERT (audit #7):\n       cart-line-items.liquid server-rendrer packshoten via felles\n       laley-packshot-url-resolver for alle render-veier inkl.\n       api-cart-items \u2014 JS-swappen degraderte den til ucappede full-res-bilder\n       og kj\u00F8rte ~80 DOM-pass per add. */\n\n    openCartDrawer(cart) {\n      const cartCount = Number(cart?.item_count);\n      const detail = {\n        source: 'pdp-add',\n        cart: cart || null,\n        cartCount: Number.isFinite(cartCount) && cartCount >= 0 ? Math.floor(cartCount) : 0,\n      };\n      // 1) Refresh the drawer's contents \u2014 the direct add updated the cart on the\n      //    server, but the drawer renders its own DOM, so tell it to re-fetch.\n      ['theme:cart:updated', 'theme:product:added', 'cart:updated', 'theme:cart:change'].forEach((name) => {\n        document.dispatchEvent(new CustomEvent(name, { bubbles: true, detail }));\n      });\n      // 2) Open it. The Laley cart drawer opens when the header bag link is\n      //    clicked (its own JS intercepts the click) \u2014 that's the reliable path.\n      const bag = document.querySelector('.laley-hv2__action--cart, a[href=\"/cart\"][aria-label], [data-cart-toggle], [aria-controls=\"cart-drawer\"], [aria-controls=\"CartDrawer\"]');\n      if (bag instanceof HTMLElement) {\n        const timer = window.setTimeout(() => bag.click(), 80);\n        this.timers.push(timer);\n        return;\n      }\n      // Fallback (other themes / structures): open events + element methods.\n      ['cart:open', 'theme:cart:open', 'ajaxCart:open', 'drawer:open'].forEach((name) => {\n        document.dispatchEvent(new CustomEvent(name, { bubbles: true, detail }));\n      });\n      const drawer = document.querySelector('cart-drawer, [data-cart-drawer], #CartDrawer, .cart-drawer');\n      if (drawer) {\n        ['open', 'show', 'showDrawer'].some((method) => {\n          if (typeof drawer[method] !== 'function') return false;\n          drawer[method]();\n          return true;\n        });\n        drawer.removeAttribute('hidden');\n        drawer.classList.add('is-open', 'active', 'animate');\n      }\n    },\n\n    bindPurchaseOptions() {\n      // Abonnementsvelger: synk selling_plan-input + ATC-pris med valgt\n      // kj\u00F8psalternativ. Planprisene oppdateres ved variantbytte fra\n      // variant.sellingPlanAllocations, s\u00E5 abonnementsvarianter kan dele\n      // Recharge-UI uten stale pris.\n      this.purchaseOptionsWrap = this.section.querySelector('[data-pdp-purchase-options]');\n      if (!this.purchaseOptionsWrap) return;\n      this.purchasePlanInput = this.purchaseOptionsWrap.querySelector('[data-pdp-selling-plan-input]');\n      this.purchaseRadios = Array.from(this.purchaseOptionsWrap.querySelectorAll('[data-pdp-purchase-radio]'));\n      this.purchasePlanSelect = this.purchaseOptionsWrap.querySelector('[data-pdp-plan-select]');\n      this.purchaseSubscriptionRadio = this.purchaseOptionsWrap.querySelector('[data-pdp-subscription-radio]');\n      if (!this.purchasePlanInput || !this.purchaseRadios.length) return;\n      this.purchaseRadios.forEach((radio) => this.on(radio, 'change', () => this.syncPurchaseOptions()));\n      if (this.purchasePlanSelect) {\n        this.on(this.purchasePlanSelect, 'change', () => {\n          this.applyPurchasePlanSelect();\n          if (this.purchaseSubscriptionRadio && !this.purchaseSubscriptionRadio.disabled) {\n            this.purchaseSubscriptionRadio.checked = true;\n          }\n          this.syncPurchaseOptions();\n        });\n      }\n      this.updatePurchaseOptionsForVariant(this.currentVariant);\n      this.syncPurchaseOptions();\n    },\n\n    selectedPurchasePlanOption() {\n      const select = this.purchasePlanSelect;\n      if (!select) return null;\n      return select.selectedOptions?.[0] || Array.from(select.options).find((option) => option.selected) || null;\n    },\n\n    applyPurchasePlanSelect() {\n      const select = this.purchasePlanSelect;\n      const radio = this.purchaseSubscriptionRadio;\n      const option = this.selectedPurchasePlanOption();\n      if (!select || !radio || !option) return;\n\n      const planId = String(option.value || '');\n      const price = Number(option.dataset.planPrice || radio.dataset.planPrice || 0);\n      const comparePrice = Number(option.dataset.planComparePrice || this.currentVariant?.price || 0);\n      const savings = Number(option.dataset.planSavingsPct || 0);\n\n      radio.value = planId;\n      radio.dataset.planId = planId;\n      if (Number.isFinite(price) && price > 0) radio.dataset.planPrice = String(price);\n\n      const label = radio.closest('[data-pdp-purchase-option]');\n      const titleEl = label?.querySelector('[data-pdp-subscription-title]');\n      const badgeEl = label?.querySelector('[data-pdp-subscription-badge]');\n      const priceEl = label?.querySelector('[data-pdp-subscription-price]');\n      const planLabelEl = label?.querySelector('[data-pdp-plan-label]');\n      const subEl = label?.querySelector('.pdp-clean__purchase-option-sub');\n      const isSelfcare = this.section?.dataset?.pdpSelfcare === 'true';\n      const planLabel = option.dataset.planLabel || option.textContent.trim();\n\n      if (titleEl) titleEl.textContent = savings > 0 ? window.LaleyTranslate(\"subscribe_and_save_52ab47\", \"Abonner og spar\") : window.LaleyTranslate(\"subscribe_98ba80\", \"Abonner\");\n      if (subEl) subEl.textContent = isSelfcare ? window.LaleyTranslate(\"free_delivery_no_commitment_af67ec\", \"Gratis levering \u00B7 ingen binding\") : window.LaleyTranslate(\"no_commitment_69d825\", \"Ingen binding\");\n      if (planLabelEl && planLabel) planLabelEl.textContent = planLabel;\n      if (badgeEl) {\n        badgeEl.hidden = !(savings > 0);\n        badgeEl.textContent = savings > 0 ? `${window.LaleyTranslate(\"save_101a0d\", \"SPAR\")} ${savings} %` : '';\n      }\n      if (priceEl && Number.isFinite(price) && price > 0) {\n        priceEl.replaceChildren();\n        if (savings > 0 && Number.isFinite(comparePrice) && comparePrice > price) {\n          const compare = document.createElement('s');\n          compare.className = 'pdp-clean__purchase-option-compare';\n          compare.textContent = this.money(comparePrice);\n          priceEl.append(compare);\n        }\n        priceEl.append(document.createTextNode(this.money(price)));\n      }\n    },\n\n    currentPurchaseState(variant = this.currentVariant) {\n      const chosen = (this.purchaseRadios || [])\n        .find((radio) => radio.checked && !radio.disabled && !radio.closest('[data-pdp-purchase-option]')?.hidden);\n      const sellingPlanId = String(chosen?.value || '');\n      const allocation = sellingPlanId && variant\n        ? (variant.sellingPlanAllocations || [])\n          .find((item) => String(item.sellingPlanId) === sellingPlanId)\n        : null;\n      const price = allocation?.price ?? variant?.price ?? 0;\n      const compareAtPrice = allocation?.compareAtPrice\n        ?? (sellingPlanId ? variant?.price : variant?.compareAtPrice)\n        ?? 0;\n\n      return {\n        variantId: variant?.id || null,\n        sellingPlanId: sellingPlanId || null,\n        selectedOptions: typeof this.selectedOptions === 'function'\n          ? this.selectedOptions()\n          : (variant?.options || []),\n        price,\n        compareAtPrice,\n        available: Boolean(variant?.available && (!sellingPlanId || allocation)),\n      };\n    },\n\n    publishPurchaseState() {\n      this.purchaseState = this.currentPurchaseState();\n      if (typeof this.updateStickyContent === 'function') {\n        this.updateStickyContent(this.currentVariant);\n      }\n      this.section.dispatchEvent(new CustomEvent('pdp:purchase-state', {\n        bubbles: true,\n        detail: this.purchaseState,\n      }));\n    },\n\n    syncPurchaseOptions() {\n      const wrap = this.purchaseOptionsWrap;\n      const input = this.purchasePlanInput;\n      const radios = this.purchaseRadios || [];\n      if (!wrap || !input || !radios.length) return;\n      this.applyPurchasePlanSelect();\n      let chosen = radios.find((radio) => radio.checked && !radio.disabled && !radio.closest('[data-pdp-purchase-option]')?.hidden);\n      if (!chosen) {\n        const preferSubscription = this.section?.dataset?.pdpSelfcare === 'true';\n        chosen = preferSubscription && this.purchaseSubscriptionRadio && !this.purchaseSubscriptionRadio.disabled\n          ? this.purchaseSubscriptionRadio\n          : radios.find((radio) => !radio.value && !radio.disabled) || radios.find((radio) => !radio.disabled);\n        if (chosen) chosen.checked = true;\n      }\n      if (!chosen) return;\n      input.value = chosen.value || '';\n      wrap.querySelectorAll('[data-pdp-purchase-option]').forEach((label) => {\n        label.classList.toggle('is-selected', label.contains(chosen));\n      });\n      // querySelectorAll, ikke querySelector: produktkortet i bruksguiden viser\n      // samme pris og maa foelge kjopsmodus. Ellers sto kortet paa 349 kr mens\n      // knappen sa 297 kr - to priser for samme vare paa samme side.\n      const atcPrices = this.section.querySelectorAll('[data-pdp-atc-price]');\n      const cents = Number(chosen.dataset.planPrice);\n      if (atcPrices.length && Number.isFinite(cents) && cents > 0) {\n        const formatted = this.money(cents);\n        atcPrices.forEach((node) => { node.textContent = formatted; });\n      }\n      this.publishPurchaseState();\n    },\n\n    updatePurchasePlanSelectForVariant(variant = this.currentVariant) {\n      const select = this.purchasePlanSelect;\n      if (!select || !variant) return;\n      let selectedStillValid = false;\n      Array.from(select.options).forEach((option) => {\n        const allocation = (variant.sellingPlanAllocations || [])\n          .find((item) => String(item.sellingPlanId) === String(option.value));\n        if (!allocation) {\n          option.disabled = true;\n          option.hidden = true;\n          return;\n        }\n        option.disabled = false;\n        option.hidden = false;\n        option.dataset.planPrice = String(allocation.price);\n        option.dataset.planComparePrice = String(variant.price);\n        const savings = variant.price > 0 && allocation.price < variant.price\n          ? Math.round(((variant.price - allocation.price) * 100) / variant.price)\n          : 0;\n        option.dataset.planSavingsPct = String(savings);\n        option.textContent = option.dataset.planLabel || option.textContent;\n        if (option.selected) selectedStillValid = true;\n      });\n      if (!selectedStillValid) {\n        const firstAvailable = Array.from(select.options).find((option) => !option.disabled && !option.hidden);\n        if (firstAvailable) firstAvailable.selected = true;\n      }\n      this.applyPurchasePlanSelect();\n    },\n\n    updatePurchaseOptionsForVariant(variant = this.currentVariant) {\n      const wrap = this.purchaseOptionsWrap || this.section.querySelector('[data-pdp-purchase-options]');\n      if (!wrap || !variant) return;\n      if (!variant.available) {\n        wrap.hidden = true;\n        if (this.purchasePlanInput) this.purchasePlanInput.value = '';\n        const radios = this.purchaseRadios || Array.from(wrap.querySelectorAll('[data-pdp-purchase-radio]'));\n        radios.forEach((radio) => {\n          radio.checked = false;\n          radio.disabled = true;\n          const label = radio.closest('[data-pdp-purchase-option]');\n          if (label) label.classList.remove('is-selected');\n        });\n        this.publishPurchaseState?.();\n        return;\n      }\n      wrap.hidden = false;\n      this.updatePurchasePlanSelectForVariant(variant);\n      const radios = this.purchaseRadios || Array.from(wrap.querySelectorAll('[data-pdp-purchase-radio]'));\n      radios.forEach((radio) => {\n        const label = radio.closest('[data-pdp-purchase-option]');\n        const priceEl = label?.querySelector('.pdp-clean__purchase-option-price');\n        const titleEl = label?.querySelector('.pdp-clean__purchase-option-title');\n        const badgeEl = label?.querySelector('[data-pdp-subscription-badge]');\n        if (!label || !priceEl) return;\n        if (!radio.value) {\n          radio.disabled = false;\n          label.hidden = false;\n          radio.dataset.planPrice = String(variant.price);\n          priceEl.textContent = this.money(variant.price);\n          return;\n        }\n        const allocation = (variant.sellingPlanAllocations || [])\n          .find((item) => String(item.sellingPlanId) === String(radio.dataset.planId || radio.value));\n        if (!allocation) {\n          radio.disabled = true;\n          label.hidden = true;\n          if (radio.checked) radio.checked = false;\n          return;\n        }\n        radio.disabled = false;\n        label.hidden = false;\n        radio.dataset.planPrice = String(allocation.price);\n        const savings = variant.price > 0 && allocation.price < variant.price\n          ? Math.round(((variant.price - allocation.price) * 100) / variant.price)\n          : 0;\n        if (titleEl) titleEl.textContent = savings > 0 ? window.LaleyTranslate(\"subscribe_and_save_52ab47\", \"Abonner og spar\") : window.LaleyTranslate(\"subscribe_98ba80\", \"Abonner\");\n        if (badgeEl) {\n          badgeEl.hidden = !(savings > 0);\n          badgeEl.textContent = savings > 0 ? `${window.LaleyTranslate(\"save_101a0d\", \"SPAR\")} ${savings} %` : '';\n        }\n        priceEl.replaceChildren();\n        if (savings > 0) {\n          const compare = document.createElement('s');\n          compare.className = 'pdp-clean__purchase-option-compare';\n          compare.textContent = this.money(variant.price);\n          priceEl.append(compare);\n        }\n        priceEl.append(document.createTextNode(this.money(allocation.price)));\n      });\n      this.syncPurchaseOptions();\n    },\n\n    // Single action owner. Both the main CTA and the sticky call this DIRECTLY with an\n    // explicit source \u2014 no proxy-click, no transient global flag. Keyboard (Enter/Space)\n    // and a programmatic HTMLElement.click() route here the same way; nothing depends on\n    // event.isTrusted or pointer coordinates.\n    async runPrimaryAction({ source = 'main' } = {}) {\n      this.clearError();\n      const mode = this.atc.dataset.mode;\n      if (mode === 'kundeklubb') {\n        const opened = await this.openKundeklubb(this.atc);\n        if (this.destroyed) return;\n        if (!opened) this.showError(window.LaleyTranslate(\"registration_could_not_be_opened_please_try_again_short_38e244\", \"P\u00E5meldingen kunne ikke \u00E5pnes. Pr\u00F8v igjen om litt.\"));\n        return;\n      }\n      if (mode === 'pick') {\n        const sizeGroups = Array.from(this.section.querySelectorAll('[data-pdp-size-group]'));\n        const requiredGroups = typeof this.requiredOptionGroups === 'function'\n          ? this.requiredOptionGroups()\n          : sizeGroups;\n        const nextRequiredGroup = requiredGroups.find((group) => !group.querySelector('[data-pdp-option-input]:checked'))\n          || requiredGroups[0];\n        const needsLength = Boolean(nextRequiredGroup?.hasAttribute('data-pdp-length-group'));\n        const isNotificationFlow = this.section?.dataset?.pdpComingSoon === 'true'\n          || (typeof this.isFullySoldOut === 'function' && this.isFullySoldOut());\n        if (requiredGroups.some((group) => group.hasAttribute('data-pdp-length-group'))) {\n          this.showError(needsLength\n            ? (isNotificationFlow ? window.LaleyTranslate(\"choose_a_leg_length_to_receive_a_notification_048d75\", \"Velg benlengde for \u00E5 f\u00E5 varsel.\") : window.LaleyTranslate(\"choose_a_leg_length_to_continue_6e3d1b\", \"Velg benlengde for \u00E5 fortsette.\"))\n            : (isNotificationFlow ? window.LaleyTranslate(\"choose_a_size_to_receive_a_notification_4eaf82\", \"Velg st\u00F8rrelse for \u00E5 f\u00E5 varsel.\") : window.LaleyTranslate(\"choose_a_size_to_continue_fa983c\", \"Velg st\u00F8rrelse for \u00E5 fortsette.\")));\n        } else {\n          this.showError(sizeGroups.length > 1\n            ? (isNotificationFlow ? window.LaleyTranslate(\"choose_sizes_for_both_pieces_to_receive_a_notification_0f6927\", \"Velg st\u00F8rrelse p\u00E5 begge delene for \u00E5 f\u00E5 varsel.\") : window.LaleyTranslate(\"choose_sizes_for_both_pieces_to_continue_f4f7ad\", \"Velg st\u00F8rrelse p\u00E5 begge delene for \u00E5 fortsette.\"))\n            : (isNotificationFlow ? window.LaleyTranslate(\"choose_a_size_to_receive_a_notification_4eaf82\", \"Velg st\u00F8rrelse for \u00E5 f\u00E5 varsel.\") : window.LaleyTranslate(\"choose_a_size_to_continue_fa983c\", \"Velg st\u00F8rrelse for \u00E5 fortsette.\")));\n        }\n        const sharedPicker = this.section.querySelector('[data-pdp-bundle-shared]:not([hidden])');\n        const sizeGroup = nextRequiredGroup\n          || sizeGroups[0]\n          || this.optionGroups.find((group) => !group.hasAttribute('data-pdp-color-group') && !group.querySelector('.pdp-clean__option--swatch'));\n        const target = sharedPicker || sizeGroup || this.optionGroups[0];\n        if (target) {\n          this.section.querySelectorAll('[data-pdp-dropdown]').forEach((dropdown) => {\n            dropdown.open = dropdown.closest('[data-pdp-size-group]') === target;\n          });\n          target.scrollIntoView({ behavior: 'smooth', block: 'center' });\n          const focusEl = target.querySelector('.pdp-clean__bundle-shared-pill:not(:disabled), .pdp-clean__dropdown-trigger, [data-pdp-option-input]');\n          if (focusEl && typeof focusEl.focus === 'function') {\n            try { focusEl.focus({ preventScroll: true }); } catch (error) { focusEl.focus(); }\n          }\n        }\n        return;\n      }\n      if (mode === 'bis') {\n        const pm = typeof this.purchaseMode === 'function' ? this.purchaseMode() : 'selected_variant_sold_out';\n        this.emitRestockAnalytics?.('restock_cta_click', { state: pm, source });\n        // Fully sold out WITH sizes and none chosen \u2192 make the size the first required\n        // step (Klaviyo needs the exact variant). A no-size product has\n        // hasRequiredSizeSelection()===true and skips straight to the panel.\n        if (pm === 'fully_sold_out' && typeof this.hasRequiredSizeSelection === 'function' && !this.hasRequiredSizeSelection()) {\n          const sizeGroups = Array.from(this.section.querySelectorAll('[data-pdp-size-group]'));\n          this.showError(sizeGroups.length > 1 ? window.LaleyTranslate(\"choose_sizes_for_both_pieces_to_receive_a_notification_0f6927\", \"Velg st\u00F8rrelse p\u00E5 begge delene for \u00E5 f\u00E5 varsel.\") : window.LaleyTranslate(\"choose_the_size_you_want_to_be_notified_about_a54fec\", \"Velg hvilken st\u00F8rrelse du \u00F8nsker varsel for.\"));\n          const sizeGroup = sizeGroups.find((group) => !group.querySelector('[data-pdp-option-input]:checked'))\n            || sizeGroups[0]\n            || this.optionGroups.find((group) => !group.hasAttribute('data-pdp-color-group') && !group.querySelector('.pdp-clean__option--swatch'));\n          const target = this.section.querySelector('[data-pdp-bundle-shared]:not([hidden])') || sizeGroup || this.optionGroups[0];\n          if (target) {\n            this.section.querySelectorAll('[data-pdp-dropdown]').forEach((dropdown) => {\n              dropdown.open = dropdown.closest('[data-pdp-size-group]') === target;\n            });\n            target.scrollIntoView({ behavior: 'smooth', block: 'center' });\n            const focusEl = target.querySelector('.pdp-clean__bundle-shared-pill:not(:disabled), .pdp-clean__dropdown-trigger, [data-pdp-option-input]');\n            if (focusEl && typeof focusEl.focus === 'function') { try { focusEl.focus({ preventScroll: true }); } catch (e) { focusEl.focus(); } }\n            target.classList.add('pdp-clean__picker--flash');\n            const t = window.setTimeout(() => target.classList.remove('pdp-clean__picker--flash'), 1300);\n            this.timers.push(t);\n          }\n          return;\n        }\n        // Size chosen (or none needed) \u2192 open Laley's owned restock flow. The\n        // hidden trigger carries product context while the selected variant is read\n        // directly from the PDP state, so the Klaviyo request remains exact.\n        const restockTrigger = this.section.querySelector('[data-pdp-restock-trigger]');\n        if (restockTrigger instanceof HTMLElement) {\n          this._bisOpened = { variantId: this.currentVariant?.id || null, state: pm, source };\n          this._bisSubmitted = false;\n          this.setPurchaseFeedback('loading', window.LaleyTranslate(\"opening_notifications_0362e6\", \"\u00C5pner varsling \u2026\"));\n          const opened = await this.openKundeklubb(restockTrigger);\n          if (this.destroyed) return;\n          this.restorePurchaseControls();\n          if (!opened) {\n            this._bisOpened = null;\n            this.showError(window.LaleyTranslate(\"notifications_could_not_be_opened_please_try_again_shor_dca8d9\", \"Varslingen kunne ikke \u00E5pnes. Pr\u00F8v igjen om litt.\"));\n          }\n          return;\n        }\n        // The owned integration is missing \u2192 controlled failure. Never imply a\n        // subscription succeeded when no integration was available.\n        this.emitRestockAnalytics?.('integration_missing', { state: pm, source });\n        this.showError(window.LaleyTranslate(\"notifications_are_currently_unavailable_please_try_agai_94a70c\", \"Varsling er dessverre utilgjengelig akkurat n\u00E5. Pr\u00F8v igjen om litt.\"));\n        return;\n      }\n      if (mode !== 'add' || this.purchaseFeedbackState) return;\n\n      this.setPurchaseFeedback('loading', window.LaleyTranslate(\"adding_a57e8a\", \"Legger til \u2026\"));\n      window.LaleyCartInspiration?.beginAdd?.(this.atc);\n      // Fire the drawer's intent/snapshot tracking, then add DIRECTLY. The old\n      // path only dispatched `theme:cart:add` and waited for a `theme:product:add`\n      // success event that NOTHING dispatches \u2014 so every main-button add hung for\n      // 6.5s then errored and the item was never added (the whole cart was dead).\n      document.dispatchEvent(new CustomEvent('theme:cart:add', {\n        detail: { button: this.atc },\n        bubbles: true,\n      }));\n      try {\n        const payload = new FormData(this.form);\n        // BIS kan t\u00F8mme Shopifys skjulte variantfelt. Kj\u00F8psmodusen er allerede\n        // validert som \u00ABadd\u00BB, s\u00E5 currentVariant er den autoritative kombinasjonen\n        // og settes atomisk i payloaden rett f\u00F8r foresp\u00F8rselen.\n        if (this.currentVariant?.id) payload.set('id', String(this.currentVariant.id));\n        // Kj\u00F8psvelgeren er ogs\u00E5 autoritativ for abonnement. Tredjeparts-\n        // varsling kan rydde det skjulte Shopify-feltet etter at UI-et er\n        // synkronisert, s\u00E5 legg valgt plan direkte i den endelige payloaden.\n        // Ved engangskj\u00F8p fjernes feltet helt, slik at en gammel/tom plan aldri\n        // kan endre kj\u00F8pet kunden nettopp valgte.\n        const purchaseState = this.currentPurchaseState?.(this.currentVariant);\n        if (purchaseState?.sellingPlanId) {\n          payload.set('selling_plan', String(purchaseState.sellingPlanId));\n        } else {\n          payload.delete('selling_plan');\n        }\n        const response = await fetch(this.cartUrl('cart/add.js'), {\n          method: 'POST',\n          headers: { Accept: 'application/json' },\n          body: payload,\n          signal: this.signal,\n        });\n        if (!response.ok) throw new Error('cart/add failed');\n        const item = await response.json();\n        // The add already succeeded. A failed refresh must not invite a duplicate add.\n        let cart = null;\n        try {\n          const cartResponse = await fetch(this.cartUrl('cart.js'), {\n            headers: { Accept: 'application/json' }, signal: this.signal,\n          });\n          if (cartResponse.ok) cart = await cartResponse.json();\n        } catch (_) { /* The confirmation refetches a missing snapshot. */ }\n        if (cart?.items) this.refreshCartCount(cart.item_count);\n        window.LaleyCartInspiration?.present?.({ cart, item, button: this.atc,\n          addedQuantity: Math.max(1, Number(payload.get('quantity')) || 1) });\n        window.LaleyCartInspiration?.finishAdd?.(this.atc);\n        if (cart?.items) this.announceCartUpdate(cart, item);\n        const ownsCartHandoff = window.LaleyCartInspiration?.ownsCartHandoff?.()\n          || window.LaleySubscriptionUpgrade?.ownsCartHandoff?.()\n          || window.LaleySetUpgrade?.ownsCartHandoff?.()\n          || window.LaleyProductUpsell?.ownsCartHandoff?.();\n        if (!ownsCartHandoff) this.openCartDrawer(cart);\n        this.setPurchaseFeedback('success', window.LaleyTranslate(\"added_to_cart_755031\", \"Lagt i handlekurven\"));\n        const timer = window.setTimeout(() => this.restorePurchaseControls(), 1100);\n        this.timers.push(timer);\n      } catch (error) {\n        if (error?.name === 'AbortError' || this.destroyed) return;\n        this.showError(window.LaleyTranslate(\"something_went_wrong_please_try_again_989566\", \"Noe gikk galt \u2013 pr\u00F8v igjen\"));\n        this.setPurchaseFeedback('error', window.LaleyTranslate(\"something_went_wrong_please_try_again_989566\", \"Noe gikk galt \u2013 pr\u00F8v igjen\"));\n        const timer = window.setTimeout(() => this.restorePurchaseControls(), 1800);\n        this.timers.push(timer);\n      } finally {\n        window.LaleyCartInspiration?.finishAdd?.(this.atc);\n      }\n    },\n\n    bindForm() {\n      if (!this.form || !this.atc) return;\n      // Non-cart modes are real buttons, not disguised form submits. Capture the\n      // click before legacy theme listeners can interpret \"Varsle meg\" as ATC.\n      this.on(this.atc, 'click', (event) => {\n        if (this.atc.dataset.mode === 'add') return;\n        event.preventDefault();\n        event.stopImmediatePropagation();\n        this.runPrimaryAction({ source: 'main' });\n      }, { capture: true });\n      this.on(this.form, 'submit', (event) => {\n        event.preventDefault();\n        event.stopPropagation();\n        this.runPrimaryAction({ source: 'main' });\n      });\n      // restock_signup_submitted (optional): the Klaviyo BIS form was submitted. This is NOT\n      // proof of signup \u2014 it only means the form left the page. Klaviyo renders its modal\n      // outside the section, so we listen at document level, scoped to (a) we opened BIS and\n      // (b) it is a Klaviyo form. Keeps _bisOpened alive to await confirmed success.\n      this.on(document, 'submit', (event) => {\n        if (!this._bisOpened || this._bisSubmitted) return;\n        const form = event.target;\n        if (!(form instanceof HTMLElement) || !form.closest('[class*=\"klaviyo\"], [class*=\"kl-\"], .needsclick, #klaviyo-bis-modal')) return;\n        this._bisSubmitted = true;\n        this.emitRestockAnalytics?.('restock_signup_submitted', { state: this._bisOpened.state, source: this._bisOpened.source });\n      }, { capture: true });\n      // restock_signup_completed: ONLY on a confirmed Klaviyo success hook. If the app never\n      // dispatches theme:product:bis-success, `completed` stays intentionally unfired\n      // (documented pending) \u2014 a form submit alone never counts as completed.\n      this.on(document, 'theme:product:bis-success', () => {\n        const info = this._bisOpened || {}; this._bisOpened = null; this._bisSubmitted = false;\n        this.emitRestockAnalytics?.('restock_signup_completed', { state: info.state, source: info.source });\n      });\n    },\n\n    bindOutfitAdds() {\n      // Hver outfit-knapp er n\u00E5 type=\"submit\" inni sin egen mini-form med\n      // hidden id+quantity. Submit g\u00E5r direkte til cart/add.js uten modal.\n      this.section.querySelectorAll('[data-pdp-outfit-form]').forEach((form) => {\n        this.bindOutfitForm(form, false);\n      });\n    },\n\n    clearError() {\n      if (!this.error) return;\n      this.error.textContent = '';\n      this.error.hidden = true;\n    },\n\n    showError(message) {\n      if (!this.error) return;\n      this.error.textContent = message;\n      this.error.hidden = false;\n    },\n  });\n})();\n"],
  "mappings": "CAMC,IAAM,CACL,MAAM,IAAM,OAAO,gBACnB,GAAI,CAAC,KAAO,OAAO,IAAI,gBAAmB,WAAY,CACpD,QAAQ,MAAM,yDAAoD,EAClE,MACF,CAGA,MAAM,iBAAmB,wBAEnB,qBAAuB,CAAC,KAAO,WAAa,EACjC,KAAK,UAAU,+BAA+B,EACzD,CAAC,IAAI,EACL,MAAM,KAAK,KAAK,mBAAmB,+BAA+B,GAAK,CAAC,CAAC,GACtE,QAAS,OAAU,CAEtB,MAAM,MAAM,iBAAiB,aAAa,IAAM,kBAC7C,MAAM,MAAM,oBAAoB,aAAa,IAAM,aAExD,MAAM,MAAM,YAAY,cAAe,iBAAkB,WAAW,CACtE,CAAC,CACH,EAEA,IAAI,eAAe,WAAY,CAC7B,cAAe,CACb,OAAO,KAAK,QAAQ,cAAc,mBAAmB,GAAG,aAAa,KAAK,GAAK,WACjF,EAEA,iBAAiB,QAAS,CACnB,KAAK,iBACV,KAAK,eAAe,YAAc,GAClC,OAAO,sBAAsB,IAAM,CAC7B,CAAC,KAAK,WAAa,KAAK,gBAAgB,cAAa,KAAK,eAAe,YAAc,QAC7F,CAAC,EACH,EAEA,oBAAoB,MAAO,QAAS,CAClC,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