{
  "version": 3,
  "sources": ["/cdn/shop/t/11/assets/natolino-cart-preview.js?x=7654"],
  "sourcesContent": ["/* Personal Cart previews from bounded properties; no external uploads or analytics. */\n(function () {\n  'use strict';\n  if (window.NLCartPreview) return;\n  function render() {\n    if (!window.NLPoster) return;\n    var config = document.querySelector('[data-nl-cart-config]');\n    if (!config) return;\n    try { config = JSON.parse(config.textContent); } catch (ignored) { return; }\n    document.querySelectorAll('[data-nl-cart-preview]').forEach(function (element) {\n      if (element.dataset.rendered && element.__nlProperties === element.dataset.properties && element.querySelector('svg')) return;\n      try {\n        var properties = JSON.parse(element.dataset.properties);\n        if (Array.isArray(properties)) properties = Object.fromEntries(properties);\n        // Liquid serializes property values as escaped text, while cart.js returns raw values.\n        // Decode one layer in an inert textarea, then let the shared SVG renderer escape again.\n        ['_name','_place','Name','Geburtsort','Mjesto ro\u0111enja','Birthplace','Zitat','Citat','Quote'].forEach(function (key) {\n          var value = properties[key];\n          if (typeof value === 'string' && /&(?:amp|lt|gt|quot|#39|#\\d+|#x[a-f0-9]+);/i.test(value)) {\n            var decoder = document.createElement('textarea');\n            decoder.innerHTML = value;\n            properties[key] = decoder.value;\n          }\n        });\n        if (properties._style === 'kinderposter' && window.NLKids && window.NLKids.renderCart(element, properties)) return;\n        if (properties._style === 'namensposter' && window.NLNames && window.NLNames.cartPreview(element, properties)) return;\n        if (properties._style === 'geburtsort' && window.NLPlace && window.NLPlace.cartPreview(element, properties)) return;\n        if (properties._style === 'zitatposter' && window.NLQuote && window.NLQuote.cartPreview(element, properties)) return;\n        if (properties._style === 'abdruck' && window.NLPrint && window.NLPrint.cartPreview(element, properties)) return;\n        var state = window.NLPoster.fromProperties(properties);\n        if (!state) {\n          if (element.childNodes.length) element.replaceChildren();\n          delete element.dataset.rendered;\n          var fallback = element.parentElement.querySelector('img.cart-items__media-image');\n          if (fallback) fallback.hidden = false;\n          return;\n        }\n        var renderer = new window.NLPoster.PosterSvg(config.forms, config.text, new window.NLPoster.Fmt(properties._locale));\n        element.innerHTML = renderer.render(state);\n        element.dataset.frame = state.frame;\n        element.dataset.rendered = 'true';\n        element.__nlProperties = element.dataset.properties;\n        var image = element.parentElement.querySelector('img.cart-items__media-image');\n        if (image) image.hidden = true;\n      } catch (ignored) { /* Existing product image remains the fallback. */ }\n    });\n    if (window.NLJourney) window.NLJourney.refresh();\n  }\n  var scheduled = false;\n  function schedule() {\n    if (scheduled) return;\n    scheduled = true;\n    requestAnimationFrame(function () { scheduled = false; render(); });\n  }\n  window.NLCartPreview = Object.freeze({render:render});\n  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', render, {once:true});\n  else render();\n  document.addEventListener('shopify:section:load', render);\n  new MutationObserver(function (records) {\n    if (records.some(function (record) {\n      if (record.target.nodeType === 1 && record.target.closest('[data-nl-cart-preview]')) return true;\n      return Array.from(record.addedNodes || []).concat(Array.from(record.removedNodes || [])).some(function (node) {\n        return node.nodeType === 1 && (node.matches('[data-nl-cart-preview]') || node.querySelector('[data-nl-cart-preview]'));\n      });\n    })) schedule();\n  }).observe(document.documentElement, {childList:true, subtree:true, attributes:true, attributeFilter:['data-properties']});\n})();\n"],
  "mappings": "CACC,UAAY,CACX,aACA,GAAI,OAAO,cAAe,OAC1B,SAAS,QAAS,CAChB,GAAK,OAAO,SACZ,KAAI,OAAS,SAAS,cAAc,uBAAuB,EAC3D,GAAK,OACL,IAAI,CAAE,OAAS,KAAK,MAAM,OAAO,WAAW,CAAG,OAAS,QAAS,CAAE,MAAQ,CAC3E,SAAS,iBAAiB,wBAAwB,EAAE,QAAQ,SAAU,QAAS,CAC7E,GAAI,UAAQ,QAAQ,UAAY,QAAQ,iBAAmB,QAAQ,QAAQ,YAAc,QAAQ,cAAc,KAAK,GACpH,GAAI,CACF,IAAI,WAAa,KAAK,MAAM,QAAQ,QAAQ,UAAU,EAgBtD,GAfI,MAAM,QAAQ,UAAU,IAAG,WAAa,OAAO,YAAY,UAAU,GAGzE,CAAC,QAAQ,SAAS,OAAO,aAAa,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