{
  "version": 3,
  "sources": ["/cdn/shop/t/25/assets/price-switcher.js?price_visibility=20260623-3"],
  "sourcesContent": ["(function () {\n  if (window.themePriceVisibility && typeof window.themePriceVisibility.init === 'function') {\n    window.themePriceVisibility.init();\n    return;\n  }\n\n  var root = document.documentElement;\n  var storageKey = root.getAttribute('data-price-visibility-key');\n  var legacyStorageKey = 'themeMoneySwitchState';\n  var initialized = false;\n  var observerStarted = false;\n  var applyScheduled = false;\n\n  function readStoredValue(key) {\n    if (!key) return null;\n    try {\n      return localStorage.getItem(key);\n    } catch (error) {\n      return null;\n    }\n  }\n\n  function writeStoredValue(key, value) {\n    if (!key) return;\n    try {\n      localStorage.setItem(key, value ? 'true' : 'false');\n    } catch (error) {}\n  }\n\n  function removeStoredValue(key) {\n    if (!key) return;\n    try {\n      localStorage.removeItem(key);\n    } catch (error) {}\n  }\n\n  function migrateLegacyStorage() {\n    if (!storageKey) return;\n    var stored = readStoredValue(storageKey);\n    var legacyStored = readStoredValue(legacyStorageKey);\n\n    if (stored === null && legacyStored !== null) {\n      writeStoredValue(storageKey, legacyStored === 'false' ? false : true);\n    }\n\n    removeStoredValue(legacyStorageKey);\n  }\n\n  function getShowPrices() {\n    if (!storageKey) return true;\n    migrateLegacyStorage();\n    return readStoredValue(storageKey) === 'false' ? false : true;\n  }\n\n  function cleanVisiblePrices() {\n    var hiddenPrices = document.querySelectorAll('.theme-money.hidden');\n    var priceElements = document.querySelectorAll('.theme-money');\n    var index;\n\n    for (index = 0; index < hiddenPrices.length; index += 1) {\n      hiddenPrices[index].classList.remove('hidden');\n    }\n\n    for (index = 0; index < priceElements.length; index += 1) {\n      if (priceElements[index].style.display === 'none') {\n        priceElements[index].style.display = '';\n      }\n    }\n  }\n\n  function syncControls(showPrices) {\n    var switches = document.querySelectorAll('#toggleVisibility');\n    var warnings = document.querySelectorAll('[data-price-visibility-warning]');\n    var index;\n\n    for (index = 0; index < switches.length; index += 1) {\n      switches[index].checked = showPrices;\n    }\n\n    for (index = 0; index < warnings.length; index += 1) {\n      warnings[index].setAttribute('aria-hidden', showPrices ? 'true' : 'false');\n    }\n  }\n\n  function applyPriceVisibility() {\n    var showPrices = getShowPrices();\n\n    root.classList.toggle('prices-hidden', !showPrices);\n    root.setAttribute('data-prices-visible', showPrices ? 'true' : 'false');\n\n    if (showPrices) {\n      cleanVisiblePrices();\n    }\n\n    syncControls(showPrices);\n  }\n\n  function scheduleApply() {\n    if (applyScheduled) return;\n    applyScheduled = true;\n    window.requestAnimationFrame(function () {\n      applyScheduled = false;\n      applyPriceVisibility();\n    });\n  }\n\n  function nodeAffectsPriceVisibility(node) {\n    if (!node || node.nodeType !== 1) return false;\n    if (node === root) return true;\n    if (node.matches && node.matches('.theme-money, [data-price-visibility-warning], #toggleVisibility')) return true;\n    return node.querySelector && node.querySelector('.theme-money, [data-price-visibility-warning], #toggleVisibility');\n  }\n\n  function handlePriceVisibilityMutations(mutations) {\n    var mutationIndex;\n    var nodeIndex;\n    var addedNodes;\n\n    for (mutationIndex = 0; mutationIndex < mutations.length; mutationIndex += 1) {\n      if (nodeAffectsPriceVisibility(mutations[mutationIndex].target)) {\n        scheduleApply();\n        return;\n      }\n\n      addedNodes = mutations[mutationIndex].addedNodes;\n      for (nodeIndex = 0; nodeIndex < addedNodes.length; nodeIndex += 1) {\n        if (nodeAffectsPriceVisibility(addedNodes[nodeIndex])) {\n          scheduleApply();\n          return;\n        }\n      }\n    }\n  }\n\n  function setShowPrices(showPrices) {\n    writeStoredValue(storageKey, showPrices);\n    removeStoredValue(legacyStorageKey);\n    applyPriceVisibility();\n  }\n\n  function startObserver() {\n    if (observerStarted || !window.MutationObserver) return;\n    observerStarted = true;\n\n    new MutationObserver(handlePriceVisibilityMutations).observe(root, {\n      childList: true,\n      subtree: true,\n      attributes: true,\n      attributeFilter: ['class', 'style']\n    });\n  }\n\n  function initPriceVisibility() {\n    applyPriceVisibility();\n    startObserver();\n\n    if (initialized) return;\n    initialized = true;\n\n    document.addEventListener('click', function (event) {\n      var button = event.target.closest('[data-show-prices]');\n      if (!button) return;\n\n      event.preventDefault();\n      setShowPrices(true);\n      window.location.reload();\n    });\n\n    document.addEventListener('change', function (event) {\n      if (!event.target || event.target.id !== 'toggleVisibility') return;\n      setShowPrices(event.target.checked);\n    });\n\n    window.addEventListener('pageshow', applyPriceVisibility);\n    window.addEventListener('storage', function (event) {\n      if (event.key === storageKey || event.key === legacyStorageKey) {\n        applyPriceVisibility();\n      }\n    });\n  }\n\n  applyPriceVisibility();\n\n  window.themePriceVisibility = {\n    apply: applyPriceVisibility,\n    init: initPriceVisibility,\n    show: function () {\n      setShowPrices(true);\n    },\n    hide: function () {\n      setShowPrices(false);\n    },\n    isVisible: getShowPrices\n  };\n\n  if (document.readyState === 'loading') {\n    document.addEventListener('DOMContentLoaded', initPriceVisibility);\n  } else {\n    initPriceVisibility();\n  }\n})();\n"],
  "mappings": "CAAC,UAAY,CACX,GAAI,OAAO,sBAAwB,OAAO,OAAO,qBAAqB,MAAS,WAAY,CACzF,OAAO,qBAAqB,KAAK,EACjC,MACF,CAEA,IAAI,KAAO,SAAS,gBAChB,WAAa,KAAK,aAAa,2BAA2B,EAC1D,iBAAmB,wBACnB,YAAc,GACd,gBAAkB,GAClB,eAAiB,GAErB,SAAS,gBAAgB,IAAK,CAC5B,GAAI,CAAC,IAAK,OAAO,KACjB,GAAI,CACF,OAAO,aAAa,QAAQ,GAAG,CACjC,OAAS,MAAO,CACd,OAAO,IACT,CACF,CAEA,SAAS,iBAAiB,IAAK,MAAO,CACpC,GAAK,IACL,GAAI,CACF,aAAa,QAAQ,IAAK,MAAQ,OAAS,OAAO,CACpD,OAAS,MAAO,CAAC,CACnB,CAEA,SAAS,kBAAkB,IAAK,CAC9B,GAAK,IACL,GAAI,CACF,aAAa,WAAW,GAAG,CAC7B,OAAS,MAAO,CAAC,CACnB,CAEA,SAAS,sBAAuB,CAC9B,GAAK,WACL,KAAI,OAAS,gBAAgB,UAAU,EACnC,aAAe,gBAAgB,gBAAg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