{
  "version": 3,
  "sources": ["/cdn/shop/t/42/assets/tier-core.js?tl=tier1"],
  "sourcesContent": ["/* Titanor\u00E9 staffel: 2=10%, 3+=20%. Display helper only. Shopify applies the discount. */\n(function (root, factory) {\n  const api = factory();\n  if (typeof module === 'object' && module.exports) module.exports = api;\n  else root.TitanoreTier = api;\n})(typeof globalThis !== 'undefined' ? globalThis : this, function () {\n  'use strict';\n  const TIERS = Object.freeze([\n    Object.freeze({ minimum: 2, percent: 10 }),\n    Object.freeze({ minimum: 3, percent: 20 })\n  ]);\n  function integer(value, name) {\n    if (!Number.isSafeInteger(value) || value < 0) throw new TypeError(name + ' must be a nonnegative safe integer');\n    return value;\n  }\n  function getDiscountTier(count) {\n    integer(count, 'count');\n    if (count <= 1) {\n      return Object.freeze({ percent: 0, currentTier: 0, nextTier: 10 });\n    }\n    if (count === 2) {\n      return Object.freeze({ percent: 10, currentTier: 10, nextTier: 20 });\n    }\n    return Object.freeze({ percent: 20, currentTier: 20, nextTier: null });\n  }\n  function getStackState(count) {\n    const tier = getDiscountTier(count);\n    return Object.freeze({\n      qualifyingCount: count,\n      currentTier: tier.currentTier,\n      nextTier: tier.nextTier,\n      discountPercentage: tier.percent\n    });\n  }\n  function tierFor(quantity) {\n    integer(quantity, 'quantity');\n    return TIERS.reduce((tier, next) => quantity >= next.minimum ? next : tier, { minimum: 0, percent: 0 });\n  }\n  function nextTier(quantity) {\n    integer(quantity, 'quantity');\n    return TIERS.find(t => t.minimum > quantity) || null;\n  }\n  function formatMoney(cents, currency) {\n    integer(cents, 'cents');\n    return new Intl.NumberFormat('nl-NL', { style: 'currency', currency: currency || 'EUR' }).format(cents / 100);\n  }\n  return Object.freeze({ TIERS, getDiscountTier, getStackState, tierFor, nextTier, formatMoney });\n});\n"],
  "mappings": "CACC,SAAU,KAAM,QAAS,CACxB,MAAM,IAAM,QAAQ,EAChB,OAAO,QAAW,UAAY,OAAO,QAAS,OAAO,QAAU,IAC9D,KAAK,aAAe,GAC3B,GAAG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