{
  "version": 3,
  "sources": ["/cdn/shop/t/7/assets/vaultify-collect.js?vkt=1795623754"],
  "sourcesContent": ["/*\n * VaultifyUK first-party monitoring: the browser side (search first, 2026-11-24).\n *\n * Loaded (deferred) only when Theme settings > Search input > \"Search monitoring\" is on and an endpoint is set\n * (layout/theme.liquid writes window.vkCollect = { endpoint, env }). Features call window.VKCollect.add(record);\n * records are queued in memory and sent in one small batch with navigator.sendBeacon when the page is hidden or\n * left, when 10 are queued, or 15 s after the last one. Nothing is awaited, nothing is retried, and any error is\n * swallowed: monitoring can never delay or break the page. The collector is VaultifyUK-Labs/\n * vaultifyuk-storefront-services (app/modules/storefront-monitoring, ADR-012); it keeps daily totals only.\n *\n * What is sent: fixed codes, bounded numbers, a random record id (to drop duplicate deliveries; it links to\n * nothing), the sanitised search term and, for a product chosen from results, its numeric product id and position.\n * Never sent: cookies (sendBeacon of a text body to another site carries none), visitor or session ids, the page\n * address, referrer, user agent or anything typed apart from the search term.\n *\n * When records are collected (VaultifyUK privacy standard, consent gate approved by John, 25 Nov 2026). ALL of:\n *  - Shopify analytics consent: Shopify.customerPrivacy.currentVisitorConsent().analytics === 'yes' AND\n *    analyticsProcessingAllowed() === true. A blank answer (no choice yet) is never consent, even where Shopify\n *    allows analytics by default for the region. The API is loaded with Shopify.loadFeatures('consent-tracking-api');\n *    until it answers, nothing is collected. We only read the API: never Shopify's cookies, never setTrackingConsent.\n *  - no stored objection: localStorage vk-stats missing or 'on'. 'off' (the earlier switch) or any other value\n *    = nothing collected; storage unreadable = nothing collected (an objection could not be read);\n *  - no Global Privacy Control signal, no ?vk_collect=off, the theme setting on and an address set (otherwise this\n *    file is not loaded at all).\n * Checked at every add and again at every send. A search made before consent is never recorded later: add() drops\n * it, nothing is buffered while the answer is unknown.\n * Withdrawal: Shopify's visitorConsentCollected event without analytics drops the queue at once. The API keeps the\n * answer each tab had when it loaded (tested 25 Nov 2026: another tab's choice shows only after a reload), so a\n * withdrawal is also announced to this website's other open tabs on a BroadcastChannel ('vk-consent', no storage,\n * nothing identifying); they drop their queue and stop until reloaded. A browser without BroadcastChannel never\n * collects (it could not hear a withdrawal), and a page restored from the back/forward cache, or resumed after being\n * frozen (messages can be missed meanwhile), stops until reloaded. Anything queued is dropped when a page is frozen.\n * A stored objection changed in another tab (storage event) also drops the queue.\n * env: 'live' on the published theme, 'dev' on any other theme, 'test' when navigator.webdriver is set (Playwright\n * and other automation) or the session was opened with ?vk_test=1. Reports read 'live' only.\n */\n(function () {\n  var cfg = window.vkCollect;\n  if (!cfg || !cfg.endpoint || window.VKCollect) return;\n\n  var MAX_BATCH = 10;\n  var MAX_QUEUE = 20;\n  var IDLE_MS = 15000;\n  var queue = [];\n  var timer = null;\n\n  function storage() {\n    try {\n      var s = window.localStorage;\n      s.getItem('vk-stats');\n      return s;\n    } catch (e) {\n      return null;\n    }\n  }\n\n  function params() {\n    try {\n      return new URLSearchParams(window.location.search);\n    } catch (e) {\n      return new URLSearchParams('');\n    }\n  }\n\n  function env() {\n    var test = false;\n    try {\n      if (params().get('vk_test') === '1') window.sessionStorage.setItem('vk-test', '1');\n      test = window.sessionStorage.getItem('vk-test') === '1';\n    } catch (e) {\n      /* no session storage: fall through */\n    }\n    if (navigator.webdriver) test = true;\n    return test ? 'test' : cfg.env === 'live' ? 'live' : 'dev';\n  }\n\n  // ---- Shopify analytics consent (read only) ----\n  var channel = null;\n  var stopped = false; // withdrawn in another tab, or restored from the back/forward cache: stop until reloaded\n  try {\n    if (typeof BroadcastChannel === 'function') channel = new BroadcastChannel('vk-consent');\n  } catch (e) {\n    channel = null;\n  }\n  try {\n    if (window.Shopify && typeof window.Shopify.loadFeatures === 'function') {\n      window.Shopify.loadFeatures([{ name: 'consent-tracking-api', version: '0.1' }], function () {});\n    }\n  } catch (e) {\n    /* the API stays unavailable, so nothing is collected */\n  }\n\n  function consented() {\n    if (!channel || stopped) return false;\n    var cp = window.Shopify && window.Shopify.customerPrivacy;\n    if (!cp || typeof cp.currentVisitorConsent !== 'function' || typeof cp.analyticsProcessingAllowed !== 'function') {\n      return false;\n    }\n    try {\n      var c = cp.currentVisitorConsent();\n      return !!c && c.analytics === 'yes' && cp.analyticsProcessingAllowed() === true;\n    } catch (e) {\n      return false;\n    }\n  }\n\n  function drop() {\n    queue.length = 0;\n    if (timer) {\n      clearTimeout(timer);\n      timer = null;\n    }\n  }\n\n  /** True when collecting is allowed right now. Checked at every add and every send. */\n  function allowed() {\n    if (!consented()) return false;\n    var s = storage();\n    if (!s) return false;\n    var v = s.getItem('vk-stats');\n    if (v !== null && v !== 'on') return false;\n    if (navigator.globalPrivacyControl === true) return false;\n    if (params().get('vk_collect') === 'off') return false;\n    return true;\n  }\n\n  // ---- search terms: the collector applies the same rules again, and its result is the one kept ----\n  var MAX_TERM = 80;\n  var EMAIL = /[^\\s@]+@[^\\s@]+\\.[^\\s@]+/;\n  var URL_LIKE = /(https?:\\/\\/|www\\.)\\S+/;\n  var LONG_NUMBER = /(?:\\d[\\s.()-]*){7,}/;\n  // Order references: an order word with a number of 3+ digits (\"order #2434\"). A number alone is kept, because order\n  // numbers look like Funko numbers (#2238), card numbers and years. Same rule as the collector's sanitise.ts.\n  var ORDER_WORD = /\\b(?:orders?|invoice|receipt|refund|tracking|parcel|shipment|consignment)\\b/;\n  var ORDER_NUMBER = /\\d{3,}/;\n  var POSTCODE = /\\b[a-z]{1,2}\\d[a-z\\d]?\\s*\\d[a-z]{2}\\b/;\n  var NI_NUMBER = /\\b[a-z]{2}\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}\\s?[a-d]\\b/;\n  // eslint-disable-next-line no-control-regex\n  var CONTROL = new RegExp(\"[\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u200b-\\\\u200f\\\\u2028\\\\u2029\\\\ufeff]\", \"g\");\n\n  function term(input) {\n    var t = String(input || '');\n    try {\n      t = t.normalize('NFKC');\n    } catch (e) {\n      /* old browsers */\n    }\n    t = t.replace(CONTROL, ' ').toLowerCase().replace(/\\s+/g, ' ').trim();\n    if (!t) return '';\n    // A term that looks personal never leaves the page: a stand-in the collector redacts for the same reason is\n    // sent instead, so the reason is still counted.\n    if (t.length > MAX_TERM) return 'x'.repeat(MAX_TERM + 1);\n    if (EMAIL.test(t)) return 'redacted@redacted.invalid';\n    if (URL_LIKE.test(t)) return 'www.redacted.invalid';\n    if (LONG_NUMBER.test(t)) return '0000000';\n    if (ORDER_WORD.test(t) && ORDER_NUMBER.test(t)) return 'order 000';\n    if (NI_NUMBER.test(t)) return 'aa000000a';\n    if (POSTCODE.test(t)) return 'zz1 1zz';\n    return t;\n  }\n\n  function id() {\n    var s = '';\n    try {\n      var a = new Uint8Array(8);\n      crypto.getRandomValues(a);\n      for (var i = 0; i < a.length; i++) s += (a[i] % 36).toString(36);\n    } catch (e) {\n      s = Math.random().toString(36).slice(2, 10);\n    }\n    return (s + '00000000').slice(0, 10);\n  }\n\n  function device() {\n    var w = window.innerWidth || document.documentElement.clientWidth || 0;\n    return w < 750 ? 'phone' : w < 990 ? 'tablet' : 'desktop';\n  }\n\n  function ms(v) {\n    if (typeof v !== 'number' || !isFinite(v) || v < 0) return null;\n    return Math.min(60000, Math.round(v / 10) * 10);\n  }\n\n  function send() {\n    if (timer) {\n      clearTimeout(timer);\n      timer = null;\n    }\n    if (!queue.length) return;\n    var records = queue.splice(0, MAX_BATCH);\n    if (!allowed()) {\n      drop();\n      return;\n    }\n    var body = JSON.stringify({ v: 1, env: env(), records: records });\n    try {\n      var sent = false;\n      if (navigator.sendBeacon) sent = navigator.sendBeacon(cfg.endpoint, new Blob([body], { type: 'text/plain' }));\n      if (!sent && window.fetch) {\n        fetch(cfg.endpoint, { method: 'POST', body: body, keepalive: true, mode: 'no-cors', credentials: 'omit' }).catch(function () {});\n      }\n    } catch (e) {\n      /* never break the page */\n    }\n    if (queue.length) send();\n  }\n\n  function add(record) {\n    try {\n      if (!record || !allowed()) return;\n      record.id = id();\n      record.device = device();\n      queue.push(record);\n      if (queue.length > MAX_QUEUE) queue.splice(0, queue.length - MAX_QUEUE);\n      if (queue.length >= MAX_BATCH) send();\n      else {\n        if (timer) clearTimeout(timer);\n        timer = setTimeout(send, IDLE_MS);\n      }\n    } catch (e) {\n      /* never break the page */\n    }\n  }\n\n  document.addEventListener('visibilitychange', function () {\n    if (document.visibilityState === 'hidden') send();\n  });\n  window.addEventListener('pagehide', send);\n  // An objection (or an unreadable value) set in another tab: drop whatever this tab has queued.\n  window.addEventListener('storage', function (e) {\n    try {\n      if ((e.key === 'vk-stats' || e.key === null) && !allowed()) drop();\n    } catch (err) {\n      /* never break the page */\n    }\n  });\n  // A choice made in this tab (Shopify's banner or preferences window). This tab's API is now current.\n  document.addEventListener('visitorConsentCollected', function (e) {\n    try {\n      var yes = !!(e && e.detail && e.detail.analyticsAllowed === true);\n      if (yes) {\n        stopped = false;\n      } else {\n        drop();\n        if (channel) channel.postMessage('withdrawn');\n      }\n    } catch (err) {\n      /* never break the page */\n    }\n  });\n  // Withdrawn in another tab of this website: that tab's choice is not visible to this tab's API until a reload.\n  if (channel) {\n    channel.onmessage = function (e) {\n      if (e && e.data === 'withdrawn') {\n        stopped = true;\n        drop();\n      }\n    };\n  }\n  // Frozen (Page Lifecycle, e.g. a background tab on a phone): messages from other tabs may be missed while frozen,\n  // so drop the queue on freeze and stop until reload on resume.\n  document.addEventListener('freeze', drop);\n  document.addEventListener('resume', function () {\n    stopped = true;\n    drop();\n  });\n  // Restored from the back/forward cache: a choice may have changed meanwhile and messages were missed.\n  window.addEventListener('pageshow', function (e) {\n    if (e && e.persisted) {\n      stopped = true;\n      drop();\n    }\n  });\n\n  window.VKCollect = { add: add, term: term, ms: ms, allowed: allowed, flush: send };\n})();\n"],
  "mappings": "CAoCC,UAAY,CACX,IAAI,IAAM,OAAO,UACjB,GAAI,CAAC,KAAO,CAAC,IAAI,UAAY,OAAO,UAAW,OAE/C,IAAI,UAAY,GACZ,UAAY,GACZ,QAAU,KACV,MAAQ,CAAC,EACT,MAAQ,KAEZ,SAAS,SAA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