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C,EAAUC,GAAyB,CACvC,IAAIC,EACAC,EAIJ,GAFAF,GAAWA,EAAQ,WAAYC,EAAMD,EAAQ,UAEzC,CAACC,EAAK,OACN,IAAAE,EAAQ,IAAI,eAEZ,OAAO,eAAmB,MAC5BA,EAAQ,IAAI,gBAGV,OAAOD,EAAY,MACjB,OAAOA,EAAY,IAErBA,EAAW,OAAe,QAE1BA,EACE,OAAO,SAAS,SAChB,KACA,OAAO,SAAS,UACf,OAAO,SAAS,KAAO,IAAM,OAAO,SAAS,KAAO,KAI3D,MAAME,GAAaF,EAAU,IAAMD,GAAK,QAAQ,eAAgB,IAAI,EAC9DE,EAAA,KAAK,MAAOC,EAAW,EAAI,EAEjCD,EAAM,WAAa,UAAY,GAC/BA,EAAM,OAAS,UAAY,CACzB,GAAIA,EAAM,OAAS,KAAOA,EAAM,QAAU,IACxC,OAGE,IAACA,EAAM,cAAgBA,EAAM,aAAa,OAAO,EAAG,CAAC,IAAM,QAC7D,MAAM,MAAM,sBAAsB,EAG9B,MAAAE,EAAM,SAAS,cAAc,KAAK,EACxCA,EAAI,UAAYF,EAAM,aACtBE,EAAI,MAAM,aAAe,IACzBA,EAAI,MAAM,SAAW,IACrBA,EAAI,MAAM,SAAW,SAErBC,EAAS,IAAM,CACb,SAAS,KAAK,aAAaD,EAAK,SAAS,KAAK,WAAW,CAAC,CAAC,EAC5D,GAEHF,EAAM,KAAK,CACb,EAEMG,EAAYvD,GAAyB,CACrC,SAAS,aAAe,YAAc,SAAS,aAAe,cACvDA,IAEA,0BAAiB,mBAAoBA,CAAQ,CAE1D,ECxDAwD,EAAO,CAAE,SAAU,IAAIT,CAAW,qBAAqB,CAAE","names":["globModules","nodes","WithCallback","callback","children","once","useRef","useLayoutEffect","getReactRoot","el","root","ReactDOM","renderElement","node","resolve","reactModule","Component","nodeList","data","modules","__vitePreload","modules$1","gsap","CSSPlugin","ScrollToPlugin","open","element","duration","ease","onComplete","height","close","isDevice","userAgent","setTrackDataLayer","eventName","custom","getCookie","name","parts","_a","recommendArticlePost","endpoint","response","err","addInnerContainer","innerContainer","isStorybook","body","create","PUBLIC_PATH","svgXHR","options","url","baseUrl","_ajax","_fullPath","div","domready","svgxhr"],"sources":["../../../../../../src/scripts/glob-modules.ts","../../../../../../src/scripts/helpers/react-18-shim.tsx","../../../../../../src/scripts/modules.tsx","../../../../../../src/scripts/helpers/index.ts","../../../../../../src/scripts/index.ts","../../../../../../config.ts","../../../../../../src/scripts/helpers/svgxhr.ts","../../../../../../main.js"],"sourcesContent":["import type { Organism } from '@verndale/core';\n\nconst globModules: Organism[] = [];\n\nexport default globModules;\n","import React, { FC, ReactElement, useLayoutEffect, useRef } from 'react';\nimport ReactDOM, { Root as ReactRoot } from 'react-dom/client';\n\nconst nodes = new Map();\n\nconst WithCallback: FC<{ callback: () => void; children: ReactElement }> = ({\n callback,\n children\n}) => {\n const once = useRef<() => void>();\n useLayoutEffect(() => {\n if (once.current === callback) return;\n once.current = callback;\n callback();\n }, [callback]);\n\n return children;\n};\n\nconst getReactRoot = async (el: Element): Promise => {\n let root = nodes.get(el);\n\n if (!root) {\n root = ReactDOM.createRoot(el);\n nodes.set(el, root);\n }\n\n return root;\n};\n\nexport const renderElement = async (node: ReactElement, el: Element) => {\n // Create Root Element conditionally for new React 18 Root Api\n const root = await getReactRoot(el);\n\n return new Promise(resolve => {\n // eslint-disable-next-line\n // @ts-ignore\n root?.render( resolve(null)}>{node});\n });\n};\n","import React from 'react';\nimport type { Organism } from '@verndale/core';\nimport globModules from './glob-modules';\nimport { renderElement } from './helpers/react-18-shim';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const reactModule = (Component: any, nodeList: NodeListOf | HTMLElement, data?: object) => {\n const nodesArray = Array.isArray(nodeList) ? nodeList : Array.from(nodeList as NodeListOf);\n\n return nodesArray.forEach(node => {\n renderElement(, node);\n });\n};\n\nconst modules: Organism[] = [\n {\n name: 'sliderContainer',\n loader: () => import('./modules/sliderContainer')\n },\n {\n name: 'accordionList',\n loader: () => import('./modules/accordionList')\n },\n {\n name: 'accordion',\n loader: () => import('./modules/accordion')\n },\n {\n name: 'searchResults',\n loader: () => import('./modules/react/searchResults'),\n render: reactModule\n },\n {\n name: 'cardCarousel',\n loader: () => import('./modules/cardCarousel')\n },\n {\n name: 'contentVideo',\n loader: () => import('./modules/content-video')\n },\n {\n name: 'dynamicModal',\n loader: () => import('./modules/dynamicModal')\n },\n {\n name: 'popupForm',\n loader: () => import('./modules/popupForm')\n },\n {\n name: 'mockApi',\n loader: () => import('./modules/mockApi'),\n render: reactModule\n },\n {\n name: 'desktopHeader',\n loader: () => import('./modules/desktopHeader')\n },\n {\n name: 'mobileHeader',\n loader: () => import('./modules/mobileHeader')\n },\n {\n name: 'cart',\n loader: () => import('./modules/cart')\n },\n {\n name: 'productSample',\n loader: () => import('./modules/productSample')\n },\n {\n name: 'productSampleSelection',\n loader: () => import('./modules/productSampleSelection')\n },\n {\n name: 'productGallery',\n loader: () => import('./modules/productGallery')\n },\n {\n name: 'productGuideOverlay',\n loader: () => import('./modules/react/productGuideOverlay'),\n render: reactModule\n },\n {\n name: 'campaignSlider',\n loader: () => import('./modules/campaignSlider')\n },\n {\n name: 'campaignVideoCarousel',\n loader: () => import('./modules/campaignVideoCarousel')\n },\n {\n name: 'campaignContentCarousel',\n loader: () => import('./modules/campaignContentCarousel')\n },\n {\n name: 'tabs',\n loader: () => import('./modules/tabs')\n },\n {\n name: 'cartSample',\n loader: () => import('./modules/cartSample')\n },\n {\n name: 'ceraplusSteps',\n loader: () => import('./modules/ceraplusSteps')\n },\n {\n name: 'singleSelectQuestion',\n loader: () => import('./modules/singleSelectQuestion')\n },\n {\n name: 'singleLineQuestion',\n loader: () => import('./modules/singleLineQuestion')\n },\n {\n name: 'accessoriesCard',\n loader: () => import('./modules/accessoriesCard')\n },\n {\n name: 'geolocationModal',\n loader: () => import('./modules/geolocationModal')\n },\n {\n name: 'articleListing',\n loader: () => import('./modules/articleListing')\n },\n {\n name: 'articleRecommend',\n loader: () => import('./modules/articleRecommend')\n },\n {\n name: 'modal',\n loader: () => import('./modules/modal')\n },\n {\n name: 'checkout',\n loader: () => import('./modules/checkout')\n },\n {\n name: 'productCatalog',\n loader: () => import('./modules/productCatalog')\n },\n {\n name: 'articleListingSlider',\n loader: () => import('./modules/articleListingSlider')\n },\n {\n name: 'testimonialCarousel',\n loader: () => import('./modules/testimonialCarousel')\n },\n {\n name: 'footer',\n loader: () => import('./modules/footer')\n },\n {\n name: 'productsAccordionList',\n loader: () => import('./modules/productsAccordionList')\n }\n];\n\nexport default [...globModules, ...modules];\n","import { gsap, CSSPlugin } from 'gsap';\nimport { ScrollToPlugin } from 'gsap/all';\n\ngsap.registerPlugin(CSSPlugin);\ngsap.registerPlugin(ScrollToPlugin);\n\n/**\n * Opens an element\n *\n * @example\n * import {open} from '../helpers';\n *\n * open({ element: this.el.querySelector('.element)});\n *\n * @param {Object} element - HTML element you want to target for animation\n * @param {Number} duration - Speed of the animation\n * @param {String} ease - Ease of the animation\n * @param {Function} onComplete - On complete function\n */\n\ntype openProps = {\n element: HTMLElement;\n duration?: number;\n ease?: string;\n onComplete?: () => void;\n height?: string;\n};\n\nexport const open = ({\n element,\n duration = 0.4,\n ease = 'easeOut',\n onComplete,\n height = 'auto'\n}: openProps) => {\n gsap.set(element, { height });\n gsap.from(element, {\n height: 0,\n ease: ease,\n duration,\n onComplete: () => {\n onComplete && onComplete();\n }\n });\n};\n\n/**\n * Closes an element\n *\n * @example\n * import {close} from '../helpers';\n *\n * close({ element: this.el.querySelector('.element)});\n *\n * @param {Object} element - HTML element you want to target for animation\n * @param {Number} duration - Speed of the animation\n * @param {String} ease - Ease of the animation\n * @param {Function} onComplete - On complete function\n */\n\ntype closeProps = {\n element: HTMLElement;\n duration?: number;\n ease?: string;\n onComplete?: () => void;\n};\n\nexport const close = ({ element, duration = 0.4, ease = 'easeOut', onComplete }: closeProps) => {\n gsap.set(element, { height: element.offsetHeight });\n gsap.to(element, {\n height: 0,\n ease: ease,\n duration,\n onComplete: () => {\n onComplete && onComplete();\n }\n });\n};\n\n// /**\n// * Checks browser is running on a native mobile device\n// */\n\ntype ExtendedWindowType = typeof window & {\n opera: string;\n MSStream: boolean;\n};\nexport const isDevice = () => {\n const userAgent = navigator.userAgent || navigator.vendor || (window as ExtendedWindowType).opera;\n\n if (\n /windows phone/i.test(userAgent) ||\n /android/i.test(userAgent) ||\n (/iPad|iPhone|iPod/.test(userAgent) && !(window as ExtendedWindowType).MSStream)\n ) {\n return true;\n }\n\n return false;\n};\n\n// eslint-disable-next-line\nexport const setTrackDataLayer: (data: { eventName: string, custom: any }) => void = ({ eventName, custom = {} }) => {\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({\n event: eventName,\n ...custom\n });\n};\n\nexport const getCookie = (name: string) => {\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n\n if (parts.length === 2) {\n return parts.pop()?.split(';').shift();\n } else {\n return false;\n }\n};\n\n\nexport const recommendArticlePost = (endpoint: string, data: string) => {\n fetch(endpoint, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'\n },\n body: data\n }).then(response => response.json())\n .then(data => {\n console.log(data);\n }).catch(err => {\n console.error(err);\n });\n}\n\n\nexport const addInnerContainer = () => {\n const innerContainer = document.querySelector('.main-content:has(.sidebar)');\n\n\n if (innerContainer && !(innerContainer as HTMLElement).dataset.disableInnerContainer) {\n innerContainer.classList.add('inner_container');\n }\n};","import 'focus-visible';\nimport create from '@verndale/core';\nimport modules from './modules';\nimport { addInnerContainer } from './helpers';\n\nconst isStorybook = !!document.getElementById('storybook-root');\nconst body = document.querySelector('body') as HTMLBodyElement;\n\ndocument.addEventListener(\n 'DOMContentLoaded',\n async () => {\n if (!body.dataset.modulesLoaded || isStorybook) {\n create(modules).then(() => {\n body.dataset.modulesLoaded = 'true';\n });\n }\n addInnerContainer();\n },\n false\n);\n","// Public path\n// if set, make sure it ends with /\n// e.g. 'assets/'\nexport const PUBLIC_PATH = 'sites/public/design/refactor/';\n","type SvgXHRProps = {\n filename: string;\n};\n\nconst svgXHR = (options: SvgXHRProps) => {\n let url: string | undefined = undefined;\n let baseUrl: string | undefined = undefined;\n\n options && options.filename ? (url = options.filename) : null;\n\n if (!url) return;\n let _ajax = new XMLHttpRequest();\n\n if (typeof XMLHttpRequest !== 'undefined') {\n _ajax = new XMLHttpRequest();\n }\n\n if (typeof baseUrl === 'undefined') {\n if (typeof baseUrl !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n baseUrl = (window as any).baseUrl;\n } else {\n baseUrl =\n window.location.protocol +\n '//' +\n window.location.hostname +\n (window.location.port ? ':' + window.location.port : '');\n }\n }\n\n const _fullPath = (baseUrl + '/' + url).replace(/([^:]\\/)\\/+/g, '$1');\n _ajax.open('GET', _fullPath, true);\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n _ajax.onprogress = function () {};\n _ajax.onload = function () {\n if (_ajax.status < 200 || _ajax.status >= 300) {\n return;\n }\n\n if (!_ajax.responseText || _ajax.responseText.substr(0, 5) !== ' {\n document.body.insertBefore(div, document.body.childNodes[0]);\n });\n };\n _ajax.send();\n};\n\nconst domready = (callback: () => void) => {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n callback();\n } else {\n document.addEventListener('DOMContentLoaded', callback);\n }\n};\n\nexport default svgXHR;\n","import 'vite/modulepreload-polyfill';\nimport './src/scripts/index';\nimport { PUBLIC_PATH } from './config';\nimport svgxhr from './src/scripts/helpers/svgxhr';\nimport.meta.glob('./src/static/images/**/*');\n\nsvgxhr({ filename: `/${PUBLIC_PATH}images/svgsheet.svg` });\n"],"file":"sites/public/design/refactor/scripts/main.bundle.js"}