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M5B,GACP,IACX,CACJ,CDoBmB6B,CAAUtB,OAAOG,mBAG/BY,EAEMA,EAAWQ,UAClBvB,OAAOI,OAAOC,KAAK,UAAW,UAAWL,OAAOI,OAAOG,cAAc,YAErEP,OAAOI,OAAOC,KAAK,UAAW,UAAWL,OAAOI,OAAOG,cAAc,WAJrEP,OAAOI,OAAOC,KAAK,UAAW,UAAWL,OAAOI,OAAOG,cAAcP,OAAOE","sources":["webpack://launchpad/./node_modules/js-cookie/dist/js.cookie.mjs","webpack://launchpad/./src/3-components/HeadScripts/CookieConsentHeadScript.js","webpack://launchpad/./src/3-components/CookieConsent/CookieConsentUtils.ts"],"sourcesContent":["/*! js-cookie v3.0.5 | MIT */\n/* eslint-disable no-var */\nfunction assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n}\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\nvar defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n};\n/* eslint-enable no-var */\n\n/* eslint-disable no-var */\n\nfunction init (converter, defaultAttributes) {\n function set (name, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n name = encodeURIComponent(name)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n name + '=' + converter.write(value, name) + stringifiedAttributes)\n }\n\n function get (name) {\n if (typeof document === 'undefined' || (arguments.length && !name)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var found = decodeURIComponent(parts[0]);\n jar[found] = converter.read(value, found);\n\n if (name === found) {\n break\n }\n } catch (e) {}\n }\n\n return name ? jar[name] : jar\n }\n\n return Object.create(\n {\n set,\n get,\n remove: function (name, attributes) {\n set(\n name,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n}\n\nvar api = init(defaultConverter, { path: '/' });\n/* eslint-enable no-var */\n\nexport { api as default };\n","import { getCookie } from '3-components/CookieConsent/CookieConsentUtils';\n/* eslint-disable object-shorthand */\n\n// Reference Consent Mode: https://support.google.com/analytics/answer/9976101?hl=en\n// Manage Consent: https://developers.google.com/tag-platform/security/guides/consent\n\n// ON BED WILL DETERMINE THE defaultConsent value by country from cloudflare\n// window.defaultConsent = 'granted' | 'denied'\n\n\n// Define dataLayer and the gtag function.\nwindow.dataLayer = window.dataLayer || [];\nwindow.defaultConsent = window.defaultConsent || 'denied';\nwindow.consentCookieName = window.consentCookieName || 'consent';\n\nwindow.IFMSCR = {\n gtag: function() {\n // eslint-disable-next-line prefer-rest-params\n window.dataLayer.push(arguments);\n },\n setAllConsent: function(value) {\n return {\n ad_storage: value,\n analytics_storage: value,\n personalization_storage: value,\n functionality_storage: value,\n security_storage: value,\n ad_user_data: value,\n ad_personalization: value,\n };\n },\n};\n\nconst cookieData = getCookie(window.consentCookieName);\n\n// initial based on cookie\nif (!cookieData) {\n window.IFMSCR.gtag('consent', 'default', window.IFMSCR.setAllConsent(window.defaultConsent));\n} else if (cookieData.acceptAll) {\n window.IFMSCR.gtag('consent', 'default', window.IFMSCR.setAllConsent('granted'));\n} else {\n window.IFMSCR.gtag('consent', 'default', window.IFMSCR.setAllConsent('denied'));\n}\n","import Cookies from 'js-cookie';\n\nexport interface CookieConsentCookie {\n acceptAll: boolean;\n}\n\nexport const getCookie = (cookieName: string): CookieConsentCookie | null => {\n try {\n return JSON.parse(Cookies.get(cookieName) || 'null');\n } catch (e) {\n console.error(e);\n return null;\n }\n};\n"],"names":["target","i","arguments","length","source","key","api","init","converter","defaultAttributes","set","name","value","attributes","document","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","Object","create","get","cookies","jar","parts","slice","join","found","read","e","remove","withAttributes","this","withConverter","freeze","path","window","dataLayer","defaultConsent","consentCookieName","IFMSCR","gtag","push","setAllConsent","ad_storage","analytics_storage","personalization_storage","functionality_storage","security_storage","ad_user_data","ad_personalization","cookieData","cookieName","JSON","parse","Cookies","console","error","getCookie","acceptAll"],"sourceRoot":""}