{
  "version": 3,
  "sources": ["/cdn/shop/t/12/assets/garados-market-links.js?garados_english=1796309250583828424"],
  "sourcesContent": ["(() => {\n  \"use strict\";\n\n  const script = document.currentScript;\n  const printPageId = \"632638922941268629\";\n  const printTemplate = \"gp-template-\" + printPageId;\n  const query = new URLSearchParams(window.location.search);\n  const isPrintProxy = /\\/a\\/gempages\\/?$/.test(window.location.pathname)\n    && query.get(\"theme_page_id\") === printPageId;\n  const isPrintTemplate = script?.dataset.templateSuffix === printTemplate;\n\n  const root = (script?.dataset.marketRoot || window.Shopify?.routes?.root || \"/\")\n    .replace(/\\/+$/, \"\") + \"/\";\n  const storeHosts = new Set([\n    window.location.hostname,\n    script?.dataset.storeHost,\n    script?.dataset.storePermanentHost\n  ].filter(Boolean).map(host => host.toLowerCase()));\n\n  const english = document.documentElement.lang.split('-')[0] === 'en';\n  const aliases = {\n    'products/badehose-mit-wasserdichter-tasche': 'products/swimshorts-with-waterproof-pocket',\n    'products/oversized-t-shirt-dreizack': 'products/oversized-t-shirt-trident',\n    'collections/herren': 'collections/swimshorts'\n  };\n\n  function normalizeAnchor(anchor) {\n    if (english && (!anchor.getAttribute('href') || anchor.getAttribute('href').startsWith('#') ||\n        anchor.matches('[hreflang], [data-value]') ||\n        anchor.closest('localization-form, form[action*=\"/localization\"]'))) return;\n    let target;\n    try {\n      target = new URL(anchor.getAttribute(\"href\"), window.location.href);\n    } catch {\n      return;\n    }\n    if (!/^https?:$/.test(target.protocol) || !storeHosts.has(target.hostname.toLowerCase())) return;\n\n    if (english && (target.searchParams.has('country') || target.searchParams.has('locale'))) return;\n    const isPrintDestination = /\\/a\\/gempages\\/?$/.test(target.pathname)\n      && target.searchParams.get(\"theme_page_id\") === printPageId;\n    const isPrintCollection = /\\/collections\\/herren-kopie\\/?$/.test(target.pathname);\n    let href;\n    if (isPrintDestination || isPrintCollection) {\n      // The app proxy renders the published theme. The existing collection\n      // with a Print view preserves this theme and its selected market.\n      [\"version\", \"shop_id\", \"theme_page_id\", \"page_type\", \"view_live_url\"].forEach(name => target.searchParams.delete(name));\n      target.searchParams.set(\"view\", printTemplate);\n      href = root + (english ? \"collections/swimshorts\" : \"collections/herren\") + target.search + target.hash;\n    } else if (english) {\n      const match = target.pathname.match(/^\\/(?:[a-z]{2}(?:-[a-z]{2})?\\/)?((?:products|collections|pages|policies|blogs)(?:\\/[^/]+)*|cart|search)\\/?$/i);\n      if (!match) return;\n      const path = aliases[match[1]] || match[1];\n      href = root + path + target.search + target.hash;\n    } else {\n      // Preserve the existing market correction only for Print product links.\n      const content = document.getElementById(\"MainContent\") || document.querySelector(\"main\");\n      if ((!isPrintProxy && !isPrintTemplate) || !content?.contains(anchor)) return;\n      const productPath = target.pathname.match(/^\\/(?:[a-z]{2,3}(?:-[a-z0-9]{2,8})*\\/)?(products\\/[^/]+\\/?$)/i);\n      if (!productPath) return;\n      href = root + productPath[1] + target.search + target.hash;\n    }\n    if (anchor.getAttribute(\"href\") !== href) anchor.setAttribute(\"href\", href);\n  }\n\n  function normalizeTree(node) {\n    if (!(node instanceof Element)) return;\n    if (node.matches(\"a[href]\")) normalizeAnchor(node);\n    node.querySelectorAll(\"a[href]\").forEach(normalizeAnchor);\n  }\n\n  function initialize() {\n    if (!document.body) return;\n    normalizeTree(document.body);\n\n    // Cover navigation and GemPages links appended after the initial render.\n    new MutationObserver(records => {\n      records.forEach(record => {\n        if (record.type === \"attributes\") {\n          if (record.target.matches(\"a[href]\")) normalizeAnchor(record.target);\n        }\n        else record.addedNodes.forEach(normalizeTree);\n      });\n    }).observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: [\"href\"] });\n    document.body.addEventListener(\"click\", event => {\n      const anchor = event.target instanceof Element ? event.target.closest(\"a[href]\") : null;\n      if (anchor) normalizeAnchor(anchor);\n    }, true);\n  }\n\n  if (document.readyState === \"loading\") {\n    document.addEventListener(\"DOMContentLoaded\", initialize, { once: true });\n  } else {\n    initialize();\n  }\n})();\n"],
  "mappings": "CAAC,IAAM,CACL,a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