{
  "version": 3,
  "sources": ["/cdn/shop/t/87/assets/hk-pdp-header.js?r=step8"],
  "sourcesContent": ["/* ------------------------------------------------------------------\n   Hanakini product page header (TEST step 8, Oct 2026)\n\n   Option B: the review stars sit in the top right corner, on the same line\n   as the product name, at their full original size, with the count \"(13)\".\n   - Moves the Klaviyo star rating next to the name before Klaviyo draws it,\n     so it appears in place (space is reserved, nothing jumps).\n   - Products with no reviews yet show no stars (no empty grey stars).\n   - The price sits close under the name (the gap that used to hold the\n     reviews row is removed), so a price on its own never looks floating.\n   - The stars still link to the reviews further down the page.\n   Deleting the one script line in snippets/hk-pdp-calm.liquid turns it off.\n------------------------------------------------------------------- */\n(function () {\n  if (window.__hkPdpHeader) return;\n  window.__hkPdpHeader = true;\n\n  var css = document.createElement('style');\n  css.textContent =\n    '.product-block--header.hk-head-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px!important}' +\n    '.hk-head-row > .product-single__title{flex:1 1 auto;min-width:0;margin-bottom:0!important}' +\n    '.hk-head-row > .hk-head-stars{flex:0 0 auto;min-width:142px;display:flex;justify-content:flex-end;padding-top:3px}' +\n    '.hk-head-row > .hk-head-stars.hk-no-reviews{display:none!important}' +\n    '.hk-head-stars .shopify-block{margin:0!important}' +\n    '.hk-head-stars .klaviyo-star-rating-widget{display:block!important}' +\n    '.hk-head-stars .kl_reviews__star_rating_widget{display:flex!important;align-items:center;gap:6px;text-decoration:none}' +\n    '.hk-head-stars .kl_reviews__stars_badge{display:flex!important}' +\n    '.hk-head-stars .kl_reviews__star_rating_widget__label{font-size:14px!important;color:#423232!important;margin:0!important;white-space:nowrap}';\n  (document.head || document.documentElement).appendChild(css);\n\n  // \"13 reviews\" -> \"(13)\"; no reviews yet -> hide the stars\n  function shortLabels(holder) {\n    holder.querySelectorAll('.kl_reviews__star_rating_widget__label').forEach(function (label) {\n      var text = label.textContent;\n      var m = text.match(/^\\s*(\\d+)\\s+reviews?\\s*$/i) || text.match(/^\\s*\\((\\d+)\\)\\s*$/);\n      if (!m) return;\n      if (label.textContent !== '(' + m[1] + ')') label.textContent = '(' + m[1] + ')';\n      var none = m[1] === '0';\n      if (holder.classList.contains('hk-no-reviews') !== none) holder.classList.toggle('hk-no-reviews', none);\n    });\n  }\n\n  function setup() {\n    var header = document.querySelector('.product-block--header');\n    if (!header || header.classList.contains('hk-head-row')) return;\n    var title = header.querySelector('.product-single__title');\n    var scope = header.closest('.product-single__meta') || header.parentElement;\n    var widget = scope ? scope.querySelector('.klaviyo-star-rating-widget') : null;\n    if (!title || !widget) return;\n    var block = widget.closest('.shopify-block') || widget;\n    var holder = document.createElement('div');\n    holder.className = 'hk-head-stars';\n    holder.appendChild(block);\n    header.appendChild(holder);\n    header.classList.add('hk-head-row');\n    shortLabels(holder);\n    if (window.MutationObserver) {\n      new MutationObserver(function () { shortLabels(holder); }).observe(holder, { childList: true, subtree: true, characterData: true });\n    }\n  }\n\n  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', setup);\n  else setup();\n})();\n"],
  "mappings": "CAaC,UAAY,CACX,GAAI,OAAO,cAAe,OAC1B,OAAO,cAAgB,GAEvB,IAAI,IAAM,SAAS,cAAc,OAAO,EACxC,IAAI,YACF,o1BASD,SAAS,MAAQ,SAAS,iBAAiB,YAAY,GAAG,EAG3D,SAAS,YAAY,OAAQ,CAC3B,OAAO,iBAAiB,wCAAwC,EAAE,QAAQ,SAAU,MAAO,CACzF,IAAI,KAAO,MAAM,YACb,EAAI,KAAK,MAAM,2BAA2B,GAAK,KAAK,MAAM,mBAAmB,EACjF,GAAK,EACL,CAAI,MAAM,cAAgB,IAAM,EAAE,CAAC,EAAI,MAAK,MAAM,YAAc,IAAM,EAAE,CAAC,EAAI,KAC7E,IAAI,KAAO,EAAE,CAAC,IAAM,IAChB,OAAO,UAAU,SAAS,eAAe,IAAM,MAAM,OAAO,UAAU,OAAO,gBAAiB,IAAI,EACxG,CAAC,CACH,CAEA,SAAS,OAAQ,CACf,IAAI,OAAS,SAA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