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CAGER,MAAMC,QAAQhJ,GAAaA,EAAUqI,WAAarI,EAClDE,EACAxB,EACAqB,EACAE,EACA0J,EACAd,EACAzB,EACAsC,IAGJ,MAAMQ,EAAoC,OAArBvB,EAAKoB,EAAMrB,YAAiB,EAASC,EAAGnI,OACvD2J,EAAsB,WACvBjK,IAAOgK,GAAgBjK,GAAgB0J,GAAQQ,EAAoBF,UAAYC,IAClFC,EAAoBF,QAAUC,EAC9BF,EAAS,CACP7J,SAAUyJ,EACVlB,WAAO,KAGX,MAAM0B,EAAS,CAACN,EAAQC,EAAM5J,OAAQ4J,EAAMrB,OAI5C,OAHA0B,EAAOlK,IAAMkK,EAAO,GACpBA,EAAOjK,OAASiK,EAAO,GACvBA,EAAO1B,MAAQ0B,EAAO,GACfA,CACT,CA7L2B","sources":["webpack:///./html/wp-content/themes/ls/src/js/main/components/module/Module.tsx","webpack:///./html/wp-content/themes/ls/src/js/main/components/regionalLogos/App.tsx","webpack:///./html/wp-content/themes/ls/src/js/main/components/regionalLogos/Debug.tsx","webpack:///./html/wp-content/themes/ls/src/js/main/components/regionalLogos/LogoImage.tsx","webpack:///./node_modules/js-cookie/dist/js.cookie.mjs","webpack:///./html/wp-content/themes/ls/src/js/main/components/regionalLogos/RegionalLogos.tsx","webpack:///./node_modules/react-intersection-observer/index.mjs"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { populateFootnoteSection } from 'root/core/footnoteSection';\n\ntype Footnote = {\n text: string;\n add_footnote: boolean;\n footnote: string;\n};\n\ntype ModuleProps = {\n moduleClassName?: string;\n title?: string;\n titleSize?: 'h2' | 'h3';\n titleFootnote?: Footnote;\n subtitle?: string;\n subtitleFootnote?: Footnote;\n backgroundColor?: 'black' | 'white' | 'grey';\n removeContainer?: boolean;\n moduleSpacing?: string;\n children: React.ReactNode;\n};\nfunction Module({\n moduleClassName,\n title,\n titleSize,\n titleFootnote,\n subtitle,\n subtitleFootnote,\n backgroundColor,\n removeContainer,\n moduleSpacing,\n children,\n}: ModuleProps) {\n const { textColorClass, backgroundColorClass } = (() => {\n switch (backgroundColor) {\n case 'black':\n return {\n textColorClass: 'gb-text-color--lightest',\n backgroundColorClass: 'gb-background-color--darkest',\n };\n case 'grey':\n return {\n textColorClass: 'gb-text-color--darkest',\n backgroundColorClass: 'gb-background-color--light',\n };\n case 'white':\n default:\n return {\n textColorClass: 'gb-text-color--darkest',\n backgroundColorClass: 'gb-background-color--lightest',\n };\n }\n })();\n\n const titleSizeClass = titleSize ? `gb-${titleSize}` : '';\n const addFootnote = (originalString: string, footnote?: Footnote) => {\n return footnote?.add_footnote && footnote?.footnote ? (\n {originalString}\n ) : (\n originalString\n );\n };\n\n useEffect(() => {\n populateFootnoteSection();\n }, [title, subtitle, titleFootnote, subtitleFootnote]);\n\n return (\n <>\n \n \n \n \n \n {title && (\n \n {addFootnote(title, titleFootnote)}\n \n )}\n {subtitle && (\n \n {addFootnote(subtitle, subtitleFootnote)}\n \n )}\n \n \n \n \n \n {children}\n \n \n >\n );\n}\nexport default Module;\n","import ReactDOM from 'react-dom';\nimport React from 'react';\nimport RegionalLogos from 'root/main/components/regionalLogos/RegionalLogos';\n\nexport default function () {\n const rootEls = document.querySelectorAll(\n '[data-react=regionalLogos]'\n ) as NodeListOf;\n rootEls.forEach(root => {\n ReactDOM.render(\n ,\n root\n );\n });\n}\n","import React from 'react';\nimport { Region } from 'root/main/components/regionalLogos/types';\ninterface DebugProps {\n region: Region;\n reactProductType: string | undefined;\n}\nexport default function Debug({ region, reactProductType }: DebugProps) {\n return (\n \n \n Region: {region.country_code}\n {region.state_code ? `_${region.state_code}` : ''} || Product Type:{' '}\n {reactProductType}\n \n \n );\n}\n","import React from 'react';\nimport { useInView } from 'react-intersection-observer';\n\ntype LogoImageProps = {\n src: string;\n alt?: string;\n url?: string;\n};\n\nconst logoTWClasses =\n 'tw-block tw-h-auto tw-max-w-full mob-l:tw-w-[210px] tw-min-h-[50px] tw-object-contain tw-relative tw-transition-all tw-duration-[1.1s] tw-ease-out';\n\nfunction LogoImage({ src, alt, url }: LogoImageProps) {\n const { ref, inView } = useInView({\n /* Optional options */\n rootMargin: '-5% 0%',\n threshold: 0,\n triggerOnce: true,\n });\n return (\n <>\n {url ? (\n \n \n \n ) : (\n \n )}\n >\n );\n}\nexport default LogoImage;\n","/*! 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 React, { useEffect, useState } from 'react';\nimport Module from 'root/main/components/module/Module';\nimport Cookies from 'js-cookie';\nimport LogoImage from 'root/main/components/regionalLogos/LogoImage';\nimport Debug from 'root/main/components/regionalLogos/Debug';\nimport { Region } from 'root/main/components/regionalLogos/types';\n\ninterface RegionalLogosProps {\n reactRegionalLogos: string | undefined;\n}\ninterface RegionalLogosParsedData {\n defaultRegionCountryCode?: string;\n productType?: string;\n title?: string;\n backgroundColor?: 'white' | 'grey' | 'black';\n regions?: Region[];\n}\n\ndeclare global {\n interface Window {\n registerCookieComplianceCallback: (params: {\n callback: () => void;\n category?: string;\n rejectCallback?: () => unknown;\n pendingCallback?: () => unknown;\n isCallOptanonWrapper?: boolean;\n }) => void;\n }\n}\n\nexport default function RegionalLogos(props: RegionalLogosProps) {\n const MIN_LOGOS_COUNT = 3;\n const [userCountryCode, setUserCountryCode] = useState('');\n const [userStateCode, setUserStateCode] = useState('');\n const regionalLogosProps = (props.reactRegionalLogos &&\n JSON.parse(props.reactRegionalLogos)) as RegionalLogosParsedData | undefined;\n const [region, setRegion] = useState({\n country_code: userCountryCode,\n state_code: userStateCode,\n logos: [],\n title: regionalLogosProps?.title ?? '',\n title_footnote: {\n text: '',\n add_footnote: false,\n footnote: '',\n },\n });\n const { defaultRegionCountryCode, productType, backgroundColor, regions } =\n regionalLogosProps ?? {};\n const urlParams = new URLSearchParams(window.location.search);\n\n useEffect(() => {\n const geoCookie = Cookies.get('geoConfig');\n const viewFromParam = urlParams.get('view_from');\n if (geoCookie) {\n const countryCode = JSON.parse(geoCookie).country_code;\n const stateCode = JSON.parse(geoCookie).state_code;\n countryCode && setUserCountryCode(countryCode);\n window.registerCookieComplianceCallback({\n callback: () => stateCode && setUserStateCode(stateCode),\n category: 'targeting',\n rejectCallback: () => setUserStateCode(''),\n });\n }\n if (viewFromParam) {\n const [viewFromCountryCode, viewFromStateCode] =\n viewFromParam?.split('_') ?? [];\n viewFromCountryCode && setUserCountryCode(viewFromCountryCode);\n window.registerCookieComplianceCallback({\n callback: () => viewFromStateCode && setUserStateCode(viewFromStateCode),\n category: 'targeting',\n rejectCallback: () => setUserStateCode(''),\n });\n }\n if (regions) {\n setRegion(() => {\n return (\n regions.find((region: Region) => {\n if (\n region.country_code === userCountryCode?.toLowerCase() &&\n region.state_code === userStateCode?.toLowerCase() &&\n region.logos.length >= MIN_LOGOS_COUNT\n ) {\n return region;\n }\n }) ??\n regions.find((region: Region) => {\n if (\n region.country_code === userCountryCode?.toLowerCase() &&\n !region.state_code &&\n region.logos.length >= MIN_LOGOS_COUNT\n ) {\n return region;\n }\n }) ??\n regions.find((region: Region) => {\n if (\n defaultRegionCountryCode &&\n region.country_code === defaultRegionCountryCode &&\n !region.state_code &&\n region.logos.length >= MIN_LOGOS_COUNT\n ) {\n return region;\n }\n }) ??\n // fallback\n regions[0]\n );\n });\n }\n }, [userCountryCode, userStateCode]);\n\n const { logos } = region;\n\n return (\n <>\n {logos.length > 0 && (\n \n {!!urlParams.get('debug_regional_logos') && (\n \n )}\n \n {logos.map((logo, index) => (\n 5 && index <= 9\n ? 'tw-hidden mob-l:tw-block'\n : ''\n }\n ${index > 9 ? 'tw-hidden' : ''}\n `}\n >\n \n \n ))}\n \n \n )}\n >\n );\n}\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\n\n// src/InView.tsx\nimport * as React from \"react\";\n\n// src/observe.ts\nvar observerMap = /* @__PURE__ */ new Map();\nvar RootIds = /* @__PURE__ */ new WeakMap();\nvar rootId = 0;\nvar unsupportedValue = void 0;\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\nfunction getRootId(root) {\n if (!root)\n return \"0\";\n if (RootIds.has(root))\n return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(\n (key) => options[key] !== void 0\n ).map((key) => {\n return `${key}_${key === \"root\" ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\nfunction createObserver(options) {\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n if (!instance) {\n const elements = /* @__PURE__ */ new Map();\n let thresholds;\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n var _a;\n const inView = entry.isIntersecting && thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n if (options.trackVisibility && typeof entry.isVisible === \"undefined\") {\n entry.isVisible = inView;\n }\n (_a = elements.get(entry.target)) == null ? void 0 : _a.forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n return instance;\n}\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === \"undefined\" && fallbackInView !== void 0) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === \"number\" ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {\n };\n }\n const { id, observer, elements } = createObserver(options);\n let callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n callbacks.splice(callbacks.indexOf(callback), 1);\n if (callbacks.length === 0) {\n elements.delete(element);\n observer.unobserve(element);\n }\n if (elements.size === 0) {\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\n// src/InView.tsx\nfunction isPlainChildren(props) {\n return typeof props.children !== \"function\";\n}\nvar InView = class extends React.Component {\n constructor(props) {\n super(props);\n __publicField(this, \"node\", null);\n __publicField(this, \"_unobserveCb\", null);\n __publicField(this, \"handleNode\", (node) => {\n if (this.node) {\n this.unobserve();\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n this.setState({ inView: !!this.props.initialInView, entry: void 0 });\n }\n }\n this.node = node ? node : null;\n this.observeNode();\n });\n __publicField(this, \"handleChange\", (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n this.props.onChange(inView, entry);\n }\n });\n this.state = {\n inView: !!props.initialInView,\n entry: void 0\n };\n }\n componentDidUpdate(prevProps) {\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n observeNode() {\n if (!this.node || this.props.skip)\n return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n }\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n render() {\n const { children } = this.props;\n if (typeof children === \"function\") {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props;\n return React.createElement(\n as || \"div\",\n { ref: this.handleNode, ...props },\n children\n );\n }\n};\n\n// src/useInView.tsx\nimport * as React2 from \"react\";\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _a;\n const [ref, setRef] = React2.useState(null);\n const callback = React2.useRef();\n const [state, setState] = React2.useState({\n inView: !!initialInView,\n entry: void 0\n });\n callback.current = onChange;\n React2.useEffect(\n () => {\n if (skip || !ref)\n return;\n let unobserve;\n unobserve = observe(\n ref,\n (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current)\n callback.current(inView, entry);\n if (entry.isIntersecting && triggerOnce && unobserve) {\n unobserve();\n unobserve = void 0;\n }\n },\n {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n },\n fallbackInView\n );\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n },\n // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold,\n ref,\n root,\n rootMargin,\n triggerOnce,\n skip,\n trackVisibility,\n fallbackInView,\n delay\n ]\n );\n const entryTarget = (_a = state.entry) == null ? void 0 : _a.target;\n const previousEntryTarget = React2.useRef();\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: void 0\n });\n }\n const result = [setRef, state.inView, state.entry];\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\nexport {\n InView,\n defaultFallbackInView,\n observe,\n useInView\n};\n//# sourceMappingURL=index.mjs.map"],"names":["_ref","moduleClassName","title","titleSize","titleFootnote","subtitle","subtitleFootnote","backgroundColor","removeContainer","moduleSpacing","children","_ref2","textColorClass","backgroundColorClass","titleSizeClass","concat","addFootnote","originalString","footnote","add_footnote","React","useEffect","populateFootnoteSection","className","document","querySelectorAll","forEach","root","ReactDOM","RegionalLogos","reactRegionalLogos","dataset","Debug","region","reactProductType","style","color","fontSize","fontWeight","textAlign","country_code","state_code","logoTWClasses","src","alt","url","_useInView","useInView","rootMargin","threshold","triggerOnce","ref","inView","href","loading","width","height","target","i","arguments","length","source","key","api","init","converter","defaultAttributes","set","name","value","attributes","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","props","_regionalLogosProps$t","_useState","useState","_useState2","_slicedToArray","userCountryCode","setUserCountryCode","_useState3","_useState4","userStateCode","setUserStateCode","regionalLogosProps","JSON","parse","_useState5","logos","title_footnote","text","_useState6","setRegion","defaultRegionCountryCode","productType","regions","urlParams","URLSearchParams","window","location","search","geoCookie","Cookies","viewFromParam","countryCode","stateCode","registerCookieComplianceCallback","callback","category","rejectCallback","_viewFromParam$split","_ref3","viewFromCountryCode","viewFromStateCode","_ref4","_ref5","_regions$find","find","toLowerCase","Module","map","logo","index","sizes","medium_large","LogoImage","observerMap","defineProperty","Map","RootIds","WeakMap","rootId","unsupportedValue","observe","element","options","fallbackInView","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","time","boundingClientRect","intersectionRect","rootBounds","id","observer","elements","keys","sort","filter","has","toString","optionsToId","instance","thresholds","entries","entry","_a","some","trackVisibility","isVisible","Array","isArray","createObserver","callbacks","push","splice","indexOf","delete","unobserve","size","disconnect","delay","skip","initialInView","onChange","setRef","state","setState","current","entryTarget","previousEntryTarget","result"],"sourceRoot":""}
\n {addFootnote(subtitle, subtitleFootnote)}\n
\n Region: {region.country_code}\n {region.state_code ? `_${region.state_code}` : ''} || Product Type:{' '}\n {reactProductType}\n